From 9c3e8674ae6113d0f99005a49881b0634c26bb3c Mon Sep 17 00:00:00 2001 From: kaetemi Date: Wed, 24 Sep 2014 16:08:16 +0200 Subject: [PATCH 001/236] Add tool to build streamed package, ref #179 --HG-- branch : feature-streamed-package --- code/nel/include/nel/misc/streamed_package.h | 56 +++ .../nel/misc/streamed_package_manager.h | 34 ++ code/nel/src/misc/streamed_package.cpp | 66 ++++ .../nel/src/misc/streamed_package_manager.cpp | 36 ++ code/nel/tools/misc/CMakeLists.txt | 2 +- code/nel/tools/misc/snp_make/CMakeLists.txt | 9 + code/nel/tools/misc/snp_make/main.cpp | 355 ++++++++++++++++++ .../tools/patch_gen/patch_gen_common.cpp | 3 +- 8 files changed, 559 insertions(+), 2 deletions(-) create mode 100644 code/nel/include/nel/misc/streamed_package.h create mode 100644 code/nel/include/nel/misc/streamed_package_manager.h create mode 100644 code/nel/src/misc/streamed_package.cpp create mode 100644 code/nel/src/misc/streamed_package_manager.cpp create mode 100644 code/nel/tools/misc/snp_make/CMakeLists.txt create mode 100644 code/nel/tools/misc/snp_make/main.cpp diff --git a/code/nel/include/nel/misc/streamed_package.h b/code/nel/include/nel/misc/streamed_package.h new file mode 100644 index 000000000..b27e6658f --- /dev/null +++ b/code/nel/include/nel/misc/streamed_package.h @@ -0,0 +1,56 @@ +// NeL - MMORPG Framework +// Copyright (C) 2014 Jan BOON (jan.boon@kaetemi.be) +// +// 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 +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +#ifndef NLMISC_STREAMED_PACKAGE_H +#define NLMISC_STREAMED_PACKAGE_H + +#include + +namespace NLMISC { + +class CStreamedPackage +{ +public: + struct CEntry + { + std::string Name; + CHashKey Hash; + uint32 Size; + uint32 LastModified; + + void serial(NLMISC::IStream &f) throw(NLMISC::EStream); + + }; + +public: + CStreamedPackage(); + ~CStreamedPackage(); + + void serial(NLMISC::IStream &f) throw(NLMISC::EStream); + + static void makePath(std::string &result, const CHashKey &hash); + +public: + typedef std::vector TEntries; + TEntries Entries; + +}; /* class CStreamedPackage */ + +} /* namespace NLMISC */ + +#endif /* #ifndef NLMISC_STREAMED_PACKAGE_H */ + +/* end of file */ diff --git a/code/nel/include/nel/misc/streamed_package_manager.h b/code/nel/include/nel/misc/streamed_package_manager.h new file mode 100644 index 000000000..0bec38584 --- /dev/null +++ b/code/nel/include/nel/misc/streamed_package_manager.h @@ -0,0 +1,34 @@ +// NeL - MMORPG Framework +// Copyright (C) 2014 Jan BOON (jan.boon@kaetemi.be) +// +// 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 +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +#ifndef NLMISC_STREAMED_PACKAGE_H +#define NLMISC_STREAMED_PACKAGE_H + +namespace NLMISC { + +class CStreamedPackageManager +{ +public: + CStreamedPackageManager(); + ~CStreamedPackageManager(); + +}; /* class CStreamedPackageManager */ + +} /* namespace NLMISC */ + +#endif /* #ifndef NLMISC_STREAMED_PACKAGE_H */ + +/* end of file */ diff --git a/code/nel/src/misc/streamed_package.cpp b/code/nel/src/misc/streamed_package.cpp new file mode 100644 index 000000000..fed7d1dc3 --- /dev/null +++ b/code/nel/src/misc/streamed_package.cpp @@ -0,0 +1,66 @@ +// NeL - MMORPG Framework +// Copyright (C) 2014 Jan BOON (jan.boon@kaetemi.be) +// +// 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 +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +#include "stdmisc.h" + +// Project includes +#include +#include + +namespace NLMISC { + +CStreamedPackage::CStreamedPackage() +{ + // init +} + +CStreamedPackage::~CStreamedPackage() +{ + // release +} + +void CStreamedPackage::serial(NLMISC::IStream &f) throw(NLMISC::EStream) +{ + f.serialCheck(NELID("SNPK")); + + uint version = 1; + f.serialVersion(version); + + f.serialCont(Entries); +} + +void CStreamedPackage::CEntry::serial(NLMISC::IStream &f) throw(NLMISC::EStream) +{ + uint version = 1; + f.serialVersion(version); + + f.serial(Name); + f.serial(Hash); + f.serial(Size); + f.serial(LastModified); +} + +void CStreamedPackage::makePath(std::string &result, const CHashKey &hash) +{ + std::string lowerHash = NLMISC::toLower(hash.toString()); + result = std::string("/") + lowerHash.substr(0, 2) + + "/" + lowerHash.substr(2, 2) + + "/" + lowerHash.substr(4); +} + +} /* namespace NLMISC */ + +/* end of file */ diff --git a/code/nel/src/misc/streamed_package_manager.cpp b/code/nel/src/misc/streamed_package_manager.cpp new file mode 100644 index 000000000..2d04cb95a --- /dev/null +++ b/code/nel/src/misc/streamed_package_manager.cpp @@ -0,0 +1,36 @@ +// NeL - MMORPG Framework +// Copyright (C) 2014 Jan BOON (jan.boon@kaetemi.be) +// +// 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 +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +#include "stdmisc.h" + +// Project includes +#include + +namespace NLMISC { + +CStreamedPackageManager::CStreamedPackageManager() +{ + // init +} + +CStreamedPackageManager::~CStreamedPackageManager() +{ + // release +} + +} /* namespace NLMISC */ + +/* end of file */ diff --git a/code/nel/tools/misc/CMakeLists.txt b/code/nel/tools/misc/CMakeLists.txt index 5386cbbc6..76399f6a3 100644 --- a/code/nel/tools/misc/CMakeLists.txt +++ b/code/nel/tools/misc/CMakeLists.txt @@ -1,4 +1,4 @@ -SUBDIRS(bnp_make disp_sheet_id extract_filename lock make_sheet_id xml_packer) +SUBDIRS(bnp_make snp_make disp_sheet_id extract_filename lock make_sheet_id xml_packer) IF(WITH_QT) ADD_SUBDIRECTORY(words_dic_qt) diff --git a/code/nel/tools/misc/snp_make/CMakeLists.txt b/code/nel/tools/misc/snp_make/CMakeLists.txt new file mode 100644 index 000000000..a1b5f388d --- /dev/null +++ b/code/nel/tools/misc/snp_make/CMakeLists.txt @@ -0,0 +1,9 @@ +FILE(GLOB SRC *.cpp *.h) + +ADD_EXECUTABLE(snp_make ${SRC}) + +TARGET_LINK_LIBRARIES(snp_make nelmisc) +NL_DEFAULT_PROPS(snp_make "NeL, Tools, Misc: snp_make") +NL_ADD_RUNTIME_FLAGS(snp_make) + +INSTALL(TARGETS snp_make RUNTIME DESTINATION ${NL_BIN_PREFIX} COMPONENT toolsmisc) diff --git a/code/nel/tools/misc/snp_make/main.cpp b/code/nel/tools/misc/snp_make/main.cpp new file mode 100644 index 000000000..61fc11810 --- /dev/null +++ b/code/nel/tools/misc/snp_make/main.cpp @@ -0,0 +1,355 @@ +// NeL - MMORPG Framework +// Copyright (C) 2010 Winch Gate Property Limited +// +// 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 +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +#include "nel/misc/types_nl.h" + +#include +#include + +#ifdef NL_OS_WINDOWS +# include +# include +#endif + +#include +#include + +#include "nel/misc/debug.h" +#include "nel/misc/file.h" +#include "nel/misc/path.h" +#include "nel/misc/algo.h" +#include "nel/misc/common.h" +#include "nel/misc/streamed_package.h" + +using namespace std; +using namespace NLMISC; + +// --------------------------------------------------------------------------- + +class CWildCard +{ +public: + string Expression; + bool Not; +}; +std::vector WildCards; + +std::string SourceDirectory; +std::string PackageFileName; +std::string StreamDirectory; + +CStreamedPackage Package; + +// --------------------------------------------------------------------------- + +bool keepFile (const char *fileName) +{ + uint i; + bool ifPresent = false; + bool ifTrue = false; + string file = toLower(CFile::getFilename (fileName)); + for (i=0; i [option] ... [option]\n"); + printf (" option : \n"); + printf (" -if wildcard : add the file if it matches the wilcard (at least one 'if' conditions must be met for a file to be adding)\n"); + printf (" -ifnot wildcard : add the file if it doesn't match the wilcard (all the 'ifnot' conditions must be met for a file to be adding)\n"); + printf (" Pack the directory to a snp file\n"); + printf (" snp_make /l \n"); + printf (" List the files contained in the snp file\n"); +} + +// --------------------------------------------------------------------------- + +void generateLZMA(const std::string sourceFile, const std::string &outputFile) +{ + std::string cmd="lzma e "; + cmd+=" "+sourceFile+" "+outputFile; + nlinfo("executing system command: %s",cmd.c_str()); +#ifdef NL_OS_WINDOWS + _spawnlp(_P_WAIT, "lzma.exe","lzma.exe", "e", sourceFile.c_str(), outputFile.c_str(), NULL); +#else // NL_OS_WINDOWS + sint error = system (cmd.c_str()); + if (error) + nlwarning("'%s' failed with error code %d", cmd.c_str(), error); +#endif // NL_OS_WINDOWS +} + +// --------------------------------------------------------------------------- + +uint readOptions (int nNbArg, char **ppArgs) +{ + uint i; + uint optionCount = 0; + for (i=0; i<(uint)nNbArg; i++) + { + // If ? + if ((strcmp (ppArgs[i], "-if") == 0) && ((i+1)<(uint)nNbArg)) + { + CWildCard card; + card.Expression = toLower(string(ppArgs[i+1])); + card.Not = false; + WildCards.push_back (card); + optionCount += 2; + } + // If not ? + if ((strcmp (ppArgs[i], "-ifnot") == 0) && ((i+1)<(uint)nNbArg)) + { + CWildCard card; + card.Expression = toLower(string(ppArgs[i+1])); + card.Not = true; + WildCards.push_back (card); + optionCount += 2; + } + } + return optionCount; +} + +// --------------------------------------------------------------------------- +int main (int nNbArg, char **ppArgs) +{ + NLMISC::CApplicationContext myApplicationContext; + + if (nNbArg < 3) + { + usage(); + return -1; + } + + if ((strcmp(ppArgs[1], "/p") == 0) || (strcmp(ppArgs[1], "/P") == 0) || + (strcmp(ppArgs[1], "-p") == 0) || (strcmp(ppArgs[1], "-P") == 0)) + { + if (nNbArg < 5) + { + usage(); + return -1; + } + + SourceDirectory = ppArgs[2]; + PackageFileName = ppArgs[3]; + StreamDirectory = ppArgs[4]; + readOptions(nNbArg, ppArgs); + + nldebug("Make streamed package: '%s'", PackageFileName.c_str()); + + if (CFile::fileExists(PackageFileName)) + { + nldebug("Update existing package"); + try + { + CIFile fi; + fi.open(PackageFileName); + fi.serial(Package); + } + catch (Exception &e) + { + nlwarning("ERROR (snp_make) : serial exception: '%s'", e.what()); + return -1; + } + } + else + { + nldebug("New package"); + } + + std::vector pathContent; // contains full pathnames + std::vector nameContent; // only filename + CPath::getPathContent(SourceDirectory, true, false, true, pathContent); + nameContent.reserve(pathContent.size()); + for (std::vector::size_type i = 0; i < pathContent.size(); ++i) + { + const std::string &file = pathContent[i]; + if (keepFile(file.c_str())) + { + std::string fileName = NLMISC::toLower(CFile::getFilename(file)); + // nldebug("File: '%s' ('%s')", file.c_str(), fileName.c_str()); + nameContent.push_back(fileName); + nlassert(nameContent.size() == (i + 1)); + } + else + { + // Not included in this package + pathContent.erase(pathContent.begin() + i); + --i; + } + } + + std::vector packageIndex; // index of file in package + packageIndex.resize(pathContent.size(), -1); + + for (CStreamedPackage::TEntries::size_type i = 0; i < Package.Entries.size(); ++i) + { + const CStreamedPackage::CEntry &entry = Package.Entries[i]; + + sint foundIndex = -1; // find index in found file list + for (std::vector::size_type j = 0; j < pathContent.size(); ++j) + { + if (nameContent[j] == entry.Name) + { + foundIndex = j; + break; + } + } + + if (foundIndex < 0) + { + nlinfo("File no longer exists: '%s'", entry.Name.c_str()); + Package.Entries.erase(Package.Entries.begin() + i); + --i; + } + else + { + // File still exists, map it + packageIndex[foundIndex] = i; + } + } + + for (std::vector::size_type i = 0; i < pathContent.size(); ++i) + { + sint pidx = packageIndex[i]; + const std::string &name = nameContent[i]; + const std::string &path = pathContent[i]; + + if (pidx < 0) + { + nlinfo("File added: '%s'", name.c_str()); + pidx = Package.Entries.size(); + Package.Entries.push_back(CStreamedPackage::CEntry()); + Package.Entries[pidx].Name = name; + Package.Entries[pidx].LastModified = 0; + Package.Entries[pidx].Size = 0; + } + else + { + nlinfo("File check for changes: '%s'", name.c_str()); + } + + CStreamedPackage::CEntry &entry = Package.Entries[pidx]; + + std::string targetLzmaOld; // in case lzma wasn't made make sure it exists a second run + CStreamedPackage::makePath(targetLzmaOld, entry.Hash); + targetLzmaOld = StreamDirectory + targetLzmaOld + ".lzma"; + + uint32 lastModified = CFile::getFileModificationDate(path); + uint32 fileSize = CFile::getFileSize(path); + if (lastModified > entry.LastModified || fileSize != entry.Size || !CFile::fileExists(targetLzmaOld)) + { + entry.LastModified = lastModified; + + nlinfo("Calculate file hash"); + CHashKey hash = getSHA1(path, true); + /*nldebug("%s", hash.toString().c_str()); + std::string hashPath; + CStreamedPackage::makePath(hashPath, hash); + nldebug("%s", hashPath.c_str());*/ + + if (hash == entry.Hash && fileSize == entry.Size) + { + // File has not changed + } + else + { + nlinfo("File changed"); + entry.Hash = hash; + entry.Size = fileSize; + } + + std::string targetLzma; // in case lzma wasn't made make sure it exists a second run + CStreamedPackage::makePath(targetLzma, entry.Hash); + targetLzma = StreamDirectory + targetLzma + ".lzma"; + + if (!CFile::fileExists(targetLzma)) + { + // make the compressed file + nlinfo("%s -> %s", path.c_str(), targetLzma.c_str()); + CFile::createDirectoryTree(CFile::getPath(targetLzma)); + generateLZMA(path, targetLzma); + } + } + } + + try + { + nldebug("Store package '%s'", PackageFileName.c_str()); + COFile fo; + fo.open(PackageFileName); + fo.serial(Package); + } + catch (Exception &e) + { + nlwarning("ERROR (snp_make) : serial exception: '%s'", e.what()); + return -1; + } + + return 0; + } + + if ((strcmp(ppArgs[1], "/l") == 0) || (strcmp(ppArgs[1], "/L") == 0) || + (strcmp(ppArgs[1], "-l") == 0) || (strcmp(ppArgs[1], "-L") == 0)) + { + PackageFileName = ppArgs[2]; + if (!CFile::fileExists(PackageFileName)) + { + nlwarning("ERROR (snp_make) : package doesn't exist: '%s'", PackageFileName.c_str()); + return -1; + } + + try + { + CIFile fi; + fi.open(PackageFileName); + fi.serial(Package); + } + catch (Exception &e) + { + nlwarning("ERROR (snp_make) : serial exception: '%s'", e.what()); + return -1; + } + + for (CStreamedPackage::TEntries::const_iterator it(Package.Entries.begin()), end(Package.Entries.end()); it != end; ++it) + { + const CStreamedPackage::CEntry &entry = (*it); + + printf("List files in '%s'", PackageFileName.c_str()); + printf("%s { Hash: '%s', Size: '%u', LastModified: '%u' }", entry.Name.c_str(), entry.Hash.toString().c_str(), entry.Size, entry.LastModified); + } + + return 0; + } + + usage (); + return -1; +} diff --git a/code/ryzom/tools/patch_gen/patch_gen_common.cpp b/code/ryzom/tools/patch_gen/patch_gen_common.cpp index 3d28a2439..127be5053 100644 --- a/code/ryzom/tools/patch_gen/patch_gen_common.cpp +++ b/code/ryzom/tools/patch_gen/patch_gen_common.cpp @@ -442,7 +442,8 @@ void CPackageDescription::buildDefaultFileList() std::vector fileList; NLMISC::CPath::getPathContent(_BnpDirectory,false,false,true,fileList); for (uint32 i=0;i Date: Wed, 24 Sep 2014 17:51:05 +0200 Subject: [PATCH 002/236] Move 7zip library --HG-- branch : feature-streamed-package --- code/CMakeLists.txt | 1 + code/nel/3rdparty/CMakeLists.txt | 2 ++ .../3rdparty}/seven_zip/7zAlloc.cpp | 0 .../src => nel/3rdparty}/seven_zip/7zAlloc.h | 0 .../3rdparty}/seven_zip/7zBuffer.cpp | 0 .../src => nel/3rdparty}/seven_zip/7zBuffer.h | 0 .../src => nel/3rdparty}/seven_zip/7zCrc.cpp | 0 .../src => nel/3rdparty}/seven_zip/7zCrc.h | 0 .../3rdparty}/seven_zip/7zDecode.cpp | 0 .../src => nel/3rdparty}/seven_zip/7zDecode.h | 0 .../3rdparty}/seven_zip/7zExtract.cpp | 0 .../3rdparty}/seven_zip/7zExtract.h | 0 .../3rdparty}/seven_zip/7zHeader.cpp | 0 .../src => nel/3rdparty}/seven_zip/7zHeader.h | 0 .../src => nel/3rdparty}/seven_zip/7zIn.cpp | 0 .../src => nel/3rdparty}/seven_zip/7zIn.h | 0 .../src => nel/3rdparty}/seven_zip/7zItem.cpp | 0 .../src => nel/3rdparty}/seven_zip/7zItem.h | 0 .../src => nel/3rdparty}/seven_zip/7zMain.cpp | 0 .../3rdparty}/seven_zip/7zMethodID.cpp | 0 .../3rdparty}/seven_zip/7zMethodID.h | 0 .../src => nel/3rdparty}/seven_zip/7zTypes.h | 0 .../3rdparty}/seven_zip/BranchTypes.h | 0 .../3rdparty}/seven_zip/BranchX86.cpp | 0 .../3rdparty}/seven_zip/BranchX86.h | 0 code/nel/3rdparty/seven_zip/CMakeLists.txt | 27 +++++++++++++++++++ .../3rdparty}/seven_zip/LzmaDecode.cpp | 0 .../3rdparty}/seven_zip/LzmaDecode.h | 0 .../3rdparty}/seven_zip/LzmaRamDecode.cpp | 0 .../3rdparty}/seven_zip/LzmaRamDecode.h | 0 .../3rdparty}/seven_zip/LzmaTypes.h | 0 .../src => nel/3rdparty}/seven_zip/readme.txt | 0 code/nel/CMakeLists.txt | 1 + code/nel/src/misc/CMakeLists.txt | 2 +- code/ryzom/client/src/CMakeLists.txt | 2 -- .../ryzom/client/src/seven_zip/CMakeLists.txt | 27 ------------------- .../client/client_patcher/CMakeLists.txt | 2 +- 37 files changed, 33 insertions(+), 31 deletions(-) create mode 100644 code/nel/3rdparty/CMakeLists.txt rename code/{ryzom/client/src => nel/3rdparty}/seven_zip/7zAlloc.cpp (100%) rename code/{ryzom/client/src => nel/3rdparty}/seven_zip/7zAlloc.h (100%) rename code/{ryzom/client/src => nel/3rdparty}/seven_zip/7zBuffer.cpp (100%) rename code/{ryzom/client/src => nel/3rdparty}/seven_zip/7zBuffer.h (100%) rename code/{ryzom/client/src => nel/3rdparty}/seven_zip/7zCrc.cpp (100%) rename code/{ryzom/client/src => nel/3rdparty}/seven_zip/7zCrc.h (100%) rename code/{ryzom/client/src => nel/3rdparty}/seven_zip/7zDecode.cpp (100%) rename code/{ryzom/client/src => nel/3rdparty}/seven_zip/7zDecode.h (100%) rename code/{ryzom/client/src => nel/3rdparty}/seven_zip/7zExtract.cpp (100%) rename code/{ryzom/client/src => nel/3rdparty}/seven_zip/7zExtract.h (100%) rename code/{ryzom/client/src => nel/3rdparty}/seven_zip/7zHeader.cpp (100%) rename code/{ryzom/client/src => nel/3rdparty}/seven_zip/7zHeader.h (100%) rename code/{ryzom/client/src => nel/3rdparty}/seven_zip/7zIn.cpp (100%) rename code/{ryzom/client/src => nel/3rdparty}/seven_zip/7zIn.h (100%) rename code/{ryzom/client/src => nel/3rdparty}/seven_zip/7zItem.cpp (100%) rename code/{ryzom/client/src => nel/3rdparty}/seven_zip/7zItem.h (100%) rename code/{ryzom/client/src => nel/3rdparty}/seven_zip/7zMain.cpp (100%) rename code/{ryzom/client/src => nel/3rdparty}/seven_zip/7zMethodID.cpp (100%) rename code/{ryzom/client/src => nel/3rdparty}/seven_zip/7zMethodID.h (100%) rename code/{ryzom/client/src => nel/3rdparty}/seven_zip/7zTypes.h (100%) rename code/{ryzom/client/src => nel/3rdparty}/seven_zip/BranchTypes.h (100%) rename code/{ryzom/client/src => nel/3rdparty}/seven_zip/BranchX86.cpp (100%) rename code/{ryzom/client/src => nel/3rdparty}/seven_zip/BranchX86.h (100%) create mode 100644 code/nel/3rdparty/seven_zip/CMakeLists.txt rename code/{ryzom/client/src => nel/3rdparty}/seven_zip/LzmaDecode.cpp (100%) rename code/{ryzom/client/src => nel/3rdparty}/seven_zip/LzmaDecode.h (100%) rename code/{ryzom/client/src => nel/3rdparty}/seven_zip/LzmaRamDecode.cpp (100%) rename code/{ryzom/client/src => nel/3rdparty}/seven_zip/LzmaRamDecode.h (100%) rename code/{ryzom/client/src => nel/3rdparty}/seven_zip/LzmaTypes.h (100%) rename code/{ryzom/client/src => nel/3rdparty}/seven_zip/readme.txt (100%) delete mode 100644 code/ryzom/client/src/seven_zip/CMakeLists.txt diff --git a/code/CMakeLists.txt b/code/CMakeLists.txt index 071554e06..80bc52421 100644 --- a/code/CMakeLists.txt +++ b/code/CMakeLists.txt @@ -177,6 +177,7 @@ IF(WITH_NEL) ENDIF(WITH_GUI) INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/nel/include ${LIBXML2_INCLUDE_DIR}) + INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/nel/3rdparty) ADD_DEFINITIONS(${LIBXML2_DEFINITIONS}) ADD_SUBDIRECTORY(nel) ENDIF(WITH_NEL) diff --git a/code/nel/3rdparty/CMakeLists.txt b/code/nel/3rdparty/CMakeLists.txt new file mode 100644 index 000000000..bdd3e5fcd --- /dev/null +++ b/code/nel/3rdparty/CMakeLists.txt @@ -0,0 +1,2 @@ +SET(SEVENZIP_LIBRARY "nel_sevenzip") +ADD_SUBDIRECTORY(seven_zip) diff --git a/code/ryzom/client/src/seven_zip/7zAlloc.cpp b/code/nel/3rdparty/seven_zip/7zAlloc.cpp similarity index 100% rename from code/ryzom/client/src/seven_zip/7zAlloc.cpp rename to code/nel/3rdparty/seven_zip/7zAlloc.cpp diff --git a/code/ryzom/client/src/seven_zip/7zAlloc.h b/code/nel/3rdparty/seven_zip/7zAlloc.h similarity index 100% rename from code/ryzom/client/src/seven_zip/7zAlloc.h rename to code/nel/3rdparty/seven_zip/7zAlloc.h diff --git a/code/ryzom/client/src/seven_zip/7zBuffer.cpp b/code/nel/3rdparty/seven_zip/7zBuffer.cpp similarity index 100% rename from code/ryzom/client/src/seven_zip/7zBuffer.cpp rename to code/nel/3rdparty/seven_zip/7zBuffer.cpp diff --git a/code/ryzom/client/src/seven_zip/7zBuffer.h b/code/nel/3rdparty/seven_zip/7zBuffer.h similarity index 100% rename from code/ryzom/client/src/seven_zip/7zBuffer.h rename to code/nel/3rdparty/seven_zip/7zBuffer.h diff --git a/code/ryzom/client/src/seven_zip/7zCrc.cpp b/code/nel/3rdparty/seven_zip/7zCrc.cpp similarity index 100% rename from code/ryzom/client/src/seven_zip/7zCrc.cpp rename to code/nel/3rdparty/seven_zip/7zCrc.cpp diff --git a/code/ryzom/client/src/seven_zip/7zCrc.h b/code/nel/3rdparty/seven_zip/7zCrc.h similarity index 100% rename from code/ryzom/client/src/seven_zip/7zCrc.h rename to code/nel/3rdparty/seven_zip/7zCrc.h diff --git a/code/ryzom/client/src/seven_zip/7zDecode.cpp b/code/nel/3rdparty/seven_zip/7zDecode.cpp similarity index 100% rename from code/ryzom/client/src/seven_zip/7zDecode.cpp rename to code/nel/3rdparty/seven_zip/7zDecode.cpp diff --git a/code/ryzom/client/src/seven_zip/7zDecode.h b/code/nel/3rdparty/seven_zip/7zDecode.h similarity index 100% rename from code/ryzom/client/src/seven_zip/7zDecode.h rename to code/nel/3rdparty/seven_zip/7zDecode.h diff --git a/code/ryzom/client/src/seven_zip/7zExtract.cpp b/code/nel/3rdparty/seven_zip/7zExtract.cpp similarity index 100% rename from code/ryzom/client/src/seven_zip/7zExtract.cpp rename to code/nel/3rdparty/seven_zip/7zExtract.cpp diff --git a/code/ryzom/client/src/seven_zip/7zExtract.h b/code/nel/3rdparty/seven_zip/7zExtract.h similarity index 100% rename from code/ryzom/client/src/seven_zip/7zExtract.h rename to code/nel/3rdparty/seven_zip/7zExtract.h diff --git a/code/ryzom/client/src/seven_zip/7zHeader.cpp b/code/nel/3rdparty/seven_zip/7zHeader.cpp similarity index 100% rename from code/ryzom/client/src/seven_zip/7zHeader.cpp rename to code/nel/3rdparty/seven_zip/7zHeader.cpp diff --git a/code/ryzom/client/src/seven_zip/7zHeader.h b/code/nel/3rdparty/seven_zip/7zHeader.h similarity index 100% rename from code/ryzom/client/src/seven_zip/7zHeader.h rename to code/nel/3rdparty/seven_zip/7zHeader.h diff --git a/code/ryzom/client/src/seven_zip/7zIn.cpp b/code/nel/3rdparty/seven_zip/7zIn.cpp similarity index 100% rename from code/ryzom/client/src/seven_zip/7zIn.cpp rename to code/nel/3rdparty/seven_zip/7zIn.cpp diff --git a/code/ryzom/client/src/seven_zip/7zIn.h b/code/nel/3rdparty/seven_zip/7zIn.h similarity index 100% rename from code/ryzom/client/src/seven_zip/7zIn.h rename to code/nel/3rdparty/seven_zip/7zIn.h diff --git a/code/ryzom/client/src/seven_zip/7zItem.cpp b/code/nel/3rdparty/seven_zip/7zItem.cpp similarity index 100% rename from code/ryzom/client/src/seven_zip/7zItem.cpp rename to code/nel/3rdparty/seven_zip/7zItem.cpp diff --git a/code/ryzom/client/src/seven_zip/7zItem.h b/code/nel/3rdparty/seven_zip/7zItem.h similarity index 100% rename from code/ryzom/client/src/seven_zip/7zItem.h rename to code/nel/3rdparty/seven_zip/7zItem.h diff --git a/code/ryzom/client/src/seven_zip/7zMain.cpp b/code/nel/3rdparty/seven_zip/7zMain.cpp similarity index 100% rename from code/ryzom/client/src/seven_zip/7zMain.cpp rename to code/nel/3rdparty/seven_zip/7zMain.cpp diff --git a/code/ryzom/client/src/seven_zip/7zMethodID.cpp b/code/nel/3rdparty/seven_zip/7zMethodID.cpp similarity index 100% rename from code/ryzom/client/src/seven_zip/7zMethodID.cpp rename to code/nel/3rdparty/seven_zip/7zMethodID.cpp diff --git a/code/ryzom/client/src/seven_zip/7zMethodID.h b/code/nel/3rdparty/seven_zip/7zMethodID.h similarity index 100% rename from code/ryzom/client/src/seven_zip/7zMethodID.h rename to code/nel/3rdparty/seven_zip/7zMethodID.h diff --git a/code/ryzom/client/src/seven_zip/7zTypes.h b/code/nel/3rdparty/seven_zip/7zTypes.h similarity index 100% rename from code/ryzom/client/src/seven_zip/7zTypes.h rename to code/nel/3rdparty/seven_zip/7zTypes.h diff --git a/code/ryzom/client/src/seven_zip/BranchTypes.h b/code/nel/3rdparty/seven_zip/BranchTypes.h similarity index 100% rename from code/ryzom/client/src/seven_zip/BranchTypes.h rename to code/nel/3rdparty/seven_zip/BranchTypes.h diff --git a/code/ryzom/client/src/seven_zip/BranchX86.cpp b/code/nel/3rdparty/seven_zip/BranchX86.cpp similarity index 100% rename from code/ryzom/client/src/seven_zip/BranchX86.cpp rename to code/nel/3rdparty/seven_zip/BranchX86.cpp diff --git a/code/ryzom/client/src/seven_zip/BranchX86.h b/code/nel/3rdparty/seven_zip/BranchX86.h similarity index 100% rename from code/ryzom/client/src/seven_zip/BranchX86.h rename to code/nel/3rdparty/seven_zip/BranchX86.h diff --git a/code/nel/3rdparty/seven_zip/CMakeLists.txt b/code/nel/3rdparty/seven_zip/CMakeLists.txt new file mode 100644 index 000000000..d2d2e690d --- /dev/null +++ b/code/nel/3rdparty/seven_zip/CMakeLists.txt @@ -0,0 +1,27 @@ +INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}) + +FILE(GLOB LIB_SRC *.cpp *.h) + +LIST(REMOVE_ITEM LIB_SRC ${CMAKE_CURRENT_SOURCE_DIR}/7zMain.cpp) + +NL_TARGET_LIB(nel_sevenzip ${LIB_SRC}) +# TARGET_LINK_LIBRARIES(nel_sevenzip ${PLATFORM_LINKFLAGS}) +NL_DEFAULT_PROPS(nel_sevenzip "NeL, 3rd Party: Seven Zip") +NL_ADD_RUNTIME_FLAGS(nel_sevenzip) +NL_ADD_LIB_SUFFIX(nel_sevenzip) + +ADD_DEFINITIONS(-D_SZ_ONE_DIRECTORY) + +IF((WITH_INSTALL_LIBRARIES AND WITH_STATIC) OR NOT WITH_STATIC) + INSTALL(TARGETS nel_sevenzip LIBRARY DESTINATION ${NL_LIB_PREFIX} ARCHIVE DESTINATION ${NL_LIB_PREFIX} COMPONENT libraries) +ENDIF((WITH_INSTALL_LIBRARIES AND WITH_STATIC) OR NOT WITH_STATIC) + +IF(WITH_TOOLS) + ADD_EXECUTABLE(7zDec ${CMAKE_CURRENT_SOURCE_DIR}/7zMain.cpp) + + TARGET_LINK_LIBRARIES(7zDec nel_sevenzip) + NL_DEFAULT_PROPS(7zDec "NeL, 3rd Party: Seven Zip Decoder") + NL_ADD_RUNTIME_FLAGS(7zDec) + + INSTALL(TARGETS 7zDec RUNTIME DESTINATION ${NL_BIN_PREFIX} COMPONENT tools) +ENDIF(WITH_TOOLS) diff --git a/code/ryzom/client/src/seven_zip/LzmaDecode.cpp b/code/nel/3rdparty/seven_zip/LzmaDecode.cpp similarity index 100% rename from code/ryzom/client/src/seven_zip/LzmaDecode.cpp rename to code/nel/3rdparty/seven_zip/LzmaDecode.cpp diff --git a/code/ryzom/client/src/seven_zip/LzmaDecode.h b/code/nel/3rdparty/seven_zip/LzmaDecode.h similarity index 100% rename from code/ryzom/client/src/seven_zip/LzmaDecode.h rename to code/nel/3rdparty/seven_zip/LzmaDecode.h diff --git a/code/ryzom/client/src/seven_zip/LzmaRamDecode.cpp b/code/nel/3rdparty/seven_zip/LzmaRamDecode.cpp similarity index 100% rename from code/ryzom/client/src/seven_zip/LzmaRamDecode.cpp rename to code/nel/3rdparty/seven_zip/LzmaRamDecode.cpp diff --git a/code/ryzom/client/src/seven_zip/LzmaRamDecode.h b/code/nel/3rdparty/seven_zip/LzmaRamDecode.h similarity index 100% rename from code/ryzom/client/src/seven_zip/LzmaRamDecode.h rename to code/nel/3rdparty/seven_zip/LzmaRamDecode.h diff --git a/code/ryzom/client/src/seven_zip/LzmaTypes.h b/code/nel/3rdparty/seven_zip/LzmaTypes.h similarity index 100% rename from code/ryzom/client/src/seven_zip/LzmaTypes.h rename to code/nel/3rdparty/seven_zip/LzmaTypes.h diff --git a/code/ryzom/client/src/seven_zip/readme.txt b/code/nel/3rdparty/seven_zip/readme.txt similarity index 100% rename from code/ryzom/client/src/seven_zip/readme.txt rename to code/nel/3rdparty/seven_zip/readme.txt diff --git a/code/nel/CMakeLists.txt b/code/nel/CMakeLists.txt index 53bf071e3..d3f0a3e5c 100644 --- a/code/nel/CMakeLists.txt +++ b/code/nel/CMakeLists.txt @@ -70,6 +70,7 @@ IF(WITH_INSTALL_LIBRARIES) ADD_SUBDIRECTORY(include) ENDIF(WITH_INSTALL_LIBRARIES) +ADD_SUBDIRECTORY(3rdparty) ADD_SUBDIRECTORY(src) IF(WITH_NEL_SAMPLES) diff --git a/code/nel/src/misc/CMakeLists.txt b/code/nel/src/misc/CMakeLists.txt index 2d3ef9066..8494c23a6 100644 --- a/code/nel/src/misc/CMakeLists.txt +++ b/code/nel/src/misc/CMakeLists.txt @@ -39,7 +39,7 @@ ENDIF(UNIX) INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR} ${PNG_INCLUDE_DIR} config_file) -TARGET_LINK_LIBRARIES(nelmisc ${CMAKE_THREAD_LIBS_INIT} ${LIBXML2_LIBRARIES} ${ZLIB_LIBRARY}) +TARGET_LINK_LIBRARIES(nelmisc ${CMAKE_THREAD_LIBS_INIT} ${LIBXML2_LIBRARIES} ${ZLIB_LIBRARY} nel_sevenzip) SET_TARGET_PROPERTIES(nelmisc PROPERTIES LINK_INTERFACE_LIBRARIES "") NL_DEFAULT_PROPS(nelmisc "NeL, Library: NeL Misc") NL_ADD_RUNTIME_FLAGS(nelmisc) diff --git a/code/ryzom/client/src/CMakeLists.txt b/code/ryzom/client/src/CMakeLists.txt index c20d9d0dc..3fbbfd0e2 100644 --- a/code/ryzom/client/src/CMakeLists.txt +++ b/code/ryzom/client/src/CMakeLists.txt @@ -5,9 +5,7 @@ ADD_SUBDIRECTORY(client_sheets) IF(WITH_RYZOM_CLIENT) # These are Windows/MFC apps -SET(SEVENZIP_LIBRARY "ryzom_sevenzip") -ADD_SUBDIRECTORY(seven_zip) IF(WITH_RYZOM_PATCH) ADD_DEFINITIONS(-DRZ_USE_PATCH) diff --git a/code/ryzom/client/src/seven_zip/CMakeLists.txt b/code/ryzom/client/src/seven_zip/CMakeLists.txt deleted file mode 100644 index cc152757b..000000000 --- a/code/ryzom/client/src/seven_zip/CMakeLists.txt +++ /dev/null @@ -1,27 +0,0 @@ -INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}) - -FILE(GLOB LIB_SRC *.cpp *.h) - -LIST(REMOVE_ITEM LIB_SRC ${CMAKE_CURRENT_SOURCE_DIR}/7zMain.cpp) - -NL_TARGET_LIB(ryzom_sevenzip ${LIB_SRC}) -# TARGET_LINK_LIBRARIES(ryzom_sevenzip ${PLATFORM_LINKFLAGS}) -NL_DEFAULT_PROPS(ryzom_sevenzip "Ryzom, Library: Seven Zip") -NL_ADD_RUNTIME_FLAGS(ryzom_sevenzip) -NL_ADD_LIB_SUFFIX(ryzom_sevenzip) - -ADD_DEFINITIONS(-D_SZ_ONE_DIRECTORY) - -IF((WITH_INSTALL_LIBRARIES AND WITH_STATIC) OR NOT WITH_STATIC) - INSTALL(TARGETS ryzom_sevenzip LIBRARY DESTINATION ${RYZOM_LIB_PREFIX} ARCHIVE DESTINATION ${RYZOM_LIB_PREFIX} COMPONENT libraries) -ENDIF((WITH_INSTALL_LIBRARIES AND WITH_STATIC) OR NOT WITH_STATIC) - -IF(WITH_RYZOM_TOOLS) - ADD_EXECUTABLE(7zDec ${CMAKE_CURRENT_SOURCE_DIR}/7zMain.cpp) - - TARGET_LINK_LIBRARIES(7zDec ryzom_sevenzip) - NL_DEFAULT_PROPS(7zDec "Ryzom, Tools, Misc: Seven Zip Decoder") - NL_ADD_RUNTIME_FLAGS(7zDec) - - INSTALL(TARGETS 7zDec RUNTIME DESTINATION ${RYZOM_BIN_PREFIX} COMPONENT tools) -ENDIF(WITH_RYZOM_TOOLS) diff --git a/code/ryzom/tools/client/client_patcher/CMakeLists.txt b/code/ryzom/tools/client/client_patcher/CMakeLists.txt index e5b845e43..69b14e5a1 100644 --- a/code/ryzom/tools/client/client_patcher/CMakeLists.txt +++ b/code/ryzom/tools/client/client_patcher/CMakeLists.txt @@ -19,7 +19,7 @@ TARGET_LINK_LIBRARIES(ryzom_client_patcher nelmisc nelnet ryzom_gameshare - ryzom_sevenzip + nel_sevenzip ${CURL_LIBRARIES}) IF(APPLE) From 4ba6b6c4bf3ce45f27d51ec00eb80045f9ac88d4 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Wed, 24 Sep 2014 20:30:11 +0200 Subject: [PATCH 003/236] Workaround '0' unpack directory bug, and don't choke on 0 size files when unpacking bnp files --HG-- branch : feature-streamed-package --- code/nel/tools/misc/bnp_make/main.cpp | 15 +++--- code/ryzom/client/src/login_patch.cpp | 69 +++++++++++++++++++-------- 2 files changed, 58 insertions(+), 26 deletions(-) diff --git a/code/nel/tools/misc/bnp_make/main.cpp b/code/nel/tools/misc/bnp_make/main.cpp index a3f34a6a4..3bb70f5aa 100644 --- a/code/nel/tools/misc/bnp_make/main.cpp +++ b/code/nel/tools/misc/bnp_make/main.cpp @@ -330,13 +330,16 @@ void unpack (const string &dirName) if (out != NULL) { nlfseek64 (bnp, rBNPFile.Pos, SEEK_SET); - uint8 *ptr = new uint8[rBNPFile.Size]; - if (fread (ptr, rBNPFile.Size, 1, bnp) != 1) - nlwarning("%s read error", filename.c_str()); - if (fwrite (ptr, rBNPFile.Size, 1, out) != 1) - nlwarning("%s write error", filename.c_str()); + if (rBNPFile.Size) + { + uint8 *ptr = new uint8[rBNPFile.Size]; + if (fread (ptr, rBNPFile.Size, 1, bnp) != 1) + nlwarning("%s read error", filename.c_str()); + if (fwrite (ptr, rBNPFile.Size, 1, out) != 1) + nlwarning("%s write error", filename.c_str()); + delete [] ptr; + } fclose (out); - delete [] ptr; } } fclose (bnp); diff --git a/code/ryzom/client/src/login_patch.cpp b/code/ryzom/client/src/login_patch.cpp index 5b9a83c83..d2f4d02e0 100644 --- a/code/ryzom/client/src/login_patch.cpp +++ b/code/ryzom/client/src/login_patch.cpp @@ -1176,13 +1176,35 @@ void CPatchManager::readDescFile(sint32 nVersion) std::string unpackTo = category.getUnpackTo(); - if (unpackTo.substr(0, 2) == "./") + if (unpackTo == "0") + { + nlwarning("BUG: unpackTo == '0'"); + unpackTo = ClientRootPath; + category.setUnpackTo(unpackTo); + } + else if (unpackTo.substr(0, 2) == "./") { unpackTo = ClientRootPath + unpackTo.substr(2); category.setUnpackTo(unpackTo); } } } + else + { + for (cat = 0; cat < DescFile.getCategories().categoryCount(); ++cat) + { + CBNPCategory &category = const_cast(DescFile.getCategories().getCategory(cat)); + + std::string unpackTo = category.getUnpackTo(); + + if (unpackTo == "0") + { + nlwarning("BUG: unpackTo == '0'"); + unpackTo = "./"; + category.setUnpackTo(unpackTo); + } + } + } // tmp for debug : flag some categories as 'Mainland' for (cat = 0; cat < DescFile.getCategories().categoryCount(); ++cat) @@ -1884,29 +1906,36 @@ bool CPatchManager::bnpUnpack(const string &srcBigfile, const string &dstPath, v if (out != NULL) { nlfseek64 (bnp, rBNPFile.Pos, SEEK_SET); - uint8 *ptr = new uint8[rBNPFile.Size]; - - if (fread (ptr, rBNPFile.Size, 1, bnp) != 1) + if (rBNPFile.Size) { - fclose(out); - return false; - } + uint8 *ptr = new uint8[rBNPFile.Size]; - bool writeError = fwrite (ptr, rBNPFile.Size, 1, out) != 1; - if (writeError) - { - nlwarning("errno = %d", errno); - } - bool diskFull = ferror(out) && errno == 28 /* ENOSPC*/; - fclose (out); - delete [] ptr; - if (diskFull) - { - throw NLMISC::EDiskFullError(filename); + if (fread (ptr, rBNPFile.Size, 1, bnp) != 1) + { + fclose(out); + return false; + } + + bool writeError = fwrite (ptr, rBNPFile.Size, 1, out) != 1; + if (writeError) + { + nlwarning("errno = %d", errno); + } + bool diskFull = ferror(out) && errno == 28 /* ENOSPC*/; + fclose (out); + delete [] ptr; + if (diskFull) + { + throw NLMISC::EDiskFullError(filename); + } + if (writeError) + { + throw NLMISC::EWriteError(filename); + } } - if (writeError) + else { - throw NLMISC::EWriteError(filename); + fclose (out); } } } From 7d09a6cb150f1aa9eda99a901653682658606ee5 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Wed, 24 Sep 2014 21:52:18 +0200 Subject: [PATCH 004/236] Add streamed package manager --HG-- branch : feature-streamed-package --- code/nel/include/nel/misc/app_context.h | 15 ++++ code/nel/include/nel/misc/path.h | 6 ++ code/nel/include/nel/misc/streamed_package.h | 1 + .../nel/misc/streamed_package_manager.h | 34 +++++++- code/nel/src/misc/file.cpp | 34 ++++++++ code/nel/src/misc/path.cpp | 82 +++++++++++++++++-- .../nel/src/misc/streamed_package_manager.cpp | 68 +++++++++++++++ 7 files changed, 230 insertions(+), 10 deletions(-) diff --git a/code/nel/include/nel/misc/app_context.h b/code/nel/include/nel/misc/app_context.h index 46d2a15c7..2388dffe1 100644 --- a/code/nel/include/nel/misc/app_context.h +++ b/code/nel/include/nel/misc/app_context.h @@ -229,6 +229,20 @@ namespace NLMISC } \ private: +#define NLMISC_SAFE_RELEASABLE_SINGLETON_DECL(className) \ + NLMISC_SAFE_SINGLETON_DECL(className); \ + \ + void className::releaseInstance() \ + { \ + if (_Instance) \ + { \ + NLMISC::INelContext::getInstance().releaseSingletonPointer(#className, _Instance); \ + delete _Instance; \ + _Instance = NULL; \ + } \ + } \ + + /** The same as above, but generate a getInstance method that * return a pointer instead of a reference */ @@ -296,5 +310,6 @@ void initNelLibrary(CLibrary &lib); } // namespace NLMISC +#include #endif //APP_CONTEXT_H diff --git a/code/nel/include/nel/misc/path.h b/code/nel/include/nel/misc/path.h index f3120c907..1efe9a4c6 100644 --- a/code/nel/include/nel/misc/path.h +++ b/code/nel/include/nel/misc/path.h @@ -74,6 +74,9 @@ public: /** Same as AddSearchPath but with a big file "c:/test.nbf" all files name contained in the big file will be included (the extention (Nel Big File) is used to know that it's a big file) */ void addSearchBigFile (const std::string &filename, bool recurse, bool alternative, class NLMISC::IProgressCallback *progressCallBack = NULL); + + /** Sale but for .snp (Streamed NeL Package) */ + void addSearchStreamedPackage (const std::string &filename, bool recurse, bool alternative, class NLMISC::IProgressCallback *progressCallBack = NULL); /** Same as AddSearchPath but with a xml pack file "c:/test.xml_pack" all files name contained in the xml pack will be included */ void addSearchXmlpackFile (const std::string &sXmlpackFilename, bool recurse, bool alternative, class NLMISC::IProgressCallback *progressCallBack = NULL); @@ -371,6 +374,9 @@ public: /** Same as AddSearchPath but with a big file "c:/test.nbf" all files name contained in the big file will be included (the extention (Nel Big File) is used to know that it's a big file) */ static void addSearchBigFile (const std::string &filename, bool recurse, bool alternative, class NLMISC::IProgressCallback *progressCallBack = NULL); + /** Same but Streamed Package */ + static void addSearchStreamedPackage (const std::string &filename, bool recurse, bool alternative, class NLMISC::IProgressCallback *progressCallBack = NULL); + /** Same as AddSearchPath but with a xml pack file "c:/test.xml_pack" all files name contained in the xml pack will be included */ static void addSearchXmlpackFile (const std::string &sXmlpackFilename, bool recurse, bool alternative, class NLMISC::IProgressCallback *progressCallBack = NULL); diff --git a/code/nel/include/nel/misc/streamed_package.h b/code/nel/include/nel/misc/streamed_package.h index b27e6658f..c777d8a02 100644 --- a/code/nel/include/nel/misc/streamed_package.h +++ b/code/nel/include/nel/misc/streamed_package.h @@ -17,6 +17,7 @@ #ifndef NLMISC_STREAMED_PACKAGE_H #define NLMISC_STREAMED_PACKAGE_H +#include #include namespace NLMISC { diff --git a/code/nel/include/nel/misc/streamed_package_manager.h b/code/nel/include/nel/misc/streamed_package_manager.h index 0bec38584..b1c3b05e5 100644 --- a/code/nel/include/nel/misc/streamed_package_manager.h +++ b/code/nel/include/nel/misc/streamed_package_manager.h @@ -14,21 +14,49 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -#ifndef NLMISC_STREAMED_PACKAGE_H -#define NLMISC_STREAMED_PACKAGE_H +#ifndef NLMISC_STREAMED_PACKAGE_MANAGER_H +#define NLMISC_STREAMED_PACKAGE_MANAGER_H + +#include +#include +#include namespace NLMISC { class CStreamedPackageManager { + NLMISC_SAFE_RELEASABLE_SINGLETON_DECL(CStreamedPackageManager); + public: CStreamedPackageManager(); ~CStreamedPackageManager(); + + /// Loads a package into the package manager + /// package: ex. /games/nel/data/characters_maps_hr.snp + bool loadPackage(const std::string &package); + + /// Get a file list + void list(std::vector &fileNames, const std::string &package); + + /// Unload all packages + void unloadAll(); + + /// Get an existing file or download if necessary + /// filePath: [out] ex. /games/nel/stream/00/00/000000000.. + /// fileName: ex. fy_hof_underwear.dds + bool getFile(std::string &filePath, const std::string &fileName); + + /// Get file size + bool getFileSize(uint32 &fileSize, const std::string &fileName); + +private: + std::map m_Packages; + std::map m_Entries; }; /* class CStreamedPackageManager */ } /* namespace NLMISC */ -#endif /* #ifndef NLMISC_STREAMED_PACKAGE_H */ +#endif /* #ifndef NLMISC_STREAMED_PACKAGE_MANAGER_H */ /* end of file */ diff --git a/code/nel/src/misc/file.cpp b/code/nel/src/misc/file.cpp index 842d9ea51..a542a3dc2 100644 --- a/code/nel/src/misc/file.cpp +++ b/code/nel/src/misc/file.cpp @@ -23,6 +23,7 @@ #include "nel/misc/command.h" #include "nel/misc/sstring.h" #include "nel/misc/xml_pack.h" +#include "nel/misc/streamed_package_manager.h" #ifndef NL_OS_WINDOWS #include @@ -203,6 +204,39 @@ bool CIFile::open(const std::string &path, bool text) _F = CXMLPack::getInstance().getFile (path, _FileSize, _BigFileOffset, dummy, _AlwaysOpened); } } + else if (pos > 3 && path[pos-3] == 's' && path[pos-2] == 'n' && path[pos-1] == 'p') + { + nldebug("Opening a streamed package file"); + + _IsInXMLPackFile = false; + _IsInBigFile = false; + _BigFileOffset = 0; + _AlwaysOpened = false; + std::string filePath; + if (CStreamedPackageManager::getInstance().getFile (filePath, path)) + { + _F = fopen (filePath.c_str(), mode); + if (_F != NULL) + { + _FileSize=CFile::getFileSize(_F); + if (_FileSize == 0) + { + nlwarning("FILE: Size of file '%s' is 0", path.c_str()); + fclose(_F); + _F = NULL; + } + } + else + { + nlwarning("Failed to open file '%s', error %u : %s", path.c_str(), errno, strerror(errno)); + _FileSize = 0; + } + } + else + { + nlerror("File '%s' not in streamed package", path.c_str()); + } + } else { // bnp file diff --git a/code/nel/src/misc/path.cpp b/code/nel/src/misc/path.cpp index d47b8ce4a..7ed6cb54f 100644 --- a/code/nel/src/misc/path.cpp +++ b/code/nel/src/misc/path.cpp @@ -23,6 +23,7 @@ #include "nel/misc/progress_callback.h" #include "nel/misc/file.h" #include "nel/misc/xml_pack.h" +#include "nel/misc/streamed_package_manager.h" #ifdef NL_OS_WINDOWS # ifndef NL_COMP_MINGW @@ -292,6 +293,7 @@ void CFileContainer::clearMap () nlassert(!_MemoryCompressed); _Files.clear (); CBigFile::getInstance().removeAll (); + CStreamedPackageManager::getInstance().unloadAll (); NL_DISPLAY_PATH("PATH: CPath::clearMap(): map directory cleared"); } @@ -1161,16 +1163,26 @@ void CFileContainer::addSearchFile (const string &file, bool remap, const string return; } + std::string fileExtension = CFile::getExtension(newFile); + // check if it s a big file - if (CFile::getExtension(newFile) == "bnp") + if (fileExtension == "bnp") { NL_DISPLAY_PATH ("PATH: CPath::addSearchFile(%s, %d, '%s'): '%s' is a big file, add it", file.c_str(), remap, virtual_ext.c_str(), newFile.c_str()); addSearchBigFile(file, false, false, progressCallBack); return; } + // check if it s a streamed package + if (fileExtension == "snp") + { + NL_DISPLAY_PATH ("PATH: CPath::addSearchStreamedPackage(%s, %d, '%s'): '%s' is a streamed package, add it", file.c_str(), remap, virtual_ext.c_str(), newFile.c_str()); + addSearchStreamedPackage(file, false, false, progressCallBack); + return; + } + // check if it s an xml pack file - if (CFile::getExtension(newFile) == "xml_pack") + if (fileExtension == "xml_pack") { NL_DISPLAY_PATH ("PATH: CPath::addSearchFile(%s, %d, '%s'): '%s' is an xml pack file, add it", file.c_str(), remap, virtual_ext.c_str(), newFile.c_str()); addSearchXmlpackFile(file, false, false, progressCallBack); @@ -1391,6 +1403,52 @@ void CFileContainer::addSearchBigFile (const string &sBigFilename, bool recurse, fclose (Handle); } +void CPath::addSearchStreamedPackage (const string &filename, bool recurse, bool alternative, NLMISC::IProgressCallback *progressCallBack) +{ + getInstance()->_FileContainer.addSearchBigFile(filename, recurse, alternative, progressCallBack); +} + +void CFileContainer::addSearchStreamedPackage (const string &filename, bool recurse, bool alternative, NLMISC::IProgressCallback *progressCallBack) +{ + // Check if filename is not empty + if (filename.empty()) + { + nlwarning ("PATH: CPath::addSearchStreamedPackage(%s, %d, %d): can't add empty file, skip it", filename.c_str(), recurse, alternative); + return; + } + // Check if the file exists + if (!CFile::isExists(filename)) + { + nlwarning ("PATH: CPath::addSearchStreamedPackage(%s, %d, %d): '%s' is not found, skip it", filename.c_str(), recurse, alternative, filename.c_str()); + return; + } + // Check if it s a file + if (CFile::isDirectory(filename)) + { + nlwarning ("PATH: CPath::addSearchStreamedPackage(%s, %d, %d): '%s' is not a file, skip it", filename.c_str(), recurse, alternative, filename.c_str()); + return; + } + + // Add the file itself + std::string packname = NLMISC::toLower(CFile::getFilename(filename)); + insertFileInMap(packname, filename, false, CFile::getExtension(filename)); + + // Add the package to the package manager + if (CStreamedPackageManager::getInstance().loadPackage(filename)) + { + std::vector fileNames; + CStreamedPackageManager::getInstance().list(fileNames, packname); + + for (std::vector::iterator it(fileNames.begin()), end(fileNames.end()); it != end; ++it) + { + // Add the file to the lookup + std::string filePackageName = packname + "@" + (*it); + nldebug("Insert '%s'", filePackageName.c_str()); + insertFileInMap((*it), filePackageName, false, CFile::getExtension(*it)); + } + } +} + // WARNING : recurse is not used void CPath::addSearchXmlpackFile (const string &sXmlpackFilename, bool recurse, bool alternative, NLMISC::IProgressCallback *progressCallBack) { @@ -1983,6 +2041,7 @@ string CFile::findNewFile (const string &filename) // \warning doesn't work with big file uint32 CFile::getFileSize (const std::string &filename) { + std::string::size_type pos; if (filename.find("@@") != string::npos) { uint32 fs = 0, bfo; @@ -1990,12 +2049,21 @@ uint32 CFile::getFileSize (const std::string &filename) CXMLPack::getInstance().getFile (filename, fs, bfo, c, d); return fs; } - else if (filename.find('@') != string::npos) + else if ((pos = filename.find('@')) != string::npos) { - uint32 fs = 0, bfo; - bool c, d; - CBigFile::getInstance().getFile (filename, fs, bfo, c, d); - return fs; + if (pos > 3 && filename[pos-3] == 's' && filename[pos-2] == 'n' && filename[pos-1] == 'p') + { + uint32 fs = 0; + CStreamedPackageManager::getInstance().getFileSize (fs, filename); + return fs; + } + else + { + uint32 fs = 0, bfo; + bool c, d; + CBigFile::getInstance().getFile (filename, fs, bfo, c, d); + return fs; + } } else { diff --git a/code/nel/src/misc/streamed_package_manager.cpp b/code/nel/src/misc/streamed_package_manager.cpp index 2d04cb95a..4a5862130 100644 --- a/code/nel/src/misc/streamed_package_manager.cpp +++ b/code/nel/src/misc/streamed_package_manager.cpp @@ -18,9 +18,13 @@ // Project includes #include +#include +#include namespace NLMISC { +NLMISC_SAFE_SINGLETON_IMPL(CStreamedPackageManager); + CStreamedPackageManager::CStreamedPackageManager() { // init @@ -31,6 +35,70 @@ CStreamedPackageManager::~CStreamedPackageManager() // release } +bool CStreamedPackageManager::loadPackage(const std::string &package) +{ + nldebug("Load package '%s'", package.c_str()); + + std::string packname = NLMISC::toLower(CFile::getFilename(package)); + m_Packages[packname] = CStreamedPackage(); + std::map::iterator it = m_Packages.find(packname); + CStreamedPackage &p = it->second; + + try + { + CIFile fi; + fi.open(package); + fi.serial(p); + } + catch (Exception &e) + { + nlerror("Package serial exception: '%s'", e.what()); + m_Packages.erase(it); + return false; + } + + for (CStreamedPackage::TEntries::const_iterator it(p.Entries.begin()), end(p.Entries.end()); it != end; ++it) + { + const CStreamedPackage::CEntry &entry = (*it); + m_Entries[entry.Name] = &entry; + } + + return true; +} + +void CStreamedPackageManager::list(std::vector &fileNames, const std::string &package) +{ + nldebug("List package '%s'", package.c_str()); + + std::map::iterator it = m_Packages.find(package); + CStreamedPackage &p = it->second; + + for (CStreamedPackage::TEntries::const_iterator it(p.Entries.begin()), end(p.Entries.end()); it != end; ++it) + { + const CStreamedPackage::CEntry &entry = (*it); + fileNames.push_back(entry.Name); + } +} + +void CStreamedPackageManager::unloadAll() +{ + m_Packages.clear(); + m_Entries.clear(); +} + +bool CStreamedPackageManager::getFile(std::string &filePath, const std::string &fileName) +{ + // .. :) + nldebug("Get file path for streamed file '%s'", fileName.c_str()); + return false; +} + +bool CStreamedPackageManager::getFileSize(uint32 &fileSize, const std::string &fileName) +{ + nldebug("Get file size for streamed file '%s'", fileName.c_str()); + return false; +} + } /* namespace NLMISC */ /* end of file */ From 105ecbff90bf1ea4b0ac5c0ba5c8635c10594038 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Wed, 24 Sep 2014 21:52:41 +0200 Subject: [PATCH 005/236] Add pipeline script for creating streamed packages --HG-- branch : feature-streamed-package --- .../build_gamedata/configuration/tools.py | 1 + .../tools/build_gamedata/d1_client_patch.py | 18 +++++++++++++++--- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/code/nel/tools/build_gamedata/configuration/tools.py b/code/nel/tools/build_gamedata/configuration/tools.py index c0c962360..bf904072e 100755 --- a/code/nel/tools/build_gamedata/configuration/tools.py +++ b/code/nel/tools/build_gamedata/configuration/tools.py @@ -87,6 +87,7 @@ BuildClodBankTool = "build_clod_bank" SheetsPackerTool = "sheets_packer" SheetsPackerShardTool = "sheets_packer_shard" BnpMakeTool = "bnp_make" +SnpMakeTool = "snp_make" AiBuildWmapTool = "ai_build_wmap" TgaCutTool = "tga_cut" PatchGenTool = "patch_gen" diff --git a/code/nel/tools/build_gamedata/d1_client_patch.py b/code/nel/tools/build_gamedata/d1_client_patch.py index 600347d0b..4b4f37072 100755 --- a/code/nel/tools/build_gamedata/d1_client_patch.py +++ b/code/nel/tools/build_gamedata/d1_client_patch.py @@ -51,6 +51,7 @@ printLog(log, "") # Find tools BnpMake = findTool(log, ToolDirectories, BnpMakeTool, ToolSuffix) +SnpMake = findTool(log, ToolDirectories, SnpMakeTool, ToolSuffix); PatchGen = findTool(log, ToolDirectories, PatchGenTool, ToolSuffix) printLog(log, "") @@ -121,11 +122,14 @@ else: targetPath = ClientPatchDirectory + "/bnp" mkPath(log, targetPath) for category in InstallClientData: + packExt = ".bnp" + if (category["StreamedPackages"]): + packExt = ".snp" for package in category["Packages"]: printLog(log, "PACKAGE " + package[0]) sourcePath = InstallDirectory + "/" + package[0] mkPath(log, sourcePath) - targetBnp = targetPath + "/" + package[0] + ".bnp" + targetBnp = targetPath + "/" + package[0] + packExt if (len(package[1]) > 0): targetBnp = targetPath + "/" + package[1][0] printLog(log, "TARGET " + package[1][0]) @@ -135,8 +139,16 @@ else: else: needUpdateBnp = needUpdateDirNoSubdirFile(log, sourcePath, targetBnp) if (needUpdateBnp): - printLog(log, "BNP " + targetBnp) - subprocess.call([ BnpMake, "/p", sourcePath, targetPath ] + package[1]) + if (category["StreamedPackages"]): + printLog(log, "SNP " + targetBnp) + cwDir = os.getcwd().replace("\\", "/") + toolDir = os.path.dirname(Lzma).replace("\\", "/") + os.chdir(toolDir) + subprocess.call([ SnpMake, "/p", sourcePath, targetBnp, ClientPatchDirectory + "/stream" ] + package[1]) + os.chdir(cwDir) + else: + printLog(log, "BNP " + targetBnp) + subprocess.call([ BnpMake, "/p", sourcePath, targetPath, targetBnp ] + package[1]) else: printLog(log, "SKIP " + targetBnp) printLog(log, "") From e6a327fb1ab0deb02816fec8e8f39ec3efa2d58d Mon Sep 17 00:00:00 2001 From: kaetemi Date: Wed, 24 Sep 2014 23:40:43 +0200 Subject: [PATCH 006/236] Implementation fixes, ref #179 --HG-- branch : feature-streamed-package --- code/nel/include/nel/misc/app_context.h | 20 ++++++++++--------- code/nel/src/misc/file.cpp | 2 +- code/nel/src/misc/path.cpp | 12 ++++++++--- .../tools/build_gamedata/d2_client_install.py | 7 +++++-- code/ryzom/client/src/login.cpp | 2 ++ code/ryzom/client/src/release.cpp | 2 ++ .../screenshot_islands.cpp | 2 +- .../client/src/snowballs_client.cpp | 1 + 8 files changed, 32 insertions(+), 16 deletions(-) diff --git a/code/nel/include/nel/misc/app_context.h b/code/nel/include/nel/misc/app_context.h index 2388dffe1..3ab77aada 100644 --- a/code/nel/include/nel/misc/app_context.h +++ b/code/nel/include/nel/misc/app_context.h @@ -230,17 +230,19 @@ namespace NLMISC private: #define NLMISC_SAFE_RELEASABLE_SINGLETON_DECL(className) \ - NLMISC_SAFE_SINGLETON_DECL(className); \ - \ - void className::releaseInstance() \ - { \ - if (_Instance) \ + NLMISC_SAFE_SINGLETON_DECL(className); \ + \ + public: \ + static void className::releaseInstance() \ { \ - NLMISC::INelContext::getInstance().releaseSingletonPointer(#className, _Instance); \ - delete _Instance; \ - _Instance = NULL; \ + if (_Instance) \ + { \ + NLMISC::INelContext::getInstance().releaseSingletonPointer(#className, _Instance); \ + delete _Instance; \ + _Instance = NULL; \ + } \ } \ - } \ + private: /** The same as above, but generate a getInstance method that diff --git a/code/nel/src/misc/file.cpp b/code/nel/src/misc/file.cpp index a542a3dc2..e2168def6 100644 --- a/code/nel/src/misc/file.cpp +++ b/code/nel/src/misc/file.cpp @@ -213,7 +213,7 @@ bool CIFile::open(const std::string &path, bool text) _BigFileOffset = 0; _AlwaysOpened = false; std::string filePath; - if (CStreamedPackageManager::getInstance().getFile (filePath, path)) + if (CStreamedPackageManager::getInstance().getFile (filePath, path.substr(pos+1))) { _F = fopen (filePath.c_str(), mode); if (_F != NULL) diff --git a/code/nel/src/misc/path.cpp b/code/nel/src/misc/path.cpp index 7ed6cb54f..b7d58df51 100644 --- a/code/nel/src/misc/path.cpp +++ b/code/nel/src/misc/path.cpp @@ -1736,7 +1736,8 @@ void CFileContainer::memoryCompress() while (it != _Files.end()) { string sTmp = SSMpath.get(it->second.idPath); - if ((sTmp.find("@@") == string::npos) && (sTmp.find('@') != string::npos) && !it->second.Remapped) + nldebug("A: %s", sTmp.c_str()); + if ((sTmp.find("@@") == string::npos) && (sTmp.find('@') != string::npos) && (sTmp.find("snp@") == string::npos) && !it->second.Remapped) { // This is a file included in a bigfile (so the name is in the bigfile manager) } @@ -1759,7 +1760,8 @@ void CFileContainer::memoryCompress() { CFileEntry &rFE = it->second; string sTmp = SSMpath.get(rFE.idPath); - if (sTmp.find("@") == string::npos || sTmp.find("@@") != string::npos || rFE.Remapped) + nldebug("B: %s", sTmp.c_str()); + if ((sTmp.find("@") == string::npos) || (sTmp.find("@@") != string::npos) || (sTmp.find("snp@") != string::npos) || rFE.Remapped) { strcpy(_AllFileNames+nSize, rFE.Name.c_str()); _MCFiles[nNb].Name = _AllFileNames+nSize; @@ -1784,8 +1786,12 @@ void CFileContainer::memoryCompress() it++; } + nldebug("Passed"); + contReset(_Files); _MemoryCompressed = true; + + nldebug("Done"); } void CPath::memoryUncompress() @@ -2054,7 +2060,7 @@ uint32 CFile::getFileSize (const std::string &filename) if (pos > 3 && filename[pos-3] == 's' && filename[pos-2] == 'n' && filename[pos-1] == 'p') { uint32 fs = 0; - CStreamedPackageManager::getInstance().getFileSize (fs, filename); + CStreamedPackageManager::getInstance().getFileSize (fs, filename.substr(pos+1)); return fs; } else diff --git a/code/nel/tools/build_gamedata/d2_client_install.py b/code/nel/tools/build_gamedata/d2_client_install.py index febaef656..bb399447f 100755 --- a/code/nel/tools/build_gamedata/d2_client_install.py +++ b/code/nel/tools/build_gamedata/d2_client_install.py @@ -47,6 +47,9 @@ printLog(log, "") for category in InstallClientData: printLog(log, "CATEGORY " + category["Name"]) + packExt = ".bnp" + if (category["StreamedPackages"]): + packExt = ".snp" if (category["UnpackTo"] != None): targetPath = ClientInstallDirectory if (category["UnpackTo"] != ""): @@ -62,8 +65,8 @@ for category in InstallClientData: mkPath(log, targetPath) for package in category["Packages"]: printLog(log, "PACKAGE " + package[0]) - sourceBnp = sourcePath + "/" + package[0] + ".bnp" - targetBnp = targetPath + "/" + package[0] + ".bnp" + sourceBnp = sourcePath + "/" + package[0] + packExt + targetBnp = targetPath + "/" + package[0] + packExt if (len(package[1]) > 0): sourceBnp = sourcePath + "/" + package[1][0] targetBnp = targetPath + "/" + package[1][0] diff --git a/code/ryzom/client/src/login.cpp b/code/ryzom/client/src/login.cpp index 091e24a80..e4d9b18b5 100644 --- a/code/ryzom/client/src/login.cpp +++ b/code/ryzom/client/src/login.cpp @@ -28,6 +28,7 @@ #include "nel/misc/thread.h" #include "nel/misc/big_file.h" #include "nel/misc/system_utils.h" +#include "nel/misc/streamed_package_manager.h" #include "nel/net/tcp_sock.h" #include "nel/3d/u_driver.h" @@ -1614,6 +1615,7 @@ void initPatch() CBGDownloaderAccess::getInstance().startTask(taskDesc, string(), true /* showDownloader */); // no command line since bg downloader should already be started // release lock on bnp, so that they can be written NLMISC::CBigFile::getInstance().removeAll(); + NLMISC::CStreamedPackageManager::getInstance().unloadAll(); } NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:SCREEN")->setValue32(UI_VARIABLES_SCREEN_PATCHING); diff --git a/code/ryzom/client/src/release.cpp b/code/ryzom/client/src/release.cpp index f88849197..403b654e9 100644 --- a/code/ryzom/client/src/release.cpp +++ b/code/ryzom/client/src/release.cpp @@ -25,6 +25,7 @@ #include "nel/misc/debug.h" #include "nel/misc/async_file_manager.h" #include "nel/misc/system_utils.h" +#include "nel/misc/streamed_package_manager.h" // 3D Interface. #include "nel/3d/bloom_effect.h" #include "nel/3d/fxaa.h" @@ -644,6 +645,7 @@ void release() R2::CObjectSerializer::releaseInstance(); NLMISC::CBigFile::getInstance().removeAll(); NLMISC::CBigFile::releaseInstance(); + NLMISC::CStreamedPackageManager::releaseInstance(); NL3D::CFastHLSModifier::releaseInstance(); CLandscapePolyDrawer::releaseInstance(); NL3D::CParticleSystemShape::releaseInstance(); diff --git a/code/ryzom/tools/client/r2_islands_textures/screenshot_islands.cpp b/code/ryzom/tools/client/r2_islands_textures/screenshot_islands.cpp index 4f167ea9c..d678c0b17 100644 --- a/code/ryzom/tools/client/r2_islands_textures/screenshot_islands.cpp +++ b/code/ryzom/tools/client/r2_islands_textures/screenshot_islands.cpp @@ -295,7 +295,7 @@ void CScreenshotIslands::searchIslandsBorders() zonelFiles.clear(); string bnpFileName = itCont->first + ".bnp"; - CBigFile::getInstance().list(bnpFileName.c_str(), filenames); + CBigFile::getInstance().list(bnpFileName.c_str(), filenames); // FIXME FIXME NOT READING FROM BNP! for(uint i=0; i Date: Wed, 24 Sep 2014 23:41:40 +0200 Subject: [PATCH 007/236] Remove some debugging, ref #179 --HG-- branch : feature-streamed-package --- code/nel/src/misc/path.cpp | 6 ------ 1 file changed, 6 deletions(-) diff --git a/code/nel/src/misc/path.cpp b/code/nel/src/misc/path.cpp index b7d58df51..56249f637 100644 --- a/code/nel/src/misc/path.cpp +++ b/code/nel/src/misc/path.cpp @@ -1736,7 +1736,6 @@ void CFileContainer::memoryCompress() while (it != _Files.end()) { string sTmp = SSMpath.get(it->second.idPath); - nldebug("A: %s", sTmp.c_str()); if ((sTmp.find("@@") == string::npos) && (sTmp.find('@') != string::npos) && (sTmp.find("snp@") == string::npos) && !it->second.Remapped) { // This is a file included in a bigfile (so the name is in the bigfile manager) @@ -1760,7 +1759,6 @@ void CFileContainer::memoryCompress() { CFileEntry &rFE = it->second; string sTmp = SSMpath.get(rFE.idPath); - nldebug("B: %s", sTmp.c_str()); if ((sTmp.find("@") == string::npos) || (sTmp.find("@@") != string::npos) || (sTmp.find("snp@") != string::npos) || rFE.Remapped) { strcpy(_AllFileNames+nSize, rFE.Name.c_str()); @@ -1786,12 +1784,8 @@ void CFileContainer::memoryCompress() it++; } - nldebug("Passed"); - contReset(_Files); _MemoryCompressed = true; - - nldebug("Done"); } void CPath::memoryUncompress() From fb7955103b99ae955c1d785347b9e058c0ba0bf6 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Thu, 25 Sep 2014 17:39:51 +0200 Subject: [PATCH 008/236] Implement streamed data download, ref #179 --HG-- branch : feature-streamed-package --- code/nel/include/nel/misc/path.h | 4 +- .../nel/misc/streamed_package_manager.h | 16 +- code/nel/src/misc/file.cpp | 1 + code/nel/src/misc/path.cpp | 14 +- .../nel/src/misc/streamed_package_manager.cpp | 174 +++++++++++++++++- .../tools/build_gamedata/d1_client_patch.py | 4 +- code/ryzom/client/src/client_cfg.cpp | 15 +- code/ryzom/client/src/client_cfg.h | 4 + code/ryzom/client/src/init.cpp | 10 + code/ryzom/client/src/init.h | 1 + code/ryzom/client/src/streamable_ig.cpp | 2 + 11 files changed, 230 insertions(+), 15 deletions(-) diff --git a/code/nel/include/nel/misc/path.h b/code/nel/include/nel/misc/path.h index 1efe9a4c6..b6694c7a1 100644 --- a/code/nel/include/nel/misc/path.h +++ b/code/nel/include/nel/misc/path.h @@ -279,8 +279,8 @@ private: struct CMCFileEntry { char *Name; // Normal case (the search is done by using nlstricmp) - uint32 idPath : 16; // Path (not with file at the end) - look in the SSMpath (65536 different path allowed) - uint32 idExt : 15; // real extension of the file if remapped - look in the SSMext (32768 different extension allowed) + uint32 idPath : 20; // Path (not with file at the end) - look in the SSMpath (1048576 different path allowed) + uint32 idExt : 11; // real extension of the file if remapped - look in the SSMext (2048 different extension allowed) uint32 Remapped : 1; // true if the file is remapped }; diff --git a/code/nel/include/nel/misc/streamed_package_manager.h b/code/nel/include/nel/misc/streamed_package_manager.h index b1c3b05e5..e23344a70 100644 --- a/code/nel/include/nel/misc/streamed_package_manager.h +++ b/code/nel/include/nel/misc/streamed_package_manager.h @@ -31,7 +31,6 @@ public: CStreamedPackageManager(); ~CStreamedPackageManager(); - /// Loads a package into the package manager /// package: ex. /games/nel/data/characters_maps_hr.snp bool loadPackage(const std::string &package); @@ -49,9 +48,20 @@ public: /// Get file size bool getFileSize(uint32 &fileSize, const std::string &fileName); +public: + /// Set storage path (ex. stream/) + std::string Path; + + /// Loads a package into the package manager (ex. http://patch.live.polyverse.org/stream/) + typedef std::vector THosts; + THosts Hosts; + private: - std::map m_Packages; - std::map m_Entries; + typedef std::map TPackages; + TPackages m_Packages; + + typedef std::map TEntries; + TEntries m_Entries; }; /* class CStreamedPackageManager */ diff --git a/code/nel/src/misc/file.cpp b/code/nel/src/misc/file.cpp index e2168def6..b53a660d9 100644 --- a/code/nel/src/misc/file.cpp +++ b/code/nel/src/misc/file.cpp @@ -234,6 +234,7 @@ bool CIFile::open(const std::string &path, bool text) } else { + // TEMPORARY ERROR nlerror("File '%s' not in streamed package", path.c_str()); } } diff --git a/code/nel/src/misc/path.cpp b/code/nel/src/misc/path.cpp index 56249f637..553f8e4ba 100644 --- a/code/nel/src/misc/path.cpp +++ b/code/nel/src/misc/path.cpp @@ -342,7 +342,7 @@ void CFileContainer::remapExtension (const string &ext1, const string &ext2, boo nlwarning ("PATH: CPath::remapExtension(%s, %s, %d): can't remap empty extension", ext1lwr.c_str(), ext2lwr.c_str(), substitute); } - if (ext1lwr == "bnp" || ext2lwr == "bnp") + if (ext1lwr == "bnp" || ext2lwr == "bnp" || ext1lwr == "snp" || ext2lwr == "snp") { nlwarning ("PATH: CPath::remapExtension(%s, %s, %d): you can't remap a big file", ext1lwr.c_str(), ext2lwr.c_str(), substitute); } @@ -1445,6 +1445,18 @@ void CFileContainer::addSearchStreamedPackage (const string &filename, bool recu std::string filePackageName = packname + "@" + (*it); nldebug("Insert '%s'", filePackageName.c_str()); insertFileInMap((*it), filePackageName, false, CFile::getExtension(*it)); + + // Remapped extensions + std::string ext = CFile::getExtension(*it); + for (uint j = 0; j < _Extensions.size (); j++) + { + if (_Extensions[j].first == ext) + { + // Need to remap + insertFileInMap(CFile::getFilenameWithoutExtension(*it) + "." + _Extensions[j].second, + filePackageName, true, _Extensions[j].first); + } + } } } } diff --git a/code/nel/src/misc/streamed_package_manager.cpp b/code/nel/src/misc/streamed_package_manager.cpp index 4a5862130..250c92d07 100644 --- a/code/nel/src/misc/streamed_package_manager.cpp +++ b/code/nel/src/misc/streamed_package_manager.cpp @@ -16,6 +16,13 @@ #include "stdmisc.h" +// 3rd Party includes +#include +#include +#include +#include +#include + // Project includes #include #include @@ -88,15 +95,174 @@ void CStreamedPackageManager::unloadAll() bool CStreamedPackageManager::getFile(std::string &filePath, const std::string &fileName) { - // .. :) nldebug("Get file path for streamed file '%s'", fileName.c_str()); - return false; + + TEntries::iterator it = m_Entries.find(fileName); + if (it == m_Entries.end()) + return false; + const CStreamedPackage::CEntry *entry = it->second; + + CStreamedPackage::makePath(filePath, entry->Hash); + std::string downloadUrlFile = filePath + ".lzma"; + filePath = Path + filePath; + std::string downloadPath = filePath + ".download." + toString(rand()); + + std::string storageDirectory = CFile::getPath(downloadPath); + CFile::createDirectoryTree(storageDirectory); + /*if (!CFile::isDirectory(storageDirectory) || !CFile::createDirectoryTree(storageDirectory)) + { + nldebug("Unable to create directory '%s'", storageDirectory.c_str()); + return false; + }*/ + + // download + for (; ; ) + { + if (CFile::fileExists(filePath)) + return true; + + std::string downloadUrl = Hosts[rand() % Hosts.size()] + downloadUrlFile; + nldebug("Download streamed package '%s' from '%s'", fileName.c_str(), downloadUrl.c_str()); + + FILE *fp = fopen(downloadPath.c_str(), "wb"); + if (fp == NULL) + { + nldebug("Unable to create file '%s' for '%s'", downloadPath.c_str(), fileName.c_str()); + return false; + } + + CURL *curl; + CURLcode res; + curl = curl_easy_init(); + if (curl) + { + curl_easy_setopt(curl, CURLOPT_URL, downloadUrl.c_str()); + curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L); + curl_easy_setopt(curl, CURLOPT_FILE, fp); + res = curl_easy_perform(curl); + long r; + curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &r); + curl_easy_cleanup(curl); + + bool diskFull = ferror(fp) && errno == 28 /*ENOSPC*/; + fclose(fp); + + if (diskFull) + { + CFile::deleteFile(downloadPath); + throw EDiskFullError(downloadPath); + } + + if (res != CURLE_OK || r < 200 || r >= 300) + { + CFile::deleteFile(downloadPath); + nldebug("Download failed '%s', retry in 1s", downloadUrl.c_str()); + nlSleep(1000); + continue; + } + } + else + { + nldebug("Curl initialize failed"); + fclose(fp); + CFile::deleteFile(downloadPath); + return false; + } + + // ok! + break; + } + + // read into memory :( + std::string unpackPath = filePath + ".extract." + toString(rand()); + + std::vector inBuffer; + { + CIFile inStream(downloadPath); + uint32 inSize = inStream.getFileSize(); + inBuffer.resize(inSize); + inStream.serialBuffer(&inBuffer[0], inSize); + } + CFile::deleteFile(downloadPath); + + if (inBuffer.size() < LZMA_PROPERTIES_SIZE + 8) + { + nlwarning("Invalid file size %u, too small file '%s'", inBuffer.size(), downloadPath.c_str()); + return false; + } + + // extract + { + CLzmaDecoderState state; + uint8 *pos = &inBuffer[0]; + int ret = LzmaDecodeProperties(&state.Properties, (unsigned char *)pos, LZMA_PROPERTIES_SIZE); + if (ret != 0) + { + nlwarning("Failed to decode lzma properies in file '%s'", downloadPath.c_str()); + return false; + } + + // FROM login_patch.cpp + // alloc the probs, making sure they are deleted in function exit + size_t nbProb = LzmaGetNumProbs(&state.Properties); + std::vector probs; + probs.resize(nbProb); + state.Probs = &probs[0]; + + pos += LZMA_PROPERTIES_SIZE; + + // read the output file size + size_t fileSize = 0; + for (int i = 0; i < 8; i++) + { + //Byte b; + if (pos >= &inBuffer[0] + inBuffer.size()) + { + nlerror("pos >= inBuffer.get() + inSize"); + return false; + } + fileSize |= ((UInt64)*pos++) << (8 * i); + } + + nlassert(fileSize == entry->Size); + + SizeT outProcessed = 0; + SizeT inProcessed = 0; + // allocate the output buffer :( + std::vector outBuffer; + outBuffer.resize(fileSize); + // decompress the file in memory + ret = LzmaDecode(&state, (unsigned char *)pos, (SizeT)(inBuffer.size() - (pos - &inBuffer[0])), &inProcessed, (unsigned char*)&outBuffer[0], (SizeT)fileSize, &outProcessed); + if (ret != 0 || outProcessed != fileSize) + { + nlwarning("Failed to decode lzma file '%s'", downloadPath.c_str()); + return false; + } + + { + COFile outStream(unpackPath); + outStream.serialBuffer(&outBuffer[0], (uint)fileSize); + } + + if (!CFile::moveFile(filePath.c_str(), unpackPath.c_str())) + { + nldebug("Failed moving '%s' to '%s'", unpackPath.c_str(), filePath.c_str()); + // in case downloaded from another thread + return CFile::fileExists(filePath); + } + + return true; + } } bool CStreamedPackageManager::getFileSize(uint32 &fileSize, const std::string &fileName) { - nldebug("Get file size for streamed file '%s'", fileName.c_str()); - return false; + // nldebug("Get file size for streamed file '%s'", fileName.c_str()); + TEntries::iterator it = m_Entries.find(fileName); + if (it == m_Entries.end()) + return false; + fileSize = it->second->Size; + return true; } } /* namespace NLMISC */ diff --git a/code/nel/tools/build_gamedata/d1_client_patch.py b/code/nel/tools/build_gamedata/d1_client_patch.py index 4b4f37072..080141e5f 100755 --- a/code/nel/tools/build_gamedata/d1_client_patch.py +++ b/code/nel/tools/build_gamedata/d1_client_patch.py @@ -97,7 +97,7 @@ else: if category["UnpackTo"] != "": cfg.write("\t\t\t<_UnpackTo type=\"STRING\" value=\"./" + category["UnpackTo"] + "/\"/>\n") else: - cfg.write("\t\t\t<_UnpackTo type=\"SINT32\" value=\"./\"/>\n") + cfg.write("\t\t\t<_UnpackTo type=\"STRING\" value=\"./\"/>\n") cfg.write("\t\t\t<_IsOptional type=\"SINT32\" value=\"" + str(category["IsOptional"]) + "\"/>\n") cfg.write("\t\t\t<_IsIncremental type=\"SINT32\" value=\"" + str(category["IsIncremental"]) + "\"/>\n") for package in category["Packages"]: @@ -148,7 +148,7 @@ else: os.chdir(cwDir) else: printLog(log, "BNP " + targetBnp) - subprocess.call([ BnpMake, "/p", sourcePath, targetPath, targetBnp ] + package[1]) + subprocess.call([ BnpMake, "/p", sourcePath, targetPath ] + package[1]) else: printLog(log, "SKIP " + targetBnp) printLog(log, "") diff --git a/code/ryzom/client/src/client_cfg.cpp b/code/ryzom/client/src/client_cfg.cpp index 6cde86cba..5b69b284e 100644 --- a/code/ryzom/client/src/client_cfg.cpp +++ b/code/ryzom/client/src/client_cfg.cpp @@ -464,6 +464,8 @@ CClientConfig::CClientConfig() ColorShout = CRGBA(150,0,0,255); // Default Shout color. ColorTalk = CRGBA(255,255,255,255); // Default Talk color. + StreamedPackagePath = "stream"; + // PreDataPath.push_back("data/gamedev/language/"); // Default Path for the language data // DataPath.push_back("data/"); // Default Path for the Data. @@ -1247,18 +1249,25 @@ void CClientConfig::setValues() ////////// // MISC // + // Pre Data Path. READ_STRINGVECTOR_FV(PreDataPath); // Data Path. READ_STRINGVECTOR_FV(DataPath); - // List of files that trigger R2ED reload when touched - READ_STRINGVECTOR_FV(R2EDReloadFiles); - // Data Path no recurse. READ_STRINGVECTOR_FV(DataPathNoRecurse); + // Streamed package path + READ_STRING_FV(StreamedPackagePath); + + // Streamed package hosts + READ_STRINGVECTOR_FV(StreamedPackageHosts); + + // List of files that trigger R2ED reload when touched + READ_STRINGVECTOR_FV(R2EDReloadFiles); + // Update packed sheet Path READ_STRINGVECTOR_FV(UpdatePackedSheetPath); diff --git a/code/ryzom/client/src/client_cfg.h b/code/ryzom/client/src/client_cfg.h index 7d7f1c65d..59b4f96a5 100644 --- a/code/ryzom/client/src/client_cfg.h +++ b/code/ryzom/client/src/client_cfg.h @@ -360,6 +360,10 @@ struct CClientConfig std::vector DataPath; /// Data Path no recurse. std::vector DataPathNoRecurse; + /// Streamed package path + std::string StreamedPackagePath; + /// Streamed package hosts + std::vector StreamedPackageHosts; // TODO: From 'domain' SQL table /// Update packed sheet Path. std::vector UpdatePackedSheetPath; /// True if we want the packed sheet to be updated if needed diff --git a/code/ryzom/client/src/init.cpp b/code/ryzom/client/src/init.cpp index 1644f7e2d..6a1cf5bcf 100644 --- a/code/ryzom/client/src/init.cpp +++ b/code/ryzom/client/src/init.cpp @@ -34,6 +34,7 @@ #include "nel/misc/system_info.h" #include "nel/misc/block_memory.h" #include "nel/misc/system_utils.h" +#include "nel/misc/streamed_package_manager.h" // 3D Interface. #include "nel/3d/bloom_effect.h" #include "nel/3d/u_driver.h" @@ -664,6 +665,14 @@ void initStereoDisplayDevice() IStereoDisplay::releaseUnusedLibraries(); } +void initStreamedPackageManager(NLMISC::IProgressCallback &progress) +{ + CStreamedPackageManager &spm = CStreamedPackageManager::getInstance(); + spm.Path = replaceApplicationDirToken(ClientCfg.StreamedPackagePath); + for (uint i = 0; i < ClientCfg.StreamedPackageHosts.size(); i++) + spm.Hosts.push_back(ClientCfg.StreamedPackageHosts[i]); +} + void addSearchPaths(IProgressCallback &progress) { // Add search path of UI addon. Allow only a subset of files. @@ -848,6 +857,7 @@ void prelogInit() CPath::remapExtension ("png", "tga", true); FPU_CHECKER_ONCE + initStreamedPackageManager(ProgressBar); addPreDataPaths(ProgressBar); FPU_CHECKER_ONCE diff --git a/code/ryzom/client/src/init.h b/code/ryzom/client/src/init.h index cdcdfb418..cf1e22f6e 100644 --- a/code/ryzom/client/src/init.h +++ b/code/ryzom/client/src/init.h @@ -33,6 +33,7 @@ void prelogInit(); // Initialize the application after login step void postlogInit(); +void initStreamedPackageManager(NLMISC::IProgressCallback &progress); void addSearchPaths(NLMISC::IProgressCallback &progress); void addPreDataPaths(NLMISC::IProgressCallback &progress); diff --git a/code/ryzom/client/src/streamable_ig.cpp b/code/ryzom/client/src/streamable_ig.cpp index f73df6126..99930b947 100644 --- a/code/ryzom/client/src/streamable_ig.cpp +++ b/code/ryzom/client/src/streamable_ig.cpp @@ -89,8 +89,10 @@ CStreamableIG::~CStreamableIG() H_AUTO_USE(RZ_StremableIG) if (!_Linked) { + #ifdef NL_DEBUG if(!ClientCfg.Light) nlwarning("Loading async %p", this); + #endif #ifdef NL_DEBUG //nlinfo("Loading async : %s", Name.c_str()); #endif From 85615992d784756999b45c7321cbdd2c093b6bed Mon Sep 17 00:00:00 2001 From: kaetemi Date: Thu, 25 Sep 2014 19:47:57 +0200 Subject: [PATCH 009/236] Remove some debugging --HG-- branch : feature-streamed-package --- code/nel/src/misc/CMakeLists.txt | 2 +- code/nel/src/misc/file.cpp | 2 +- code/nel/src/misc/streamed_package_manager.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/code/nel/src/misc/CMakeLists.txt b/code/nel/src/misc/CMakeLists.txt index 8494c23a6..7f172bbfe 100644 --- a/code/nel/src/misc/CMakeLists.txt +++ b/code/nel/src/misc/CMakeLists.txt @@ -39,7 +39,7 @@ ENDIF(UNIX) INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR} ${PNG_INCLUDE_DIR} config_file) -TARGET_LINK_LIBRARIES(nelmisc ${CMAKE_THREAD_LIBS_INIT} ${LIBXML2_LIBRARIES} ${ZLIB_LIBRARY} nel_sevenzip) +TARGET_LINK_LIBRARIES(nelmisc ${CMAKE_THREAD_LIBS_INIT} ${LIBXML2_LIBRARIES} ${ZLIB_LIBRARY} ${CURL_LIBRARIES} nel_sevenzip) SET_TARGET_PROPERTIES(nelmisc PROPERTIES LINK_INTERFACE_LIBRARIES "") NL_DEFAULT_PROPS(nelmisc "NeL, Library: NeL Misc") NL_ADD_RUNTIME_FLAGS(nelmisc) diff --git a/code/nel/src/misc/file.cpp b/code/nel/src/misc/file.cpp index b53a660d9..9197b35a1 100644 --- a/code/nel/src/misc/file.cpp +++ b/code/nel/src/misc/file.cpp @@ -206,7 +206,7 @@ bool CIFile::open(const std::string &path, bool text) } else if (pos > 3 && path[pos-3] == 's' && path[pos-2] == 'n' && path[pos-1] == 'p') { - nldebug("Opening a streamed package file"); + // nldebug("Opening a streamed package file"); _IsInXMLPackFile = false; _IsInBigFile = false; diff --git a/code/nel/src/misc/streamed_package_manager.cpp b/code/nel/src/misc/streamed_package_manager.cpp index 250c92d07..ffe33e76c 100644 --- a/code/nel/src/misc/streamed_package_manager.cpp +++ b/code/nel/src/misc/streamed_package_manager.cpp @@ -95,7 +95,7 @@ void CStreamedPackageManager::unloadAll() bool CStreamedPackageManager::getFile(std::string &filePath, const std::string &fileName) { - nldebug("Get file path for streamed file '%s'", fileName.c_str()); + // nldebug("Get file path for streamed file '%s'", fileName.c_str()); TEntries::iterator it = m_Entries.find(fileName); if (it == m_Entries.end()) From 40f4eb4ad2255e75ab3166a962732d4c2e019cba Mon Sep 17 00:00:00 2001 From: kaetemi Date: Thu, 25 Sep 2014 20:10:16 +0200 Subject: [PATCH 010/236] Fix package description generation --HG-- branch : feature-streamed-package --- .../tools/build_gamedata/d1_client_patch.py | 5 +++- code/ryzom/client/src/login_patch.cpp | 24 +------------------ 2 files changed, 5 insertions(+), 24 deletions(-) diff --git a/code/nel/tools/build_gamedata/d1_client_patch.py b/code/nel/tools/build_gamedata/d1_client_patch.py index 080141e5f..47a952812 100755 --- a/code/nel/tools/build_gamedata/d1_client_patch.py +++ b/code/nel/tools/build_gamedata/d1_client_patch.py @@ -91,6 +91,9 @@ else: inCategories = 1 cfg.write("\t<_Categories>\n") for category in InstallClientData: + packExt = ".bnp" + if (category["StreamedPackages"]): + packExt = ".snp" cfg.write("\t\t<_Category>\n") cfg.write("\t\t\t<_Name type=\"STRING\" value=\"" + category["Name"] + "\"/>\n") if category["UnpackTo"] != None: @@ -104,7 +107,7 @@ else: if (len(package[1]) > 0): cfg.write("\t\t\t<_Files type=\"STRING\" value=\"" + package[1][0] + "\"/>\n") else: - cfg.write("\t\t\t<_Files type=\"STRING\" value=\"" + package[0] + ".bnp\"/>\n") + cfg.write("\t\t\t<_Files type=\"STRING\" value=\"" + package[0] + packExt + "\"/>\n") for ref in category["Refs"]: cfg.write("\t\t\t<_Files type=\"STRING\" value=\"" + ref + "_.ref\"/>\n") cfg.write("\t\t\n") diff --git a/code/ryzom/client/src/login_patch.cpp b/code/ryzom/client/src/login_patch.cpp index d2f4d02e0..657eb8fb3 100644 --- a/code/ryzom/client/src/login_patch.cpp +++ b/code/ryzom/client/src/login_patch.cpp @@ -1176,35 +1176,13 @@ void CPatchManager::readDescFile(sint32 nVersion) std::string unpackTo = category.getUnpackTo(); - if (unpackTo == "0") - { - nlwarning("BUG: unpackTo == '0'"); - unpackTo = ClientRootPath; - category.setUnpackTo(unpackTo); - } - else if (unpackTo.substr(0, 2) == "./") + if (unpackTo.substr(0, 2) == "./") { unpackTo = ClientRootPath + unpackTo.substr(2); category.setUnpackTo(unpackTo); } } } - else - { - for (cat = 0; cat < DescFile.getCategories().categoryCount(); ++cat) - { - CBNPCategory &category = const_cast(DescFile.getCategories().getCategory(cat)); - - std::string unpackTo = category.getUnpackTo(); - - if (unpackTo == "0") - { - nlwarning("BUG: unpackTo == '0'"); - unpackTo = "./"; - category.setUnpackTo(unpackTo); - } - } - } // tmp for debug : flag some categories as 'Mainland' for (cat = 0; cat < DescFile.getCategories().categoryCount(); ++cat) From 9a1510caf07e25ca7bbd44ee5a151f37aae296e1 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Thu, 25 Sep 2014 20:25:54 +0200 Subject: [PATCH 011/236] Fix patching --HG-- branch : feature-streamed-package --- code/ryzom/client/src/login_patch.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/ryzom/client/src/login_patch.cpp b/code/ryzom/client/src/login_patch.cpp index 657eb8fb3..949527e82 100644 --- a/code/ryzom/client/src/login_patch.cpp +++ b/code/ryzom/client/src/login_patch.cpp @@ -2688,7 +2688,7 @@ void CPatchThread::run() CPatchManager::SFileToPatch &rFTP = AllFilesToPatch[i]; string ext = NLMISC::CFile::getExtension(rFTP.FileName); - if (ext == "bnp") + if (ext == "bnp" || ext == "snp") { float oldCurrentFilePatched = CurrentFilePatched; processFile (rFTP); From 8d93e9308faea54c5775f25e42987c3f916ba04c Mon Sep 17 00:00:00 2001 From: kaetemi Date: Thu, 25 Sep 2014 23:57:50 +0200 Subject: [PATCH 012/236] Remove some debugging --HG-- branch : feature-streamed-package --- code/nel/src/misc/file.cpp | 2 +- code/nel/src/misc/path.cpp | 2 +- code/nel/src/misc/streamed_package_manager.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/code/nel/src/misc/file.cpp b/code/nel/src/misc/file.cpp index 9197b35a1..757f7bd49 100644 --- a/code/nel/src/misc/file.cpp +++ b/code/nel/src/misc/file.cpp @@ -235,7 +235,7 @@ bool CIFile::open(const std::string &path, bool text) else { // TEMPORARY ERROR - nlerror("File '%s' not in streamed package", path.c_str()); + // nlerror("File '%s' not in streamed package", path.c_str()); } } else diff --git a/code/nel/src/misc/path.cpp b/code/nel/src/misc/path.cpp index 553f8e4ba..4d8ad6969 100644 --- a/code/nel/src/misc/path.cpp +++ b/code/nel/src/misc/path.cpp @@ -1443,7 +1443,7 @@ void CFileContainer::addSearchStreamedPackage (const string &filename, bool recu { // Add the file to the lookup std::string filePackageName = packname + "@" + (*it); - nldebug("Insert '%s'", filePackageName.c_str()); + // nldebug("Insert '%s'", filePackageName.c_str()); insertFileInMap((*it), filePackageName, false, CFile::getExtension(*it)); // Remapped extensions diff --git a/code/nel/src/misc/streamed_package_manager.cpp b/code/nel/src/misc/streamed_package_manager.cpp index ffe33e76c..fbdfc1f5a 100644 --- a/code/nel/src/misc/streamed_package_manager.cpp +++ b/code/nel/src/misc/streamed_package_manager.cpp @@ -75,7 +75,7 @@ bool CStreamedPackageManager::loadPackage(const std::string &package) void CStreamedPackageManager::list(std::vector &fileNames, const std::string &package) { - nldebug("List package '%s'", package.c_str()); + // nldebug("List package '%s'", package.c_str()); std::map::iterator it = m_Packages.find(package); CStreamedPackage &p = it->second; From 242476e1f6294c5258d13dae5b88a9f3bbd95f4b Mon Sep 17 00:00:00 2001 From: kaetemi Date: Mon, 24 Nov 2014 14:54:15 +0100 Subject: [PATCH 013/236] Fix library linking --HG-- branch : feature-streamed-package --- code/nel/src/misc/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/nel/src/misc/CMakeLists.txt b/code/nel/src/misc/CMakeLists.txt index 7f172bbfe..8836bf566 100644 --- a/code/nel/src/misc/CMakeLists.txt +++ b/code/nel/src/misc/CMakeLists.txt @@ -39,7 +39,7 @@ ENDIF(UNIX) INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR} ${PNG_INCLUDE_DIR} config_file) -TARGET_LINK_LIBRARIES(nelmisc ${CMAKE_THREAD_LIBS_INIT} ${LIBXML2_LIBRARIES} ${ZLIB_LIBRARY} ${CURL_LIBRARIES} nel_sevenzip) +TARGET_LINK_LIBRARIES(nelmisc ${CMAKE_THREAD_LIBS_INIT} ${LIBXML2_LIBRARIES} ${ZLIB_LIBRARY} ${CURL_LIBRARY} nel_sevenzip) SET_TARGET_PROPERTIES(nelmisc PROPERTIES LINK_INTERFACE_LIBRARIES "") NL_DEFAULT_PROPS(nelmisc "NeL, Library: NeL Misc") NL_ADD_RUNTIME_FLAGS(nelmisc) From 6b5d7b66a499b820f6a18dcdb21052dab983c2fb Mon Sep 17 00:00:00 2001 From: kaetemi Date: Wed, 10 Dec 2014 16:51:42 +0100 Subject: [PATCH 014/236] Fix compile --HG-- branch : feature-streamed-package --- code/nel/include/nel/misc/app_context.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/nel/include/nel/misc/app_context.h b/code/nel/include/nel/misc/app_context.h index 3ab77aada..e30642646 100644 --- a/code/nel/include/nel/misc/app_context.h +++ b/code/nel/include/nel/misc/app_context.h @@ -233,7 +233,7 @@ namespace NLMISC NLMISC_SAFE_SINGLETON_DECL(className); \ \ public: \ - static void className::releaseInstance() \ + static void releaseInstance() \ { \ if (_Instance) \ { \ From 153ea8169dfdd4c215d8bd323b051946d9b5cb83 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Wed, 10 Dec 2014 17:00:26 +0100 Subject: [PATCH 015/236] Fix link --HG-- branch : feature-streamed-package --- code/nel/src/misc/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/nel/src/misc/CMakeLists.txt b/code/nel/src/misc/CMakeLists.txt index 8836bf566..82a40616e 100644 --- a/code/nel/src/misc/CMakeLists.txt +++ b/code/nel/src/misc/CMakeLists.txt @@ -39,7 +39,7 @@ ENDIF(UNIX) INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR} ${PNG_INCLUDE_DIR} config_file) -TARGET_LINK_LIBRARIES(nelmisc ${CMAKE_THREAD_LIBS_INIT} ${LIBXML2_LIBRARIES} ${ZLIB_LIBRARY} ${CURL_LIBRARY} nel_sevenzip) +TARGET_LINK_LIBRARIES(nelmisc ${CMAKE_THREAD_LIBS_INIT} ${LIBXML2_LIBRARIES} ${ZLIB_LIBRARY} ${CURL_LIBRARY} ${CURL_LIBRARIES} nel_sevenzip) SET_TARGET_PROPERTIES(nelmisc PROPERTIES LINK_INTERFACE_LIBRARIES "") NL_DEFAULT_PROPS(nelmisc "NeL, Library: NeL Misc") NL_ADD_RUNTIME_FLAGS(nelmisc) From b19c685ace6e610500cef9324089b49f513a4526 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Wed, 10 Dec 2014 17:04:40 +0100 Subject: [PATCH 016/236] Fix link --HG-- branch : feature-streamed-package --- code/CMakeLists.txt | 36 ++++++++++++++++---------------- code/nel/src/misc/CMakeLists.txt | 2 +- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/code/CMakeLists.txt b/code/CMakeLists.txt index 84d903d89..a6b7e2727 100644 --- a/code/CMakeLists.txt +++ b/code/CMakeLists.txt @@ -150,31 +150,31 @@ IF(WITH_NEL) IF(WITH_GUI) FIND_PACKAGE(Libwww REQUIRED) FIND_PACKAGE(Luabind REQUIRED) + ENDIF(WITH_GUI) FIND_PACKAGE(CURL REQUIRED) - IF(WIN32 OR CURL_LIBRARIES MATCHES "\\.a") - SET(CURL_STATIC ON) - ENDIF(WIN32 OR CURL_LIBRARIES MATCHES "\\.a") + IF(WIN32 OR CURL_LIBRARIES MATCHES "\\.a") + SET(CURL_STATIC ON) + ENDIF(WIN32 OR CURL_LIBRARIES MATCHES "\\.a") - IF(CURL_STATIC) - SET(CURL_DEFINITIONS -DCURL_STATICLIB) + IF(CURL_STATIC) + SET(CURL_DEFINITIONS -DCURL_STATICLIB) - FIND_PACKAGE(OpenSSL QUIET) + FIND_PACKAGE(OpenSSL QUIET) - IF(OPENSSL_FOUND) - SET(CURL_INCLUDE_DIRS ${CURL_INCLUDE_DIRS} ${OPENSSL_INCLUDE_DIR}) - SET(CURL_LIBRARIES ${CURL_LIBRARIES} ${OPENSSL_LIBRARIES}) - ENDIF(OPENSSL_FOUND) + IF(OPENSSL_FOUND) + SET(CURL_INCLUDE_DIRS ${CURL_INCLUDE_DIRS} ${OPENSSL_INCLUDE_DIR}) + SET(CURL_LIBRARIES ${CURL_LIBRARIES} ${OPENSSL_LIBRARIES}) + ENDIF(OPENSSL_FOUND) - # CURL Macports version depends on libidn, libintl and libiconv too - IF(APPLE) - FIND_LIBRARY(IDN_LIBRARY idn) - FIND_LIBRARY(INTL_LIBRARY intl) + # CURL Macports version depends on libidn, libintl and libiconv too + IF(APPLE) + FIND_LIBRARY(IDN_LIBRARY idn) + FIND_LIBRARY(INTL_LIBRARY intl) - SET(CURL_LIBRARIES ${CURL_LIBRARIES} ${IDN_LIBRARY} ${INTL_LIBRARY}) - ENDIF(APPLE) - ENDIF(CURL_STATIC) - ENDIF(WITH_GUI) + SET(CURL_LIBRARIES ${CURL_LIBRARIES} ${IDN_LIBRARY} ${INTL_LIBRARY}) + ENDIF(APPLE) + ENDIF(CURL_STATIC) INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/nel/include ${LIBXML2_INCLUDE_DIR}) INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/nel/3rdparty) diff --git a/code/nel/src/misc/CMakeLists.txt b/code/nel/src/misc/CMakeLists.txt index 82a40616e..f5bfa6c7b 100644 --- a/code/nel/src/misc/CMakeLists.txt +++ b/code/nel/src/misc/CMakeLists.txt @@ -46,7 +46,7 @@ NL_ADD_RUNTIME_FLAGS(nelmisc) NL_ADD_LIB_SUFFIX(nelmisc) -ADD_DEFINITIONS(${LIBXML2_DEFINITIONS}) +ADD_DEFINITIONS(${LIBXML2_DEFINITIONS} ${CURL_DEFINITIONS}) IF(WITH_PCH) ADD_NATIVE_PRECOMPILED_HEADER(nelmisc ${CMAKE_CURRENT_SOURCE_DIR}/stdmisc.h ${CMAKE_CURRENT_SOURCE_DIR}/stdmisc.cpp) From a7af274ae0629bd2bfb937f5aa538e7285ad06f3 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Fri, 12 Dec 2014 01:21:07 +0100 Subject: [PATCH 017/236] Don't decompress empty file in stream package --HG-- branch : feature-streamed-package --- code/nel/src/misc/streamed_package_manager.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/code/nel/src/misc/streamed_package_manager.cpp b/code/nel/src/misc/streamed_package_manager.cpp index fbdfc1f5a..8114da948 100644 --- a/code/nel/src/misc/streamed_package_manager.cpp +++ b/code/nel/src/misc/streamed_package_manager.cpp @@ -231,12 +231,15 @@ bool CStreamedPackageManager::getFile(std::string &filePath, const std::string & // allocate the output buffer :( std::vector outBuffer; outBuffer.resize(fileSize); - // decompress the file in memory - ret = LzmaDecode(&state, (unsigned char *)pos, (SizeT)(inBuffer.size() - (pos - &inBuffer[0])), &inProcessed, (unsigned char*)&outBuffer[0], (SizeT)fileSize, &outProcessed); - if (ret != 0 || outProcessed != fileSize) + if (fileSize) { - nlwarning("Failed to decode lzma file '%s'", downloadPath.c_str()); - return false; + // decompress the file in memory + ret = LzmaDecode(&state, (unsigned char *)pos, (SizeT)(inBuffer.size() - (pos - &inBuffer[0])), &inProcessed, (unsigned char*)&outBuffer[0], (SizeT)fileSize, &outProcessed); + if (ret != 0 || outProcessed != fileSize) + { + nlwarning("Failed to decode lzma file '%s'", downloadPath.c_str()); + return false; + } } { From 0f59cb4343b922b815113fadba70e1d6d7f813cb Mon Sep 17 00:00:00 2001 From: kaetemi Date: Fri, 12 Dec 2014 01:21:07 +0100 Subject: [PATCH 018/236] Validate downloaded files --HG-- branch : feature-streamed-package --- code/nel/src/misc/streamed_package_manager.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/code/nel/src/misc/streamed_package_manager.cpp b/code/nel/src/misc/streamed_package_manager.cpp index 8114da948..89e5724c3 100644 --- a/code/nel/src/misc/streamed_package_manager.cpp +++ b/code/nel/src/misc/streamed_package_manager.cpp @@ -27,6 +27,7 @@ #include #include #include +#include namespace NLMISC { @@ -242,6 +243,15 @@ bool CStreamedPackageManager::getFile(std::string &filePath, const std::string & } } + CHashKey outHash = outBuffer.size() ? getSHA1(&outBuffer[0], outBuffer.size()) : CHashKey(); + if (!(outHash == entry->Hash)) + { + std::string wantHashS = entry->Hash.toString(); + std::string outHashS = outHash.toString(); + nlwarning("Invalid SHA1 hash for file '%s', download has hash '%s'", wantHashS.c_str(), outHashS.c_str()); + return false; + } + { COFile outStream(unpackPath); outStream.serialBuffer(&outBuffer[0], (uint)fileSize); From e277fedfb8f43a201a59c8416e8471be3c6ecbf2 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Fri, 12 Dec 2014 01:21:07 +0100 Subject: [PATCH 019/236] Don't write empty buffer --HG-- branch : feature-streamed-package --- code/nel/src/misc/streamed_package_manager.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/code/nel/src/misc/streamed_package_manager.cpp b/code/nel/src/misc/streamed_package_manager.cpp index 89e5724c3..23b77def7 100644 --- a/code/nel/src/misc/streamed_package_manager.cpp +++ b/code/nel/src/misc/streamed_package_manager.cpp @@ -254,7 +254,8 @@ bool CStreamedPackageManager::getFile(std::string &filePath, const std::string & { COFile outStream(unpackPath); - outStream.serialBuffer(&outBuffer[0], (uint)fileSize); + if (fileSize) + outStream.serialBuffer(&outBuffer[0], (uint)fileSize); } if (!CFile::moveFile(filePath.c_str(), unpackPath.c_str())) From 5db42f1eb621ac33366aa4d7f7c82fe375c62fd8 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Thu, 16 Apr 2015 17:20:29 +0200 Subject: [PATCH 020/236] Changed path cfg --HG-- branch : feature-streamed-package --- code/ryzom/client/src/init.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/ryzom/client/src/init.cpp b/code/ryzom/client/src/init.cpp index c40cbd258..350a2496c 100644 --- a/code/ryzom/client/src/init.cpp +++ b/code/ryzom/client/src/init.cpp @@ -646,7 +646,7 @@ void initStereoDisplayDevice() void initStreamedPackageManager(NLMISC::IProgressCallback &progress) { CStreamedPackageManager &spm = CStreamedPackageManager::getInstance(); - spm.Path = replaceApplicationDirToken(ClientCfg.StreamedPackagePath); + spm.Path = ClientCfg.StreamedPackagePath; for (uint i = 0; i < ClientCfg.StreamedPackageHosts.size(); i++) spm.Hosts.push_back(ClientCfg.StreamedPackageHosts[i]); } From f8af0da354c9ed68c5513be3600978158be8d877 Mon Sep 17 00:00:00 2001 From: ulukyn Date: Tue, 28 May 2019 20:40:41 +0200 Subject: [PATCH 021/236] =?UTF-8?q?=C3=89tiquette=20Live-746=20ajout=C3=A9?= =?UTF-8?q?e=20=C3=A0=20la=20r=C3=A9vision=202102fb276eb6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --HG-- branch : yubo --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 0e4513b68..09f29bcc8 100644 --- a/.hgtags +++ b/.hgtags @@ -24,3 +24,4 @@ fc4be8ebec5ca754ef4453bc6a9faef90837c674 ryzom-patch-3.4.0 3941482843f9cd130cfc16634efc08d34a98ed35 ryzom-patch-3.4.0 Atysmas ecae9feb4cceb78103e5d7236caccaf450796cdb ryzom-patch-3.5.0 95783afa226f241062134eb62f4323295d29ac84 ryzom-patch-3.5.0.9637 +2102fb276eb69d49ed4923042215312a63c47c08 Live-746 From 21dfa80b735831eaed315066047e0265bac16697 Mon Sep 17 00:00:00 2001 From: Inky Date: Wed, 12 Jun 2019 22:37:36 +0300 Subject: [PATCH 022/236] Changed: display version at login --HG-- branch : compatibility-develop --- code/ryzom/client/src/login.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/code/ryzom/client/src/login.cpp b/code/ryzom/client/src/login.cpp index d45ac7e26..1eb6ec867 100644 --- a/code/ryzom/client/src/login.cpp +++ b/code/ryzom/client/src/login.cpp @@ -61,6 +61,7 @@ #include "game_share/bg_downloader_msg.h" #include "misc.h" +#include "user_agent.h" void ConnectToShard(); @@ -783,6 +784,15 @@ void initLoginScreen() ClientApp = ClientCfg.ConfigFile.getVar("Application").asString(0); + // version + std::string ext; + if (ClientApp.find("ryzom_") != ucstring::npos) + ext = " (" + ClientApp.substr(6) + ")"; + + CViewText *pV = dynamic_cast(CWidgetManager::getInstance()->getElementFromId("ui:login:checkpass:content:ver_value")); + if (pV) + pV->setHardText(getDisplayVersion() + (ext.empty() ? "" : ext)); + // give priority to login specified as argument string l = !LoginLogin.empty() ? LoginLogin:ClientCfg.LastLogin; From bfab92082bb5ea037e247b0cc3be6e6d96f2483f Mon Sep 17 00:00:00 2001 From: Inky Date: Thu, 13 Jun 2019 15:41:44 +0300 Subject: [PATCH 023/236] Changed: char selection keyboard navigation handler --HG-- branch : compatibility-develop --- .../src/interface_v3/action_handler_game.cpp | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/code/ryzom/client/src/interface_v3/action_handler_game.cpp b/code/ryzom/client/src/interface_v3/action_handler_game.cpp index 9ccdf1b11..813bda15d 100644 --- a/code/ryzom/client/src/interface_v3/action_handler_game.cpp +++ b/code/ryzom/client/src/interface_v3/action_handler_game.cpp @@ -4609,3 +4609,38 @@ public: }; REGISTER_ACTION_HANDLER( CHandlerSortTribeFame, "sort_tribefame"); +// *************************************************************************** +// navigate_charsel +// Arg : current slot selected +// *************************************************************************** +class CHandlerCharselNaviGetKeys : public IActionHandler +{ + virtual void execute (CCtrlBase * /* pCaller */, const string &Params) + { + sint32 slot = 0; + if (!getParam(Params, "cs").empty()) + fromString(getParam(Params, "cs"), slot); + + if (Driver->AsyncListener.isKeyPushed(KeyESCAPE)) + CAHManager::getInstance()->runActionHandler("proc", NULL, "proc_quit"); + + if (Driver->AsyncListener.isKeyPushed(KeyRETURN)) + CAHManager::getInstance()->runActionHandler("proc", NULL, "proc_charsel_enterkeyslot"); + + const sint32 index = slot; + if (Driver->AsyncListener.isKeyPushed(KeyUP)) + { + slot--; + if (slot < 0) slot = 4; + } + else if (Driver->AsyncListener.isKeyPushed(KeyDOWN)) + { + slot++; + if (slot > 4) slot = 0; + } + // now select + if (index != slot) + CAHManager::getInstance()->runActionHandler("proc", NULL, toString("proc_charsel_clickslot|%i", slot)); + } +}; +REGISTER_ACTION_HANDLER( CHandlerCharselNaviGetKeys, "navigate_charsel" ); From 90e508032c71d4e62bd06ab75e09119b4307a664 Mon Sep 17 00:00:00 2001 From: Inky Date: Fri, 21 Jun 2019 02:03:36 +0300 Subject: [PATCH 025/236] Changed: character selection handler --HG-- branch : menu_navi --- .../src/interface_v3/action_handler_game.cpp | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/code/ryzom/client/src/interface_v3/action_handler_game.cpp b/code/ryzom/client/src/interface_v3/action_handler_game.cpp index 9ccdf1b11..6548ce412 100644 --- a/code/ryzom/client/src/interface_v3/action_handler_game.cpp +++ b/code/ryzom/client/src/interface_v3/action_handler_game.cpp @@ -4609,3 +4609,30 @@ public: }; REGISTER_ACTION_HANDLER( CHandlerSortTribeFame, "sort_tribefame"); +// *************************************************************************** +class CHandlerCharselNaviGetKeys : public IActionHandler +{ + virtual void execute (CCtrlBase *pCaller, const string &Params) + { + const std::string ui = pCaller->getParent()->getId(); + if (ui != "ui:outgame") + return; + + if (Params.empty()) + { + sint32 event = -1; + + if (Driver->AsyncListener.isKeyPushed(KeyESCAPE)) event = 0; + if (Driver->AsyncListener.isKeyPushed(KeyDELETE)) event = 1; + if (Driver->AsyncListener.isKeyPushed(KeyRETURN)) event = 2; + if (Driver->AsyncListener.isKeyPushed(KeyDOWN)) event = 3; + if (Driver->AsyncListener.isKeyPushed(KeyUP)) event = 4; + + if (event != -1) + CLuaManager::getInstance().executeLuaScript(toString("outgame:eventCharselKeyGet(%i)", event)); + } + // reset previous input + Driver->AsyncListener.reset(); + } +}; +REGISTER_ACTION_HANDLER( CHandlerCharselNaviGetKeys, "navigate_charsel" ); From 331b0d8718e72c4caa0794d3fdf76e970c0c9554 Mon Sep 17 00:00:00 2001 From: Inky Date: Sat, 22 Jun 2019 00:51:12 +0300 Subject: [PATCH 026/236] Fixed: bad condition to verify parent id --HG-- branch : menu_navi --- code/ryzom/client/src/interface_v3/action_handler_game.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/code/ryzom/client/src/interface_v3/action_handler_game.cpp b/code/ryzom/client/src/interface_v3/action_handler_game.cpp index 6548ce412..a9dcb54ea 100644 --- a/code/ryzom/client/src/interface_v3/action_handler_game.cpp +++ b/code/ryzom/client/src/interface_v3/action_handler_game.cpp @@ -4614,8 +4614,10 @@ class CHandlerCharselNaviGetKeys : public IActionHandler { virtual void execute (CCtrlBase *pCaller, const string &Params) { - const std::string ui = pCaller->getParent()->getId(); - if (ui != "ui:outgame") + if (!pCaller->getParent()) + return; + + if (pCaller->getParent()->getId() != "ui:outgame") return; if (Params.empty()) From f5e9b7703c710fc67dd421d4169a4f40b23cf278 Mon Sep 17 00:00:00 2001 From: Inky Date: Sun, 23 Jun 2019 02:13:39 +0300 Subject: [PATCH 027/236] Changed: added keyboard events to CCtrlScroll elements --HG-- branch : menu_navi --- code/nel/include/nel/gui/ctrl_scroll.h | 1 + code/nel/src/gui/ctrl_scroll.cpp | 42 ++++++++++++++++++++++++++ 2 files changed, 43 insertions(+) diff --git a/code/nel/include/nel/gui/ctrl_scroll.h b/code/nel/include/nel/gui/ctrl_scroll.h index a22da2cbd..8a47691a5 100644 --- a/code/nel/include/nel/gui/ctrl_scroll.h +++ b/code/nel/include/nel/gui/ctrl_scroll.h @@ -174,6 +174,7 @@ namespace NLGUI bool _MouseDown : 1; bool _CallingAH : 1; bool _Cancelable : 1; // true if the slider may be cancelled when pressed on the mouse right button + bool _Keyboard : 1; bool _Frozen : 1; bool _Scale : 1; diff --git a/code/nel/src/gui/ctrl_scroll.cpp b/code/nel/src/gui/ctrl_scroll.cpp index e97bd8cd4..ba38b32c2 100644 --- a/code/nel/src/gui/ctrl_scroll.cpp +++ b/code/nel/src/gui/ctrl_scroll.cpp @@ -53,6 +53,7 @@ namespace NLGUI _MouseDown = false; _CallingAH = false; _Cancelable = false; + _Keyboard = false; _Target = NULL; _Inverted = false; _IsDBLink = false; @@ -221,6 +222,11 @@ namespace NLGUI return toString( _Cancelable ); } else + if( name == "keyboard" ) + { + return toString( _Keyboard ); + } + else if( name == "frozen" ) { return toString( _Frozen ); @@ -401,6 +407,14 @@ namespace NLGUI return; } else + if( name == "keyboard" ) + { + bool b; + if( fromString( value, b ) ) + _Keyboard = b; + return; + } + else if( name == "frozen" ) { bool b; @@ -470,6 +484,7 @@ namespace NLGUI xmlSetProp( node, BAD_CAST "target_stepy", BAD_CAST toString( _TargetStepY ).c_str() ); xmlSetProp( node, BAD_CAST "step_value", BAD_CAST toString( _StepValue ).c_str() ); xmlSetProp( node, BAD_CAST "cancelable", BAD_CAST toString( _Cancelable ).c_str() ); + xmlSetProp( node, BAD_CAST "keyboard", BAD_CAST toString( _Keyboard ).c_str() ); xmlSetProp( node, BAD_CAST "frozen", BAD_CAST toString( _Frozen ).c_str() ); return node; @@ -585,6 +600,9 @@ namespace NLGUI prop = (char*) xmlGetProp( node, (xmlChar*)"cancelable" ); if (prop) _Cancelable = convertBool(prop); + prop = (char*) xmlGetProp( node, (xmlChar*)"keyboard" ); + if (prop) _Keyboard = convertBool(prop); + prop= (char*) xmlGetProp (node, (xmlChar*)"frozen"); _Frozen = false; if (prop) @@ -850,6 +868,7 @@ namespace NLGUI if (CCtrlBase::handleEvent(event)) return true; if (!_Active || _Frozen) return false; + if (event.getType() == NLGUI::CEventDescriptor::mouse) { const NLGUI::CEventDescriptorMouse &eventDesc = (const NLGUI::CEventDescriptorMouse &)event; @@ -908,6 +927,28 @@ namespace NLGUI return true; } } + else if (event.getType() == NLGUI::CEventDescriptor::key) + { + const NLGUI::CEventDescriptorKey &eventDesc = (const NLGUI::CEventDescriptorKey &)event; + + if (eventDesc.getKeyEventType() == NLGUI::CEventDescriptorKey::keydown) + { + if (_Keyboard) + { + sint32 i = 0; + // direction + if (eventDesc.getKey() == KeyNEXT) i++; + if (eventDesc.getKey() == KeyPRIOR) i--; + + if (_Vertical) + moveTrackY(-(i * _TargetStepY)); + else + moveTrackX(-(i * _TargetStepX)); + + return true; + } + } + } return false; } @@ -1209,6 +1250,7 @@ namespace NLGUI if(wReal <= maxWReal) return; + // compute the new ofsX. sint32 ofsX= _Target->getOfsX(); ofsX+= dx; From 5d1233e8050aa301900dafc0b260d8ec2f5a1fcf Mon Sep 17 00:00:00 2001 From: Inky Date: Mon, 24 Jun 2019 02:15:04 +0300 Subject: [PATCH 028/236] Changed: update button selection handler mainland_select --HG-- branch : menu_navi --- code/ryzom/client/src/connection.cpp | 62 +++++++++++++++++++--------- 1 file changed, 43 insertions(+), 19 deletions(-) diff --git a/code/ryzom/client/src/connection.cpp b/code/ryzom/client/src/connection.cpp index 045822370..df557dd45 100644 --- a/code/ryzom/client/src/connection.cpp +++ b/code/ryzom/client/src/connection.cpp @@ -2110,7 +2110,7 @@ public: virtual void execute (CCtrlBase * /* pCaller */, const string &/* Params */) { - CInterfaceManager *pIM = CInterfaceManager::getInstance(); + //CInterfaceManager *pIM = CInterfaceManager::getInstance(); CInterfaceGroup *pList = dynamic_cast(CWidgetManager::getInstance()->getElementFromId(GROUP_LIST_MAINLAND)); if (pList == NULL) @@ -2189,7 +2189,7 @@ public: virtual void execute (CCtrlBase * /* pCaller */, const string &/* Params */) { - CInterfaceManager *pIM = CInterfaceManager::getInstance(); + //CInterfaceManager *pIM = CInterfaceManager::getInstance(); CInterfaceGroup *pList = dynamic_cast(CWidgetManager::getInstance()->getElementFromId(GROUP_LIST_MAINLAND)); pList->clearGroups(); } @@ -2200,32 +2200,56 @@ REGISTER_ACTION_HANDLER (CAHResetMainlandList, "reset_mainland_list"); // *************************************************************************** class CAHMainlandSelect : public IActionHandler { - virtual void execute (CCtrlBase *pCaller, const string &/* Params */) + virtual void execute (CCtrlBase *pCaller, const std::string &Params) { - nlinfo("CAHMainlandSelect called"); - - CInterfaceManager *pIM = CInterfaceManager::getInstance(); + //nlinfo("CAHMainlandSelect called"); + struct CUnpush : public CInterfaceElementVisitor + { + CCtrlBase *Ref; + virtual void visitCtrl(CCtrlBase *ctrl) + { + if (ctrl == Ref) return; + CCtrlBaseButton *but = dynamic_cast(ctrl); + if (but) + { + but->setPushed(false); + } + } + }; + CInterfaceGroup *list = dynamic_cast(CWidgetManager::getInstance()->getElementFromId(GROUP_LIST_MAINLAND)); + if (!list) + return; - CCtrlButton *pCB = NULL; - // Unselect - if (MainlandSelected.asInt() != 0) + // unselect + if (Params.empty()) { - pCB = dynamic_cast(CWidgetManager::getInstance()->getElementFromId(GROUP_LIST_MAINLAND ":"+toString(MainlandSelected)+":but")); - if (pCB != NULL) - pCB->setPushed(false); + CUnpush unpusher; + unpusher.Ref = pCaller; + list->visit(&unpusher); } - pCB = dynamic_cast(pCaller); - if (pCB != NULL) + // now select + uint32 mainland; + if (Params.empty()) { - string name = pCB->getId(); - name = name.substr(0,name.rfind(':')); - uint32 mainland; - fromString(name.substr(name.rfind(':')+1,name.size()), mainland); - MainlandSelected = (TSessionId)mainland; + CCtrlButton *pCB = dynamic_cast(pCaller); + if (!pCB) + return; + + std::string name = pCB->getId(); + name = name.substr(0, name.rfind(':')); + + if (!fromString(name.substr(name.rfind(':')+1, name.size()), mainland)) + return; pCB->setPushed(true); } + else + if (!fromString(Params, mainland)) + return; + + // and store + MainlandSelected = (TSessionId)mainland; } }; REGISTER_ACTION_HANDLER (CAHMainlandSelect, "mainland_select"); From c8927c9c4bdbf18f2521a7a682356c74dcaaf505 Mon Sep 17 00:00:00 2001 From: Inky Date: Mon, 24 Jun 2019 20:34:01 +0300 Subject: [PATCH 029/236] Changed: update button selection handler keyset_select --HG-- branch : menu_navi --- code/ryzom/client/src/connection.cpp | 73 +++++++++++++++------------- 1 file changed, 39 insertions(+), 34 deletions(-) diff --git a/code/ryzom/client/src/connection.cpp b/code/ryzom/client/src/connection.cpp index df557dd45..17a042efd 100644 --- a/code/ryzom/client/src/connection.cpp +++ b/code/ryzom/client/src/connection.cpp @@ -2454,7 +2454,7 @@ public: virtual void execute (CCtrlBase * /* pCaller */, const string &/* Params */) { - CInterfaceManager *pIM = CInterfaceManager::getInstance(); + //CInterfaceManager *pIM = CInterfaceManager::getInstance(); CInterfaceGroup *pList = dynamic_cast(CWidgetManager::getInstance()->getElementFromId(GROUP_LIST_KEYSET)); pList->clearGroups(); } @@ -2465,59 +2465,66 @@ REGISTER_ACTION_HANDLER (CAHResetKeysetList, "reset_keyset_list"); // *************************************************************************** class CAHResetKeysetSelect : public IActionHandler { -public: std::string getIdPostFix(const std::string fullId) { std::string::size_type pos = fullId.find_last_of(":"); if (pos != std::string::npos) - { return fullId.substr(pos + 1); - } + return ""; } - virtual void execute (CCtrlBase *pCaller, const string &/* Params */) + + virtual void execute(CCtrlBase *pCaller, const std::string &Params) { - if (!pCaller) return; // 'unpush' all groups but the caller - // struct CUnpush : public CInterfaceElementVisitor { CCtrlBase *Ref; virtual void visitCtrl(CCtrlBase *ctrl) { if (ctrl == Ref) return; - CCtrlBaseButton *but = dynamic_cast(ctrl); + CCtrlBaseButton *but = dynamic_cast(ctrl); if (but) { but->setPushed(false); } } }; - CInterfaceManager *pIM = CInterfaceManager::getInstance(); - CInterfaceGroup * list = dynamic_cast(CWidgetManager::getInstance()->getElementFromId(GROUP_LIST_KEYSET)); - if (list) - { - CUnpush unpusher; - unpusher.Ref = pCaller; - list->visit(&unpusher); - } - CCtrlBaseButton *but = dynamic_cast(pCaller); + CInterfaceGroup *list = dynamic_cast(CWidgetManager::getInstance()->getElementFromId(GROUP_LIST_KEYSET)); + if (!list) + return; + + // unselect + CUnpush unpusher; + unpusher.Ref = pCaller; + list->visit(&unpusher); + + // now select + CCtrlBaseButton *but = dynamic_cast(pCaller); if (but) - { but->setPushed(true); + + std::string id; + if (Params.empty()) + { + if (!pCaller) return; + if (!pCaller->getParent()) return; + + id = getIdPostFix(pCaller->getParent()->getId()); } - // + else + id = getIdPostFix(Params); + GameKeySet = "keys.xml"; RingEditorKeySet = "keys_r2ed.xml"; - if (!pCaller->getParent()) return; - // compute the 2 filenames from the id - // if id is in the built-in keysets : + + // compute the two filenames from the id + // if id is in the built-in keysets CConfigFile::CVar *keySetVar = ClientCfg.ConfigFile.getVarPtr(KeySetVarName); - if (keySetVar && keySetVar->size() != 0) + if (keySetVar && keySetVar->size() > 0) { for (uint k = 0; k < keySetVar->size(); ++k) { - std::string id = getIdPostFix(pCaller->getParent()->getId()); if (keySetVar->asString(k) == id) { GameKeySet = "keys" + string(id.empty() ? "" : "_") + id + ".xml"; @@ -2526,17 +2533,15 @@ public: } } } - // ... else maybe from a previous character ? - if (CFile::isExists("save/keys_" + getIdPostFix(pCaller->getParent()->getId()) + ".xml") ) - { - GameKeySet = "keys_" + getIdPostFix(pCaller->getParent()->getId()) + ".xml"; - } - if (CFile::isExists("save/keys_r2ed_" + getIdPostFix(pCaller->getParent()->getId()) + ".xml") ) - { - RingEditorKeySet = "keys_r2ed_" + getIdPostFix(pCaller->getParent()->getId()) + ".xml"; - } - // NB : key file will be copied for real when the new 'character summary' is + // else maybe from a previous character? + if (CFile::isExists("save/keys_" + id + ".xml")) + GameKeySet = "keys_" + id + ".xml"; + + if (CFile::isExists("save/keys_r2ed_" + id + ".xml")) + RingEditorKeySet = "keys_r2ed_" + id + ".xml"; + + // NB: key file will be copied for real when the new character summary is } }; REGISTER_ACTION_HANDLER (CAHResetKeysetSelect, "keyset_select"); From 0f3f64cdc231ee71cef004353551a478f04824d4 Mon Sep 17 00:00:00 2001 From: Inky Date: Tue, 25 Jun 2019 15:52:28 +0300 Subject: [PATCH 030/236] Changed: character creation handler Todo: fusion both handler --HG-- branch : menu_navi --- .../src/interface_v3/action_handler_game.cpp | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/code/ryzom/client/src/interface_v3/action_handler_game.cpp b/code/ryzom/client/src/interface_v3/action_handler_game.cpp index a9dcb54ea..c35493475 100644 --- a/code/ryzom/client/src/interface_v3/action_handler_game.cpp +++ b/code/ryzom/client/src/interface_v3/action_handler_game.cpp @@ -4638,3 +4638,35 @@ class CHandlerCharselNaviGetKeys : public IActionHandler } }; REGISTER_ACTION_HANDLER( CHandlerCharselNaviGetKeys, "navigate_charsel" ); + +// *************************************************************************** +class CHandlerCharcreateGetKeys : public IActionHandler +{ + virtual void execute (CCtrlBase *pCaller, const string &Params) + { + if (!pCaller->getParent()) + return; + + if (pCaller->getParent()->getId() != "ui:outgame") + return; + + if (Params.empty()) + { + sint32 event = -1; + + if (Driver->AsyncListener.isKeyPushed(KeyESCAPE)) event = 0; + //if (Driver->AsyncListener.isKeyPushed(KeyDELETE)) event = 1; + if (Driver->AsyncListener.isKeyPushed(KeyRETURN)) event = 2; + if (Driver->AsyncListener.isKeyPushed(KeyDOWN)) event = 3; + if (Driver->AsyncListener.isKeyPushed(KeyUP)) event = 4; + if (Driver->AsyncListener.isKeyPushed(KeyI)) event = 5; + if (Driver->AsyncListener.isKeyPushed(KeyP)) event = 6; + + if (event != -1) + CLuaManager::getInstance().executeLuaScript(toString("outgame:eventCharcreateKeyGet(%i)", event)); + } + // reset previous input + Driver->AsyncListener.reset(); + } +}; +REGISTER_ACTION_HANDLER( CHandlerCharcreateGetKeys, "navigate_charcreate" ); \ No newline at end of file From b2b16e3ccecc73b3818b4818b604bcaf3cdeb7e0 Mon Sep 17 00:00:00 2001 From: Inky Date: Tue, 25 Jun 2019 22:55:22 +0300 Subject: [PATCH 031/236] Changed: fusion selection and creation handler --HG-- branch : menu_navi --- .../src/interface_v3/action_handler_game.cpp | 42 ++++--------------- 1 file changed, 8 insertions(+), 34 deletions(-) diff --git a/code/ryzom/client/src/interface_v3/action_handler_game.cpp b/code/ryzom/client/src/interface_v3/action_handler_game.cpp index c35493475..706099741 100644 --- a/code/ryzom/client/src/interface_v3/action_handler_game.cpp +++ b/code/ryzom/client/src/interface_v3/action_handler_game.cpp @@ -4610,9 +4610,9 @@ public: REGISTER_ACTION_HANDLER( CHandlerSortTribeFame, "sort_tribefame"); // *************************************************************************** -class CHandlerCharselNaviGetKeys : public IActionHandler +class CHandlerOutgameNaviGetKeys : public IActionHandler { - virtual void execute (CCtrlBase *pCaller, const string &Params) + virtual void execute (CCtrlBase *pCaller, const std::string &Params) { if (!pCaller->getParent()) return; @@ -4629,44 +4629,18 @@ class CHandlerCharselNaviGetKeys : public IActionHandler if (Driver->AsyncListener.isKeyPushed(KeyRETURN)) event = 2; if (Driver->AsyncListener.isKeyPushed(KeyDOWN)) event = 3; if (Driver->AsyncListener.isKeyPushed(KeyUP)) event = 4; - - if (event != -1) - CLuaManager::getInstance().executeLuaScript(toString("outgame:eventCharselKeyGet(%i)", event)); - } - // reset previous input - Driver->AsyncListener.reset(); - } -}; -REGISTER_ACTION_HANDLER( CHandlerCharselNaviGetKeys, "navigate_charsel" ); - -// *************************************************************************** -class CHandlerCharcreateGetKeys : public IActionHandler -{ - virtual void execute (CCtrlBase *pCaller, const string &Params) - { - if (!pCaller->getParent()) - return; - - if (pCaller->getParent()->getId() != "ui:outgame") - return; - - if (Params.empty()) - { - sint32 event = -1; - - if (Driver->AsyncListener.isKeyPushed(KeyESCAPE)) event = 0; - //if (Driver->AsyncListener.isKeyPushed(KeyDELETE)) event = 1; - if (Driver->AsyncListener.isKeyPushed(KeyRETURN)) event = 2; - if (Driver->AsyncListener.isKeyPushed(KeyDOWN)) event = 3; - if (Driver->AsyncListener.isKeyPushed(KeyUP)) event = 4; if (Driver->AsyncListener.isKeyPushed(KeyI)) event = 5; if (Driver->AsyncListener.isKeyPushed(KeyP)) event = 6; + std::string id = "create"; + if (pCaller->getId() == "ui:outgame:charsel") + id = "sel"; + if (event != -1) - CLuaManager::getInstance().executeLuaScript(toString("outgame:eventCharcreateKeyGet(%i)", event)); + CLuaManager::getInstance().executeLuaScript(toString("outgame:eventChar%sKeyGet(%i)", id.c_str(), event)); } // reset previous input Driver->AsyncListener.reset(); } }; -REGISTER_ACTION_HANDLER( CHandlerCharcreateGetKeys, "navigate_charcreate" ); \ No newline at end of file +REGISTER_ACTION_HANDLER( CHandlerOutgameNaviGetKeys, "navigate_outgame" ); From 20fe11c53fed389908159f191591c376e159237d Mon Sep 17 00:00:00 2001 From: Inky Date: Sat, 29 Jun 2019 03:43:29 +0300 Subject: [PATCH 032/236] Changed: add character importation handler --HG-- branch : menu_navi --- code/ryzom/client/src/connection.cpp | 182 ++++++++++++++++++++++++++- 1 file changed, 181 insertions(+), 1 deletion(-) diff --git a/code/ryzom/client/src/connection.cpp b/code/ryzom/client/src/connection.cpp index 17a042efd..59b30cf57 100644 --- a/code/ryzom/client/src/connection.cpp +++ b/code/ryzom/client/src/connection.cpp @@ -155,7 +155,7 @@ string ScenarioFileName; static const char *KeySetVarName = "BuiltInKeySets"; - +#define GROUP_LIST_CHARACTER "ui:outgame:charsel_import:import_list" #define GROUP_LIST_MAINLAND "ui:outgame:appear_mainland:mainland_list" #define GROUP_LIST_KEYSET "ui:outgame:appear_keyset:keyset_list" vector Mainlands; @@ -3436,3 +3436,183 @@ class CAHOpenRingSessions : public IActionHandler } }; REGISTER_ACTION_HANDLER (CAHOpenRingSessions, "open_ring_sessions"); + +// *************************************************************************** +class CAHInitImportCharacter : public IActionHandler +{ + virtual void execute (CCtrlBase * /* pCaller */, const string &/* Params */) + { + CInterfaceGroup *list = dynamic_cast(CWidgetManager::getInstance()->getElementFromId(GROUP_LIST_CHARACTER)); + if (!list) + { + nlwarning("element " GROUP_LIST_CHARACTER " not found probably bad outgame.xml"); + return; + } + + // retrieve saved files + std::vector savedCharacters; + CPath::getPathContent("save/", false, false, true, savedCharacters); + + CInterfaceGroup *newLine; + CInterfaceGroup *prevLine; + + for (uint i = 0; i < savedCharacters.size(); ++i) + { + // search saved characters only + if (testWildCard(CFile::getFilename(savedCharacters[i]), "character_*.save")) + { + const std::string id = CFile::getFilenameWithoutExtension(savedCharacters[i]).substr(strlen("character_")); + if (id.empty()) + continue; + + std::vector> params; + params.clear(); + params.push_back(std::pair("id", id)); + // adjust ref + if (list->getNumGroup() > 0) + params.push_back(std::pair("posref", "BL TL")); + + newLine = CWidgetManager::getInstance()->getParser()->createGroupInstance("t_import", GROUP_LIST_CHARACTER, params); + if (newLine) + { + CViewText *text = dynamic_cast(newLine->getView("name")); + if (text) + text->setText(ucstring(savedCharacters[i])); + + // add to the list now + newLine->setParent(list); + newLine->setParentSize(list); + newLine->setParentPos(prevLine); + + list->addGroup(newLine); + + prevLine = newLine; + } + } + } + // none case + if (list->getNumGroup() == 0) + CLuaManager::getInstance().executeLuaScript("outgame:procCharselNotifaction(3)"); + + list->invalidateCoords(); + } +}; +REGISTER_ACTION_HANDLER( CAHInitImportCharacter, "import_char_init" ); + +// *************************************************************************** +class CAHResetImportCharacter : public IActionHandler +{ + virtual void execute (CCtrlBase * /* pCaller */, const string &/* Params */) + { + CInterfaceGroup *list = dynamic_cast(CWidgetManager::getInstance()->getElementFromId(GROUP_LIST_CHARACTER)); + if (list) + list->clearGroups(); + + if (!ImportCharacter.empty()) + ImportCharacter = ""; + } +}; +REGISTER_ACTION_HANDLER( CAHResetImportCharacter, "import_char_reset" ); + +// *************************************************************************** +class CAHSelectImportCharacter : public IActionHandler +{ + virtual void execute (CCtrlBase *pCaller, const std::string &Params) + { + struct CUnpush : public CInterfaceElementVisitor + { + CCtrlBase *Ref; + virtual void visitCtrl(CCtrlBase *ctrl) + { + if (ctrl == Ref) return; + CCtrlBaseButton *but = dynamic_cast(ctrl); + if (but) + { + but->setPushed(false); + } + } + }; + CInterfaceGroup *list = dynamic_cast(CWidgetManager::getInstance()->getElementFromId(GROUP_LIST_CHARACTER)); + if (!list) + return; + + // unselect + if (Params.empty()) + { + CUnpush unpusher; + unpusher.Ref = pCaller; + list->visit(&unpusher); + } + + // now select + std::string name; + if (Params.empty()) + { + CCtrlButton *pCB = dynamic_cast(pCaller); + if (!pCB) + return; + + std::string id = pCB->getId(); + id = id.substr(0, id.rfind(':')); + + if (!fromString(id.substr(id.rfind(':')+1, id.size()), name)) + return; + + pCB->setPushed(true); + } + else + if (!fromString(Params, name)) + return; + + ImportCharacter = ""; + // check filename and store + if (CFile::fileExists(toString("save/character_%s.save", name.c_str()))) + ImportCharacter = name; + } +}; +REGISTER_ACTION_HANDLER( CAHSelectImportCharacter, "import_char_select" ); + +// *************************************************************************** +class CAHImportCharacter : public IActionHandler +{ + virtual void execute (CCtrlBase * /* pCaller */, const string &/* Params */) + { + if (ImportCharacter.empty()) + return; + + if (!CFile::fileExists(toString("save/character_%s.save", ImportCharacter.c_str()))) + return; + + bool success = false; + + CIFile fd; + CCharacterSummary CS; + // use temporary file until close() + if (fd.open(toString("save/character_%s.save", ImportCharacter.c_str()))) + { + try + { + CS.serial(fd); + SCharacter3DSetup::setupDBFromCharacterSummary("UI:TEMP:CHAR3D", CS); + + // validate import + CDBManager::getInstance()->getDbProp("UI:TEMP:IMPORT")->setValue32(1); + success = true; + } + catch (const EStream &e) + { + nlwarning(e.what()); + } + fd.close(); + } + else + nlwarning("Failed to open file: save/character_%s.save", ImportCharacter.c_str()); + + // user notification + if (!success) + CLuaManager::getInstance().executeLuaScript("outgame:procCharselNotifaction(2)"); + else + CAHManager::getInstance()->runActionHandler("proc", NULL, "proc_charsel_create_new"); + } +}; +REGISTER_ACTION_HANDLER( CAHImportCharacter, "import_char" ); From c1e76fcbb2ba22682ae74443219a41d91fb35be5 Mon Sep 17 00:00:00 2001 From: Inky Date: Sat, 29 Jun 2019 03:47:02 +0300 Subject: [PATCH 033/236] Changed: add character exportation handler --HG-- branch : menu_navi --- code/ryzom/client/src/connection.cpp | 51 ++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/code/ryzom/client/src/connection.cpp b/code/ryzom/client/src/connection.cpp index 59b30cf57..581b7de95 100644 --- a/code/ryzom/client/src/connection.cpp +++ b/code/ryzom/client/src/connection.cpp @@ -3616,3 +3616,54 @@ class CAHImportCharacter : public IActionHandler } }; REGISTER_ACTION_HANDLER( CAHImportCharacter, "import_char" ); + +// *************************************************************************** +class CAHExportCharacter : public IActionHandler +{ + virtual void execute (CCtrlBase * /* pCaller */, const std::string &Params) + { + if (Params.empty()) + return; + + sint32 slot = -1; + if (!fromString(getParam(Params, "slot"), slot)) + return; + + if (slot >= CharacterSummaries.size() || slot < 0) + return; + + // retrieve infos + CCharacterSummary &CS = CharacterSummaries[slot]; + if (CS.Name.empty()) + return; + + // extract name + const std::string name = buildPlayerNameForSaveFile(CS.Name.toString()); + + COFile fd; + bool success = false; + // use temporary file until close() + if (fd.open(toString("save/character_%s.save", name.c_str()), false, false, true)) + { + try + { + fd.serial(CS); + fd.flush(); + // validate + success = true; + } + catch (const EStream &e) + { + nlwarning(e.what()); + } + fd.close(); + } + else + nlwarning("Failed to open file: save/character_%s.save", name.c_str()); + + const uint8 val = (success == true) ? 0 : 1; + // user notification + CLuaManager::getInstance().executeLuaScript(toString("outgame:procCharselNotifaction(%i)", val)); + } +}; +REGISTER_ACTION_HANDLER( CAHExportCharacter, "export_char" ); From c545629a10d3593b71954dc9cdddac104f38a1a4 Mon Sep 17 00:00:00 2001 From: Inky Date: Sat, 29 Jun 2019 16:22:39 +0300 Subject: [PATCH 034/236] Changed: import modal auto select first occurence --HG-- branch : menu_navi --- code/ryzom/client/src/connection.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/code/ryzom/client/src/connection.cpp b/code/ryzom/client/src/connection.cpp index 581b7de95..fbbac50c2 100644 --- a/code/ryzom/client/src/connection.cpp +++ b/code/ryzom/client/src/connection.cpp @@ -3479,6 +3479,11 @@ class CAHInitImportCharacter : public IActionHandler if (text) text->setText(ucstring(savedCharacters[i])); + // first button is pushed + CCtrlButton *button = dynamic_cast(newLine->getCtrl("but")); + if (button && list->getNumGroup() == 0) + button->setPushed(true); + // add to the list now newLine->setParent(list); newLine->setParentSize(list); From 77496daef4869d52e2343b1a84bdc5135112f262 Mon Sep 17 00:00:00 2001 From: Inky Date: Sun, 30 Jun 2019 18:10:01 +0300 Subject: [PATCH 035/236] Changed: new key pushed event to export --HG-- branch : menu_navi --- code/ryzom/client/src/interface_v3/action_handler_game.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/code/ryzom/client/src/interface_v3/action_handler_game.cpp b/code/ryzom/client/src/interface_v3/action_handler_game.cpp index 706099741..9a042767a 100644 --- a/code/ryzom/client/src/interface_v3/action_handler_game.cpp +++ b/code/ryzom/client/src/interface_v3/action_handler_game.cpp @@ -4631,6 +4631,7 @@ class CHandlerOutgameNaviGetKeys : public IActionHandler if (Driver->AsyncListener.isKeyPushed(KeyUP)) event = 4; if (Driver->AsyncListener.isKeyPushed(KeyI)) event = 5; if (Driver->AsyncListener.isKeyPushed(KeyP)) event = 6; + if (Driver->AsyncListener.isKeyPushed(KeyE)) event = 7; std::string id = "create"; if (pCaller->getId() == "ui:outgame:charsel") From f75e41399415a16a5f286c2a46115baa50e883ef Mon Sep 17 00:00:00 2001 From: Inky Date: Wed, 3 Jul 2019 18:30:09 +0300 Subject: [PATCH 036/236] Changed: new key pushed event: left-right-tabulation --HG-- branch : menu_navi --- code/ryzom/client/src/interface_v3/action_handler_game.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/code/ryzom/client/src/interface_v3/action_handler_game.cpp b/code/ryzom/client/src/interface_v3/action_handler_game.cpp index 9a042767a..9ca94649b 100644 --- a/code/ryzom/client/src/interface_v3/action_handler_game.cpp +++ b/code/ryzom/client/src/interface_v3/action_handler_game.cpp @@ -4632,6 +4632,9 @@ class CHandlerOutgameNaviGetKeys : public IActionHandler if (Driver->AsyncListener.isKeyPushed(KeyI)) event = 5; if (Driver->AsyncListener.isKeyPushed(KeyP)) event = 6; if (Driver->AsyncListener.isKeyPushed(KeyE)) event = 7; + if (Driver->AsyncListener.isKeyPushed(KeyLEFT)) event = 8; + if (Driver->AsyncListener.isKeyPushed(KeyRIGHT)) event = 9; + if (Driver->AsyncListener.isKeyPushed(KeyTAB)) event = 10; std::string id = "create"; if (pCaller->getId() == "ui:outgame:charsel") From 6fdbdc9ed1325a979ca6c98591c838935cf4e537 Mon Sep 17 00:00:00 2001 From: Inky Date: Wed, 3 Jul 2019 18:34:40 +0300 Subject: [PATCH 037/236] Fixed: record only key next/prior event on CCtrlScroll element --HG-- branch : menu_navi --- code/nel/src/gui/ctrl_scroll.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/code/nel/src/gui/ctrl_scroll.cpp b/code/nel/src/gui/ctrl_scroll.cpp index ba38b32c2..06d3afe33 100644 --- a/code/nel/src/gui/ctrl_scroll.cpp +++ b/code/nel/src/gui/ctrl_scroll.cpp @@ -938,7 +938,9 @@ namespace NLGUI sint32 i = 0; // direction if (eventDesc.getKey() == KeyNEXT) i++; - if (eventDesc.getKey() == KeyPRIOR) i--; + else if (eventDesc.getKey() == KeyPRIOR) i--; + else + return false; if (_Vertical) moveTrackY(-(i * _TargetStepY)); From 8006dbeabebeb5ebf76b6060d08dd81645278303 Mon Sep 17 00:00:00 2001 From: Inky Date: Wed, 3 Jul 2019 18:45:39 +0300 Subject: [PATCH 038/236] Changed: export reflect texture(pushed, over) on CCtrlTextButton element --HG-- branch : menu_navi --- code/nel/include/nel/gui/ctrl_text_button.h | 13 +++++ code/nel/src/gui/ctrl_text_button.cpp | 63 +++++++++++++++++++++ 2 files changed, 76 insertions(+) diff --git a/code/nel/include/nel/gui/ctrl_text_button.h b/code/nel/include/nel/gui/ctrl_text_button.h index e88ec81e1..713c5ad1c 100644 --- a/code/nel/include/nel/gui/ctrl_text_button.h +++ b/code/nel/include/nel/gui/ctrl_text_button.h @@ -124,6 +124,16 @@ namespace NLGUI void setTexturePushed(const std::string &l, const std::string &m, const std::string &r); void setTextureOver(const std::string &l, const std::string &m, const std::string &r); + // lua + void setTextureLua (const std::string &name); + void setTexturePushedLua (const std::string &name); + void setTextureOverLua (const std::string &name); + + // return texture _l.tga + std::string getTexture () const; + std::string getTexturePushed () const; + std::string getTextureOver() const; + int luaGetViewText(CLuaState &ls); REFLECT_EXPORT_START(CCtrlTextButton, CCtrlBaseButton) @@ -134,6 +144,9 @@ namespace NLGUI REFLECT_SINT32("wmin", getWMin, setWMin) REFLECT_SINT32("hmin", getHMin, setHMin) REFLECT_LUA_METHOD("getViewText", luaGetViewText) + REFLECT_STRING("texture", getTexture, setTextureLua); + REFLECT_STRING("texture_pushed", getTexturePushed, setTexturePushedLua); + REFLECT_STRING("texture_over", getTextureOver, setTextureOverLua); REFLECT_EXPORT_END void onRemoved(); diff --git a/code/nel/src/gui/ctrl_text_button.cpp b/code/nel/src/gui/ctrl_text_button.cpp index d10dfa0c9..0cea8c8b3 100644 --- a/code/nel/src/gui/ctrl_text_button.cpp +++ b/code/nel/src/gui/ctrl_text_button.cpp @@ -1074,6 +1074,69 @@ namespace NLGUI // *************************************************************************** + void CCtrlTextButton::setTextureLua(const std::string &name) + { + _TextureIdNormal[0].setTexture(std::string(name + "_l.tga").c_str()); + _TextureIdNormal[1].setTexture(std::string(name + "_m.tga").c_str()); + _TextureIdNormal[2].setTexture(std::string(name + "_r.tga").c_str()); + } + + // *************************************************************************** + + void CCtrlTextButton::setTexturePushedLua(const std::string &name) + { + _TextureIdPushed[0].setTexture(std::string(name + "_l.tga").c_str()); + _TextureIdPushed[1].setTexture(std::string(name + "_m.tga").c_str()); + _TextureIdPushed[2].setTexture(std::string(name + "_r.tga").c_str()); + } + + // *************************************************************************** + + void CCtrlTextButton::setTextureOverLua(const std::string &name) + { + _TextureIdOver[0].setTexture(std::string(name + "_l.tga").c_str()); + _TextureIdOver[1].setTexture(std::string(name + "_m.tga").c_str()); + _TextureIdOver[2].setTexture(std::string(name + "_r.tga").c_str()); + } + + // *************************************************************************** + + std::string CCtrlTextButton::getTexture() const + { + std::string tx = CViewRenderer::getInstance()->getTextureNameFromId(_TextureIdNormal[0]); + std::string::size_type i = tx.rfind("_l.tga"); + if (i != std::string::npos) + tx = tx.substr(0, i); + + return tx; + } + + // *************************************************************************** + + std::string CCtrlTextButton::getTexturePushed() const + { + std::string tx = CViewRenderer::getInstance()->getTextureNameFromId(_TextureIdOver[0]); + std::string::size_type i = tx.rfind("_l.tga"); + if (i != std::string::npos) + tx = tx.substr(0, i); + + return tx; + } + + // *************************************************************************** + + std::string CCtrlTextButton::getTextureOver() const + { + std::string tx = CViewRenderer::getInstance()->getTextureNameFromId(_TextureIdPushed[0]); + std::string::size_type i = tx.rfind("_l.tga"); + if (i != std::string::npos) + tx = tx.substr(0, i); + + return tx; + } + + // *************************************************************************** + int CCtrlTextButton::luaGetViewText(CLuaState &ls) { const char *funcName = "getViewText"; From c752619f134af6f5d020b2651077155ad9d879e7 Mon Sep 17 00:00:00 2001 From: Inky Date: Wed, 3 Jul 2019 19:40:02 +0300 Subject: [PATCH 039/236] Fixed: missing stream.h and import select var --HG-- branch : menu_navi --- code/ryzom/client/src/connection.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/code/ryzom/client/src/connection.cpp b/code/ryzom/client/src/connection.cpp index fbbac50c2..92c68de48 100644 --- a/code/ryzom/client/src/connection.cpp +++ b/code/ryzom/client/src/connection.cpp @@ -28,6 +28,7 @@ #include "nel/misc/time_nl.h" #include "nel/misc/algo.h" #include "nel/misc/system_utils.h" +#include "nel/misc/stream.h" // 3D Interface. #include "nel/3d/u_driver.h" #include "nel/3d/u_text_context.h" @@ -152,6 +153,7 @@ std::string RingEditorKeySet = "keys_r2ed.xml"; string ScenarioFileName; +std::string ImportCharacter; static const char *KeySetVarName = "BuiltInKeySets"; From 045a80b59e9378da2174dba9e1c775815cfc2b56 Mon Sep 17 00:00:00 2001 From: Inky Date: Thu, 4 Jul 2019 03:58:31 +0300 Subject: [PATCH 040/236] Changed: removed tabulation event since not used --HG-- branch : menu_navi --- code/ryzom/client/src/interface_v3/action_handler_game.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/code/ryzom/client/src/interface_v3/action_handler_game.cpp b/code/ryzom/client/src/interface_v3/action_handler_game.cpp index 9ca94649b..cb0d03313 100644 --- a/code/ryzom/client/src/interface_v3/action_handler_game.cpp +++ b/code/ryzom/client/src/interface_v3/action_handler_game.cpp @@ -4634,7 +4634,6 @@ class CHandlerOutgameNaviGetKeys : public IActionHandler if (Driver->AsyncListener.isKeyPushed(KeyE)) event = 7; if (Driver->AsyncListener.isKeyPushed(KeyLEFT)) event = 8; if (Driver->AsyncListener.isKeyPushed(KeyRIGHT)) event = 9; - if (Driver->AsyncListener.isKeyPushed(KeyTAB)) event = 10; std::string id = "create"; if (pCaller->getId() == "ui:outgame:charsel") From c9a5fbacd9c05fd9f67d17cda0e34b6e749bd84b Mon Sep 17 00:00:00 2001 From: Nimetu Date: Wed, 24 Jul 2019 08:14:18 +0300 Subject: [PATCH 041/236] Changed: Disable r2_islands_textures, ai_build_wmap, build_world_packed_col because no server code in yubo/atys branch. --HG-- branch : yubo --- code/ryzom/server/CMakeLists.txt | 2 +- code/ryzom/tools/client/CMakeLists.txt | 3 ++- code/ryzom/tools/server/CMakeLists.txt | 6 ++++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/code/ryzom/server/CMakeLists.txt b/code/ryzom/server/CMakeLists.txt index 4b7537b55..0d2f4ffc4 100644 --- a/code/ryzom/server/CMakeLists.txt +++ b/code/ryzom/server/CMakeLists.txt @@ -1 +1 @@ -ADD_SUBDIRECTORY(src) +#ADD_SUBDIRECTORY(src) diff --git a/code/ryzom/tools/client/CMakeLists.txt b/code/ryzom/tools/client/CMakeLists.txt index d4f136b3c..2a9cfc59e 100644 --- a/code/ryzom/tools/client/CMakeLists.txt +++ b/code/ryzom/tools/client/CMakeLists.txt @@ -15,5 +15,6 @@ IF(WITH_QT5 AND WITH_RYZOM_INSTALLER) ENDIF() IF(WITH_RYZOM_TOOLS AND MYSQL_FOUND) - ADD_SUBDIRECTORY(r2_islands_textures) + # requires which is missing from yubo/atys branch + #ADD_SUBDIRECTORY(r2_islands_textures) ENDIF() diff --git a/code/ryzom/tools/server/CMakeLists.txt b/code/ryzom/tools/server/CMakeLists.txt index 1e8a6edb9..310fd7583 100644 --- a/code/ryzom/tools/server/CMakeLists.txt +++ b/code/ryzom/tools/server/CMakeLists.txt @@ -1,10 +1,12 @@ IF(WITH_RYZOM_TOOLS) IF(WITH_LIGO) - ADD_SUBDIRECTORY(ai_build_wmap) + # Disabled because no server code in atys/yubo branch + #ADD_SUBDIRECTORY(ai_build_wmap) ENDIF() IF(WITH_3D) - ADD_SUBDIRECTORY(build_world_packed_col) + # Disabled because no server code in atys/yubo branch + #ADD_SUBDIRECTORY(build_world_packed_col) ENDIF() ENDIF() From 99ededcfcb020cc4d08be375f3d14dc1941819db Mon Sep 17 00:00:00 2001 From: Herrah Date: Sat, 5 Oct 2019 12:56:19 -0700 Subject: [PATCH 042/236] fix for error "cannot convert argument 1 from 'std::wstring' to 'LPCWSTR'" --HG-- branch : fix-WinVS2017_debug --- code/nel/src/misc/app_context.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/nel/src/misc/app_context.cpp b/code/nel/src/misc/app_context.cpp index a7381d026..c912cf7a4 100644 --- a/code/nel/src/misc/app_context.cpp +++ b/code/nel/src/misc/app_context.cpp @@ -135,7 +135,7 @@ CApplicationContext::~CApplicationContext() std::string message = toString("Instance '%s' still allocated at %p", it->first.c_str(), it->second); #ifdef NL_OS_WINDOWS - OutputDebugStringW(utf8ToWide(message)); + OutputDebugStringW(utf8ToWide(message).c_str()); #else printf("%s\n", message.c_str()); #endif From 99caf036ff4cefa670a963d26263e13f021e8a98 Mon Sep 17 00:00:00 2001 From: Ulu Kyn Date: Mon, 7 Oct 2019 12:45:26 +0200 Subject: [PATCH 043/236] Fixed: Revert Bad commit --HG-- branch : yubo --- .../src/interface_v3/action_handler_game.cpp | 40 ++++++++++++++++++- 1 file changed, 39 insertions(+), 1 deletion(-) diff --git a/code/ryzom/client/src/interface_v3/action_handler_game.cpp b/code/ryzom/client/src/interface_v3/action_handler_game.cpp index 10b1474bb..2d974c1cc 100644 --- a/code/ryzom/client/src/interface_v3/action_handler_game.cpp +++ b/code/ryzom/client/src/interface_v3/action_handler_game.cpp @@ -4650,7 +4650,45 @@ public: } }; REGISTER_ACTION_HANDLER( CHandlerSortTribeFame, "sort_tribefame"); -(??) + +// *************************************************************************** +class CHandlerOutgameNaviGetKeys : public IActionHandler +{ + virtual void execute (CCtrlBase *pCaller, const std::string &Params) + { + if (!pCaller->getParent()) + return; + + if (pCaller->getParent()->getId() != "ui:outgame") + return; + + if (Params.empty()) + { + sint32 event = -1; + + if (Driver->AsyncListener.isKeyPushed(KeyESCAPE)) event = 0; + if (Driver->AsyncListener.isKeyPushed(KeyDELETE)) event = 1; + if (Driver->AsyncListener.isKeyPushed(KeyRETURN)) event = 2; + if (Driver->AsyncListener.isKeyPushed(KeyDOWN)) event = 3; + if (Driver->AsyncListener.isKeyPushed(KeyUP)) event = 4; + if (Driver->AsyncListener.isKeyPushed(KeyI)) event = 5; + if (Driver->AsyncListener.isKeyPushed(KeyP)) event = 6; + if (Driver->AsyncListener.isKeyPushed(KeyE)) event = 7; + if (Driver->AsyncListener.isKeyPushed(KeyLEFT)) event = 8; + if (Driver->AsyncListener.isKeyPushed(KeyRIGHT)) event = 9; + + std::string id = "create"; + if (pCaller->getId() == "ui:outgame:charsel") + id = "sel"; + + if (event != -1) +- CLuaManager::getInstance().executeLuaScript(toString("outgame:eventChar%sKeyGet(%i)", id.c_str(), event)); + } + // reset previous input + Driver->AsyncListener.reset(); + } +}; +REGISTER_ACTION_HANDLER( CHandlerOutgameNaviGetKeys, "navigate_outgame" ); // *************************************************************************** class CHandlerTriggerIconBuffs : public IActionHandler From a9250a74f1140c08655d31cbe185a5e543e1e942 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Mon, 4 Nov 2019 09:50:24 +0800 Subject: [PATCH 044/236] Revert inappropriate changes from 29b38937a58ffd06ba64829a49f060ff7c9a2d0a --- code/nel/src/sound/driver/xaudio2/adpcm_xaudio2.cpp | 2 +- code/nel/src/sound/driver/xaudio2/adpcm_xaudio2.h | 2 +- code/nel/src/sound/driver/xaudio2/buffer_xaudio2.cpp | 2 +- code/nel/src/sound/driver/xaudio2/buffer_xaudio2.h | 2 +- code/nel/src/sound/driver/xaudio2/effect_xaudio2.cpp | 2 +- code/nel/src/sound/driver/xaudio2/effect_xaudio2.h | 2 +- code/nel/src/sound/driver/xaudio2/listener_xaudio2.cpp | 2 +- code/nel/src/sound/driver/xaudio2/listener_xaudio2.h | 2 +- code/nel/src/sound/driver/xaudio2/sound_driver_xaudio2.cpp | 2 +- code/nel/src/sound/driver/xaudio2/sound_driver_xaudio2.h | 2 +- code/nel/src/sound/driver/xaudio2/source_xaudio2.cpp | 2 +- code/nel/src/sound/driver/xaudio2/source_xaudio2.h | 2 +- code/nel/src/sound/driver/xaudio2/stdxaudio2.cpp | 2 +- code/nel/src/sound/driver/xaudio2/stdxaudio2.h | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/code/nel/src/sound/driver/xaudio2/adpcm_xaudio2.cpp b/code/nel/src/sound/driver/xaudio2/adpcm_xaudio2.cpp index e70fec076..733c93724 100644 --- a/code/nel/src/sound/driver/xaudio2/adpcm_xaudio2.cpp +++ b/code/nel/src/sound/driver/xaudio2/adpcm_xaudio2.cpp @@ -1,5 +1,5 @@ // NeL - MMORPG Framework -// Copyright (C) 2010 Winch Gate Property Limited +// Copyright (C) 2008 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 diff --git a/code/nel/src/sound/driver/xaudio2/adpcm_xaudio2.h b/code/nel/src/sound/driver/xaudio2/adpcm_xaudio2.h index 3b46d1b9a..6de5b99fc 100644 --- a/code/nel/src/sound/driver/xaudio2/adpcm_xaudio2.h +++ b/code/nel/src/sound/driver/xaudio2/adpcm_xaudio2.h @@ -1,5 +1,5 @@ // NeL - MMORPG Framework -// Copyright (C) 2010 Winch Gate Property Limited +// Copyright (C) 2008 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 diff --git a/code/nel/src/sound/driver/xaudio2/buffer_xaudio2.cpp b/code/nel/src/sound/driver/xaudio2/buffer_xaudio2.cpp index acdb95ab4..a15156f4c 100644 --- a/code/nel/src/sound/driver/xaudio2/buffer_xaudio2.cpp +++ b/code/nel/src/sound/driver/xaudio2/buffer_xaudio2.cpp @@ -1,5 +1,5 @@ // NeL - MMORPG Framework -// Copyright (C) 2010 Winch Gate Property Limited +// Copyright (C) 2008 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 diff --git a/code/nel/src/sound/driver/xaudio2/buffer_xaudio2.h b/code/nel/src/sound/driver/xaudio2/buffer_xaudio2.h index 0094494ed..63cf5d12c 100644 --- a/code/nel/src/sound/driver/xaudio2/buffer_xaudio2.h +++ b/code/nel/src/sound/driver/xaudio2/buffer_xaudio2.h @@ -1,5 +1,5 @@ // NeL - MMORPG Framework -// Copyright (C) 2010 Winch Gate Property Limited +// Copyright (C) 2008 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 diff --git a/code/nel/src/sound/driver/xaudio2/effect_xaudio2.cpp b/code/nel/src/sound/driver/xaudio2/effect_xaudio2.cpp index ac3814226..47f504860 100644 --- a/code/nel/src/sound/driver/xaudio2/effect_xaudio2.cpp +++ b/code/nel/src/sound/driver/xaudio2/effect_xaudio2.cpp @@ -1,5 +1,5 @@ // NeL - MMORPG Framework -// Copyright (C) 2010 Winch Gate Property Limited +// Copyright (C) 2008 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 diff --git a/code/nel/src/sound/driver/xaudio2/effect_xaudio2.h b/code/nel/src/sound/driver/xaudio2/effect_xaudio2.h index 97900b938..53b573ec5 100644 --- a/code/nel/src/sound/driver/xaudio2/effect_xaudio2.h +++ b/code/nel/src/sound/driver/xaudio2/effect_xaudio2.h @@ -1,5 +1,5 @@ // NeL - MMORPG Framework -// Copyright (C) 2010 Winch Gate Property Limited +// Copyright (C) 2008 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 diff --git a/code/nel/src/sound/driver/xaudio2/listener_xaudio2.cpp b/code/nel/src/sound/driver/xaudio2/listener_xaudio2.cpp index c6b364046..f689b8288 100644 --- a/code/nel/src/sound/driver/xaudio2/listener_xaudio2.cpp +++ b/code/nel/src/sound/driver/xaudio2/listener_xaudio2.cpp @@ -1,5 +1,5 @@ // NeL - MMORPG Framework -// Copyright (C) 2010 Winch Gate Property Limited +// Copyright (C) 2008 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 diff --git a/code/nel/src/sound/driver/xaudio2/listener_xaudio2.h b/code/nel/src/sound/driver/xaudio2/listener_xaudio2.h index 10a39ffe5..2a7d4f55f 100644 --- a/code/nel/src/sound/driver/xaudio2/listener_xaudio2.h +++ b/code/nel/src/sound/driver/xaudio2/listener_xaudio2.h @@ -1,5 +1,5 @@ // NeL - MMORPG Framework -// Copyright (C) 2010 Winch Gate Property Limited +// Copyright (C) 2008 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 diff --git a/code/nel/src/sound/driver/xaudio2/sound_driver_xaudio2.cpp b/code/nel/src/sound/driver/xaudio2/sound_driver_xaudio2.cpp index 992f6c66d..4901eca33 100644 --- a/code/nel/src/sound/driver/xaudio2/sound_driver_xaudio2.cpp +++ b/code/nel/src/sound/driver/xaudio2/sound_driver_xaudio2.cpp @@ -1,5 +1,5 @@ // NeL - MMORPG Framework -// Copyright (C) 2010 Winch Gate Property Limited +// Copyright (C) 2008 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 diff --git a/code/nel/src/sound/driver/xaudio2/sound_driver_xaudio2.h b/code/nel/src/sound/driver/xaudio2/sound_driver_xaudio2.h index e3c999b26..512e2f7d5 100644 --- a/code/nel/src/sound/driver/xaudio2/sound_driver_xaudio2.h +++ b/code/nel/src/sound/driver/xaudio2/sound_driver_xaudio2.h @@ -1,5 +1,5 @@ // NeL - MMORPG Framework -// Copyright (C) 2010 Winch Gate Property Limited +// Copyright (C) 2008 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 diff --git a/code/nel/src/sound/driver/xaudio2/source_xaudio2.cpp b/code/nel/src/sound/driver/xaudio2/source_xaudio2.cpp index 26566612c..4573143bb 100644 --- a/code/nel/src/sound/driver/xaudio2/source_xaudio2.cpp +++ b/code/nel/src/sound/driver/xaudio2/source_xaudio2.cpp @@ -1,5 +1,5 @@ // NeL - MMORPG Framework -// Copyright (C) 2010 Winch Gate Property Limited +// Copyright (C) 2008 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 diff --git a/code/nel/src/sound/driver/xaudio2/source_xaudio2.h b/code/nel/src/sound/driver/xaudio2/source_xaudio2.h index 4e50774b2..5c5c54a90 100644 --- a/code/nel/src/sound/driver/xaudio2/source_xaudio2.h +++ b/code/nel/src/sound/driver/xaudio2/source_xaudio2.h @@ -1,5 +1,5 @@ // NeL - MMORPG Framework -// Copyright (C) 2010 Winch Gate Property Limited +// Copyright (C) 2008 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 diff --git a/code/nel/src/sound/driver/xaudio2/stdxaudio2.cpp b/code/nel/src/sound/driver/xaudio2/stdxaudio2.cpp index 61c258c63..04045fb8d 100644 --- a/code/nel/src/sound/driver/xaudio2/stdxaudio2.cpp +++ b/code/nel/src/sound/driver/xaudio2/stdxaudio2.cpp @@ -1,5 +1,5 @@ // NeL - MMORPG Framework -// Copyright (C) 2010 Winch Gate Property Limited +// Copyright (C) 2008 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 diff --git a/code/nel/src/sound/driver/xaudio2/stdxaudio2.h b/code/nel/src/sound/driver/xaudio2/stdxaudio2.h index f6e55d0aa..6f858f259 100644 --- a/code/nel/src/sound/driver/xaudio2/stdxaudio2.h +++ b/code/nel/src/sound/driver/xaudio2/stdxaudio2.h @@ -1,5 +1,5 @@ // NeL - MMORPG Framework -// Copyright (C) 2010 Winch Gate Property Limited +// Copyright (C) 2008 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 From 1e1a4419e61f4a1ae0ed4a3b8ee8f33182cc2f43 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Wed, 6 Nov 2019 11:36:15 +0800 Subject: [PATCH 045/236] Revert. FMod is no longer supported --- code/nel/src/sound/driver/sound_driver.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/nel/src/sound/driver/sound_driver.cpp b/code/nel/src/sound/driver/sound_driver.cpp index 04a16509b..7eeaf9f57 100644 --- a/code/nel/src/sound/driver/sound_driver.cpp +++ b/code/nel/src/sound/driver/sound_driver.cpp @@ -200,7 +200,7 @@ ISoundDriver *ISoundDriver::createDriver(IStringMapperProvider *stringMapper, TD #if defined (NL_COMP_MINGW) dllName = "libnel_drv_xaudio2_win"; #elif defined (NL_OS_WINDOWS) - dllName = "nel_drv_fmod_win"; + dllName = "nel_drv_xaudio2_win"; #elif defined (NL_OS_UNIX) dllName = "nel_drv_openal"; #else From 344b41439b081365a1590ced8f5de8c375716fd6 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Fri, 8 Nov 2019 15:59:47 +0800 Subject: [PATCH 046/236] Add tool icons --- .../tools/3d/build_clod_bank/blue_pill.ico | Bin 0 -> 3638 bytes code/nel/tools/3d/build_clod_bank/main.rc | 42 ++++++++++++++++++ code/nel/tools/3d/build_clodtex/blue_pill.ico | Bin 0 -> 3638 bytes code/nel/tools/3d/build_clodtex/main.rc | 42 ++++++++++++++++++ .../tools/3d/build_coarse_mesh/blue_pill.ico | Bin 0 -> 3638 bytes code/nel/tools/3d/build_coarse_mesh/main.rc | 42 ++++++++++++++++++ .../nel/tools/3d/build_far_bank/blue_pill.ico | Bin 0 -> 3638 bytes code/nel/tools/3d/build_far_bank/main.rc | 42 ++++++++++++++++++ .../tools/3d/build_interface/blue_pill.ico | Bin 0 -> 3638 bytes code/nel/tools/3d/build_interface/main.rc | 42 ++++++++++++++++++ .../tools/3d/build_shadow_skin/blue_pill.ico | Bin 0 -> 3638 bytes code/nel/tools/3d/build_shadow_skin/main.rc | 42 ++++++++++++++++++ .../tools/3d/build_smallbank/blue_pill.ico | Bin 0 -> 3638 bytes code/nel/tools/3d/build_smallbank/main.rc | 42 ++++++++++++++++++ .../tools/pacs/build_ig_boxes/blue_pill.ico | Bin 0 -> 3638 bytes code/nel/tools/pacs/build_ig_boxes/main.rc | 42 ++++++++++++++++++ .../pacs/build_indoor_rbank/blue_pill.ico | Bin 0 -> 3638 bytes .../nel/tools/pacs/build_indoor_rbank/main.rc | 42 ++++++++++++++++++ code/nel/tools/pacs/build_rbank/blue_pill.ico | Bin 0 -> 3638 bytes code/nel/tools/pacs/build_rbank/main.rc | 42 ++++++++++++++++++ .../sound/build_samplebank/blue_pill.ico | Bin 0 -> 3638 bytes code/nel/tools/sound/build_samplebank/main.rc | 42 ++++++++++++++++++ .../nel/tools/sound/build_sound/blue_pill.ico | Bin 0 -> 3638 bytes code/nel/tools/sound/build_sound/main.rc | 42 ++++++++++++++++++ .../tools/sound/build_soundbank/blue_pill.ico | Bin 0 -> 3638 bytes code/nel/tools/sound/build_soundbank/main.rc | 42 ++++++++++++++++++ .../build_world_packed_col/blue_pill.ico | Bin 0 -> 3638 bytes .../server/build_world_packed_col/main.rc | 42 ++++++++++++++++++ 28 files changed, 588 insertions(+) create mode 100644 code/nel/tools/3d/build_clod_bank/blue_pill.ico create mode 100644 code/nel/tools/3d/build_clod_bank/main.rc create mode 100644 code/nel/tools/3d/build_clodtex/blue_pill.ico create mode 100644 code/nel/tools/3d/build_clodtex/main.rc create mode 100644 code/nel/tools/3d/build_coarse_mesh/blue_pill.ico create mode 100644 code/nel/tools/3d/build_coarse_mesh/main.rc create mode 100644 code/nel/tools/3d/build_far_bank/blue_pill.ico create mode 100644 code/nel/tools/3d/build_far_bank/main.rc create mode 100644 code/nel/tools/3d/build_interface/blue_pill.ico create mode 100644 code/nel/tools/3d/build_interface/main.rc create mode 100644 code/nel/tools/3d/build_shadow_skin/blue_pill.ico create mode 100644 code/nel/tools/3d/build_shadow_skin/main.rc create mode 100644 code/nel/tools/3d/build_smallbank/blue_pill.ico create mode 100644 code/nel/tools/3d/build_smallbank/main.rc create mode 100644 code/nel/tools/pacs/build_ig_boxes/blue_pill.ico create mode 100644 code/nel/tools/pacs/build_ig_boxes/main.rc create mode 100644 code/nel/tools/pacs/build_indoor_rbank/blue_pill.ico create mode 100644 code/nel/tools/pacs/build_indoor_rbank/main.rc create mode 100644 code/nel/tools/pacs/build_rbank/blue_pill.ico create mode 100644 code/nel/tools/pacs/build_rbank/main.rc create mode 100644 code/nel/tools/sound/build_samplebank/blue_pill.ico create mode 100644 code/nel/tools/sound/build_samplebank/main.rc create mode 100644 code/nel/tools/sound/build_sound/blue_pill.ico create mode 100644 code/nel/tools/sound/build_sound/main.rc create mode 100644 code/nel/tools/sound/build_soundbank/blue_pill.ico create mode 100644 code/nel/tools/sound/build_soundbank/main.rc create mode 100644 code/ryzom/tools/server/build_world_packed_col/blue_pill.ico create mode 100644 code/ryzom/tools/server/build_world_packed_col/main.rc diff --git a/code/nel/tools/3d/build_clod_bank/blue_pill.ico b/code/nel/tools/3d/build_clod_bank/blue_pill.ico new file mode 100644 index 0000000000000000000000000000000000000000..269907ec31f3583d18d593121b4728dae9ccc757 GIT binary patch literal 3638 zcmeH|KW`I35XIlz*|+!4@tuP&V32TSMHJ}}5<(;>N>9T#pol2k@BthN$t6vwT~I}I zY23!4jbsTaC50PYBD&BmGkbgXMJ5KNLg;?dYJEFzchegpmP6?(lMwARpH&Y;gfVLqQ@I-Nql zeuS%iU^E)x@+mMJ4ly2&ak6t`iYic5psK)sSpmu^{u^x?NEtv$4y7$7Ra9?m2-J+2 zSW)2CYIV<}*cTKzz7qstNRfQT3goyZZqH*kyPmJed&`;ajXiETCIjGzRu7XkiIuhT zTYR?5V~>aU@j8spvajm5yT(KH0eiQ2toW_~Tp8aLj}_1T_8i84 zzdp;o_xlSNAHH}3^!t5$evHbC*F8iPt13`c;NPo&wRSVD-j3+O67m*UCEYJWoy^kl zJW900%~uSXj5hzSCXa~$7!?1+$m^NE3_nu2&m>dN?MhLQt59(n4~R^ zyDISgAPBgRISeIvG#7B(3F1a$BQ|Z2WuVH6_hT z9Hg%0U+&NA!x>DgE$+W4uN-b!|2~DPntxLP?&*KzCkA>3Je&aP2ykV9-=#c?^$BZc Jtd%`~!!K}6&rARS literal 0 HcmV?d00001 diff --git a/code/nel/tools/3d/build_clod_bank/main.rc b/code/nel/tools/3d/build_clod_bank/main.rc new file mode 100644 index 000000000..2b6b7bd30 --- /dev/null +++ b/code/nel/tools/3d/build_clod_bank/main.rc @@ -0,0 +1,42 @@ +#include +#include "config.h" + +IDI_MAIN_ICON ICON DISCARDABLE "blue_pill.ico" + +#ifdef _DEBUG +#define NL_FILEEXT "_d" +#else +#define NL_FILEEXT "" +#endif + +VS_VERSION_INFO VERSIONINFO + FILEVERSION NL_VERSION_RC + PRODUCTVERSION NL_VERSION_RC + FILEFLAGSMASK VS_FFI_FILEFLAGSMASK +#ifdef _DEBUG + FILEFLAGS VS_FF_DEBUG +#else + FILEFLAGS 0x0L +#endif + FILEOS VOS_NT_WINDOWS32 + FILETYPE VFT_APP + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "CompanyName", AUTHOR + VALUE "FileDescription", "NeL Build Character LOD Bank" + VALUE "FileVersion", NL_VERSION + VALUE "LegalCopyright", COPYRIGHT + VALUE "OriginalFilename", "build_clod_bank" NL_FILEEXT ".exe" + VALUE "ProductName", "NeL Tools" + VALUE "ProductVersion", NL_PRODUCT_VERSION + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x9, 1200 + END +END diff --git a/code/nel/tools/3d/build_clodtex/blue_pill.ico b/code/nel/tools/3d/build_clodtex/blue_pill.ico new file mode 100644 index 0000000000000000000000000000000000000000..269907ec31f3583d18d593121b4728dae9ccc757 GIT binary patch literal 3638 zcmeH|KW`I35XIlz*|+!4@tuP&V32TSMHJ}}5<(;>N>9T#pol2k@BthN$t6vwT~I}I zY23!4jbsTaC50PYBD&BmGkbgXMJ5KNLg;?dYJEFzchegpmP6?(lMwARpH&Y;gfVLqQ@I-Nql zeuS%iU^E)x@+mMJ4ly2&ak6t`iYic5psK)sSpmu^{u^x?NEtv$4y7$7Ra9?m2-J+2 zSW)2CYIV<}*cTKzz7qstNRfQT3goyZZqH*kyPmJed&`;ajXiETCIjGzRu7XkiIuhT zTYR?5V~>aU@j8spvajm5yT(KH0eiQ2toW_~Tp8aLj}_1T_8i84 zzdp;o_xlSNAHH}3^!t5$evHbC*F8iPt13`c;NPo&wRSVD-j3+O67m*UCEYJWoy^kl zJW900%~uSXj5hzSCXa~$7!?1+$m^NE3_nu2&m>dN?MhLQt59(n4~R^ zyDISgAPBgRISeIvG#7B(3F1a$BQ|Z2WuVH6_hT z9Hg%0U+&NA!x>DgE$+W4uN-b!|2~DPntxLP?&*KzCkA>3Je&aP2ykV9-=#c?^$BZc Jtd%`~!!K}6&rARS literal 0 HcmV?d00001 diff --git a/code/nel/tools/3d/build_clodtex/main.rc b/code/nel/tools/3d/build_clodtex/main.rc new file mode 100644 index 000000000..1434c3363 --- /dev/null +++ b/code/nel/tools/3d/build_clodtex/main.rc @@ -0,0 +1,42 @@ +#include +#include "config.h" + +IDI_MAIN_ICON ICON DISCARDABLE "blue_pill.ico" + +#ifdef _DEBUG +#define NL_FILEEXT "_d" +#else +#define NL_FILEEXT "" +#endif + +VS_VERSION_INFO VERSIONINFO + FILEVERSION NL_VERSION_RC + PRODUCTVERSION NL_VERSION_RC + FILEFLAGSMASK VS_FFI_FILEFLAGSMASK +#ifdef _DEBUG + FILEFLAGS VS_FF_DEBUG +#else + FILEFLAGS 0x0L +#endif + FILEOS VOS_NT_WINDOWS32 + FILETYPE VFT_APP + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "CompanyName", AUTHOR + VALUE "FileDescription", "NeL Build Clodtext" + VALUE "FileVersion", NL_VERSION + VALUE "LegalCopyright", COPYRIGHT + VALUE "OriginalFilename", "build_clodtex" NL_FILEEXT ".exe" + VALUE "ProductName", "NeL Tools" + VALUE "ProductVersion", NL_PRODUCT_VERSION + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x9, 1200 + END +END diff --git a/code/nel/tools/3d/build_coarse_mesh/blue_pill.ico b/code/nel/tools/3d/build_coarse_mesh/blue_pill.ico new file mode 100644 index 0000000000000000000000000000000000000000..269907ec31f3583d18d593121b4728dae9ccc757 GIT binary patch literal 3638 zcmeH|KW`I35XIlz*|+!4@tuP&V32TSMHJ}}5<(;>N>9T#pol2k@BthN$t6vwT~I}I zY23!4jbsTaC50PYBD&BmGkbgXMJ5KNLg;?dYJEFzchegpmP6?(lMwARpH&Y;gfVLqQ@I-Nql zeuS%iU^E)x@+mMJ4ly2&ak6t`iYic5psK)sSpmu^{u^x?NEtv$4y7$7Ra9?m2-J+2 zSW)2CYIV<}*cTKzz7qstNRfQT3goyZZqH*kyPmJed&`;ajXiETCIjGzRu7XkiIuhT zTYR?5V~>aU@j8spvajm5yT(KH0eiQ2toW_~Tp8aLj}_1T_8i84 zzdp;o_xlSNAHH}3^!t5$evHbC*F8iPt13`c;NPo&wRSVD-j3+O67m*UCEYJWoy^kl zJW900%~uSXj5hzSCXa~$7!?1+$m^NE3_nu2&m>dN?MhLQt59(n4~R^ zyDISgAPBgRISeIvG#7B(3F1a$BQ|Z2WuVH6_hT z9Hg%0U+&NA!x>DgE$+W4uN-b!|2~DPntxLP?&*KzCkA>3Je&aP2ykV9-=#c?^$BZc Jtd%`~!!K}6&rARS literal 0 HcmV?d00001 diff --git a/code/nel/tools/3d/build_coarse_mesh/main.rc b/code/nel/tools/3d/build_coarse_mesh/main.rc new file mode 100644 index 000000000..746356a62 --- /dev/null +++ b/code/nel/tools/3d/build_coarse_mesh/main.rc @@ -0,0 +1,42 @@ +#include +#include "config.h" + +IDI_MAIN_ICON ICON DISCARDABLE "blue_pill.ico" + +#ifdef _DEBUG +#define NL_FILEEXT "_d" +#else +#define NL_FILEEXT "" +#endif + +VS_VERSION_INFO VERSIONINFO + FILEVERSION NL_VERSION_RC + PRODUCTVERSION NL_VERSION_RC + FILEFLAGSMASK VS_FFI_FILEFLAGSMASK +#ifdef _DEBUG + FILEFLAGS VS_FF_DEBUG +#else + FILEFLAGS 0x0L +#endif + FILEOS VOS_NT_WINDOWS32 + FILETYPE VFT_APP + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "CompanyName", AUTHOR + VALUE "FileDescription", "NeL Build Coarse Mesh" + VALUE "FileVersion", NL_VERSION + VALUE "LegalCopyright", COPYRIGHT + VALUE "OriginalFilename", "build_coarse_mesh" NL_FILEEXT ".exe" + VALUE "ProductName", "NeL Tools" + VALUE "ProductVersion", NL_PRODUCT_VERSION + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x9, 1200 + END +END diff --git a/code/nel/tools/3d/build_far_bank/blue_pill.ico b/code/nel/tools/3d/build_far_bank/blue_pill.ico new file mode 100644 index 0000000000000000000000000000000000000000..269907ec31f3583d18d593121b4728dae9ccc757 GIT binary patch literal 3638 zcmeH|KW`I35XIlz*|+!4@tuP&V32TSMHJ}}5<(;>N>9T#pol2k@BthN$t6vwT~I}I zY23!4jbsTaC50PYBD&BmGkbgXMJ5KNLg;?dYJEFzchegpmP6?(lMwARpH&Y;gfVLqQ@I-Nql zeuS%iU^E)x@+mMJ4ly2&ak6t`iYic5psK)sSpmu^{u^x?NEtv$4y7$7Ra9?m2-J+2 zSW)2CYIV<}*cTKzz7qstNRfQT3goyZZqH*kyPmJed&`;ajXiETCIjGzRu7XkiIuhT zTYR?5V~>aU@j8spvajm5yT(KH0eiQ2toW_~Tp8aLj}_1T_8i84 zzdp;o_xlSNAHH}3^!t5$evHbC*F8iPt13`c;NPo&wRSVD-j3+O67m*UCEYJWoy^kl zJW900%~uSXj5hzSCXa~$7!?1+$m^NE3_nu2&m>dN?MhLQt59(n4~R^ zyDISgAPBgRISeIvG#7B(3F1a$BQ|Z2WuVH6_hT z9Hg%0U+&NA!x>DgE$+W4uN-b!|2~DPntxLP?&*KzCkA>3Je&aP2ykV9-=#c?^$BZc Jtd%`~!!K}6&rARS literal 0 HcmV?d00001 diff --git a/code/nel/tools/3d/build_far_bank/main.rc b/code/nel/tools/3d/build_far_bank/main.rc new file mode 100644 index 000000000..b485d0b5e --- /dev/null +++ b/code/nel/tools/3d/build_far_bank/main.rc @@ -0,0 +1,42 @@ +#include +#include "config.h" + +IDI_MAIN_ICON ICON DISCARDABLE "blue_pill.ico" + +#ifdef _DEBUG +#define NL_FILEEXT "_d" +#else +#define NL_FILEEXT "" +#endif + +VS_VERSION_INFO VERSIONINFO + FILEVERSION NL_VERSION_RC + PRODUCTVERSION NL_VERSION_RC + FILEFLAGSMASK VS_FFI_FILEFLAGSMASK +#ifdef _DEBUG + FILEFLAGS VS_FF_DEBUG +#else + FILEFLAGS 0x0L +#endif + FILEOS VOS_NT_WINDOWS32 + FILETYPE VFT_APP + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "CompanyName", AUTHOR + VALUE "FileDescription", "NeL Build Far Bank" + VALUE "FileVersion", NL_VERSION + VALUE "LegalCopyright", COPYRIGHT + VALUE "OriginalFilename", "build_far_bank" NL_FILEEXT ".exe" + VALUE "ProductName", "NeL Tools" + VALUE "ProductVersion", NL_PRODUCT_VERSION + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x9, 1200 + END +END diff --git a/code/nel/tools/3d/build_interface/blue_pill.ico b/code/nel/tools/3d/build_interface/blue_pill.ico new file mode 100644 index 0000000000000000000000000000000000000000..269907ec31f3583d18d593121b4728dae9ccc757 GIT binary patch literal 3638 zcmeH|KW`I35XIlz*|+!4@tuP&V32TSMHJ}}5<(;>N>9T#pol2k@BthN$t6vwT~I}I zY23!4jbsTaC50PYBD&BmGkbgXMJ5KNLg;?dYJEFzchegpmP6?(lMwARpH&Y;gfVLqQ@I-Nql zeuS%iU^E)x@+mMJ4ly2&ak6t`iYic5psK)sSpmu^{u^x?NEtv$4y7$7Ra9?m2-J+2 zSW)2CYIV<}*cTKzz7qstNRfQT3goyZZqH*kyPmJed&`;ajXiETCIjGzRu7XkiIuhT zTYR?5V~>aU@j8spvajm5yT(KH0eiQ2toW_~Tp8aLj}_1T_8i84 zzdp;o_xlSNAHH}3^!t5$evHbC*F8iPt13`c;NPo&wRSVD-j3+O67m*UCEYJWoy^kl zJW900%~uSXj5hzSCXa~$7!?1+$m^NE3_nu2&m>dN?MhLQt59(n4~R^ zyDISgAPBgRISeIvG#7B(3F1a$BQ|Z2WuVH6_hT z9Hg%0U+&NA!x>DgE$+W4uN-b!|2~DPntxLP?&*KzCkA>3Je&aP2ykV9-=#c?^$BZc Jtd%`~!!K}6&rARS literal 0 HcmV?d00001 diff --git a/code/nel/tools/3d/build_interface/main.rc b/code/nel/tools/3d/build_interface/main.rc new file mode 100644 index 000000000..2f10d27ee --- /dev/null +++ b/code/nel/tools/3d/build_interface/main.rc @@ -0,0 +1,42 @@ +#include +#include "config.h" + +IDI_MAIN_ICON ICON DISCARDABLE "blue_pill.ico" + +#ifdef _DEBUG +#define NL_FILEEXT "_d" +#else +#define NL_FILEEXT "" +#endif + +VS_VERSION_INFO VERSIONINFO + FILEVERSION NL_VERSION_RC + PRODUCTVERSION NL_VERSION_RC + FILEFLAGSMASK VS_FFI_FILEFLAGSMASK +#ifdef _DEBUG + FILEFLAGS VS_FF_DEBUG +#else + FILEFLAGS 0x0L +#endif + FILEOS VOS_NT_WINDOWS32 + FILETYPE VFT_APP + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "CompanyName", AUTHOR + VALUE "FileDescription", "NeL Build Interface" + VALUE "FileVersion", NL_VERSION + VALUE "LegalCopyright", COPYRIGHT + VALUE "OriginalFilename", "build_interface" NL_FILEEXT ".exe" + VALUE "ProductName", "NeL Tools" + VALUE "ProductVersion", NL_PRODUCT_VERSION + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x9, 1200 + END +END diff --git a/code/nel/tools/3d/build_shadow_skin/blue_pill.ico b/code/nel/tools/3d/build_shadow_skin/blue_pill.ico new file mode 100644 index 0000000000000000000000000000000000000000..269907ec31f3583d18d593121b4728dae9ccc757 GIT binary patch literal 3638 zcmeH|KW`I35XIlz*|+!4@tuP&V32TSMHJ}}5<(;>N>9T#pol2k@BthN$t6vwT~I}I zY23!4jbsTaC50PYBD&BmGkbgXMJ5KNLg;?dYJEFzchegpmP6?(lMwARpH&Y;gfVLqQ@I-Nql zeuS%iU^E)x@+mMJ4ly2&ak6t`iYic5psK)sSpmu^{u^x?NEtv$4y7$7Ra9?m2-J+2 zSW)2CYIV<}*cTKzz7qstNRfQT3goyZZqH*kyPmJed&`;ajXiETCIjGzRu7XkiIuhT zTYR?5V~>aU@j8spvajm5yT(KH0eiQ2toW_~Tp8aLj}_1T_8i84 zzdp;o_xlSNAHH}3^!t5$evHbC*F8iPt13`c;NPo&wRSVD-j3+O67m*UCEYJWoy^kl zJW900%~uSXj5hzSCXa~$7!?1+$m^NE3_nu2&m>dN?MhLQt59(n4~R^ zyDISgAPBgRISeIvG#7B(3F1a$BQ|Z2WuVH6_hT z9Hg%0U+&NA!x>DgE$+W4uN-b!|2~DPntxLP?&*KzCkA>3Je&aP2ykV9-=#c?^$BZc Jtd%`~!!K}6&rARS literal 0 HcmV?d00001 diff --git a/code/nel/tools/3d/build_shadow_skin/main.rc b/code/nel/tools/3d/build_shadow_skin/main.rc new file mode 100644 index 000000000..ecd312f56 --- /dev/null +++ b/code/nel/tools/3d/build_shadow_skin/main.rc @@ -0,0 +1,42 @@ +#include +#include "config.h" + +IDI_MAIN_ICON ICON DISCARDABLE "blue_pill.ico" + +#ifdef _DEBUG +#define NL_FILEEXT "_d" +#else +#define NL_FILEEXT "" +#endif + +VS_VERSION_INFO VERSIONINFO + FILEVERSION NL_VERSION_RC + PRODUCTVERSION NL_VERSION_RC + FILEFLAGSMASK VS_FFI_FILEFLAGSMASK +#ifdef _DEBUG + FILEFLAGS VS_FF_DEBUG +#else + FILEFLAGS 0x0L +#endif + FILEOS VOS_NT_WINDOWS32 + FILETYPE VFT_APP + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "CompanyName", AUTHOR + VALUE "FileDescription", "NeL Build Shadow Skin" + VALUE "FileVersion", NL_VERSION + VALUE "LegalCopyright", COPYRIGHT + VALUE "OriginalFilename", "build_shadow_skin" NL_FILEEXT ".exe" + VALUE "ProductName", "NeL Tools" + VALUE "ProductVersion", NL_PRODUCT_VERSION + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x9, 1200 + END +END diff --git a/code/nel/tools/3d/build_smallbank/blue_pill.ico b/code/nel/tools/3d/build_smallbank/blue_pill.ico new file mode 100644 index 0000000000000000000000000000000000000000..269907ec31f3583d18d593121b4728dae9ccc757 GIT binary patch literal 3638 zcmeH|KW`I35XIlz*|+!4@tuP&V32TSMHJ}}5<(;>N>9T#pol2k@BthN$t6vwT~I}I zY23!4jbsTaC50PYBD&BmGkbgXMJ5KNLg;?dYJEFzchegpmP6?(lMwARpH&Y;gfVLqQ@I-Nql zeuS%iU^E)x@+mMJ4ly2&ak6t`iYic5psK)sSpmu^{u^x?NEtv$4y7$7Ra9?m2-J+2 zSW)2CYIV<}*cTKzz7qstNRfQT3goyZZqH*kyPmJed&`;ajXiETCIjGzRu7XkiIuhT zTYR?5V~>aU@j8spvajm5yT(KH0eiQ2toW_~Tp8aLj}_1T_8i84 zzdp;o_xlSNAHH}3^!t5$evHbC*F8iPt13`c;NPo&wRSVD-j3+O67m*UCEYJWoy^kl zJW900%~uSXj5hzSCXa~$7!?1+$m^NE3_nu2&m>dN?MhLQt59(n4~R^ zyDISgAPBgRISeIvG#7B(3F1a$BQ|Z2WuVH6_hT z9Hg%0U+&NA!x>DgE$+W4uN-b!|2~DPntxLP?&*KzCkA>3Je&aP2ykV9-=#c?^$BZc Jtd%`~!!K}6&rARS literal 0 HcmV?d00001 diff --git a/code/nel/tools/3d/build_smallbank/main.rc b/code/nel/tools/3d/build_smallbank/main.rc new file mode 100644 index 000000000..4a67a416b --- /dev/null +++ b/code/nel/tools/3d/build_smallbank/main.rc @@ -0,0 +1,42 @@ +#include +#include "config.h" + +IDI_MAIN_ICON ICON DISCARDABLE "blue_pill.ico" + +#ifdef _DEBUG +#define NL_FILEEXT "_d" +#else +#define NL_FILEEXT "" +#endif + +VS_VERSION_INFO VERSIONINFO + FILEVERSION NL_VERSION_RC + PRODUCTVERSION NL_VERSION_RC + FILEFLAGSMASK VS_FFI_FILEFLAGSMASK +#ifdef _DEBUG + FILEFLAGS VS_FF_DEBUG +#else + FILEFLAGS 0x0L +#endif + FILEOS VOS_NT_WINDOWS32 + FILETYPE VFT_APP + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "CompanyName", AUTHOR + VALUE "FileDescription", "NeL Build Smallbank" + VALUE "FileVersion", NL_VERSION + VALUE "LegalCopyright", COPYRIGHT + VALUE "OriginalFilename", "build_smallbank" NL_FILEEXT ".exe" + VALUE "ProductName", "NeL Tools" + VALUE "ProductVersion", NL_PRODUCT_VERSION + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x9, 1200 + END +END diff --git a/code/nel/tools/pacs/build_ig_boxes/blue_pill.ico b/code/nel/tools/pacs/build_ig_boxes/blue_pill.ico new file mode 100644 index 0000000000000000000000000000000000000000..269907ec31f3583d18d593121b4728dae9ccc757 GIT binary patch literal 3638 zcmeH|KW`I35XIlz*|+!4@tuP&V32TSMHJ}}5<(;>N>9T#pol2k@BthN$t6vwT~I}I zY23!4jbsTaC50PYBD&BmGkbgXMJ5KNLg;?dYJEFzchegpmP6?(lMwARpH&Y;gfVLqQ@I-Nql zeuS%iU^E)x@+mMJ4ly2&ak6t`iYic5psK)sSpmu^{u^x?NEtv$4y7$7Ra9?m2-J+2 zSW)2CYIV<}*cTKzz7qstNRfQT3goyZZqH*kyPmJed&`;ajXiETCIjGzRu7XkiIuhT zTYR?5V~>aU@j8spvajm5yT(KH0eiQ2toW_~Tp8aLj}_1T_8i84 zzdp;o_xlSNAHH}3^!t5$evHbC*F8iPt13`c;NPo&wRSVD-j3+O67m*UCEYJWoy^kl zJW900%~uSXj5hzSCXa~$7!?1+$m^NE3_nu2&m>dN?MhLQt59(n4~R^ zyDISgAPBgRISeIvG#7B(3F1a$BQ|Z2WuVH6_hT z9Hg%0U+&NA!x>DgE$+W4uN-b!|2~DPntxLP?&*KzCkA>3Je&aP2ykV9-=#c?^$BZc Jtd%`~!!K}6&rARS literal 0 HcmV?d00001 diff --git a/code/nel/tools/pacs/build_ig_boxes/main.rc b/code/nel/tools/pacs/build_ig_boxes/main.rc new file mode 100644 index 000000000..8aedfadd1 --- /dev/null +++ b/code/nel/tools/pacs/build_ig_boxes/main.rc @@ -0,0 +1,42 @@ +#include +#include "config.h" + +IDI_MAIN_ICON ICON DISCARDABLE "blue_pill.ico" + +#ifdef _DEBUG +#define NL_FILEEXT "_d" +#else +#define NL_FILEEXT "" +#endif + +VS_VERSION_INFO VERSIONINFO + FILEVERSION NL_VERSION_RC + PRODUCTVERSION NL_VERSION_RC + FILEFLAGSMASK VS_FFI_FILEFLAGSMASK +#ifdef _DEBUG + FILEFLAGS VS_FF_DEBUG +#else + FILEFLAGS 0x0L +#endif + FILEOS VOS_NT_WINDOWS32 + FILETYPE VFT_APP + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "CompanyName", AUTHOR + VALUE "FileDescription", "NeL Build IG Boxes" + VALUE "FileVersion", NL_VERSION + VALUE "LegalCopyright", COPYRIGHT + VALUE "OriginalFilename", "build_ig_boxes" NL_FILEEXT ".exe" + VALUE "ProductName", "NeL Tools" + VALUE "ProductVersion", NL_PRODUCT_VERSION + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x9, 1200 + END +END diff --git a/code/nel/tools/pacs/build_indoor_rbank/blue_pill.ico b/code/nel/tools/pacs/build_indoor_rbank/blue_pill.ico new file mode 100644 index 0000000000000000000000000000000000000000..269907ec31f3583d18d593121b4728dae9ccc757 GIT binary patch literal 3638 zcmeH|KW`I35XIlz*|+!4@tuP&V32TSMHJ}}5<(;>N>9T#pol2k@BthN$t6vwT~I}I zY23!4jbsTaC50PYBD&BmGkbgXMJ5KNLg;?dYJEFzchegpmP6?(lMwARpH&Y;gfVLqQ@I-Nql zeuS%iU^E)x@+mMJ4ly2&ak6t`iYic5psK)sSpmu^{u^x?NEtv$4y7$7Ra9?m2-J+2 zSW)2CYIV<}*cTKzz7qstNRfQT3goyZZqH*kyPmJed&`;ajXiETCIjGzRu7XkiIuhT zTYR?5V~>aU@j8spvajm5yT(KH0eiQ2toW_~Tp8aLj}_1T_8i84 zzdp;o_xlSNAHH}3^!t5$evHbC*F8iPt13`c;NPo&wRSVD-j3+O67m*UCEYJWoy^kl zJW900%~uSXj5hzSCXa~$7!?1+$m^NE3_nu2&m>dN?MhLQt59(n4~R^ zyDISgAPBgRISeIvG#7B(3F1a$BQ|Z2WuVH6_hT z9Hg%0U+&NA!x>DgE$+W4uN-b!|2~DPntxLP?&*KzCkA>3Je&aP2ykV9-=#c?^$BZc Jtd%`~!!K}6&rARS literal 0 HcmV?d00001 diff --git a/code/nel/tools/pacs/build_indoor_rbank/main.rc b/code/nel/tools/pacs/build_indoor_rbank/main.rc new file mode 100644 index 000000000..404cd516b --- /dev/null +++ b/code/nel/tools/pacs/build_indoor_rbank/main.rc @@ -0,0 +1,42 @@ +#include +#include "config.h" + +IDI_MAIN_ICON ICON DISCARDABLE "blue_pill.ico" + +#ifdef _DEBUG +#define NL_FILEEXT "_d" +#else +#define NL_FILEEXT "" +#endif + +VS_VERSION_INFO VERSIONINFO + FILEVERSION NL_VERSION_RC + PRODUCTVERSION NL_VERSION_RC + FILEFLAGSMASK VS_FFI_FILEFLAGSMASK +#ifdef _DEBUG + FILEFLAGS VS_FF_DEBUG +#else + FILEFLAGS 0x0L +#endif + FILEOS VOS_NT_WINDOWS32 + FILETYPE VFT_APP + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "CompanyName", AUTHOR + VALUE "FileDescription", "NeL Build Indoor RBank" + VALUE "FileVersion", NL_VERSION + VALUE "LegalCopyright", COPYRIGHT + VALUE "OriginalFilename", "build_indoor_rbank" NL_FILEEXT ".exe" + VALUE "ProductName", "NeL Tools" + VALUE "ProductVersion", NL_PRODUCT_VERSION + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x9, 1200 + END +END diff --git a/code/nel/tools/pacs/build_rbank/blue_pill.ico b/code/nel/tools/pacs/build_rbank/blue_pill.ico new file mode 100644 index 0000000000000000000000000000000000000000..269907ec31f3583d18d593121b4728dae9ccc757 GIT binary patch literal 3638 zcmeH|KW`I35XIlz*|+!4@tuP&V32TSMHJ}}5<(;>N>9T#pol2k@BthN$t6vwT~I}I zY23!4jbsTaC50PYBD&BmGkbgXMJ5KNLg;?dYJEFzchegpmP6?(lMwARpH&Y;gfVLqQ@I-Nql zeuS%iU^E)x@+mMJ4ly2&ak6t`iYic5psK)sSpmu^{u^x?NEtv$4y7$7Ra9?m2-J+2 zSW)2CYIV<}*cTKzz7qstNRfQT3goyZZqH*kyPmJed&`;ajXiETCIjGzRu7XkiIuhT zTYR?5V~>aU@j8spvajm5yT(KH0eiQ2toW_~Tp8aLj}_1T_8i84 zzdp;o_xlSNAHH}3^!t5$evHbC*F8iPt13`c;NPo&wRSVD-j3+O67m*UCEYJWoy^kl zJW900%~uSXj5hzSCXa~$7!?1+$m^NE3_nu2&m>dN?MhLQt59(n4~R^ zyDISgAPBgRISeIvG#7B(3F1a$BQ|Z2WuVH6_hT z9Hg%0U+&NA!x>DgE$+W4uN-b!|2~DPntxLP?&*KzCkA>3Je&aP2ykV9-=#c?^$BZc Jtd%`~!!K}6&rARS literal 0 HcmV?d00001 diff --git a/code/nel/tools/pacs/build_rbank/main.rc b/code/nel/tools/pacs/build_rbank/main.rc new file mode 100644 index 000000000..7e602c1d7 --- /dev/null +++ b/code/nel/tools/pacs/build_rbank/main.rc @@ -0,0 +1,42 @@ +#include +#include "config.h" + +IDI_MAIN_ICON ICON DISCARDABLE "blue_pill.ico" + +#ifdef _DEBUG +#define NL_FILEEXT "_d" +#else +#define NL_FILEEXT "" +#endif + +VS_VERSION_INFO VERSIONINFO + FILEVERSION NL_VERSION_RC + PRODUCTVERSION NL_VERSION_RC + FILEFLAGSMASK VS_FFI_FILEFLAGSMASK +#ifdef _DEBUG + FILEFLAGS VS_FF_DEBUG +#else + FILEFLAGS 0x0L +#endif + FILEOS VOS_NT_WINDOWS32 + FILETYPE VFT_APP + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "CompanyName", AUTHOR + VALUE "FileDescription", "NeL Build RBank" + VALUE "FileVersion", NL_VERSION + VALUE "LegalCopyright", COPYRIGHT + VALUE "OriginalFilename", "build_rbank" NL_FILEEXT ".exe" + VALUE "ProductName", "NeL Tools" + VALUE "ProductVersion", NL_PRODUCT_VERSION + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x9, 1200 + END +END diff --git a/code/nel/tools/sound/build_samplebank/blue_pill.ico b/code/nel/tools/sound/build_samplebank/blue_pill.ico new file mode 100644 index 0000000000000000000000000000000000000000..269907ec31f3583d18d593121b4728dae9ccc757 GIT binary patch literal 3638 zcmeH|KW`I35XIlz*|+!4@tuP&V32TSMHJ}}5<(;>N>9T#pol2k@BthN$t6vwT~I}I zY23!4jbsTaC50PYBD&BmGkbgXMJ5KNLg;?dYJEFzchegpmP6?(lMwARpH&Y;gfVLqQ@I-Nql zeuS%iU^E)x@+mMJ4ly2&ak6t`iYic5psK)sSpmu^{u^x?NEtv$4y7$7Ra9?m2-J+2 zSW)2CYIV<}*cTKzz7qstNRfQT3goyZZqH*kyPmJed&`;ajXiETCIjGzRu7XkiIuhT zTYR?5V~>aU@j8spvajm5yT(KH0eiQ2toW_~Tp8aLj}_1T_8i84 zzdp;o_xlSNAHH}3^!t5$evHbC*F8iPt13`c;NPo&wRSVD-j3+O67m*UCEYJWoy^kl zJW900%~uSXj5hzSCXa~$7!?1+$m^NE3_nu2&m>dN?MhLQt59(n4~R^ zyDISgAPBgRISeIvG#7B(3F1a$BQ|Z2WuVH6_hT z9Hg%0U+&NA!x>DgE$+W4uN-b!|2~DPntxLP?&*KzCkA>3Je&aP2ykV9-=#c?^$BZc Jtd%`~!!K}6&rARS literal 0 HcmV?d00001 diff --git a/code/nel/tools/sound/build_samplebank/main.rc b/code/nel/tools/sound/build_samplebank/main.rc new file mode 100644 index 000000000..cd661786c --- /dev/null +++ b/code/nel/tools/sound/build_samplebank/main.rc @@ -0,0 +1,42 @@ +#include +#include "config.h" + +IDI_MAIN_ICON ICON DISCARDABLE "blue_pill.ico" + +#ifdef _DEBUG +#define NL_FILEEXT "_d" +#else +#define NL_FILEEXT "" +#endif + +VS_VERSION_INFO VERSIONINFO + FILEVERSION NL_VERSION_RC + PRODUCTVERSION NL_VERSION_RC + FILEFLAGSMASK VS_FFI_FILEFLAGSMASK +#ifdef _DEBUG + FILEFLAGS VS_FF_DEBUG +#else + FILEFLAGS 0x0L +#endif + FILEOS VOS_NT_WINDOWS32 + FILETYPE VFT_APP + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "CompanyName", AUTHOR + VALUE "FileDescription", "NeL Build Samplebank" + VALUE "FileVersion", NL_VERSION + VALUE "LegalCopyright", COPYRIGHT + VALUE "OriginalFilename", "build_samplebank" NL_FILEEXT ".exe" + VALUE "ProductName", "NeL Tools" + VALUE "ProductVersion", NL_PRODUCT_VERSION + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x9, 1200 + END +END diff --git a/code/nel/tools/sound/build_sound/blue_pill.ico b/code/nel/tools/sound/build_sound/blue_pill.ico new file mode 100644 index 0000000000000000000000000000000000000000..269907ec31f3583d18d593121b4728dae9ccc757 GIT binary patch literal 3638 zcmeH|KW`I35XIlz*|+!4@tuP&V32TSMHJ}}5<(;>N>9T#pol2k@BthN$t6vwT~I}I zY23!4jbsTaC50PYBD&BmGkbgXMJ5KNLg;?dYJEFzchegpmP6?(lMwARpH&Y;gfVLqQ@I-Nql zeuS%iU^E)x@+mMJ4ly2&ak6t`iYic5psK)sSpmu^{u^x?NEtv$4y7$7Ra9?m2-J+2 zSW)2CYIV<}*cTKzz7qstNRfQT3goyZZqH*kyPmJed&`;ajXiETCIjGzRu7XkiIuhT zTYR?5V~>aU@j8spvajm5yT(KH0eiQ2toW_~Tp8aLj}_1T_8i84 zzdp;o_xlSNAHH}3^!t5$evHbC*F8iPt13`c;NPo&wRSVD-j3+O67m*UCEYJWoy^kl zJW900%~uSXj5hzSCXa~$7!?1+$m^NE3_nu2&m>dN?MhLQt59(n4~R^ zyDISgAPBgRISeIvG#7B(3F1a$BQ|Z2WuVH6_hT z9Hg%0U+&NA!x>DgE$+W4uN-b!|2~DPntxLP?&*KzCkA>3Je&aP2ykV9-=#c?^$BZc Jtd%`~!!K}6&rARS literal 0 HcmV?d00001 diff --git a/code/nel/tools/sound/build_sound/main.rc b/code/nel/tools/sound/build_sound/main.rc new file mode 100644 index 000000000..b4626ddcc --- /dev/null +++ b/code/nel/tools/sound/build_sound/main.rc @@ -0,0 +1,42 @@ +#include +#include "config.h" + +IDI_MAIN_ICON ICON DISCARDABLE "blue_pill.ico" + +#ifdef _DEBUG +#define NL_FILEEXT "_d" +#else +#define NL_FILEEXT "" +#endif + +VS_VERSION_INFO VERSIONINFO + FILEVERSION NL_VERSION_RC + PRODUCTVERSION NL_VERSION_RC + FILEFLAGSMASK VS_FFI_FILEFLAGSMASK +#ifdef _DEBUG + FILEFLAGS VS_FF_DEBUG +#else + FILEFLAGS 0x0L +#endif + FILEOS VOS_NT_WINDOWS32 + FILETYPE VFT_APP + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "CompanyName", AUTHOR + VALUE "FileDescription", "NeL Build Sound" + VALUE "FileVersion", NL_VERSION + VALUE "LegalCopyright", COPYRIGHT + VALUE "OriginalFilename", "build_sound" NL_FILEEXT ".exe" + VALUE "ProductName", "NeL Tools" + VALUE "ProductVersion", NL_PRODUCT_VERSION + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x9, 1200 + END +END diff --git a/code/nel/tools/sound/build_soundbank/blue_pill.ico b/code/nel/tools/sound/build_soundbank/blue_pill.ico new file mode 100644 index 0000000000000000000000000000000000000000..269907ec31f3583d18d593121b4728dae9ccc757 GIT binary patch literal 3638 zcmeH|KW`I35XIlz*|+!4@tuP&V32TSMHJ}}5<(;>N>9T#pol2k@BthN$t6vwT~I}I zY23!4jbsTaC50PYBD&BmGkbgXMJ5KNLg;?dYJEFzchegpmP6?(lMwARpH&Y;gfVLqQ@I-Nql zeuS%iU^E)x@+mMJ4ly2&ak6t`iYic5psK)sSpmu^{u^x?NEtv$4y7$7Ra9?m2-J+2 zSW)2CYIV<}*cTKzz7qstNRfQT3goyZZqH*kyPmJed&`;ajXiETCIjGzRu7XkiIuhT zTYR?5V~>aU@j8spvajm5yT(KH0eiQ2toW_~Tp8aLj}_1T_8i84 zzdp;o_xlSNAHH}3^!t5$evHbC*F8iPt13`c;NPo&wRSVD-j3+O67m*UCEYJWoy^kl zJW900%~uSXj5hzSCXa~$7!?1+$m^NE3_nu2&m>dN?MhLQt59(n4~R^ zyDISgAPBgRISeIvG#7B(3F1a$BQ|Z2WuVH6_hT z9Hg%0U+&NA!x>DgE$+W4uN-b!|2~DPntxLP?&*KzCkA>3Je&aP2ykV9-=#c?^$BZc Jtd%`~!!K}6&rARS literal 0 HcmV?d00001 diff --git a/code/nel/tools/sound/build_soundbank/main.rc b/code/nel/tools/sound/build_soundbank/main.rc new file mode 100644 index 000000000..159bc3fd1 --- /dev/null +++ b/code/nel/tools/sound/build_soundbank/main.rc @@ -0,0 +1,42 @@ +#include +#include "config.h" + +IDI_MAIN_ICON ICON DISCARDABLE "blue_pill.ico" + +#ifdef _DEBUG +#define NL_FILEEXT "_d" +#else +#define NL_FILEEXT "" +#endif + +VS_VERSION_INFO VERSIONINFO + FILEVERSION NL_VERSION_RC + PRODUCTVERSION NL_VERSION_RC + FILEFLAGSMASK VS_FFI_FILEFLAGSMASK +#ifdef _DEBUG + FILEFLAGS VS_FF_DEBUG +#else + FILEFLAGS 0x0L +#endif + FILEOS VOS_NT_WINDOWS32 + FILETYPE VFT_APP + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "CompanyName", AUTHOR + VALUE "FileDescription", "NeL Build Soundbank" + VALUE "FileVersion", NL_VERSION + VALUE "LegalCopyright", COPYRIGHT + VALUE "OriginalFilename", "build_soundbank" NL_FILEEXT ".exe" + VALUE "ProductName", "NeL Tools" + VALUE "ProductVersion", NL_PRODUCT_VERSION + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x9, 1200 + END +END diff --git a/code/ryzom/tools/server/build_world_packed_col/blue_pill.ico b/code/ryzom/tools/server/build_world_packed_col/blue_pill.ico new file mode 100644 index 0000000000000000000000000000000000000000..269907ec31f3583d18d593121b4728dae9ccc757 GIT binary patch literal 3638 zcmeH|KW`I35XIlz*|+!4@tuP&V32TSMHJ}}5<(;>N>9T#pol2k@BthN$t6vwT~I}I zY23!4jbsTaC50PYBD&BmGkbgXMJ5KNLg;?dYJEFzchegpmP6?(lMwARpH&Y;gfVLqQ@I-Nql zeuS%iU^E)x@+mMJ4ly2&ak6t`iYic5psK)sSpmu^{u^x?NEtv$4y7$7Ra9?m2-J+2 zSW)2CYIV<}*cTKzz7qstNRfQT3goyZZqH*kyPmJed&`;ajXiETCIjGzRu7XkiIuhT zTYR?5V~>aU@j8spvajm5yT(KH0eiQ2toW_~Tp8aLj}_1T_8i84 zzdp;o_xlSNAHH}3^!t5$evHbC*F8iPt13`c;NPo&wRSVD-j3+O67m*UCEYJWoy^kl zJW900%~uSXj5hzSCXa~$7!?1+$m^NE3_nu2&m>dN?MhLQt59(n4~R^ zyDISgAPBgRISeIvG#7B(3F1a$BQ|Z2WuVH6_hT z9Hg%0U+&NA!x>DgE$+W4uN-b!|2~DPntxLP?&*KzCkA>3Je&aP2ykV9-=#c?^$BZc Jtd%`~!!K}6&rARS literal 0 HcmV?d00001 diff --git a/code/ryzom/tools/server/build_world_packed_col/main.rc b/code/ryzom/tools/server/build_world_packed_col/main.rc new file mode 100644 index 000000000..38046dc1f --- /dev/null +++ b/code/ryzom/tools/server/build_world_packed_col/main.rc @@ -0,0 +1,42 @@ +#include +#include "config.h" + +IDI_MAIN_ICON ICON DISCARDABLE "blue_pill.ico" + +#ifdef _DEBUG +#define NL_FILEEXT "_d" +#else +#define NL_FILEEXT "" +#endif + +VS_VERSION_INFO VERSIONINFO + FILEVERSION NL_VERSION_RC + PRODUCTVERSION NL_VERSION_RC + FILEFLAGSMASK VS_FFI_FILEFLAGSMASK +#ifdef _DEBUG + FILEFLAGS VS_FF_DEBUG +#else + FILEFLAGS 0x0L +#endif + FILEOS VOS_NT_WINDOWS32 + FILETYPE VFT_APP + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "CompanyName", AUTHOR + VALUE "FileDescription", "Ryzom Build World Packed Collisions" + VALUE "FileVersion", NL_VERSION + VALUE "LegalCopyright", COPYRIGHT + VALUE "OriginalFilename", "build_world_packed_col" NL_FILEEXT ".exe" + VALUE "ProductName", "Ryzom Tools" + VALUE "ProductVersion", NL_PRODUCT_VERSION + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x9, 1200 + END +END From a138c727b76ee1744e8573bd8d6801675aec59de Mon Sep 17 00:00:00 2001 From: kaetemi Date: Sat, 9 Nov 2019 20:05:22 +0800 Subject: [PATCH 047/236] Fix build with MariaDB connector --- code/nelns/admin_service/admin_service.cpp | 2 ++ code/nelns/login_service/mysql_helper.cpp | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/code/nelns/admin_service/admin_service.cpp b/code/nelns/admin_service/admin_service.cpp index 6d75b6aac..6b964f562 100644 --- a/code/nelns/admin_service/admin_service.cpp +++ b/code/nelns/admin_service/admin_service.cpp @@ -38,7 +38,9 @@ typedef unsigned long ulong; #endif #include +#ifndef LIBMARIADB #include +#endif #include "nel/misc/debug.h" #include "nel/misc/config_file.h" diff --git a/code/nelns/login_service/mysql_helper.cpp b/code/nelns/login_service/mysql_helper.cpp index 5ae04e8b5..e27960770 100644 --- a/code/nelns/login_service/mysql_helper.cpp +++ b/code/nelns/login_service/mysql_helper.cpp @@ -20,7 +20,9 @@ #include "mysql_helper.h" -#include "mysql_version.h" +#ifndef LIBMARIADB +#include +#endif // From 4c74d1393170efafc55c2f3316cfa72f05cdbbfb Mon Sep 17 00:00:00 2001 From: kaetemi Date: Mon, 11 Nov 2019 13:35:30 +0800 Subject: [PATCH 048/236] Fix bitbucket/ryzomcore/#340, #341,#342 --- .../src/interface_v3/inventory_manager.cpp | 2 +- .../client/src/interface_v3/lua_ihm_ryzom.cpp | 46 +++++++++---------- code/ryzom/client/src/user_entity.cpp | 6 +-- 3 files changed, 27 insertions(+), 27 deletions(-) diff --git a/code/ryzom/client/src/interface_v3/inventory_manager.cpp b/code/ryzom/client/src/interface_v3/inventory_manager.cpp index 78966338a..996f91514 100644 --- a/code/ryzom/client/src/interface_v3/inventory_manager.cpp +++ b/code/ryzom/client/src/interface_v3/inventory_manager.cpp @@ -286,7 +286,7 @@ void CItemInfoCache::debugItemInfoCache() const { nlinfo("ItemInfoCache: %d entries", _ItemInfoCacheMap.size()); uint count = 0; - for (auto it = _ItemInfoCacheMap.begin(); it != _ItemInfoCacheMap.end(); ++it) + for (TItemInfoCacheMap::const_iterator it = _ItemInfoCacheMap.begin(); it != _ItemInfoCacheMap.end(); ++it) { uint32 serial = (it->first >> 32) & 0xFFFFFFFF; uint32 created = it->first & 0xFFFFFFFF; diff --git a/code/ryzom/client/src/interface_v3/lua_ihm_ryzom.cpp b/code/ryzom/client/src/interface_v3/lua_ihm_ryzom.cpp index 789e33618..824db6ade 100644 --- a/code/ryzom/client/src/interface_v3/lua_ihm_ryzom.cpp +++ b/code/ryzom/client/src/interface_v3/lua_ihm_ryzom.cpp @@ -4240,30 +4240,30 @@ int CLuaIHMRyzom::displayChatMessage(CLuaState &ls) if (ls.type(2) == LUA_TSTRING) { std::string input = toLower(ls.toString(2)); - std::unordered_map sParam; - // input should match chat_group_filter sParam - sParam.insert(make_pair(string("around"), string(dbPath+":SAY"))); - sParam.insert(make_pair(string("region"), string(dbPath+":REGION"))); - sParam.insert(make_pair(string("guild"), string(dbPath+":CLADE"))); - sParam.insert(make_pair(string("team"), string(dbPath+":GROUP"))); - sParam.insert(make_pair(string("universe"), string(dbPath+":UNIVERSE_NEW"))); - for (const auto& db : sParam) + if (input == "around") { - if (db.first.c_str() == input) - { - prop.readRGBA(db.second.c_str(), " "); - if (input == "around") - ci.AroundMe.displayMessage(ucstring(msg), prop.getRGBA()); - if (input == "region") - ci.Region.displayMessage(ucstring(msg), prop.getRGBA()); - if (input == "universe") - ci.Universe.displayMessage(ucstring(msg), prop.getRGBA()); - if (input == "guild") - ci.Guild.displayMessage(ucstring(msg), prop.getRGBA()); - if (input == "team") - ci.Team.displayMessage(ucstring(msg), prop.getRGBA()); - break; - } + prop.readRGBA(std::string(dbPath + ":SAY").c_str(), " "); + ci.AroundMe.displayMessage(ucstring(msg), prop.getRGBA()); + } + else if (input == "region") + { + prop.readRGBA(std::string(dbPath + ":REGION").c_str(), " "); + ci.Region.displayMessage(ucstring(msg), prop.getRGBA()); + } + else if (input == "universe") + { + prop.readRGBA(std::string(dbPath + ":UNIVERSE_NEW").c_str(), " "); + ci.Universe.displayMessage(ucstring(msg), prop.getRGBA()); + } + else if (input == "guild") + { + prop.readRGBA(std::string(dbPath + ":CLADE").c_str(), " "); + ci.Guild.displayMessage(ucstring(msg), prop.getRGBA()); + } + else if (input == "team") + { + prop.readRGBA(std::string(dbPath + ":GROUP").c_str(), " "); + ci.Team.displayMessage(ucstring(msg), prop.getRGBA()); } } if (ls.type(2) == LUA_TNUMBER) diff --git a/code/ryzom/client/src/user_entity.cpp b/code/ryzom/client/src/user_entity.cpp index fd1670da0..395d5b698 100644 --- a/code/ryzom/client/src/user_entity.cpp +++ b/code/ryzom/client/src/user_entity.cpp @@ -3108,9 +3108,9 @@ void CUserEntity::rollDice(sint16 min, sint16 max, bool local) sint16 roll = min + (sint16)dice->rand(max-min); ucstring msg = CI18N::get("msgRollDiceLocal"); - strFindReplace(msg, "%min", std::to_string(min)); - strFindReplace(msg, "%max", std::to_string(max)); - strFindReplace(msg, "%roll", std::to_string(roll)); + strFindReplace(msg, "%min", toString(min)); + strFindReplace(msg, "%max", toString(max)); + strFindReplace(msg, "%roll", toString(roll)); CInterfaceManager *pIM= CInterfaceManager::getInstance(); From 84ff3391c3eab6978b7d8c6716b68b4044882ffa Mon Sep 17 00:00:00 2001 From: Nimetu Date: Mon, 11 Nov 2019 22:15:18 +0200 Subject: [PATCH 049/236] Fixed: Compiler warnings, issue #339 --HG-- branch : develop --- code/nel/include/nel/gui/css_style.h | 8 ++++---- code/nel/include/nel/gui/css_types.h | 16 +++++++++++++--- code/nel/src/gui/css_border_renderer.cpp | 18 +++++++++--------- code/nel/src/gui/css_style.cpp | 10 +++++----- code/nel/src/gui/group_html.cpp | 12 ++++++------ code/nel/src/gui/html_element.cpp | 4 ++-- 6 files changed, 39 insertions(+), 29 deletions(-) diff --git a/code/nel/include/nel/gui/css_style.h b/code/nel/include/nel/gui/css_style.h index d972940e1..5521818a4 100644 --- a/code/nel/include/nel/gui/css_style.h +++ b/code/nel/include/nel/gui/css_style.h @@ -66,8 +66,8 @@ namespace NLGUI MaxWidth=-1; MaxHeight=-1; // border style - BorderTopWidth = BorderRightWidth = BorderBottomWidth = BorderLeftWidth = CSSLineWidth::MEDIUM; - BorderTopStyle = BorderRightStyle = BorderBottomStyle = BorderLeftStyle = CSSLineStyle::NONE; + BorderTopWidth = BorderRightWidth = BorderBottomWidth = BorderLeftWidth = CSS_LINE_WIDTH_MEDIUM; + BorderTopStyle = BorderRightStyle = BorderBottomStyle = BorderLeftStyle = CSS_LINE_STYLE_NONE; BorderTopColor = BorderRightColor = BorderBottomColor = BorderLeftColor = NLMISC::CRGBA::Transparent; // background BackgroundColor=NLMISC::CRGBA::Black; @@ -215,8 +215,8 @@ namespace NLGUI Current.MaxWidth=-1; Current.MaxHeight=-1; - Current.BorderTopWidth = Current.BorderRightWidth = Current.BorderBottomWidth = Current.BorderLeftWidth = CSSLineWidth::MEDIUM; - Current.BorderTopStyle = Current.BorderRightStyle = Current.BorderBottomStyle = Current.BorderLeftStyle = CSSLineStyle::NONE; + Current.BorderTopWidth = Current.BorderRightWidth = Current.BorderBottomWidth = Current.BorderLeftWidth = CSS_LINE_WIDTH_MEDIUM; + Current.BorderTopStyle = Current.BorderRightStyle = Current.BorderBottomStyle = Current.BorderLeftStyle = CSS_LINE_STYLE_NONE; Current.BorderTopColor = Current.BorderRightColor = Current.BorderBottomColor = Current.BorderLeftColor = Current.TextColor; Current.PaddingTop = Current.PaddingRight = Current.PaddingBottom = Current.PaddingLeft = 0; diff --git a/code/nel/include/nel/gui/css_types.h b/code/nel/include/nel/gui/css_types.h index aa673a63e..9dd41de36 100644 --- a/code/nel/include/nel/gui/css_types.h +++ b/code/nel/include/nel/gui/css_types.h @@ -26,11 +26,21 @@ namespace NLGUI * \date 2019-09-03 10:50 GMT * \author Meelis Mägi (Nimetu) */ - // ie. border-style - enum CSSLineStyle { NONE = 0, HIDDEN, SOLID, INSET, OUTSET }; + enum CSSLineStyle { + CSS_LINE_STYLE_NONE = 0, + CSS_LINE_STYLE_HIDDEN, + CSS_LINE_STYLE_SOLID, + CSS_LINE_STYLE_INSET, + CSS_LINE_STYLE_OUTSET + }; + // ie, border-width (px) - enum CSSLineWidth { THIN = 1, MEDIUM = 3, THICK = 5 }; + enum CSSLineWidth { + CSS_LINE_WIDTH_THIN = 1, + CSS_LINE_WIDTH_MEDIUM = 3, + CSS_LINE_WIDTH_THICK = 5 + }; }//namespace diff --git a/code/nel/src/gui/css_border_renderer.cpp b/code/nel/src/gui/css_border_renderer.cpp index fd3ad569f..a7002cd9a 100644 --- a/code/nel/src/gui/css_border_renderer.cpp +++ b/code/nel/src/gui/css_border_renderer.cpp @@ -36,7 +36,7 @@ namespace NLGUI { TopWidth = RightWidth = BottomWidth = LeftWidth = 0; TopColor = RightColor = BottomColor = LeftColor = CRGBA(128, 128, 128, 255); - TopStyle = RightStyle = BottomStyle = LeftStyle = CSSLineStyle::SOLID; + TopStyle = RightStyle = BottomStyle = LeftStyle = CSS_LINE_STYLE_SOLID; CurrentAlpha = 255; _RenderLayer = 0; @@ -127,7 +127,7 @@ namespace NLGUI // ---------------------------------------------------------------------------- uint32 CSSBorderRenderer::getTopWidth() const { - if (TopStyle == CSSLineStyle::NONE || TopStyle == CSSLineStyle::HIDDEN) + if (TopStyle == CSS_LINE_STYLE_NONE || TopStyle == CSS_LINE_STYLE_HIDDEN) return 0; return TopWidth; @@ -136,7 +136,7 @@ namespace NLGUI // ---------------------------------------------------------------------------- uint32 CSSBorderRenderer::getRightWidth() const { - if (RightStyle == CSSLineStyle::NONE || RightStyle == CSSLineStyle::HIDDEN) + if (RightStyle == CSS_LINE_STYLE_NONE || RightStyle == CSS_LINE_STYLE_HIDDEN) return 0; return RightWidth; @@ -145,7 +145,7 @@ namespace NLGUI // ---------------------------------------------------------------------------- uint32 CSSBorderRenderer::getBottomWidth() const { - if (BottomStyle == CSSLineStyle::NONE || BottomStyle == CSSLineStyle::HIDDEN) + if (BottomStyle == CSS_LINE_STYLE_NONE || BottomStyle == CSS_LINE_STYLE_HIDDEN) return 0; return BottomWidth; @@ -154,7 +154,7 @@ namespace NLGUI // ---------------------------------------------------------------------------- uint32 CSSBorderRenderer::getLeftWidth() const { - if (LeftStyle == CSSLineStyle::NONE || LeftStyle == CSSLineStyle::HIDDEN) + if (LeftStyle == CSS_LINE_STYLE_NONE || LeftStyle == CSS_LINE_STYLE_HIDDEN) return 0; return LeftWidth; @@ -269,7 +269,7 @@ namespace NLGUI if (_BorderTop) { CRGBA borderColorT = TopColor; - if (TopStyle == CSSLineStyle::INSET) + if (TopStyle == CSS_LINE_STYLE_INSET) borderColorT = blend(borderColorT, CRGBA::Black, 0.5f); if (_ModulateGlobalColor) @@ -281,7 +281,7 @@ namespace NLGUI if (_BorderRight) { CRGBA borderColorR = RightColor; - if (RightStyle == CSSLineStyle::OUTSET) + if (RightStyle == CSS_LINE_STYLE_OUTSET) borderColorR = blend(borderColorR, CRGBA::Black, 0.5f); if (_ModulateGlobalColor) @@ -293,7 +293,7 @@ namespace NLGUI if (_BorderBottom) { CRGBA borderColorB = BottomColor; - if (BottomStyle == CSSLineStyle::OUTSET) + if (BottomStyle == CSS_LINE_STYLE_OUTSET) borderColorB = blend(borderColorB, CRGBA::Black, 0.5f); if (_ModulateGlobalColor) @@ -305,7 +305,7 @@ namespace NLGUI if (_BorderLeft) { CRGBA borderColorL = LeftColor; - if (LeftStyle == CSSLineStyle::INSET) + if (LeftStyle == CSS_LINE_STYLE_INSET) borderColorL = blend(borderColorL, CRGBA::Black, 0.5f); if (_ModulateGlobalColor) diff --git a/code/nel/src/gui/css_style.cpp b/code/nel/src/gui/css_style.cpp index fe2dab4fd..396bff062 100644 --- a/code/nel/src/gui/css_style.cpp +++ b/code/nel/src/gui/css_style.cpp @@ -557,15 +557,15 @@ namespace NLGUI if (value == "inherit") *dest = currentStyle; else if (value == "none") - *dest = CSSLineStyle::NONE; + *dest = CSS_LINE_STYLE_NONE; else if (value == "hidden") - *dest = CSSLineStyle::HIDDEN; + *dest = CSS_LINE_STYLE_HIDDEN; else if (value == "inset") - *dest = CSSLineStyle::INSET; + *dest = CSS_LINE_STYLE_INSET; else if (value == "outset") - *dest = CSSLineStyle::OUTSET; + *dest = CSS_LINE_STYLE_OUTSET; else if (value == "solid") - *dest = CSSLineStyle::SOLID; + *dest = CSS_LINE_STYLE_SOLID; } void CCssStyle::applyPaddingWidth(const std::string &value, uint32 *dest, const uint32 currentPadding, uint32 fontSize) const diff --git a/code/nel/src/gui/group_html.cpp b/code/nel/src/gui/group_html.cpp index 23bd2e671..1f739cc5f 100644 --- a/code/nel/src/gui/group_html.cpp +++ b/code/nel/src/gui/group_html.cpp @@ -2941,7 +2941,7 @@ namespace NLGUI CViewBitmap *newImage = new CViewBitmap (TCtorParam()); newImage->setId(id); - addImageDownload(img, newImage, style, TImageType::NormalImage); + addImageDownload(img, newImage, style, NormalImage); newImage->setRenderLayer(getRenderLayer()+1); getParagraph()->addChild(newImage); @@ -3520,7 +3520,7 @@ namespace NLGUI else bitmap->setSizeRef(""); - addImageDownload(bgtex, view, CStyleParams(), TImageType::NormalImage, ""); + addImageDownload(bgtex, view, CStyleParams(), NormalImage, ""); } } } @@ -6664,7 +6664,7 @@ namespace NLGUI table->CellBorder = (borderWidth > 0); table->Border->setWidth(borderWidth, borderWidth, borderWidth, borderWidth); table->Border->setColor(borderColor, borderColor, borderColor, borderColor); - table->Border->setStyle(CSSLineStyle::OUTSET, CSSLineStyle::OUTSET, CSSLineStyle::OUTSET, CSSLineStyle::OUTSET); + table->Border->setStyle(CSS_LINE_STYLE_OUTSET, CSS_LINE_STYLE_OUTSET, CSS_LINE_STYLE_OUTSET, CSS_LINE_STYLE_OUTSET); } else { @@ -6696,7 +6696,7 @@ namespace NLGUI table->setTextureScale(true); string image = _Style.getStyle("background-image"); - addImageDownload(image, table, CStyleParams(), TImageType::NormalImage, ""); + addImageDownload(image, table, CStyleParams(), NormalImage, ""); } // setting ModulateGlobalColor must be after addImageDownload @@ -6777,7 +6777,7 @@ namespace NLGUI if (_Style.hasStyle("background-image")) { string image = _Style.getStyle("background-image"); - addImageDownload(image, _Cells.back(), CStyleParams(), TImageType::NormalImage, ""); + addImageDownload(image, _Cells.back(), CStyleParams(), NormalImage, ""); } if (elm.hasNonEmptyAttribute("colspan")) @@ -6824,7 +6824,7 @@ namespace NLGUI { _Cells.back()->Border->setWidth(1, 1, 1, 1); _Cells.back()->Border->setColor(table->Border->TopColor, table->Border->RightColor, table->Border->BottomColor, table->Border->LeftColor); - _Cells.back()->Border->setStyle(CSSLineStyle::INSET, CSSLineStyle::INSET, CSSLineStyle::INSET, CSSLineStyle::INSET); + _Cells.back()->Border->setStyle(CSS_LINE_STYLE_INSET, CSS_LINE_STYLE_INSET, CSS_LINE_STYLE_INSET, CSS_LINE_STYLE_INSET); } if (_Style.hasStyle("border-top-width")) _Cells.back()->Border->TopWidth = _Style.Current.BorderTopWidth; diff --git a/code/nel/src/gui/html_element.cpp b/code/nel/src/gui/html_element.cpp index 141fa87af..f0b764640 100644 --- a/code/nel/src/gui/html_element.cpp +++ b/code/nel/src/gui/html_element.cpp @@ -188,11 +188,11 @@ namespace NLGUI result += Value.substr(start, pos - start); if (Value[pos] == '\n') { - result += "⏎"; + result += "\xE2\x8F\x8E"; // \u23CE } else if (Value[pos] == '\t') { - result += "⇥"; + result += "\xE2\x87\xA5"; // \u21E5 } start = pos+1; From 41a803dd408e1f2d40d55e36a05eaec15fffbf8a Mon Sep 17 00:00:00 2001 From: kaetemi Date: Tue, 12 Nov 2019 19:00:52 +0800 Subject: [PATCH 050/236] Run pipeline setup in batch file --- code/nel/tools/build_gamedata/all_dev.bat | 2 ++ 1 file changed, 2 insertions(+) diff --git a/code/nel/tools/build_gamedata/all_dev.bat b/code/nel/tools/build_gamedata/all_dev.bat index c9c13eba3..12e47f9bd 100644 --- a/code/nel/tools/build_gamedata/all_dev.bat +++ b/code/nel/tools/build_gamedata/all_dev.bat @@ -1,3 +1,5 @@ +title Ryzom Core: 0_setup.py --noconf +0_setup.py --noconf title Ryzom Core: 1_export.py 1_export.py title Ryzom Core: 2_build.py From 41c4cdbc7b7d915d9c94ba98dd34a29e1e52a969 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Wed, 13 Nov 2019 09:42:13 +0800 Subject: [PATCH 051/236] Bump NeL version --- code/CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/code/CMakeLists.txt b/code/CMakeLists.txt index e263da274..46900daa6 100644 --- a/code/CMakeLists.txt +++ b/code/CMakeLists.txt @@ -48,15 +48,15 @@ CHECK_OUT_OF_SOURCE() IF(CMAKE_VERSION VERSION_GREATER "2.8.10") STRING(TIMESTAMP CURRENT_YEAR "%Y") ELSE() - SET(CURRENT_YEAR "2016") + SET(CURRENT_YEAR "2019") ENDIF() CMAKE_MINIMUM_REQUIRED(VERSION 2.6) PROJECT(RyzomCore CXX C) SET(NL_VERSION_MAJOR 1) SET(NL_VERSION_MINOR 0) -SET(NL_VERSION_PATCH 1) -SET(YEAR "2004-${CURRENT_YEAR}") +SET(NL_VERSION_PATCH 2) +SET(YEAR "2001-${CURRENT_YEAR}") SET(AUTHOR "Winch Gate and The Ryzom Core Community") SET(RYZOM_VERSION_MAJOR 3) From f81f348d6492ccafd2b170d44e973af6e6b7d753 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Wed, 13 Nov 2019 10:09:28 +0800 Subject: [PATCH 052/236] Remove sound sheet workaround --- code/nel/src/misc/sheet_id.cpp | 337 ++++++++++++++------------------- 1 file changed, 146 insertions(+), 191 deletions(-) diff --git a/code/nel/src/misc/sheet_id.cpp b/code/nel/src/misc/sheet_id.cpp index 2dd895153..ecbe84089 100644 --- a/code/nel/src/misc/sheet_id.cpp +++ b/code/nel/src/misc/sheet_id.cpp @@ -30,35 +30,30 @@ using namespace std; #ifdef DEBUG_NEW - #define new DEBUG_NEW +#define new DEBUG_NEW #endif -namespace NLMISC { +namespace NLMISC +{ CSheetId::CChar CSheetId::_AllStrings; -CStaticMap CSheetId::_SheetIdToName; -CStaticMap CSheetId::_SheetNameToId; +CStaticMap CSheetId::_SheetIdToName; +CStaticMap CSheetId::_SheetNameToId; //map CSheetId::_SheetIdToName; //map CSheetId::_SheetNameToId; vector CSheetId::_FileExtensions; -bool CSheetId::_Initialised=false; -bool CSheetId::_RemoveUnknownSheet=true; +bool CSheetId::_Initialised = false; +bool CSheetId::_RemoveUnknownSheet = true; bool CSheetId::_DontHaveSheetKnowledge = false; std::map CSheetId::_DevTypeNameToId; -std::vector > CSheetId::_DevSheetIdToName; +std::vector> CSheetId::_DevSheetIdToName; std::map CSheetId::_DevSheetNameToId; -#define NL_TEMP_YUBO_NO_SOUND_SHEET_ID - -#ifdef NL_TEMP_YUBO_NO_SOUND_SHEET_ID -namespace { bool a_NoSoundSheetId = false; const uint32 a_NoSoundSheetType = 80; } -#endif - const CSheetId CSheetId::Unknown(0); -void CSheetId::cbFileChange (const std::string &filename) +void CSheetId::cbFileChange(const std::string &filename) { - nlinfo ("SHEETID: %s changed, reload it", filename.c_str()); + nlinfo("SHEETID: %s changed, reload it", filename.c_str()); loadSheetId(); } @@ -67,14 +62,14 @@ void CSheetId::cbFileChange (const std::string &filename) // CSheetId // //----------------------------------------------- -CSheetId::CSheetId( uint32 sheetRef) +CSheetId::CSheetId(uint32 sheetRef) { _Id.Id = sheetRef; #ifdef NL_DEBUG_SHEET_ID // Yoyo: don't access the static map, because of order of static ctor call. // For now, all static CSheetId are 0 (eg: CSheetId::Unknown) - if(sheetRef) + if (sheetRef) { CStaticMap::iterator it(_SheetIdToName.find(sheetRef)); if (it != _SheetIdToName.end()) @@ -91,19 +86,18 @@ CSheetId::CSheetId( uint32 sheetRef) #endif } - //----------------------------------------------- // CSheetId // //----------------------------------------------- -CSheetId::CSheetId( const string& sheetName ) +CSheetId::CSheetId(const string &sheetName) { if (!buildSheetId(sheetName)) { - if(sheetName.empty()) + if (sheetName.empty()) nlwarning("SHEETID: Try to create an CSheetId with empty name. TODO: check why."); else - nlwarning("SHEETID: The sheet '%s' is not in sheet_id.bin, setting it to Unknown",sheetName.c_str()); + nlwarning("SHEETID: The sheet '%s' is not in sheet_id.bin, setting it to Unknown", sheetName.c_str()); //std::string stack; //NLMISC::getCallStack(stack); //std::vector contexts; @@ -118,11 +112,11 @@ CSheetId::CSheetId( const string& sheetName ) } // CSheetId // -CSheetId::CSheetId( const std::string& sheetName, const std::string &defaultType ) +CSheetId::CSheetId(const std::string &sheetName, const std::string &defaultType) { // Don't use this function without defaultType, use the one above. nlassert(defaultType.size() != 0); - + if (sheetName.rfind('.') == std::string::npos) { std::string withType = sheetName + "." + defaultType; @@ -135,15 +129,14 @@ CSheetId::CSheetId( const std::string& sheetName, const std::string &defaultType } } - //----------------------------------------------- // Build // //----------------------------------------------- -bool CSheetId::buildSheetId(const std::string& sheetName) +bool CSheetId::buildSheetId(const std::string &sheetName) { nlassert(_Initialised); - + // When no sheet_id.bin is loaded, use dynamically assigned IDs. if (_DontHaveSheetKnowledge) { @@ -188,15 +181,15 @@ bool CSheetId::buildSheetId(const std::string& sheetName) } // try looking up the sheet name in _SheetNameToId - CStaticMap::const_iterator itId; + CStaticMap::const_iterator itId; CChar c; - c.Ptr = new char [sheetName.size()+1]; + c.Ptr = new char[sheetName.size() + 1]; strcpy(c.Ptr, sheetName.c_str()); toLower(c.Ptr); - itId = _SheetNameToId.find (c); - delete [] c.Ptr; - if( itId != _SheetNameToId.end() ) + itId = _SheetNameToId.find(c); + delete[] c.Ptr; + if (itId != _SheetNameToId.end()) { _Id.Id = itId->second; #ifdef NL_DEBUG_SHEET_ID @@ -207,40 +200,21 @@ bool CSheetId::buildSheetId(const std::string& sheetName) } // we failed to find the sheet name in the sheetname map so see if the string is numeric - if (sheetName.size()>1 && sheetName[0]=='#') + if (sheetName.size() > 1 && sheetName[0] == '#') { uint32 numericId; - NLMISC::fromString((const char*)(sheetName.c_str()+1), numericId); - if (NLMISC::toString("#%u",numericId)==sheetName) - { - _Id.Id= numericId; - return true; - } - } - -#ifdef NL_TEMP_YUBO_NO_SOUND_SHEET_ID - if (a_NoSoundSheetId && sheetName.find(".sound") != std::string::npos) - { - std::string sheetNameLc = toLower(sheetName); - std::map::iterator it = _DevSheetNameToId.find(sheetNameLc); - if (it == _DevSheetNameToId.end()) + NLMISC::fromString((const char *)(sheetName.c_str() + 1), numericId); + if (NLMISC::toString("#%u", numericId) == sheetName) { - // nldebug("SHEETID: Creating a temporary sheet id for '%s'", sheetName.c_str()); - _DevSheetIdToName[0].push_back(sheetName); - _Id.IdInfos.Type = a_NoSoundSheetType; - _Id.IdInfos.Id = _DevSheetIdToName[0].size() - 1; - _DevSheetNameToId[sheetNameLc] = _Id.Id; + _Id.Id = numericId; return true; } - _Id.Id = it->second; - return true; } -#endif return false; } -void CSheetId::loadSheetId () +void CSheetId::loadSheetId() { H_AUTO(CSheetIdInit); //nldebug("Loading sheet_id.bin"); @@ -248,18 +222,18 @@ void CSheetId::loadSheetId () // Open the sheet id to sheet file name association CIFile file; std::string path = CPath::lookup("sheet_id.bin", false, false); - if(!path.empty() && file.open(path)) + if (!path.empty() && file.open(path)) { // clear entries - _FileExtensions.clear (); - _SheetIdToName.clear (); - _SheetNameToId.clear (); + _FileExtensions.clear(); + _SheetIdToName.clear(); + _SheetNameToId.clear(); // reserve space for the vector of file extensions _FileExtensions.resize(1 << (NL_SHEET_ID_TYPE_BITS)); // Get the map from the file - map tempMap; + map tempMap; contReset(tempMap); file.serialCont(tempMap); file.close(); @@ -270,23 +244,23 @@ void CSheetId::loadSheetId () uint32 nbfiles = (uint32)tempMap.size(); // now we remove all files that not available - map::iterator itStr2; - for( itStr2 = tempMap.begin(); itStr2 != tempMap.end(); ) + map::iterator itStr2; + for (itStr2 = tempMap.begin(); itStr2 != tempMap.end();) { - if (CPath::exists ((*itStr2).second)) + if (CPath::exists((*itStr2).second)) { ++itStr2; } else { - map::iterator olditStr = itStr2; + map::iterator olditStr = itStr2; //nldebug ("Removing file '%s' from CSheetId because the file not exists", (*olditStr).second.c_str ()); itStr2++; - tempMap.erase (olditStr); + tempMap.erase(olditStr); removednbfiles++; } } - nlinfo ("SHEETID: Removed %d files on %d from CSheetId because these files don't exist", removednbfiles, nbfiles); + nlinfo("SHEETID: Removed %d files on %d from CSheetId because these files don't exist", removednbfiles, nbfiles); } // Convert the map to one big string and 1 static map (id to name) @@ -295,10 +269,10 @@ void CSheetId::loadSheetId () vector tempVec; // Used to initialise the first map uint32 nNb = 0; uint32 nSize = 0; - map::const_iterator it = tempMap.begin(); + map::const_iterator it = tempMap.begin(); while (it != tempMap.end()) { - nSize += (uint32)it->second.size()+1; + nSize += (uint32)it->second.size() + 1; nNb++; it++; } @@ -311,10 +285,10 @@ void CSheetId::loadSheetId () nNb = 0; while (it != tempMap.end()) { - tempVec[nNb].Ptr = _AllStrings.Ptr+nSize; - strcpy(_AllStrings.Ptr+nSize, it->second.c_str()); - toLower(_AllStrings.Ptr+nSize); - nSize += (uint32)it->second.size()+1; + tempVec[nNb].Ptr = _AllStrings.Ptr + nSize; + strcpy(_AllStrings.Ptr + nSize, it->second.c_str()); + toLower(_AllStrings.Ptr + nSize); + nSize += (uint32)it->second.size() + 1; nNb++; it++; } @@ -339,15 +313,15 @@ void CSheetId::loadSheetId () { uint32 nSize = (uint32)_SheetIdToName.size(); _SheetNameToId.reserve(nSize); - CStaticMap::iterator itStr; - for( itStr = _SheetIdToName.begin(); itStr != _SheetIdToName.end(); ++itStr ) + CStaticMap::iterator itStr; + for (itStr = _SheetIdToName.begin(); itStr != _SheetIdToName.end(); ++itStr) { // add entry to the inverse map - _SheetNameToId.add( make_pair((*itStr).second, (*itStr).first) ); + _SheetNameToId.add(make_pair((*itStr).second, (*itStr).first)); // work out the type value for this entry in the map TSheetId sheetId; - sheetId.Id=(*itStr).first; + sheetId.Id = (*itStr).first; uint32 type = sheetId.IdInfos.Type; // check whether we need to add an entry to the file extensions vector @@ -365,10 +339,9 @@ void CSheetId::loadSheetId () { nlerror(" Can't open the file sheet_id.bin"); } - nldebug("Finished loading sheet_id.bin: %u entries read",_SheetIdToName.size()); + nldebug("Finished loading sheet_id.bin: %u entries read", _SheetIdToName.size()); } - //----------------------------------------------- // init // @@ -383,30 +356,12 @@ void CSheetId::init(bool removeUnknownSheet) return; } -// CFile::addFileChangeCallback ("sheet_id.bin", cbFileChange); + // CFile::addFileChangeCallback ("sheet_id.bin", cbFileChange); _RemoveUnknownSheet = removeUnknownSheet; - loadSheetId (); - _Initialised=true; - -#ifdef NL_TEMP_YUBO_NO_SOUND_SHEET_ID - if (typeFromFileExtension("sound") == std::numeric_limits::max()) - { - nlwarning("SHEETID: Loading without known sound sheet id, please update sheet_id.bin with .sound sheets"); - nlassert(_FileExtensions.size() == 1 << (NL_SHEET_ID_TYPE_BITS)); - nlassert(_FileExtensions[a_NoSoundSheetType].empty()); - _FileExtensions[a_NoSoundSheetType] = "sound"; - _DevSheetIdToName.push_back(std::vector()); - _DevSheetIdToName[0].push_back("unknown.sound"); - TSheetId id; - id.IdInfos.Type = a_NoSoundSheetType; - id.IdInfos.Id = _DevSheetIdToName[0].size() - 1; - nlassert(id.IdInfos.Id == 0); - _DevSheetNameToId["unknown.sound"] = id.Id; - a_NoSoundSheetId = true; - } -#endif + loadSheetId(); + _Initialised = true; } // init // @@ -422,19 +377,17 @@ void CSheetId::initWithoutSheet() _DontHaveSheetKnowledge = true; // Initialize id 0,0 as unknown.unknown - CSheetId unknownunknown = CSheetId("unknown.unknown"); - nlassert(unknownunknown == CSheetId::Unknown); + CSheetId unknownUnknown = CSheetId("unknown.unknown"); + nlassert(unknownUnknown == CSheetId::Unknown); } - - //----------------------------------------------- // uninit // //----------------------------------------------- void CSheetId::uninit() { - delete [] _AllStrings.Ptr; + delete[] _AllStrings.Ptr; _FileExtensions.clear(); _DevTypeNameToId.clear(); _DevSheetIdToName.clear(); @@ -445,11 +398,12 @@ void CSheetId::uninit() // operator= // //----------------------------------------------- -CSheetId& CSheetId::operator=( const CSheetId& sheetId ) +CSheetId &CSheetId::operator=(const CSheetId &sheetId) { - if (!_Initialised) init(false); + if (!_Initialised) + init(false); - if(this == &sheetId) + if (this == &sheetId) { return *this; } @@ -460,17 +414,15 @@ CSheetId& CSheetId::operator=( const CSheetId& sheetId ) _DebugSheetName = sheetId._DebugSheetName; #endif - return *this; - + return *this; } // operator= // - //----------------------------------------------- // operator= // //----------------------------------------------- -CSheetId& CSheetId::operator=( const string& sheetName ) +CSheetId &CSheetId::operator=(const string &sheetName) { if (!buildSheetId(sheetName)) @@ -482,14 +434,14 @@ CSheetId& CSheetId::operator=( const string& sheetName ) } // operator= // - //----------------------------------------------- // operator= // //----------------------------------------------- -CSheetId& CSheetId::operator=( uint32 sheetRef ) +CSheetId &CSheetId::operator=(uint32 sheetRef) { - if (!_Initialised) init(false); + if (!_Initialised) + init(false); _Id.Id = sheetRef; @@ -497,15 +449,14 @@ CSheetId& CSheetId::operator=( uint32 sheetRef ) } // operator= // - - //----------------------------------------------- // operator< // //----------------------------------------------- -bool CSheetId::operator < (const CSheetId& sheetRef ) const +bool CSheetId::operator<(const CSheetId &sheetRef) const { - if (!_Initialised) init(false); + if (!_Initialised) + init(false); if (_Id.Id < sheetRef.asInt()) { @@ -516,56 +467,62 @@ bool CSheetId::operator < (const CSheetId& sheetRef ) const } // operator< // - - //----------------------------------------------- // toString // //----------------------------------------------- string CSheetId::toString(bool ifNotFoundUseNumericId) const { - if (!_Initialised) init(false); + if (!_Initialised) + init(false); if (_DontHaveSheetKnowledge) { - // FIXME: When someone punches in a fake sheet id this will - // fail. - return _DevSheetIdToName[_Id.IdInfos.Type][_Id.IdInfos.Id]; + if (_Id.IdInfos.Type < _DevSheetIdToName.size() + && _Id.IdInfos.Id < _DevSheetIdToName[_Id.IdInfos.Type].size()) + { + return _DevSheetIdToName[_Id.IdInfos.Type][_Id.IdInfos.Id]; + } + else + { + if (ifNotFoundUseNumericId) + { + return NLMISC::toString("#%u", _Id.Id); + } + else + { + return NLMISC::toString("", _Id.Id); + } + } } - CStaticMap::const_iterator itStr = _SheetIdToName.find (_Id.Id); - if( itStr != _SheetIdToName.end() ) + CStaticMap::const_iterator itStr = _SheetIdToName.find(_Id.Id); + if (itStr != _SheetIdToName.end()) { return string((*itStr).second.Ptr); } else { -#ifdef NL_TEMP_YUBO_NO_SOUND_SHEET_ID - if (a_NoSoundSheetId && _Id.IdInfos.Type == a_NoSoundSheetType) - { - return _DevSheetIdToName[0][_Id.IdInfos.Id]; - } -#endif // This nlwarning is commented out because the loggers are mutexed, therefore // you couldn't use toString() within a nlwarning(). //nlwarning(" The sheet %08x is not in sheet_id.bin",_Id.Id); if (ifNotFoundUseNumericId) { - return NLMISC::toString( "#%u", _Id.Id ); + return NLMISC::toString("#%u", _Id.Id); } else { - return NLMISC::toString( "", _Id.Id ); + return NLMISC::toString("", _Id.Id); } } } // toString // -void CSheetId::serial(NLMISC::IStream &f) +void CSheetId::serial(NLMISC::IStream &f) { nlassert(!_DontHaveSheetKnowledge); - f.serial( _Id.Id ); + f.serial(_Id.Id); #ifdef NL_DEBUG_SHEET_ID CStaticMap::iterator it(_SheetIdToName.find(_Id.Id)); @@ -579,7 +536,7 @@ void CSheetId::serial(NLMISC::IStream &f) void CSheetId::serialString(NLMISC::IStream &f, const std::string &defaultType) { nlassert(_Initialised); - + if (f.isReading()) { std::string sheetName; @@ -595,90 +552,88 @@ void CSheetId::serialString(NLMISC::IStream &f, const std::string &defaultType) } } - //----------------------------------------------- // display // //----------------------------------------------- void CSheetId::display() { - if (!_Initialised) init(false); + if (!_Initialised) + init(false); - CStaticMap::const_iterator itStr; - for( itStr = _SheetIdToName.begin(); itStr != _SheetIdToName.end(); ++itStr ) + CStaticMap::const_iterator itStr; + for (itStr = _SheetIdToName.begin(); itStr != _SheetIdToName.end(); ++itStr) { //nlinfo("%d %s",(*itStr).first,(*itStr).second.c_str()); - nlinfo("SHEETID: (%08x %d) %s",(*itStr).first,(*itStr).first,(*itStr).second.Ptr); + nlinfo("SHEETID: (%08x %d) %s", (*itStr).first, (*itStr).first, (*itStr).second.Ptr); } } // display // - - //----------------------------------------------- // display // //----------------------------------------------- void CSheetId::display(uint32 type) { - if (!_Initialised) init(false); + if (!_Initialised) + init(false); - CStaticMap::const_iterator itStr; - for( itStr = _SheetIdToName.begin(); itStr != _SheetIdToName.end(); ++itStr ) + CStaticMap::const_iterator itStr; + for (itStr = _SheetIdToName.begin(); itStr != _SheetIdToName.end(); ++itStr) { // work out the type value for this entry in the map TSheetId sheetId; - sheetId.Id=(*itStr).first; + sheetId.Id = (*itStr).first; // decide whether or not to display the entry - if (type==sheetId.IdInfos.Type) + if (type == sheetId.IdInfos.Type) { //nlinfo("%d %s",(*itStr).first,(*itStr).second.c_str()); - nlinfo("SHEETID: (%08x %d) %s",(*itStr).first,(*itStr).first,(*itStr).second.Ptr); + nlinfo("SHEETID: (%08x %d) %s", (*itStr).first, (*itStr).first, (*itStr).second.Ptr); } } } // display // - - //----------------------------------------------- // buildIdVector // //----------------------------------------------- -void CSheetId::buildIdVector(std::vector &result) +void CSheetId::buildIdVector(std::vector &result) { - if (!_Initialised) init(false); + if (!_Initialised) + init(false); - CStaticMap::const_iterator itStr; - for( itStr = _SheetIdToName.begin(); itStr != _SheetIdToName.end(); ++itStr ) + CStaticMap::const_iterator itStr; + for (itStr = _SheetIdToName.begin(); itStr != _SheetIdToName.end(); ++itStr) { - result.push_back( (CSheetId)(*itStr).first ); + result.push_back((CSheetId)(*itStr).first); } } // buildIdVector // - //----------------------------------------------- // buildIdVector // //----------------------------------------------- -void CSheetId::buildIdVector(std::vector &result, uint32 type) +void CSheetId::buildIdVector(std::vector &result, uint32 type) { - if (!_Initialised) init(false); + if (!_Initialised) + init(false); nlassert(type < (1 << (NL_SHEET_ID_TYPE_BITS))); - CStaticMap::const_iterator itStr; - for( itStr = _SheetIdToName.begin(); itStr != _SheetIdToName.end(); ++itStr ) + CStaticMap::const_iterator itStr; + for (itStr = _SheetIdToName.begin(); itStr != _SheetIdToName.end(); ++itStr) { // work out the type value for this entry in the map TSheetId sheetId; - sheetId.Id=(*itStr).first; + sheetId.Id = (*itStr).first; // decide whether or not to use the entry - if (type==sheetId.IdInfos.Type) + if (type == sheetId.IdInfos.Type) { - result.push_back( (CSheetId)sheetId.Id ); + result.push_back((CSheetId)sheetId.Id); } } @@ -688,23 +643,24 @@ void CSheetId::buildIdVector(std::vector &result, uint32 type) // buildIdVector // //----------------------------------------------- -void CSheetId::buildIdVector(std::vector &result, std::vector &resultFilenames,uint32 type) +void CSheetId::buildIdVector(std::vector &result, std::vector &resultFilenames, uint32 type) { - if (!_Initialised) init(false); + if (!_Initialised) + init(false); nlassert(type < (1 << (NL_SHEET_ID_TYPE_BITS))); - CStaticMap::const_iterator itStr; - for( itStr = _SheetIdToName.begin(); itStr != _SheetIdToName.end(); ++itStr ) + CStaticMap::const_iterator itStr; + for (itStr = _SheetIdToName.begin(); itStr != _SheetIdToName.end(); ++itStr) { // work out the type value for this entry in the map TSheetId sheetId; - sheetId.Id=(*itStr).first; + sheetId.Id = (*itStr).first; // decide whether or not to use the entry - if (type==sheetId.IdInfos.Type) + if (type == sheetId.IdInfos.Type) { - result.push_back( (CSheetId)sheetId.Id ); - resultFilenames.push_back( (*itStr).second.Ptr ); + result.push_back((CSheetId)sheetId.Id); + resultFilenames.push_back((*itStr).second.Ptr); } } @@ -714,9 +670,9 @@ void CSheetId::buildIdVector(std::vector &result, std::vector &result,const std::string &fileExtension) +void CSheetId::buildIdVector(std::vector &result, const std::string &fileExtension) { - uint32 type=typeFromFileExtension(fileExtension); + uint32 type = typeFromFileExtension(fileExtension); if (type != std::numeric_limits::max()) buildIdVector(result, type); @@ -726,40 +682,40 @@ void CSheetId::buildIdVector(std::vector &result,const std::string &f // buildIdVector // //----------------------------------------------- -void CSheetId::buildIdVector(std::vector &result, std::vector &resultFilenames,const std::string &fileExtension) +void CSheetId::buildIdVector(std::vector &result, std::vector &resultFilenames, const std::string &fileExtension) { - uint32 type=typeFromFileExtension(fileExtension); + uint32 type = typeFromFileExtension(fileExtension); if (type != std::numeric_limits::max()) - buildIdVector(result,resultFilenames, type); + buildIdVector(result, resultFilenames, type); } // buildIdVector // - //----------------------------------------------- // typeFromFileExtension // //----------------------------------------------- uint32 CSheetId::typeFromFileExtension(const std::string &fileExtension) { - if (!_Initialised) init(false); + if (!_Initialised) + init(false); uint i; - for (i=0;i<_FileExtensions.size();i++) - if (toLower(fileExtension)==_FileExtensions[i]) + for (i = 0; i < _FileExtensions.size(); i++) + if (toLower(fileExtension) == _FileExtensions[i]) return i; return std::numeric_limits::max(); } // typeFromFileExtension // - //----------------------------------------------- // fileExtensionFromType // //----------------------------------------------- const std::string &CSheetId::fileExtensionFromType(uint32 type) { - if (!_Initialised) init(false); - nlassert(type < (1<<(NL_SHEET_ID_TYPE_BITS))); + if (!_Initialised) + init(false); + nlassert(type < (1 << (NL_SHEET_ID_TYPE_BITS))); return _FileExtensions[type]; @@ -769,13 +725,13 @@ const std::string &CSheetId::fileExtensionFromType(uint32 type) // build // //----------------------------------------------- -void CSheetId::buildSheetId(uint32 shortId, uint32 type) +void CSheetId::buildSheetId(uint32 shortId, uint32 type) { - nlassert(shortId < (1<::iterator it(_SheetIdToName.find(_Id.Id)); @@ -786,7 +742,6 @@ void CSheetId::buildSheetId(uint32 shortId, uint32 type) else _DebugSheetName = NULL; #endif - } } // NLMISC From 943a3c239ab6777559075df5c71c9762b983e8eb Mon Sep 17 00:00:00 2001 From: kaetemi Date: Wed, 13 Nov 2019 10:28:57 +0800 Subject: [PATCH 053/236] Revert sound sheet id workaround --- .../misc/make_sheet_id/make_sheet_id.cpp | 21 +++++++++---------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/code/nel/tools/misc/make_sheet_id/make_sheet_id.cpp b/code/nel/tools/misc/make_sheet_id/make_sheet_id.cpp index c6accc1cb..a7f893237 100644 --- a/code/nel/tools/misc/make_sheet_id/make_sheet_id.cpp +++ b/code/nel/tools/misc/make_sheet_id/make_sheet_id.cpp @@ -147,10 +147,8 @@ void readFormId( string& outputFileName ) { // get the file type from form name TFormId fid = (*itIF).first; - string fileType; - bool fileTypeGet = getFileType((*itIF).second, fileType); - if((*itIF).second.empty() || (*itIF).second=="." || (*itIF).second==".." || ((*itIF).second[0]=='_' && fileType != "sound") || (*itIF).second.find(".#")==0) + if ((*itIF).second.empty() || (*itIF).second=="." || (*itIF).second==".." || (*itIF).second[0]=='_' || (*itIF).second.find(".#")==0) { map::iterator itErase = itIF; ++itIF; @@ -158,7 +156,8 @@ void readFormId( string& outputFileName ) } else { - if(fileTypeGet) + string fileType; + if (getFileType((*itIF).second, fileType)) { // insert the association (file type/file type id) map::iterator itFT = FileTypeToId.find(fileType); @@ -294,18 +293,18 @@ void makeId( list& dirs ) //----------------------------------------------- void addId( string fileName ) { - string extStr = CFile::getExtension( fileName ); - if(fileName.empty() || fileName=="." || fileName==".." || (fileName[0]=='_' && extStr != "sound") || fileName.find(".#")==0) + if (fileName.empty() || fileName == "." || fileName == ".." || fileName[0] == '_' || fileName.find(".#") == 0) { - //nlinfo("Discarding file '%s'", fileName.c_str()); - NbFilesDiscarded++; - return; + // nlinfo("Discarding file '%s'", fileName.c_str()); + NbFilesDiscarded++; + return; } else { - if( !ExtensionsAllowed.empty() ) + if (!ExtensionsAllowed.empty()) { - if( ExtensionsAllowed.find(extStr) == ExtensionsAllowed.end() ) + string extStr = CFile::getExtension(fileName); + if (ExtensionsAllowed.find(extStr) == ExtensionsAllowed.end()) { NbFilesDiscarded++; return; From a24c758d95d39322918f97c964e77768c290d400 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Wed, 13 Nov 2019 10:29:16 +0800 Subject: [PATCH 054/236] Fix path definitions --- code/nel/tools/3d/zviewer/CMakeLists.txt | 2 +- code/nel/tools/misc/make_sheet_id/CMakeLists.txt | 2 +- code/nel/tools/misc/words_dic_qt/CMakeLists.txt | 2 +- code/nel/tools/pacs/build_ig_boxes/CMakeLists.txt | 2 +- code/nel/tools/pacs/build_indoor_rbank/CMakeLists.txt | 2 +- code/nel/tools/pacs/build_rbank/CMakeLists.txt | 2 +- .../nelns/login_system/nel_launcher_windows_ext2/CMakeLists.txt | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/code/nel/tools/3d/zviewer/CMakeLists.txt b/code/nel/tools/3d/zviewer/CMakeLists.txt index c4222c992..a78e19ad5 100644 --- a/code/nel/tools/3d/zviewer/CMakeLists.txt +++ b/code/nel/tools/3d/zviewer/CMakeLists.txt @@ -6,7 +6,7 @@ ELSE() ADD_EXECUTABLE(zviewer ${SRC}) ENDIF() -ADD_DEFINITIONS(-DNL_ZVIEWER_CFG="\\"${NL_ETC_PREFIX}/\\"") +ADD_DEFINITIONS(-DNL_ZVIEWER_CFG="${NL_ETC_PREFIX}/") TARGET_LINK_LIBRARIES(zviewer nelmisc nel3d) NL_DEFAULT_PROPS(zviewer "NeL, Tools, 3D: Zone Viewer") diff --git a/code/nel/tools/misc/make_sheet_id/CMakeLists.txt b/code/nel/tools/misc/make_sheet_id/CMakeLists.txt index 9c779f08e..2e77e12e3 100644 --- a/code/nel/tools/misc/make_sheet_id/CMakeLists.txt +++ b/code/nel/tools/misc/make_sheet_id/CMakeLists.txt @@ -4,7 +4,7 @@ SOURCE_GROUP("" FILES ${SRC}) ADD_EXECUTABLE(make_sheet_id ${SRC}) -ADD_DEFINITIONS(-DNL_MK_SH_ID_CFG="\\"${NL_ETC_PREFIX}/\\"") +ADD_DEFINITIONS(-DNL_MK_SH_ID_CFG="${NL_ETC_PREFIX}/") TARGET_LINK_LIBRARIES(make_sheet_id nelmisc) NL_DEFAULT_PROPS(make_sheet_id "NeL, Tools, Misc: make_sheet_id") diff --git a/code/nel/tools/misc/words_dic_qt/CMakeLists.txt b/code/nel/tools/misc/words_dic_qt/CMakeLists.txt index c31de9100..5f5c7d4fd 100644 --- a/code/nel/tools/misc/words_dic_qt/CMakeLists.txt +++ b/code/nel/tools/misc/words_dic_qt/CMakeLists.txt @@ -8,7 +8,7 @@ SET(WORDS_DIC_HDR words_dicDlg.h) SET(WORDS_DIC_UIS words_dic_Qt.ui) SET(WORDS_DIC_RCS words_dic_Qt.qrc) -ADD_DEFINITIONS(-DNL_WORDS_DIC_CFG="\\"${NL_ETC_PREFIX}/\\"") +ADD_DEFINITIONS(-DNL_WORDS_DIC_CFG="${NL_ETC_PREFIX}/") IF(WITH_QT) INCLUDE_DIRECTORIES(${QT_INCLUDES}) diff --git a/code/nel/tools/pacs/build_ig_boxes/CMakeLists.txt b/code/nel/tools/pacs/build_ig_boxes/CMakeLists.txt index cfeb3069e..fdabc84ba 100644 --- a/code/nel/tools/pacs/build_ig_boxes/CMakeLists.txt +++ b/code/nel/tools/pacs/build_ig_boxes/CMakeLists.txt @@ -4,7 +4,7 @@ SOURCE_GROUP("" FILES ${SRC}) ADD_EXECUTABLE(build_ig_boxes ${SRC}) -ADD_DEFINITIONS(-DNL_BIB_CFG="\\"${NL_ETC_PREFIX}/\\"") +ADD_DEFINITIONS(-DNL_BIB_CFG="${NL_ETC_PREFIX}/") TARGET_LINK_LIBRARIES(build_ig_boxes nelmisc nelpacs nel3d) NL_DEFAULT_PROPS(build_ig_boxes "NeL, Tools, PACS: build_ig_boxes") diff --git a/code/nel/tools/pacs/build_indoor_rbank/CMakeLists.txt b/code/nel/tools/pacs/build_indoor_rbank/CMakeLists.txt index 4d39639a2..cd4e929fd 100644 --- a/code/nel/tools/pacs/build_indoor_rbank/CMakeLists.txt +++ b/code/nel/tools/pacs/build_indoor_rbank/CMakeLists.txt @@ -4,7 +4,7 @@ SOURCE_GROUP("" FILES ${SRC}) ADD_EXECUTABLE(build_indoor_rbank ${SRC}) -ADD_DEFINITIONS(-DNL_BIRB_CFG="\\"${NL_ETC_PREFIX}/\\"") +ADD_DEFINITIONS(-DNL_BIRB_CFG="${NL_ETC_PREFIX}/") TARGET_LINK_LIBRARIES(build_indoor_rbank nelmisc nelpacs) NL_DEFAULT_PROPS(build_indoor_rbank "NeL, Tools, PACS: build_indoor_rbank") diff --git a/code/nel/tools/pacs/build_rbank/CMakeLists.txt b/code/nel/tools/pacs/build_rbank/CMakeLists.txt index 9b493b762..234178814 100644 --- a/code/nel/tools/pacs/build_rbank/CMakeLists.txt +++ b/code/nel/tools/pacs/build_rbank/CMakeLists.txt @@ -4,7 +4,7 @@ SOURCE_GROUP("" FILES ${SRC}) ADD_EXECUTABLE(build_rbank ${SRC}) -ADD_DEFINITIONS(-DNL_BRB_CFG="\\"${NL_ETC_PREFIX}/\\"") +ADD_DEFINITIONS(-DNL_BRB_CFG="${NL_ETC_PREFIX}/") TARGET_LINK_LIBRARIES(build_rbank nelpacs nel3d nelligo nelmisc) NL_DEFAULT_PROPS(build_rbank "NeL, Tools, PACS: build_rbank") diff --git a/code/nelns/login_system/nel_launcher_windows_ext2/CMakeLists.txt b/code/nelns/login_system/nel_launcher_windows_ext2/CMakeLists.txt index b283624d1..be794545f 100644 --- a/code/nelns/login_system/nel_launcher_windows_ext2/CMakeLists.txt +++ b/code/nelns/login_system/nel_launcher_windows_ext2/CMakeLists.txt @@ -4,7 +4,7 @@ ADD_EXECUTABLE(nel_launcher_ext2 WIN32 ${SRC} nel_launcher.rc) IF(CURL_FOUND) ADD_DEFINITIONS(-DUSE_CURL) ENDIF() -ADD_DEFINITIONS(-DNL_LAUNCHER_CFG="\\"${NL_ETC_PREFIX}/\\"") +ADD_DEFINITIONS(-DNL_LAUNCHER_CFG="${NL_ETC_PREFIX}/") TARGET_LINK_LIBRARIES(nel_launcher_ext2 nelnet From 67bba962d73b9ffe7e2c912f39f2b76745436d32 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Wed, 13 Nov 2019 10:32:45 +0800 Subject: [PATCH 055/236] Revert unused change from TStringId to CSheetId for sounds --- code/nel/include/nel/3d/ps_sound.h | 7 +- code/nel/include/nel/3d/u_ps_sound_impl.h | 2 +- .../nel/include/nel/3d/u_ps_sound_interface.h | 3 +- code/nel/include/nel/sound/audio_mixer_user.h | 9 +- code/nel/include/nel/sound/background_sound.h | 14 ++- .../nel/sound/background_sound_manager.h | 2 +- code/nel/include/nel/sound/clustered_sound.h | 5 +- code/nel/include/nel/sound/complex_sound.h | 6 +- code/nel/include/nel/sound/context_sound.h | 16 ++-- code/nel/include/nel/sound/sound.h | 12 +-- .../nel/include/nel/sound/sound_anim_marker.h | 9 +- code/nel/include/nel/sound/sound_bank.h | 10 +- code/nel/include/nel/sound/source_common.h | 1 - code/nel/include/nel/sound/u_audio_mixer.h | 7 +- code/nel/samples/sound/sound_sources/main.cpp | 3 +- .../samples/sound/stream_file/stream_file.cpp | 3 +- .../stream_ogg_vorbis/stream_ogg_vorbis.cpp | 3 +- code/nel/src/3d/ps_sound.cpp | 21 +++-- code/nel/src/sound/audio_mixer_user.cpp | 21 +++-- code/nel/src/sound/background_sound.cpp | 5 +- .../src/sound/background_sound_manager.cpp | 14 ++- code/nel/src/sound/clustered_sound.cpp | 36 +++++--- code/nel/src/sound/complex_sound.cpp | 17 ++-- code/nel/src/sound/complex_source.cpp | 6 +- code/nel/src/sound/context_sound.cpp | 16 ++-- code/nel/src/sound/sound.cpp | 18 +++- code/nel/src/sound/sound_anim_marker.cpp | 10 +- code/nel/src/sound/sound_animation.cpp | 8 +- code/nel/src/sound/sound_bank.cpp | 91 +++++++------------ code/nel/src/sound/stream_file_sound.cpp | 10 +- .../tools/3d/object_viewer/edit_ps_sound.cpp | 8 +- .../tools/3d/object_viewer/object_viewer.cpp | 1 - .../nel/tools/3d/object_viewer/pick_sound.cpp | 4 +- code/nel/tools/3d/object_viewer/pick_sound.h | 8 +- .../tools/3d/object_viewer/sound_anim_dlg.cpp | 10 +- .../tools/3d/object_viewer/sound_system.cpp | 4 +- .../3d/plugin_max/nel_export/DllEntry.cpp | 2 - .../nel_patch_converter/DllEntry.cpp | 2 - .../3d/plugin_max/nel_patch_edit/np_mods.cpp | 2 - .../plugin_max/nel_patch_paint/DllEntry.cpp | 2 - .../nel_vertex_tree_paint/dllmain.cpp | 2 - .../3d/plugin_max/tile_utility/DllEntry.cpp | 2 - .../sound/build_soundbank/build_soundbank.cpp | 4 - code/ryzom/client/src/commands.cpp | 4 +- code/ryzom/client/src/connection.cpp | 2 +- code/ryzom/client/src/init.cpp | 21 ++--- code/ryzom/client/src/sound_manager.cpp | 14 +-- code/ryzom/client/src/sound_manager.h | 7 +- .../georges_plugin_sound/sound_plugin.cpp | 7 +- 49 files changed, 230 insertions(+), 261 deletions(-) diff --git a/code/nel/include/nel/3d/ps_sound.h b/code/nel/include/nel/3d/ps_sound.h index d1c990770..a6da8f031 100644 --- a/code/nel/include/nel/3d/ps_sound.h +++ b/code/nel/include/nel/3d/ps_sound.h @@ -21,7 +21,6 @@ #include "nel/misc/string_mapper.h" #include "nel/3d/ps_located.h" #include "nel/3d/ps_attrib.h" -#include "nel/misc/sheet_id.h" @@ -64,13 +63,13 @@ public: virtual void step(TPSProcessPass pass); /// set the name of the sound - void setSoundName(const NLMISC::CSheetId &soundName) + void setSoundName(const NLMISC::TStringId &soundName) { _SoundName = soundName; } /// get the name of the sound - const NLMISC::CSheetId &getSoundName(void) const + const NLMISC::TStringId &getSoundName(void) const { return _SoundName; } @@ -162,7 +161,7 @@ protected: void removeAllSources(); CPSAttrib _Sounds; - NLMISC::CSheetId _SoundName; + NLMISC::TStringId _SoundName; float _Gain; CPSAttribMaker * _GainScheme; float _Pitch; diff --git a/code/nel/include/nel/3d/u_ps_sound_impl.h b/code/nel/include/nel/3d/u_ps_sound_impl.h index bf45b6387..f5436c842 100644 --- a/code/nel/include/nel/3d/u_ps_sound_impl.h +++ b/code/nel/include/nel/3d/u_ps_sound_impl.h @@ -162,7 +162,7 @@ public: /// inherited from IPSSoundServer - UPSSoundInstance *createSound(const NLMISC::CSheetId &soundName, bool spawned = true) + UPSSoundInstance *createSound(const NLMISC::TStringId &soundName, bool spawned = true) { if (!_AudioMixer) return NULL; diff --git a/code/nel/include/nel/3d/u_ps_sound_interface.h b/code/nel/include/nel/3d/u_ps_sound_interface.h index 82002470b..c382b01bd 100644 --- a/code/nel/include/nel/3d/u_ps_sound_interface.h +++ b/code/nel/include/nel/3d/u_ps_sound_interface.h @@ -19,7 +19,6 @@ #include "nel/misc/types_nl.h" #include "nel/misc/string_mapper.h" -#include "nel/misc/sheet_id.h" #include namespace NLMISC @@ -51,7 +50,7 @@ struct UPSSoundServer * \param spawn true if the sound must be spawned e.g it continues after this interface is removed * \param cb useful only for spawned sound, it tells when a spawned sound has been removed */ - virtual UPSSoundInstance *createSound(const NLMISC::CSheetId &soundName, bool spawn = false) = 0; + virtual UPSSoundInstance *createSound(const NLMISC::TStringId &soundName, bool spawn = false) = 0; }; diff --git a/code/nel/include/nel/sound/audio_mixer_user.h b/code/nel/include/nel/sound/audio_mixer_user.h index 4163bf616..03bd42ad8 100644 --- a/code/nel/include/nel/sound/audio_mixer_user.h +++ b/code/nel/include/nel/sound/audio_mixer_user.h @@ -25,7 +25,6 @@ #include #include #include -#include #include #include @@ -181,7 +180,7 @@ public: // Load environment sounds ; treeRoot can be null if you don't want an access to the envsounds // virtual void loadEnvSounds( const char *filename, UEnvSound **treeRoot=NULL ); /// Get a TSoundId from a name (returns NULL if not found) - virtual TSoundId getSoundId( const NLMISC::CSheetId &name ); + virtual TSoundId getSoundId( const NLMISC::TStringId &name ); /// Gets the group controller for the given group tree path with separator '/', if it doesn't exist yet it will be created. /// Examples: "music", "effects", "dialog", "music/background", "music/loading", "music/player", etcetera @@ -193,7 +192,7 @@ public: * pass a callback function that will be called (if not NULL) just before deleting the spawned * source. */ - virtual USource *createSource( const NLMISC::CSheetId &name, bool spawn=false, TSpawnEndCallback cb=NULL, void *cbUserParam = NULL, NL3D::CCluster *cluster = 0, CSoundContext *context = 0, UGroupController *groupController = NULL); + virtual USource *createSource( const NLMISC::TStringId &name, bool spawn=false, TSpawnEndCallback cb=NULL, void *cbUserParam = NULL, NL3D::CCluster *cluster = 0, CSoundContext *context = 0, UGroupController *groupController = NULL); /// Add a logical sound source (by sound id). To remove a source, just delete it. See createSource(const char*) virtual USource *createSource( TSoundId id, bool spawn=false, TSpawnEndCallback cb=NULL, void *cbUserParam = NULL, NL3D::CCluster *cluster = 0, CSoundContext *context = 0, UGroupController *groupController = NULL); /// Add a source which was created by an EnvSound @@ -224,7 +223,7 @@ public: /// Return the names of the sounds (call this method after loadSounds()) - virtual void getSoundNames( std::vector &names ) const; + virtual void getSoundNames( std::vector &names ) const; /// Return the number of mixing tracks (voices) virtual uint getPolyphony() const { return (uint)_Tracks.size(); } /// Return the number of sources instance. @@ -445,7 +444,7 @@ private: /// Witch parameter to control TControledParamId ParamId; /// The controled sounds names. - std::vector SoundNames; + std::vector SoundNames; /// Current parameter value float Value; /// All the sources controled by this variable diff --git a/code/nel/include/nel/sound/background_sound.h b/code/nel/include/nel/sound/background_sound.h index bf83f0413..859035687 100644 --- a/code/nel/include/nel/sound/background_sound.h +++ b/code/nel/include/nel/sound/background_sound.h @@ -64,12 +64,22 @@ public: /// Associtation clas for storage of sound / filter. struct TSoundInfo { - NLMISC::CSheetId SoundName; + NLMISC::TStringId SoundName; UAudioMixer::TBackgroundFlags Filter; void serial(NLMISC::IStream &s) { - SoundName.serialString(s, "sound"); + std::string soundName; + if (s.isReading()) + { + s.serial(soundName); + SoundName = NLMISC::CStringMapper::map(soundName); + } + else + { + soundName = NLMISC::CStringMapper::unmap(SoundName); + s.serial(soundName); + } s.serial(Filter); } }; diff --git a/code/nel/include/nel/sound/background_sound_manager.h b/code/nel/include/nel/sound/background_sound_manager.h index 11f33d2be..ad06f610f 100644 --- a/code/nel/include/nel/sound/background_sound_manager.h +++ b/code/nel/include/nel/sound/background_sound_manager.h @@ -229,7 +229,7 @@ private: struct TSoundData { /// The name of the sound. - NLMISC::CSheetId SoundName; + NLMISC::TStringId SoundName; /// The reference to the sound. CSound *Sound; /// A source instance of the sound (may be NULL). diff --git a/code/nel/include/nel/sound/clustered_sound.h b/code/nel/include/nel/sound/clustered_sound.h index ed674f879..4b28a71ec 100644 --- a/code/nel/include/nel/sound/clustered_sound.h +++ b/code/nel/include/nel/sound/clustered_sound.h @@ -19,7 +19,6 @@ #include "nel/misc/types_nl.h" #include "nel/misc/string_mapper.h" -#include "nel/misc/sheet_id.h" #include #include @@ -254,9 +253,9 @@ private: /// The current cluster playing source indexed with sound group id TClusterSoundCont _Sources; - typedef CHashMap TStringSheetMap; + typedef CHashMap TStringStringMap; /// The sound_group to sound assoc - TStringSheetMap _SoundGroupToSound; + TStringStringMap _SoundGroupToSound; }; } // NLSOUND diff --git a/code/nel/include/nel/sound/complex_sound.h b/code/nel/include/nel/sound/complex_sound.h index a55649433..24d889575 100644 --- a/code/nel/include/nel/sound/complex_sound.h +++ b/code/nel/include/nel/sound/complex_sound.h @@ -52,8 +52,8 @@ public: const std::vector &getSoundSeq() const { return _SoundSeq;} const std::vector &getDelaySeq() const { return _DelaySeq;} - NLMISC::CSheetId getSound(uint index) const { return !_Sounds.empty() ? _Sounds[index%_Sounds.size()]:NLMISC::CSheetId::Unknown;} - const std::vector &getSounds() const { return _Sounds;} + NLMISC::TStringId getSound(uint index) const { return !_Sounds.empty() ? _Sounds[index%_Sounds.size()]:0;} + const std::vector &getSounds() const { return _Sounds;} uint32 getFadeLength() const { return _XFadeLength;} @@ -87,7 +87,7 @@ private: virtual float getMaxDistance() const; TPATTERN_MODE _PatternMode; - std::vector _Sounds; + std::vector _Sounds; float _TicksPerSeconds; std::vector _SoundSeq; /// Sequence of delay in millisec. diff --git a/code/nel/include/nel/sound/context_sound.h b/code/nel/include/nel/sound/context_sound.h index eeb29b433..c4ef50ee6 100644 --- a/code/nel/include/nel/sound/context_sound.h +++ b/code/nel/include/nel/sound/context_sound.h @@ -144,7 +144,7 @@ class CContextSoundContainer : public IContextSoundContainer virtual void addSound(CSound *sound, const std::string &baseName) { - const std::string &patternName = sound->getName().toString(); /*NLMISC::CStringMapper::unmap(sound->getName())*/; + const std::string &patternName = NLMISC::CStringMapper::unmap(sound->getName()); nlassert(patternName.size() >= baseName.size()); std::string arg; @@ -183,7 +183,7 @@ class CContextSoundContainer : public IContextSoundContainer if (i != NbJoker) return; - nlassertex(i==NbJoker, ("Error while adding sound '%s' into context sound container", sound->getName().toString().c_str()/*NLMISC::CStringMapper::unmap(sound->getName()).c_str()*/)); + nlassertex(i==NbJoker, ("Error while adding sound '%s' into context sound container", NLMISC::CStringMapper::unmap(sound->getName()).c_str())); sint randomValue = 0; if (UseRandom) @@ -198,7 +198,7 @@ class CContextSoundContainer : public IContextSoundContainer } else if (!arg.empty()) { - nlassertex (!ok, ("Error while adding sound '%s' into context sound container", sound->getName().toString().c_str()/*NLMISC::CStringMapper::unmap(sound->getName()).c_str()*/)); + nlassertex (!ok, ("Error while adding sound '%s' into context sound container", NLMISC::CStringMapper::unmap(sound->getName()).c_str())); // end of the argument. NLMISC::fromString(arg, randomValue); arg.clear(); @@ -210,13 +210,13 @@ class CContextSoundContainer : public IContextSoundContainer // read the potential last arg. if (!arg.empty()) { - nlassertex (!ok, ("Error while adding sound '%s' into context sound container", sound->getName().toString().c_str()/*NLMISC::CStringMapper::unmap(sound->getName()).c_str()*/)); + nlassertex (!ok, ("Error while adding sound '%s' into context sound container", NLMISC::CStringMapper::unmap(sound->getName()).c_str())); // end of the argument. NLMISC::fromString(arg, randomValue); arg.clear(); ok = true; } - nlassertex (ok, ("Error while adding sound '%s' into context sound container", sound->getName().toString().c_str()/*NLMISC::CStringMapper::unmap(sound->getName()).c_str()*/)); + nlassertex (ok, ("Error while adding sound '%s' into context sound container", NLMISC::CStringMapper::unmap(sound->getName()).c_str())); } else @@ -232,9 +232,9 @@ class CContextSoundContainer : public IContextSoundContainer if (!ret.second) { typename THashContextSound::iterator it = _ContextSounds.find(cm); - nlassertex(it != _ContextSounds.end(), ("Error wile adding soudn '%s' into context sound container", sound->getName().toString().c_str()/*NLMISC::CStringMapper::unmap(sound->getName()).c_str()*/)); + nlassertex(it != _ContextSounds.end(), ("Error wile adding soudn '%s' into context sound container", NLMISC::CStringMapper::unmap(sound->getName()).c_str())); - nlwarning("Sound %s has the same context matcher as the sound %s", sound->getName().toString().c_str()/*NLMISC::CStringMapper::unmap(sound->getName()).c_str()*/, it->second->getName().toString().c_str() /*NLMISC::CStringMapper::unmap(it->second->getName()).c_str()*/); + nlwarning("Sound %s has the same context matcher as the sound %s", NLMISC::CStringMapper::unmap(sound->getName()).c_str(), NLMISC::CStringMapper::unmap(it->second->getName()).c_str()); } } @@ -260,7 +260,7 @@ class CContextSoundContainer : public IContextSoundContainer typename THashContextSound::const_iterator first(_ContextSounds.begin()), last(_ContextSounds.end()); for (; first != last; ++first) { - subsounds.push_back(std::make_pair(first->second->getName().toString()/*NLMISC::CStringMapper::unmap(first->second->getName())*/, first->second)); + subsounds.push_back(std::make_pair(NLMISC::CStringMapper::unmap(first->second->getName()), first->second)); } } diff --git a/code/nel/include/nel/sound/sound.h b/code/nel/include/nel/sound/sound.h index 403034a8d..f81f6a9b7 100644 --- a/code/nel/include/nel/sound/sound.h +++ b/code/nel/include/nel/sound/sound.h @@ -22,7 +22,6 @@ #include "nel/misc/string_mapper.h" #include "nel/sound/u_source.h" #include "nel/georges/u_form_elm.h" -#include "nel/misc/sheet_id.h" #include namespace NLSOUND { @@ -36,7 +35,7 @@ class CGroupController; /// Sound names hash map //typedef std::hash_map TSoundMap; -typedef CHashMap TSoundMap; +typedef CHashMap TSoundMap; /// Sound names set (for ambiant sounds) typedef std::set TSoundSet; @@ -54,7 +53,7 @@ class CSound friend class CAudioMixerUser; public: /// Factory for specialized sound. - static CSound *createSound(const std::string &name, NLGEORGES::UFormElm& formRoot); + static CSound *createSound(const std::string &filename, NLGEORGES::UFormElm& formRoot); enum TSOUND_TYPE { @@ -100,7 +99,7 @@ public: /// Return the length of the sound in ms virtual uint32 getDuration() = 0; /// Return the name (must be unique) - const NLMISC::CSheetId& getName() const { return _Name; } + const NLMISC::TStringId& getName() const { return _Name; } /// Return the min distance (if detailed()) (default 1.0f if not implemented by sound type) virtual float getMinDistance() const { return _MinDist; } @@ -122,8 +121,7 @@ public: bool operator<( const CSound& otherSound ) const { - //return NLMISC::CStringMapper::unmap(_Name) < NLMISC::CStringMapper::unmap(otherSound._Name); - return _Name.toString() < otherSound._Name.toString(); + return NLMISC::CStringMapper::unmap(_Name) < NLMISC::CStringMapper::unmap(otherSound._Name); } protected: @@ -144,7 +142,7 @@ protected: float _MaxDist; // Sound name. - NLMISC::CSheetId _Name; + NLMISC::TStringId _Name; /// An optional user var controler. NLMISC::TStringId _UserVarControler; diff --git a/code/nel/include/nel/sound/sound_anim_marker.h b/code/nel/include/nel/sound/sound_anim_marker.h index 8a00a1bed..583febbfc 100644 --- a/code/nel/include/nel/sound/sound_anim_marker.h +++ b/code/nel/include/nel/sound/sound_anim_marker.h @@ -20,7 +20,6 @@ #include "nel/misc/string_mapper.h" #include "nel/3d/cluster.h" #include "nel/sound/u_source.h" -#include "nel/misc/sheet_id.h" namespace NLMISC @@ -32,7 +31,7 @@ namespace NLMISC namespace NLSOUND { -typedef std::set TMarkerSoundSet; +typedef std::set TMarkerSoundSet; class UAudioMixer; @@ -51,13 +50,13 @@ public: virtual float getTime() const { return _Time; } /** Add a new sound in the set of to-be-played sounds for this marker */ - virtual void addSound(const NLMISC::CSheetId &soundName); + virtual void addSound(const NLMISC::TStringId &soundName); /** Remove a sound */ - virtual void removeSound(const NLMISC::CSheetId &soundName); + virtual void removeSound(const NLMISC::TStringId &soundName); /** Return the set of sounds of this marker */ - virtual void getSounds(std::vector &sounds); + virtual void getSounds(std::vector &sounds); /** Play all the sounds of this marker */ virtual void play(UAudioMixer* mixer, NL3D::CCluster *cluster, CSoundContext &context); diff --git a/code/nel/include/nel/sound/sound_bank.h b/code/nel/include/nel/sound/sound_bank.h index 05993bb07..7d3d7e446 100644 --- a/code/nel/include/nel/sound/sound_bank.h +++ b/code/nel/include/nel/sound/sound_bank.h @@ -20,7 +20,6 @@ #include "nel/misc/types_nl.h" #include "nel/misc/string_mapper.h" #include "nel/sound/audio_mixer_user.h" -#include "nel/misc/sheet_id.h" #include namespace NLSOUND { @@ -68,16 +67,16 @@ public: bool isLoaded(); /// Return a sound corresponding to a name. - CSound *getSound(const NLMISC::CSheetId &sheetId); + CSound *getSound(const NLMISC::TStringId &name); /// Return the names of the sounds - void getNames( std::vector &sheetIds ); + void getNames( std::vector &names ); /// Return the number of sounds in this bank. uint countSounds(); void addSound(CSound *sound); - void removeSound(const NLMISC::CSheetId &sheetId); + void removeSound(const NLMISC::TStringId &name); private: @@ -89,8 +88,7 @@ private: typedef CHashMap TBufferAssocContainer; /// Sound names hash map // typedef std::hash_map TSoundTable; -// typedef CHashMap TSoundTable; - typedef std::vector TSoundTable; // list the sheets by shortId of the sheetId + typedef CHashMap TSoundTable; /// Assoc from buffer to sound. Used for sound unloading. TBufferAssocContainer _BufferAssoc; diff --git a/code/nel/include/nel/sound/source_common.h b/code/nel/include/nel/sound/source_common.h index 2369b9a7d..96f11aabe 100644 --- a/code/nel/include/nel/sound/source_common.h +++ b/code/nel/include/nel/sound/source_common.h @@ -23,7 +23,6 @@ #include "nel/3d/cluster.h" #include "nel/sound/sound.h" #include "nel/sound/group_controller.h" -#include "nel/misc/sheet_id.h" namespace NLSOUND { diff --git a/code/nel/include/nel/sound/u_audio_mixer.h b/code/nel/include/nel/sound/u_audio_mixer.h index c3059152c..089013797 100644 --- a/code/nel/include/nel/sound/u_audio_mixer.h +++ b/code/nel/include/nel/sound/u_audio_mixer.h @@ -19,7 +19,6 @@ #include "nel/misc/types_nl.h" #include "nel/misc/string_mapper.h" -#include "nel/misc/sheet_id.h" #include "nel/sound/u_source.h" #include "nel/sound/u_group_controller.h" #include "nel/ligo/primitive.h" @@ -285,7 +284,7 @@ public: //@} /// Get a TSoundId from a name (returns NULL if not found) - virtual TSoundId getSoundId( const NLMISC::CSheetId &name ) = 0; + virtual TSoundId getSoundId( const NLMISC::TStringId &name ) = 0; /// Gets the group controller for the given group tree path with separator '/', if it doesn't exist yet it will be created. /// Examples: "music", "effects", "dialog", "music/background", "music/loading", "music/player", etcetera @@ -297,7 +296,7 @@ public: * pass a callback function that will be called (if not NULL) just before deleting the spawned * source. */ - virtual USource *createSource(const NLMISC::CSheetId &name, bool spawn=false, TSpawnEndCallback cb=NULL, void *callbackUserParam = NULL, NL3D::CCluster *cluster = 0, CSoundContext *context = 0, UGroupController *groupController = NULL) = 0; + virtual USource *createSource(const NLMISC::TStringId &name, bool spawn=false, TSpawnEndCallback cb=NULL, void *callbackUserParam = NULL, NL3D::CCluster *cluster = 0, CSoundContext *context = 0, UGroupController *groupController = NULL) = 0; /// Add a logical sound source (by sound id). To remove a source, just delete it. See createSource(const char*) virtual USource *createSource(TSoundId id, bool spawn=false, TSpawnEndCallback cb=NULL, void *callbackUserParam = NULL, NL3D::CCluster *cluster = 0, CSoundContext *context = 0, UGroupController *groupController = NULL) = 0; @@ -321,7 +320,7 @@ public: //@{ //@name Statistic and utility methods /// Fill a vector with the names of all loaded sounds. - virtual void getSoundNames( std::vector &names ) const = 0; + virtual void getSoundNames( std::vector &names ) const = 0; /// Return the number of mixing tracks (voices) virtual uint getPolyphony() const = 0; /// Return the number of sources diff --git a/code/nel/samples/sound/sound_sources/main.cpp b/code/nel/samples/sound/sound_sources/main.cpp index 75f732b5a..006a5ad41 100644 --- a/code/nel/samples/sound/sound_sources/main.cpp +++ b/code/nel/samples/sound/sound_sources/main.cpp @@ -49,7 +49,6 @@ void Init() { try { - CSheetId::initWithoutSheet(); CPath::addSearchPath(NL_SOUND_DATA"/data", true, false); @@ -101,7 +100,7 @@ USource *OnAddSource( const char *name, float x, float y, float z ) /* * Create a source with sound 'name', and set some of its initial properties, if successful */ - USource *source = AudioMixer->createSource(CSheetId(name, "sound")); + USource *source = AudioMixer->createSource( CStringMapper::map(name) ); if ( source != NULL ) { source->setPos( CVector(x,y,z) ); diff --git a/code/nel/samples/sound/stream_file/stream_file.cpp b/code/nel/samples/sound/stream_file/stream_file.cpp index 6362a0414..cd40d6b76 100644 --- a/code/nel/samples/sound/stream_file/stream_file.cpp +++ b/code/nel/samples/sound/stream_file/stream_file.cpp @@ -62,7 +62,6 @@ static void initSample() { if (!INelContext::isContextInitialised()) new CApplicationContext(); - CSheetId::initWithoutSheet(); CPath::addSearchPath(NL_SOUND_DATA"/data", true, false); printf("Sample demonstrating OGG playback using stream file .sound sheets."); @@ -98,7 +97,7 @@ static void initSample() //NLMISC::CHTimer::startBench(); - s_Source = s_AudioMixer->createSource(CSheetId("stream_file.sound")); + s_Source = s_AudioMixer->createSource(CStringMapper::map("stream_file")); nlassert(s_Source); s_StreamFileSource = dynamic_cast(s_Source); nlassert(s_StreamFileSource); diff --git a/code/nel/samples/sound/stream_ogg_vorbis/stream_ogg_vorbis.cpp b/code/nel/samples/sound/stream_ogg_vorbis/stream_ogg_vorbis.cpp index 1f491b21c..6f3f0d19c 100644 --- a/code/nel/samples/sound/stream_ogg_vorbis/stream_ogg_vorbis.cpp +++ b/code/nel/samples/sound/stream_ogg_vorbis/stream_ogg_vorbis.cpp @@ -59,7 +59,6 @@ static void initSample() { if (!INelContext::isContextInitialised()) new CApplicationContext(); - CSheetId::initWithoutSheet(); CPath::addSearchPath(NL_SOUND_DATA"/database/build/", true, false); printf("Sample demonstrating OGG playback using UStreamSource."); @@ -88,7 +87,7 @@ static void initSample() //NLMISC::CHTimer::startBench(); - USource *source = s_AudioMixer->createSource(CSheetId("default_stream.sound")); + USource *source = s_AudioMixer->createSource(CStringMapper::map("default_stream")); nlassert(source); s_StreamSource = dynamic_cast(source); nlassert(s_StreamSource); diff --git a/code/nel/src/3d/ps_sound.cpp b/code/nel/src/3d/ps_sound.cpp index d0b82adb2..1504cd212 100644 --- a/code/nel/src/3d/ps_sound.cpp +++ b/code/nel/src/3d/ps_sound.cpp @@ -49,7 +49,7 @@ CPSSound::CPSSound() : _Gain(1.f), { NL_PS_FUNC(CPSSound_CPSSound) if (CParticleSystem::getSerializeIdentifierFlag()) _Name = std::string("sound"); - _SoundName = NLMISC::CSheetId::Unknown /*NLMISC::CStringMapper::emptyId()*/; + _SoundName = NLMISC::CStringMapper::emptyId(); } // *************************************************************************************************** @@ -270,13 +270,18 @@ void CPSSound::serial(NLMISC::IStream &f) // FIXME: CPSSound is reserialized from the _ParticleSystemProto // cache when a non-_Shared particle system is instanced, this - // causes unnecessary sheet id lookups from string. - // SLN1: Serialize as uint32, but this requires the editor to know - // the correct sheet id (and thus requires a built sheet_id.bin). - // SLN2: Create a tool that reserializes all ps with sound sheet id - // instead of sheet names, based on a global flag, and serialize - // a flag that specifies if the ps is serialized with id or name. - _SoundName.serialString(f, "sound"); + // causes unnecessary id lookups from string. + if (f.isReading()) + { + std::string soundName; + f.serial(soundName); + _SoundName = NLMISC::CStringMapper::map(soundName); + } + else + { + std::string soundName = NLMISC::CStringMapper::unmap(_SoundName); + f.serial(soundName); + } sint32 nbSounds; bool hasScheme; diff --git a/code/nel/src/sound/audio_mixer_user.cpp b/code/nel/src/sound/audio_mixer_user.cpp index 7ea0e5d6e..23f72644c 100644 --- a/code/nel/src/sound/audio_mixer_user.cpp +++ b/code/nel/src/sound/audio_mixer_user.cpp @@ -23,7 +23,6 @@ #include "nel/misc/command.h" #include "nel/misc/file.h" #include "nel/misc/path.h" -#include "nel/misc/sheet_id.h" #include "nel/georges/u_form_loader.h" #include "nel/georges/u_form_elm.h" @@ -1058,8 +1057,9 @@ public: for (uint i=0; igetArrayValue(soundName, i); - nlassert(soundName.find(".sound") != std::string::npos); - cs.SoundNames.push_back(CSheetId(soundName)); + soundName = soundName.substr(0, soundName.find(".sound")); + + cs.SoundNames.push_back(CStringMapper::map(soundName)); } if (!cs.SoundNames.empty()) @@ -1109,7 +1109,7 @@ void CAudioMixerUser::initUserVar() TUserVarControlsContainer::iterator first(_UserVarControls.begin()), last(_UserVarControls.end()); for(; first != last; ++first) { - std::vector::iterator first2(first->second.SoundNames.begin()), last2(first->second.SoundNames.end()); + std::vector::iterator first2(first->second.SoundNames.begin()), last2(first->second.SoundNames.end()); for (; first2 != last2; ++first2) { CSound *sound = getSoundId(*first2); @@ -1140,7 +1140,7 @@ void CAudioMixerUser::CControledSources::serial(NLMISC::IStream &s) for (uint i=0; igetSound(name); } @@ -1902,7 +1902,7 @@ retrySound: if (invalid) { - nlwarning("The sound %s contain an infinite recursion !", id->getName().toString().c_str()/*CStringMapper::unmap(id->getName()).c_str()*/); + nlwarning("The sound %s contain an infinite recursion !", CStringMapper::unmap(id->getName()).c_str()); return NULL; } @@ -2043,7 +2043,7 @@ retrySound: // ****************************************************************** -USource *CAudioMixerUser::createSource( const NLMISC::CSheetId &name, bool spawn, TSpawnEndCallback cb, void *userParam, NL3D::CCluster *cluster, CSoundContext *context, UGroupController *groupController) +USource *CAudioMixerUser::createSource( const NLMISC::TStringId &name, bool spawn, TSpawnEndCallback cb, void *userParam, NL3D::CCluster *cluster, CSoundContext *context, UGroupController *groupController) { return createSource( getSoundId( name ), spawn, cb, userParam, cluster, context, groupController); } @@ -2170,7 +2170,7 @@ bool CAudioMixerUser::unloadSampleBank(const std::string &name) // ****************************************************************** -void CAudioMixerUser::getSoundNames( std::vector &names ) const +void CAudioMixerUser::getSoundNames( std::vector &names ) const { _SoundBank->getNames(names); } @@ -2320,6 +2320,7 @@ void CAudioMixerUser::getLoadedSampleBankInfo(std::vectorgetValueByName(soundName, "Sound"); - nlassert(soundName.find(".sound") != std::string::npos); - sound.SoundName = NLMISC::CSheetId(soundName); + sound.SoundName = CStringMapper::map(CFile::getFilenameWithoutExtension(soundName)); // Read the environnement flag. @@ -134,7 +133,7 @@ void CBackgroundSound::getSubSoundList(std::vectorgetSoundId(first->SoundName); - subsounds.push_back(make_pair(first->SoundName.toString()/*CStringMapper::unmap(first->SoundName)*/, sound)); + subsounds.push_back(make_pair(CStringMapper::unmap(first->SoundName), sound)); } } diff --git a/code/nel/src/sound/background_sound_manager.cpp b/code/nel/src/sound/background_sound_manager.cpp index 4713d03f8..c93e0bab0 100644 --- a/code/nel/src/sound/background_sound_manager.cpp +++ b/code/nel/src/sound/background_sound_manager.cpp @@ -86,7 +86,7 @@ void CBackgroundSoundManager::addSound(const std::string &soundName, uint layerI CAudioMixerUser *mixer = CAudioMixerUser::instance(); TSoundData sd; - sd.SoundName = NLMISC::CSheetId(soundName, "sound"); // note: loaded from .primitive + sd.SoundName = CStringMapper::map(soundName); sd.Sound = mixer->getSoundId(sd.SoundName); sd.Source = 0; @@ -133,7 +133,7 @@ void CBackgroundSoundManager::addSound(const std::string &soundName, uint layerI } else { - nlwarning ("The sound '%s' can't be loaded", sd.SoundName.toString().c_str()/*CStringMapper::unmap(sd.SoundName).c_str()*/); + nlwarning ("The sound '%s' can't be loaded", CStringMapper::unmap(sd.SoundName).c_str()); } } @@ -1431,15 +1431,21 @@ void CBackgroundSoundManager::TBanksData::serial(NLMISC::IStream &s) void CBackgroundSoundManager::TSoundData::serial(NLMISC::IStream &s) { - //std::string str; - SoundName.serialString(s, "sound"); + std::string str; + if (s.isReading()) { CAudioMixerUser *mixer = CAudioMixerUser::instance(); + s.serial(str); + SoundName = NLMISC::CStringMapper::map(str); Sound = mixer->getSoundId(SoundName); Source = NULL; Selected = false; } + else + { + s.serial(const_cast(NLMISC::CStringMapper::unmap(SoundName))); + } s.serial(MinBox); s.serial(MaxBox); s.serial(Surface); diff --git a/code/nel/src/sound/clustered_sound.cpp b/code/nel/src/sound/clustered_sound.cpp index 25f0e5b64..6e62f3176 100644 --- a/code/nel/src/sound/clustered_sound.cpp +++ b/code/nel/src/sound/clustered_sound.cpp @@ -70,7 +70,7 @@ float EAX_MATERIAL_PARAM[] = class CSoundGroupSerializer { public: - std::vector > _SoundGroupAssoc; + std::vector > _SoundGroupAssoc; // load the values using the george sheet (called by GEORGE::loadForm) void readGeorges (const NLMISC::CSmartPtr &form, const std::string &/* name */) @@ -95,9 +95,15 @@ public: item->getValueByName(soundGroup, ".SoundGroup"); item->getValueByName(sound, ".Sound"); - nlassert(sound.find(".sound") != std::string::npos); + string::size_type n = sound.rfind(".sound"); - _SoundGroupAssoc.push_back(make_pair(CStringMapper::map(soundGroup), CSheetId(sound))); + if (n != string::npos) + { + // remove the tailing .sound + sound = sound.substr(0, n); + } + + _SoundGroupAssoc.push_back(make_pair(CStringMapper::map(soundGroup), CStringMapper::map(sound))); } } catch(...) @@ -119,18 +125,24 @@ public: { if (s.isReading()) { - TStringId soundGroup; - CSheetId sound; + std::string soundGroup; + std::string sound; - CStringMapper::serialString(s, soundGroup); - sound.serialString(s, "sound"); + s.serial(soundGroup); + s.serial(sound); - _SoundGroupAssoc.push_back(make_pair(soundGroup, sound)); + _SoundGroupAssoc.push_back(make_pair(CStringMapper::map(soundGroup), CStringMapper::map(sound))); } else { - CStringMapper::serialString(s, _SoundGroupAssoc[i].first); - _SoundGroupAssoc[i].second.serialString(s, "sound"); + std::string soundGroup; + std::string sound; + + soundGroup = CStringMapper::unmap(_SoundGroupAssoc[i].first); + sound = CStringMapper::unmap(_SoundGroupAssoc[i].second); + + s.serial(soundGroup); + s.serial(sound); } } } @@ -277,10 +289,10 @@ void CClusteredSound::update(const CVector &listenerPos, const CVector &/* view // nldebug("Searching sound assoc for group [%s]", CStringMapper::unmap(soundGroup).c_str()); - TStringSheetMap::iterator it2(_SoundGroupToSound.find(soundGroup)); + TStringStringMap::iterator it2(_SoundGroupToSound.find(soundGroup)); if (it2 != _SoundGroupToSound.end()) { - NLMISC::CSheetId soundName = it2->second; + NLMISC::TStringId soundName = it2->second; CClusterSound cs; // nldebug("Found the sound [%s] for sound group [%s]", CStringMapper::unmap(soundName).c_str(), CStringMapper::unmap(soundGroup).c_str()); diff --git a/code/nel/src/sound/complex_sound.cpp b/code/nel/src/sound/complex_sound.cpp index 9e0ab2022..30b97347f 100644 --- a/code/nel/src/sound/complex_sound.cpp +++ b/code/nel/src/sound/complex_sound.cpp @@ -19,7 +19,6 @@ #include "nel/misc/path.h" #include "nel/misc/common.h" #include "nel/sound/audio_mixer_user.h" -#include "nel/misc/sheet_id.h" using namespace std; using namespace NLMISC; @@ -64,11 +63,11 @@ void CComplexSound::parseSequence(const std::string &str, std::vector &s void CComplexSound::getSubSoundList(std::vector > &subsounds) const { CAudioMixerUser *mixer = CAudioMixerUser::instance(); - std::vector::const_iterator first(_Sounds.begin()), last(_Sounds.end()); + std::vector::const_iterator first(_Sounds.begin()), last(_Sounds.end()); for (; first != last; ++first) { CSound *sound = mixer->getSoundId(*first); - subsounds.push_back(make_pair((*first).toString()/*CStringMapper::unmap(*first)*/, sound)); + subsounds.push_back(make_pair(CStringMapper::unmap(*first), sound)); } } @@ -84,7 +83,7 @@ uint32 CComplexSound::getDuration() CAudioMixerUser *mixer = CAudioMixerUser::instance(); vector durations; - std::vector::iterator first(_Sounds.begin()), last(_Sounds.end()); + std::vector::iterator first(_Sounds.begin()), last(_Sounds.end()); for (; first != last; ++first) { CSound *sound = mixer->getSoundId(*first); @@ -205,7 +204,7 @@ float CComplexSound::getMaxDistance() const CComplexSound *This = const_cast(this); This->_MaxDist = 0.0f; - std::vector::const_iterator first(_Sounds.begin()), last(_Sounds.end()); + std::vector::const_iterator first(_Sounds.begin()), last(_Sounds.end()); for (; first != last; ++first) { @@ -237,7 +236,7 @@ void CComplexSound::serial(NLMISC::IStream &s) { std::string name; s.serial(name); - _Sounds.push_back(NLMISC::CSheetId(name, "sound")); + _Sounds.push_back(CStringMapper::map(name)); } } else @@ -246,7 +245,7 @@ void CComplexSound::serial(NLMISC::IStream &s) s.serial(nb); for (uint i=0; igetArrayValue(soundname, i)) { - nlassert(soundname.find(".sound") != std::string::npos); - _Sounds.push_back(NLMISC::CSheetId(soundname)); + soundname = CFile::getFilenameWithoutExtension(soundname); + _Sounds.push_back(CStringMapper::map(soundname)); } } } diff --git a/code/nel/src/sound/complex_source.cpp b/code/nel/src/sound/complex_source.cpp index 3caee06f6..86cb29d12 100644 --- a/code/nel/src/sound/complex_source.cpp +++ b/code/nel/src/sound/complex_source.cpp @@ -191,9 +191,9 @@ void CComplexSource::playStuf() case CComplexSound::MODE_ALL_IN_ONE: { // just spanw all the listed source. - const std::vector &sounds = _PatternSound->getSounds(); + const std::vector &sounds = _PatternSound->getSounds(); - std::vector::const_iterator first(sounds.begin()), last(sounds.end()); + std::vector::const_iterator first(sounds.begin()), last(sounds.end()); if (_AllSources.empty()) { @@ -525,7 +525,7 @@ void CComplexSource::onUpdate() else { // no sound after, just set an event at end of current sound to stop the complex sound. - nldebug("Setting last event for sound %s in %u millisec.", _Source1->getSound()->getName().toString().c_str()/*CStringMapper::unmap(_Source1->getSound()->getName()).c_str()*/, _Source1->getSound()->getDuration()); + nldebug("Setting last event for sound %s in %u millisec.", CStringMapper::unmap(_Source1->getSound()->getName()).c_str(), _Source1->getSound()->getDuration()); if (_PatternSound->doFadeOut()) { // set the event to begin fade out. diff --git a/code/nel/src/sound/context_sound.cpp b/code/nel/src/sound/context_sound.cpp index fe2512ac0..932a69f19 100644 --- a/code/nel/src/sound/context_sound.cpp +++ b/code/nel/src/sound/context_sound.cpp @@ -187,7 +187,7 @@ void CContextSound::init() } else { - nlassertex(nbJoker < SoundContextNbArgs, ("Error will trying to play ContextSound '%s'", _Name.toString().c_str()/*CStringMapper::unmap(_Name).c_str()*/)); + nlassertex(nbJoker < SoundContextNbArgs, ("Error will trying to play ContextSound '%s'", CStringMapper::unmap(_Name).c_str())); fromString(index, contextArgIndex[nbJoker++]); parseArg = false; index.clear(); @@ -195,13 +195,13 @@ void CContextSound::init() } else if (*first == 'r') { - nlassertex(useRandom == false, ("Error will trying to play ContextSound '%s'", _Name.toString().c_str()/*CStringMapper::unmap(_Name).c_str()*/)); + nlassertex(useRandom == false, ("Error will trying to play ContextSound '%s'", CStringMapper::unmap(_Name).c_str())); useRandom = true; } } else if (*first == '%') { - nlassertex(useRandom == false, ("Error will trying to play ContextSound '%s'", _Name.toString().c_str()/*CStringMapper::unmap(_Name).c_str()*/)); + nlassertex(useRandom == false, ("Error will trying to play ContextSound '%s'", CStringMapper::unmap(_Name).c_str())); parseArg = true; } } @@ -215,7 +215,7 @@ void CContextSound::init() } else { - nlassertex(nbJoker < SoundContextNbArgs, ("Error will trying to play ContextSound '%s'", _Name.toString().c_str()/*CStringMapper::unmap(_Name).c_str()*/)); + nlassertex(nbJoker < SoundContextNbArgs, ("Error will trying to play ContextSound '%s'", CStringMapper::unmap(_Name).c_str())); fromString(index, contextArgIndex[nbJoker++]); parseArg = false; } @@ -247,7 +247,7 @@ void CContextSound::init() LM_CASE_CONTAINER_CREATOR(9) LM_CASE_CONTAINER_CREATOR(10) default: - nlwarning("Unsuported number of context argument in context sound '%s'!", _Name.toString().c_str()/*CStringMapper::unmap(_Name).c_str()*/); + nlwarning("Unsuported number of context argument in context sound '%s'!", CStringMapper::unmap(_Name).c_str()); return; } // cleanup macro @@ -257,14 +257,14 @@ void CContextSound::init() // ok, we have the container, now fill it with the sound { - std::vector allSounds; + std::vector allSounds; // CSoundBank::getSoundNames(allSounds); CAudioMixerUser::instance()->getSoundNames(allSounds); - std::vector::iterator first(allSounds.begin()), last(allSounds.end()); + std::vector::iterator first(allSounds.begin()), last(allSounds.end()); for (; first != last; ++first) { - const std::string &soundName = first->toString()/*CStringMapper::unmap(*first)*/; + const std::string &soundName = CStringMapper::unmap(*first); if (soundName.size() > _BaseName.size()) { uint i; diff --git a/code/nel/src/sound/sound.cpp b/code/nel/src/sound/sound.cpp index 6c204be10..5963ccc5b 100644 --- a/code/nel/src/sound/sound.cpp +++ b/code/nel/src/sound/sound.cpp @@ -133,9 +133,18 @@ void CSound::serial(NLMISC::IStream &s) s.serial(_Direction); s.serial(_Looping); s.serial(_MaxDist); - - _Name.serialString(s, "sound"); - + if (s.isReading()) + { + std::string name; + s.serial(name); + _Name = CStringMapper::map(name); + } + else + { + std::string name = CStringMapper::unmap(_Name); + s.serial(name); + } + nlassert(CGroupControllerRoot::isInitialized()); // not sure #if NLSOUND_SHEET_VERSION_BUILT < 2 if (s.isReading()) _GroupController = CGroupControllerRoot::getInstance()->getGroupController(NLSOUND_SHEET_V1_DEFAULT_SOUND_GROUP_CONTROLLER); @@ -161,8 +170,7 @@ void CSound::serial(NLMISC::IStream &s) void CSound::importForm(const std::string& filename, NLGEORGES::UFormElm& root) { // Name - nlassert(filename.find(".sound") != std::string::npos); - _Name = NLMISC::CSheetId(filename); + _Name = CStringMapper::map(CFile::getFilenameWithoutExtension(filename)); // InternalConeAngle uint32 inner; diff --git a/code/nel/src/sound/sound_anim_marker.cpp b/code/nel/src/sound/sound_anim_marker.cpp index b64e02f3c..cf1198280 100644 --- a/code/nel/src/sound/sound_anim_marker.cpp +++ b/code/nel/src/sound/sound_anim_marker.cpp @@ -53,19 +53,19 @@ void CSoundAnimMarker::play(UAudioMixer* mixer, NL3D::CCluster *cluster, CSoundC // ******************************************************** -void CSoundAnimMarker::addSound(const NLMISC::CSheetId& soundName) +void CSoundAnimMarker::addSound(const NLMISC::TStringId& soundName) { pair inserted; inserted = _Sounds.insert(soundName); if (inserted.second == false) { - nlwarning("Duplicate sound (%s)",/* CStringMapper::unmap(soundName).c_str()*/soundName.toString().c_str()); + nlwarning("Duplicate sound (%s)", CStringMapper::unmap(soundName).c_str()); } } // ******************************************************** -void CSoundAnimMarker::removeSound(const NLMISC::CSheetId &soundName) +void CSoundAnimMarker::removeSound(const NLMISC::TStringId &soundName) { TMarkerSoundSet::iterator iter = _Sounds.find(soundName); if (iter != _Sounds.end()) @@ -74,13 +74,13 @@ void CSoundAnimMarker::removeSound(const NLMISC::CSheetId &soundName) } else { - nlwarning("No sound was removed (%s)", soundName.toString().c_str()/*CStringMapper::unmap(soundName).c_str()*/); + nlwarning("No sound was removed (%s)", CStringMapper::unmap(soundName).c_str()); } } // ******************************************************** -void CSoundAnimMarker::getSounds(vector &sounds) +void CSoundAnimMarker::getSounds(vector &sounds) { sounds.insert(sounds.end(), _Sounds.begin(), _Sounds.end()); diff --git a/code/nel/src/sound/sound_animation.cpp b/code/nel/src/sound/sound_animation.cpp index 1d1f9093a..1f80b6223 100644 --- a/code/nel/src/sound/sound_animation.cpp +++ b/code/nel/src/sound/sound_animation.cpp @@ -73,7 +73,7 @@ void CSoundAnimation::save() { // File stream COFile file; - vector sounds; + vector sounds; // Open the file if (!file.open(_Filename.c_str())) @@ -108,11 +108,11 @@ void CSoundAnimation::save() marker->getSounds(sounds); - vector::iterator iter2; + vector::iterator iter2; for (iter2 = sounds.begin(); iter2 != sounds.end(); iter2++) { xmlNodePtr soundNode = xmlNewChild ( markerNode, NULL, (const xmlChar*)"SOUND", NULL ); - xmlSetProp (soundNode, (const xmlChar*)"name", (const xmlChar*)iter2->toString().c_str() /*CStringMapper::unmap(*iter2).c_str()*/); + xmlSetProp (soundNode, (const xmlChar*)"name", (const xmlChar*) CStringMapper::unmap(*iter2).c_str()); } sounds.clear(); @@ -193,7 +193,7 @@ void CSoundAnimation::load() throw NLMISC::Exception("Invalid sound animation marker"); } - marker->addSound(NLMISC::CSheetId(string(name), "sound")); + marker->addSound(CStringMapper::map(string(name))); xmlFree ((void*)name); diff --git a/code/nel/src/sound/sound_bank.cpp b/code/nel/src/sound/sound_bank.cpp index 29621d337..5ffc8927b 100644 --- a/code/nel/src/sound/sound_bank.cpp +++ b/code/nel/src/sound/sound_bank.cpp @@ -127,16 +127,14 @@ CSoundBank::~CSoundBank() void CSoundBank::addSound(CSound *sound) { - // nlassert(_Sounds.size() > sound->getName().getShortId()); - // nldebug("SOUNDBANK: Add %s", sound->getName().toString().c_str()); - if (_Sounds.size() <= sound->getName().getShortId()) - _Sounds.resize(sound->getName().getShortId() + 1); - _Sounds[sound->getName().getShortId()] = sound; + std::pair ret; + ret = _Sounds.insert(make_pair(sound->getName(), sound)); + nlassert(ret.second); } -void CSoundBank::removeSound(const NLMISC::CSheetId &sheetId) +void CSoundBank::removeSound(const NLMISC::TStringId &name) { - _Sounds[sheetId.getShortId()] = NULL; + _Sounds.erase(name); } @@ -264,59 +262,35 @@ public: void CSoundBank::load(const std::string &packedSheetDir, bool packedSheetUpdate) { // this structure is fill by the loadForm() function and will contain all you need - std::map container; // load the old way for compatibility + std::map Container; nlassert(!_Loaded); // Just call the GEORGE::loadFrom method to read all available sounds - ::loadForm("sound", packedSheetDir + "sounds.packed_sheets", container, packedSheetUpdate, false); + ::loadForm("sound", packedSheetDir + "sounds.packed_sheets", Container, packedSheetUpdate, false); _Loaded = true; - // get the largest sheet id needed and init the sound bank - uint32 maxShortId = 0; - { - std::map::iterator first(container.begin()), last(container.end()); - for (; first != last; ++first) - { - if (first->second.Sound != 0) - if (first->second.Sound->getName().getShortId() > maxShortId) - maxShortId = first->second.Sound->getName().getShortId(); - } - ++maxShortId; // inc for size = last idx + 1 - if (container.empty()) - { - nlwarning("NLSOUND: No sound sheets have been loaded, missing sound sheet directory or packed sound sheets file"); - } - else - { - nlassert(maxShortId < (container.size() * 8)); // ensure no ridiculous sheet id values - if (maxShortId > _Sounds.size()) - _Sounds.resize(maxShortId); - } - } - // add all the loaded sound in the sound banks + std::map::iterator first(Container.begin()), last(Container.end()); + for (; first != last; ++first) { - std::map::iterator first(container.begin()), last(container.end()); - for (; first != last; ++first) - { - if (first->second.Sound != 0) - addSound(first->second.Sound); - } + if (first->second.Sound != 0) + addSound(first->second.Sound); } - container.clear(); + Container.clear(); } /* * Unload all the sound samples in this bank. */ -void CSoundBank::unload() +void CSoundBank::unload() { nlassert(_Loaded); - for (TSoundTable::size_type i = 0; i < _Sounds.size(); ++i) + TSoundTable::iterator first(_Sounds.begin()), last(_Sounds.end()); + for (; first != last; ++first) { - delete _Sounds[i]; + delete first->second; } _Sounds.clear(); @@ -350,7 +324,7 @@ void CSoundBank::unload() /* * Returns true if the samples in this bank have been loaded. */ -bool CSoundBank::isLoaded() +bool CSoundBank::isLoaded() { return _Loaded; } @@ -358,38 +332,37 @@ bool CSoundBank::isLoaded() /* * Return a sound sample corresponding to a name. */ -CSound* CSoundBank::getSound(const NLMISC::CSheetId &sheetId) +CSound* CSoundBank::getSound(const NLMISC::TStringId &name) { - if (sheetId == NLMISC::CSheetId::Unknown) - return NULL; - - // nlassert(sheetId.getShortId() < _Sounds.size()); - if (sheetId.getShortId() >= _Sounds.size()) + // Find sound + TSoundTable::iterator iter = _Sounds.find(name); + if ( iter == _Sounds.end() ) { - std::string sheetName = sheetId.toString(); - nldebug("NLSOUND: Sound sheet id '%s' exceeds loaded sound sheets", sheetName.c_str()); - return NULL; + return 0; + } + else + { + return (*iter).second; } - - return _Sounds[sheetId.getShortId()]; } /** * Return the names of the sounds */ -void CSoundBank::getNames( std::vector &sheetIds ) +void CSoundBank::getNames( std::vector &names ) { - for (TSoundTable::size_type i = 0; i < _Sounds.size(); ++i) + TSoundTable::const_iterator iter; + for (iter = _Sounds.begin(); iter != _Sounds.end(); ++iter) { - if (_Sounds[i]) - sheetIds.push_back(_Sounds[i]->getName()); + names.push_back((*iter).first); + //nlwarning("getting sound %s", (*iter).first); } } /* * Return the number of buffers in this bank. */ -uint CSoundBank::countSounds() +uint CSoundBank::countSounds() { return (uint)_Sounds.size(); } diff --git a/code/nel/src/sound/stream_file_sound.cpp b/code/nel/src/sound/stream_file_sound.cpp index fbf0c91a1..83641cdf7 100644 --- a/code/nel/src/sound/stream_file_sound.cpp +++ b/code/nel/src/sound/stream_file_sound.cpp @@ -73,13 +73,11 @@ void CStreamFileSound::serial(NLMISC::IStream &s) void CStreamFileSound::setMusicFilePath(const std::string &filePath, bool async, bool loop) { -/*#if !FINAL_VERSION - //_Name = NLMISC::CStringMapper::map(std::string(""); - _Name = NLMISC::CSheetId(std::string(""); +#if !FINAL_VERSION + _Name = NLMISC::CStringMapper::map(std::string(""); #else - //_Name = NLMISC::CStringMapper::map(""); -#endif*/ - _Name = NLMISC::CSheetId("music_channel.sound"); + _Name = NLMISC::CStringMapper::map(""); +#endif _ConeInnerAngle = NLMISC::Pi * 2; _ConeOuterAngle = NLMISC::Pi * 2; _Looping = loop; diff --git a/code/nel/tools/3d/object_viewer/edit_ps_sound.cpp b/code/nel/tools/3d/object_viewer/edit_ps_sound.cpp index d74c1fdf8..78cac0980 100644 --- a/code/nel/tools/3d/object_viewer/edit_ps_sound.cpp +++ b/code/nel/tools/3d/object_viewer/edit_ps_sound.cpp @@ -159,7 +159,7 @@ END_MESSAGE_MAP() void CEditPSSound::OnBrowseSound() { // CPickSound::TNameVect names; - vector names; + vector names; NLSOUND::UAudioMixer *audioMixer = CSoundSystem::getAudioMixer(); @@ -172,7 +172,7 @@ void CEditPSSound::OnBrowseSound() if (ps.DoModal() == IDOK) { - m_SoundName = ps.getName().toString().c_str(); + m_SoundName = NLMISC::CStringMapper::unmap(ps.getName()).c_str(); _Sound->setSoundName(ps.getName()); updateModifiedFlag(); UpdateData(FALSE); @@ -184,7 +184,7 @@ BOOL CEditPSSound::OnInitDialog() CDialog::OnInitDialog(); nlassert(_Sound); - m_SoundName = _Sound->getSoundName().toString().c_str(); + m_SoundName = NLMISC::CStringMapper::unmap(_Sound->getSoundName()).c_str(); UpdateData(FALSE); return TRUE; // return TRUE unless you set the focus to a control @@ -195,7 +195,7 @@ void CEditPSSound::OnChangeSoundName() { nlassert(_Sound); UpdateData(); - _Sound->setSoundName(NLMISC::CSheetId(NLMISC::tStrToUtf8(m_SoundName), "sound")); + _Sound->setSoundName(NLMISC::CStringMapper::map(NLMISC::tStrToUtf8(m_SoundName))); updateModifiedFlag(); } diff --git a/code/nel/tools/3d/object_viewer/object_viewer.cpp b/code/nel/tools/3d/object_viewer/object_viewer.cpp index be20979b6..5f1310299 100644 --- a/code/nel/tools/3d/object_viewer/object_viewer.cpp +++ b/code/nel/tools/3d/object_viewer/object_viewer.cpp @@ -606,7 +606,6 @@ bool CObjectViewer::initUI (HWND parent) { new NLMISC::CApplicationContext(); nldebug("NeL Object Viewer: initUI"); - NLMISC::CSheetId::initWithoutSheet(); } // The fonts manager diff --git a/code/nel/tools/3d/object_viewer/pick_sound.cpp b/code/nel/tools/3d/object_viewer/pick_sound.cpp index 0877564d2..181fec40d 100644 --- a/code/nel/tools/3d/object_viewer/pick_sound.cpp +++ b/code/nel/tools/3d/object_viewer/pick_sound.cpp @@ -74,7 +74,7 @@ BOOL CPickSound::OnInitDialog() for (TNameVect::iterator it = _Names.begin(); it != _Names.end(); ++it) { - m_NameList.AddString(nlUtf8ToTStr((*it).toString())); + m_NameList.AddString(nlUtf8ToTStr(NLMISC::CStringMapper::unmap(*it).c_str())); } _Timer = SetTimer (1, 100, NULL); @@ -111,7 +111,7 @@ void CPickSound::OnSelchange() nlassert(m_NameList.GetTextLen(m_NameList.GetCurSel()) < 1024); m_NameList.GetText(m_NameList.GetCurSel(), str); - _CurrName = NLMISC::CSheetId(NLMISC::tStrToUtf8(str), "sound"); + _CurrName = NLMISC::CStringMapper::map(NLMISC::tStrToUtf8(str)); } diff --git a/code/nel/tools/3d/object_viewer/pick_sound.h b/code/nel/tools/3d/object_viewer/pick_sound.h index 5331ab912..cbcf74601 100644 --- a/code/nel/tools/3d/object_viewer/pick_sound.h +++ b/code/nel/tools/3d/object_viewer/pick_sound.h @@ -23,7 +23,7 @@ #endif // _MSC_VER > 1000 // pick_sound.h : header file // -#include "nel/misc/sheet_id.h" +#include "nel/misc/string_mapper.h" #include #include @@ -40,11 +40,11 @@ class CPickSound : public CDialog { // Construction public: - typedef std::vector TNameVect; + typedef std::vector TNameVect; CPickSound(const TNameVect &names, CWnd* pParent = NULL); // standard constructor - const NLMISC::CSheetId &getName(void) const { return _CurrName; } + const NLMISC::TStringId &getName(void) const { return _CurrName; } // Dialog Data //{{AFX_DATA(CPickSound) @@ -63,7 +63,7 @@ public: // Implementation protected: TNameVect _Names; - NLMISC::CSheetId _CurrName; + NLMISC::TStringId _CurrName; UINT_PTR _Timer; diff --git a/code/nel/tools/3d/object_viewer/sound_anim_dlg.cpp b/code/nel/tools/3d/object_viewer/sound_anim_dlg.cpp index 80b0d8507..a212f84fa 100644 --- a/code/nel/tools/3d/object_viewer/sound_anim_dlg.cpp +++ b/code/nel/tools/3d/object_viewer/sound_anim_dlg.cpp @@ -125,18 +125,18 @@ void CSoundAnimDlg::updateSounds() { if (_SelectedMarker != 0) { - vector sounds; + vector sounds; _SelectedMarker->getSounds(sounds); CListBox* list = (CListBox*) GetDlgItem(IDC_SOUND_ANIM_LIST); list->ResetContent(); - vector::iterator iter; + vector::iterator iter; for (iter = sounds.begin(); iter != sounds.end(); iter++) { - list->AddString(nlUtf8ToTStr((*iter).toString())); + list->AddString(nlUtf8ToTStr(CStringMapper::unmap(*iter).c_str())); } list->UpdateData(); @@ -150,7 +150,7 @@ void CSoundAnimDlg::OnAddSound() if (_SelectedMarker != 0) { // CPickSound::TNameVect names; - vector names; + vector names; NLSOUND::UAudioMixer *audioMixer = CSoundSystem::getAudioMixer(); @@ -181,7 +181,7 @@ void CSoundAnimDlg::OnRemoveSound() if (list->GetText(list->GetCurSel(), s) != LB_ERR) { - _SelectedMarker->removeSound(NLMISC::CSheetId(tStrToUtf8(s), "sound")); + _SelectedMarker->removeSound(CStringMapper::map(tStrToUtf8(s))); updateSounds(); } } diff --git a/code/nel/tools/3d/object_viewer/sound_system.cpp b/code/nel/tools/3d/object_viewer/sound_system.cpp index 5a79c3af3..d1c0072ba 100644 --- a/code/nel/tools/3d/object_viewer/sound_system.cpp +++ b/code/nel/tools/3d/object_viewer/sound_system.cpp @@ -168,7 +168,7 @@ void CSoundSystem::play(const string &soundName) { if (_AudioMixer) { - NLSOUND::USource *src = _AudioMixer->createSource(NLMISC::CSheetId(soundName, "sound"), true); + NLSOUND::USource *src = _AudioMixer->createSource(CStringMapper::map(soundName), true); if (src) { src->setLooping(false); @@ -187,7 +187,7 @@ USource *CSoundSystem::create(const std::string &soundName) { if (_AudioMixer) { - NLSOUND::USource *src = _AudioMixer->createSource(NLMISC::CSheetId(soundName, "sound"), false); + NLSOUND::USource *src = _AudioMixer->createSource(CStringMapper::map(soundName), false); if (src) { src->setLooping(false); diff --git a/code/nel/tools/3d/plugin_max/nel_export/DllEntry.cpp b/code/nel/tools/3d/plugin_max/nel_export/DllEntry.cpp index fcb2317fd..7378fc8ca 100644 --- a/code/nel/tools/3d/plugin_max/nel_export/DllEntry.cpp +++ b/code/nel/tools/3d/plugin_max/nel_export/DllEntry.cpp @@ -20,7 +20,6 @@ #include "nel/misc/app_context.h" #include "../nel_3dsmax_shared/nel_3dsmax_shared.h" #include -#include "nel/misc/sheet_id.h" extern ClassDesc2* GetCNelExportDesc(); @@ -35,7 +34,6 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL,ULONG fdwReason,LPVOID lpvReserved) { new NLMISC::CLibraryContext(GetSharedNelContext()); nldebug("NeL Export: DllMain"); - NLMISC::CSheetId::initWithoutSheet(); } hInstance = hinstDLL; // Hang on to this DLL's instance handle. diff --git a/code/nel/tools/3d/plugin_max/nel_patch_converter/DllEntry.cpp b/code/nel/tools/3d/plugin_max/nel_patch_converter/DllEntry.cpp index 715e35618..0fe5bc556 100644 --- a/code/nel/tools/3d/plugin_max/nel_patch_converter/DllEntry.cpp +++ b/code/nel/tools/3d/plugin_max/nel_patch_converter/DllEntry.cpp @@ -21,7 +21,6 @@ #include "nel/misc/app_context.h" #include "../nel_3dsmax_shared/nel_3dsmax_shared.h" #include -#include "nel/misc/sheet_id.h" extern ClassDesc2* GetPO2RPODesc(); extern ClassDesc* GetRPODesc(); @@ -45,7 +44,6 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL,ULONG fdwReason,LPVOID lpvReserved) { new NLMISC::CLibraryContext(GetSharedNelContext()); nldebug("NeL Export: DllMain"); - NLMISC::CSheetId::initWithoutSheet(); } if(fdwReason == DLL_PROCESS_ATTACH) diff --git a/code/nel/tools/3d/plugin_max/nel_patch_edit/np_mods.cpp b/code/nel/tools/3d/plugin_max/nel_patch_edit/np_mods.cpp index ec109d320..590bcbae7 100644 --- a/code/nel/tools/3d/plugin_max/nel_patch_edit/np_mods.cpp +++ b/code/nel/tools/3d/plugin_max/nel_patch_edit/np_mods.cpp @@ -18,7 +18,6 @@ #include "../nel_3dsmax_shared/nel_3dsmax_shared.h" #include -#include "nel/misc/sheet_id.h" HINSTANCE hInstance; int controlsInit = FALSE; @@ -33,7 +32,6 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL,ULONG fdwReason,LPVOID lpvReserved) { new NLMISC::CLibraryContext(GetSharedNelContext()); nldebug("NeL Patch Edit: DllMain"); - NLMISC::CSheetId::initWithoutSheet(); } if (fdwReason == DLL_PROCESS_ATTACH) diff --git a/code/nel/tools/3d/plugin_max/nel_patch_paint/DllEntry.cpp b/code/nel/tools/3d/plugin_max/nel_patch_paint/DllEntry.cpp index a720a5911..3b2ed3bfc 100644 --- a/code/nel/tools/3d/plugin_max/nel_patch_paint/DllEntry.cpp +++ b/code/nel/tools/3d/plugin_max/nel_patch_paint/DllEntry.cpp @@ -4,7 +4,6 @@ #include "nel/misc/app_context.h" #include "../nel_3dsmax_shared/nel_3dsmax_shared.h" #include -#include "nel/misc/sheet_id.h" HINSTANCE hInstance; int controlsInit = FALSE; @@ -23,7 +22,6 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL,ULONG fdwReason,LPVOID lpvReserved) { new NLMISC::CLibraryContext(GetSharedNelContext()); nldebug("NeL Patch Paint: DllMain"); - NLMISC::CSheetId::initWithoutSheet(); } hInstance = hinstDLL; diff --git a/code/nel/tools/3d/plugin_max/nel_vertex_tree_paint/dllmain.cpp b/code/nel/tools/3d/plugin_max/nel_vertex_tree_paint/dllmain.cpp index ad5393cf5..0fdf6db75 100644 --- a/code/nel/tools/3d/plugin_max/nel_vertex_tree_paint/dllmain.cpp +++ b/code/nel/tools/3d/plugin_max/nel_vertex_tree_paint/dllmain.cpp @@ -1,7 +1,6 @@ #include "vertex_tree_paint.h" #include "../nel_3dsmax_shared/nel_3dsmax_shared.h" #include -#include "nel/misc/sheet_id.h" HINSTANCE hInstance; @@ -13,7 +12,6 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL,ULONG fdwReason,LPVOID lpvReserved) { new NLMISC::CLibraryContext(GetSharedNelContext()); nldebug("NeL Vertex Tree Paint: DllMain"); - NLMISC::CSheetId::initWithoutSheet(); } hInstance = hinstDLL; // Hang on to this DLL's instance handle. diff --git a/code/nel/tools/3d/plugin_max/tile_utility/DllEntry.cpp b/code/nel/tools/3d/plugin_max/tile_utility/DllEntry.cpp index eb39f7cb0..fbd53ca37 100644 --- a/code/nel/tools/3d/plugin_max/tile_utility/DllEntry.cpp +++ b/code/nel/tools/3d/plugin_max/tile_utility/DllEntry.cpp @@ -21,7 +21,6 @@ #include "../nel_3dsmax_shared/nel_3dsmax_shared.h" #include #include -#include "nel/misc/sheet_id.h" extern ClassDesc2* GetTile_utilityDesc(); extern ClassDesc* GetRGBAddDesc(); @@ -42,7 +41,6 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL,ULONG fdwReason,LPVOID lpvReserved) { new NLMISC::CLibraryContext(GetSharedNelContext()); nldebug("NeL Tile Utility: DllMain"); - NLMISC::CSheetId::initWithoutSheet(); } hInstance = hinstDLL; // Hang on to this DLL's instance handle. diff --git a/code/nel/tools/sound/build_soundbank/build_soundbank.cpp b/code/nel/tools/sound/build_soundbank/build_soundbank.cpp index b8a79d9cf..60abe4592 100644 --- a/code/nel/tools/sound/build_soundbank/build_soundbank.cpp +++ b/code/nel/tools/sound/build_soundbank/build_soundbank.cpp @@ -29,7 +29,6 @@ #include #include #include -#include // Project includes // ... @@ -76,9 +75,6 @@ int main(int nNbArg, char **ppArgs) // add search paths CPath::addSearchPath(leveldesignDir, true, false); CPath::addSearchPath(dfnDir, true, false); - - // init sheet_id.bin - NLMISC::CSheetId::initWithoutSheet(); // build the sound bank UAudioMixer::buildSoundBank(exportDir); diff --git a/code/ryzom/client/src/commands.cpp b/code/ryzom/client/src/commands.cpp index 074079780..cd261b29b 100644 --- a/code/ryzom/client/src/commands.cpp +++ b/code/ryzom/client/src/commands.cpp @@ -5165,14 +5165,14 @@ NLMISC_COMMAND(reloadFogMaps, "Force to reload all the fog maps", "<>") NLMISC_COMMAND(dumpSounds, "Dump names of all loaded sound", "<>") { if (!args.empty()) return false; - std::vector sounds; + std::vector sounds; extern CSoundManager *SoundMngr; if (!SoundMngr) return false; if (!SoundMngr->getMixer()) return false; SoundMngr->getMixer()->getSoundNames(sounds); for(uint k = 0; k < sounds.size(); ++k) { - nlinfo(sounds[k].toString()/*NLMISC::CStringMapper::unmap(sounds[k])*/.c_str()); + nlinfo(NLMISC::CStringMapper::unmap(sounds[k]).c_str()); } return true; } diff --git a/code/ryzom/client/src/connection.cpp b/code/ryzom/client/src/connection.cpp index dd776b7fb..0b2ed1439 100644 --- a/code/ryzom/client/src/connection.cpp +++ b/code/ryzom/client/src/connection.cpp @@ -2017,7 +2017,7 @@ public: virtual void execute (CCtrlBase * /* pCaller */, const string &Params) { string sName = getParam(Params, "name"); - CSheetId id = CSheetId(sName, "sound"); + TStringId id = CStringMapper::map(sName); if (SoundMngr != NULL) SoundMngr->spawnSource(id,CVector(0,0,0)); } diff --git a/code/ryzom/client/src/init.cpp b/code/ryzom/client/src/init.cpp index d80cfda00..abbf8b6b4 100644 --- a/code/ryzom/client/src/init.cpp +++ b/code/ryzom/client/src/init.cpp @@ -1534,19 +1534,6 @@ void postlogInit() // set the primitive context CPrimitiveContext::instance().CurrentLigoConfig = &LigoConfig; - { - H_AUTO(InitRZShIdI) - - nmsg = "Initializing sheets..."; - ProgressBar.newMessage ( ClientCfg.buildLoadingString(nmsg) ); - - // Initialize Sheet IDs. - CSheetId::init (ClientCfg.UpdatePackedSheet); - - initLast = initCurrent; - initCurrent = ryzomGetLocalTime(); - } - { H_AUTO(InitRZSound) @@ -1597,7 +1584,13 @@ void postlogInit() } { - H_AUTO(InitRZSheetL) + H_AUTO(InitRZShIdI) + + nmsg = "Initializing sheets..."; + ProgressBar.newMessage ( ClientCfg.buildLoadingString(nmsg) ); + + // Initialize Sheet IDs. + CSheetId::init (ClientCfg.UpdatePackedSheet); // load packed sheets nmsg = "Loading sheets..."; diff --git a/code/ryzom/client/src/sound_manager.cpp b/code/ryzom/client/src/sound_manager.cpp index 8a91c81ff..7cc6c3a6f 100644 --- a/code/ryzom/client/src/sound_manager.cpp +++ b/code/ryzom/client/src/sound_manager.cpp @@ -628,17 +628,17 @@ void CSoundManager::init(IProgressCallback *progressCallBack) // add a new source to the world, attached to the specified entity // return 0 if creation failed, sound id if creation was successful //----------------------------------------------- -CSoundManager::TSourceId CSoundManager::addSource( const NLMISC::CSheetId &soundName, const NLMISC::CVector &position, bool play, bool loop, const CEntityId &id) +CSoundManager::TSourceId CSoundManager::addSource(const NLMISC::TStringId &soundName, const NLMISC::CVector &position, bool play, bool loop, const CEntityId &id) { uint32 retValue = 0; // Create a source - USource *pSource = _AudioMixer->createSource( soundName ); + USource *pSource = _AudioMixer->createSource(soundName); // If the source is valid. if(pSource == 0) { - nlwarning("Sound '%s' not found !", /*CStringMapper::unmap(soundName).c_str()*/soundName.toString().c_str()); + nlwarning("Sound '%s' not found !", CStringMapper::unmap(soundName).c_str()); return retValue; } @@ -676,7 +676,7 @@ CSoundManager::TSourceId CSoundManager::addSource( const NLMISC::CSheetId &sound // spawn a new source to the world // return false if creation failed, true if creation was successful //----------------------------------------------- -bool CSoundManager::spawnSource(const NLMISC::CSheetId &soundName, CSoundContext &context) +bool CSoundManager::spawnSource(const NLMISC::TStringId &soundName, CSoundContext &context) { if (!_PlaySound) return false; @@ -687,7 +687,7 @@ bool CSoundManager::spawnSource(const NLMISC::CSheetId &soundName, CSoundContext // If the source is valid. if(pSource == 0) { - nlwarning("Sound '%s' not found !", soundName.toString().c_str()); + nlwarning("Sound '%s' not found !", soundName); return false; } @@ -706,7 +706,7 @@ bool CSoundManager::spawnSource(const NLMISC::CSheetId &soundName, CSoundContext // spawn a new source to the world // return false if creation failed, true if creation was successful //----------------------------------------------- -bool CSoundManager::spawnSource(const NLMISC::CSheetId &soundName, const NLMISC::CVector &position) +bool CSoundManager::spawnSource(const NLMISC::TStringId &soundName, const NLMISC::CVector &position) { if (!_PlaySound) return false; @@ -716,7 +716,7 @@ bool CSoundManager::spawnSource(const NLMISC::CSheetId &soundName, const NLMISC: // If the source is valid. if(pSource == 0) { - nlwarning("Sound '%s' not found !", /*CStringMapper::unmap(soundName).c_str ()*/soundName.toString().c_str()); + nlwarning("Sound '%s' not found !", CStringMapper::unmap(soundName).c_str ()); return false; } diff --git a/code/ryzom/client/src/sound_manager.h b/code/ryzom/client/src/sound_manager.h index e2131e880..1c03824e3 100644 --- a/code/ryzom/client/src/sound_manager.h +++ b/code/ryzom/client/src/sound_manager.h @@ -32,7 +32,6 @@ // sound #include "nel/sound/u_audio_mixer.h" #include "nel/sound/u_listener.h" -#include "nel/misc/sheet_id.h" extern class CSoundManager *SoundMngr; @@ -89,13 +88,13 @@ public: /// Return the audio mixer instance pointer. NLSOUND::UAudioMixer *getMixer(); - TSourceId addSource( const NLMISC::CSheetId &soundName, const NLMISC::CVector &position, bool play = true , bool loop = false, const NLMISC::CEntityId &id = NLMISC::CEntityId::Unknown ); + TSourceId addSource( const NLMISC::TStringId &soundName, const NLMISC::CVector &position, bool play = true , bool loop = false, const NLMISC::CEntityId &id = NLMISC::CEntityId::Unknown ); /// spawn a new source to the world but sound manager don't keep any link and the sound will be automatically deleted when finnished - bool spawnSource (const NLMISC::CSheetId &soundName, NLSOUND::CSoundContext &context); + bool spawnSource (const NLMISC::TStringId &soundName, NLSOUND::CSoundContext &context); /// spawn a new source to the world but sound manager don't keep any link and the sound will be automatically deleted when finnished - bool spawnSource( const NLMISC::CSheetId &soundName, const NLMISC::CVector &position ); + bool spawnSource( const NLMISC::TStringId &soundName, const NLMISC::CVector &position ); /** * remove a source diff --git a/code/ryzom/tools/leveldesign/georges_plugin_sound/sound_plugin.cpp b/code/ryzom/tools/leveldesign/georges_plugin_sound/sound_plugin.cpp index 47c8ed239..3702c18e5 100644 --- a/code/ryzom/tools/leveldesign/georges_plugin_sound/sound_plugin.cpp +++ b/code/ryzom/tools/leveldesign/georges_plugin_sound/sound_plugin.cpp @@ -68,9 +68,6 @@ CSoundPlugin::CSoundPlugin(IEdit *globalInterface) { AFX_MANAGE_STATE(AfxGetStaticModuleState()); - // Initialize without sheet id bin - NLMISC::CSheetId::initWithoutSheet(); - CVector dir; _GlobalInterface = globalInterface; @@ -340,7 +337,7 @@ void CSoundPlugin::setActiveDocument(IEditDocument *pdoc) _Dialog.setName(_Filename); // 1st, try to found the sound in the preloaded sound bank. - _Sound = _Mixer->getSoundId(CSheetId(_Filename, "sound")); + _Sound = _Mixer->getSoundId(CStringMapper::map(_Filename)); if (_Sound == NULL) { // not found, create a new one. @@ -540,7 +537,7 @@ void CSoundPlugin::play(std::string &filename) // point.Name = string("simulation-")+_Sound->getName()+"-000"; region.VPoints.push_back(point); - string name = string("simulation-")+NLMISC::CFile::getFilenameWithoutExtension(_Sound->getName().toString())+"-000"; + string name = string("simulation-")+CStringMapper::unmap(_Sound->getName())+"-000"; if (region.VPoints.back().checkProperty("name")) region.VPoints.back().removePropertyByName("name"); From c635a27722d8ca06173f06f30bebb202e9cf9c6b Mon Sep 17 00:00:00 2001 From: kaetemi Date: Wed, 13 Nov 2019 11:55:54 +0800 Subject: [PATCH 056/236] Remove unused sheet init --- code/snowballs2/client/src/snowballs_client.cpp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/code/snowballs2/client/src/snowballs_client.cpp b/code/snowballs2/client/src/snowballs_client.cpp index 28f957589..74f73c564 100644 --- a/code/snowballs2/client/src/snowballs_client.cpp +++ b/code/snowballs2/client/src/snowballs_client.cpp @@ -302,8 +302,6 @@ void initCore() LoadedCore = true; // Seed the randomizer srand(uint(time(0))); - // Sheet Id - CSheetId::initWithoutSheet(); // Temporary for sound // Load configuration file, set paths, extension remapping CConfiguration::init(); // Load language file @@ -524,8 +522,6 @@ void releaseCore() CInternationalization::release(); // Release the configuration CConfiguration::release(); - // Release sheet id - CSheetId::uninit(); // Temporary for sound } } From dd1043eaaec28399aa0013ddf5b5d7e0c32b1ce1 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Wed, 13 Nov 2019 13:38:07 +0800 Subject: [PATCH 057/236] Revert inappropriate changes from 29b38937a58ffd06ba64829a49f060ff7c9a2d0a --- code/nel/include/nel/sound/u_stream_source.h | 10 +++++++++- .../tools/sound/build_samplebank/build_samplebank.cpp | 10 +++++++++- code/nel/tools/sound/build_sound/build_sound.cpp | 10 +++++++++- .../tools/sound/build_soundbank/build_soundbank.cpp | 10 +++++++++- 4 files changed, 36 insertions(+), 4 deletions(-) diff --git a/code/nel/include/nel/sound/u_stream_source.h b/code/nel/include/nel/sound/u_stream_source.h index 5a1a0db85..6b0448afb 100644 --- a/code/nel/include/nel/sound/u_stream_source.h +++ b/code/nel/include/nel/sound/u_stream_source.h @@ -1,5 +1,13 @@ +/** +* UStreamSource +* \file u_stream_source.h +* \brief UStreamSource +* \date 2010-01-28 12:58GMT +* \author Jan Boon (Kaetemi) +*/ + // NeL - MMORPG Framework -// Copyright (C) 2010 Winch Gate Property Limited +// Copyright (C) 2010 by authors // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/nel/tools/sound/build_samplebank/build_samplebank.cpp b/code/nel/tools/sound/build_samplebank/build_samplebank.cpp index 51a3617d5..ef3f7c3f5 100644 --- a/code/nel/tools/sound/build_samplebank/build_samplebank.cpp +++ b/code/nel/tools/sound/build_samplebank/build_samplebank.cpp @@ -1,5 +1,13 @@ +/** +* Build Samplebank +* \file build_samplebank.cpp +* \brief Build Samplebank +* \date 2010-03-06 21:36GMT +* \author Jan Boon (Kaetemi) +*/ + // NeL - MMORPG Framework -// Copyright (C) 2010 Winch Gate Property Limited +// Copyright (C) 2010 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 diff --git a/code/nel/tools/sound/build_sound/build_sound.cpp b/code/nel/tools/sound/build_sound/build_sound.cpp index e5a7a0022..7762c1bf2 100644 --- a/code/nel/tools/sound/build_sound/build_sound.cpp +++ b/code/nel/tools/sound/build_sound/build_sound.cpp @@ -1,5 +1,13 @@ +/** +* Build Sound +* \file build_sound.cpp +* \brief Build Sound +* \date 2009-06-02 21:25GMT +* \author Jan Boon (Kaetemi) +*/ + // NeL - MMORPG Framework -// Copyright (C) 2010 Winch Gate Property Limited +// Copyright (C) 2009 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 diff --git a/code/nel/tools/sound/build_soundbank/build_soundbank.cpp b/code/nel/tools/sound/build_soundbank/build_soundbank.cpp index 60abe4592..f672592e2 100644 --- a/code/nel/tools/sound/build_soundbank/build_soundbank.cpp +++ b/code/nel/tools/sound/build_soundbank/build_soundbank.cpp @@ -1,5 +1,13 @@ +/** +* Build Soundbank +* \file build_soundbank.cpp +* \brief Build Soundbank +* \date 2010-03-06 21:43GMT +* \author Jan Boon (Kaetemi) +*/ + // NeL - MMORPG Framework -// Copyright (C) 2010 Winch Gate Property Limited +// Copyright (C) 2010 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 From 2faa1d7ab86aff1c11769512fa65ee7293d70b33 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Wed, 13 Nov 2019 13:50:03 +0800 Subject: [PATCH 058/236] Only add DFN to search path if not a subdir of the other path --- code/nel/tools/sound/build_sound/build_sound.cpp | 4 +++- code/nel/tools/sound/build_soundbank/build_soundbank.cpp | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/code/nel/tools/sound/build_sound/build_sound.cpp b/code/nel/tools/sound/build_sound/build_sound.cpp index 7762c1bf2..dbb47dd02 100644 --- a/code/nel/tools/sound/build_sound/build_sound.cpp +++ b/code/nel/tools/sound/build_sound/build_sound.cpp @@ -103,7 +103,9 @@ int main(int nNbArg, char **ppArgs) // add search paths CPath::addSearchPath(leveldesignDir, true, false); - CPath::addSearchPath(dfnDir, true, false); + std::string relativeDfnDir = dfnDir; // only add dfn if not a subdir of leveldesignDir + if (!CPath::makePathRelative(leveldesignDir, dfnDir) || relativeDfnDir.size() < 2 || (relativeDfnDir[0] == '.' && relativeDfnDir[1] == '.')) + CPath::addSearchPath(dfnDir, true, false); // create the audio mixer UAudioMixer *audioMixer = UAudioMixer::createAudioMixer(); diff --git a/code/nel/tools/sound/build_soundbank/build_soundbank.cpp b/code/nel/tools/sound/build_soundbank/build_soundbank.cpp index f672592e2..082b08e90 100644 --- a/code/nel/tools/sound/build_soundbank/build_soundbank.cpp +++ b/code/nel/tools/sound/build_soundbank/build_soundbank.cpp @@ -82,7 +82,9 @@ int main(int nNbArg, char **ppArgs) // add search paths CPath::addSearchPath(leveldesignDir, true, false); - CPath::addSearchPath(dfnDir, true, false); + std::string relativeDfnDir = dfnDir; // only add dfn if not a subdir of leveldesignDir + if (!CPath::makePathRelative(leveldesignDir, dfnDir) || relativeDfnDir.size() < 2 || (relativeDfnDir[0] == '.' && relativeDfnDir[1] == '.')) + CPath::addSearchPath(dfnDir, true, false); // build the sound bank UAudioMixer::buildSoundBank(exportDir); From 9307cac83cfc25c43adf44937615c77911c960a6 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Wed, 13 Nov 2019 14:26:56 +0800 Subject: [PATCH 059/236] Add samplebank build process --- code/nel/src/sound/audio_mixer_user.cpp | 7 +++- code/nel/tools/build_gamedata/0_setup.py | 21 +++++++++++ .../build_gamedata/configuration/tools.py | 3 ++ .../{sound => samplebank}/0_setup.py | 14 +++---- .../{sound => samplebank}/1_export.py | 6 +-- .../{sound => samplebank}/2_build.py | 37 +++++++++++-------- .../{sound => samplebank}/3_install.py | 17 +++------ .../tools/sound/build_sound/build_sound.cpp | 4 ++ 8 files changed, 68 insertions(+), 41 deletions(-) rename code/nel/tools/build_gamedata/processes/{sound => samplebank}/0_setup.py (81%) mode change 100755 => 100644 rename code/nel/tools/build_gamedata/processes/{sound => samplebank}/1_export.py (94%) mode change 100755 => 100644 rename code/nel/tools/build_gamedata/processes/{sound => samplebank}/2_build.py (59%) mode change 100755 => 100644 rename code/nel/tools/build_gamedata/processes/{sound => samplebank}/3_install.py (70%) mode change 100755 => 100644 diff --git a/code/nel/src/sound/audio_mixer_user.cpp b/code/nel/src/sound/audio_mixer_user.cpp index 23f72644c..fdc6f6e11 100644 --- a/code/nel/src/sound/audio_mixer_user.cpp +++ b/code/nel/src/sound/audio_mixer_user.cpp @@ -768,8 +768,11 @@ std::string UAudioMixer::buildSampleBank(const std::vector &sampleL } // Sample number MUST be even - nlassert(mono16Data.size() == (mono16Data.size() & 0xfffffffe)); - nlassert(adpcmData.size() == mono16Data.size() / 2); + // nlassert(mono16Data.size() == (mono16Data.size() & 0xfffffffe)); + if (mono16Data.size() & 1) + nlwarning("Uneven sample numbers, ADPCM will miss a sample. File: %s, Samples: %i, ADPCM Size: %i", + sampleList[j].c_str(), (int)mono16Data.size(), (int)adpcmData.size()); + nlassert(adpcmData.size() == (mono16Data.size() >> 1)); adpcmBuffers[j].swap(adpcmData); mono16Buffers[j].swap(mono16Data); diff --git a/code/nel/tools/build_gamedata/0_setup.py b/code/nel/tools/build_gamedata/0_setup.py index 8eff34131..479121428 100755 --- a/code/nel/tools/build_gamedata/0_setup.py +++ b/code/nel/tools/build_gamedata/0_setup.py @@ -83,6 +83,18 @@ if not args.noconf: DatabaseDirectory except NameError: DatabaseDirectory = "W:/database" + try: + SoundDirectory + except NameError: + SoundDirectory = "V:" + try: + SoundSheetsDirectory + except NameError: + SoundSheetsDirectory = "V:" + try: + SoundSheetsDfnDirectory + except NameError: + SoundSheetsDfnDirectory = "V:/DFN" try: ExportBuildDirectory except NameError: @@ -218,6 +230,9 @@ if not args.noconf: ScriptDirectory = askVar(log, "[IN] Script Directory", os.getcwd().replace("\\", "/")).replace("\\", "/") WorkspaceDirectory = askVar(log, "[IN] Workspace Directory", WorkspaceDirectory).replace("\\", "/") DatabaseDirectory = askVar(log, "[IN] Database Directory", DatabaseDirectory).replace("\\", "/") + SoundDirectory = askVar(log, "[IN] Sound Directory", SoundDirectory).replace("\\", "/") + SoundSheetsDirectory = askVar(log, "[IN] Sound Sheets Directory", SoundSheetsDirectory).replace("\\", "/") + SoundSheetsDfnDirectory = askVar(log, "[IN] Sound Sheets DFN Directory", SoundSheetsDfnDirectory).replace("\\", "/") ExportBuildDirectory = askVar(log, "[OUT] Export Build Directory", ExportBuildDirectory).replace("\\", "/") InstallDirectory = askVar(log, "[OUT] Install Directory", InstallDirectory).replace("\\", "/") ClientDevDirectory = askVar(log, "[OUT] Client Dev Directory", ClientDevDirectory).replace("\\", "/") @@ -301,6 +316,9 @@ if not args.noconf: sf.write("\n") sf.write("# Data build directories\n") sf.write("DatabaseDirectory = \"" + str(DatabaseDirectory) + "\"\n") + sf.write("SoundDirectory = \"" + str(SoundDirectory) + "\"\n") + sf.write("SoundSheetsDirectory = \"" + str(SoundSheetsDirectory) + "\"\n") + sf.write("SoundSheetsDfnDirectory = \"" + str(SoundSheetsDfnDirectory) + "\"\n") sf.write("ExportBuildDirectory = \"" + str(ExportBuildDirectory) + "\"\n") sf.write("\n") sf.write("# Install directories\n") @@ -415,6 +433,9 @@ if not args.noverify: findTool(log, ToolDirectories, MakeSheetIdTool, ToolSuffix) # findTool(log, ToolDirectories, BuildSheetsTool, ToolSuffix) # kaetemi stuff, ignore this # findTool(log, ToolDirectories, BuildSoundTool, ToolSuffix) # kaetemi stuff, ignore this + # findTool(log, ToolDirectories, BuildSoundTool, ToolSuffix) + findTool(log, ToolDirectories, BuildSoundbankTool, ToolSuffix) + findTool(log, ToolDirectories, BuildSamplebankTool, ToolSuffix) findTool(log, ToolDirectories, BuildCoarseMeshTool, ToolSuffix) findTool(log, ToolDirectories, LightmapOptimizerTool, ToolSuffix) findTool(log, ToolDirectories, BuildClodtexTool, ToolSuffix) diff --git a/code/nel/tools/build_gamedata/configuration/tools.py b/code/nel/tools/build_gamedata/configuration/tools.py index c0c962360..67cefdd5b 100755 --- a/code/nel/tools/build_gamedata/configuration/tools.py +++ b/code/nel/tools/build_gamedata/configuration/tools.py @@ -73,6 +73,9 @@ TileEditTool = "tile_edit" MakeSheetIdTool = "make_sheet_id" # BuildSheetsTool = "th_build_sheets" # kaetemi stuff, ignore this # BuildSoundTool = "th_build_sound" # kaetemi stuff, ignore this +# BuildSoundTool = "build_sound" +BuildSoundbankTool = "build_soundbank" +BuildSamplebankTool = "build_samplebank" BuildCoarseMeshTool = "build_coarse_mesh" LightmapOptimizerTool = "lightmap_optimizer" BuildClodtexTool = "build_clodtex" diff --git a/code/nel/tools/build_gamedata/processes/sound/0_setup.py b/code/nel/tools/build_gamedata/processes/samplebank/0_setup.py old mode 100755 new mode 100644 similarity index 81% rename from code/nel/tools/build_gamedata/processes/sound/0_setup.py rename to code/nel/tools/build_gamedata/processes/samplebank/0_setup.py index 178a810ae..0c9c6c856 --- a/code/nel/tools/build_gamedata/processes/sound/0_setup.py +++ b/code/nel/tools/build_gamedata/processes/samplebank/0_setup.py @@ -1,11 +1,11 @@ #!/usr/bin/python # # \file 0_setup.py -# \brief Setup sound +# \brief Setup samplebank # \date 2009-06-03 10:47GMT # \author Jan Boon (Kaetemi) # Python port of game data build pipeline. -# Setup sound +# Setup samplebank # # NeL - MMORPG Framework # Copyright (C) 2009-2014 by authors @@ -38,29 +38,25 @@ from directories import * printLog(log, "") printLog(log, "-------") -printLog(log, "--- Setup sound") +printLog(log, "--- Setup samplebank") printLog(log, "-------") printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) printLog(log, "") # Setup source directories printLog(log, ">>> Setup source directories <<<") -mkPath(log, LeveldesignDirectory) -mkPath(log, LeveldesignDfnDirectory) -mkPath(log, DatabaseDirectory + "/" + SoundSamplebanksSourceDirectory) +mkPath(log, SoundDirectory + "/" + SoundSamplebanksSourceDirectory) # Setup export directories printLog(log, ">>> Setup export directories <<<") # Setup build directories printLog(log, ">>> Setup build directories <<<") -mkPath(log, ExportBuildDirectory + "/" + SoundSheetsBuildDirectory) mkPath(log, ExportBuildDirectory + "/" + SoundSamplebanksBuildDirectory) # Setup client directories printLog(log, ">>> Setup client directories <<<") -mkPath(log, InstallDirectory + "/" + SoundSheetsInstallDirectory) -mkPath(log, InstallDirectory + "/" + SoundSamplebanksInstallDirectory) +mkPath(log, InstallDirectory + "/" + SoundInstallDirectory) log.close() diff --git a/code/nel/tools/build_gamedata/processes/sound/1_export.py b/code/nel/tools/build_gamedata/processes/samplebank/1_export.py old mode 100755 new mode 100644 similarity index 94% rename from code/nel/tools/build_gamedata/processes/sound/1_export.py rename to code/nel/tools/build_gamedata/processes/samplebank/1_export.py index 4fd98abb4..9760458b9 --- a/code/nel/tools/build_gamedata/processes/sound/1_export.py +++ b/code/nel/tools/build_gamedata/processes/samplebank/1_export.py @@ -1,11 +1,11 @@ #!/usr/bin/python # # \file 1_export.py -# \brief Export sound +# \brief Export samplebank # \date 2009-06-03 10:47GMT # \author Jan Boon (Kaetemi) # Python port of game data build pipeline. -# Export sound +# Export samplebank # # NeL - MMORPG Framework # Copyright (C) 2009-2014 by authors @@ -38,7 +38,7 @@ from directories import * printLog(log, "") printLog(log, "-------") -printLog(log, "--- Export sound") +printLog(log, "--- Export samplebank") printLog(log, "-------") printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) printLog(log, "") diff --git a/code/nel/tools/build_gamedata/processes/sound/2_build.py b/code/nel/tools/build_gamedata/processes/samplebank/2_build.py old mode 100755 new mode 100644 similarity index 59% rename from code/nel/tools/build_gamedata/processes/sound/2_build.py rename to code/nel/tools/build_gamedata/processes/samplebank/2_build.py index 56abeedd7..447edd468 --- a/code/nel/tools/build_gamedata/processes/sound/2_build.py +++ b/code/nel/tools/build_gamedata/processes/samplebank/2_build.py @@ -1,11 +1,11 @@ #!/usr/bin/python # # \file 2_build.py -# \brief Build sound +# \brief Build samplebank # \date 2009-06-03 10:47GMT # \author Jan Boon (Kaetemi) # Python port of game data build pipeline. -# Build sound +# Build samplebank # # NeL - MMORPG Framework # Copyright (C) 2009-2014 by authors @@ -38,28 +38,33 @@ from directories import * printLog(log, "") printLog(log, "-------") -printLog(log, "--- Build sound") +printLog(log, "--- Build samplebank") printLog(log, "-------") printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) printLog(log, "") # Find tools -BuildSound = findTool(log, ToolDirectories, BuildSoundTool, ToolSuffix) +BuildSamplebank = findTool(log, ToolDirectories, BuildSamplebankTool, ToolSuffix) printLog(log, "") -# For each sound directory -printLog(log, ">>> Build sound <<<") -if BuildSound == "": - toolLogFail(log, BuildSoundTool, ToolSuffix) +# For each samplebank directory +printLog(log, ">>> Build samplebank <<<") +if BuildSamplebank == "": + toolLogFail(log, BuildSamplebankTool, ToolSuffix) else: - mkPath(log, LeveldesignDirectory) - mkPath(log, LeveldesignDfnDirectory) - mkPath(log, DatabaseDirectory + "/" + SoundSamplebanksSourceDirectory) - mkPath(log, ExportBuildDirectory + "/" + SoundSheetsBuildDirectory) - mkPath(log, ExportBuildDirectory + "/" + SoundSamplebanksBuildDirectory) - subprocess.call([ BuildSound, LeveldesignDirectory, LeveldesignDfnDirectory, DatabaseDirectory + "/" + SoundSamplebanksSourceDirectory, ExportBuildDirectory + "/" + SoundSheetsBuildDirectory ]) - moveFilesExtNoTree(log, DatabaseDirectory + "/" + SoundSamplebanksSourceDirectory, ExportBuildDirectory + "/" + SoundSamplebanksBuildDirectory, ".sample_bank") -printLog(log, "") + sourcePath = SoundDirectory + "/" + SoundSamplebanksSourceDirectory + buildPath = ExportBuildDirectory + "/" + SoundSamplebanksBuildDirectory + mkPath(log, sourcePath) + mkPath(log, buildPath) + for dir in os.listdir(sourcePath): + dirPath = sourcePath + "/" + dir + if (os.path.isdir(dirPath)) and dir != ".svn" and dir != "*.*": + samplebankPath = buildPath + "/" + dir + ".sample_bank" + if needUpdateDirNoSubdirFile(log, dirPath, samplebankPath): + # build_samplebank + subprocess.call([ BuildSamplebank, dirPath, buildPath, dir ]) + else: + printLog(log, "SKIP " + samplebankPath) log.close() diff --git a/code/nel/tools/build_gamedata/processes/sound/3_install.py b/code/nel/tools/build_gamedata/processes/samplebank/3_install.py old mode 100755 new mode 100644 similarity index 70% rename from code/nel/tools/build_gamedata/processes/sound/3_install.py rename to code/nel/tools/build_gamedata/processes/samplebank/3_install.py index dc32c30e1..104f76681 --- a/code/nel/tools/build_gamedata/processes/sound/3_install.py +++ b/code/nel/tools/build_gamedata/processes/samplebank/3_install.py @@ -1,11 +1,11 @@ #!/usr/bin/python # # \file 3_install.py -# \brief Install sound +# \brief Install samplebank # \date 2009-06-03 10:47GMT # \author Jan Boon (Kaetemi) # Python port of game data build pipeline. -# Install sound +# Install samplebank # # NeL - MMORPG Framework # Copyright (C) 2009-2014 by authors @@ -38,20 +38,15 @@ from directories import * printLog(log, "") printLog(log, "-------") -printLog(log, "--- Install sound") +printLog(log, "--- Install samplebank") printLog(log, "-------") printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) printLog(log, "") -printLog(log, ">>> Install sound packed_sheets <<<") -mkPath(log, ExportBuildDirectory + "/" + SoundSheetsBuildDirectory) -mkPath(log, InstallDirectory + "/" + SoundSheetsInstallDirectory) -copyFilesExtNoTreeIfNeeded(log, ExportBuildDirectory + "/" + SoundSheetsBuildDirectory, InstallDirectory + "/" + SoundSheetsInstallDirectory, ".packed_sheets") - -printLog(log, ">>> Install sound samplebanks <<<") +printLog(log, ">>> Install samplebank <<<") mkPath(log, ExportBuildDirectory + "/" + SoundSamplebanksBuildDirectory) -mkPath(log, InstallDirectory + "/" + SoundSamplebanksInstallDirectory) -copyFilesExtNoTreeIfNeeded(log, ExportBuildDirectory + "/" + SoundSamplebanksBuildDirectory, InstallDirectory + "/" + SoundSamplebanksInstallDirectory, ".sample_bank") +mkPath(log, InstallDirectory + "/" + SoundInstallDirectory) +copyFilesExtNoTreeIfNeeded(log, ExportBuildDirectory + "/" + SoundSamplebanksBuildDirectory, InstallDirectory + "/" + SoundInstallDirectory, ".sample_bank") printLog(log, "") log.close() diff --git a/code/nel/tools/sound/build_sound/build_sound.cpp b/code/nel/tools/sound/build_sound/build_sound.cpp index dbb47dd02..bacdf7664 100644 --- a/code/nel/tools/sound/build_sound/build_sound.cpp +++ b/code/nel/tools/sound/build_sound/build_sound.cpp @@ -56,6 +56,10 @@ namespace { // your build script system. // //////////////////////////////////////////////////////////////////////// +///////////////////////////////////////////////////////////////////// +// this tool is deprecated by build_samplebank and build_soundbank // +///////////////////////////////////////////////////////////////////// + int main(int nNbArg, char **ppArgs) { // create debug stuff From ce9fac523308938c953f35d8e43a316ae03a5f66 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Wed, 13 Nov 2019 16:13:31 +0800 Subject: [PATCH 060/236] Cleanup streamed package merge --- code/CMakeLists.txt | 6 +++--- code/nel/tools/misc/CMakeLists.txt | 10 +++++++++- code/ryzom/client/src/login_patch.cpp | 1 + 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/code/CMakeLists.txt b/code/CMakeLists.txt index e263da274..46900daa6 100644 --- a/code/CMakeLists.txt +++ b/code/CMakeLists.txt @@ -48,15 +48,15 @@ CHECK_OUT_OF_SOURCE() IF(CMAKE_VERSION VERSION_GREATER "2.8.10") STRING(TIMESTAMP CURRENT_YEAR "%Y") ELSE() - SET(CURRENT_YEAR "2016") + SET(CURRENT_YEAR "2019") ENDIF() CMAKE_MINIMUM_REQUIRED(VERSION 2.6) PROJECT(RyzomCore CXX C) SET(NL_VERSION_MAJOR 1) SET(NL_VERSION_MINOR 0) -SET(NL_VERSION_PATCH 1) -SET(YEAR "2004-${CURRENT_YEAR}") +SET(NL_VERSION_PATCH 2) +SET(YEAR "2001-${CURRENT_YEAR}") SET(AUTHOR "Winch Gate and The Ryzom Core Community") SET(RYZOM_VERSION_MAJOR 3) diff --git a/code/nel/tools/misc/CMakeLists.txt b/code/nel/tools/misc/CMakeLists.txt index 8f962d1f2..f9112a823 100644 --- a/code/nel/tools/misc/CMakeLists.txt +++ b/code/nel/tools/misc/CMakeLists.txt @@ -4,7 +4,15 @@ IF(WITH_QT OR WITH_QT5) ENDIF() IF(WITH_NEL_TOOLS) - SUBDIRS(bnp_make disp_sheet_id extract_filename lock make_sheet_id xml_packer) + SUBDIRS( + bnp_make + snp_make + disp_sheet_id + extract_filename + lock + make_sheet_id + xml_packer + ) IF(WITH_QT OR WITH_QT5) ADD_SUBDIRECTORY(words_dic_qt) diff --git a/code/ryzom/client/src/login_patch.cpp b/code/ryzom/client/src/login_patch.cpp index 84d5247fc..908f12977 100644 --- a/code/ryzom/client/src/login_patch.cpp +++ b/code/ryzom/client/src/login_patch.cpp @@ -1882,6 +1882,7 @@ bool CPatchManager::bnpUnpack(const string &srcBigfile, const string &dstPath, v return false; } + // Unpack if (!bnpFile.unpack(DestPath)) return false; From 3fe0ad30a3306c08eed09bf6623090c228aef867 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Wed, 13 Nov 2019 18:20:39 +0800 Subject: [PATCH 061/236] Merge streamed package feature with latest 7z --- code/nel/3rdparty/seven_zip/7zAlloc.cpp | 80 - code/nel/3rdparty/seven_zip/7zBuffer.cpp | 29 - code/nel/3rdparty/seven_zip/7zBuffer.h | 19 - code/nel/3rdparty/seven_zip/7zCrc.cpp | 128 - code/nel/3rdparty/seven_zip/7zDecode.cpp | 150 - code/nel/3rdparty/seven_zip/7zDecode.h | 21 - code/nel/3rdparty/seven_zip/7zExtract.cpp | 116 - code/nel/3rdparty/seven_zip/7zExtract.h | 40 - code/nel/3rdparty/seven_zip/7zHeader.cpp | 5 - code/nel/3rdparty/seven_zip/7zHeader.h | 55 - code/nel/3rdparty/seven_zip/7zIn.cpp | 1281 ------- code/nel/3rdparty/seven_zip/7zIn.h | 55 - code/nel/3rdparty/seven_zip/7zItem.cpp | 133 - code/nel/3rdparty/seven_zip/7zItem.h | 90 - code/nel/3rdparty/seven_zip/7zMain.cpp | 686 ---- code/nel/3rdparty/seven_zip/7zMethodID.cpp | 14 - code/nel/3rdparty/seven_zip/7zMethodID.h | 18 - code/nel/3rdparty/seven_zip/BranchTypes.h | 25 - code/nel/3rdparty/seven_zip/BranchX86.cpp | 101 - code/nel/3rdparty/seven_zip/BranchX86.h | 13 - code/nel/3rdparty/seven_zip/CMakeLists.txt | 20 +- code/nel/3rdparty/seven_zip/LzmaDecode.cpp | 584 ---- code/nel/3rdparty/seven_zip/LzmaDecode.h | 113 - code/nel/3rdparty/seven_zip/LzmaRamDecode.cpp | 79 - code/nel/3rdparty/seven_zip/LzmaRamDecode.h | 55 - code/nel/3rdparty/seven_zip/LzmaTypes.h | 45 - code/nel/3rdparty/seven_zip/readme.txt | 22 - .../include/nel/misc}/seven_zip.h | 8 + code/nel/include/nel/misc/sha1.h | 34 + code/nel/src/misc/CMakeLists.txt | 9 +- .../seven_zip => nel/src/misc}/seven_zip.cpp | 101 +- code/nel/src/misc/sha1.cpp | 71 +- .../nel/src/misc/streamed_package_manager.cpp | 110 +- .../tools/build_gamedata/d1_client_patch.py | 12 +- code/nel/tools/misc/snp_make/main.cpp | 11 +- code/ryzom/client/CMakeLists.txt | 1 - code/ryzom/client/src/CMakeLists.txt | 9 +- code/ryzom/client/src/seven_zip/7z.h | 202 -- code/ryzom/client/src/seven_zip/7zArcIn.cpp | 1771 ---------- code/ryzom/client/src/seven_zip/7zBuf.cpp | 36 - code/ryzom/client/src/seven_zip/7zBuf.h | 35 - code/ryzom/client/src/seven_zip/7zBuf2.cpp | 52 - code/ryzom/client/src/seven_zip/7zCrcOpt.cpp | 115 - code/ryzom/client/src/seven_zip/7zDec.cpp | 591 ---- code/ryzom/client/src/seven_zip/7zFile.cpp | 286 -- code/ryzom/client/src/seven_zip/7zFile.h | 83 - code/ryzom/client/src/seven_zip/7zStream.cpp | 176 - code/ryzom/client/src/seven_zip/7zVersion.h | 27 - code/ryzom/client/src/seven_zip/7zVersion.rc | 55 - code/ryzom/client/src/seven_zip/Aes.cpp | 306 -- code/ryzom/client/src/seven_zip/Aes.h | 38 - code/ryzom/client/src/seven_zip/AesOpt.cpp | 184 - code/ryzom/client/src/seven_zip/Alloc.cpp | 455 --- code/ryzom/client/src/seven_zip/Alloc.h | 51 - code/ryzom/client/src/seven_zip/Bcj2.cpp | 257 -- code/ryzom/client/src/seven_zip/Bcj2.h | 146 - code/ryzom/client/src/seven_zip/Bcj2Enc.cpp | 311 -- code/ryzom/client/src/seven_zip/Bra.cpp | 230 -- code/ryzom/client/src/seven_zip/Bra.h | 64 - code/ryzom/client/src/seven_zip/Bra86.cpp | 82 - code/ryzom/client/src/seven_zip/BraIA64.cpp | 53 - .../ryzom/client/src/seven_zip/CMakeLists.txt | 31 - code/ryzom/client/src/seven_zip/Compiler.h | 33 - code/ryzom/client/src/seven_zip/CpuArch.cpp | 218 -- code/ryzom/client/src/seven_zip/CpuArch.h | 336 -- code/ryzom/client/src/seven_zip/Delta.cpp | 64 - code/ryzom/client/src/seven_zip/Delta.h | 19 - code/ryzom/client/src/seven_zip/LzFind.cpp | 1127 ------- code/ryzom/client/src/seven_zip/LzFind.h | 121 - code/ryzom/client/src/seven_zip/LzHash.h | 57 - code/ryzom/client/src/seven_zip/Lzma2Dec.cpp | 488 --- code/ryzom/client/src/seven_zip/Lzma2Dec.h | 120 - code/ryzom/client/src/seven_zip/Lzma2Enc.cpp | 803 ----- code/ryzom/client/src/seven_zip/Lzma2Enc.h | 55 - code/ryzom/client/src/seven_zip/Lzma86.h | 111 - code/ryzom/client/src/seven_zip/Lzma86Dec.cpp | 54 - code/ryzom/client/src/seven_zip/Lzma86Enc.cpp | 106 - code/ryzom/client/src/seven_zip/LzmaDec.cpp | 1185 ------- code/ryzom/client/src/seven_zip/LzmaDec.h | 234 -- code/ryzom/client/src/seven_zip/LzmaEnc.cpp | 2978 ----------------- code/ryzom/client/src/seven_zip/LzmaEnc.h | 76 - code/ryzom/client/src/seven_zip/LzmaLib.cpp | 40 - code/ryzom/client/src/seven_zip/LzmaLib.h | 131 - code/ryzom/client/src/seven_zip/Ppmd.h | 85 - code/ryzom/client/src/seven_zip/Ppmd7.cpp | 712 ---- code/ryzom/client/src/seven_zip/Ppmd7.h | 142 - code/ryzom/client/src/seven_zip/Ppmd7Dec.cpp | 191 -- code/ryzom/client/src/seven_zip/Ppmd7Enc.cpp | 187 -- code/ryzom/client/src/seven_zip/Precomp.cpp | 4 - code/ryzom/client/src/seven_zip/Precomp.h | 19 - code/ryzom/client/src/seven_zip/RotateDefs.h | 30 - code/ryzom/client/src/seven_zip/Sha256.cpp | 248 -- code/ryzom/client/src/seven_zip/Sha256.h | 26 - code/ryzom/client/src/seven_zip/Sort.cpp | 141 - code/ryzom/client/src/seven_zip/Sort.h | 18 - code/ryzom/client/src/seven_zip/Xz.cpp | 90 - code/ryzom/client/src/seven_zip/Xz.h | 460 --- code/ryzom/client/src/seven_zip/XzCrc64.cpp | 86 - code/ryzom/client/src/seven_zip/XzCrc64.h | 26 - .../ryzom/client/src/seven_zip/XzCrc64Opt.cpp | 69 - code/ryzom/client/src/seven_zip/XzDec.cpp | 2766 --------------- code/ryzom/client/src/seven_zip/XzEnc.cpp | 1329 -------- code/ryzom/client/src/seven_zip/XzEnc.h | 60 - code/ryzom/client/src/seven_zip/XzIn.cpp | 319 -- .../client/client_patcher/CMakeLists.txt | 2 +- .../client/ryzom_installer/CMakeLists.txt | 4 +- code/ryzom/tools/patch_gen/CMakeLists.txt | 6 +- 107 files changed, 242 insertions(+), 25114 deletions(-) delete mode 100644 code/nel/3rdparty/seven_zip/7zAlloc.cpp delete mode 100644 code/nel/3rdparty/seven_zip/7zBuffer.cpp delete mode 100644 code/nel/3rdparty/seven_zip/7zBuffer.h delete mode 100644 code/nel/3rdparty/seven_zip/7zCrc.cpp delete mode 100644 code/nel/3rdparty/seven_zip/7zDecode.cpp delete mode 100644 code/nel/3rdparty/seven_zip/7zDecode.h delete mode 100644 code/nel/3rdparty/seven_zip/7zExtract.cpp delete mode 100644 code/nel/3rdparty/seven_zip/7zExtract.h delete mode 100644 code/nel/3rdparty/seven_zip/7zHeader.cpp delete mode 100644 code/nel/3rdparty/seven_zip/7zHeader.h delete mode 100644 code/nel/3rdparty/seven_zip/7zIn.cpp delete mode 100644 code/nel/3rdparty/seven_zip/7zIn.h delete mode 100644 code/nel/3rdparty/seven_zip/7zItem.cpp delete mode 100644 code/nel/3rdparty/seven_zip/7zItem.h delete mode 100644 code/nel/3rdparty/seven_zip/7zMain.cpp delete mode 100644 code/nel/3rdparty/seven_zip/7zMethodID.cpp delete mode 100644 code/nel/3rdparty/seven_zip/7zMethodID.h delete mode 100644 code/nel/3rdparty/seven_zip/BranchTypes.h delete mode 100644 code/nel/3rdparty/seven_zip/BranchX86.cpp delete mode 100644 code/nel/3rdparty/seven_zip/BranchX86.h delete mode 100644 code/nel/3rdparty/seven_zip/LzmaDecode.cpp delete mode 100644 code/nel/3rdparty/seven_zip/LzmaDecode.h delete mode 100644 code/nel/3rdparty/seven_zip/LzmaRamDecode.cpp delete mode 100644 code/nel/3rdparty/seven_zip/LzmaRamDecode.h delete mode 100644 code/nel/3rdparty/seven_zip/LzmaTypes.h delete mode 100644 code/nel/3rdparty/seven_zip/readme.txt rename code/{ryzom/client/src/seven_zip => nel/include/nel/misc}/seven_zip.h (86%) rename code/{ryzom/client/src/seven_zip => nel/src/misc}/seven_zip.cpp (80%) delete mode 100644 code/ryzom/client/src/seven_zip/7z.h delete mode 100644 code/ryzom/client/src/seven_zip/7zArcIn.cpp delete mode 100644 code/ryzom/client/src/seven_zip/7zBuf.cpp delete mode 100644 code/ryzom/client/src/seven_zip/7zBuf.h delete mode 100644 code/ryzom/client/src/seven_zip/7zBuf2.cpp delete mode 100644 code/ryzom/client/src/seven_zip/7zCrcOpt.cpp delete mode 100644 code/ryzom/client/src/seven_zip/7zDec.cpp delete mode 100644 code/ryzom/client/src/seven_zip/7zFile.cpp delete mode 100644 code/ryzom/client/src/seven_zip/7zFile.h delete mode 100644 code/ryzom/client/src/seven_zip/7zStream.cpp delete mode 100644 code/ryzom/client/src/seven_zip/7zVersion.h delete mode 100644 code/ryzom/client/src/seven_zip/7zVersion.rc delete mode 100644 code/ryzom/client/src/seven_zip/Aes.cpp delete mode 100644 code/ryzom/client/src/seven_zip/Aes.h delete mode 100644 code/ryzom/client/src/seven_zip/AesOpt.cpp delete mode 100644 code/ryzom/client/src/seven_zip/Alloc.cpp delete mode 100644 code/ryzom/client/src/seven_zip/Alloc.h delete mode 100644 code/ryzom/client/src/seven_zip/Bcj2.cpp delete mode 100644 code/ryzom/client/src/seven_zip/Bcj2.h delete mode 100644 code/ryzom/client/src/seven_zip/Bcj2Enc.cpp delete mode 100644 code/ryzom/client/src/seven_zip/Bra.cpp delete mode 100644 code/ryzom/client/src/seven_zip/Bra.h delete mode 100644 code/ryzom/client/src/seven_zip/Bra86.cpp delete mode 100644 code/ryzom/client/src/seven_zip/BraIA64.cpp delete mode 100644 code/ryzom/client/src/seven_zip/CMakeLists.txt delete mode 100644 code/ryzom/client/src/seven_zip/Compiler.h delete mode 100644 code/ryzom/client/src/seven_zip/CpuArch.cpp delete mode 100644 code/ryzom/client/src/seven_zip/CpuArch.h delete mode 100644 code/ryzom/client/src/seven_zip/Delta.cpp delete mode 100644 code/ryzom/client/src/seven_zip/Delta.h delete mode 100644 code/ryzom/client/src/seven_zip/LzFind.cpp delete mode 100644 code/ryzom/client/src/seven_zip/LzFind.h delete mode 100644 code/ryzom/client/src/seven_zip/LzHash.h delete mode 100644 code/ryzom/client/src/seven_zip/Lzma2Dec.cpp delete mode 100644 code/ryzom/client/src/seven_zip/Lzma2Dec.h delete mode 100644 code/ryzom/client/src/seven_zip/Lzma2Enc.cpp delete mode 100644 code/ryzom/client/src/seven_zip/Lzma2Enc.h delete mode 100644 code/ryzom/client/src/seven_zip/Lzma86.h delete mode 100644 code/ryzom/client/src/seven_zip/Lzma86Dec.cpp delete mode 100644 code/ryzom/client/src/seven_zip/Lzma86Enc.cpp delete mode 100644 code/ryzom/client/src/seven_zip/LzmaDec.cpp delete mode 100644 code/ryzom/client/src/seven_zip/LzmaDec.h delete mode 100644 code/ryzom/client/src/seven_zip/LzmaEnc.cpp delete mode 100644 code/ryzom/client/src/seven_zip/LzmaEnc.h delete mode 100644 code/ryzom/client/src/seven_zip/LzmaLib.cpp delete mode 100644 code/ryzom/client/src/seven_zip/LzmaLib.h delete mode 100644 code/ryzom/client/src/seven_zip/Ppmd.h delete mode 100644 code/ryzom/client/src/seven_zip/Ppmd7.cpp delete mode 100644 code/ryzom/client/src/seven_zip/Ppmd7.h delete mode 100644 code/ryzom/client/src/seven_zip/Ppmd7Dec.cpp delete mode 100644 code/ryzom/client/src/seven_zip/Ppmd7Enc.cpp delete mode 100644 code/ryzom/client/src/seven_zip/Precomp.cpp delete mode 100644 code/ryzom/client/src/seven_zip/Precomp.h delete mode 100644 code/ryzom/client/src/seven_zip/RotateDefs.h delete mode 100644 code/ryzom/client/src/seven_zip/Sha256.cpp delete mode 100644 code/ryzom/client/src/seven_zip/Sha256.h delete mode 100644 code/ryzom/client/src/seven_zip/Sort.cpp delete mode 100644 code/ryzom/client/src/seven_zip/Sort.h delete mode 100644 code/ryzom/client/src/seven_zip/Xz.cpp delete mode 100644 code/ryzom/client/src/seven_zip/Xz.h delete mode 100644 code/ryzom/client/src/seven_zip/XzCrc64.cpp delete mode 100644 code/ryzom/client/src/seven_zip/XzCrc64.h delete mode 100644 code/ryzom/client/src/seven_zip/XzCrc64Opt.cpp delete mode 100644 code/ryzom/client/src/seven_zip/XzDec.cpp delete mode 100644 code/ryzom/client/src/seven_zip/XzEnc.cpp delete mode 100644 code/ryzom/client/src/seven_zip/XzEnc.h delete mode 100644 code/ryzom/client/src/seven_zip/XzIn.cpp diff --git a/code/nel/3rdparty/seven_zip/7zAlloc.cpp b/code/nel/3rdparty/seven_zip/7zAlloc.cpp deleted file mode 100644 index c924a529f..000000000 --- a/code/nel/3rdparty/seven_zip/7zAlloc.cpp +++ /dev/null @@ -1,80 +0,0 @@ -/* 7zAlloc.c -- Allocation functions -2017-04-03 : Igor Pavlov : Public domain */ - -#include "Precomp.h" - -#include - -#include "7zAlloc.h" - -/* #define _SZ_ALLOC_DEBUG */ -/* use _SZ_ALLOC_DEBUG to debug alloc/free operations */ - -#ifdef _SZ_ALLOC_DEBUG - -#ifdef _WIN32 -#include -#endif - -#include -int g_allocCount = 0; -int g_allocCountTemp = 0; - -#endif - -void *SzAlloc(ISzAllocPtr p, size_t size) -{ - UNUSED_VAR(p); - if (size == 0) - return 0; - #ifdef _SZ_ALLOC_DEBUG - fprintf(stderr, "\nAlloc %10u bytes; count = %10d", (unsigned)size, g_allocCount); - g_allocCount++; - #endif - return malloc(size); -} - -void SzFree(ISzAllocPtr p, void *address) -{ - UNUSED_VAR(p); - #ifdef _SZ_ALLOC_DEBUG - if (address != 0) - { - g_allocCount--; - fprintf(stderr, "\nFree; count = %10d", g_allocCount); - } - #endif - free(address); -} - -void *SzAllocTemp(ISzAllocPtr p, size_t size) -{ - UNUSED_VAR(p); - if (size == 0) - return 0; - #ifdef _SZ_ALLOC_DEBUG - fprintf(stderr, "\nAlloc_temp %10u bytes; count = %10d", (unsigned)size, g_allocCountTemp); - g_allocCountTemp++; - #ifdef _WIN32 - return HeapAlloc(GetProcessHeap(), 0, size); - #endif - #endif - return malloc(size); -} - -void SzFreeTemp(ISzAllocPtr p, void *address) -{ - UNUSED_VAR(p); - #ifdef _SZ_ALLOC_DEBUG - if (address != 0) - { - g_allocCountTemp--; - fprintf(stderr, "\nFree_temp; count = %10d", g_allocCountTemp); - } - #ifdef _WIN32 - HeapFree(GetProcessHeap(), 0, address); - return; - #endif - #endif - free(address); -} diff --git a/code/nel/3rdparty/seven_zip/7zBuffer.cpp b/code/nel/3rdparty/seven_zip/7zBuffer.cpp deleted file mode 100644 index 3c4b71e80..000000000 --- a/code/nel/3rdparty/seven_zip/7zBuffer.cpp +++ /dev/null @@ -1,29 +0,0 @@ -/* 7zBuffer.c */ - -#include "7zBuffer.h" -#include "7zAlloc.h" - -void SzByteBufferInit(CSzByteBuffer *buffer) -{ - buffer->Capacity = 0; - buffer->Items = 0; -} - -int SzByteBufferCreate(CSzByteBuffer *buffer, size_t newCapacity, void * (*allocFunc)(size_t size)) -{ - buffer->Capacity = newCapacity; - if (newCapacity == 0) - { - buffer->Items = 0; - return 1; - } - buffer->Items = (Byte *)allocFunc(newCapacity); - return (buffer->Items != 0); -} - -void SzByteBufferFree(CSzByteBuffer *buffer, void (*freeFunc)(void *)) -{ - freeFunc(buffer->Items); - buffer->Items = 0; - buffer->Capacity = 0; -} diff --git a/code/nel/3rdparty/seven_zip/7zBuffer.h b/code/nel/3rdparty/seven_zip/7zBuffer.h deleted file mode 100644 index 17e59060f..000000000 --- a/code/nel/3rdparty/seven_zip/7zBuffer.h +++ /dev/null @@ -1,19 +0,0 @@ -/* 7zBuffer.h */ - -#ifndef __7Z_BUFFER_H -#define __7Z_BUFFER_H - -#include -#include "7zTypes.h" - -typedef struct _CSzByteBuffer -{ - size_t Capacity; - Byte *Items; -}CSzByteBuffer; - -void SzByteBufferInit(CSzByteBuffer *buffer); -int SzByteBufferCreate(CSzByteBuffer *buffer, size_t newCapacity, void * (*allocFunc)(size_t size)); -void SzByteBufferFree(CSzByteBuffer *buffer, void (*freeFunc)(void *)); - -#endif diff --git a/code/nel/3rdparty/seven_zip/7zCrc.cpp b/code/nel/3rdparty/seven_zip/7zCrc.cpp deleted file mode 100644 index b4d84f023..000000000 --- a/code/nel/3rdparty/seven_zip/7zCrc.cpp +++ /dev/null @@ -1,128 +0,0 @@ -/* 7zCrc.c -- CRC32 init -2017-06-06 : Igor Pavlov : Public domain */ - -#include "Precomp.h" - -#include "7zCrc.h" -#include "CpuArch.h" - -#define kCrcPoly 0xEDB88320 - -#ifdef MY_CPU_LE - #define CRC_NUM_TABLES 8 -#else - #define CRC_NUM_TABLES 9 - - #define CRC_UINT32_SWAP(v) ((v >> 24) | ((v >> 8) & 0xFF00) | ((v << 8) & 0xFF0000) | (v << 24)) - - UInt32 MY_FAST_CALL CrcUpdateT1_BeT4(UInt32 v, const void *data, size_t size, const UInt32 *table); - UInt32 MY_FAST_CALL CrcUpdateT1_BeT8(UInt32 v, const void *data, size_t size, const UInt32 *table); -#endif - -#ifndef MY_CPU_BE - UInt32 MY_FAST_CALL CrcUpdateT4(UInt32 v, const void *data, size_t size, const UInt32 *table); - UInt32 MY_FAST_CALL CrcUpdateT8(UInt32 v, const void *data, size_t size, const UInt32 *table); -#endif - -typedef UInt32 (MY_FAST_CALL *CRC_FUNC)(UInt32 v, const void *data, size_t size, const UInt32 *table); - -CRC_FUNC g_CrcUpdateT4; -CRC_FUNC g_CrcUpdateT8; -CRC_FUNC g_CrcUpdate; - -UInt32 g_CrcTable[256 * CRC_NUM_TABLES]; - -UInt32 MY_FAST_CALL CrcUpdate(UInt32 v, const void *data, size_t size) -{ - return g_CrcUpdate(v, data, size, g_CrcTable); -} - -UInt32 MY_FAST_CALL CrcCalc(const void *data, size_t size) -{ - return g_CrcUpdate(CRC_INIT_VAL, data, size, g_CrcTable) ^ CRC_INIT_VAL; -} - -#define CRC_UPDATE_BYTE_2(crc, b) (table[((crc) ^ (b)) & 0xFF] ^ ((crc) >> 8)) - -UInt32 MY_FAST_CALL CrcUpdateT1(UInt32 v, const void *data, size_t size, const UInt32 *table) -{ - const Byte *p = (const Byte *)data; - const Byte *pEnd = p + size; - for (; p != pEnd; p++) - v = CRC_UPDATE_BYTE_2(v, *p); - return v; -} - -void MY_FAST_CALL CrcGenerateTable() -{ - UInt32 i; - for (i = 0; i < 256; i++) - { - UInt32 r = i; - unsigned j; - for (j = 0; j < 8; j++) - r = (r >> 1) ^ (kCrcPoly & ((UInt32)0 - (r & 1))); - g_CrcTable[i] = r; - } - for (i = 256; i < 256 * CRC_NUM_TABLES; i++) - { - UInt32 r = g_CrcTable[(size_t)i - 256]; - g_CrcTable[i] = g_CrcTable[r & 0xFF] ^ (r >> 8); - } - - #if CRC_NUM_TABLES < 4 - - g_CrcUpdate = CrcUpdateT1; - - #else - - #ifdef MY_CPU_LE - - g_CrcUpdateT4 = CrcUpdateT4; - g_CrcUpdate = CrcUpdateT4; - - #if CRC_NUM_TABLES >= 8 - g_CrcUpdateT8 = CrcUpdateT8; - - #ifdef MY_CPU_X86_OR_AMD64 - if (!CPU_Is_InOrder()) - #endif - g_CrcUpdate = CrcUpdateT8; - #endif - - #else - { - #ifndef MY_CPU_BE - UInt32 k = 0x01020304; - const Byte *p = (const Byte *)&k; - if (p[0] == 4 && p[1] == 3) - { - g_CrcUpdateT4 = CrcUpdateT4; - g_CrcUpdate = CrcUpdateT4; - #if CRC_NUM_TABLES >= 8 - g_CrcUpdateT8 = CrcUpdateT8; - g_CrcUpdate = CrcUpdateT8; - #endif - } - else if (p[0] != 1 || p[1] != 2) - g_CrcUpdate = CrcUpdateT1; - else - #endif - { - for (i = 256 * CRC_NUM_TABLES - 1; i >= 256; i--) - { - UInt32 x = g_CrcTable[(size_t)i - 256]; - g_CrcTable[i] = CRC_UINT32_SWAP(x); - } - g_CrcUpdateT4 = CrcUpdateT1_BeT4; - g_CrcUpdate = CrcUpdateT1_BeT4; - #if CRC_NUM_TABLES >= 8 - g_CrcUpdateT8 = CrcUpdateT1_BeT8; - g_CrcUpdate = CrcUpdateT1_BeT8; - #endif - } - } - #endif - - #endif -} diff --git a/code/nel/3rdparty/seven_zip/7zDecode.cpp b/code/nel/3rdparty/seven_zip/7zDecode.cpp deleted file mode 100644 index 50d6b8a1f..000000000 --- a/code/nel/3rdparty/seven_zip/7zDecode.cpp +++ /dev/null @@ -1,150 +0,0 @@ -/* 7zDecode.c */ - -#include "7zDecode.h" -#ifdef _SZ_ONE_DIRECTORY -#include "LzmaDecode.h" -#else -#include "../../Compress/LZMA_C/LzmaDecode.h" -#endif - -CMethodID k_Copy = { { 0x0 }, 1 }; -CMethodID k_LZMA = { { 0x3, 0x1, 0x1 }, 3 }; - -#ifdef _LZMA_IN_CB - -typedef struct _CLzmaInCallbackImp -{ - ILzmaInCallback InCallback; - ISzInStream *InStream; - size_t Size; -} CLzmaInCallbackImp; - -int LzmaReadImp(void *object, const unsigned char **buffer, SizeT *size) -{ - CLzmaInCallbackImp *cb = (CLzmaInCallbackImp *)object; - size_t processedSize; - SZ_RESULT res; - *size = 0; - res = cb->InStream->Read((void *)cb->InStream, (void **)buffer, cb->Size, &processedSize); - *size = (SizeT)processedSize; - if (processedSize > cb->Size) - return (int)SZE_FAIL; - cb->Size -= processedSize; - if (res == SZ_OK) - return 0; - return (int)res; -} - -#endif - -SZ_RESULT SzDecode(const CFileSize *packSizes, const CFolder *folder, - #ifdef _LZMA_IN_CB - ISzInStream *inStream, - #else - const Byte *inBuffer, - #endif - Byte *outBuffer, size_t outSize, - size_t *outSizeProcessed, ISzAlloc *allocMain) -{ - UInt32 si; - size_t inSize = 0; - CCoderInfo *coder; - if (folder->NumPackStreams != 1) - return SZE_NOTIMPL; - if (folder->NumCoders != 1) - return SZE_NOTIMPL; - coder = folder->Coders; - *outSizeProcessed = 0; - - for (si = 0; si < folder->NumPackStreams; si++) - inSize += (size_t)packSizes[si]; - - if (AreMethodsEqual(&coder->MethodID, &k_Copy)) - { - size_t i; - if (inSize != outSize) - return SZE_DATA_ERROR; - #ifdef _LZMA_IN_CB - for (i = 0; i < inSize;) - { - size_t j; - Byte *inBuffer; - size_t bufferSize; - RINOK(inStream->Read((void *)inStream, (void **)&inBuffer, inSize - i, &bufferSize)); - if (bufferSize == 0) - return SZE_DATA_ERROR; - if (bufferSize > inSize - i) - return SZE_FAIL; - *outSizeProcessed += bufferSize; - for (j = 0; j < bufferSize && i < inSize; j++, i++) - outBuffer[i] = inBuffer[j]; - } - #else - for (i = 0; i < inSize; i++) - outBuffer[i] = inBuffer[i]; - *outSizeProcessed = inSize; - #endif - return SZ_OK; - } - - if (AreMethodsEqual(&coder->MethodID, &k_LZMA)) - { - #ifdef _LZMA_IN_CB - CLzmaInCallbackImp lzmaCallback; - #else - SizeT inProcessed; - #endif - - CLzmaDecoderState state; /* it's about 24-80 bytes structure, if int is 32-bit */ - int result; - SizeT outSizeProcessedLoc; - - #ifdef _LZMA_IN_CB - lzmaCallback.Size = inSize; - lzmaCallback.InStream = inStream; - lzmaCallback.InCallback.Read = LzmaReadImp; - #endif - - if (LzmaDecodeProperties(&state.Properties, coder->Properties.Items, - (SizeT)coder->Properties.Capacity) != LZMA_RESULT_OK) - return SZE_FAIL; - - state.Probs = (CProb *)allocMain->Alloc(LzmaGetNumProbs(&state.Properties) * sizeof(CProb)); - if (state.Probs == 0) - return SZE_OUTOFMEMORY; - - #ifdef _LZMA_OUT_READ - if (state.Properties.DictionarySize == 0) - state.Dictionary = 0; - else - { - state.Dictionary = (unsigned char *)allocMain->Alloc(state.Properties.DictionarySize); - if (state.Dictionary == 0) - { - allocMain->Free(state.Probs); - return SZE_OUTOFMEMORY; - } - } - LzmaDecoderInit(&state); - #endif - - result = LzmaDecode(&state, - #ifdef _LZMA_IN_CB - &lzmaCallback.InCallback, - #else - inBuffer, (SizeT)inSize, &inProcessed, - #endif - outBuffer, (SizeT)outSize, &outSizeProcessedLoc); - *outSizeProcessed = (size_t)outSizeProcessedLoc; - allocMain->Free(state.Probs); - #ifdef _LZMA_OUT_READ - allocMain->Free(state.Dictionary); - #endif - if (result == LZMA_RESULT_DATA_ERROR) - return SZE_DATA_ERROR; - if (result != LZMA_RESULT_OK) - return SZE_FAIL; - return SZ_OK; - } - return SZE_NOTIMPL; -} diff --git a/code/nel/3rdparty/seven_zip/7zDecode.h b/code/nel/3rdparty/seven_zip/7zDecode.h deleted file mode 100644 index 74bb180fd..000000000 --- a/code/nel/3rdparty/seven_zip/7zDecode.h +++ /dev/null @@ -1,21 +0,0 @@ -/* 7zDecode.h */ - -#ifndef __7Z_DECODE_H -#define __7Z_DECODE_H - -#include "7zItem.h" -#include "7zAlloc.h" -#ifdef _LZMA_IN_CB -#include "7zIn.h" -#endif - -SZ_RESULT SzDecode(const CFileSize *packSizes, const CFolder *folder, - #ifdef _LZMA_IN_CB - ISzInStream *stream, - #else - const Byte *inBuffer, - #endif - Byte *outBuffer, size_t outSize, - size_t *outSizeProcessed, ISzAlloc *allocMain); - -#endif diff --git a/code/nel/3rdparty/seven_zip/7zExtract.cpp b/code/nel/3rdparty/seven_zip/7zExtract.cpp deleted file mode 100644 index 6ef872c31..000000000 --- a/code/nel/3rdparty/seven_zip/7zExtract.cpp +++ /dev/null @@ -1,116 +0,0 @@ -/* 7zExtract.c */ - -#include "7zExtract.h" -#include "7zDecode.h" -#include "7zCrc.h" - -SZ_RESULT SzExtract( - ISzInStream *inStream, - CArchiveDatabaseEx *db, - UInt32 fileIndex, - UInt32 *blockIndex, - Byte **outBuffer, - size_t *outBufferSize, - size_t *offset, - size_t *outSizeProcessed, - ISzAlloc *allocMain, - ISzAlloc *allocTemp) -{ - UInt32 folderIndex = db->FileIndexToFolderIndexMap[fileIndex]; - SZ_RESULT res = SZ_OK; - *offset = 0; - *outSizeProcessed = 0; - if (folderIndex == (UInt32)-1) - { - allocMain->Free(*outBuffer); - *blockIndex = folderIndex; - *outBuffer = 0; - *outBufferSize = 0; - return SZ_OK; - } - - if (*outBuffer == 0 || *blockIndex != folderIndex) - { - CFolder *folder = db->Database.Folders + folderIndex; - CFileSize unPackSize = SzFolderGetUnPackSize(folder); - #ifndef _LZMA_IN_CB - CFileSize packSize = SzArDbGetFolderFullPackSize(db, folderIndex); - Byte *inBuffer = 0; - size_t processedSize; - #endif - *blockIndex = folderIndex; - allocMain->Free(*outBuffer); - *outBuffer = 0; - - RINOK(inStream->Seek(inStream, SzArDbGetFolderStreamPos(db, folderIndex, 0))); - - #ifndef _LZMA_IN_CB - if (packSize != 0) - { - inBuffer = (Byte *)allocTemp->Alloc((size_t)packSize); - if (inBuffer == 0) - return SZE_OUTOFMEMORY; - } - res = inStream->Read(inStream, inBuffer, (size_t)packSize, &processedSize); - if (res == SZ_OK && processedSize != (size_t)packSize) - res = SZE_FAIL; - #endif - if (res == SZ_OK) - { - *outBufferSize = (size_t)unPackSize; - if (unPackSize != 0) - { - *outBuffer = (Byte *)allocMain->Alloc((size_t)unPackSize); - if (*outBuffer == 0) - res = SZE_OUTOFMEMORY; - } - if (res == SZ_OK) - { - size_t outRealSize; - res = SzDecode(db->Database.PackSizes + - db->FolderStartPackStreamIndex[folderIndex], folder, - #ifdef _LZMA_IN_CB - inStream, - #else - inBuffer, - #endif - *outBuffer, (size_t)unPackSize, &outRealSize, allocTemp); - if (res == SZ_OK) - { - if (outRealSize == (size_t)unPackSize) - { - if (folder->UnPackCRCDefined) - { - if (!CrcVerifyDigest(folder->UnPackCRC, *outBuffer, (size_t)unPackSize)) - res = SZE_FAIL; - } - } - else - res = SZE_FAIL; - } - } - } - #ifndef _LZMA_IN_CB - allocTemp->Free(inBuffer); - #endif - } - if (res == SZ_OK) - { - UInt32 i; - CFileItem *fileItem = db->Database.Files + fileIndex; - *offset = 0; - for(i = db->FolderStartFileIndex[folderIndex]; i < fileIndex; i++) - *offset += (UInt32)db->Database.Files[i].Size; - *outSizeProcessed = (size_t)fileItem->Size; - if (*offset + *outSizeProcessed > *outBufferSize) - return SZE_FAIL; - { - if (fileItem->IsFileCRCDefined) - { - if (!CrcVerifyDigest(fileItem->FileCRC, *outBuffer + *offset, *outSizeProcessed)) - res = SZE_FAIL; - } - } - } - return res; -} diff --git a/code/nel/3rdparty/seven_zip/7zExtract.h b/code/nel/3rdparty/seven_zip/7zExtract.h deleted file mode 100644 index e9a4fb4e3..000000000 --- a/code/nel/3rdparty/seven_zip/7zExtract.h +++ /dev/null @@ -1,40 +0,0 @@ -/* 7zExtract.h */ - -#ifndef __7Z_EXTRACT_H -#define __7Z_EXTRACT_H - -#include "7zIn.h" - -/* - SzExtract extracts file from archive - - *outBuffer must be 0 before first call for each new archive. - - Extracting cache: - If you need to decompress more than one file, you can send - these values from previous call: - *blockIndex, - *outBuffer, - *outBufferSize - You can consider "*outBuffer" as cache of solid block. If your archive is solid, - it will increase decompression speed. - - If you use external function, you can declare these 3 cache variables - (blockIndex, outBuffer, outBufferSize) as static in that external function. - - Free *outBuffer and set *outBuffer to 0, if you want to flush cache. -*/ - -SZ_RESULT SzExtract( - ISzInStream *inStream, - CArchiveDatabaseEx *db, - UInt32 fileIndex, /* index of file */ - UInt32 *blockIndex, /* index of solid block */ - Byte **outBuffer, /* pointer to pointer to output buffer (allocated with allocMain) */ - size_t *outBufferSize, /* buffer size for output buffer */ - size_t *offset, /* offset of stream for required file in *outBuffer */ - size_t *outSizeProcessed, /* size of file in *outBuffer */ - ISzAlloc *allocMain, - ISzAlloc *allocTemp); - -#endif diff --git a/code/nel/3rdparty/seven_zip/7zHeader.cpp b/code/nel/3rdparty/seven_zip/7zHeader.cpp deleted file mode 100644 index 3be4bc27e..000000000 --- a/code/nel/3rdparty/seven_zip/7zHeader.cpp +++ /dev/null @@ -1,5 +0,0 @@ -/* 7zHeader.c */ - -#include "7zHeader.h" - -Byte k7zSignature[k7zSignatureSize] = {'7', 'z', 0xBC, 0xAF, 0x27, 0x1C}; diff --git a/code/nel/3rdparty/seven_zip/7zHeader.h b/code/nel/3rdparty/seven_zip/7zHeader.h deleted file mode 100644 index 0356aaa6b..000000000 --- a/code/nel/3rdparty/seven_zip/7zHeader.h +++ /dev/null @@ -1,55 +0,0 @@ -/* 7zHeader.h */ - -#ifndef __7Z_HEADER_H -#define __7Z_HEADER_H - -#include "7zTypes.h" - -#define k7zSignatureSize 6 -extern Byte k7zSignature[k7zSignatureSize]; - -#define k7zMajorVersion 0 - -#define k7zStartHeaderSize 0x20 - -enum EIdEnum -{ - k7zIdEnd, - - k7zIdHeader, - - k7zIdArchiveProperties, - - k7zIdAdditionalStreamsInfo, - k7zIdMainStreamsInfo, - k7zIdFilesInfo, - - k7zIdPackInfo, - k7zIdUnPackInfo, - k7zIdSubStreamsInfo, - - k7zIdSize, - k7zIdCRC, - - k7zIdFolder, - - k7zIdCodersUnPackSize, - k7zIdNumUnPackStream, - - k7zIdEmptyStream, - k7zIdEmptyFile, - k7zIdAnti, - - k7zIdName, - k7zIdCreationTime, - k7zIdLastAccessTime, - k7zIdLastWriteTime, - k7zIdWinAttributes, - k7zIdComment, - - k7zIdEncodedHeader, - - k7zIdStartPos -}; - -#endif diff --git a/code/nel/3rdparty/seven_zip/7zIn.cpp b/code/nel/3rdparty/seven_zip/7zIn.cpp deleted file mode 100644 index b9dbf4695..000000000 --- a/code/nel/3rdparty/seven_zip/7zIn.cpp +++ /dev/null @@ -1,1281 +0,0 @@ -/* 7zIn.c */ - -#include "7zIn.h" -#include "7zCrc.h" -#include "7zDecode.h" - -#define RINOM(x) { if((x) == 0) return SZE_OUTOFMEMORY; } - -void SzArDbExInit(CArchiveDatabaseEx *db) -{ - SzArchiveDatabaseInit(&db->Database); - db->FolderStartPackStreamIndex = 0; - db->PackStreamStartPositions = 0; - db->FolderStartFileIndex = 0; - db->FileIndexToFolderIndexMap = 0; -} - -void SzArDbExFree(CArchiveDatabaseEx *db, void (*freeFunc)(void *)) -{ - freeFunc(db->FolderStartPackStreamIndex); - freeFunc(db->PackStreamStartPositions); - freeFunc(db->FolderStartFileIndex); - freeFunc(db->FileIndexToFolderIndexMap); - SzArchiveDatabaseFree(&db->Database, freeFunc); - SzArDbExInit(db); -} - -/* -CFileSize GetFolderPackStreamSize(int folderIndex, int streamIndex) const -{ - return PackSizes[FolderStartPackStreamIndex[folderIndex] + streamIndex]; -} - -CFileSize GetFilePackSize(int fileIndex) const -{ - int folderIndex = FileIndexToFolderIndexMap[fileIndex]; - if (folderIndex >= 0) - { - const CFolder &folderInfo = Folders[folderIndex]; - if (FolderStartFileIndex[folderIndex] == fileIndex) - return GetFolderFullPackSize(folderIndex); - } - return 0; -} -*/ - -#define MY_ALLOC(T, p, size, allocFunc) { if ((size) == 0) p = 0; else \ - if ((p = (T *)allocFunc((size) * sizeof(T))) == 0) return SZE_OUTOFMEMORY; } - -SZ_RESULT SzArDbExFill(CArchiveDatabaseEx *db, void * (*allocFunc)(size_t size)) -{ - UInt32 startPos = 0; - CFileSize startPosSize = 0; - UInt32 i; - UInt32 folderIndex = 0; - UInt32 indexInFolder = 0; - MY_ALLOC(UInt32, db->FolderStartPackStreamIndex, db->Database.NumFolders, allocFunc); - for(i = 0; i < db->Database.NumFolders; i++) - { - db->FolderStartPackStreamIndex[i] = startPos; - startPos += db->Database.Folders[i].NumPackStreams; - } - - MY_ALLOC(CFileSize, db->PackStreamStartPositions, db->Database.NumPackStreams, allocFunc); - - for(i = 0; i < db->Database.NumPackStreams; i++) - { - db->PackStreamStartPositions[i] = startPosSize; - startPosSize += db->Database.PackSizes[i]; - } - - MY_ALLOC(UInt32, db->FolderStartFileIndex, db->Database.NumFolders, allocFunc); - MY_ALLOC(UInt32, db->FileIndexToFolderIndexMap, db->Database.NumFiles, allocFunc); - - for (i = 0; i < db->Database.NumFiles; i++) - { - CFileItem *file = db->Database.Files + i; - int emptyStream = !file->HasStream; - if (emptyStream && indexInFolder == 0) - { - db->FileIndexToFolderIndexMap[i] = (UInt32)-1; - continue; - } - if (indexInFolder == 0) - { - /* - v3.13 incorrectly worked with empty folders - v4.07: Loop for skipping empty folders - */ - for(;;) - { - if (folderIndex >= db->Database.NumFolders) - return SZE_ARCHIVE_ERROR; - db->FolderStartFileIndex[folderIndex] = i; - if (db->Database.Folders[folderIndex].NumUnPackStreams != 0) - break; - folderIndex++; - } - } - db->FileIndexToFolderIndexMap[i] = folderIndex; - if (emptyStream) - continue; - indexInFolder++; - if (indexInFolder >= db->Database.Folders[folderIndex].NumUnPackStreams) - { - folderIndex++; - indexInFolder = 0; - } - } - return SZ_OK; -} - - -CFileSize SzArDbGetFolderStreamPos(CArchiveDatabaseEx *db, UInt32 folderIndex, UInt32 indexInFolder) -{ - return db->ArchiveInfo.DataStartPosition + - db->PackStreamStartPositions[db->FolderStartPackStreamIndex[folderIndex] + indexInFolder]; -} - -CFileSize SzArDbGetFolderFullPackSize(CArchiveDatabaseEx *db, UInt32 folderIndex) -{ - UInt32 packStreamIndex = db->FolderStartPackStreamIndex[folderIndex]; - CFolder *folder = db->Database.Folders + folderIndex; - CFileSize size = 0; - UInt32 i; - for (i = 0; i < folder->NumPackStreams; i++) - size += db->Database.PackSizes[packStreamIndex + i]; - return size; -} - - -/* -SZ_RESULT SzReadTime(const CObjectVector &dataVector, - CObjectVector &files, UInt64 type) -{ - CBoolVector boolVector; - RINOK(ReadBoolVector2(files.Size(), boolVector)) - - CStreamSwitch streamSwitch; - RINOK(streamSwitch.Set(this, &dataVector)); - - for(int i = 0; i < files.Size(); i++) - { - CFileItem &file = files[i]; - CArchiveFileTime fileTime; - bool defined = boolVector[i]; - if (defined) - { - UInt32 low, high; - RINOK(SzReadUInt32(low)); - RINOK(SzReadUInt32(high)); - fileTime.dwLowDateTime = low; - fileTime.dwHighDateTime = high; - } - switch(type) - { - case k7zIdCreationTime: - file.IsCreationTimeDefined = defined; - if (defined) - file.CreationTime = fileTime; - break; - case k7zIdLastWriteTime: - file.IsLastWriteTimeDefined = defined; - if (defined) - file.LastWriteTime = fileTime; - break; - case k7zIdLastAccessTime: - file.IsLastAccessTimeDefined = defined; - if (defined) - file.LastAccessTime = fileTime; - break; - } - } - return SZ_OK; -} -*/ - -SZ_RESULT SafeReadDirect(ISzInStream *inStream, Byte *data, size_t size) -{ - #ifdef _LZMA_IN_CB - while (size > 0) - { - Byte *inBuffer; - size_t processedSize; - RINOK(inStream->Read(inStream, (void **)&inBuffer, size, &processedSize)); - if (processedSize == 0 || processedSize > size) - return SZE_FAIL; - size -= processedSize; - do - { - *data++ = *inBuffer++; - } - while (--processedSize != 0); - } - #else - size_t processedSize; - RINOK(inStream->Read(inStream, data, size, &processedSize)); - if (processedSize != size) - return SZE_FAIL; - #endif - return SZ_OK; -} - -SZ_RESULT SafeReadDirectByte(ISzInStream *inStream, Byte *data) -{ - return SafeReadDirect(inStream, data, 1); -} - -SZ_RESULT SafeReadDirectUInt32(ISzInStream *inStream, UInt32 *value) -{ - int i; - *value = 0; - for (i = 0; i < 4; i++) - { - Byte b; - RINOK(SafeReadDirectByte(inStream, &b)); - *value |= ((UInt32)b << (8 * i)); - } - return SZ_OK; -} - -SZ_RESULT SafeReadDirectUInt64(ISzInStream *inStream, UInt64 *value) -{ - int i; - *value = 0; - for (i = 0; i < 8; i++) - { - Byte b; - RINOK(SafeReadDirectByte(inStream, &b)); - *value |= ((UInt32)b << (8 * i)); - } - return SZ_OK; -} - -int TestSignatureCandidate(Byte *testBytes) -{ - size_t i; - for (i = 0; i < k7zSignatureSize; i++) - if (testBytes[i] != k7zSignature[i]) - return 0; - return 1; -} - -typedef struct _CSzState -{ - Byte *Data; - size_t Size; -}CSzData; - -SZ_RESULT SzReadByte(CSzData *sd, Byte *b) -{ - if (sd->Size == 0) - return SZE_ARCHIVE_ERROR; - sd->Size--; - *b = *sd->Data++; - return SZ_OK; -} - -SZ_RESULT SzReadBytes(CSzData *sd, Byte *data, size_t size) -{ - size_t i; - for (i = 0; i < size; i++) - { - RINOK(SzReadByte(sd, data + i)); - } - return SZ_OK; -} - -SZ_RESULT SzReadUInt32(CSzData *sd, UInt32 *value) -{ - int i; - *value = 0; - for (i = 0; i < 4; i++) - { - Byte b; - RINOK(SzReadByte(sd, &b)); - *value |= ((UInt32)(b) << (8 * i)); - } - return SZ_OK; -} - -SZ_RESULT SzReadNumber(CSzData *sd, UInt64 *value) -{ - Byte firstByte; - Byte mask = 0x80; - int i; - RINOK(SzReadByte(sd, &firstByte)); - *value = 0; - for (i = 0; i < 8; i++) - { - Byte b; - if ((firstByte & mask) == 0) - { - UInt64 highPart = firstByte & (mask - 1); - *value += (highPart << (8 * i)); - return SZ_OK; - } - RINOK(SzReadByte(sd, &b)); - *value |= ((UInt64)b << (8 * i)); - mask >>= 1; - } - return SZ_OK; -} - -SZ_RESULT SzReadSize(CSzData *sd, CFileSize *value) -{ - UInt64 value64; - RINOK(SzReadNumber(sd, &value64)); - *value = (CFileSize)value64; - return SZ_OK; -} - -SZ_RESULT SzReadNumber32(CSzData *sd, UInt32 *value) -{ - UInt64 value64; - RINOK(SzReadNumber(sd, &value64)); - if (value64 >= 0x80000000) - return SZE_NOTIMPL; - if (value64 >= ((UInt64)(1) << ((sizeof(size_t) - 1) * 8 + 2))) - return SZE_NOTIMPL; - *value = (UInt32)value64; - return SZ_OK; -} - -SZ_RESULT SzReadID(CSzData *sd, UInt64 *value) -{ - return SzReadNumber(sd, value); -} - -SZ_RESULT SzSkeepDataSize(CSzData *sd, UInt64 size) -{ - if (size > sd->Size) - return SZE_ARCHIVE_ERROR; - sd->Size -= (size_t)size; - sd->Data += (size_t)size; - return SZ_OK; -} - -SZ_RESULT SzSkeepData(CSzData *sd) -{ - UInt64 size; - RINOK(SzReadNumber(sd, &size)); - return SzSkeepDataSize(sd, size); -} - -SZ_RESULT SzReadArchiveProperties(CSzData *sd) -{ - for(;;) - { - UInt64 type; - RINOK(SzReadID(sd, &type)); - if (type == k7zIdEnd) - break; - SzSkeepData(sd); - } - return SZ_OK; -} - -SZ_RESULT SzWaitAttribute(CSzData *sd, UInt64 attribute) -{ - for(;;) - { - UInt64 type; - RINOK(SzReadID(sd, &type)); - if (type == attribute) - return SZ_OK; - if (type == k7zIdEnd) - return SZE_ARCHIVE_ERROR; - RINOK(SzSkeepData(sd)); - } -} - -SZ_RESULT SzReadBoolVector(CSzData *sd, size_t numItems, Byte **v, void * (*allocFunc)(size_t size)) -{ - Byte b = 0; - Byte mask = 0; - size_t i; - MY_ALLOC(Byte, *v, numItems, allocFunc); - for(i = 0; i < numItems; i++) - { - if (mask == 0) - { - RINOK(SzReadByte(sd, &b)); - mask = 0x80; - } - (*v)[i] = (Byte)(((b & mask) != 0) ? 1 : 0); - mask >>= 1; - } - return SZ_OK; -} - -SZ_RESULT SzReadBoolVector2(CSzData *sd, size_t numItems, Byte **v, void * (*allocFunc)(size_t size)) -{ - Byte allAreDefined; - size_t i; - RINOK(SzReadByte(sd, &allAreDefined)); - if (allAreDefined == 0) - return SzReadBoolVector(sd, numItems, v, allocFunc); - MY_ALLOC(Byte, *v, numItems, allocFunc); - for(i = 0; i < numItems; i++) - (*v)[i] = 1; - return SZ_OK; -} - -SZ_RESULT SzReadHashDigests( - CSzData *sd, - size_t numItems, - Byte **digestsDefined, - UInt32 **digests, - void * (*allocFunc)(size_t size)) -{ - size_t i; - RINOK(SzReadBoolVector2(sd, numItems, digestsDefined, allocFunc)); - MY_ALLOC(UInt32, *digests, numItems, allocFunc); - for(i = 0; i < numItems; i++) - if ((*digestsDefined)[i]) - { - RINOK(SzReadUInt32(sd, (*digests) + i)); - } - return SZ_OK; -} - -SZ_RESULT SzReadPackInfo( - CSzData *sd, - CFileSize *dataOffset, - UInt32 *numPackStreams, - CFileSize **packSizes, - Byte **packCRCsDefined, - UInt32 **packCRCs, - void * (*allocFunc)(size_t size)) -{ - UInt32 i; - RINOK(SzReadSize(sd, dataOffset)); - RINOK(SzReadNumber32(sd, numPackStreams)); - - RINOK(SzWaitAttribute(sd, k7zIdSize)); - - MY_ALLOC(CFileSize, *packSizes, (size_t)*numPackStreams, allocFunc); - - for(i = 0; i < *numPackStreams; i++) - { - RINOK(SzReadSize(sd, (*packSizes) + i)); - } - - for(;;) - { - UInt64 type; - RINOK(SzReadID(sd, &type)); - if (type == k7zIdEnd) - break; - if (type == k7zIdCRC) - { - RINOK(SzReadHashDigests(sd, (size_t)*numPackStreams, packCRCsDefined, packCRCs, allocFunc)); - continue; - } - RINOK(SzSkeepData(sd)); - } - if (*packCRCsDefined == 0) - { - MY_ALLOC(Byte, *packCRCsDefined, (size_t)*numPackStreams, allocFunc); - MY_ALLOC(UInt32, *packCRCs, (size_t)*numPackStreams, allocFunc); - for(i = 0; i < *numPackStreams; i++) - { - (*packCRCsDefined)[i] = 0; - (*packCRCs)[i] = 0; - } - } - return SZ_OK; -} - -SZ_RESULT SzReadSwitch(CSzData *sd) -{ - Byte external; - RINOK(SzReadByte(sd, &external)); - return (external == 0) ? SZ_OK: SZE_ARCHIVE_ERROR; -} - -SZ_RESULT SzGetNextFolderItem(CSzData *sd, CFolder *folder, void * (*allocFunc)(size_t size)) -{ - UInt32 numCoders; - UInt32 numBindPairs; - UInt32 numPackedStreams; - UInt32 i; - UInt32 numInStreams = 0; - UInt32 numOutStreams = 0; - RINOK(SzReadNumber32(sd, &numCoders)); - folder->NumCoders = numCoders; - - MY_ALLOC(CCoderInfo, folder->Coders, (size_t)numCoders, allocFunc); - - for (i = 0; i < numCoders; i++) - SzCoderInfoInit(folder->Coders + i); - - for (i = 0; i < numCoders; i++) - { - Byte mainByte; - CCoderInfo *coder = folder->Coders + i; - { - RINOK(SzReadByte(sd, &mainByte)); - coder->MethodID.IDSize = (Byte)(mainByte & 0xF); - RINOK(SzReadBytes(sd, coder->MethodID.ID, coder->MethodID.IDSize)); - if ((mainByte & 0x10) != 0) - { - RINOK(SzReadNumber32(sd, &coder->NumInStreams)); - RINOK(SzReadNumber32(sd, &coder->NumOutStreams)); - } - else - { - coder->NumInStreams = 1; - coder->NumOutStreams = 1; - } - if ((mainByte & 0x20) != 0) - { - UInt64 propertiesSize = 0; - RINOK(SzReadNumber(sd, &propertiesSize)); - if (!SzByteBufferCreate(&coder->Properties, (size_t)propertiesSize, allocFunc)) - return SZE_OUTOFMEMORY; - RINOK(SzReadBytes(sd, coder->Properties.Items, (size_t)propertiesSize)); - } - } - while ((mainByte & 0x80) != 0) - { - RINOK(SzReadByte(sd, &mainByte)); - RINOK(SzSkeepDataSize(sd, (mainByte & 0xF))); - if ((mainByte & 0x10) != 0) - { - UInt32 n; - RINOK(SzReadNumber32(sd, &n)); - RINOK(SzReadNumber32(sd, &n)); - } - if ((mainByte & 0x20) != 0) - { - UInt64 propertiesSize = 0; - RINOK(SzReadNumber(sd, &propertiesSize)); - RINOK(SzSkeepDataSize(sd, propertiesSize)); - } - } - numInStreams += (UInt32)coder->NumInStreams; - numOutStreams += (UInt32)coder->NumOutStreams; - } - - numBindPairs = numOutStreams - 1; - folder->NumBindPairs = numBindPairs; - - - MY_ALLOC(CBindPair, folder->BindPairs, (size_t)numBindPairs, allocFunc); - - for (i = 0; i < numBindPairs; i++) - { - CBindPair *bindPair = folder->BindPairs + i;; - RINOK(SzReadNumber32(sd, &bindPair->InIndex)); - RINOK(SzReadNumber32(sd, &bindPair->OutIndex)); - } - - numPackedStreams = numInStreams - (UInt32)numBindPairs; - - folder->NumPackStreams = numPackedStreams; - MY_ALLOC(UInt32, folder->PackStreams, (size_t)numPackedStreams, allocFunc); - - if (numPackedStreams == 1) - { - UInt32 j; - UInt32 pi = 0; - for (j = 0; j < numInStreams; j++) - if (SzFolderFindBindPairForInStream(folder, j) < 0) - { - folder->PackStreams[pi++] = j; - break; - } - } - else - for(i = 0; i < numPackedStreams; i++) - { - RINOK(SzReadNumber32(sd, folder->PackStreams + i)); - } - return SZ_OK; -} - -SZ_RESULT SzReadUnPackInfo( - CSzData *sd, - UInt32 *numFolders, - CFolder **folders, /* for allocFunc */ - void * (*allocFunc)(size_t size), - ISzAlloc *allocTemp) -{ - UInt32 i; - RINOK(SzWaitAttribute(sd, k7zIdFolder)); - RINOK(SzReadNumber32(sd, numFolders)); - { - RINOK(SzReadSwitch(sd)); - - MY_ALLOC(CFolder, *folders, (size_t)*numFolders, allocFunc); - - for(i = 0; i < *numFolders; i++) - SzFolderInit((*folders) + i); - - for(i = 0; i < *numFolders; i++) - { - RINOK(SzGetNextFolderItem(sd, (*folders) + i, allocFunc)); - } - } - - RINOK(SzWaitAttribute(sd, k7zIdCodersUnPackSize)); - - for(i = 0; i < *numFolders; i++) - { - UInt32 j; - CFolder *folder = (*folders) + i; - UInt32 numOutStreams = SzFolderGetNumOutStreams(folder); - - MY_ALLOC(CFileSize, folder->UnPackSizes, (size_t)numOutStreams, allocFunc); - - for(j = 0; j < numOutStreams; j++) - { - RINOK(SzReadSize(sd, folder->UnPackSizes + j)); - } - } - - for(;;) - { - UInt64 type; - RINOK(SzReadID(sd, &type)); - if (type == k7zIdEnd) - return SZ_OK; - if (type == k7zIdCRC) - { - SZ_RESULT res; - Byte *crcsDefined = 0; - UInt32 *crcs = 0; - res = SzReadHashDigests(sd, *numFolders, &crcsDefined, &crcs, allocTemp->Alloc); - if (res == SZ_OK) - { - for(i = 0; i < *numFolders; i++) - { - CFolder *folder = (*folders) + i; - folder->UnPackCRCDefined = crcsDefined[i]; - folder->UnPackCRC = crcs[i]; - } - } - allocTemp->Free(crcs); - allocTemp->Free(crcsDefined); - RINOK(res); - continue; - } - RINOK(SzSkeepData(sd)); - } -} - -SZ_RESULT SzReadSubStreamsInfo( - CSzData *sd, - UInt32 numFolders, - CFolder *folders, - UInt32 *numUnPackStreams, - CFileSize **unPackSizes, - Byte **digestsDefined, - UInt32 **digests, - ISzAlloc *allocTemp) -{ - UInt64 type = 0; - UInt32 i; - UInt32 si = 0; - UInt32 numDigests = 0; - - for(i = 0; i < numFolders; i++) - folders[i].NumUnPackStreams = 1; - *numUnPackStreams = numFolders; - - for(;;) - { - RINOK(SzReadID(sd, &type)); - if (type == k7zIdNumUnPackStream) - { - *numUnPackStreams = 0; - for(i = 0; i < numFolders; i++) - { - UInt32 numStreams; - RINOK(SzReadNumber32(sd, &numStreams)); - folders[i].NumUnPackStreams = numStreams; - *numUnPackStreams += numStreams; - } - continue; - } - if (type == k7zIdCRC || type == k7zIdSize) - break; - if (type == k7zIdEnd) - break; - RINOK(SzSkeepData(sd)); - } - - if (*numUnPackStreams == 0) - { - *unPackSizes = 0; - *digestsDefined = 0; - *digests = 0; - } - else - { - *unPackSizes = (CFileSize *)allocTemp->Alloc((size_t)*numUnPackStreams * sizeof(CFileSize)); - RINOM(*unPackSizes); - *digestsDefined = (Byte *)allocTemp->Alloc((size_t)*numUnPackStreams * sizeof(Byte)); - RINOM(*digestsDefined); - *digests = (UInt32 *)allocTemp->Alloc((size_t)*numUnPackStreams * sizeof(UInt32)); - RINOM(*digests); - } - - for(i = 0; i < numFolders; i++) - { - /* - v3.13 incorrectly worked with empty folders - v4.07: we check that folder is empty - */ - CFileSize sum = 0; - UInt32 j; - UInt32 numSubstreams = folders[i].NumUnPackStreams; - if (numSubstreams == 0) - continue; - if (type == k7zIdSize) - for (j = 1; j < numSubstreams; j++) - { - CFileSize size; - RINOK(SzReadSize(sd, &size)); - (*unPackSizes)[si++] = size; - sum += size; - } - (*unPackSizes)[si++] = SzFolderGetUnPackSize(folders + i) - sum; - } - if (type == k7zIdSize) - { - RINOK(SzReadID(sd, &type)); - } - - for(i = 0; i < *numUnPackStreams; i++) - { - (*digestsDefined)[i] = 0; - (*digests)[i] = 0; - } - - - for(i = 0; i < numFolders; i++) - { - UInt32 numSubstreams = folders[i].NumUnPackStreams; - if (numSubstreams != 1 || !folders[i].UnPackCRCDefined) - numDigests += numSubstreams; - } - - - si = 0; - for(;;) - { - if (type == k7zIdCRC) - { - int digestIndex = 0; - Byte *digestsDefined2 = 0; - UInt32 *digests2 = 0; - SZ_RESULT res = SzReadHashDigests(sd, numDigests, &digestsDefined2, &digests2, allocTemp->Alloc); - if (res == SZ_OK) - { - for (i = 0; i < numFolders; i++) - { - CFolder *folder = folders + i; - UInt32 numSubstreams = folder->NumUnPackStreams; - if (numSubstreams == 1 && folder->UnPackCRCDefined) - { - (*digestsDefined)[si] = 1; - (*digests)[si] = folder->UnPackCRC; - si++; - } - else - { - UInt32 j; - for (j = 0; j < numSubstreams; j++, digestIndex++) - { - (*digestsDefined)[si] = digestsDefined2[digestIndex]; - (*digests)[si] = digests2[digestIndex]; - si++; - } - } - } - } - allocTemp->Free(digestsDefined2); - allocTemp->Free(digests2); - RINOK(res); - } - else if (type == k7zIdEnd) - return SZ_OK; - else - { - RINOK(SzSkeepData(sd)); - } - RINOK(SzReadID(sd, &type)); - } -} - - -SZ_RESULT SzReadStreamsInfo( - CSzData *sd, - CFileSize *dataOffset, - CArchiveDatabase *db, - UInt32 *numUnPackStreams, - CFileSize **unPackSizes, /* allocTemp */ - Byte **digestsDefined, /* allocTemp */ - UInt32 **digests, /* allocTemp */ - void * (*allocFunc)(size_t size), - ISzAlloc *allocTemp) -{ - for(;;) - { - UInt64 type; - RINOK(SzReadID(sd, &type)); - if ((UInt64)(int)type != type) - return SZE_FAIL; - switch((int)type) - { - case k7zIdEnd: - return SZ_OK; - case k7zIdPackInfo: - { - RINOK(SzReadPackInfo(sd, dataOffset, &db->NumPackStreams, - &db->PackSizes, &db->PackCRCsDefined, &db->PackCRCs, allocFunc)); - break; - } - case k7zIdUnPackInfo: - { - RINOK(SzReadUnPackInfo(sd, &db->NumFolders, &db->Folders, allocFunc, allocTemp)); - break; - } - case k7zIdSubStreamsInfo: - { - RINOK(SzReadSubStreamsInfo(sd, db->NumFolders, db->Folders, - numUnPackStreams, unPackSizes, digestsDefined, digests, allocTemp)); - break; - } - default: - return SZE_FAIL; - } - } -} - -Byte kUtf8Limits[5] = { 0xC0, 0xE0, 0xF0, 0xF8, 0xFC }; - -SZ_RESULT SzReadFileNames(CSzData *sd, UInt32 numFiles, CFileItem *files, - void * (*allocFunc)(size_t size)) -{ - UInt32 i; - for(i = 0; i < numFiles; i++) - { - UInt32 len = 0; - UInt32 pos = 0; - CFileItem *file = files + i; - while(pos + 2 <= sd->Size) - { - int numAdds; - UInt32 value = (UInt32)(sd->Data[pos] | (((UInt32)sd->Data[pos + 1]) << 8)); - pos += 2; - len++; - if (value == 0) - break; - if (value < 0x80) - continue; - if (value >= 0xD800 && value < 0xE000) - { - UInt32 c2; - if (value >= 0xDC00) - return SZE_ARCHIVE_ERROR; - if (pos + 2 > sd->Size) - return SZE_ARCHIVE_ERROR; - c2 = (UInt32)(sd->Data[pos] | (((UInt32)sd->Data[pos + 1]) << 8)); - pos += 2; - if (c2 < 0xDC00 || c2 >= 0xE000) - return SZE_ARCHIVE_ERROR; - value = ((value - 0xD800) << 10) | (c2 - 0xDC00); - } - for (numAdds = 1; numAdds < 5; numAdds++) - if (value < (((UInt32)1) << (numAdds * 5 + 6))) - break; - len += numAdds; - } - - MY_ALLOC(char, file->Name, (size_t)len, allocFunc); - - len = 0; - while(2 <= sd->Size) - { - int numAdds; - UInt32 value = (UInt32)(sd->Data[0] | (((UInt32)sd->Data[1]) << 8)); - SzSkeepDataSize(sd, 2); - if (value < 0x80) - { - file->Name[len++] = (char)value; - if (value == 0) - break; - continue; - } - if (value >= 0xD800 && value < 0xE000) - { - UInt32 c2 = (UInt32)(sd->Data[0] | (((UInt32)sd->Data[1]) << 8)); - SzSkeepDataSize(sd, 2); - value = ((value - 0xD800) << 10) | (c2 - 0xDC00); - } - for (numAdds = 1; numAdds < 5; numAdds++) - if (value < (((UInt32)1) << (numAdds * 5 + 6))) - break; - file->Name[len++] = (char)(kUtf8Limits[numAdds - 1] + (value >> (6 * numAdds))); - do - { - numAdds--; - file->Name[len++] = (char)(0x80 + ((value >> (6 * numAdds)) & 0x3F)); - } - while(numAdds > 0); - - len += numAdds; - } - } - return SZ_OK; -} - -SZ_RESULT SzReadHeader2( - CSzData *sd, - CArchiveDatabaseEx *db, /* allocMain */ - CFileSize **unPackSizes, /* allocTemp */ - Byte **digestsDefined, /* allocTemp */ - UInt32 **digests, /* allocTemp */ - Byte **emptyStreamVector, /* allocTemp */ - Byte **emptyFileVector, /* allocTemp */ - ISzAlloc *allocMain, - ISzAlloc *allocTemp) -{ - UInt64 type; - UInt32 numUnPackStreams = 0; - UInt32 numFiles = 0; - CFileItem *files = 0; - UInt32 numEmptyStreams = 0; - UInt32 i; - - RINOK(SzReadID(sd, &type)); - - if (type == k7zIdArchiveProperties) - { - RINOK(SzReadArchiveProperties(sd)); - RINOK(SzReadID(sd, &type)); - } - - - if (type == k7zIdMainStreamsInfo) - { - RINOK(SzReadStreamsInfo(sd, - &db->ArchiveInfo.DataStartPosition, - &db->Database, - &numUnPackStreams, - unPackSizes, - digestsDefined, - digests, allocMain->Alloc, allocTemp)); - db->ArchiveInfo.DataStartPosition += db->ArchiveInfo.StartPositionAfterHeader; - RINOK(SzReadID(sd, &type)); - } - - if (type == k7zIdEnd) - return SZ_OK; - if (type != k7zIdFilesInfo) - return SZE_ARCHIVE_ERROR; - - RINOK(SzReadNumber32(sd, &numFiles)); - db->Database.NumFiles = numFiles; - - MY_ALLOC(CFileItem, files, (size_t)numFiles, allocMain->Alloc); - - db->Database.Files = files; - for(i = 0; i < numFiles; i++) - SzFileInit(files + i); - - for(;;) - { - UInt64 type; - UInt64 size; - RINOK(SzReadID(sd, &type)); - if (type == k7zIdEnd) - break; - RINOK(SzReadNumber(sd, &size)); - - if ((UInt64)(int)type != type) - { - RINOK(SzSkeepDataSize(sd, size)); - } - else - switch((int)type) - { - case k7zIdName: - { - RINOK(SzReadSwitch(sd)); - RINOK(SzReadFileNames(sd, numFiles, files, allocMain->Alloc)) - break; - } - case k7zIdEmptyStream: - { - RINOK(SzReadBoolVector(sd, numFiles, emptyStreamVector, allocTemp->Alloc)); - numEmptyStreams = 0; - for (i = 0; i < numFiles; i++) - if ((*emptyStreamVector)[i]) - numEmptyStreams++; - break; - } - case k7zIdEmptyFile: - { - RINOK(SzReadBoolVector(sd, numEmptyStreams, emptyFileVector, allocTemp->Alloc)); - break; - } - default: - { - RINOK(SzSkeepDataSize(sd, size)); - } - } - } - - { - UInt32 emptyFileIndex = 0; - UInt32 sizeIndex = 0; - for(i = 0; i < numFiles; i++) - { - CFileItem *file = files + i; - file->IsAnti = 0; - if (*emptyStreamVector == 0) - file->HasStream = 1; - else - file->HasStream = (Byte)((*emptyStreamVector)[i] ? 0 : 1); - if(file->HasStream) - { - file->IsDirectory = 0; - file->Size = (*unPackSizes)[sizeIndex]; - file->FileCRC = (*digests)[sizeIndex]; - file->IsFileCRCDefined = (Byte)(*digestsDefined)[sizeIndex]; - sizeIndex++; - } - else - { - if (*emptyFileVector == 0) - file->IsDirectory = 1; - else - file->IsDirectory = (Byte)((*emptyFileVector)[emptyFileIndex] ? 0 : 1); - emptyFileIndex++; - file->Size = 0; - file->IsFileCRCDefined = 0; - } - } - } - return SzArDbExFill(db, allocMain->Alloc); -} - -SZ_RESULT SzReadHeader( - CSzData *sd, - CArchiveDatabaseEx *db, - ISzAlloc *allocMain, - ISzAlloc *allocTemp) -{ - CFileSize *unPackSizes = 0; - Byte *digestsDefined = 0; - UInt32 *digests = 0; - Byte *emptyStreamVector = 0; - Byte *emptyFileVector = 0; - SZ_RESULT res = SzReadHeader2(sd, db, - &unPackSizes, &digestsDefined, &digests, - &emptyStreamVector, &emptyFileVector, - allocMain, allocTemp); - allocTemp->Free(unPackSizes); - allocTemp->Free(digestsDefined); - allocTemp->Free(digests); - allocTemp->Free(emptyStreamVector); - allocTemp->Free(emptyFileVector); - return res; -} - -SZ_RESULT SzReadAndDecodePackedStreams2( - ISzInStream *inStream, - CSzData *sd, - CSzByteBuffer *outBuffer, - CFileSize baseOffset, - CArchiveDatabase *db, - CFileSize **unPackSizes, - Byte **digestsDefined, - UInt32 **digests, - #ifndef _LZMA_IN_CB - Byte **inBuffer, - #endif - ISzAlloc *allocTemp) -{ - - UInt32 numUnPackStreams = 0; - CFileSize dataStartPos; - CFolder *folder; - #ifndef _LZMA_IN_CB - CFileSize packSize = 0; - UInt32 i = 0; - #endif - CFileSize unPackSize; - size_t outRealSize; - SZ_RESULT res; - - RINOK(SzReadStreamsInfo(sd, &dataStartPos, db, - &numUnPackStreams, unPackSizes, digestsDefined, digests, - allocTemp->Alloc, allocTemp)); - - dataStartPos += baseOffset; - if (db->NumFolders != 1) - return SZE_ARCHIVE_ERROR; - - folder = db->Folders; - unPackSize = SzFolderGetUnPackSize(folder); - - RINOK(inStream->Seek(inStream, dataStartPos)); - - #ifndef _LZMA_IN_CB - for (i = 0; i < db->NumPackStreams; i++) - packSize += db->PackSizes[i]; - - MY_ALLOC(Byte, *inBuffer, (size_t)packSize, allocTemp->Alloc); - - RINOK(SafeReadDirect(inStream, *inBuffer, (size_t)packSize)); - #endif - - if (!SzByteBufferCreate(outBuffer, (size_t)unPackSize, allocTemp->Alloc)) - return SZE_OUTOFMEMORY; - - res = SzDecode(db->PackSizes, folder, - #ifdef _LZMA_IN_CB - inStream, - #else - *inBuffer, - #endif - outBuffer->Items, (size_t)unPackSize, - &outRealSize, allocTemp); - RINOK(res) - if (outRealSize != (UInt32)unPackSize) - return SZE_FAIL; - if (folder->UnPackCRCDefined) - if (!CrcVerifyDigest(folder->UnPackCRC, outBuffer->Items, (size_t)unPackSize)) - return SZE_FAIL; - return SZ_OK; -} - -SZ_RESULT SzReadAndDecodePackedStreams( - ISzInStream *inStream, - CSzData *sd, - CSzByteBuffer *outBuffer, - CFileSize baseOffset, - ISzAlloc *allocTemp) -{ - CArchiveDatabase db; - CFileSize *unPackSizes = 0; - Byte *digestsDefined = 0; - UInt32 *digests = 0; - #ifndef _LZMA_IN_CB - Byte *inBuffer = 0; - #endif - SZ_RESULT res; - SzArchiveDatabaseInit(&db); - res = SzReadAndDecodePackedStreams2(inStream, sd, outBuffer, baseOffset, - &db, &unPackSizes, &digestsDefined, &digests, - #ifndef _LZMA_IN_CB - &inBuffer, - #endif - allocTemp); - SzArchiveDatabaseFree(&db, allocTemp->Free); - allocTemp->Free(unPackSizes); - allocTemp->Free(digestsDefined); - allocTemp->Free(digests); - #ifndef _LZMA_IN_CB - allocTemp->Free(inBuffer); - #endif - return res; -} - -SZ_RESULT SzArchiveOpen2( - ISzInStream *inStream, - CArchiveDatabaseEx *db, - ISzAlloc *allocMain, - ISzAlloc *allocTemp) -{ - Byte signature[k7zSignatureSize]; - Byte version; - UInt32 crcFromArchive; - UInt64 nextHeaderOffset; - UInt64 nextHeaderSize; - UInt32 nextHeaderCRC; - UInt32 crc; - CFileSize pos = 0; - CSzByteBuffer buffer; - CSzData sd; - SZ_RESULT res; - - RINOK(SafeReadDirect(inStream, signature, k7zSignatureSize)); - - if (!TestSignatureCandidate(signature)) - return SZE_ARCHIVE_ERROR; - - /* - db.Clear(); - db.ArchiveInfo.StartPosition = _arhiveBeginStreamPosition; - */ - RINOK(SafeReadDirectByte(inStream, &version)); - if (version != k7zMajorVersion) - return SZE_ARCHIVE_ERROR; - RINOK(SafeReadDirectByte(inStream, &version)); - - RINOK(SafeReadDirectUInt32(inStream, &crcFromArchive)); - - CrcInit(&crc); - RINOK(SafeReadDirectUInt64(inStream, &nextHeaderOffset)); - CrcUpdateUInt64(&crc, nextHeaderOffset); - RINOK(SafeReadDirectUInt64(inStream, &nextHeaderSize)); - CrcUpdateUInt64(&crc, nextHeaderSize); - RINOK(SafeReadDirectUInt32(inStream, &nextHeaderCRC)); - CrcUpdateUInt32(&crc, nextHeaderCRC); - - pos = k7zStartHeaderSize; - db->ArchiveInfo.StartPositionAfterHeader = pos; - - if (CrcGetDigest(&crc) != crcFromArchive) - return SZE_ARCHIVE_ERROR; - - if (nextHeaderSize == 0) - return SZ_OK; - - RINOK(inStream->Seek(inStream, (CFileSize)(pos + nextHeaderOffset))); - - if (!SzByteBufferCreate(&buffer, (size_t)nextHeaderSize, allocTemp->Alloc)) - return SZE_OUTOFMEMORY; - - res = SafeReadDirect(inStream, buffer.Items, (size_t)nextHeaderSize); - if (res == SZ_OK) - { - if (CrcVerifyDigest(nextHeaderCRC, buffer.Items, (UInt32)nextHeaderSize)) - { - for(;;) - { - UInt64 type; - sd.Data = buffer.Items; - sd.Size = buffer.Capacity; - res = SzReadID(&sd, &type); - if (res != SZ_OK) - break; - if (type == k7zIdHeader) - { - res = SzReadHeader(&sd, db, allocMain, allocTemp); - break; - } - if (type != k7zIdEncodedHeader) - { - res = SZE_ARCHIVE_ERROR; - break; - } - { - CSzByteBuffer outBuffer; - res = SzReadAndDecodePackedStreams(inStream, &sd, &outBuffer, - db->ArchiveInfo.StartPositionAfterHeader, - allocTemp); - if (res != SZ_OK) - { - SzByteBufferFree(&outBuffer, allocTemp->Free); - break; - } - SzByteBufferFree(&buffer, allocTemp->Free); - buffer.Items = outBuffer.Items; - buffer.Capacity = outBuffer.Capacity; - } - } - } - } - SzByteBufferFree(&buffer, allocTemp->Free); - return res; -} - -SZ_RESULT SzArchiveOpen( - ISzInStream *inStream, - CArchiveDatabaseEx *db, - ISzAlloc *allocMain, - ISzAlloc *allocTemp) -{ - SZ_RESULT res = SzArchiveOpen2(inStream, db, allocMain, allocTemp); - if (res != SZ_OK) - SzArDbExFree(db, allocMain->Free); - return res; -} diff --git a/code/nel/3rdparty/seven_zip/7zIn.h b/code/nel/3rdparty/seven_zip/7zIn.h deleted file mode 100644 index 6bfa2a709..000000000 --- a/code/nel/3rdparty/seven_zip/7zIn.h +++ /dev/null @@ -1,55 +0,0 @@ -/* 7zIn.h */ - -#ifndef __7Z_IN_H -#define __7Z_IN_H - -#include "7zHeader.h" -#include "7zItem.h" -#include "7zAlloc.h" - -typedef struct _CInArchiveInfo -{ - CFileSize StartPositionAfterHeader; - CFileSize DataStartPosition; -}CInArchiveInfo; - -typedef struct _CArchiveDatabaseEx -{ - CArchiveDatabase Database; - CInArchiveInfo ArchiveInfo; - UInt32 *FolderStartPackStreamIndex; - CFileSize *PackStreamStartPositions; - UInt32 *FolderStartFileIndex; - UInt32 *FileIndexToFolderIndexMap; -}CArchiveDatabaseEx; - -void SzArDbExInit(CArchiveDatabaseEx *db); -void SzArDbExFree(CArchiveDatabaseEx *db, void (*freeFunc)(void *)); -CFileSize SzArDbGetFolderStreamPos(CArchiveDatabaseEx *db, UInt32 folderIndex, UInt32 indexInFolder); -CFileSize SzArDbGetFolderFullPackSize(CArchiveDatabaseEx *db, UInt32 folderIndex); - -typedef struct _ISzInStream -{ - #ifdef _LZMA_IN_CB - SZ_RESULT (*Read)( - void *object, /* pointer to ISzInStream itself */ - void **buffer, /* out: pointer to buffer with data */ - size_t maxRequiredSize, /* max required size to read */ - size_t *processedSize); /* real processed size. - processedSize can be less than maxRequiredSize. - If processedSize == 0, then there are no more - bytes in stream. */ - #else - SZ_RESULT (*Read)(void *object, void *buffer, size_t size, size_t *processedSize); - #endif - SZ_RESULT (*Seek)(void *object, CFileSize pos); -} ISzInStream; - - -int SzArchiveOpen( - ISzInStream *inStream, - CArchiveDatabaseEx *db, - ISzAlloc *allocMain, - ISzAlloc *allocTemp); - -#endif diff --git a/code/nel/3rdparty/seven_zip/7zItem.cpp b/code/nel/3rdparty/seven_zip/7zItem.cpp deleted file mode 100644 index 2a408050f..000000000 --- a/code/nel/3rdparty/seven_zip/7zItem.cpp +++ /dev/null @@ -1,133 +0,0 @@ -/* 7zItem.c */ - -#include "7zItem.h" -#include "7zAlloc.h" - -void SzCoderInfoInit(CCoderInfo *coder) -{ - SzByteBufferInit(&coder->Properties); -} - -void SzCoderInfoFree(CCoderInfo *coder, void (*freeFunc)(void *p)) -{ - SzByteBufferFree(&coder->Properties, freeFunc); - SzCoderInfoInit(coder); -} - -void SzFolderInit(CFolder *folder) -{ - folder->NumCoders = 0; - folder->Coders = 0; - folder->NumBindPairs = 0; - folder->BindPairs = 0; - folder->NumPackStreams = 0; - folder->PackStreams = 0; - folder->UnPackSizes = 0; - folder->UnPackCRCDefined = 0; - folder->UnPackCRC = 0; - folder->NumUnPackStreams = 0; -} - -void SzFolderFree(CFolder *folder, void (*freeFunc)(void *p)) -{ - UInt32 i; - for (i = 0; i < folder->NumCoders; i++) - SzCoderInfoFree(&folder->Coders[i], freeFunc); - freeFunc(folder->Coders); - freeFunc(folder->BindPairs); - freeFunc(folder->PackStreams); - freeFunc(folder->UnPackSizes); - SzFolderInit(folder); -} - -UInt32 SzFolderGetNumOutStreams(CFolder *folder) -{ - UInt32 result = 0; - UInt32 i; - for (i = 0; i < folder->NumCoders; i++) - result += folder->Coders[i].NumOutStreams; - return result; -} - -int SzFolderFindBindPairForInStream(CFolder *folder, UInt32 inStreamIndex) -{ - UInt32 i; - for(i = 0; i < folder->NumBindPairs; i++) - if (folder->BindPairs[i].InIndex == inStreamIndex) - return i; - return -1; -} - - -int SzFolderFindBindPairForOutStream(CFolder *folder, UInt32 outStreamIndex) -{ - UInt32 i; - for(i = 0; i < folder->NumBindPairs; i++) - if (folder->BindPairs[i].OutIndex == outStreamIndex) - return i; - return -1; -} - -CFileSize SzFolderGetUnPackSize(CFolder *folder) -{ - int i = (int)SzFolderGetNumOutStreams(folder); - if (i == 0) - return 0; - for (i--; i >= 0; i--) - if (SzFolderFindBindPairForOutStream(folder, i) < 0) - return folder->UnPackSizes[i]; - /* throw 1; */ - return 0; -} - -/* -int FindPackStreamArrayIndex(int inStreamIndex) const -{ - for(int i = 0; i < PackStreams.Size(); i++) - if (PackStreams[i] == inStreamIndex) - return i; - return -1; -} -*/ - -void SzFileInit(CFileItem *fileItem) -{ - fileItem->IsFileCRCDefined = 0; - fileItem->HasStream = 1; - fileItem->IsDirectory = 0; - fileItem->IsAnti = 0; - fileItem->Name = 0; -} - -void SzFileFree(CFileItem *fileItem, void (*freeFunc)(void *p)) -{ - freeFunc(fileItem->Name); - SzFileInit(fileItem); -} - -void SzArchiveDatabaseInit(CArchiveDatabase *db) -{ - db->NumPackStreams = 0; - db->PackSizes = 0; - db->PackCRCsDefined = 0; - db->PackCRCs = 0; - db->NumFolders = 0; - db->Folders = 0; - db->NumFiles = 0; - db->Files = 0; -} - -void SzArchiveDatabaseFree(CArchiveDatabase *db, void (*freeFunc)(void *)) -{ - UInt32 i; - for (i = 0; i < db->NumFolders; i++) - SzFolderFree(&db->Folders[i], freeFunc); - for (i = 0; i < db->NumFiles; i++) - SzFileFree(&db->Files[i], freeFunc); - freeFunc(db->PackSizes); - freeFunc(db->PackCRCsDefined); - freeFunc(db->PackCRCs); - freeFunc(db->Folders); - freeFunc(db->Files); - SzArchiveDatabaseInit(db); -} diff --git a/code/nel/3rdparty/seven_zip/7zItem.h b/code/nel/3rdparty/seven_zip/7zItem.h deleted file mode 100644 index 876539a98..000000000 --- a/code/nel/3rdparty/seven_zip/7zItem.h +++ /dev/null @@ -1,90 +0,0 @@ -/* 7zItem.h */ - -#ifndef __7Z_ITEM_H -#define __7Z_ITEM_H - -#include "7zMethodID.h" -#include "7zHeader.h" -#include "7zBuffer.h" - -typedef struct _CCoderInfo -{ - UInt32 NumInStreams; - UInt32 NumOutStreams; - CMethodID MethodID; - CSzByteBuffer Properties; -}CCoderInfo; - -void SzCoderInfoInit(CCoderInfo *coder); -void SzCoderInfoFree(CCoderInfo *coder, void (*freeFunc)(void *p)); - -typedef struct _CBindPair -{ - UInt32 InIndex; - UInt32 OutIndex; -}CBindPair; - -typedef struct _CFolder -{ - UInt32 NumCoders; - CCoderInfo *Coders; - UInt32 NumBindPairs; - CBindPair *BindPairs; - UInt32 NumPackStreams; - UInt32 *PackStreams; - CFileSize *UnPackSizes; - int UnPackCRCDefined; - UInt32 UnPackCRC; - - UInt32 NumUnPackStreams; -}CFolder; - -void SzFolderInit(CFolder *folder); -CFileSize SzFolderGetUnPackSize(CFolder *folder); -int SzFolderFindBindPairForInStream(CFolder *folder, UInt32 inStreamIndex); -UInt32 SzFolderGetNumOutStreams(CFolder *folder); -CFileSize SzFolderGetUnPackSize(CFolder *folder); - -/* #define CArchiveFileTime UInt64 */ - -typedef struct _CFileItem -{ - /* - CArchiveFileTime LastWriteTime; - CFileSize StartPos; - UInt32 Attributes; - */ - CFileSize Size; - UInt32 FileCRC; - char *Name; - - Byte IsFileCRCDefined; - Byte HasStream; - Byte IsDirectory; - Byte IsAnti; - /* - int AreAttributesDefined; - int IsLastWriteTimeDefined; - int IsStartPosDefined; - */ -}CFileItem; - -void SzFileInit(CFileItem *fileItem); - -typedef struct _CArchiveDatabase -{ - UInt32 NumPackStreams; - CFileSize *PackSizes; - Byte *PackCRCsDefined; - UInt32 *PackCRCs; - UInt32 NumFolders; - CFolder *Folders; - UInt32 NumFiles; - CFileItem *Files; -}CArchiveDatabase; - -void SzArchiveDatabaseInit(CArchiveDatabase *db); -void SzArchiveDatabaseFree(CArchiveDatabase *db, void (*freeFunc)(void *)); - - -#endif diff --git a/code/nel/3rdparty/seven_zip/7zMain.cpp b/code/nel/3rdparty/seven_zip/7zMain.cpp deleted file mode 100644 index 59ecd2885..000000000 --- a/code/nel/3rdparty/seven_zip/7zMain.cpp +++ /dev/null @@ -1,686 +0,0 @@ -/* 7zMain.c - Test application for 7z Decoder -2019-02-02 : Igor Pavlov : Public domain */ - -#include "Precomp.h" - -#include -#include - -#include "CpuArch.h" - -#include "7z.h" -#include "7zAlloc.h" -#include "7zBuf.h" -#include "7zCrc.h" -#include "7zFile.h" -#include "7zVersion.h" - -#ifndef USE_WINDOWS_FILE -/* for mkdir */ -#ifdef _WIN32 -#include -#else -#include -#include -#endif -#endif - - -#define kInputBufSize ((size_t)1 << 18) - -static const ISzAlloc g_Alloc = { SzAlloc, SzFree }; - - -static void Print(const char *s) -{ - fputs(s, stdout); -} - - -static int Buf_EnsureSize(CBuf *dest, size_t size) -{ - if (dest->size >= size) - return 1; - Buf_Free(dest, &g_Alloc); - return Buf_Create(dest, size, &g_Alloc); -} - -#ifndef _WIN32 -#define _USE_UTF8 -#endif - -/* #define _USE_UTF8 */ - -#ifdef _USE_UTF8 - -#define _UTF8_START(n) (0x100 - (1 << (7 - (n)))) - -#define _UTF8_RANGE(n) (((UInt32)1) << ((n) * 5 + 6)) - -#define _UTF8_HEAD(n, val) ((Byte)(_UTF8_START(n) + (val >> (6 * (n))))) -#define _UTF8_CHAR(n, val) ((Byte)(0x80 + (((val) >> (6 * (n))) & 0x3F))) - -static size_t Utf16_To_Utf8_Calc(const UInt16 *src, const UInt16 *srcLim) -{ - size_t size = 0; - for (;;) - { - UInt32 val; - if (src == srcLim) - return size; - - size++; - val = *src++; - - if (val < 0x80) - continue; - - if (val < _UTF8_RANGE(1)) - { - size++; - continue; - } - - if (val >= 0xD800 && val < 0xDC00 && src != srcLim) - { - UInt32 c2 = *src; - if (c2 >= 0xDC00 && c2 < 0xE000) - { - src++; - size += 3; - continue; - } - } - - size += 2; - } -} - -static Byte *Utf16_To_Utf8(Byte *dest, const UInt16 *src, const UInt16 *srcLim) -{ - for (;;) - { - UInt32 val; - if (src == srcLim) - return dest; - - val = *src++; - - if (val < 0x80) - { - *dest++ = (char)val; - continue; - } - - if (val < _UTF8_RANGE(1)) - { - dest[0] = _UTF8_HEAD(1, val); - dest[1] = _UTF8_CHAR(0, val); - dest += 2; - continue; - } - - if (val >= 0xD800 && val < 0xDC00 && src != srcLim) - { - UInt32 c2 = *src; - if (c2 >= 0xDC00 && c2 < 0xE000) - { - src++; - val = (((val - 0xD800) << 10) | (c2 - 0xDC00)) + 0x10000; - dest[0] = _UTF8_HEAD(3, val); - dest[1] = _UTF8_CHAR(2, val); - dest[2] = _UTF8_CHAR(1, val); - dest[3] = _UTF8_CHAR(0, val); - dest += 4; - continue; - } - } - - dest[0] = _UTF8_HEAD(2, val); - dest[1] = _UTF8_CHAR(1, val); - dest[2] = _UTF8_CHAR(0, val); - dest += 3; - } -} - -static SRes Utf16_To_Utf8Buf(CBuf *dest, const UInt16 *src, size_t srcLen) -{ - size_t destLen = Utf16_To_Utf8_Calc(src, src + srcLen); - destLen += 1; - if (!Buf_EnsureSize(dest, destLen)) - return SZ_ERROR_MEM; - *Utf16_To_Utf8(dest->data, src, src + srcLen) = 0; - return SZ_OK; -} - -#endif - -static SRes Utf16_To_Char(CBuf *buf, const UInt16 *s - #ifndef _USE_UTF8 - , UINT codePage - #endif - ) -{ - unsigned len = 0; - for (len = 0; s[len] != 0; len++); - - #ifndef _USE_UTF8 - { - unsigned size = len * 3 + 100; - if (!Buf_EnsureSize(buf, size)) - return SZ_ERROR_MEM; - { - buf->data[0] = 0; - if (len != 0) - { - char defaultChar = '_'; - BOOL defUsed; - unsigned numChars = 0; - numChars = WideCharToMultiByte(codePage, 0, (LPCWSTR)s, len, (char *)buf->data, size, &defaultChar, &defUsed); - if (numChars == 0 || numChars >= size) - return SZ_ERROR_FAIL; - buf->data[numChars] = 0; - } - return SZ_OK; - } - } - #else - return Utf16_To_Utf8Buf(buf, s, len); - #endif -} - -#ifdef _WIN32 - #ifndef USE_WINDOWS_FILE - static UINT g_FileCodePage = CP_ACP; - #endif - #define MY_FILE_CODE_PAGE_PARAM ,g_FileCodePage -#else - #define MY_FILE_CODE_PAGE_PARAM -#endif - -static WRes MyCreateDir(const UInt16 *name) -{ - #ifdef USE_WINDOWS_FILE - - return CreateDirectoryW((LPCWSTR)name, NULL) ? 0 : GetLastError(); - - #else - - CBuf buf; - WRes res; - Buf_Init(&buf); - RINOK(Utf16_To_Char(&buf, name MY_FILE_CODE_PAGE_PARAM)); - - res = - #ifdef _WIN32 - _mkdir((const char *)buf.data) - #else - mkdir((const char *)buf.data, 0777) - #endif - == 0 ? 0 : errno; - Buf_Free(&buf, &g_Alloc); - return res; - - #endif -} - -static WRes OutFile_OpenUtf16(CSzFile *p, const UInt16 *name) -{ - #ifdef USE_WINDOWS_FILE - return OutFile_OpenW(p, (LPCWSTR)name); - #else - CBuf buf; - WRes res; - Buf_Init(&buf); - RINOK(Utf16_To_Char(&buf, name MY_FILE_CODE_PAGE_PARAM)); - res = OutFile_Open(p, (const char *)buf.data); - Buf_Free(&buf, &g_Alloc); - return res; - #endif -} - - -static SRes PrintString(const UInt16 *s) -{ - CBuf buf; - SRes res; - Buf_Init(&buf); - res = Utf16_To_Char(&buf, s - #ifndef _USE_UTF8 - , CP_OEMCP - #endif - ); - if (res == SZ_OK) - Print((const char *)buf.data); - Buf_Free(&buf, &g_Alloc); - return res; -} - -static void UInt64ToStr(UInt64 value, char *s, int numDigits) -{ - char temp[32]; - int pos = 0; - do - { - temp[pos++] = (char)('0' + (unsigned)(value % 10)); - value /= 10; - } - while (value != 0); - - for (numDigits -= pos; numDigits > 0; numDigits--) - *s++ = ' '; - - do - *s++ = temp[--pos]; - while (pos); - *s = '\0'; -} - -static char *UIntToStr(char *s, unsigned value, int numDigits) -{ - char temp[16]; - int pos = 0; - do - temp[pos++] = (char)('0' + (value % 10)); - while (value /= 10); - - for (numDigits -= pos; numDigits > 0; numDigits--) - *s++ = '0'; - - do - *s++ = temp[--pos]; - while (pos); - *s = '\0'; - return s; -} - -static void UIntToStr_2(char *s, unsigned value) -{ - s[0] = (char)('0' + (value / 10)); - s[1] = (char)('0' + (value % 10)); -} - -#define PERIOD_4 (4 * 365 + 1) -#define PERIOD_100 (PERIOD_4 * 25 - 1) -#define PERIOD_400 (PERIOD_100 * 4 + 1) - -static void ConvertFileTimeToString(const CNtfsFileTime *nt, char *s) -{ - unsigned year, mon, hour, min, sec; - Byte ms[] = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }; - unsigned t; - UInt32 v; - UInt64 v64 = nt->Low | ((UInt64)nt->High << 32); - v64 /= 10000000; - sec = (unsigned)(v64 % 60); v64 /= 60; - min = (unsigned)(v64 % 60); v64 /= 60; - hour = (unsigned)(v64 % 24); v64 /= 24; - - v = (UInt32)v64; - - year = (unsigned)(1601 + v / PERIOD_400 * 400); - v %= PERIOD_400; - - t = v / PERIOD_100; if (t == 4) t = 3; year += t * 100; v -= t * PERIOD_100; - t = v / PERIOD_4; if (t == 25) t = 24; year += t * 4; v -= t * PERIOD_4; - t = v / 365; if (t == 4) t = 3; year += t; v -= t * 365; - - if (year % 4 == 0 && (year % 100 != 0 || year % 400 == 0)) - ms[1] = 29; - for (mon = 0;; mon++) - { - unsigned d = ms[mon]; - if (v < d) - break; - v -= d; - } - s = UIntToStr(s, year, 4); *s++ = '-'; - UIntToStr_2(s, mon + 1); s[2] = '-'; s += 3; - UIntToStr_2(s, (unsigned)v + 1); s[2] = ' '; s += 3; - UIntToStr_2(s, hour); s[2] = ':'; s += 3; - UIntToStr_2(s, min); s[2] = ':'; s += 3; - UIntToStr_2(s, sec); s[2] = 0; -} - -static void PrintLF() -{ - Print("\n"); -} - -static void PrintError(char *s) -{ - Print("\nERROR: "); - Print(s); - PrintLF(); -} - -static void GetAttribString(UInt32 wa, BoolInt isDir, char *s) -{ - #ifdef USE_WINDOWS_FILE - s[0] = (char)(((wa & FILE_ATTRIBUTE_DIRECTORY) != 0 || isDir) ? 'D' : '.'); - s[1] = (char)(((wa & FILE_ATTRIBUTE_READONLY ) != 0) ? 'R': '.'); - s[2] = (char)(((wa & FILE_ATTRIBUTE_HIDDEN ) != 0) ? 'H': '.'); - s[3] = (char)(((wa & FILE_ATTRIBUTE_SYSTEM ) != 0) ? 'S': '.'); - s[4] = (char)(((wa & FILE_ATTRIBUTE_ARCHIVE ) != 0) ? 'A': '.'); - s[5] = 0; - #else - s[0] = (char)(((wa & (1 << 4)) != 0 || isDir) ? 'D' : '.'); - s[1] = 0; - #endif -} - - -// #define NUM_PARENTS_MAX 128 - -int MY_CDECL main(int numargs, char *args[]) -{ - ISzAlloc allocImp; - ISzAlloc allocTempImp; - - CFileInStream archiveStream; - CLookToRead2 lookStream; - CSzArEx db; - SRes res; - UInt16 *temp = NULL; - size_t tempSize = 0; - // UInt32 parents[NUM_PARENTS_MAX]; - - Print("\n7z Decoder " MY_VERSION_CPU " : " MY_COPYRIGHT_DATE "\n\n"); - - if (numargs == 1) - { - Print( - "Usage: 7zDec \n\n" - "\n" - " e: Extract files from archive (without using directory names)\n" - " l: List contents of archive\n" - " t: Test integrity of archive\n" - " x: eXtract files with full paths\n"); - return 0; - } - - if (numargs < 3) - { - PrintError("incorrect command"); - return 1; - } - - #if defined(_WIN32) && !defined(USE_WINDOWS_FILE) && !defined(UNDER_CE) - g_FileCodePage = AreFileApisANSI() ? CP_ACP : CP_OEMCP; - #endif - - - allocImp = g_Alloc; - allocTempImp = g_Alloc; - - #ifdef UNDER_CE - if (InFile_OpenW(&archiveStream.file, L"\test.7z")) - #else - if (InFile_Open(&archiveStream.file, args[2])) - #endif - { - PrintError("can not open input file"); - return 1; - } - - FileInStream_CreateVTable(&archiveStream); - LookToRead2_CreateVTable(&lookStream, False); - lookStream.buf = NULL; - - res = SZ_OK; - - { - lookStream.buf = (Byte *)ISzAlloc_Alloc(&allocImp, kInputBufSize); - if (!lookStream.buf) - res = SZ_ERROR_MEM; - else - { - lookStream.bufSize = kInputBufSize; - lookStream.realStream = &archiveStream.vt; - LookToRead2_Init(&lookStream); - } - } - - CrcGenerateTable(); - - SzArEx_Init(&db); - - if (res == SZ_OK) - { - res = SzArEx_Open(&db, &lookStream.vt, &allocImp, &allocTempImp); - } - - if (res == SZ_OK) - { - char *command = args[1]; - int listCommand = 0, testCommand = 0, fullPaths = 0; - - if (strcmp(command, "l") == 0) listCommand = 1; - else if (strcmp(command, "t") == 0) testCommand = 1; - else if (strcmp(command, "e") == 0) { } - else if (strcmp(command, "x") == 0) { fullPaths = 1; } - else - { - PrintError("incorrect command"); - res = SZ_ERROR_FAIL; - } - - if (res == SZ_OK) - { - UInt32 i; - - /* - if you need cache, use these 3 variables. - if you use external function, you can make these variable as static. - */ - UInt32 blockIndex = 0xFFFFFFFF; /* it can have any value before first call (if outBuffer = 0) */ - Byte *outBuffer = 0; /* it must be 0 before first call for each new archive. */ - size_t outBufferSize = 0; /* it can have any value before first call (if outBuffer = 0) */ - - for (i = 0; i < db.NumFiles; i++) - { - size_t offset = 0; - size_t outSizeProcessed = 0; - // const CSzFileItem *f = db.Files + i; - size_t len; - unsigned isDir = SzArEx_IsDir(&db, i); - if (listCommand == 0 && isDir && !fullPaths) - continue; - len = SzArEx_GetFileNameUtf16(&db, i, NULL); - // len = SzArEx_GetFullNameLen(&db, i); - - if (len > tempSize) - { - SzFree(NULL, temp); - tempSize = len; - temp = (UInt16 *)SzAlloc(NULL, tempSize * sizeof(temp[0])); - if (!temp) - { - res = SZ_ERROR_MEM; - break; - } - } - - SzArEx_GetFileNameUtf16(&db, i, temp); - /* - if (SzArEx_GetFullNameUtf16_Back(&db, i, temp + len) != temp) - { - res = SZ_ERROR_FAIL; - break; - } - */ - - if (listCommand) - { - char attr[8], s[32], t[32]; - UInt64 fileSize; - - GetAttribString(SzBitWithVals_Check(&db.Attribs, i) ? db.Attribs.Vals[i] : 0, isDir, attr); - - fileSize = SzArEx_GetFileSize(&db, i); - UInt64ToStr(fileSize, s, 10); - - if (SzBitWithVals_Check(&db.MTime, i)) - ConvertFileTimeToString(&db.MTime.Vals[i], t); - else - { - size_t j; - for (j = 0; j < 19; j++) - t[j] = ' '; - t[j] = '\0'; - } - - Print(t); - Print(" "); - Print(attr); - Print(" "); - Print(s); - Print(" "); - res = PrintString(temp); - if (res != SZ_OK) - break; - if (isDir) - Print("/"); - PrintLF(); - continue; - } - - Print(testCommand ? - "Testing ": - "Extracting "); - res = PrintString(temp); - if (res != SZ_OK) - break; - - if (isDir) - Print("/"); - else - { - res = SzArEx_Extract(&db, &lookStream.vt, i, - &blockIndex, &outBuffer, &outBufferSize, - &offset, &outSizeProcessed, - &allocImp, &allocTempImp); - if (res != SZ_OK) - break; - } - - if (!testCommand) - { - CSzFile outFile; - size_t processedSize; - size_t j; - UInt16 *name = (UInt16 *)temp; - const UInt16 *destPath = (const UInt16 *)name; - - for (j = 0; name[j] != 0; j++) - if (name[j] == '/') - { - if (fullPaths) - { - name[j] = 0; - MyCreateDir(name); - name[j] = CHAR_PATH_SEPARATOR; - } - else - destPath = name + j + 1; - } - - if (isDir) - { - MyCreateDir(destPath); - PrintLF(); - continue; - } - else if (OutFile_OpenUtf16(&outFile, destPath)) - { - PrintError("can not open output file"); - res = SZ_ERROR_FAIL; - break; - } - - processedSize = outSizeProcessed; - - if (File_Write(&outFile, outBuffer + offset, &processedSize) != 0 || processedSize != outSizeProcessed) - { - PrintError("can not write output file"); - res = SZ_ERROR_FAIL; - break; - } - - #ifdef USE_WINDOWS_FILE - { - FILETIME mtime, ctime; - FILETIME *mtimePtr = NULL; - FILETIME *ctimePtr = NULL; - - if (SzBitWithVals_Check(&db.MTime, i)) - { - const CNtfsFileTime *t = &db.MTime.Vals[i]; - mtime.dwLowDateTime = (DWORD)(t->Low); - mtime.dwHighDateTime = (DWORD)(t->High); - mtimePtr = &mtime; - } - if (SzBitWithVals_Check(&db.CTime, i)) - { - const CNtfsFileTime *t = &db.CTime.Vals[i]; - ctime.dwLowDateTime = (DWORD)(t->Low); - ctime.dwHighDateTime = (DWORD)(t->High); - ctimePtr = &ctime; - } - if (mtimePtr || ctimePtr) - SetFileTime(outFile.handle, ctimePtr, NULL, mtimePtr); - } - #endif - - if (File_Close(&outFile)) - { - PrintError("can not close output file"); - res = SZ_ERROR_FAIL; - break; - } - - #ifdef USE_WINDOWS_FILE - if (SzBitWithVals_Check(&db.Attribs, i)) - { - UInt32 attrib = db.Attribs.Vals[i]; - /* p7zip stores posix attributes in high 16 bits and adds 0x8000 as marker. - We remove posix bits, if we detect posix mode field */ - if ((attrib & 0xF0000000) != 0) - attrib &= 0x7FFF; - SetFileAttributesW((LPCWSTR)destPath, attrib); - } - #endif - } - PrintLF(); - } - ISzAlloc_Free(&allocImp, outBuffer); - } - } - - SzFree(NULL, temp); - SzArEx_Free(&db, &allocImp); - ISzAlloc_Free(&allocImp, lookStream.buf); - - File_Close(&archiveStream.file); - - if (res == SZ_OK) - { - Print("\nEverything is Ok\n"); - return 0; - } - - if (res == SZ_ERROR_UNSUPPORTED) - PrintError("decoder doesn't support this archive"); - else if (res == SZ_ERROR_MEM) - PrintError("can not allocate memory"); - else if (res == SZ_ERROR_CRC) - PrintError("CRC error"); - else - { - char s[32]; - UInt64ToStr(res, s, 0); - PrintError(s); - } - - return 1; -} diff --git a/code/nel/3rdparty/seven_zip/7zMethodID.cpp b/code/nel/3rdparty/seven_zip/7zMethodID.cpp deleted file mode 100644 index 5047359f3..000000000 --- a/code/nel/3rdparty/seven_zip/7zMethodID.cpp +++ /dev/null @@ -1,14 +0,0 @@ -/* 7zMethodID.c */ - -#include "7zMethodID.h" - -int AreMethodsEqual(CMethodID *a1, CMethodID *a2) -{ - int i; - if (a1->IDSize != a2->IDSize) - return 0; - for (i = 0; i < a1->IDSize; i++) - if (a1->ID[i] != a2->ID[i]) - return 0; - return 1; -} diff --git a/code/nel/3rdparty/seven_zip/7zMethodID.h b/code/nel/3rdparty/seven_zip/7zMethodID.h deleted file mode 100644 index 162fcd15b..000000000 --- a/code/nel/3rdparty/seven_zip/7zMethodID.h +++ /dev/null @@ -1,18 +0,0 @@ -/* 7zMethodID.h */ - -#ifndef __7Z_METHOD_ID_H -#define __7Z_METHOD_ID_H - -#include "7zTypes.h" - -#define kMethodIDSize 15 - -typedef struct _CMethodID -{ - Byte ID[kMethodIDSize]; - Byte IDSize; -} CMethodID; - -int AreMethodsEqual(CMethodID *a1, CMethodID *a2); - -#endif diff --git a/code/nel/3rdparty/seven_zip/BranchTypes.h b/code/nel/3rdparty/seven_zip/BranchTypes.h deleted file mode 100644 index f7ad3abc5..000000000 --- a/code/nel/3rdparty/seven_zip/BranchTypes.h +++ /dev/null @@ -1,25 +0,0 @@ -/* BranchTypes.h */ - -#ifndef __BRANCHTYPES_H -#define __BRANCHTYPES_H - -#ifndef _7ZIP_BYTE_DEFINED -#define _7ZIP_BYTE_DEFINED -typedef unsigned char Byte; -#endif - -#ifndef _7ZIP_UINT16_DEFINED -#define _7ZIP_UINT16_DEFINED -typedef unsigned short UInt16; -#endif - -#ifndef _7ZIP_UINT32_DEFINED -#define _7ZIP_UINT32_DEFINED -#ifdef _LZMA_UINT32_IS_ULONG -typedef unsigned long UInt32; -#else -typedef unsigned int UInt32; -#endif -#endif - -#endif diff --git a/code/nel/3rdparty/seven_zip/BranchX86.cpp b/code/nel/3rdparty/seven_zip/BranchX86.cpp deleted file mode 100644 index 1be3149b8..000000000 --- a/code/nel/3rdparty/seven_zip/BranchX86.cpp +++ /dev/null @@ -1,101 +0,0 @@ -/* BranchX86.c */ - -#include "BranchX86.h" - -/* -static int inline Test86MSByte(Byte b) -{ - return (b == 0 || b == 0xFF); -} -*/ -#define Test86MSByte(b) ((b) == 0 || (b) == 0xFF) - -const int kMaskToAllowedStatus[8] = {1, 1, 1, 0, 1, 0, 0, 0}; -const Byte kMaskToBitNumber[8] = {0, 1, 2, 2, 3, 3, 3, 3}; - -/* -void x86_Convert_Init(UInt32 *prevMask, UInt32 *prevPos) -{ - *prevMask = 0; - *prevPos = (UInt32)(-5); -} -*/ - -UInt32 x86_Convert(Byte *buffer, UInt32 endPos, UInt32 nowPos, - UInt32 *prevMask, UInt32 *prevPos, int encoding) -{ - UInt32 bufferPos = 0; - UInt32 limit; - - if (endPos < 5) - return 0; - - if (nowPos - *prevPos > 5) - *prevPos = nowPos - 5; - - limit = endPos - 5; - while(bufferPos <= limit) - { - Byte b = buffer[bufferPos]; - UInt32 offset; - if (b != 0xE8 && b != 0xE9) - { - bufferPos++; - continue; - } - offset = (nowPos + bufferPos - *prevPos); - *prevPos = (nowPos + bufferPos); - if (offset > 5) - *prevMask = 0; - else - { - UInt32 i; - for (i = 0; i < offset; i++) - { - *prevMask &= 0x77; - *prevMask <<= 1; - } - } - b = buffer[bufferPos + 4]; - if (Test86MSByte(b) && kMaskToAllowedStatus[(*prevMask >> 1) & 0x7] && - (*prevMask >> 1) < 0x10) - { - UInt32 src = - ((UInt32)(b) << 24) | - ((UInt32)(buffer[bufferPos + 3]) << 16) | - ((UInt32)(buffer[bufferPos + 2]) << 8) | - (buffer[bufferPos + 1]); - - UInt32 dest; - for(;;) - { - UInt32 index; - if (encoding) - dest = (nowPos + bufferPos + 5) + src; - else - dest = src - (nowPos + bufferPos + 5); - if (*prevMask == 0) - break; - index = kMaskToBitNumber[*prevMask >> 1]; - b = (Byte)(dest >> (24 - index * 8)); - if (!Test86MSByte(b)) - break; - src = dest ^ ((1 << (32 - index * 8)) - 1); - } - buffer[bufferPos + 4] = (Byte)(~(((dest >> 24) & 1) - 1)); - buffer[bufferPos + 3] = (Byte)(dest >> 16); - buffer[bufferPos + 2] = (Byte)(dest >> 8); - buffer[bufferPos + 1] = (Byte)dest; - bufferPos += 5; - *prevMask = 0; - } - else - { - bufferPos++; - *prevMask |= 1; - if (Test86MSByte(b)) - *prevMask |= 0x10; - } - } - return bufferPos; -} diff --git a/code/nel/3rdparty/seven_zip/BranchX86.h b/code/nel/3rdparty/seven_zip/BranchX86.h deleted file mode 100644 index 25c1ae51b..000000000 --- a/code/nel/3rdparty/seven_zip/BranchX86.h +++ /dev/null @@ -1,13 +0,0 @@ -/* BranchX86.h */ - -#ifndef __BRANCHX86_H -#define __BRANCHX86_H - -#include "BranchTypes.h" - -#define x86_Convert_Init(prevMask, prevPos) { prevMask = 0; prevPos = (UInt32)(-5); } - -UInt32 x86_Convert(Byte *buffer, UInt32 endPos, UInt32 nowPos, - UInt32 *prevMask, UInt32 *prevPos, int encoding); - -#endif diff --git a/code/nel/3rdparty/seven_zip/CMakeLists.txt b/code/nel/3rdparty/seven_zip/CMakeLists.txt index d2d2e690d..95e93438d 100644 --- a/code/nel/3rdparty/seven_zip/CMakeLists.txt +++ b/code/nel/3rdparty/seven_zip/CMakeLists.txt @@ -1,8 +1,8 @@ INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}) -FILE(GLOB LIB_SRC *.cpp *.h) +FILE(GLOB LIB_SRC *.cpp *.c *.h) -LIST(REMOVE_ITEM LIB_SRC ${CMAKE_CURRENT_SOURCE_DIR}/7zMain.cpp) +LIST(REMOVE_ITEM LIB_SRC ${CMAKE_CURRENT_SOURCE_DIR}/LzmaUtil.c) NL_TARGET_LIB(nel_sevenzip ${LIB_SRC}) # TARGET_LINK_LIBRARIES(nel_sevenzip ${PLATFORM_LINKFLAGS}) @@ -14,14 +14,14 @@ ADD_DEFINITIONS(-D_SZ_ONE_DIRECTORY) IF((WITH_INSTALL_LIBRARIES AND WITH_STATIC) OR NOT WITH_STATIC) INSTALL(TARGETS nel_sevenzip LIBRARY DESTINATION ${NL_LIB_PREFIX} ARCHIVE DESTINATION ${NL_LIB_PREFIX} COMPONENT libraries) -ENDIF((WITH_INSTALL_LIBRARIES AND WITH_STATIC) OR NOT WITH_STATIC) +ENDIF() -IF(WITH_TOOLS) - ADD_EXECUTABLE(7zDec ${CMAKE_CURRENT_SOURCE_DIR}/7zMain.cpp) +IF(WITH_NEL_TOOLS) + ADD_EXECUTABLE(lzma ${CMAKE_CURRENT_SOURCE_DIR}/LzmaUtil.c) - TARGET_LINK_LIBRARIES(7zDec nel_sevenzip) - NL_DEFAULT_PROPS(7zDec "NeL, 3rd Party: Seven Zip Decoder") - NL_ADD_RUNTIME_FLAGS(7zDec) + TARGET_LINK_LIBRARIES(lzma nel_sevenzip) + NL_DEFAULT_PROPS(lzma "NeL, 3rd Party: LZMA") + NL_ADD_RUNTIME_FLAGS(lzma) - INSTALL(TARGETS 7zDec RUNTIME DESTINATION ${NL_BIN_PREFIX} COMPONENT tools) -ENDIF(WITH_TOOLS) + INSTALL(TARGETS lzma RUNTIME DESTINATION ${NL_BIN_PREFIX} COMPONENT tools) +ENDIF() diff --git a/code/nel/3rdparty/seven_zip/LzmaDecode.cpp b/code/nel/3rdparty/seven_zip/LzmaDecode.cpp deleted file mode 100644 index c148a5a65..000000000 --- a/code/nel/3rdparty/seven_zip/LzmaDecode.cpp +++ /dev/null @@ -1,584 +0,0 @@ -/* - LzmaDecode.c - LZMA Decoder (optimized for Speed version) - - LZMA SDK 4.40 Copyright (c) 1999-2006 Igor Pavlov (2006-05-01) - http://www.7-zip.org/ - - LZMA SDK is licensed under two licenses: - 1) GNU Lesser General Public License (GNU LGPL) - 2) Common Public License (CPL) - It means that you can select one of these two licenses and - follow rules of that license. - - SPECIAL EXCEPTION: - Igor Pavlov, as the author of this Code, expressly permits you to - statically or dynamically link your Code (or bind by name) to the - interfaces of this file without subjecting your linked Code to the - terms of the CPL or GNU LGPL. Any modifications or additions - to this file, however, are subject to the LGPL or CPL terms. -*/ - -#include "LzmaDecode.h" - -#define kNumTopBits 24 -#define kTopValue ((UInt32)1 << kNumTopBits) - -#define kNumBitModelTotalBits 11 -#define kBitModelTotal (1 << kNumBitModelTotalBits) -#define kNumMoveBits 5 - -#define RC_READ_BYTE (*Buffer++) - -#define RC_INIT2 Code = 0; Range = 0xFFFFFFFF; \ - { int i; for(i = 0; i < 5; i++) { RC_TEST; Code = (Code << 8) | RC_READ_BYTE; }} - -#ifdef _LZMA_IN_CB - -#define RC_TEST { if (Buffer == BufferLim) \ - { SizeT size; int result = InCallback->Read(InCallback, &Buffer, &size); if (result != LZMA_RESULT_OK) return result; \ - BufferLim = Buffer + size; if (size == 0) return LZMA_RESULT_DATA_ERROR; }} - -#define RC_INIT Buffer = BufferLim = 0; RC_INIT2 - -#else - -#define RC_TEST { if (Buffer == BufferLim) return LZMA_RESULT_DATA_ERROR; } - -#define RC_INIT(buffer, bufferSize) Buffer = buffer; BufferLim = buffer + bufferSize; RC_INIT2 - -#endif - -#define RC_NORMALIZE if (Range < kTopValue) { RC_TEST; Range <<= 8; Code = (Code << 8) | RC_READ_BYTE; } - -#define IfBit0(p) RC_NORMALIZE; bound = (Range >> kNumBitModelTotalBits) * *(p); if (Code < bound) -#define UpdateBit0(p) Range = bound; *(p) += (kBitModelTotal - *(p)) >> kNumMoveBits; -#define UpdateBit1(p) Range -= bound; Code -= bound; *(p) -= (*(p)) >> kNumMoveBits; - -#define RC_GET_BIT2(p, mi, A0, A1) IfBit0(p) \ - { UpdateBit0(p); mi <<= 1; A0; } else \ - { UpdateBit1(p); mi = (mi + mi) + 1; A1; } - -#define RC_GET_BIT(p, mi) RC_GET_BIT2(p, mi, ; , ;) - -#define RangeDecoderBitTreeDecode(probs, numLevels, res) \ - { int i = numLevels; res = 1; \ - do { CProb *p = probs + res; RC_GET_BIT(p, res) } while(--i != 0); \ - res -= (1 << numLevels); } - - -#define kNumPosBitsMax 4 -#define kNumPosStatesMax (1 << kNumPosBitsMax) - -#define kLenNumLowBits 3 -#define kLenNumLowSymbols (1 << kLenNumLowBits) -#define kLenNumMidBits 3 -#define kLenNumMidSymbols (1 << kLenNumMidBits) -#define kLenNumHighBits 8 -#define kLenNumHighSymbols (1 << kLenNumHighBits) - -#define LenChoice 0 -#define LenChoice2 (LenChoice + 1) -#define LenLow (LenChoice2 + 1) -#define LenMid (LenLow + (kNumPosStatesMax << kLenNumLowBits)) -#define LenHigh (LenMid + (kNumPosStatesMax << kLenNumMidBits)) -#define kNumLenProbs (LenHigh + kLenNumHighSymbols) - - -#define kNumStates 12 -#define kNumLitStates 7 - -#define kStartPosModelIndex 4 -#define kEndPosModelIndex 14 -#define kNumFullDistances (1 << (kEndPosModelIndex >> 1)) - -#define kNumPosSlotBits 6 -#define kNumLenToPosStates 4 - -#define kNumAlignBits 4 -#define kAlignTableSize (1 << kNumAlignBits) - -#define kMatchMinLen 2 - -#define IsMatch 0 -#define IsRep (IsMatch + (kNumStates << kNumPosBitsMax)) -#define IsRepG0 (IsRep + kNumStates) -#define IsRepG1 (IsRepG0 + kNumStates) -#define IsRepG2 (IsRepG1 + kNumStates) -#define IsRep0Long (IsRepG2 + kNumStates) -#define PosSlot (IsRep0Long + (kNumStates << kNumPosBitsMax)) -#define SpecPos (PosSlot + (kNumLenToPosStates << kNumPosSlotBits)) -#define Align (SpecPos + kNumFullDistances - kEndPosModelIndex) -#define LenCoder (Align + kAlignTableSize) -#define RepLenCoder (LenCoder + kNumLenProbs) -#define Literal (RepLenCoder + kNumLenProbs) - -#if Literal != LZMA_BASE_SIZE -StopCompilingDueBUG -#endif - -int LzmaDecodeProperties(CLzmaProperties *propsRes, const unsigned char *propsData, SizeT size) -{ - unsigned char prop0; - if (size < LZMA_PROPERTIES_SIZE) - return LZMA_RESULT_DATA_ERROR; - prop0 = propsData[0]; - if (prop0 >= (9 * 5 * 5)) - return LZMA_RESULT_DATA_ERROR; - { - for (propsRes->pb = 0; prop0 >= (9 * 5); propsRes->pb++, prop0 -= (9 * 5)) ; - for (propsRes->lp = 0; prop0 >= 9; propsRes->lp++, prop0 -= 9) ; - propsRes->lc = prop0; - /* - unsigned char remainder = (unsigned char)(prop0 / 9); - propsRes->lc = prop0 % 9; - propsRes->pb = remainder / 5; - propsRes->lp = remainder % 5; - */ - } - - #ifdef _LZMA_OUT_READ - { - int i; - propsRes->DictionarySize = 0; - for (i = 0; i < 4; i++) - propsRes->DictionarySize += (UInt32)(propsData[1 + i]) << (i * 8); - if (propsRes->DictionarySize == 0) - propsRes->DictionarySize = 1; - } - #endif - return LZMA_RESULT_OK; -} - -#define kLzmaStreamWasFinishedId (-1) - -int LzmaDecode(CLzmaDecoderState *vs, - #ifdef _LZMA_IN_CB - ILzmaInCallback *InCallback, - #else - const unsigned char *inStream, SizeT inSize, SizeT *inSizeProcessed, - #endif - unsigned char *outStream, SizeT outSize, SizeT *outSizeProcessed) -{ - CProb *p = vs->Probs; - SizeT nowPos = 0; - Byte previousByte = 0; - UInt32 posStateMask = (1 << (vs->Properties.pb)) - 1; - UInt32 literalPosMask = (1 << (vs->Properties.lp)) - 1; - int lc = vs->Properties.lc; - - #ifdef _LZMA_OUT_READ - - UInt32 Range = vs->Range; - UInt32 Code = vs->Code; - #ifdef _LZMA_IN_CB - const Byte *Buffer = vs->Buffer; - const Byte *BufferLim = vs->BufferLim; - #else - const Byte *Buffer = inStream; - const Byte *BufferLim = inStream + inSize; - #endif - int state = vs->State; - UInt32 rep0 = vs->Reps[0], rep1 = vs->Reps[1], rep2 = vs->Reps[2], rep3 = vs->Reps[3]; - int len = vs->RemainLen; - UInt32 globalPos = vs->GlobalPos; - UInt32 distanceLimit = vs->DistanceLimit; - - Byte *dictionary = vs->Dictionary; - UInt32 dictionarySize = vs->Properties.DictionarySize; - UInt32 dictionaryPos = vs->DictionaryPos; - - Byte tempDictionary[4]; - - #ifndef _LZMA_IN_CB - *inSizeProcessed = 0; - #endif - *outSizeProcessed = 0; - if (len == kLzmaStreamWasFinishedId) - return LZMA_RESULT_OK; - - if (dictionarySize == 0) - { - dictionary = tempDictionary; - dictionarySize = 1; - tempDictionary[0] = vs->TempDictionary[0]; - } - - if (len == kLzmaNeedInitId) - { - { - UInt32 numProbs = Literal + ((UInt32)LZMA_LIT_SIZE << (lc + vs->Properties.lp)); - UInt32 i; - for (i = 0; i < numProbs; i++) - p[i] = kBitModelTotal >> 1; - rep0 = rep1 = rep2 = rep3 = 1; - state = 0; - globalPos = 0; - distanceLimit = 0; - dictionaryPos = 0; - dictionary[dictionarySize - 1] = 0; - #ifdef _LZMA_IN_CB - RC_INIT; - #else - RC_INIT(inStream, inSize); - #endif - } - len = 0; - } - while(len != 0 && nowPos < outSize) - { - UInt32 pos = dictionaryPos - rep0; - if (pos >= dictionarySize) - pos += dictionarySize; - outStream[nowPos++] = dictionary[dictionaryPos] = dictionary[pos]; - if (++dictionaryPos == dictionarySize) - dictionaryPos = 0; - len--; - } - if (dictionaryPos == 0) - previousByte = dictionary[dictionarySize - 1]; - else - previousByte = dictionary[dictionaryPos - 1]; - - #else /* if !_LZMA_OUT_READ */ - - int state = 0; - UInt32 rep0 = 1, rep1 = 1, rep2 = 1, rep3 = 1; - int len = 0; - const Byte *Buffer; - const Byte *BufferLim; - UInt32 Range; - UInt32 Code; - - #ifndef _LZMA_IN_CB - *inSizeProcessed = 0; - #endif - *outSizeProcessed = 0; - - { - UInt32 i; - UInt32 numProbs = Literal + ((UInt32)LZMA_LIT_SIZE << (lc + vs->Properties.lp)); - for (i = 0; i < numProbs; i++) - p[i] = kBitModelTotal >> 1; - } - - #ifdef _LZMA_IN_CB - RC_INIT; - #else - RC_INIT(inStream, inSize); - #endif - - #endif /* _LZMA_OUT_READ */ - - while(nowPos < outSize) - { - CProb *prob; - UInt32 bound; - int posState = (int)( - (nowPos - #ifdef _LZMA_OUT_READ - + globalPos - #endif - ) - & posStateMask); - - prob = p + IsMatch + (state << kNumPosBitsMax) + posState; - IfBit0(prob) - { - int symbol = 1; - UpdateBit0(prob) - prob = p + Literal + (LZMA_LIT_SIZE * - ((( - (nowPos - #ifdef _LZMA_OUT_READ - + globalPos - #endif - ) - & literalPosMask) << lc) + (previousByte >> (8 - lc)))); - - if (state >= kNumLitStates) - { - int matchByte; - #ifdef _LZMA_OUT_READ - UInt32 pos = dictionaryPos - rep0; - if (pos >= dictionarySize) - pos += dictionarySize; - matchByte = dictionary[pos]; - #else - matchByte = outStream[nowPos - rep0]; - #endif - do - { - int bit; - CProb *probLit; - matchByte <<= 1; - bit = (matchByte & 0x100); - probLit = prob + 0x100 + bit + symbol; - RC_GET_BIT2(probLit, symbol, if (bit != 0) break, if (bit == 0) break) - } - while (symbol < 0x100); - } - while (symbol < 0x100) - { - CProb *probLit = prob + symbol; - RC_GET_BIT(probLit, symbol) - } - previousByte = (Byte)(symbol & 0xff); - - outStream[nowPos++] = previousByte; - #ifdef _LZMA_OUT_READ - if (distanceLimit < dictionarySize) - distanceLimit++; - - dictionary[dictionaryPos] = previousByte; - if (++dictionaryPos == dictionarySize) - dictionaryPos = 0; - #endif - if (state < 4) state = 0; - else if (state < 10) state -= 3; - else state -= 6; - } - else - { - UpdateBit1(prob); - prob = p + IsRep + state; - IfBit0(prob) - { - UpdateBit0(prob); - rep3 = rep2; - rep2 = rep1; - rep1 = rep0; - state = state < kNumLitStates ? 0 : 3; - prob = p + LenCoder; - } - else - { - UpdateBit1(prob); - prob = p + IsRepG0 + state; - IfBit0(prob) - { - UpdateBit0(prob); - prob = p + IsRep0Long + (state << kNumPosBitsMax) + posState; - IfBit0(prob) - { - #ifdef _LZMA_OUT_READ - UInt32 pos; - #endif - UpdateBit0(prob); - - #ifdef _LZMA_OUT_READ - if (distanceLimit == 0) - #else - if (nowPos == 0) - #endif - return LZMA_RESULT_DATA_ERROR; - - state = state < kNumLitStates ? 9 : 11; - #ifdef _LZMA_OUT_READ - pos = dictionaryPos - rep0; - if (pos >= dictionarySize) - pos += dictionarySize; - previousByte = dictionary[pos]; - dictionary[dictionaryPos] = previousByte; - if (++dictionaryPos == dictionarySize) - dictionaryPos = 0; - #else - previousByte = outStream[nowPos - rep0]; - #endif - outStream[nowPos++] = previousByte; - #ifdef _LZMA_OUT_READ - if (distanceLimit < dictionarySize) - distanceLimit++; - #endif - - continue; - } - else - { - UpdateBit1(prob); - } - } - else - { - UInt32 distance; - UpdateBit1(prob); - prob = p + IsRepG1 + state; - IfBit0(prob) - { - UpdateBit0(prob); - distance = rep1; - } - else - { - UpdateBit1(prob); - prob = p + IsRepG2 + state; - IfBit0(prob) - { - UpdateBit0(prob); - distance = rep2; - } - else - { - UpdateBit1(prob); - distance = rep3; - rep3 = rep2; - } - rep2 = rep1; - } - rep1 = rep0; - rep0 = distance; - } - state = state < kNumLitStates ? 8 : 11; - prob = p + RepLenCoder; - } - { - int numBits, offset; - CProb *probLen = prob + LenChoice; - IfBit0(probLen) - { - UpdateBit0(probLen); - probLen = prob + LenLow + (posState << kLenNumLowBits); - offset = 0; - numBits = kLenNumLowBits; - } - else - { - UpdateBit1(probLen); - probLen = prob + LenChoice2; - IfBit0(probLen) - { - UpdateBit0(probLen); - probLen = prob + LenMid + (posState << kLenNumMidBits); - offset = kLenNumLowSymbols; - numBits = kLenNumMidBits; - } - else - { - UpdateBit1(probLen); - probLen = prob + LenHigh; - offset = kLenNumLowSymbols + kLenNumMidSymbols; - numBits = kLenNumHighBits; - } - } - RangeDecoderBitTreeDecode(probLen, numBits, len); - len += offset; - } - - if (state < 4) - { - int posSlot; - state += kNumLitStates; - prob = p + PosSlot + - ((len < kNumLenToPosStates ? len : kNumLenToPosStates - 1) << - kNumPosSlotBits); - RangeDecoderBitTreeDecode(prob, kNumPosSlotBits, posSlot); - if (posSlot >= kStartPosModelIndex) - { - int numDirectBits = ((posSlot >> 1) - 1); - rep0 = (2 | ((UInt32)posSlot & 1)); - if (posSlot < kEndPosModelIndex) - { - rep0 <<= numDirectBits; - prob = p + SpecPos + rep0 - posSlot - 1; - } - else - { - numDirectBits -= kNumAlignBits; - do - { - RC_NORMALIZE - Range >>= 1; - rep0 <<= 1; - if (Code >= Range) - { - Code -= Range; - rep0 |= 1; - } - } - while (--numDirectBits != 0); - prob = p + Align; - rep0 <<= kNumAlignBits; - numDirectBits = kNumAlignBits; - } - { - int i = 1; - int mi = 1; - do - { - CProb *prob3 = prob + mi; - RC_GET_BIT2(prob3, mi, ; , rep0 |= i); - i <<= 1; - } - while(--numDirectBits != 0); - } - } - else - rep0 = posSlot; - if (++rep0 == (UInt32)(0)) - { - /* it's for stream version */ - len = kLzmaStreamWasFinishedId; - break; - } - } - - len += kMatchMinLen; - #ifdef _LZMA_OUT_READ - if (rep0 > distanceLimit) - #else - if (rep0 > nowPos) - #endif - return LZMA_RESULT_DATA_ERROR; - - #ifdef _LZMA_OUT_READ - if (dictionarySize - distanceLimit > (UInt32)len) - distanceLimit += len; - else - distanceLimit = dictionarySize; - #endif - - do - { - #ifdef _LZMA_OUT_READ - UInt32 pos = dictionaryPos - rep0; - if (pos >= dictionarySize) - pos += dictionarySize; - previousByte = dictionary[pos]; - dictionary[dictionaryPos] = previousByte; - if (++dictionaryPos == dictionarySize) - dictionaryPos = 0; - #else - previousByte = outStream[nowPos - rep0]; - #endif - len--; - outStream[nowPos++] = previousByte; - } - while(len != 0 && nowPos < outSize); - } - } - RC_NORMALIZE; - - #ifdef _LZMA_OUT_READ - vs->Range = Range; - vs->Code = Code; - vs->DictionaryPos = dictionaryPos; - vs->GlobalPos = globalPos + (UInt32)nowPos; - vs->DistanceLimit = distanceLimit; - vs->Reps[0] = rep0; - vs->Reps[1] = rep1; - vs->Reps[2] = rep2; - vs->Reps[3] = rep3; - vs->State = state; - vs->RemainLen = len; - vs->TempDictionary[0] = tempDictionary[0]; - #endif - - #ifdef _LZMA_IN_CB - vs->Buffer = Buffer; - vs->BufferLim = BufferLim; - #else - *inSizeProcessed = (SizeT)(Buffer - inStream); - #endif - *outSizeProcessed = nowPos; - return LZMA_RESULT_OK; -} diff --git a/code/nel/3rdparty/seven_zip/LzmaDecode.h b/code/nel/3rdparty/seven_zip/LzmaDecode.h deleted file mode 100644 index 748fd0a68..000000000 --- a/code/nel/3rdparty/seven_zip/LzmaDecode.h +++ /dev/null @@ -1,113 +0,0 @@ -/* - LzmaDecode.h - LZMA Decoder interface - - LZMA SDK 4.40 Copyright (c) 1999-2006 Igor Pavlov (2006-05-01) - http://www.7-zip.org/ - - LZMA SDK is licensed under two licenses: - 1) GNU Lesser General Public License (GNU LGPL) - 2) Common Public License (CPL) - It means that you can select one of these two licenses and - follow rules of that license. - - SPECIAL EXCEPTION: - Igor Pavlov, as the author of this code, expressly permits you to - statically or dynamically link your code (or bind by name) to the - interfaces of this file without subjecting your linked code to the - terms of the CPL or GNU LGPL. Any modifications or additions - to this file, however, are subject to the LGPL or CPL terms. -*/ - -#ifndef __LZMADECODE_H -#define __LZMADECODE_H - -#include "LzmaTypes.h" - -/* #define _LZMA_IN_CB */ -/* Use callback for input data */ - -/* #define _LZMA_OUT_READ */ -/* Use read function for output data */ - -/* #define _LZMA_PROB32 */ -/* It can increase speed on some 32-bit CPUs, - but memory usage will be doubled in that case */ - -/* #define _LZMA_LOC_OPT */ -/* Enable local speed optimizations inside code */ - -#ifdef _LZMA_PROB32 -#define CProb UInt32 -#else -#define CProb UInt16 -#endif - -#define LZMA_RESULT_OK 0 -#define LZMA_RESULT_DATA_ERROR 1 - -#ifdef _LZMA_IN_CB -typedef struct _ILzmaInCallback -{ - int (*Read)(void *object, const unsigned char **buffer, SizeT *bufferSize); -} ILzmaInCallback; -#endif - -#define LZMA_BASE_SIZE 1846 -#define LZMA_LIT_SIZE 768 - -#define LZMA_PROPERTIES_SIZE 5 - -typedef struct _CLzmaProperties -{ - int lc; - int lp; - int pb; - #ifdef _LZMA_OUT_READ - UInt32 DictionarySize; - #endif -}CLzmaProperties; - -int LzmaDecodeProperties(CLzmaProperties *propsRes, const unsigned char *propsData, SizeT size); - -#define LzmaGetNumProbs(Properties) (LZMA_BASE_SIZE + (LZMA_LIT_SIZE << ((Properties)->lc + (Properties)->lp))) - -#define kLzmaNeedInitId (-2) - -typedef struct _CLzmaDecoderState -{ - CLzmaProperties Properties; - CProb *Probs; - - #ifdef _LZMA_IN_CB - const unsigned char *Buffer; - const unsigned char *BufferLim; - #endif - - #ifdef _LZMA_OUT_READ - unsigned char *Dictionary; - UInt32 Range; - UInt32 Code; - UInt32 DictionaryPos; - UInt32 GlobalPos; - UInt32 DistanceLimit; - UInt32 Reps[4]; - int State; - int RemainLen; - unsigned char TempDictionary[4]; - #endif -} CLzmaDecoderState; - -#ifdef _LZMA_OUT_READ -#define LzmaDecoderInit(vs) { (vs)->RemainLen = kLzmaNeedInitId; } -#endif - -int LzmaDecode(CLzmaDecoderState *vs, - #ifdef _LZMA_IN_CB - ILzmaInCallback *inCallback, - #else - const unsigned char *inStream, SizeT inSize, SizeT *inSizeProcessed, - #endif - unsigned char *outStream, SizeT outSize, SizeT *outSizeProcessed); - -#endif diff --git a/code/nel/3rdparty/seven_zip/LzmaRamDecode.cpp b/code/nel/3rdparty/seven_zip/LzmaRamDecode.cpp deleted file mode 100644 index ed1784d6d..000000000 --- a/code/nel/3rdparty/seven_zip/LzmaRamDecode.cpp +++ /dev/null @@ -1,79 +0,0 @@ -/* LzmaRamDecode.c */ - -#include "LzmaRamDecode.h" -#ifdef _SZ_ONE_DIRECTORY -#include "LzmaDecode.h" -#include "BranchX86.h" -#else -#include "../LZMA_C/LzmaDecode.h" -#include "../Branch/BranchX86.h" -#endif - -#define LZMA_PROPS_SIZE 14 -#define LZMA_SIZE_OFFSET 6 - -int LzmaRamGetUncompressedSize( - const unsigned char *inBuffer, - size_t inSize, - size_t *outSize) -{ - unsigned int i; - if (inSize < LZMA_PROPS_SIZE) - return 1; - *outSize = 0; - for(i = 0; i < sizeof(size_t); i++) - *outSize += ((size_t)inBuffer[LZMA_SIZE_OFFSET + i]) << (8 * i); - for(; i < 8; i++) - if (inBuffer[LZMA_SIZE_OFFSET + i] != 0) - return 1; - return 0; -} - -#define SZE_DATA_ERROR (1) -#define SZE_OUTOFMEMORY (2) - -int LzmaRamDecompress( - const unsigned char *inBuffer, - size_t inSize, - unsigned char *outBuffer, - size_t outSize, - size_t *outSizeProcessed, - void * (*allocFunc)(size_t size), - void (*freeFunc)(void *)) -{ - CLzmaDecoderState state; /* it's about 24 bytes structure, if int is 32-bit */ - int result; - SizeT outSizeProcessedLoc; - SizeT inProcessed; - int useFilter; - - if (inSize < LZMA_PROPS_SIZE) - return 1; - useFilter = inBuffer[0]; - - *outSizeProcessed = 0; - if (useFilter > 1) - return 1; - - if (LzmaDecodeProperties(&state.Properties, inBuffer + 1, LZMA_PROPERTIES_SIZE) != LZMA_RESULT_OK) - return 1; - state.Probs = (CProb *)allocFunc(LzmaGetNumProbs(&state.Properties) * sizeof(CProb)); - if (state.Probs == 0) - return SZE_OUTOFMEMORY; - - result = LzmaDecode(&state, - inBuffer + LZMA_PROPS_SIZE, (SizeT)inSize - LZMA_PROPS_SIZE, &inProcessed, - outBuffer, (SizeT)outSize, &outSizeProcessedLoc); - freeFunc(state.Probs); - if (result != LZMA_RESULT_OK) - return 1; - *outSizeProcessed = (size_t)outSizeProcessedLoc; - if (useFilter == 1) - { - UInt32 _prevMask; - UInt32 _prevPos; - x86_Convert_Init(_prevMask, _prevPos); - x86_Convert(outBuffer, (UInt32)outSizeProcessedLoc, 0, &_prevMask, &_prevPos, 0); - } - return 0; -} diff --git a/code/nel/3rdparty/seven_zip/LzmaRamDecode.h b/code/nel/3rdparty/seven_zip/LzmaRamDecode.h deleted file mode 100644 index 7e641c553..000000000 --- a/code/nel/3rdparty/seven_zip/LzmaRamDecode.h +++ /dev/null @@ -1,55 +0,0 @@ -/* LzmaRamDecode.h */ - -#ifndef __LzmaRamDecode_h -#define __LzmaRamDecode_h - -#include - -/* -LzmaRamGetUncompressedSize: - In: - inBuffer - input data - inSize - input data size - Out: - outSize - uncompressed size - Return code: - 0 - OK - 1 - Error in headers -*/ - -int LzmaRamGetUncompressedSize( - const unsigned char *inBuffer, - size_t inSize, - size_t *outSize); - - -/* -LzmaRamDecompress: - In: - inBuffer - input data - inSize - input data size - outBuffer - output data - outSize - output size - allocFunc - alloc function (can be malloc) - freeFunc - free function (can be free) - Out: - outSizeProcessed - processed size - Return code: - 0 - OK - 1 - Error in headers / data stream - 2 - Memory allocating error - -Memory requirements depend from properties of LZMA stream. -With default lzma settings it's about 16 KB. -*/ - -int LzmaRamDecompress( - const unsigned char *inBuffer, - size_t inSize, - unsigned char *outBuffer, - size_t outSize, - size_t *outSizeProcessed, - void * (*allocFunc)(size_t size), - void (*freeFunc)(void *)); - -#endif diff --git a/code/nel/3rdparty/seven_zip/LzmaTypes.h b/code/nel/3rdparty/seven_zip/LzmaTypes.h deleted file mode 100644 index 288c5e45d..000000000 --- a/code/nel/3rdparty/seven_zip/LzmaTypes.h +++ /dev/null @@ -1,45 +0,0 @@ -/* -LzmaTypes.h - -Types for LZMA Decoder - -This file written and distributed to public domain by Igor Pavlov. -This file is part of LZMA SDK 4.40 (2006-05-01) -*/ - -#ifndef __LZMATYPES_H -#define __LZMATYPES_H - -#ifndef _7ZIP_BYTE_DEFINED -#define _7ZIP_BYTE_DEFINED -typedef unsigned char Byte; -#endif - -#ifndef _7ZIP_UINT16_DEFINED -#define _7ZIP_UINT16_DEFINED -typedef unsigned short UInt16; -#endif - -#ifndef _7ZIP_UINT32_DEFINED -#define _7ZIP_UINT32_DEFINED -#ifdef _LZMA_UINT32_IS_ULONG -typedef unsigned long UInt32; -#else -typedef unsigned int UInt32; -#endif -#endif - -/* #define _LZMA_SYSTEM_SIZE_T */ -/* Use system's size_t. You can use it to enable 64-bit sizes supporting */ - -#ifndef _7ZIP_SIZET_DEFINED -#define _7ZIP_SIZET_DEFINED -#ifdef _LZMA_SYSTEM_SIZE_T -#include -typedef size_t SizeT; -#else -typedef UInt32 SizeT; -#endif -#endif - -#endif diff --git a/code/nel/3rdparty/seven_zip/readme.txt b/code/nel/3rdparty/seven_zip/readme.txt deleted file mode 100644 index e9798c1df..000000000 --- a/code/nel/3rdparty/seven_zip/readme.txt +++ /dev/null @@ -1,22 +0,0 @@ - - -This is an extract of some files from the 7zip SDK. - -At time of writing (2007-01-12) there is no dll or library project in the 7zip -distribution (lzma443), so I build a custum project and copied in the 7zip -files needed to do 7zip/lzma extraction. - -To update this library, download the latest 7zip SDK and copy all file from - /C/7zip/Archive/7z_C -for the 7zip archive file format support - -and the 3 files needed from - /C/7zip/Compress/LZMA_C - (lzmaDecode.h lzmaDecode.cpp lzmaTypes.h) -for the lzma decrompression lib. - - -NB : If callback support must be enabled, add "#define _LZMA_IN_CB" in - 7zTypes.h - - diff --git a/code/ryzom/client/src/seven_zip/seven_zip.h b/code/nel/include/nel/misc/seven_zip.h similarity index 86% rename from code/ryzom/client/src/seven_zip/seven_zip.h rename to code/nel/include/nel/misc/seven_zip.h index e471a9ac0..469b24bb9 100644 --- a/code/ryzom/client/src/seven_zip/seven_zip.h +++ b/code/nel/include/nel/misc/seven_zip.h @@ -18,6 +18,9 @@ #define SEVEN_ZIP_H #include +#include + +namespace NLMISC { // utility func to decompress a monofile 7zip archive bool unpack7Zip(const std::string &sevenZipFileName, const std::string &destFileName); @@ -25,7 +28,12 @@ bool unpack7Zip(const std::string &sevenZipFileName, const std::string &destFile // utility func to decompress a single LZMA packed file bool unpackLZMA(const std::string &lzmaFileName, const std::string &destFileName); +// utility func to decompress a single LZMA packed file +bool unpackLZMA(const std::string &lzmaFileName, const std::string &destFileName, CHashKey &sha1); + // utility func to compress a single file to LZMA packed file bool packLZMA(const std::string &srcFileName, const std::string &lzmaFileName); +} + #endif diff --git a/code/nel/include/nel/misc/sha1.h b/code/nel/include/nel/misc/sha1.h index ae42c3c1e..9b7fe937b 100644 --- a/code/nel/include/nel/misc/sha1.h +++ b/code/nel/include/nel/misc/sha1.h @@ -23,6 +23,8 @@ #include +namespace NLMISC { + struct CHashKey { CHashKey () { HashKeyString.resize(20); } @@ -99,6 +101,27 @@ inline bool operator <(const struct CHashKey &a,const struct CHashKey &b) return a.HashKeyString. -#include "seven_zip.h" +#include -#include "nel/misc/types_nl.h" -#include "nel/misc/file.h" -#include "nel/misc/path.h" +#include +#include +#include -#include "7z.h" -#include "7zAlloc.h" -#include "7zCrc.h" -#include "7zVersion.h" -#include "LzmaLib.h" +#include +#include +#include +#include +#include +#include #include @@ -39,6 +40,7 @@ using namespace NLMISC; #define new DEBUG_NEW #endif +namespace NLMISC { /// Input stream class for 7zip archive class CNel7ZipInStream : public ISeekInStream @@ -273,6 +275,85 @@ bool unpackLZMA(const std::string &lzmaFile, const std::string &destFileName) return true; } +bool unpackLZMA(const std::string &lzmaFile, const std::string &destFileName, CHashKey &sha1) +{ + nldebug("unpackLZMA: decompress LZMA file '%s' to '%s", lzmaFile.c_str(), destFileName.c_str()); + + // open input file + CIFile inStream(lzmaFile); + uint32 inSize = inStream.getFileSize(); + + if (inSize < LZMA_PROPS_SIZE + 8) + { + nlwarning("unpackLZMA: Invalid file size, too small file '%s'", lzmaFile.c_str()); + return false; + } + + // allocate input buffer for props + std::vector propsBuffer(LZMA_PROPS_SIZE); + + // size of LZMA content + inSize -= LZMA_PROPS_SIZE + 8; + + // allocate input buffer for lzma data + std::vector inBuffer(inSize); + + uint64 fileSize = 0; + + try + { + // read props + inStream.serialBuffer(&propsBuffer[0], LZMA_PROPS_SIZE); + + // read uncompressed size + inStream.serial(fileSize); + + // read lzma content + inStream.serialBuffer(&inBuffer[0], inSize); + } + catch(const EReadError &e) + { + nlwarning("unpackLZMA: Error while reading '%s': %s", lzmaFile.c_str(), e.what()); + return false; + } + + // allocate the output buffer + std::vector outBuffer(fileSize); + + // in and out file sizes + SizeT outProcessed = (SizeT)fileSize; + SizeT inProcessed = (SizeT)inSize; + + // decompress the file in memory + sint res = LzmaUncompress(&outBuffer[0], &outProcessed, &inBuffer[0], &inProcessed, &propsBuffer[0], LZMA_PROPS_SIZE); + + if (res != 0 || outProcessed != fileSize) + { + nlwarning("unpackLZMA: Failed to decode lzma file '%s' with status %d", lzmaFile.c_str(), res); + return false; + } + + // get hash + sha1 = getSHA1(&outBuffer[0], outBuffer.size()); + + // store on output buffer + COFile outStream(destFileName); + + try + { + // write content + outStream.serialBuffer(&outBuffer[0], (uint)fileSize); + } + catch(const EFile &e) + { + nlwarning("unpackLZMA: Error while writing '%s': %s", destFileName.c_str(), e.what()); + CFile::deleteFile(destFileName); + return false; + } + + return true; +} + bool packLZMA(const std::string &srcFileName, const std::string &lzmaFileName) { nldebug("packLZMA: compress '%s' to LZMA file '%s", srcFileName.c_str(), lzmaFileName.c_str()); @@ -371,3 +452,5 @@ bool packLZMA(const std::string &srcFileName, const std::string &lzmaFileName) return false; } + +} diff --git a/code/nel/src/misc/sha1.cpp b/code/nel/src/misc/sha1.cpp index 8afa0c039..e4c3396a5 100644 --- a/code/nel/src/misc/sha1.cpp +++ b/code/nel/src/misc/sha1.cpp @@ -53,6 +53,8 @@ typedef unsigned int uint32_t; typedef unsigned char uint8_t; typedef short int_least16_t; +namespace NLMISC { + // // Constantes // @@ -68,27 +70,6 @@ enum shaStateError /* called Input after Result */ }; -#define SHA1HashSize 20 - -/* - * This structure will hold context information for the SHA-1 - * hashing operation - */ -typedef struct SHA1Context -{ - uint32_t Intermediate_Hash[SHA1HashSize/4]; /* Message Digest */ - - uint32_t Length_Low; /* Message length in bits */ - uint32_t Length_High; /* Message length in bits */ - - /* Index into message block array */ - int_least16_t Message_Block_Index; - uint8_t Message_Block[64]; /* 512-bit message blocks */ - - int Computed; /* Is the digest computed? */ - int Corrupted; /* Is the message digest corrupted? */ -} SHA1Context; - // // Function Prototypes // @@ -187,7 +168,50 @@ CHashKey getSHA1(const string &filename, bool forcePath) return CHashKey(); } - CHashKey hk (Message_Digest); + CHashKey hk(Message_Digest); + return hk; +} + +// Begin calculating a SHA1 hash +bool resetSHA1(SHA1Context *context) +{ + int err; + err = SHA1Reset(context); + if (err) + { + nlwarning("SHA: SHA1Reset Error %d.\n", err ); + return false; + } + return true; +} + +// Add data to a SHA1 hash calculation +bool inputSHA1(SHA1Context *context, const uint8 *buffer, uint32 size) +{ + int err; + err = SHA1Input(context, buffer, size); + if (err) + { + nlwarning ("SHA: SHA1Input Error %d.\n", err); + return false; + } + return true; +} + +// Get the SHA1 result +CHashKey getSHA1(SHA1Context *context) +{ + int err; + uint8_t messageDigest[20]; + + err = SHA1Result(context, messageDigest); + if (err) + { + nlwarning("SHA: SHA1Result Error %d, could not compute message digest.\n", err ); + return CHashKey(); + } + + CHashKey hk(messageDigest); return hk; } @@ -618,3 +642,6 @@ void SHA1PadMessage(SHA1Context *context) SHA1ProcessMessageBlock(context); } + +} + diff --git a/code/nel/src/misc/streamed_package_manager.cpp b/code/nel/src/misc/streamed_package_manager.cpp index 23b77def7..483df6a52 100644 --- a/code/nel/src/misc/streamed_package_manager.cpp +++ b/code/nel/src/misc/streamed_package_manager.cpp @@ -18,18 +18,16 @@ // 3rd Party includes #include -#include -#include -#include -#include // Project includes #include #include #include +#include #include -namespace NLMISC { +namespace NLMISC +{ NLMISC_SAFE_SINGLETON_IMPL(CStreamedPackageManager); @@ -106,7 +104,7 @@ bool CStreamedPackageManager::getFile(std::string &filePath, const std::string & CStreamedPackage::makePath(filePath, entry->Hash); std::string downloadUrlFile = filePath + ".lzma"; filePath = Path + filePath; - std::string downloadPath = filePath + ".download." + toString(rand()); + std::string downloadPath = filePath + ".download." + toString(rand() * rand()); std::string storageDirectory = CFile::getPath(downloadPath); CFile::createDirectoryTree(storageDirectory); @@ -117,7 +115,7 @@ bool CStreamedPackageManager::getFile(std::string &filePath, const std::string & }*/ // download - for (; ; ) + for (;;) { if (CFile::fileExists(filePath)) return true; @@ -174,99 +172,31 @@ bool CStreamedPackageManager::getFile(std::string &filePath, const std::string & break; } - // read into memory :( - std::string unpackPath = filePath + ".extract." + toString(rand()); + // extract into file + std::string unpackPath = filePath + ".extract." + toString(rand() * rand()); - std::vector inBuffer; + CHashKey outHash; + if (!unpackLZMA(downloadPath, unpackPath, outHash)) { - CIFile inStream(downloadPath); - uint32 inSize = inStream.getFileSize(); - inBuffer.resize(inSize); - inStream.serialBuffer(&inBuffer[0], inSize); + return false; } - CFile::deleteFile(downloadPath); - if (inBuffer.size() < LZMA_PROPERTIES_SIZE + 8) + if (!(outHash == entry->Hash)) { - nlwarning("Invalid file size %u, too small file '%s'", inBuffer.size(), downloadPath.c_str()); + std::string wantHashS = entry->Hash.toString(); + std::string outHashS = outHash.toString(); + nlwarning("Invalid SHA1 hash for file '%s', download has hash '%s'", wantHashS.c_str(), outHashS.c_str()); return false; } - // extract + if (!CFile::moveFile(filePath.c_str(), unpackPath.c_str())) { - CLzmaDecoderState state; - uint8 *pos = &inBuffer[0]; - int ret = LzmaDecodeProperties(&state.Properties, (unsigned char *)pos, LZMA_PROPERTIES_SIZE); - if (ret != 0) - { - nlwarning("Failed to decode lzma properies in file '%s'", downloadPath.c_str()); - return false; - } - - // FROM login_patch.cpp - // alloc the probs, making sure they are deleted in function exit - size_t nbProb = LzmaGetNumProbs(&state.Properties); - std::vector probs; - probs.resize(nbProb); - state.Probs = &probs[0]; - - pos += LZMA_PROPERTIES_SIZE; - - // read the output file size - size_t fileSize = 0; - for (int i = 0; i < 8; i++) - { - //Byte b; - if (pos >= &inBuffer[0] + inBuffer.size()) - { - nlerror("pos >= inBuffer.get() + inSize"); - return false; - } - fileSize |= ((UInt64)*pos++) << (8 * i); - } - - nlassert(fileSize == entry->Size); - - SizeT outProcessed = 0; - SizeT inProcessed = 0; - // allocate the output buffer :( - std::vector outBuffer; - outBuffer.resize(fileSize); - if (fileSize) - { - // decompress the file in memory - ret = LzmaDecode(&state, (unsigned char *)pos, (SizeT)(inBuffer.size() - (pos - &inBuffer[0])), &inProcessed, (unsigned char*)&outBuffer[0], (SizeT)fileSize, &outProcessed); - if (ret != 0 || outProcessed != fileSize) - { - nlwarning("Failed to decode lzma file '%s'", downloadPath.c_str()); - return false; - } - } - - CHashKey outHash = outBuffer.size() ? getSHA1(&outBuffer[0], outBuffer.size()) : CHashKey(); - if (!(outHash == entry->Hash)) - { - std::string wantHashS = entry->Hash.toString(); - std::string outHashS = outHash.toString(); - nlwarning("Invalid SHA1 hash for file '%s', download has hash '%s'", wantHashS.c_str(), outHashS.c_str()); - return false; - } - - { - COFile outStream(unpackPath); - if (fileSize) - outStream.serialBuffer(&outBuffer[0], (uint)fileSize); - } - - if (!CFile::moveFile(filePath.c_str(), unpackPath.c_str())) - { - nldebug("Failed moving '%s' to '%s'", unpackPath.c_str(), filePath.c_str()); - // in case downloaded from another thread - return CFile::fileExists(filePath); - } - - return true; + nldebug("Failed moving '%s' to '%s'", unpackPath.c_str(), filePath.c_str()); + // in case downloaded from another thread + return CFile::fileExists(filePath); } + + return true; } bool CStreamedPackageManager::getFileSize(uint32 &fileSize, const std::string &fileName) diff --git a/code/nel/tools/build_gamedata/d1_client_patch.py b/code/nel/tools/build_gamedata/d1_client_patch.py index 00eaf1aaa..ea4cc742c 100755 --- a/code/nel/tools/build_gamedata/d1_client_patch.py +++ b/code/nel/tools/build_gamedata/d1_client_patch.py @@ -144,14 +144,14 @@ else: if (needUpdateBnp): if (category["StreamedPackages"]): printLog(log, "SNP " + targetBnp) - cwDir = os.getcwd().replace("\\", "/") - toolDir = os.path.dirname(Lzma).replace("\\", "/") - os.chdir(toolDir) - subprocess.call([ SnpMake, "/p", sourcePath, targetBnp, ClientPatchDirectory + "/stream" ] + package[1][1:]) - os.chdir(cwDir) + # cwDir = os.getcwd().replace("\\", "/") + # toolDir = os.path.dirname(Lzma).replace("\\", "/") + # os.chdir(toolDir) + subprocess.call([ SnpMake, "-p", sourcePath, targetBnp, ClientPatchDirectory + "/stream" ] + package[1][1:]) + # os.chdir(cwDir) else: printLog(log, "BNP " + targetBnp) - subprocess.call([ BnpMake, "-p", sourcePath, "-o", targetPath ] + package[1][1:]) + subprocess.call([ BnpMake, "-p", sourcePath, "-o", targetBnp ] + package[1][1:]) else: printLog(log, "SKIP " + targetBnp) printLog(log, "") diff --git a/code/nel/tools/misc/snp_make/main.cpp b/code/nel/tools/misc/snp_make/main.cpp index 61fc11810..a86d497d4 100644 --- a/code/nel/tools/misc/snp_make/main.cpp +++ b/code/nel/tools/misc/snp_make/main.cpp @@ -33,6 +33,7 @@ #include "nel/misc/algo.h" #include "nel/misc/common.h" #include "nel/misc/streamed_package.h" +#include "nel/misc/seven_zip.h" using namespace std; using namespace NLMISC; @@ -83,19 +84,22 @@ bool keepFile (const char *fileName) void usage() { printf ("USAGE : \n"); - printf (" snp_make /p [option] ... [option]\n"); + printf (" snp_make -p [option] ... [option]\n"); printf (" option : \n"); printf (" -if wildcard : add the file if it matches the wilcard (at least one 'if' conditions must be met for a file to be adding)\n"); printf (" -ifnot wildcard : add the file if it doesn't match the wilcard (all the 'ifnot' conditions must be met for a file to be adding)\n"); printf (" Pack the directory to a snp file\n"); - printf (" snp_make /l \n"); + printf (" snp_make -l \n"); printf (" List the files contained in the snp file\n"); } // --------------------------------------------------------------------------- -void generateLZMA(const std::string sourceFile, const std::string &outputFile) +void generateLZMA(const std::string &sourceFile, const std::string &outputFile) { + NLMISC::packLZMA(sourceFile, outputFile); + + /* std::string cmd="lzma e "; cmd+=" "+sourceFile+" "+outputFile; nlinfo("executing system command: %s",cmd.c_str()); @@ -106,6 +110,7 @@ void generateLZMA(const std::string sourceFile, const std::string &outputFile) if (error) nlwarning("'%s' failed with error code %d", cmd.c_str(), error); #endif // NL_OS_WINDOWS + */ } // --------------------------------------------------------------------------- diff --git a/code/ryzom/client/CMakeLists.txt b/code/ryzom/client/CMakeLists.txt index 43897c905..7a6cf7424 100644 --- a/code/ryzom/client/CMakeLists.txt +++ b/code/ryzom/client/CMakeLists.txt @@ -1,5 +1,4 @@ # Need clientsheets lib for sheets packer tool -# Need seven_zip for patch_gen and ryzom_installer ADD_SUBDIRECTORY(src) IF(WITH_RYZOM_CLIENT) diff --git a/code/ryzom/client/src/CMakeLists.txt b/code/ryzom/client/src/CMakeLists.txt index 4116fc75b..99b9a6773 100644 --- a/code/ryzom/client/src/CMakeLists.txt +++ b/code/ryzom/client/src/CMakeLists.txt @@ -3,11 +3,6 @@ IF(WITH_RYZOM_TOOLS OR WITH_RYZOM_CLIENT) ADD_SUBDIRECTORY(client_sheets) ENDIF() -IF(WITH_RYZOM_TOOLS OR WITH_RYZOM_CLIENT OR WITH_RYZOM_INSTALLER) - # Need seven_zip lib for patch_gen tool - ADD_SUBDIRECTORY(seven_zip) -ENDIF() - IF(WITH_RYZOM_CLIENT) IF(NOT WITH_GUI) MESSAGE(FATAL_ERROR "The client cannot be built without the NeL GUI Library (WITH_GUI)") @@ -158,6 +153,8 @@ IF(WITH_RYZOM_CLIENT) ${OPENSSL_INCLUDE_DIR} ) + INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/nel/3rdparty) + IF(STEAM_FOUND) INCLUDE_DIRECTORIES(${STEAM_INCLUDE_DIRS}) ENDIF() @@ -170,7 +167,7 @@ IF(WITH_RYZOM_CLIENT) nel3d nelgui nelsound - ryzom_sevenzip + nel_sevenzip ryzom_clientsheets ryzom_gameshare nelpacs diff --git a/code/ryzom/client/src/seven_zip/7z.h b/code/ryzom/client/src/seven_zip/7z.h deleted file mode 100644 index 6c7886e38..000000000 --- a/code/ryzom/client/src/seven_zip/7z.h +++ /dev/null @@ -1,202 +0,0 @@ -/* 7z.h -- 7z interface -2017-04-03 : Igor Pavlov : Public domain */ - -#ifndef __7Z_H -#define __7Z_H - -#include "7zTypes.h" - -EXTERN_C_BEGIN - -#define k7zStartHeaderSize 0x20 -#define k7zSignatureSize 6 - -extern const Byte k7zSignature[k7zSignatureSize]; - -typedef struct -{ - const Byte *Data; - size_t Size; -} CSzData; - -/* CSzCoderInfo & CSzFolder support only default methods */ - -typedef struct -{ - size_t PropsOffset; - UInt32 MethodID; - Byte NumStreams; - Byte PropsSize; -} CSzCoderInfo; - -typedef struct -{ - UInt32 InIndex; - UInt32 OutIndex; -} CSzBond; - -#define SZ_NUM_CODERS_IN_FOLDER_MAX 4 -#define SZ_NUM_BONDS_IN_FOLDER_MAX 3 -#define SZ_NUM_PACK_STREAMS_IN_FOLDER_MAX 4 - -typedef struct -{ - UInt32 NumCoders; - UInt32 NumBonds; - UInt32 NumPackStreams; - UInt32 UnpackStream; - UInt32 PackStreams[SZ_NUM_PACK_STREAMS_IN_FOLDER_MAX]; - CSzBond Bonds[SZ_NUM_BONDS_IN_FOLDER_MAX]; - CSzCoderInfo Coders[SZ_NUM_CODERS_IN_FOLDER_MAX]; -} CSzFolder; - - -SRes SzGetNextFolderItem(CSzFolder *f, CSzData *sd); - -typedef struct -{ - UInt32 Low; - UInt32 High; -} CNtfsFileTime; - -typedef struct -{ - Byte *Defs; /* MSB 0 bit numbering */ - UInt32 *Vals; -} CSzBitUi32s; - -typedef struct -{ - Byte *Defs; /* MSB 0 bit numbering */ - // UInt64 *Vals; - CNtfsFileTime *Vals; -} CSzBitUi64s; - -#define SzBitArray_Check(p, i) (((p)[(i) >> 3] & (0x80 >> ((i) & 7))) != 0) - -#define SzBitWithVals_Check(p, i) ((p)->Defs && ((p)->Defs[(i) >> 3] & (0x80 >> ((i) & 7))) != 0) - -typedef struct -{ - UInt32 NumPackStreams; - UInt32 NumFolders; - - UInt64 *PackPositions; // NumPackStreams + 1 - CSzBitUi32s FolderCRCs; // NumFolders - - size_t *FoCodersOffsets; // NumFolders + 1 - UInt32 *FoStartPackStreamIndex; // NumFolders + 1 - UInt32 *FoToCoderUnpackSizes; // NumFolders + 1 - Byte *FoToMainUnpackSizeIndex; // NumFolders - UInt64 *CoderUnpackSizes; // for all coders in all folders - - Byte *CodersData; -} CSzAr; - -UInt64 SzAr_GetFolderUnpackSize(const CSzAr *p, UInt32 folderIndex); - -SRes SzAr_DecodeFolder(const CSzAr *p, UInt32 folderIndex, - ILookInStream *stream, UInt64 startPos, - Byte *outBuffer, size_t outSize, - ISzAllocPtr allocMain); - -typedef struct -{ - CSzAr db; - - UInt64 startPosAfterHeader; - UInt64 dataPos; - - UInt32 NumFiles; - - UInt64 *UnpackPositions; // NumFiles + 1 - // Byte *IsEmptyFiles; - Byte *IsDirs; - CSzBitUi32s CRCs; - - CSzBitUi32s Attribs; - // CSzBitUi32s Parents; - CSzBitUi64s MTime; - CSzBitUi64s CTime; - - UInt32 *FolderToFile; // NumFolders + 1 - UInt32 *FileToFolder; // NumFiles - - size_t *FileNameOffsets; /* in 2-byte steps */ - Byte *FileNames; /* UTF-16-LE */ -} CSzArEx; - -#define SzArEx_IsDir(p, i) (SzBitArray_Check((p)->IsDirs, i)) - -#define SzArEx_GetFileSize(p, i) ((p)->UnpackPositions[(i) + 1] - (p)->UnpackPositions[i]) - -void SzArEx_Init(CSzArEx *p); -void SzArEx_Free(CSzArEx *p, ISzAllocPtr alloc); -UInt64 SzArEx_GetFolderStreamPos(const CSzArEx *p, UInt32 folderIndex, UInt32 indexInFolder); -int SzArEx_GetFolderFullPackSize(const CSzArEx *p, UInt32 folderIndex, UInt64 *resSize); - -/* -if dest == NULL, the return value specifies the required size of the buffer, - in 16-bit characters, including the null-terminating character. -if dest != NULL, the return value specifies the number of 16-bit characters that - are written to the dest, including the null-terminating character. */ - -size_t SzArEx_GetFileNameUtf16(const CSzArEx *p, size_t fileIndex, UInt16 *dest); - -/* -size_t SzArEx_GetFullNameLen(const CSzArEx *p, size_t fileIndex); -UInt16 *SzArEx_GetFullNameUtf16_Back(const CSzArEx *p, size_t fileIndex, UInt16 *dest); -*/ - - - -/* - SzArEx_Extract extracts file from archive - - *outBuffer must be 0 before first call for each new archive. - - Extracting cache: - If you need to decompress more than one file, you can send - these values from previous call: - *blockIndex, - *outBuffer, - *outBufferSize - You can consider "*outBuffer" as cache of solid block. If your archive is solid, - it will increase decompression speed. - - If you use external function, you can declare these 3 cache variables - (blockIndex, outBuffer, outBufferSize) as static in that external function. - - Free *outBuffer and set *outBuffer to 0, if you want to flush cache. -*/ - -SRes SzArEx_Extract( - const CSzArEx *db, - ILookInStream *inStream, - UInt32 fileIndex, /* index of file */ - UInt32 *blockIndex, /* index of solid block */ - Byte **outBuffer, /* pointer to pointer to output buffer (allocated with allocMain) */ - size_t *outBufferSize, /* buffer size for output buffer */ - size_t *offset, /* offset of stream for required file in *outBuffer */ - size_t *outSizeProcessed, /* size of file in *outBuffer */ - ISzAllocPtr allocMain, - ISzAllocPtr allocTemp); - - -/* -SzArEx_Open Errors: -SZ_ERROR_NO_ARCHIVE -SZ_ERROR_ARCHIVE -SZ_ERROR_UNSUPPORTED -SZ_ERROR_MEM -SZ_ERROR_CRC -SZ_ERROR_INPUT_EOF -SZ_ERROR_FAIL -*/ - -SRes SzArEx_Open(CSzArEx *p, ILookInStream *inStream, - ISzAllocPtr allocMain, ISzAllocPtr allocTemp); - -EXTERN_C_END - -#endif diff --git a/code/ryzom/client/src/seven_zip/7zArcIn.cpp b/code/ryzom/client/src/seven_zip/7zArcIn.cpp deleted file mode 100644 index f74d0fad5..000000000 --- a/code/ryzom/client/src/seven_zip/7zArcIn.cpp +++ /dev/null @@ -1,1771 +0,0 @@ -/* 7zArcIn.c -- 7z Input functions -2018-12-31 : Igor Pavlov : Public domain */ - -#include "Precomp.h" - -#include - -#include "7z.h" -#include "7zBuf.h" -#include "7zCrc.h" -#include "CpuArch.h" - -#define MY_ALLOC(T, p, size, alloc) { \ - if ((p = (T *)ISzAlloc_Alloc(alloc, (size) * sizeof(T))) == NULL) return SZ_ERROR_MEM; } - -#define MY_ALLOC_ZE(T, p, size, alloc) { if ((size) == 0) p = NULL; else MY_ALLOC(T, p, size, alloc) } - -#define MY_ALLOC_AND_CPY(to, size, from, alloc) \ - { MY_ALLOC(Byte, to, size, alloc); memcpy(to, from, size); } - -#define MY_ALLOC_ZE_AND_CPY(to, size, from, alloc) \ - { if ((size) == 0) to = NULL; else { MY_ALLOC_AND_CPY(to, size, from, alloc) } } - -#define k7zMajorVersion 0 - -enum EIdEnum -{ - k7zIdEnd, - k7zIdHeader, - k7zIdArchiveProperties, - k7zIdAdditionalStreamsInfo, - k7zIdMainStreamsInfo, - k7zIdFilesInfo, - k7zIdPackInfo, - k7zIdUnpackInfo, - k7zIdSubStreamsInfo, - k7zIdSize, - k7zIdCRC, - k7zIdFolder, - k7zIdCodersUnpackSize, - k7zIdNumUnpackStream, - k7zIdEmptyStream, - k7zIdEmptyFile, - k7zIdAnti, - k7zIdName, - k7zIdCTime, - k7zIdATime, - k7zIdMTime, - k7zIdWinAttrib, - k7zIdComment, - k7zIdEncodedHeader, - k7zIdStartPos, - k7zIdDummy - // k7zNtSecure, - // k7zParent, - // k7zIsReal -}; - -const Byte k7zSignature[k7zSignatureSize] = {'7', 'z', 0xBC, 0xAF, 0x27, 0x1C}; - -#define SzBitUi32s_Init(p) { (p)->Defs = NULL; (p)->Vals = NULL; } - -static SRes SzBitUi32s_Alloc(CSzBitUi32s *p, size_t num, ISzAllocPtr alloc) -{ - if (num == 0) - { - p->Defs = NULL; - p->Vals = NULL; - } - else - { - MY_ALLOC(Byte, p->Defs, (num + 7) >> 3, alloc); - MY_ALLOC(UInt32, p->Vals, num, alloc); - } - return SZ_OK; -} - -void SzBitUi32s_Free(CSzBitUi32s *p, ISzAllocPtr alloc) -{ - ISzAlloc_Free(alloc, p->Defs); p->Defs = NULL; - ISzAlloc_Free(alloc, p->Vals); p->Vals = NULL; -} - -#define SzBitUi64s_Init(p) { (p)->Defs = NULL; (p)->Vals = NULL; } - -void SzBitUi64s_Free(CSzBitUi64s *p, ISzAllocPtr alloc) -{ - ISzAlloc_Free(alloc, p->Defs); p->Defs = NULL; - ISzAlloc_Free(alloc, p->Vals); p->Vals = NULL; -} - - -static void SzAr_Init(CSzAr *p) -{ - p->NumPackStreams = 0; - p->NumFolders = 0; - - p->PackPositions = NULL; - SzBitUi32s_Init(&p->FolderCRCs); - - p->FoCodersOffsets = NULL; - p->FoStartPackStreamIndex = NULL; - p->FoToCoderUnpackSizes = NULL; - p->FoToMainUnpackSizeIndex = NULL; - p->CoderUnpackSizes = NULL; - - p->CodersData = NULL; -} - -static void SzAr_Free(CSzAr *p, ISzAllocPtr alloc) -{ - ISzAlloc_Free(alloc, p->PackPositions); - SzBitUi32s_Free(&p->FolderCRCs, alloc); - - ISzAlloc_Free(alloc, p->FoCodersOffsets); - ISzAlloc_Free(alloc, p->FoStartPackStreamIndex); - ISzAlloc_Free(alloc, p->FoToCoderUnpackSizes); - ISzAlloc_Free(alloc, p->FoToMainUnpackSizeIndex); - ISzAlloc_Free(alloc, p->CoderUnpackSizes); - - ISzAlloc_Free(alloc, p->CodersData); - - SzAr_Init(p); -} - - -void SzArEx_Init(CSzArEx *p) -{ - SzAr_Init(&p->db); - - p->NumFiles = 0; - p->dataPos = 0; - - p->UnpackPositions = NULL; - p->IsDirs = NULL; - - p->FolderToFile = NULL; - p->FileToFolder = NULL; - - p->FileNameOffsets = NULL; - p->FileNames = NULL; - - SzBitUi32s_Init(&p->CRCs); - SzBitUi32s_Init(&p->Attribs); - // SzBitUi32s_Init(&p->Parents); - SzBitUi64s_Init(&p->MTime); - SzBitUi64s_Init(&p->CTime); -} - -void SzArEx_Free(CSzArEx *p, ISzAllocPtr alloc) -{ - ISzAlloc_Free(alloc, p->UnpackPositions); - ISzAlloc_Free(alloc, p->IsDirs); - - ISzAlloc_Free(alloc, p->FolderToFile); - ISzAlloc_Free(alloc, p->FileToFolder); - - ISzAlloc_Free(alloc, p->FileNameOffsets); - ISzAlloc_Free(alloc, p->FileNames); - - SzBitUi32s_Free(&p->CRCs, alloc); - SzBitUi32s_Free(&p->Attribs, alloc); - // SzBitUi32s_Free(&p->Parents, alloc); - SzBitUi64s_Free(&p->MTime, alloc); - SzBitUi64s_Free(&p->CTime, alloc); - - SzAr_Free(&p->db, alloc); - SzArEx_Init(p); -} - - -static int TestSignatureCandidate(const Byte *testBytes) -{ - unsigned i; - for (i = 0; i < k7zSignatureSize; i++) - if (testBytes[i] != k7zSignature[i]) - return 0; - return 1; -} - -#define SzData_Clear(p) { (p)->Data = NULL; (p)->Size = 0; } - -#define SZ_READ_BYTE_SD(_sd_, dest) if ((_sd_)->Size == 0) return SZ_ERROR_ARCHIVE; (_sd_)->Size--; dest = *(_sd_)->Data++; -#define SZ_READ_BYTE(dest) SZ_READ_BYTE_SD(sd, dest) -#define SZ_READ_BYTE_2(dest) if (sd.Size == 0) return SZ_ERROR_ARCHIVE; sd.Size--; dest = *sd.Data++; - -#define SKIP_DATA(sd, size) { sd->Size -= (size_t)(size); sd->Data += (size_t)(size); } -#define SKIP_DATA2(sd, size) { sd.Size -= (size_t)(size); sd.Data += (size_t)(size); } - -#define SZ_READ_32(dest) if (sd.Size < 4) return SZ_ERROR_ARCHIVE; \ - dest = GetUi32(sd.Data); SKIP_DATA2(sd, 4); - -static MY_NO_INLINE SRes ReadNumber(CSzData *sd, UInt64 *value) -{ - Byte firstByte, mask; - unsigned i; - UInt32 v; - - SZ_READ_BYTE(firstByte); - if ((firstByte & 0x80) == 0) - { - *value = firstByte; - return SZ_OK; - } - SZ_READ_BYTE(v); - if ((firstByte & 0x40) == 0) - { - *value = (((UInt32)firstByte & 0x3F) << 8) | v; - return SZ_OK; - } - SZ_READ_BYTE(mask); - *value = v | ((UInt32)mask << 8); - mask = 0x20; - for (i = 2; i < 8; i++) - { - Byte b; - if ((firstByte & mask) == 0) - { - UInt64 highPart = (unsigned)firstByte & (unsigned)(mask - 1); - *value |= (highPart << (8 * i)); - return SZ_OK; - } - SZ_READ_BYTE(b); - *value |= ((UInt64)b << (8 * i)); - mask >>= 1; - } - return SZ_OK; -} - - -static MY_NO_INLINE SRes SzReadNumber32(CSzData *sd, UInt32 *value) -{ - Byte firstByte; - UInt64 value64; - if (sd->Size == 0) - return SZ_ERROR_ARCHIVE; - firstByte = *sd->Data; - if ((firstByte & 0x80) == 0) - { - *value = firstByte; - sd->Data++; - sd->Size--; - return SZ_OK; - } - RINOK(ReadNumber(sd, &value64)); - if (value64 >= (UInt32)0x80000000 - 1) - return SZ_ERROR_UNSUPPORTED; - if (value64 >= ((UInt64)(1) << ((sizeof(size_t) - 1) * 8 + 4))) - return SZ_ERROR_UNSUPPORTED; - *value = (UInt32)value64; - return SZ_OK; -} - -#define ReadID(sd, value) ReadNumber(sd, value) - -static SRes SkipData(CSzData *sd) -{ - UInt64 size; - RINOK(ReadNumber(sd, &size)); - if (size > sd->Size) - return SZ_ERROR_ARCHIVE; - SKIP_DATA(sd, size); - return SZ_OK; -} - -static SRes WaitId(CSzData *sd, UInt32 id) -{ - for (;;) - { - UInt64 type; - RINOK(ReadID(sd, &type)); - if (type == id) - return SZ_OK; - if (type == k7zIdEnd) - return SZ_ERROR_ARCHIVE; - RINOK(SkipData(sd)); - } -} - -static SRes RememberBitVector(CSzData *sd, UInt32 numItems, const Byte **v) -{ - UInt32 numBytes = (numItems + 7) >> 3; - if (numBytes > sd->Size) - return SZ_ERROR_ARCHIVE; - *v = sd->Data; - SKIP_DATA(sd, numBytes); - return SZ_OK; -} - -static UInt32 CountDefinedBits(const Byte *bits, UInt32 numItems) -{ - Byte b = 0; - unsigned m = 0; - UInt32 sum = 0; - for (; numItems != 0; numItems--) - { - if (m == 0) - { - b = *bits++; - m = 8; - } - m--; - sum += ((b >> m) & 1); - } - return sum; -} - -static MY_NO_INLINE SRes ReadBitVector(CSzData *sd, UInt32 numItems, Byte **v, ISzAllocPtr alloc) -{ - Byte allAreDefined; - Byte *v2; - UInt32 numBytes = (numItems + 7) >> 3; - *v = NULL; - SZ_READ_BYTE(allAreDefined); - if (numBytes == 0) - return SZ_OK; - if (allAreDefined == 0) - { - if (numBytes > sd->Size) - return SZ_ERROR_ARCHIVE; - MY_ALLOC_AND_CPY(*v, numBytes, sd->Data, alloc); - SKIP_DATA(sd, numBytes); - return SZ_OK; - } - MY_ALLOC(Byte, *v, numBytes, alloc); - v2 = *v; - memset(v2, 0xFF, (size_t)numBytes); - { - unsigned numBits = (unsigned)numItems & 7; - if (numBits != 0) - v2[(size_t)numBytes - 1] = (Byte)((((UInt32)1 << numBits) - 1) << (8 - numBits)); - } - return SZ_OK; -} - -static MY_NO_INLINE SRes ReadUi32s(CSzData *sd2, UInt32 numItems, CSzBitUi32s *crcs, ISzAllocPtr alloc) -{ - UInt32 i; - CSzData sd; - UInt32 *vals; - const Byte *defs; - MY_ALLOC_ZE(UInt32, crcs->Vals, numItems, alloc); - sd = *sd2; - defs = crcs->Defs; - vals = crcs->Vals; - for (i = 0; i < numItems; i++) - if (SzBitArray_Check(defs, i)) - { - SZ_READ_32(vals[i]); - } - else - vals[i] = 0; - *sd2 = sd; - return SZ_OK; -} - -static SRes ReadBitUi32s(CSzData *sd, UInt32 numItems, CSzBitUi32s *crcs, ISzAllocPtr alloc) -{ - SzBitUi32s_Free(crcs, alloc); - RINOK(ReadBitVector(sd, numItems, &crcs->Defs, alloc)); - return ReadUi32s(sd, numItems, crcs, alloc); -} - -static SRes SkipBitUi32s(CSzData *sd, UInt32 numItems) -{ - Byte allAreDefined; - UInt32 numDefined = numItems; - SZ_READ_BYTE(allAreDefined); - if (!allAreDefined) - { - size_t numBytes = (numItems + 7) >> 3; - if (numBytes > sd->Size) - return SZ_ERROR_ARCHIVE; - numDefined = CountDefinedBits(sd->Data, numItems); - SKIP_DATA(sd, numBytes); - } - if (numDefined > (sd->Size >> 2)) - return SZ_ERROR_ARCHIVE; - SKIP_DATA(sd, (size_t)numDefined * 4); - return SZ_OK; -} - -static SRes ReadPackInfo(CSzAr *p, CSzData *sd, ISzAllocPtr alloc) -{ - RINOK(SzReadNumber32(sd, &p->NumPackStreams)); - - RINOK(WaitId(sd, k7zIdSize)); - MY_ALLOC(UInt64, p->PackPositions, (size_t)p->NumPackStreams + 1, alloc); - { - UInt64 sum = 0; - UInt32 i; - UInt32 numPackStreams = p->NumPackStreams; - for (i = 0; i < numPackStreams; i++) - { - UInt64 packSize; - p->PackPositions[i] = sum; - RINOK(ReadNumber(sd, &packSize)); - sum += packSize; - if (sum < packSize) - return SZ_ERROR_ARCHIVE; - } - p->PackPositions[i] = sum; - } - - for (;;) - { - UInt64 type; - RINOK(ReadID(sd, &type)); - if (type == k7zIdEnd) - return SZ_OK; - if (type == k7zIdCRC) - { - /* CRC of packed streams is unused now */ - RINOK(SkipBitUi32s(sd, p->NumPackStreams)); - continue; - } - RINOK(SkipData(sd)); - } -} - -/* -static SRes SzReadSwitch(CSzData *sd) -{ - Byte external; - RINOK(SzReadByte(sd, &external)); - return (external == 0) ? SZ_OK: SZ_ERROR_UNSUPPORTED; -} -*/ - -#define k_NumCodersStreams_in_Folder_MAX (SZ_NUM_BONDS_IN_FOLDER_MAX + SZ_NUM_PACK_STREAMS_IN_FOLDER_MAX) - -SRes SzGetNextFolderItem(CSzFolder *f, CSzData *sd) -{ - UInt32 numCoders, i; - UInt32 numInStreams = 0; - const Byte *dataStart = sd->Data; - - f->NumCoders = 0; - f->NumBonds = 0; - f->NumPackStreams = 0; - f->UnpackStream = 0; - - RINOK(SzReadNumber32(sd, &numCoders)); - if (numCoders == 0 || numCoders > SZ_NUM_CODERS_IN_FOLDER_MAX) - return SZ_ERROR_UNSUPPORTED; - - for (i = 0; i < numCoders; i++) - { - Byte mainByte; - CSzCoderInfo *coder = f->Coders + i; - unsigned idSize, j; - UInt64 id; - - SZ_READ_BYTE(mainByte); - if ((mainByte & 0xC0) != 0) - return SZ_ERROR_UNSUPPORTED; - - idSize = (unsigned)(mainByte & 0xF); - if (idSize > sizeof(id)) - return SZ_ERROR_UNSUPPORTED; - if (idSize > sd->Size) - return SZ_ERROR_ARCHIVE; - id = 0; - for (j = 0; j < idSize; j++) - { - id = ((id << 8) | *sd->Data); - sd->Data++; - sd->Size--; - } - if (id > (UInt32)0xFFFFFFFF) - return SZ_ERROR_UNSUPPORTED; - coder->MethodID = (UInt32)id; - - coder->NumStreams = 1; - coder->PropsOffset = 0; - coder->PropsSize = 0; - - if ((mainByte & 0x10) != 0) - { - UInt32 numStreams; - - RINOK(SzReadNumber32(sd, &numStreams)); - if (numStreams > k_NumCodersStreams_in_Folder_MAX) - return SZ_ERROR_UNSUPPORTED; - coder->NumStreams = (Byte)numStreams; - - RINOK(SzReadNumber32(sd, &numStreams)); - if (numStreams != 1) - return SZ_ERROR_UNSUPPORTED; - } - - numInStreams += coder->NumStreams; - - if (numInStreams > k_NumCodersStreams_in_Folder_MAX) - return SZ_ERROR_UNSUPPORTED; - - if ((mainByte & 0x20) != 0) - { - UInt32 propsSize = 0; - RINOK(SzReadNumber32(sd, &propsSize)); - if (propsSize > sd->Size) - return SZ_ERROR_ARCHIVE; - if (propsSize >= 0x80) - return SZ_ERROR_UNSUPPORTED; - coder->PropsOffset = sd->Data - dataStart; - coder->PropsSize = (Byte)propsSize; - sd->Data += (size_t)propsSize; - sd->Size -= (size_t)propsSize; - } - } - - /* - if (numInStreams == 1 && numCoders == 1) - { - f->NumPackStreams = 1; - f->PackStreams[0] = 0; - } - else - */ - { - Byte streamUsed[k_NumCodersStreams_in_Folder_MAX]; - UInt32 numBonds, numPackStreams; - - numBonds = numCoders - 1; - if (numInStreams < numBonds) - return SZ_ERROR_ARCHIVE; - if (numBonds > SZ_NUM_BONDS_IN_FOLDER_MAX) - return SZ_ERROR_UNSUPPORTED; - f->NumBonds = numBonds; - - numPackStreams = numInStreams - numBonds; - if (numPackStreams > SZ_NUM_PACK_STREAMS_IN_FOLDER_MAX) - return SZ_ERROR_UNSUPPORTED; - f->NumPackStreams = numPackStreams; - - for (i = 0; i < numInStreams; i++) - streamUsed[i] = False; - - if (numBonds != 0) - { - Byte coderUsed[SZ_NUM_CODERS_IN_FOLDER_MAX]; - - for (i = 0; i < numCoders; i++) - coderUsed[i] = False; - - for (i = 0; i < numBonds; i++) - { - CSzBond *bp = f->Bonds + i; - - RINOK(SzReadNumber32(sd, &bp->InIndex)); - if (bp->InIndex >= numInStreams || streamUsed[bp->InIndex]) - return SZ_ERROR_ARCHIVE; - streamUsed[bp->InIndex] = True; - - RINOK(SzReadNumber32(sd, &bp->OutIndex)); - if (bp->OutIndex >= numCoders || coderUsed[bp->OutIndex]) - return SZ_ERROR_ARCHIVE; - coderUsed[bp->OutIndex] = True; - } - - for (i = 0; i < numCoders; i++) - if (!coderUsed[i]) - { - f->UnpackStream = i; - break; - } - - if (i == numCoders) - return SZ_ERROR_ARCHIVE; - } - - if (numPackStreams == 1) - { - for (i = 0; i < numInStreams; i++) - if (!streamUsed[i]) - break; - if (i == numInStreams) - return SZ_ERROR_ARCHIVE; - f->PackStreams[0] = i; - } - else - for (i = 0; i < numPackStreams; i++) - { - UInt32 index; - RINOK(SzReadNumber32(sd, &index)); - if (index >= numInStreams || streamUsed[index]) - return SZ_ERROR_ARCHIVE; - streamUsed[index] = True; - f->PackStreams[i] = index; - } - } - - f->NumCoders = numCoders; - - return SZ_OK; -} - - -static MY_NO_INLINE SRes SkipNumbers(CSzData *sd2, UInt32 num) -{ - CSzData sd; - sd = *sd2; - for (; num != 0; num--) - { - Byte firstByte, mask; - unsigned i; - SZ_READ_BYTE_2(firstByte); - if ((firstByte & 0x80) == 0) - continue; - if ((firstByte & 0x40) == 0) - { - if (sd.Size == 0) - return SZ_ERROR_ARCHIVE; - sd.Size--; - sd.Data++; - continue; - } - mask = 0x20; - for (i = 2; i < 8 && (firstByte & mask) != 0; i++) - mask >>= 1; - if (i > sd.Size) - return SZ_ERROR_ARCHIVE; - SKIP_DATA2(sd, i); - } - *sd2 = sd; - return SZ_OK; -} - - -#define k_Scan_NumCoders_MAX 64 -#define k_Scan_NumCodersStreams_in_Folder_MAX 64 - - -static SRes ReadUnpackInfo(CSzAr *p, - CSzData *sd2, - UInt32 numFoldersMax, - const CBuf *tempBufs, UInt32 numTempBufs, - ISzAllocPtr alloc) -{ - CSzData sd; - - UInt32 fo, numFolders, numCodersOutStreams, packStreamIndex; - const Byte *startBufPtr; - Byte external; - - RINOK(WaitId(sd2, k7zIdFolder)); - - RINOK(SzReadNumber32(sd2, &numFolders)); - if (numFolders > numFoldersMax) - return SZ_ERROR_UNSUPPORTED; - p->NumFolders = numFolders; - - SZ_READ_BYTE_SD(sd2, external); - if (external == 0) - sd = *sd2; - else - { - UInt32 index; - RINOK(SzReadNumber32(sd2, &index)); - if (index >= numTempBufs) - return SZ_ERROR_ARCHIVE; - sd.Data = tempBufs[index].data; - sd.Size = tempBufs[index].size; - } - - MY_ALLOC(size_t, p->FoCodersOffsets, (size_t)numFolders + 1, alloc); - MY_ALLOC(UInt32, p->FoStartPackStreamIndex, (size_t)numFolders + 1, alloc); - MY_ALLOC(UInt32, p->FoToCoderUnpackSizes, (size_t)numFolders + 1, alloc); - MY_ALLOC_ZE(Byte, p->FoToMainUnpackSizeIndex, (size_t)numFolders, alloc); - - startBufPtr = sd.Data; - - packStreamIndex = 0; - numCodersOutStreams = 0; - - for (fo = 0; fo < numFolders; fo++) - { - UInt32 numCoders, ci, numInStreams = 0; - - p->FoCodersOffsets[fo] = sd.Data - startBufPtr; - - RINOK(SzReadNumber32(&sd, &numCoders)); - if (numCoders == 0 || numCoders > k_Scan_NumCoders_MAX) - return SZ_ERROR_UNSUPPORTED; - - for (ci = 0; ci < numCoders; ci++) - { - Byte mainByte; - unsigned idSize; - UInt32 coderInStreams; - - SZ_READ_BYTE_2(mainByte); - if ((mainByte & 0xC0) != 0) - return SZ_ERROR_UNSUPPORTED; - idSize = (mainByte & 0xF); - if (idSize > 8) - return SZ_ERROR_UNSUPPORTED; - if (idSize > sd.Size) - return SZ_ERROR_ARCHIVE; - SKIP_DATA2(sd, idSize); - - coderInStreams = 1; - - if ((mainByte & 0x10) != 0) - { - UInt32 coderOutStreams; - RINOK(SzReadNumber32(&sd, &coderInStreams)); - RINOK(SzReadNumber32(&sd, &coderOutStreams)); - if (coderInStreams > k_Scan_NumCodersStreams_in_Folder_MAX || coderOutStreams != 1) - return SZ_ERROR_UNSUPPORTED; - } - - numInStreams += coderInStreams; - - if ((mainByte & 0x20) != 0) - { - UInt32 propsSize; - RINOK(SzReadNumber32(&sd, &propsSize)); - if (propsSize > sd.Size) - return SZ_ERROR_ARCHIVE; - SKIP_DATA2(sd, propsSize); - } - } - - { - UInt32 indexOfMainStream = 0; - UInt32 numPackStreams = 1; - - if (numCoders != 1 || numInStreams != 1) - { - Byte streamUsed[k_Scan_NumCodersStreams_in_Folder_MAX]; - Byte coderUsed[k_Scan_NumCoders_MAX]; - - UInt32 i; - UInt32 numBonds = numCoders - 1; - if (numInStreams < numBonds) - return SZ_ERROR_ARCHIVE; - - if (numInStreams > k_Scan_NumCodersStreams_in_Folder_MAX) - return SZ_ERROR_UNSUPPORTED; - - for (i = 0; i < numInStreams; i++) - streamUsed[i] = False; - for (i = 0; i < numCoders; i++) - coderUsed[i] = False; - - for (i = 0; i < numBonds; i++) - { - UInt32 index; - - RINOK(SzReadNumber32(&sd, &index)); - if (index >= numInStreams || streamUsed[index]) - return SZ_ERROR_ARCHIVE; - streamUsed[index] = True; - - RINOK(SzReadNumber32(&sd, &index)); - if (index >= numCoders || coderUsed[index]) - return SZ_ERROR_ARCHIVE; - coderUsed[index] = True; - } - - numPackStreams = numInStreams - numBonds; - - if (numPackStreams != 1) - for (i = 0; i < numPackStreams; i++) - { - UInt32 index; - RINOK(SzReadNumber32(&sd, &index)); - if (index >= numInStreams || streamUsed[index]) - return SZ_ERROR_ARCHIVE; - streamUsed[index] = True; - } - - for (i = 0; i < numCoders; i++) - if (!coderUsed[i]) - { - indexOfMainStream = i; - break; - } - - if (i == numCoders) - return SZ_ERROR_ARCHIVE; - } - - p->FoStartPackStreamIndex[fo] = packStreamIndex; - p->FoToCoderUnpackSizes[fo] = numCodersOutStreams; - p->FoToMainUnpackSizeIndex[fo] = (Byte)indexOfMainStream; - numCodersOutStreams += numCoders; - if (numCodersOutStreams < numCoders) - return SZ_ERROR_UNSUPPORTED; - if (numPackStreams > p->NumPackStreams - packStreamIndex) - return SZ_ERROR_ARCHIVE; - packStreamIndex += numPackStreams; - } - } - - p->FoToCoderUnpackSizes[fo] = numCodersOutStreams; - - { - size_t dataSize = sd.Data - startBufPtr; - p->FoStartPackStreamIndex[fo] = packStreamIndex; - p->FoCodersOffsets[fo] = dataSize; - MY_ALLOC_ZE_AND_CPY(p->CodersData, dataSize, startBufPtr, alloc); - } - - if (external != 0) - { - if (sd.Size != 0) - return SZ_ERROR_ARCHIVE; - sd = *sd2; - } - - RINOK(WaitId(&sd, k7zIdCodersUnpackSize)); - - MY_ALLOC_ZE(UInt64, p->CoderUnpackSizes, (size_t)numCodersOutStreams, alloc); - { - UInt32 i; - for (i = 0; i < numCodersOutStreams; i++) - { - RINOK(ReadNumber(&sd, p->CoderUnpackSizes + i)); - } - } - - for (;;) - { - UInt64 type; - RINOK(ReadID(&sd, &type)); - if (type == k7zIdEnd) - { - *sd2 = sd; - return SZ_OK; - } - if (type == k7zIdCRC) - { - RINOK(ReadBitUi32s(&sd, numFolders, &p->FolderCRCs, alloc)); - continue; - } - RINOK(SkipData(&sd)); - } -} - - -UInt64 SzAr_GetFolderUnpackSize(const CSzAr *p, UInt32 folderIndex) -{ - return p->CoderUnpackSizes[p->FoToCoderUnpackSizes[folderIndex] + p->FoToMainUnpackSizeIndex[folderIndex]]; -} - - -typedef struct -{ - UInt32 NumTotalSubStreams; - UInt32 NumSubDigests; - CSzData sdNumSubStreams; - CSzData sdSizes; - CSzData sdCRCs; -} CSubStreamInfo; - - -static SRes ReadSubStreamsInfo(CSzAr *p, CSzData *sd, CSubStreamInfo *ssi) -{ - UInt64 type = 0; - UInt32 numSubDigests = 0; - UInt32 numFolders = p->NumFolders; - UInt32 numUnpackStreams = numFolders; - UInt32 numUnpackSizesInData = 0; - - for (;;) - { - RINOK(ReadID(sd, &type)); - if (type == k7zIdNumUnpackStream) - { - UInt32 i; - ssi->sdNumSubStreams.Data = sd->Data; - numUnpackStreams = 0; - numSubDigests = 0; - for (i = 0; i < numFolders; i++) - { - UInt32 numStreams; - RINOK(SzReadNumber32(sd, &numStreams)); - if (numUnpackStreams > numUnpackStreams + numStreams) - return SZ_ERROR_UNSUPPORTED; - numUnpackStreams += numStreams; - if (numStreams != 0) - numUnpackSizesInData += (numStreams - 1); - if (numStreams != 1 || !SzBitWithVals_Check(&p->FolderCRCs, i)) - numSubDigests += numStreams; - } - ssi->sdNumSubStreams.Size = sd->Data - ssi->sdNumSubStreams.Data; - continue; - } - if (type == k7zIdCRC || type == k7zIdSize || type == k7zIdEnd) - break; - RINOK(SkipData(sd)); - } - - if (!ssi->sdNumSubStreams.Data) - { - numSubDigests = numFolders; - if (p->FolderCRCs.Defs) - numSubDigests = numFolders - CountDefinedBits(p->FolderCRCs.Defs, numFolders); - } - - ssi->NumTotalSubStreams = numUnpackStreams; - ssi->NumSubDigests = numSubDigests; - - if (type == k7zIdSize) - { - ssi->sdSizes.Data = sd->Data; - RINOK(SkipNumbers(sd, numUnpackSizesInData)); - ssi->sdSizes.Size = sd->Data - ssi->sdSizes.Data; - RINOK(ReadID(sd, &type)); - } - - for (;;) - { - if (type == k7zIdEnd) - return SZ_OK; - if (type == k7zIdCRC) - { - ssi->sdCRCs.Data = sd->Data; - RINOK(SkipBitUi32s(sd, numSubDigests)); - ssi->sdCRCs.Size = sd->Data - ssi->sdCRCs.Data; - } - else - { - RINOK(SkipData(sd)); - } - RINOK(ReadID(sd, &type)); - } -} - -static SRes SzReadStreamsInfo(CSzAr *p, - CSzData *sd, - UInt32 numFoldersMax, const CBuf *tempBufs, UInt32 numTempBufs, - UInt64 *dataOffset, - CSubStreamInfo *ssi, - ISzAllocPtr alloc) -{ - UInt64 type; - - SzData_Clear(&ssi->sdSizes); - SzData_Clear(&ssi->sdCRCs); - SzData_Clear(&ssi->sdNumSubStreams); - - *dataOffset = 0; - RINOK(ReadID(sd, &type)); - if (type == k7zIdPackInfo) - { - RINOK(ReadNumber(sd, dataOffset)); - RINOK(ReadPackInfo(p, sd, alloc)); - RINOK(ReadID(sd, &type)); - } - if (type == k7zIdUnpackInfo) - { - RINOK(ReadUnpackInfo(p, sd, numFoldersMax, tempBufs, numTempBufs, alloc)); - RINOK(ReadID(sd, &type)); - } - if (type == k7zIdSubStreamsInfo) - { - RINOK(ReadSubStreamsInfo(p, sd, ssi)); - RINOK(ReadID(sd, &type)); - } - else - { - ssi->NumTotalSubStreams = p->NumFolders; - // ssi->NumSubDigests = 0; - } - - return (type == k7zIdEnd ? SZ_OK : SZ_ERROR_UNSUPPORTED); -} - -static SRes SzReadAndDecodePackedStreams( - ILookInStream *inStream, - CSzData *sd, - CBuf *tempBufs, - UInt32 numFoldersMax, - UInt64 baseOffset, - CSzAr *p, - ISzAllocPtr allocTemp) -{ - UInt64 dataStartPos; - UInt32 fo; - CSubStreamInfo ssi; - - RINOK(SzReadStreamsInfo(p, sd, numFoldersMax, NULL, 0, &dataStartPos, &ssi, allocTemp)); - - dataStartPos += baseOffset; - if (p->NumFolders == 0) - return SZ_ERROR_ARCHIVE; - - for (fo = 0; fo < p->NumFolders; fo++) - Buf_Init(tempBufs + fo); - - for (fo = 0; fo < p->NumFolders; fo++) - { - CBuf *tempBuf = tempBufs + fo; - UInt64 unpackSize = SzAr_GetFolderUnpackSize(p, fo); - if ((size_t)unpackSize != unpackSize) - return SZ_ERROR_MEM; - if (!Buf_Create(tempBuf, (size_t)unpackSize, allocTemp)) - return SZ_ERROR_MEM; - } - - for (fo = 0; fo < p->NumFolders; fo++) - { - const CBuf *tempBuf = tempBufs + fo; - RINOK(LookInStream_SeekTo(inStream, dataStartPos)); - RINOK(SzAr_DecodeFolder(p, fo, inStream, dataStartPos, tempBuf->data, tempBuf->size, allocTemp)); - } - - return SZ_OK; -} - -static SRes SzReadFileNames(const Byte *data, size_t size, UInt32 numFiles, size_t *offsets) -{ - size_t pos = 0; - *offsets++ = 0; - if (numFiles == 0) - return (size == 0) ? SZ_OK : SZ_ERROR_ARCHIVE; - if (size < 2) - return SZ_ERROR_ARCHIVE; - if (data[size - 2] != 0 || data[size - 1] != 0) - return SZ_ERROR_ARCHIVE; - do - { - const Byte *p; - if (pos == size) - return SZ_ERROR_ARCHIVE; - for (p = data + pos; - #ifdef _WIN32 - *(const UInt16 *)p != 0 - #else - p[0] != 0 || p[1] != 0 - #endif - ; p += 2); - pos = p - data + 2; - *offsets++ = (pos >> 1); - } - while (--numFiles); - return (pos == size) ? SZ_OK : SZ_ERROR_ARCHIVE; -} - -static MY_NO_INLINE SRes ReadTime(CSzBitUi64s *p, UInt32 num, - CSzData *sd2, - const CBuf *tempBufs, UInt32 numTempBufs, - ISzAllocPtr alloc) -{ - CSzData sd; - UInt32 i; - CNtfsFileTime *vals; - Byte *defs; - Byte external; - - RINOK(ReadBitVector(sd2, num, &p->Defs, alloc)); - - SZ_READ_BYTE_SD(sd2, external); - if (external == 0) - sd = *sd2; - else - { - UInt32 index; - RINOK(SzReadNumber32(sd2, &index)); - if (index >= numTempBufs) - return SZ_ERROR_ARCHIVE; - sd.Data = tempBufs[index].data; - sd.Size = tempBufs[index].size; - } - - MY_ALLOC_ZE(CNtfsFileTime, p->Vals, num, alloc); - vals = p->Vals; - defs = p->Defs; - for (i = 0; i < num; i++) - if (SzBitArray_Check(defs, i)) - { - if (sd.Size < 8) - return SZ_ERROR_ARCHIVE; - vals[i].Low = GetUi32(sd.Data); - vals[i].High = GetUi32(sd.Data + 4); - SKIP_DATA2(sd, 8); - } - else - vals[i].High = vals[i].Low = 0; - - if (external == 0) - *sd2 = sd; - - return SZ_OK; -} - - -#define NUM_ADDITIONAL_STREAMS_MAX 8 - - -static SRes SzReadHeader2( - CSzArEx *p, /* allocMain */ - CSzData *sd, - ILookInStream *inStream, - CBuf *tempBufs, UInt32 *numTempBufs, - ISzAllocPtr allocMain, - ISzAllocPtr allocTemp - ) -{ - CSubStreamInfo ssi; - -{ - UInt64 type; - - SzData_Clear(&ssi.sdSizes); - SzData_Clear(&ssi.sdCRCs); - SzData_Clear(&ssi.sdNumSubStreams); - - ssi.NumSubDigests = 0; - ssi.NumTotalSubStreams = 0; - - RINOK(ReadID(sd, &type)); - - if (type == k7zIdArchiveProperties) - { - for (;;) - { - UInt64 type2; - RINOK(ReadID(sd, &type2)); - if (type2 == k7zIdEnd) - break; - RINOK(SkipData(sd)); - } - RINOK(ReadID(sd, &type)); - } - - if (type == k7zIdAdditionalStreamsInfo) - { - CSzAr tempAr; - SRes res; - - SzAr_Init(&tempAr); - res = SzReadAndDecodePackedStreams(inStream, sd, tempBufs, NUM_ADDITIONAL_STREAMS_MAX, - p->startPosAfterHeader, &tempAr, allocTemp); - *numTempBufs = tempAr.NumFolders; - SzAr_Free(&tempAr, allocTemp); - - if (res != SZ_OK) - return res; - RINOK(ReadID(sd, &type)); - } - - if (type == k7zIdMainStreamsInfo) - { - RINOK(SzReadStreamsInfo(&p->db, sd, (UInt32)1 << 30, tempBufs, *numTempBufs, - &p->dataPos, &ssi, allocMain)); - p->dataPos += p->startPosAfterHeader; - RINOK(ReadID(sd, &type)); - } - - if (type == k7zIdEnd) - { - return SZ_OK; - } - - if (type != k7zIdFilesInfo) - return SZ_ERROR_ARCHIVE; -} - -{ - UInt32 numFiles = 0; - UInt32 numEmptyStreams = 0; - const Byte *emptyStreams = NULL; - const Byte *emptyFiles = NULL; - - RINOK(SzReadNumber32(sd, &numFiles)); - p->NumFiles = numFiles; - - for (;;) - { - UInt64 type; - UInt64 size; - RINOK(ReadID(sd, &type)); - if (type == k7zIdEnd) - break; - RINOK(ReadNumber(sd, &size)); - if (size > sd->Size) - return SZ_ERROR_ARCHIVE; - - if (type >= ((UInt32)1 << 8)) - { - SKIP_DATA(sd, size); - } - else switch ((unsigned)type) - { - case k7zIdName: - { - size_t namesSize; - const Byte *namesData; - Byte external; - - SZ_READ_BYTE(external); - if (external == 0) - { - namesSize = (size_t)size - 1; - namesData = sd->Data; - } - else - { - UInt32 index; - RINOK(SzReadNumber32(sd, &index)); - if (index >= *numTempBufs) - return SZ_ERROR_ARCHIVE; - namesData = (tempBufs)[index].data; - namesSize = (tempBufs)[index].size; - } - - if ((namesSize & 1) != 0) - return SZ_ERROR_ARCHIVE; - MY_ALLOC(size_t, p->FileNameOffsets, numFiles + 1, allocMain); - MY_ALLOC_ZE_AND_CPY(p->FileNames, namesSize, namesData, allocMain); - RINOK(SzReadFileNames(p->FileNames, namesSize, numFiles, p->FileNameOffsets)) - if (external == 0) - { - SKIP_DATA(sd, namesSize); - } - break; - } - case k7zIdEmptyStream: - { - RINOK(RememberBitVector(sd, numFiles, &emptyStreams)); - numEmptyStreams = CountDefinedBits(emptyStreams, numFiles); - emptyFiles = NULL; - break; - } - case k7zIdEmptyFile: - { - RINOK(RememberBitVector(sd, numEmptyStreams, &emptyFiles)); - break; - } - case k7zIdWinAttrib: - { - Byte external; - CSzData sdSwitch; - CSzData *sdPtr; - SzBitUi32s_Free(&p->Attribs, allocMain); - RINOK(ReadBitVector(sd, numFiles, &p->Attribs.Defs, allocMain)); - - SZ_READ_BYTE(external); - if (external == 0) - sdPtr = sd; - else - { - UInt32 index; - RINOK(SzReadNumber32(sd, &index)); - if (index >= *numTempBufs) - return SZ_ERROR_ARCHIVE; - sdSwitch.Data = (tempBufs)[index].data; - sdSwitch.Size = (tempBufs)[index].size; - sdPtr = &sdSwitch; - } - RINOK(ReadUi32s(sdPtr, numFiles, &p->Attribs, allocMain)); - break; - } - /* - case k7zParent: - { - SzBitUi32s_Free(&p->Parents, allocMain); - RINOK(ReadBitVector(sd, numFiles, &p->Parents.Defs, allocMain)); - RINOK(SzReadSwitch(sd)); - RINOK(ReadUi32s(sd, numFiles, &p->Parents, allocMain)); - break; - } - */ - case k7zIdMTime: RINOK(ReadTime(&p->MTime, numFiles, sd, tempBufs, *numTempBufs, allocMain)); break; - case k7zIdCTime: RINOK(ReadTime(&p->CTime, numFiles, sd, tempBufs, *numTempBufs, allocMain)); break; - default: - { - SKIP_DATA(sd, size); - } - } - } - - if (numFiles - numEmptyStreams != ssi.NumTotalSubStreams) - return SZ_ERROR_ARCHIVE; - - for (;;) - { - UInt64 type; - RINOK(ReadID(sd, &type)); - if (type == k7zIdEnd) - break; - RINOK(SkipData(sd)); - } - - { - UInt32 i; - UInt32 emptyFileIndex = 0; - UInt32 folderIndex = 0; - UInt32 remSubStreams = 0; - UInt32 numSubStreams = 0; - UInt64 unpackPos = 0; - const Byte *digestsDefs = NULL; - const Byte *digestsVals = NULL; - UInt32 digestsValsIndex = 0; - UInt32 digestIndex; - Byte allDigestsDefined = 0; - Byte isDirMask = 0; - Byte crcMask = 0; - Byte mask = 0x80; - - MY_ALLOC(UInt32, p->FolderToFile, p->db.NumFolders + 1, allocMain); - MY_ALLOC_ZE(UInt32, p->FileToFolder, p->NumFiles, allocMain); - MY_ALLOC(UInt64, p->UnpackPositions, p->NumFiles + 1, allocMain); - MY_ALLOC_ZE(Byte, p->IsDirs, (p->NumFiles + 7) >> 3, allocMain); - - RINOK(SzBitUi32s_Alloc(&p->CRCs, p->NumFiles, allocMain)); - - if (ssi.sdCRCs.Size != 0) - { - SZ_READ_BYTE_SD(&ssi.sdCRCs, allDigestsDefined); - if (allDigestsDefined) - digestsVals = ssi.sdCRCs.Data; - else - { - size_t numBytes = (ssi.NumSubDigests + 7) >> 3; - digestsDefs = ssi.sdCRCs.Data; - digestsVals = digestsDefs + numBytes; - } - } - - digestIndex = 0; - - for (i = 0; i < numFiles; i++, mask >>= 1) - { - if (mask == 0) - { - UInt32 byteIndex = (i - 1) >> 3; - p->IsDirs[byteIndex] = isDirMask; - p->CRCs.Defs[byteIndex] = crcMask; - isDirMask = 0; - crcMask = 0; - mask = 0x80; - } - - p->UnpackPositions[i] = unpackPos; - p->CRCs.Vals[i] = 0; - - if (emptyStreams && SzBitArray_Check(emptyStreams, i)) - { - if (emptyFiles) - { - if (!SzBitArray_Check(emptyFiles, emptyFileIndex)) - isDirMask |= mask; - emptyFileIndex++; - } - else - isDirMask |= mask; - if (remSubStreams == 0) - { - p->FileToFolder[i] = (UInt32)-1; - continue; - } - } - - if (remSubStreams == 0) - { - for (;;) - { - if (folderIndex >= p->db.NumFolders) - return SZ_ERROR_ARCHIVE; - p->FolderToFile[folderIndex] = i; - numSubStreams = 1; - if (ssi.sdNumSubStreams.Data) - { - RINOK(SzReadNumber32(&ssi.sdNumSubStreams, &numSubStreams)); - } - remSubStreams = numSubStreams; - if (numSubStreams != 0) - break; - { - UInt64 folderUnpackSize = SzAr_GetFolderUnpackSize(&p->db, folderIndex); - unpackPos += folderUnpackSize; - if (unpackPos < folderUnpackSize) - return SZ_ERROR_ARCHIVE; - } - - folderIndex++; - } - } - - p->FileToFolder[i] = folderIndex; - - if (emptyStreams && SzBitArray_Check(emptyStreams, i)) - continue; - - if (--remSubStreams == 0) - { - UInt64 folderUnpackSize = SzAr_GetFolderUnpackSize(&p->db, folderIndex); - UInt64 startFolderUnpackPos = p->UnpackPositions[p->FolderToFile[folderIndex]]; - if (folderUnpackSize < unpackPos - startFolderUnpackPos) - return SZ_ERROR_ARCHIVE; - unpackPos = startFolderUnpackPos + folderUnpackSize; - if (unpackPos < folderUnpackSize) - return SZ_ERROR_ARCHIVE; - - if (numSubStreams == 1 && SzBitWithVals_Check(&p->db.FolderCRCs, i)) - { - p->CRCs.Vals[i] = p->db.FolderCRCs.Vals[folderIndex]; - crcMask |= mask; - } - else if (allDigestsDefined || (digestsDefs && SzBitArray_Check(digestsDefs, digestIndex))) - { - p->CRCs.Vals[i] = GetUi32(digestsVals + (size_t)digestsValsIndex * 4); - digestsValsIndex++; - crcMask |= mask; - } - - folderIndex++; - } - else - { - UInt64 v; - RINOK(ReadNumber(&ssi.sdSizes, &v)); - unpackPos += v; - if (unpackPos < v) - return SZ_ERROR_ARCHIVE; - if (allDigestsDefined || (digestsDefs && SzBitArray_Check(digestsDefs, digestIndex))) - { - p->CRCs.Vals[i] = GetUi32(digestsVals + (size_t)digestsValsIndex * 4); - digestsValsIndex++; - crcMask |= mask; - } - } - } - - if (mask != 0x80) - { - UInt32 byteIndex = (i - 1) >> 3; - p->IsDirs[byteIndex] = isDirMask; - p->CRCs.Defs[byteIndex] = crcMask; - } - - p->UnpackPositions[i] = unpackPos; - - if (remSubStreams != 0) - return SZ_ERROR_ARCHIVE; - - for (;;) - { - p->FolderToFile[folderIndex] = i; - if (folderIndex >= p->db.NumFolders) - break; - if (!ssi.sdNumSubStreams.Data) - return SZ_ERROR_ARCHIVE; - RINOK(SzReadNumber32(&ssi.sdNumSubStreams, &numSubStreams)); - if (numSubStreams != 0) - return SZ_ERROR_ARCHIVE; - /* - { - UInt64 folderUnpackSize = SzAr_GetFolderUnpackSize(&p->db, folderIndex); - unpackPos += folderUnpackSize; - if (unpackPos < folderUnpackSize) - return SZ_ERROR_ARCHIVE; - } - */ - folderIndex++; - } - - if (ssi.sdNumSubStreams.Data && ssi.sdNumSubStreams.Size != 0) - return SZ_ERROR_ARCHIVE; - } -} - return SZ_OK; -} - - -static SRes SzReadHeader( - CSzArEx *p, - CSzData *sd, - ILookInStream *inStream, - ISzAllocPtr allocMain, - ISzAllocPtr allocTemp) -{ - UInt32 i; - UInt32 numTempBufs = 0; - SRes res; - CBuf tempBufs[NUM_ADDITIONAL_STREAMS_MAX]; - - for (i = 0; i < NUM_ADDITIONAL_STREAMS_MAX; i++) - Buf_Init(tempBufs + i); - - res = SzReadHeader2(p, sd, inStream, - tempBufs, &numTempBufs, - allocMain, allocTemp); - - for (i = 0; i < NUM_ADDITIONAL_STREAMS_MAX; i++) - Buf_Free(tempBufs + i, allocTemp); - - RINOK(res); - - if (sd->Size != 0) - return SZ_ERROR_FAIL; - - return res; -} - -static SRes SzArEx_Open2( - CSzArEx *p, - ILookInStream *inStream, - ISzAllocPtr allocMain, - ISzAllocPtr allocTemp) -{ - Byte header[k7zStartHeaderSize]; - Int64 startArcPos; - UInt64 nextHeaderOffset, nextHeaderSize; - size_t nextHeaderSizeT; - UInt32 nextHeaderCRC; - CBuf buf; - SRes res; - - startArcPos = 0; - RINOK(ILookInStream_Seek(inStream, &startArcPos, SZ_SEEK_CUR)); - - RINOK(LookInStream_Read2(inStream, header, k7zStartHeaderSize, SZ_ERROR_NO_ARCHIVE)); - - if (!TestSignatureCandidate(header)) - return SZ_ERROR_NO_ARCHIVE; - if (header[6] != k7zMajorVersion) - return SZ_ERROR_UNSUPPORTED; - - nextHeaderOffset = GetUi64(header + 12); - nextHeaderSize = GetUi64(header + 20); - nextHeaderCRC = GetUi32(header + 28); - - p->startPosAfterHeader = startArcPos + k7zStartHeaderSize; - - if (CrcCalc(header + 12, 20) != GetUi32(header + 8)) - return SZ_ERROR_CRC; - - nextHeaderSizeT = (size_t)nextHeaderSize; - if (nextHeaderSizeT != nextHeaderSize) - return SZ_ERROR_MEM; - if (nextHeaderSizeT == 0) - return SZ_OK; - if (nextHeaderOffset > nextHeaderOffset + nextHeaderSize || - nextHeaderOffset > nextHeaderOffset + nextHeaderSize + k7zStartHeaderSize) - return SZ_ERROR_NO_ARCHIVE; - - { - Int64 pos = 0; - RINOK(ILookInStream_Seek(inStream, &pos, SZ_SEEK_END)); - if ((UInt64)pos < startArcPos + nextHeaderOffset || - (UInt64)pos < startArcPos + k7zStartHeaderSize + nextHeaderOffset || - (UInt64)pos < startArcPos + k7zStartHeaderSize + nextHeaderOffset + nextHeaderSize) - return SZ_ERROR_INPUT_EOF; - } - - RINOK(LookInStream_SeekTo(inStream, startArcPos + k7zStartHeaderSize + nextHeaderOffset)); - - if (!Buf_Create(&buf, nextHeaderSizeT, allocTemp)) - return SZ_ERROR_MEM; - - res = LookInStream_Read(inStream, buf.data, nextHeaderSizeT); - - if (res == SZ_OK) - { - res = SZ_ERROR_ARCHIVE; - if (CrcCalc(buf.data, nextHeaderSizeT) == nextHeaderCRC) - { - CSzData sd; - UInt64 type; - sd.Data = buf.data; - sd.Size = buf.size; - - res = ReadID(&sd, &type); - - if (res == SZ_OK && type == k7zIdEncodedHeader) - { - CSzAr tempAr; - CBuf tempBuf; - Buf_Init(&tempBuf); - - SzAr_Init(&tempAr); - res = SzReadAndDecodePackedStreams(inStream, &sd, &tempBuf, 1, p->startPosAfterHeader, &tempAr, allocTemp); - SzAr_Free(&tempAr, allocTemp); - - if (res != SZ_OK) - { - Buf_Free(&tempBuf, allocTemp); - } - else - { - Buf_Free(&buf, allocTemp); - buf.data = tempBuf.data; - buf.size = tempBuf.size; - sd.Data = buf.data; - sd.Size = buf.size; - res = ReadID(&sd, &type); - } - } - - if (res == SZ_OK) - { - if (type == k7zIdHeader) - { - /* - CSzData sd2; - unsigned ttt; - for (ttt = 0; ttt < 40000; ttt++) - { - SzArEx_Free(p, allocMain); - sd2 = sd; - res = SzReadHeader(p, &sd2, inStream, allocMain, allocTemp); - if (res != SZ_OK) - break; - } - */ - res = SzReadHeader(p, &sd, inStream, allocMain, allocTemp); - } - else - res = SZ_ERROR_UNSUPPORTED; - } - } - } - - Buf_Free(&buf, allocTemp); - return res; -} - - -SRes SzArEx_Open(CSzArEx *p, ILookInStream *inStream, - ISzAllocPtr allocMain, ISzAllocPtr allocTemp) -{ - SRes res = SzArEx_Open2(p, inStream, allocMain, allocTemp); - if (res != SZ_OK) - SzArEx_Free(p, allocMain); - return res; -} - - -SRes SzArEx_Extract( - const CSzArEx *p, - ILookInStream *inStream, - UInt32 fileIndex, - UInt32 *blockIndex, - Byte **tempBuf, - size_t *outBufferSize, - size_t *offset, - size_t *outSizeProcessed, - ISzAllocPtr allocMain, - ISzAllocPtr allocTemp) -{ - UInt32 folderIndex = p->FileToFolder[fileIndex]; - SRes res = SZ_OK; - - *offset = 0; - *outSizeProcessed = 0; - - if (folderIndex == (UInt32)-1) - { - ISzAlloc_Free(allocMain, *tempBuf); - *blockIndex = folderIndex; - *tempBuf = NULL; - *outBufferSize = 0; - return SZ_OK; - } - - if (*tempBuf == NULL || *blockIndex != folderIndex) - { - UInt64 unpackSizeSpec = SzAr_GetFolderUnpackSize(&p->db, folderIndex); - /* - UInt64 unpackSizeSpec = - p->UnpackPositions[p->FolderToFile[(size_t)folderIndex + 1]] - - p->UnpackPositions[p->FolderToFile[folderIndex]]; - */ - size_t unpackSize = (size_t)unpackSizeSpec; - - if (unpackSize != unpackSizeSpec) - return SZ_ERROR_MEM; - *blockIndex = folderIndex; - ISzAlloc_Free(allocMain, *tempBuf); - *tempBuf = NULL; - - if (res == SZ_OK) - { - *outBufferSize = unpackSize; - if (unpackSize != 0) - { - *tempBuf = (Byte *)ISzAlloc_Alloc(allocMain, unpackSize); - if (*tempBuf == NULL) - res = SZ_ERROR_MEM; - } - - if (res == SZ_OK) - { - res = SzAr_DecodeFolder(&p->db, folderIndex, - inStream, p->dataPos, *tempBuf, unpackSize, allocTemp); - } - } - } - - if (res == SZ_OK) - { - UInt64 unpackPos = p->UnpackPositions[fileIndex]; - *offset = (size_t)(unpackPos - p->UnpackPositions[p->FolderToFile[folderIndex]]); - *outSizeProcessed = (size_t)(p->UnpackPositions[(size_t)fileIndex + 1] - unpackPos); - if (*offset + *outSizeProcessed > *outBufferSize) - return SZ_ERROR_FAIL; - if (SzBitWithVals_Check(&p->CRCs, fileIndex)) - if (CrcCalc(*tempBuf + *offset, *outSizeProcessed) != p->CRCs.Vals[fileIndex]) - res = SZ_ERROR_CRC; - } - - return res; -} - - -size_t SzArEx_GetFileNameUtf16(const CSzArEx *p, size_t fileIndex, UInt16 *dest) -{ - size_t offs = p->FileNameOffsets[fileIndex]; - size_t len = p->FileNameOffsets[fileIndex + 1] - offs; - if (dest != 0) - { - size_t i; - const Byte *src = p->FileNames + offs * 2; - for (i = 0; i < len; i++) - dest[i] = GetUi16(src + i * 2); - } - return len; -} - -/* -size_t SzArEx_GetFullNameLen(const CSzArEx *p, size_t fileIndex) -{ - size_t len; - if (!p->FileNameOffsets) - return 1; - len = 0; - for (;;) - { - UInt32 parent = (UInt32)(Int32)-1; - len += p->FileNameOffsets[fileIndex + 1] - p->FileNameOffsets[fileIndex]; - if SzBitWithVals_Check(&p->Parents, fileIndex) - parent = p->Parents.Vals[fileIndex]; - if (parent == (UInt32)(Int32)-1) - return len; - fileIndex = parent; - } -} - -UInt16 *SzArEx_GetFullNameUtf16_Back(const CSzArEx *p, size_t fileIndex, UInt16 *dest) -{ - BoolInt needSlash; - if (!p->FileNameOffsets) - { - *(--dest) = 0; - return dest; - } - needSlash = False; - for (;;) - { - UInt32 parent = (UInt32)(Int32)-1; - size_t curLen = p->FileNameOffsets[fileIndex + 1] - p->FileNameOffsets[fileIndex]; - SzArEx_GetFileNameUtf16(p, fileIndex, dest - curLen); - if (needSlash) - *(dest - 1) = '/'; - needSlash = True; - dest -= curLen; - - if SzBitWithVals_Check(&p->Parents, fileIndex) - parent = p->Parents.Vals[fileIndex]; - if (parent == (UInt32)(Int32)-1) - return dest; - fileIndex = parent; - } -} -*/ diff --git a/code/ryzom/client/src/seven_zip/7zBuf.cpp b/code/ryzom/client/src/seven_zip/7zBuf.cpp deleted file mode 100644 index 8865c32a8..000000000 --- a/code/ryzom/client/src/seven_zip/7zBuf.cpp +++ /dev/null @@ -1,36 +0,0 @@ -/* 7zBuf.c -- Byte Buffer -2017-04-03 : Igor Pavlov : Public domain */ - -#include "Precomp.h" - -#include "7zBuf.h" - -void Buf_Init(CBuf *p) -{ - p->data = 0; - p->size = 0; -} - -int Buf_Create(CBuf *p, size_t size, ISzAllocPtr alloc) -{ - p->size = 0; - if (size == 0) - { - p->data = 0; - return 1; - } - p->data = (Byte *)ISzAlloc_Alloc(alloc, size); - if (p->data) - { - p->size = size; - return 1; - } - return 0; -} - -void Buf_Free(CBuf *p, ISzAllocPtr alloc) -{ - ISzAlloc_Free(alloc, p->data); - p->data = 0; - p->size = 0; -} diff --git a/code/ryzom/client/src/seven_zip/7zBuf.h b/code/ryzom/client/src/seven_zip/7zBuf.h deleted file mode 100644 index 81d1b5b64..000000000 --- a/code/ryzom/client/src/seven_zip/7zBuf.h +++ /dev/null @@ -1,35 +0,0 @@ -/* 7zBuf.h -- Byte Buffer -2017-04-03 : Igor Pavlov : Public domain */ - -#ifndef __7Z_BUF_H -#define __7Z_BUF_H - -#include "7zTypes.h" - -EXTERN_C_BEGIN - -typedef struct -{ - Byte *data; - size_t size; -} CBuf; - -void Buf_Init(CBuf *p); -int Buf_Create(CBuf *p, size_t size, ISzAllocPtr alloc); -void Buf_Free(CBuf *p, ISzAllocPtr alloc); - -typedef struct -{ - Byte *data; - size_t size; - size_t pos; -} CDynBuf; - -void DynBuf_Construct(CDynBuf *p); -void DynBuf_SeekToBeg(CDynBuf *p); -int DynBuf_Write(CDynBuf *p, const Byte *buf, size_t size, ISzAllocPtr alloc); -void DynBuf_Free(CDynBuf *p, ISzAllocPtr alloc); - -EXTERN_C_END - -#endif diff --git a/code/ryzom/client/src/seven_zip/7zBuf2.cpp b/code/ryzom/client/src/seven_zip/7zBuf2.cpp deleted file mode 100644 index 208347416..000000000 --- a/code/ryzom/client/src/seven_zip/7zBuf2.cpp +++ /dev/null @@ -1,52 +0,0 @@ -/* 7zBuf2.c -- Byte Buffer -2017-04-03 : Igor Pavlov : Public domain */ - -#include "Precomp.h" - -#include - -#include "7zBuf.h" - -void DynBuf_Construct(CDynBuf *p) -{ - p->data = 0; - p->size = 0; - p->pos = 0; -} - -void DynBuf_SeekToBeg(CDynBuf *p) -{ - p->pos = 0; -} - -int DynBuf_Write(CDynBuf *p, const Byte *buf, size_t size, ISzAllocPtr alloc) -{ - if (size > p->size - p->pos) - { - size_t newSize = p->pos + size; - Byte *data; - newSize += newSize / 4; - data = (Byte *)ISzAlloc_Alloc(alloc, newSize); - if (!data) - return 0; - p->size = newSize; - if (p->pos != 0) - memcpy(data, p->data, p->pos); - ISzAlloc_Free(alloc, p->data); - p->data = data; - } - if (size != 0) - { - memcpy(p->data + p->pos, buf, size); - p->pos += size; - } - return 1; -} - -void DynBuf_Free(CDynBuf *p, ISzAllocPtr alloc) -{ - ISzAlloc_Free(alloc, p->data); - p->data = 0; - p->size = 0; - p->pos = 0; -} diff --git a/code/ryzom/client/src/seven_zip/7zCrcOpt.cpp b/code/ryzom/client/src/seven_zip/7zCrcOpt.cpp deleted file mode 100644 index 73beba298..000000000 --- a/code/ryzom/client/src/seven_zip/7zCrcOpt.cpp +++ /dev/null @@ -1,115 +0,0 @@ -/* 7zCrcOpt.c -- CRC32 calculation -2017-04-03 : Igor Pavlov : Public domain */ - -#include "Precomp.h" - -#include "CpuArch.h" - -#ifndef MY_CPU_BE - -#define CRC_UPDATE_BYTE_2(crc, b) (table[((crc) ^ (b)) & 0xFF] ^ ((crc) >> 8)) - -UInt32 MY_FAST_CALL CrcUpdateT4(UInt32 v, const void *data, size_t size, const UInt32 *table) -{ - const Byte *p = (const Byte *)data; - for (; size > 0 && ((unsigned)(ptrdiff_t)p & 3) != 0; size--, p++) - v = CRC_UPDATE_BYTE_2(v, *p); - for (; size >= 4; size -= 4, p += 4) - { - v ^= *(const UInt32 *)p; - v = - (table + 0x300)[((v ) & 0xFF)] - ^ (table + 0x200)[((v >> 8) & 0xFF)] - ^ (table + 0x100)[((v >> 16) & 0xFF)] - ^ (table + 0x000)[((v >> 24))]; - } - for (; size > 0; size--, p++) - v = CRC_UPDATE_BYTE_2(v, *p); - return v; -} - -UInt32 MY_FAST_CALL CrcUpdateT8(UInt32 v, const void *data, size_t size, const UInt32 *table) -{ - const Byte *p = (const Byte *)data; - for (; size > 0 && ((unsigned)(ptrdiff_t)p & 7) != 0; size--, p++) - v = CRC_UPDATE_BYTE_2(v, *p); - for (; size >= 8; size -= 8, p += 8) - { - UInt32 d; - v ^= *(const UInt32 *)p; - v = - (table + 0x700)[((v ) & 0xFF)] - ^ (table + 0x600)[((v >> 8) & 0xFF)] - ^ (table + 0x500)[((v >> 16) & 0xFF)] - ^ (table + 0x400)[((v >> 24))]; - d = *((const UInt32 *)p + 1); - v ^= - (table + 0x300)[((d ) & 0xFF)] - ^ (table + 0x200)[((d >> 8) & 0xFF)] - ^ (table + 0x100)[((d >> 16) & 0xFF)] - ^ (table + 0x000)[((d >> 24))]; - } - for (; size > 0; size--, p++) - v = CRC_UPDATE_BYTE_2(v, *p); - return v; -} - -#endif - - -#ifndef MY_CPU_LE - -#define CRC_UINT32_SWAP(v) ((v >> 24) | ((v >> 8) & 0xFF00) | ((v << 8) & 0xFF0000) | (v << 24)) - -#define CRC_UPDATE_BYTE_2_BE(crc, b) (table[(((crc) >> 24) ^ (b))] ^ ((crc) << 8)) - -UInt32 MY_FAST_CALL CrcUpdateT1_BeT4(UInt32 v, const void *data, size_t size, const UInt32 *table) -{ - const Byte *p = (const Byte *)data; - table += 0x100; - v = CRC_UINT32_SWAP(v); - for (; size > 0 && ((unsigned)(ptrdiff_t)p & 3) != 0; size--, p++) - v = CRC_UPDATE_BYTE_2_BE(v, *p); - for (; size >= 4; size -= 4, p += 4) - { - v ^= *(const UInt32 *)p; - v = - (table + 0x000)[((v ) & 0xFF)] - ^ (table + 0x100)[((v >> 8) & 0xFF)] - ^ (table + 0x200)[((v >> 16) & 0xFF)] - ^ (table + 0x300)[((v >> 24))]; - } - for (; size > 0; size--, p++) - v = CRC_UPDATE_BYTE_2_BE(v, *p); - return CRC_UINT32_SWAP(v); -} - -UInt32 MY_FAST_CALL CrcUpdateT1_BeT8(UInt32 v, const void *data, size_t size, const UInt32 *table) -{ - const Byte *p = (const Byte *)data; - table += 0x100; - v = CRC_UINT32_SWAP(v); - for (; size > 0 && ((unsigned)(ptrdiff_t)p & 7) != 0; size--, p++) - v = CRC_UPDATE_BYTE_2_BE(v, *p); - for (; size >= 8; size -= 8, p += 8) - { - UInt32 d; - v ^= *(const UInt32 *)p; - v = - (table + 0x400)[((v ) & 0xFF)] - ^ (table + 0x500)[((v >> 8) & 0xFF)] - ^ (table + 0x600)[((v >> 16) & 0xFF)] - ^ (table + 0x700)[((v >> 24))]; - d = *((const UInt32 *)p + 1); - v ^= - (table + 0x000)[((d ) & 0xFF)] - ^ (table + 0x100)[((d >> 8) & 0xFF)] - ^ (table + 0x200)[((d >> 16) & 0xFF)] - ^ (table + 0x300)[((d >> 24))]; - } - for (; size > 0; size--, p++) - v = CRC_UPDATE_BYTE_2_BE(v, *p); - return CRC_UINT32_SWAP(v); -} - -#endif diff --git a/code/ryzom/client/src/seven_zip/7zDec.cpp b/code/ryzom/client/src/seven_zip/7zDec.cpp deleted file mode 100644 index 7c4635211..000000000 --- a/code/ryzom/client/src/seven_zip/7zDec.cpp +++ /dev/null @@ -1,591 +0,0 @@ -/* 7zDec.c -- Decoding from 7z folder -2019-02-02 : Igor Pavlov : Public domain */ - -#include "Precomp.h" - -#include - -/* #define _7ZIP_PPMD_SUPPPORT */ - -#include "7z.h" -#include "7zCrc.h" - -#include "Bcj2.h" -#include "Bra.h" -#include "CpuArch.h" -#include "Delta.h" -#include "LzmaDec.h" -#include "Lzma2Dec.h" -#ifdef _7ZIP_PPMD_SUPPPORT -#include "Ppmd7.h" -#endif - -#define k_Copy 0 -#define k_Delta 3 -#define k_LZMA2 0x21 -#define k_LZMA 0x30101 -#define k_BCJ 0x3030103 -#define k_BCJ2 0x303011B -#define k_PPC 0x3030205 -#define k_IA64 0x3030401 -#define k_ARM 0x3030501 -#define k_ARMT 0x3030701 -#define k_SPARC 0x3030805 - - -#ifdef _7ZIP_PPMD_SUPPPORT - -#define k_PPMD 0x30401 - -typedef struct -{ - IByteIn vt; - const Byte *cur; - const Byte *end; - const Byte *begin; - UInt64 processed; - BoolInt extra; - SRes res; - const ILookInStream *inStream; -} CByteInToLook; - -static Byte ReadByte(const IByteIn *pp) -{ - CByteInToLook *p = CONTAINER_FROM_VTBL(pp, CByteInToLook, vt); - if (p->cur != p->end) - return *p->cur++; - if (p->res == SZ_OK) - { - size_t size = p->cur - p->begin; - p->processed += size; - p->res = ILookInStream_Skip(p->inStream, size); - size = (1 << 25); - p->res = ILookInStream_Look(p->inStream, (const void **)&p->begin, &size); - p->cur = p->begin; - p->end = p->begin + size; - if (size != 0) - return *p->cur++;; - } - p->extra = True; - return 0; -} - -static SRes SzDecodePpmd(const Byte *props, unsigned propsSize, UInt64 inSize, const ILookInStream *inStream, - Byte *outBuffer, SizeT outSize, ISzAllocPtr allocMain) -{ - CPpmd7 ppmd; - CByteInToLook s; - SRes res = SZ_OK; - - s.vt.Read = ReadByte; - s.inStream = inStream; - s.begin = s.end = s.cur = NULL; - s.extra = False; - s.res = SZ_OK; - s.processed = 0; - - if (propsSize != 5) - return SZ_ERROR_UNSUPPORTED; - - { - unsigned order = props[0]; - UInt32 memSize = GetUi32(props + 1); - if (order < PPMD7_MIN_ORDER || - order > PPMD7_MAX_ORDER || - memSize < PPMD7_MIN_MEM_SIZE || - memSize > PPMD7_MAX_MEM_SIZE) - return SZ_ERROR_UNSUPPORTED; - Ppmd7_Construct(&ppmd); - if (!Ppmd7_Alloc(&ppmd, memSize, allocMain)) - return SZ_ERROR_MEM; - Ppmd7_Init(&ppmd, order); - } - { - CPpmd7z_RangeDec rc; - Ppmd7z_RangeDec_CreateVTable(&rc); - rc.Stream = &s.vt; - if (!Ppmd7z_RangeDec_Init(&rc)) - res = SZ_ERROR_DATA; - else if (s.extra) - res = (s.res != SZ_OK ? s.res : SZ_ERROR_DATA); - else - { - SizeT i; - for (i = 0; i < outSize; i++) - { - int sym = Ppmd7_DecodeSymbol(&ppmd, &rc.vt); - if (s.extra || sym < 0) - break; - outBuffer[i] = (Byte)sym; - } - if (i != outSize) - res = (s.res != SZ_OK ? s.res : SZ_ERROR_DATA); - else if (s.processed + (s.cur - s.begin) != inSize || !Ppmd7z_RangeDec_IsFinishedOK(&rc)) - res = SZ_ERROR_DATA; - } - } - Ppmd7_Free(&ppmd, allocMain); - return res; -} - -#endif - - -static SRes SzDecodeLzma(const Byte *props, unsigned propsSize, UInt64 inSize, ILookInStream *inStream, - Byte *outBuffer, SizeT outSize, ISzAllocPtr allocMain) -{ - CLzmaDec state; - SRes res = SZ_OK; - - LzmaDec_Construct(&state); - RINOK(LzmaDec_AllocateProbs(&state, props, propsSize, allocMain)); - state.dic = outBuffer; - state.dicBufSize = outSize; - LzmaDec_Init(&state); - - for (;;) - { - const void *inBuf = NULL; - size_t lookahead = (1 << 18); - if (lookahead > inSize) - lookahead = (size_t)inSize; - res = ILookInStream_Look(inStream, &inBuf, &lookahead); - if (res != SZ_OK) - break; - - { - SizeT inProcessed = (SizeT)lookahead, dicPos = state.dicPos; - ELzmaStatus status; - res = LzmaDec_DecodeToDic(&state, outSize, (const Byte *)inBuf, &inProcessed, LZMA_FINISH_END, &status); - lookahead -= inProcessed; - inSize -= inProcessed; - if (res != SZ_OK) - break; - - if (status == LZMA_STATUS_FINISHED_WITH_MARK) - { - if (outSize != state.dicPos || inSize != 0) - res = SZ_ERROR_DATA; - break; - } - - if (outSize == state.dicPos && inSize == 0 && status == LZMA_STATUS_MAYBE_FINISHED_WITHOUT_MARK) - break; - - if (inProcessed == 0 && dicPos == state.dicPos) - { - res = SZ_ERROR_DATA; - break; - } - - res = ILookInStream_Skip(inStream, inProcessed); - if (res != SZ_OK) - break; - } - } - - LzmaDec_FreeProbs(&state, allocMain); - return res; -} - - -#ifndef _7Z_NO_METHOD_LZMA2 - -static SRes SzDecodeLzma2(const Byte *props, unsigned propsSize, UInt64 inSize, ILookInStream *inStream, - Byte *outBuffer, SizeT outSize, ISzAllocPtr allocMain) -{ - CLzma2Dec state; - SRes res = SZ_OK; - - Lzma2Dec_Construct(&state); - if (propsSize != 1) - return SZ_ERROR_DATA; - RINOK(Lzma2Dec_AllocateProbs(&state, props[0], allocMain)); - state.decoder.dic = outBuffer; - state.decoder.dicBufSize = outSize; - Lzma2Dec_Init(&state); - - for (;;) - { - const void *inBuf = NULL; - size_t lookahead = (1 << 18); - if (lookahead > inSize) - lookahead = (size_t)inSize; - res = ILookInStream_Look(inStream, &inBuf, &lookahead); - if (res != SZ_OK) - break; - - { - SizeT inProcessed = (SizeT)lookahead, dicPos = state.decoder.dicPos; - ELzmaStatus status; - res = Lzma2Dec_DecodeToDic(&state, outSize, (const Byte *)inBuf, &inProcessed, LZMA_FINISH_END, &status); - lookahead -= inProcessed; - inSize -= inProcessed; - if (res != SZ_OK) - break; - - if (status == LZMA_STATUS_FINISHED_WITH_MARK) - { - if (outSize != state.decoder.dicPos || inSize != 0) - res = SZ_ERROR_DATA; - break; - } - - if (inProcessed == 0 && dicPos == state.decoder.dicPos) - { - res = SZ_ERROR_DATA; - break; - } - - res = ILookInStream_Skip(inStream, inProcessed); - if (res != SZ_OK) - break; - } - } - - Lzma2Dec_FreeProbs(&state, allocMain); - return res; -} - -#endif - - -static SRes SzDecodeCopy(UInt64 inSize, ILookInStream *inStream, Byte *outBuffer) -{ - while (inSize > 0) - { - const void *inBuf; - size_t curSize = (1 << 18); - if (curSize > inSize) - curSize = (size_t)inSize; - RINOK(ILookInStream_Look(inStream, &inBuf, &curSize)); - if (curSize == 0) - return SZ_ERROR_INPUT_EOF; - memcpy(outBuffer, inBuf, curSize); - outBuffer += curSize; - inSize -= curSize; - RINOK(ILookInStream_Skip(inStream, curSize)); - } - return SZ_OK; -} - -static BoolInt IS_MAIN_METHOD(UInt32 m) -{ - switch (m) - { - case k_Copy: - case k_LZMA: - #ifndef _7Z_NO_METHOD_LZMA2 - case k_LZMA2: - #endif - #ifdef _7ZIP_PPMD_SUPPPORT - case k_PPMD: - #endif - return True; - } - return False; -} - -static BoolInt IS_SUPPORTED_CODER(const CSzCoderInfo *c) -{ - return - c->NumStreams == 1 - /* && c->MethodID <= (UInt32)0xFFFFFFFF */ - && IS_MAIN_METHOD((UInt32)c->MethodID); -} - -#define IS_BCJ2(c) ((c)->MethodID == k_BCJ2 && (c)->NumStreams == 4) - -static SRes CheckSupportedFolder(const CSzFolder *f) -{ - if (f->NumCoders < 1 || f->NumCoders > 4) - return SZ_ERROR_UNSUPPORTED; - if (!IS_SUPPORTED_CODER(&f->Coders[0])) - return SZ_ERROR_UNSUPPORTED; - if (f->NumCoders == 1) - { - if (f->NumPackStreams != 1 || f->PackStreams[0] != 0 || f->NumBonds != 0) - return SZ_ERROR_UNSUPPORTED; - return SZ_OK; - } - - - #ifndef _7Z_NO_METHODS_FILTERS - - if (f->NumCoders == 2) - { - const CSzCoderInfo *c = &f->Coders[1]; - if ( - /* c->MethodID > (UInt32)0xFFFFFFFF || */ - c->NumStreams != 1 - || f->NumPackStreams != 1 - || f->PackStreams[0] != 0 - || f->NumBonds != 1 - || f->Bonds[0].InIndex != 1 - || f->Bonds[0].OutIndex != 0) - return SZ_ERROR_UNSUPPORTED; - switch ((UInt32)c->MethodID) - { - case k_Delta: - case k_BCJ: - case k_PPC: - case k_IA64: - case k_SPARC: - case k_ARM: - case k_ARMT: - break; - default: - return SZ_ERROR_UNSUPPORTED; - } - return SZ_OK; - } - - #endif - - - if (f->NumCoders == 4) - { - if (!IS_SUPPORTED_CODER(&f->Coders[1]) - || !IS_SUPPORTED_CODER(&f->Coders[2]) - || !IS_BCJ2(&f->Coders[3])) - return SZ_ERROR_UNSUPPORTED; - if (f->NumPackStreams != 4 - || f->PackStreams[0] != 2 - || f->PackStreams[1] != 6 - || f->PackStreams[2] != 1 - || f->PackStreams[3] != 0 - || f->NumBonds != 3 - || f->Bonds[0].InIndex != 5 || f->Bonds[0].OutIndex != 0 - || f->Bonds[1].InIndex != 4 || f->Bonds[1].OutIndex != 1 - || f->Bonds[2].InIndex != 3 || f->Bonds[2].OutIndex != 2) - return SZ_ERROR_UNSUPPORTED; - return SZ_OK; - } - - return SZ_ERROR_UNSUPPORTED; -} - -#define CASE_BRA_CONV(isa) case k_ ## isa: isa ## _Convert(outBuffer, outSize, 0, 0); break; - -static SRes SzFolder_Decode2(const CSzFolder *folder, - const Byte *propsData, - const UInt64 *unpackSizes, - const UInt64 *packPositions, - ILookInStream *inStream, UInt64 startPos, - Byte *outBuffer, SizeT outSize, ISzAllocPtr allocMain, - Byte *tempBuf[]) -{ - UInt32 ci; - SizeT tempSizes[3] = { 0, 0, 0}; - SizeT tempSize3 = 0; - Byte *tempBuf3 = 0; - - RINOK(CheckSupportedFolder(folder)); - - for (ci = 0; ci < folder->NumCoders; ci++) - { - const CSzCoderInfo *coder = &folder->Coders[ci]; - - if (IS_MAIN_METHOD((UInt32)coder->MethodID)) - { - UInt32 si = 0; - UInt64 offset; - UInt64 inSize; - Byte *outBufCur = outBuffer; - SizeT outSizeCur = outSize; - if (folder->NumCoders == 4) - { - UInt32 indices[] = { 3, 2, 0 }; - UInt64 unpackSize = unpackSizes[ci]; - si = indices[ci]; - if (ci < 2) - { - Byte *temp; - outSizeCur = (SizeT)unpackSize; - if (outSizeCur != unpackSize) - return SZ_ERROR_MEM; - temp = (Byte *)ISzAlloc_Alloc(allocMain, outSizeCur); - if (!temp && outSizeCur != 0) - return SZ_ERROR_MEM; - outBufCur = tempBuf[1 - ci] = temp; - tempSizes[1 - ci] = outSizeCur; - } - else if (ci == 2) - { - if (unpackSize > outSize) /* check it */ - return SZ_ERROR_PARAM; - tempBuf3 = outBufCur = outBuffer + (outSize - (size_t)unpackSize); - tempSize3 = outSizeCur = (SizeT)unpackSize; - } - else - return SZ_ERROR_UNSUPPORTED; - } - offset = packPositions[si]; - inSize = packPositions[(size_t)si + 1] - offset; - RINOK(LookInStream_SeekTo(inStream, startPos + offset)); - - if (coder->MethodID == k_Copy) - { - if (inSize != outSizeCur) /* check it */ - return SZ_ERROR_DATA; - RINOK(SzDecodeCopy(inSize, inStream, outBufCur)); - } - else if (coder->MethodID == k_LZMA) - { - RINOK(SzDecodeLzma(propsData + coder->PropsOffset, coder->PropsSize, inSize, inStream, outBufCur, outSizeCur, allocMain)); - } - #ifndef _7Z_NO_METHOD_LZMA2 - else if (coder->MethodID == k_LZMA2) - { - RINOK(SzDecodeLzma2(propsData + coder->PropsOffset, coder->PropsSize, inSize, inStream, outBufCur, outSizeCur, allocMain)); - } - #endif - #ifdef _7ZIP_PPMD_SUPPPORT - else if (coder->MethodID == k_PPMD) - { - RINOK(SzDecodePpmd(propsData + coder->PropsOffset, coder->PropsSize, inSize, inStream, outBufCur, outSizeCur, allocMain)); - } - #endif - else - return SZ_ERROR_UNSUPPORTED; - } - else if (coder->MethodID == k_BCJ2) - { - UInt64 offset = packPositions[1]; - UInt64 s3Size = packPositions[2] - offset; - - if (ci != 3) - return SZ_ERROR_UNSUPPORTED; - - tempSizes[2] = (SizeT)s3Size; - if (tempSizes[2] != s3Size) - return SZ_ERROR_MEM; - tempBuf[2] = (Byte *)ISzAlloc_Alloc(allocMain, tempSizes[2]); - if (!tempBuf[2] && tempSizes[2] != 0) - return SZ_ERROR_MEM; - - RINOK(LookInStream_SeekTo(inStream, startPos + offset)); - RINOK(SzDecodeCopy(s3Size, inStream, tempBuf[2])); - - if ((tempSizes[0] & 3) != 0 || - (tempSizes[1] & 3) != 0 || - tempSize3 + tempSizes[0] + tempSizes[1] != outSize) - return SZ_ERROR_DATA; - - { - CBcj2Dec p; - - p.bufs[0] = tempBuf3; p.lims[0] = tempBuf3 + tempSize3; - p.bufs[1] = tempBuf[0]; p.lims[1] = tempBuf[0] + tempSizes[0]; - p.bufs[2] = tempBuf[1]; p.lims[2] = tempBuf[1] + tempSizes[1]; - p.bufs[3] = tempBuf[2]; p.lims[3] = tempBuf[2] + tempSizes[2]; - - p.dest = outBuffer; - p.destLim = outBuffer + outSize; - - Bcj2Dec_Init(&p); - RINOK(Bcj2Dec_Decode(&p)); - - { - unsigned i; - for (i = 0; i < 4; i++) - if (p.bufs[i] != p.lims[i]) - return SZ_ERROR_DATA; - - if (!Bcj2Dec_IsFinished(&p)) - return SZ_ERROR_DATA; - - if (p.dest != p.destLim - || p.state != BCJ2_STREAM_MAIN) - return SZ_ERROR_DATA; - } - } - } - #ifndef _7Z_NO_METHODS_FILTERS - else if (ci == 1) - { - if (coder->MethodID == k_Delta) - { - if (coder->PropsSize != 1) - return SZ_ERROR_UNSUPPORTED; - { - Byte state[DELTA_STATE_SIZE]; - Delta_Init(state); - Delta_Decode(state, (unsigned)(propsData[coder->PropsOffset]) + 1, outBuffer, outSize); - } - } - else - { - if (coder->PropsSize != 0) - return SZ_ERROR_UNSUPPORTED; - switch (coder->MethodID) - { - case k_BCJ: - { - UInt32 state; - x86_Convert_Init(state); - x86_Convert(outBuffer, outSize, 0, &state, 0); - break; - } - CASE_BRA_CONV(PPC) - CASE_BRA_CONV(IA64) - CASE_BRA_CONV(SPARC) - CASE_BRA_CONV(ARM) - CASE_BRA_CONV(ARMT) - default: - return SZ_ERROR_UNSUPPORTED; - } - } - } - #endif - else - return SZ_ERROR_UNSUPPORTED; - } - - return SZ_OK; -} - - -SRes SzAr_DecodeFolder(const CSzAr *p, UInt32 folderIndex, - ILookInStream *inStream, UInt64 startPos, - Byte *outBuffer, size_t outSize, - ISzAllocPtr allocMain) -{ - SRes res; - CSzFolder folder; - CSzData sd; - - const Byte *data = p->CodersData + p->FoCodersOffsets[folderIndex]; - sd.Data = data; - sd.Size = p->FoCodersOffsets[(size_t)folderIndex + 1] - p->FoCodersOffsets[folderIndex]; - - res = SzGetNextFolderItem(&folder, &sd); - - if (res != SZ_OK) - return res; - - if (sd.Size != 0 - || folder.UnpackStream != p->FoToMainUnpackSizeIndex[folderIndex] - || outSize != SzAr_GetFolderUnpackSize(p, folderIndex)) - return SZ_ERROR_FAIL; - { - unsigned i; - Byte *tempBuf[3] = { 0, 0, 0}; - - res = SzFolder_Decode2(&folder, data, - &p->CoderUnpackSizes[p->FoToCoderUnpackSizes[folderIndex]], - p->PackPositions + p->FoStartPackStreamIndex[folderIndex], - inStream, startPos, - outBuffer, (SizeT)outSize, allocMain, tempBuf); - - for (i = 0; i < 3; i++) - ISzAlloc_Free(allocMain, tempBuf[i]); - - if (res == SZ_OK) - if (SzBitWithVals_Check(&p->FolderCRCs, folderIndex)) - if (CrcCalc(outBuffer, outSize) != p->FolderCRCs.Vals[folderIndex]) - res = SZ_ERROR_CRC; - - return res; - } -} diff --git a/code/ryzom/client/src/seven_zip/7zFile.cpp b/code/ryzom/client/src/seven_zip/7zFile.cpp deleted file mode 100644 index 8992fb1c5..000000000 --- a/code/ryzom/client/src/seven_zip/7zFile.cpp +++ /dev/null @@ -1,286 +0,0 @@ -/* 7zFile.c -- File IO -2017-04-03 : Igor Pavlov : Public domain */ - -#include "Precomp.h" - -#include "7zFile.h" - -#ifndef USE_WINDOWS_FILE - -#ifndef UNDER_CE -#include -#endif - -#else - -/* - ReadFile and WriteFile functions in Windows have BUG: - If you Read or Write 64MB or more (probably min_failure_size = 64MB - 32KB + 1) - from/to Network file, it returns ERROR_NO_SYSTEM_RESOURCES - (Insufficient system resources exist to complete the requested service). - Probably in some version of Windows there are problems with other sizes: - for 32 MB (maybe also for 16 MB). - And message can be "Network connection was lost" -*/ - -#define kChunkSizeMax (1 << 22) - -#endif - -void File_Construct(CSzFile *p) -{ - #ifdef USE_WINDOWS_FILE - p->handle = INVALID_HANDLE_VALUE; - #else - p->file = NULL; - #endif -} - -#if !defined(UNDER_CE) || !defined(USE_WINDOWS_FILE) -static WRes File_Open(CSzFile *p, const char *name, int writeMode) -{ - #ifdef USE_WINDOWS_FILE - p->handle = CreateFileA(name, - writeMode ? GENERIC_WRITE : GENERIC_READ, - FILE_SHARE_READ, NULL, - writeMode ? CREATE_ALWAYS : OPEN_EXISTING, - FILE_ATTRIBUTE_NORMAL, NULL); - return (p->handle != INVALID_HANDLE_VALUE) ? 0 : GetLastError(); - #else - p->file = fopen(name, writeMode ? "wb+" : "rb"); - return (p->file != 0) ? 0 : - #ifdef UNDER_CE - 2; /* ENOENT */ - #else - errno; - #endif - #endif -} - -WRes InFile_Open(CSzFile *p, const char *name) { return File_Open(p, name, 0); } -WRes OutFile_Open(CSzFile *p, const char *name) { return File_Open(p, name, 1); } -#endif - -#ifdef USE_WINDOWS_FILE -static WRes File_OpenW(CSzFile *p, const WCHAR *name, int writeMode) -{ - p->handle = CreateFileW(name, - writeMode ? GENERIC_WRITE : GENERIC_READ, - FILE_SHARE_READ, NULL, - writeMode ? CREATE_ALWAYS : OPEN_EXISTING, - FILE_ATTRIBUTE_NORMAL, NULL); - return (p->handle != INVALID_HANDLE_VALUE) ? 0 : GetLastError(); -} -WRes InFile_OpenW(CSzFile *p, const WCHAR *name) { return File_OpenW(p, name, 0); } -WRes OutFile_OpenW(CSzFile *p, const WCHAR *name) { return File_OpenW(p, name, 1); } -#endif - -WRes File_Close(CSzFile *p) -{ - #ifdef USE_WINDOWS_FILE - if (p->handle != INVALID_HANDLE_VALUE) - { - if (!CloseHandle(p->handle)) - return GetLastError(); - p->handle = INVALID_HANDLE_VALUE; - } - #else - if (p->file != NULL) - { - int res = fclose(p->file); - if (res != 0) - return res; - p->file = NULL; - } - #endif - return 0; -} - -WRes File_Read(CSzFile *p, void *data, size_t *size) -{ - size_t originalSize = *size; - if (originalSize == 0) - return 0; - - #ifdef USE_WINDOWS_FILE - - *size = 0; - do - { - DWORD curSize = (originalSize > kChunkSizeMax) ? kChunkSizeMax : (DWORD)originalSize; - DWORD processed = 0; - BOOL res = ReadFile(p->handle, data, curSize, &processed, NULL); - data = (void *)((Byte *)data + processed); - originalSize -= processed; - *size += processed; - if (!res) - return GetLastError(); - if (processed == 0) - break; - } - while (originalSize > 0); - return 0; - - #else - - *size = fread(data, 1, originalSize, p->file); - if (*size == originalSize) - return 0; - return ferror(p->file); - - #endif -} - -WRes File_Write(CSzFile *p, const void *data, size_t *size) -{ - size_t originalSize = *size; - if (originalSize == 0) - return 0; - - #ifdef USE_WINDOWS_FILE - - *size = 0; - do - { - DWORD curSize = (originalSize > kChunkSizeMax) ? kChunkSizeMax : (DWORD)originalSize; - DWORD processed = 0; - BOOL res = WriteFile(p->handle, data, curSize, &processed, NULL); - data = (void *)((Byte *)data + processed); - originalSize -= processed; - *size += processed; - if (!res) - return GetLastError(); - if (processed == 0) - break; - } - while (originalSize > 0); - return 0; - - #else - - *size = fwrite(data, 1, originalSize, p->file); - if (*size == originalSize) - return 0; - return ferror(p->file); - - #endif -} - -WRes File_Seek(CSzFile *p, Int64 *pos, ESzSeek origin) -{ - #ifdef USE_WINDOWS_FILE - - LARGE_INTEGER value; - DWORD moveMethod; - value.LowPart = (DWORD)*pos; - value.HighPart = (LONG)((UInt64)*pos >> 16 >> 16); /* for case when UInt64 is 32-bit only */ - switch (origin) - { - case SZ_SEEK_SET: moveMethod = FILE_BEGIN; break; - case SZ_SEEK_CUR: moveMethod = FILE_CURRENT; break; - case SZ_SEEK_END: moveMethod = FILE_END; break; - default: return ERROR_INVALID_PARAMETER; - } - value.LowPart = SetFilePointer(p->handle, value.LowPart, &value.HighPart, moveMethod); - if (value.LowPart == 0xFFFFFFFF) - { - WRes res = GetLastError(); - if (res != NO_ERROR) - return res; - } - *pos = ((Int64)value.HighPart << 32) | value.LowPart; - return 0; - - #else - - int moveMethod; - int res; - switch (origin) - { - case SZ_SEEK_SET: moveMethod = SEEK_SET; break; - case SZ_SEEK_CUR: moveMethod = SEEK_CUR; break; - case SZ_SEEK_END: moveMethod = SEEK_END; break; - default: return 1; - } - res = fseek(p->file, (long)*pos, moveMethod); - *pos = ftell(p->file); - return res; - - #endif -} - -WRes File_GetLength(CSzFile *p, UInt64 *length) -{ - #ifdef USE_WINDOWS_FILE - - DWORD sizeHigh; - DWORD sizeLow = GetFileSize(p->handle, &sizeHigh); - if (sizeLow == 0xFFFFFFFF) - { - DWORD res = GetLastError(); - if (res != NO_ERROR) - return res; - } - *length = (((UInt64)sizeHigh) << 32) + sizeLow; - return 0; - - #else - - long pos = ftell(p->file); - int res = fseek(p->file, 0, SEEK_END); - *length = ftell(p->file); - fseek(p->file, pos, SEEK_SET); - return res; - - #endif -} - - -/* ---------- FileSeqInStream ---------- */ - -static SRes FileSeqInStream_Read(const ISeqInStream *pp, void *buf, size_t *size) -{ - CFileSeqInStream *p = CONTAINER_FROM_VTBL(pp, CFileSeqInStream, vt); - return File_Read(&p->file, buf, size) == 0 ? SZ_OK : SZ_ERROR_READ; -} - -void FileSeqInStream_CreateVTable(CFileSeqInStream *p) -{ - p->vt.Read = FileSeqInStream_Read; -} - - -/* ---------- FileInStream ---------- */ - -static SRes FileInStream_Read(const ISeekInStream *pp, void *buf, size_t *size) -{ - CFileInStream *p = CONTAINER_FROM_VTBL(pp, CFileInStream, vt); - return (File_Read(&p->file, buf, size) == 0) ? SZ_OK : SZ_ERROR_READ; -} - -static SRes FileInStream_Seek(const ISeekInStream *pp, Int64 *pos, ESzSeek origin) -{ - CFileInStream *p = CONTAINER_FROM_VTBL(pp, CFileInStream, vt); - return File_Seek(&p->file, pos, origin); -} - -void FileInStream_CreateVTable(CFileInStream *p) -{ - p->vt.Read = FileInStream_Read; - p->vt.Seek = FileInStream_Seek; -} - - -/* ---------- FileOutStream ---------- */ - -static size_t FileOutStream_Write(const ISeqOutStream *pp, const void *data, size_t size) -{ - CFileOutStream *p = CONTAINER_FROM_VTBL(pp, CFileOutStream, vt); - File_Write(&p->file, data, &size); - return size; -} - -void FileOutStream_CreateVTable(CFileOutStream *p) -{ - p->vt.Write = FileOutStream_Write; -} diff --git a/code/ryzom/client/src/seven_zip/7zFile.h b/code/ryzom/client/src/seven_zip/7zFile.h deleted file mode 100644 index 0e7925382..000000000 --- a/code/ryzom/client/src/seven_zip/7zFile.h +++ /dev/null @@ -1,83 +0,0 @@ -/* 7zFile.h -- File IO -2017-04-03 : Igor Pavlov : Public domain */ - -#ifndef __7Z_FILE_H -#define __7Z_FILE_H - -#ifdef _WIN32 -#define USE_WINDOWS_FILE -#endif - -#ifdef USE_WINDOWS_FILE -#include -#else -#include -#endif - -#include "7zTypes.h" - -EXTERN_C_BEGIN - -/* ---------- File ---------- */ - -typedef struct -{ - #ifdef USE_WINDOWS_FILE - HANDLE handle; - #else - FILE *file; - #endif -} CSzFile; - -void File_Construct(CSzFile *p); -#if !defined(UNDER_CE) || !defined(USE_WINDOWS_FILE) -WRes InFile_Open(CSzFile *p, const char *name); -WRes OutFile_Open(CSzFile *p, const char *name); -#endif -#ifdef USE_WINDOWS_FILE -WRes InFile_OpenW(CSzFile *p, const WCHAR *name); -WRes OutFile_OpenW(CSzFile *p, const WCHAR *name); -#endif -WRes File_Close(CSzFile *p); - -/* reads max(*size, remain file's size) bytes */ -WRes File_Read(CSzFile *p, void *data, size_t *size); - -/* writes *size bytes */ -WRes File_Write(CSzFile *p, const void *data, size_t *size); - -WRes File_Seek(CSzFile *p, Int64 *pos, ESzSeek origin); -WRes File_GetLength(CSzFile *p, UInt64 *length); - - -/* ---------- FileInStream ---------- */ - -typedef struct -{ - ISeqInStream vt; - CSzFile file; -} CFileSeqInStream; - -void FileSeqInStream_CreateVTable(CFileSeqInStream *p); - - -typedef struct -{ - ISeekInStream vt; - CSzFile file; -} CFileInStream; - -void FileInStream_CreateVTable(CFileInStream *p); - - -typedef struct -{ - ISeqOutStream vt; - CSzFile file; -} CFileOutStream; - -void FileOutStream_CreateVTable(CFileOutStream *p); - -EXTERN_C_END - -#endif diff --git a/code/ryzom/client/src/seven_zip/7zStream.cpp b/code/ryzom/client/src/seven_zip/7zStream.cpp deleted file mode 100644 index 6b5aa1621..000000000 --- a/code/ryzom/client/src/seven_zip/7zStream.cpp +++ /dev/null @@ -1,176 +0,0 @@ -/* 7zStream.c -- 7z Stream functions -2017-04-03 : Igor Pavlov : Public domain */ - -#include "Precomp.h" - -#include - -#include "7zTypes.h" - -SRes SeqInStream_Read2(const ISeqInStream *stream, void *buf, size_t size, SRes errorType) -{ - while (size != 0) - { - size_t processed = size; - RINOK(ISeqInStream_Read(stream, buf, &processed)); - if (processed == 0) - return errorType; - buf = (void *)((Byte *)buf + processed); - size -= processed; - } - return SZ_OK; -} - -SRes SeqInStream_Read(const ISeqInStream *stream, void *buf, size_t size) -{ - return SeqInStream_Read2(stream, buf, size, SZ_ERROR_INPUT_EOF); -} - -SRes SeqInStream_ReadByte(const ISeqInStream *stream, Byte *buf) -{ - size_t processed = 1; - RINOK(ISeqInStream_Read(stream, buf, &processed)); - return (processed == 1) ? SZ_OK : SZ_ERROR_INPUT_EOF; -} - - - -SRes LookInStream_SeekTo(const ILookInStream *stream, UInt64 offset) -{ - Int64 t = offset; - return ILookInStream_Seek(stream, &t, SZ_SEEK_SET); -} - -SRes LookInStream_LookRead(const ILookInStream *stream, void *buf, size_t *size) -{ - const void *lookBuf; - if (*size == 0) - return SZ_OK; - RINOK(ILookInStream_Look(stream, &lookBuf, size)); - memcpy(buf, lookBuf, *size); - return ILookInStream_Skip(stream, *size); -} - -SRes LookInStream_Read2(const ILookInStream *stream, void *buf, size_t size, SRes errorType) -{ - while (size != 0) - { - size_t processed = size; - RINOK(ILookInStream_Read(stream, buf, &processed)); - if (processed == 0) - return errorType; - buf = (void *)((Byte *)buf + processed); - size -= processed; - } - return SZ_OK; -} - -SRes LookInStream_Read(const ILookInStream *stream, void *buf, size_t size) -{ - return LookInStream_Read2(stream, buf, size, SZ_ERROR_INPUT_EOF); -} - - - -#define GET_LookToRead2 CLookToRead2 *p = CONTAINER_FROM_VTBL(pp, CLookToRead2, vt); - -static SRes LookToRead2_Look_Lookahead(const ILookInStream *pp, const void **buf, size_t *size) -{ - SRes res = SZ_OK; - GET_LookToRead2 - size_t size2 = p->size - p->pos; - if (size2 == 0 && *size != 0) - { - p->pos = 0; - p->size = 0; - size2 = p->bufSize; - res = ISeekInStream_Read(p->realStream, p->buf, &size2); - p->size = size2; - } - if (*size > size2) - *size = size2; - *buf = p->buf + p->pos; - return res; -} - -static SRes LookToRead2_Look_Exact(const ILookInStream *pp, const void **buf, size_t *size) -{ - SRes res = SZ_OK; - GET_LookToRead2 - size_t size2 = p->size - p->pos; - if (size2 == 0 && *size != 0) - { - p->pos = 0; - p->size = 0; - if (*size > p->bufSize) - *size = p->bufSize; - res = ISeekInStream_Read(p->realStream, p->buf, size); - size2 = p->size = *size; - } - if (*size > size2) - *size = size2; - *buf = p->buf + p->pos; - return res; -} - -static SRes LookToRead2_Skip(const ILookInStream *pp, size_t offset) -{ - GET_LookToRead2 - p->pos += offset; - return SZ_OK; -} - -static SRes LookToRead2_Read(const ILookInStream *pp, void *buf, size_t *size) -{ - GET_LookToRead2 - size_t rem = p->size - p->pos; - if (rem == 0) - return ISeekInStream_Read(p->realStream, buf, size); - if (rem > *size) - rem = *size; - memcpy(buf, p->buf + p->pos, rem); - p->pos += rem; - *size = rem; - return SZ_OK; -} - -static SRes LookToRead2_Seek(const ILookInStream *pp, Int64 *pos, ESzSeek origin) -{ - GET_LookToRead2 - p->pos = p->size = 0; - return ISeekInStream_Seek(p->realStream, pos, origin); -} - -void LookToRead2_CreateVTable(CLookToRead2 *p, int lookahead) -{ - p->vt.Look = lookahead ? - LookToRead2_Look_Lookahead : - LookToRead2_Look_Exact; - p->vt.Skip = LookToRead2_Skip; - p->vt.Read = LookToRead2_Read; - p->vt.Seek = LookToRead2_Seek; -} - - - -static SRes SecToLook_Read(const ISeqInStream *pp, void *buf, size_t *size) -{ - CSecToLook *p = CONTAINER_FROM_VTBL(pp, CSecToLook, vt); - return LookInStream_LookRead(p->realStream, buf, size); -} - -void SecToLook_CreateVTable(CSecToLook *p) -{ - p->vt.Read = SecToLook_Read; -} - -static SRes SecToRead_Read(const ISeqInStream *pp, void *buf, size_t *size) -{ - CSecToRead *p = CONTAINER_FROM_VTBL(pp, CSecToRead, vt); - return ILookInStream_Read(p->realStream, buf, size); -} - -void SecToRead_CreateVTable(CSecToRead *p) -{ - p->vt.Read = SecToRead_Read; -} diff --git a/code/ryzom/client/src/seven_zip/7zVersion.h b/code/ryzom/client/src/seven_zip/7zVersion.h deleted file mode 100644 index c176823a4..000000000 --- a/code/ryzom/client/src/seven_zip/7zVersion.h +++ /dev/null @@ -1,27 +0,0 @@ -#define MY_VER_MAJOR 19 -#define MY_VER_MINOR 00 -#define MY_VER_BUILD 0 -#define MY_VERSION_NUMBERS "19.00" -#define MY_VERSION MY_VERSION_NUMBERS - -#ifdef MY_CPU_NAME - #define MY_VERSION_CPU MY_VERSION " (" MY_CPU_NAME ")" -#else - #define MY_VERSION_CPU MY_VERSION -#endif - -#define MY_DATE "2019-02-21" -#undef MY_COPYRIGHT -#undef MY_VERSION_COPYRIGHT_DATE -#define MY_AUTHOR_NAME "Igor Pavlov" -#define MY_COPYRIGHT_PD "Igor Pavlov : Public domain" -#define MY_COPYRIGHT_CR "Copyright (c) 1999-2018 Igor Pavlov" - -#ifdef USE_COPYRIGHT_CR - #define MY_COPYRIGHT MY_COPYRIGHT_CR -#else - #define MY_COPYRIGHT MY_COPYRIGHT_PD -#endif - -#define MY_COPYRIGHT_DATE MY_COPYRIGHT " : " MY_DATE -#define MY_VERSION_COPYRIGHT_DATE MY_VERSION_CPU " : " MY_COPYRIGHT " : " MY_DATE diff --git a/code/ryzom/client/src/seven_zip/7zVersion.rc b/code/ryzom/client/src/seven_zip/7zVersion.rc deleted file mode 100644 index 6ed26de74..000000000 --- a/code/ryzom/client/src/seven_zip/7zVersion.rc +++ /dev/null @@ -1,55 +0,0 @@ -#define MY_VS_FFI_FILEFLAGSMASK 0x0000003FL -#define MY_VOS_NT_WINDOWS32 0x00040004L -#define MY_VOS_CE_WINDOWS32 0x00050004L - -#define MY_VFT_APP 0x00000001L -#define MY_VFT_DLL 0x00000002L - -// #include - -#ifndef MY_VERSION -#include "7zVersion.h" -#endif - -#define MY_VER MY_VER_MAJOR,MY_VER_MINOR,MY_VER_BUILD,0 - -#ifdef DEBUG -#define DBG_FL VS_FF_DEBUG -#else -#define DBG_FL 0 -#endif - -#define MY_VERSION_INFO(fileType, descr, intName, origName) \ -LANGUAGE 9, 1 \ -1 VERSIONINFO \ - FILEVERSION MY_VER \ - PRODUCTVERSION MY_VER \ - FILEFLAGSMASK MY_VS_FFI_FILEFLAGSMASK \ - FILEFLAGS DBG_FL \ - FILEOS MY_VOS_NT_WINDOWS32 \ - FILETYPE fileType \ - FILESUBTYPE 0x0L \ -BEGIN \ - BLOCK "StringFileInfo" \ - BEGIN \ - BLOCK "040904b0" \ - BEGIN \ - VALUE "CompanyName", "Igor Pavlov" \ - VALUE "FileDescription", descr \ - VALUE "FileVersion", MY_VERSION \ - VALUE "InternalName", intName \ - VALUE "LegalCopyright", MY_COPYRIGHT \ - VALUE "OriginalFilename", origName \ - VALUE "ProductName", "7-Zip" \ - VALUE "ProductVersion", MY_VERSION \ - END \ - END \ - BLOCK "VarFileInfo" \ - BEGIN \ - VALUE "Translation", 0x409, 1200 \ - END \ -END - -#define MY_VERSION_INFO_APP(descr, intName) MY_VERSION_INFO(MY_VFT_APP, descr, intName, intName ".exe") - -#define MY_VERSION_INFO_DLL(descr, intName) MY_VERSION_INFO(MY_VFT_DLL, descr, intName, intName ".dll") diff --git a/code/ryzom/client/src/seven_zip/Aes.cpp b/code/ryzom/client/src/seven_zip/Aes.cpp deleted file mode 100644 index 1cdd0e787..000000000 --- a/code/ryzom/client/src/seven_zip/Aes.cpp +++ /dev/null @@ -1,306 +0,0 @@ -/* Aes.c -- AES encryption / decryption -2017-01-24 : Igor Pavlov : Public domain */ - -#include "Precomp.h" - -#include "Aes.h" -#include "CpuArch.h" - -static UInt32 T[256 * 4]; -static const Byte Sbox[256] = { - 0x63, 0x7c, 0x77, 0x7b, 0xf2, 0x6b, 0x6f, 0xc5, 0x30, 0x01, 0x67, 0x2b, 0xfe, 0xd7, 0xab, 0x76, - 0xca, 0x82, 0xc9, 0x7d, 0xfa, 0x59, 0x47, 0xf0, 0xad, 0xd4, 0xa2, 0xaf, 0x9c, 0xa4, 0x72, 0xc0, - 0xb7, 0xfd, 0x93, 0x26, 0x36, 0x3f, 0xf7, 0xcc, 0x34, 0xa5, 0xe5, 0xf1, 0x71, 0xd8, 0x31, 0x15, - 0x04, 0xc7, 0x23, 0xc3, 0x18, 0x96, 0x05, 0x9a, 0x07, 0x12, 0x80, 0xe2, 0xeb, 0x27, 0xb2, 0x75, - 0x09, 0x83, 0x2c, 0x1a, 0x1b, 0x6e, 0x5a, 0xa0, 0x52, 0x3b, 0xd6, 0xb3, 0x29, 0xe3, 0x2f, 0x84, - 0x53, 0xd1, 0x00, 0xed, 0x20, 0xfc, 0xb1, 0x5b, 0x6a, 0xcb, 0xbe, 0x39, 0x4a, 0x4c, 0x58, 0xcf, - 0xd0, 0xef, 0xaa, 0xfb, 0x43, 0x4d, 0x33, 0x85, 0x45, 0xf9, 0x02, 0x7f, 0x50, 0x3c, 0x9f, 0xa8, - 0x51, 0xa3, 0x40, 0x8f, 0x92, 0x9d, 0x38, 0xf5, 0xbc, 0xb6, 0xda, 0x21, 0x10, 0xff, 0xf3, 0xd2, - 0xcd, 0x0c, 0x13, 0xec, 0x5f, 0x97, 0x44, 0x17, 0xc4, 0xa7, 0x7e, 0x3d, 0x64, 0x5d, 0x19, 0x73, - 0x60, 0x81, 0x4f, 0xdc, 0x22, 0x2a, 0x90, 0x88, 0x46, 0xee, 0xb8, 0x14, 0xde, 0x5e, 0x0b, 0xdb, - 0xe0, 0x32, 0x3a, 0x0a, 0x49, 0x06, 0x24, 0x5c, 0xc2, 0xd3, 0xac, 0x62, 0x91, 0x95, 0xe4, 0x79, - 0xe7, 0xc8, 0x37, 0x6d, 0x8d, 0xd5, 0x4e, 0xa9, 0x6c, 0x56, 0xf4, 0xea, 0x65, 0x7a, 0xae, 0x08, - 0xba, 0x78, 0x25, 0x2e, 0x1c, 0xa6, 0xb4, 0xc6, 0xe8, 0xdd, 0x74, 0x1f, 0x4b, 0xbd, 0x8b, 0x8a, - 0x70, 0x3e, 0xb5, 0x66, 0x48, 0x03, 0xf6, 0x0e, 0x61, 0x35, 0x57, 0xb9, 0x86, 0xc1, 0x1d, 0x9e, - 0xe1, 0xf8, 0x98, 0x11, 0x69, 0xd9, 0x8e, 0x94, 0x9b, 0x1e, 0x87, 0xe9, 0xce, 0x55, 0x28, 0xdf, - 0x8c, 0xa1, 0x89, 0x0d, 0xbf, 0xe6, 0x42, 0x68, 0x41, 0x99, 0x2d, 0x0f, 0xb0, 0x54, 0xbb, 0x16}; - -void MY_FAST_CALL AesCbc_Encode(UInt32 *ivAes, Byte *data, size_t numBlocks); -void MY_FAST_CALL AesCbc_Decode(UInt32 *ivAes, Byte *data, size_t numBlocks); -void MY_FAST_CALL AesCtr_Code(UInt32 *ivAes, Byte *data, size_t numBlocks); - -void MY_FAST_CALL AesCbc_Encode_Intel(UInt32 *ivAes, Byte *data, size_t numBlocks); -void MY_FAST_CALL AesCbc_Decode_Intel(UInt32 *ivAes, Byte *data, size_t numBlocks); -void MY_FAST_CALL AesCtr_Code_Intel(UInt32 *ivAes, Byte *data, size_t numBlocks); - -AES_CODE_FUNC g_AesCbc_Encode; -AES_CODE_FUNC g_AesCbc_Decode; -AES_CODE_FUNC g_AesCtr_Code; - -static UInt32 D[256 * 4]; -static Byte InvS[256]; - -static const Byte Rcon[11] = { 0x00, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36 }; - -#define xtime(x) ((((x) << 1) ^ (((x) & 0x80) != 0 ? 0x1B : 0)) & 0xFF) - -#define Ui32(a0, a1, a2, a3) ((UInt32)(a0) | ((UInt32)(a1) << 8) | ((UInt32)(a2) << 16) | ((UInt32)(a3) << 24)) - -#define gb0(x) ( (x) & 0xFF) -#define gb1(x) (((x) >> ( 8)) & 0xFF) -#define gb2(x) (((x) >> (16)) & 0xFF) -#define gb3(x) (((x) >> (24))) - -#define gb(n, x) gb ## n(x) - -#define TT(x) (T + (x << 8)) -#define DD(x) (D + (x << 8)) - - -void AesGenTables(void) -{ - unsigned i; - for (i = 0; i < 256; i++) - InvS[Sbox[i]] = (Byte)i; - - for (i = 0; i < 256; i++) - { - { - UInt32 a1 = Sbox[i]; - UInt32 a2 = xtime(a1); - UInt32 a3 = a2 ^ a1; - TT(0)[i] = Ui32(a2, a1, a1, a3); - TT(1)[i] = Ui32(a3, a2, a1, a1); - TT(2)[i] = Ui32(a1, a3, a2, a1); - TT(3)[i] = Ui32(a1, a1, a3, a2); - } - { - UInt32 a1 = InvS[i]; - UInt32 a2 = xtime(a1); - UInt32 a4 = xtime(a2); - UInt32 a8 = xtime(a4); - UInt32 a9 = a8 ^ a1; - UInt32 aB = a8 ^ a2 ^ a1; - UInt32 aD = a8 ^ a4 ^ a1; - UInt32 aE = a8 ^ a4 ^ a2; - DD(0)[i] = Ui32(aE, a9, aD, aB); - DD(1)[i] = Ui32(aB, aE, a9, aD); - DD(2)[i] = Ui32(aD, aB, aE, a9); - DD(3)[i] = Ui32(a9, aD, aB, aE); - } - } - - g_AesCbc_Encode = AesCbc_Encode; - g_AesCbc_Decode = AesCbc_Decode; - g_AesCtr_Code = AesCtr_Code; - - #ifdef MY_CPU_X86_OR_AMD64 - if (CPU_Is_Aes_Supported()) - { - g_AesCbc_Encode = AesCbc_Encode_Intel; - g_AesCbc_Decode = AesCbc_Decode_Intel; - g_AesCtr_Code = AesCtr_Code_Intel; - } - #endif -} - - -#define HT(i, x, s) TT(x)[gb(x, s[(i + x) & 3])] - -#define HT4(m, i, s, p) m[i] = \ - HT(i, 0, s) ^ \ - HT(i, 1, s) ^ \ - HT(i, 2, s) ^ \ - HT(i, 3, s) ^ w[p + i] - -#define HT16(m, s, p) \ - HT4(m, 0, s, p); \ - HT4(m, 1, s, p); \ - HT4(m, 2, s, p); \ - HT4(m, 3, s, p); \ - -#define FT(i, x) Sbox[gb(x, m[(i + x) & 3])] -#define FT4(i) dest[i] = Ui32(FT(i, 0), FT(i, 1), FT(i, 2), FT(i, 3)) ^ w[i]; - - -#define HD(i, x, s) DD(x)[gb(x, s[(i - x) & 3])] - -#define HD4(m, i, s, p) m[i] = \ - HD(i, 0, s) ^ \ - HD(i, 1, s) ^ \ - HD(i, 2, s) ^ \ - HD(i, 3, s) ^ w[p + i]; - -#define HD16(m, s, p) \ - HD4(m, 0, s, p); \ - HD4(m, 1, s, p); \ - HD4(m, 2, s, p); \ - HD4(m, 3, s, p); \ - -#define FD(i, x) InvS[gb(x, m[(i - x) & 3])] -#define FD4(i) dest[i] = Ui32(FD(i, 0), FD(i, 1), FD(i, 2), FD(i, 3)) ^ w[i]; - -void MY_FAST_CALL Aes_SetKey_Enc(UInt32 *w, const Byte *key, unsigned keySize) -{ - unsigned i, wSize; - wSize = keySize + 28; - keySize /= 4; - w[0] = ((UInt32)keySize / 2) + 3; - w += 4; - - for (i = 0; i < keySize; i++, key += 4) - w[i] = GetUi32(key); - - for (; i < wSize; i++) - { - UInt32 t = w[(size_t)i - 1]; - unsigned rem = i % keySize; - if (rem == 0) - t = Ui32(Sbox[gb1(t)] ^ Rcon[i / keySize], Sbox[gb2(t)], Sbox[gb3(t)], Sbox[gb0(t)]); - else if (keySize > 6 && rem == 4) - t = Ui32(Sbox[gb0(t)], Sbox[gb1(t)], Sbox[gb2(t)], Sbox[gb3(t)]); - w[i] = w[i - keySize] ^ t; - } -} - -void MY_FAST_CALL Aes_SetKey_Dec(UInt32 *w, const Byte *key, unsigned keySize) -{ - unsigned i, num; - Aes_SetKey_Enc(w, key, keySize); - num = keySize + 20; - w += 8; - for (i = 0; i < num; i++) - { - UInt32 r = w[i]; - w[i] = - DD(0)[Sbox[gb0(r)]] ^ - DD(1)[Sbox[gb1(r)]] ^ - DD(2)[Sbox[gb2(r)]] ^ - DD(3)[Sbox[gb3(r)]]; - } -} - -/* Aes_Encode and Aes_Decode functions work with little-endian words. - src and dest are pointers to 4 UInt32 words. - src and dest can point to same block */ - -static void Aes_Encode(const UInt32 *w, UInt32 *dest, const UInt32 *src) -{ - UInt32 s[4]; - UInt32 m[4]; - UInt32 numRounds2 = w[0]; - w += 4; - s[0] = src[0] ^ w[0]; - s[1] = src[1] ^ w[1]; - s[2] = src[2] ^ w[2]; - s[3] = src[3] ^ w[3]; - w += 4; - for (;;) - { - HT16(m, s, 0); - if (--numRounds2 == 0) - break; - HT16(s, m, 4); - w += 8; - } - w += 4; - FT4(0); FT4(1); FT4(2); FT4(3); -} - -static void Aes_Decode(const UInt32 *w, UInt32 *dest, const UInt32 *src) -{ - UInt32 s[4]; - UInt32 m[4]; - UInt32 numRounds2 = w[0]; - w += 4 + numRounds2 * 8; - s[0] = src[0] ^ w[0]; - s[1] = src[1] ^ w[1]; - s[2] = src[2] ^ w[2]; - s[3] = src[3] ^ w[3]; - for (;;) - { - w -= 8; - HD16(m, s, 4); - if (--numRounds2 == 0) - break; - HD16(s, m, 0); - } - FD4(0); FD4(1); FD4(2); FD4(3); -} - -void AesCbc_Init(UInt32 *p, const Byte *iv) -{ - unsigned i; - for (i = 0; i < 4; i++) - p[i] = GetUi32(iv + i * 4); -} - -void MY_FAST_CALL AesCbc_Encode(UInt32 *p, Byte *data, size_t numBlocks) -{ - for (; numBlocks != 0; numBlocks--, data += AES_BLOCK_SIZE) - { - p[0] ^= GetUi32(data); - p[1] ^= GetUi32(data + 4); - p[2] ^= GetUi32(data + 8); - p[3] ^= GetUi32(data + 12); - - Aes_Encode(p + 4, p, p); - - SetUi32(data, p[0]); - SetUi32(data + 4, p[1]); - SetUi32(data + 8, p[2]); - SetUi32(data + 12, p[3]); - } -} - -void MY_FAST_CALL AesCbc_Decode(UInt32 *p, Byte *data, size_t numBlocks) -{ - UInt32 in[4], out[4]; - for (; numBlocks != 0; numBlocks--, data += AES_BLOCK_SIZE) - { - in[0] = GetUi32(data); - in[1] = GetUi32(data + 4); - in[2] = GetUi32(data + 8); - in[3] = GetUi32(data + 12); - - Aes_Decode(p + 4, out, in); - - SetUi32(data, p[0] ^ out[0]); - SetUi32(data + 4, p[1] ^ out[1]); - SetUi32(data + 8, p[2] ^ out[2]); - SetUi32(data + 12, p[3] ^ out[3]); - - p[0] = in[0]; - p[1] = in[1]; - p[2] = in[2]; - p[3] = in[3]; - } -} - -void MY_FAST_CALL AesCtr_Code(UInt32 *p, Byte *data, size_t numBlocks) -{ - for (; numBlocks != 0; numBlocks--) - { - UInt32 temp[4]; - unsigned i; - - if (++p[0] == 0) - p[1]++; - - Aes_Encode(p + 4, temp, p); - - for (i = 0; i < 4; i++, data += 4) - { - UInt32 t = temp[i]; - - #ifdef MY_CPU_LE_UNALIGN - *((UInt32 *)data) ^= t; - #else - data[0] ^= (t & 0xFF); - data[1] ^= ((t >> 8) & 0xFF); - data[2] ^= ((t >> 16) & 0xFF); - data[3] ^= ((t >> 24)); - #endif - } - } -} diff --git a/code/ryzom/client/src/seven_zip/Aes.h b/code/ryzom/client/src/seven_zip/Aes.h deleted file mode 100644 index 64979b5bc..000000000 --- a/code/ryzom/client/src/seven_zip/Aes.h +++ /dev/null @@ -1,38 +0,0 @@ -/* Aes.h -- AES encryption / decryption -2013-01-18 : Igor Pavlov : Public domain */ - -#ifndef __AES_H -#define __AES_H - -#include "7zTypes.h" - -EXTERN_C_BEGIN - -#define AES_BLOCK_SIZE 16 - -/* Call AesGenTables one time before other AES functions */ -void AesGenTables(void); - -/* UInt32 pointers must be 16-byte aligned */ - -/* 16-byte (4 * 32-bit words) blocks: 1 (IV) + 1 (keyMode) + 15 (AES-256 roundKeys) */ -#define AES_NUM_IVMRK_WORDS ((1 + 1 + 15) * 4) - -/* aes - 16-byte aligned pointer to keyMode+roundKeys sequence */ -/* keySize = 16 or 24 or 32 (bytes) */ -typedef void (MY_FAST_CALL *AES_SET_KEY_FUNC)(UInt32 *aes, const Byte *key, unsigned keySize); -void MY_FAST_CALL Aes_SetKey_Enc(UInt32 *aes, const Byte *key, unsigned keySize); -void MY_FAST_CALL Aes_SetKey_Dec(UInt32 *aes, const Byte *key, unsigned keySize); - -/* ivAes - 16-byte aligned pointer to iv+keyMode+roundKeys sequence: UInt32[AES_NUM_IVMRK_WORDS] */ -void AesCbc_Init(UInt32 *ivAes, const Byte *iv); /* iv size is AES_BLOCK_SIZE */ -/* data - 16-byte aligned pointer to data */ -/* numBlocks - the number of 16-byte blocks in data array */ -typedef void (MY_FAST_CALL *AES_CODE_FUNC)(UInt32 *ivAes, Byte *data, size_t numBlocks); -extern AES_CODE_FUNC g_AesCbc_Encode; -extern AES_CODE_FUNC g_AesCbc_Decode; -extern AES_CODE_FUNC g_AesCtr_Code; - -EXTERN_C_END - -#endif diff --git a/code/ryzom/client/src/seven_zip/AesOpt.cpp b/code/ryzom/client/src/seven_zip/AesOpt.cpp deleted file mode 100644 index 9571c467f..000000000 --- a/code/ryzom/client/src/seven_zip/AesOpt.cpp +++ /dev/null @@ -1,184 +0,0 @@ -/* AesOpt.c -- Intel's AES -2017-06-08 : Igor Pavlov : Public domain */ - -#include "Precomp.h" - -#include "CpuArch.h" - -#ifdef MY_CPU_X86_OR_AMD64 -#if (_MSC_VER > 1500) || (_MSC_FULL_VER >= 150030729) -#define USE_INTEL_AES -#endif -#endif - -#ifdef USE_INTEL_AES - -#include - -void MY_FAST_CALL AesCbc_Encode_Intel(__m128i *p, __m128i *data, size_t numBlocks) -{ - __m128i m = *p; - for (; numBlocks != 0; numBlocks--, data++) - { - UInt32 numRounds2 = *(const UInt32 *)(p + 1) - 1; - const __m128i *w = p + 3; - m = _mm_xor_si128(m, *data); - m = _mm_xor_si128(m, p[2]); - do - { - m = _mm_aesenc_si128(m, w[0]); - m = _mm_aesenc_si128(m, w[1]); - w += 2; - } - while (--numRounds2 != 0); - m = _mm_aesenc_si128(m, w[0]); - m = _mm_aesenclast_si128(m, w[1]); - *data = m; - } - *p = m; -} - -#define NUM_WAYS 3 - -#define AES_OP_W(op, n) { \ - const __m128i t = w[n]; \ - m0 = op(m0, t); \ - m1 = op(m1, t); \ - m2 = op(m2, t); \ - } - -#define AES_DEC(n) AES_OP_W(_mm_aesdec_si128, n) -#define AES_DEC_LAST(n) AES_OP_W(_mm_aesdeclast_si128, n) -#define AES_ENC(n) AES_OP_W(_mm_aesenc_si128, n) -#define AES_ENC_LAST(n) AES_OP_W(_mm_aesenclast_si128, n) - -void MY_FAST_CALL AesCbc_Decode_Intel(__m128i *p, __m128i *data, size_t numBlocks) -{ - __m128i iv = *p; - for (; numBlocks >= NUM_WAYS; numBlocks -= NUM_WAYS, data += NUM_WAYS) - { - UInt32 numRounds2 = *(const UInt32 *)(p + 1); - const __m128i *w = p + numRounds2 * 2; - __m128i m0, m1, m2; - { - const __m128i t = w[2]; - m0 = _mm_xor_si128(t, data[0]); - m1 = _mm_xor_si128(t, data[1]); - m2 = _mm_xor_si128(t, data[2]); - } - numRounds2--; - do - { - AES_DEC(1) - AES_DEC(0) - w -= 2; - } - while (--numRounds2 != 0); - AES_DEC(1) - AES_DEC_LAST(0) - - { - __m128i t; - t = _mm_xor_si128(m0, iv); iv = data[0]; data[0] = t; - t = _mm_xor_si128(m1, iv); iv = data[1]; data[1] = t; - t = _mm_xor_si128(m2, iv); iv = data[2]; data[2] = t; - } - } - for (; numBlocks != 0; numBlocks--, data++) - { - UInt32 numRounds2 = *(const UInt32 *)(p + 1); - const __m128i *w = p + numRounds2 * 2; - __m128i m = _mm_xor_si128(w[2], *data); - numRounds2--; - do - { - m = _mm_aesdec_si128(m, w[1]); - m = _mm_aesdec_si128(m, w[0]); - w -= 2; - } - while (--numRounds2 != 0); - m = _mm_aesdec_si128(m, w[1]); - m = _mm_aesdeclast_si128(m, w[0]); - - m = _mm_xor_si128(m, iv); - iv = *data; - *data = m; - } - *p = iv; -} - -void MY_FAST_CALL AesCtr_Code_Intel(__m128i *p, __m128i *data, size_t numBlocks) -{ - __m128i ctr = *p; - __m128i one; - one.m128i_u64[0] = 1; - one.m128i_u64[1] = 0; - for (; numBlocks >= NUM_WAYS; numBlocks -= NUM_WAYS, data += NUM_WAYS) - { - UInt32 numRounds2 = *(const UInt32 *)(p + 1) - 1; - const __m128i *w = p; - __m128i m0, m1, m2; - { - const __m128i t = w[2]; - ctr = _mm_add_epi64(ctr, one); m0 = _mm_xor_si128(ctr, t); - ctr = _mm_add_epi64(ctr, one); m1 = _mm_xor_si128(ctr, t); - ctr = _mm_add_epi64(ctr, one); m2 = _mm_xor_si128(ctr, t); - } - w += 3; - do - { - AES_ENC(0) - AES_ENC(1) - w += 2; - } - while (--numRounds2 != 0); - AES_ENC(0) - AES_ENC_LAST(1) - data[0] = _mm_xor_si128(data[0], m0); - data[1] = _mm_xor_si128(data[1], m1); - data[2] = _mm_xor_si128(data[2], m2); - } - for (; numBlocks != 0; numBlocks--, data++) - { - UInt32 numRounds2 = *(const UInt32 *)(p + 1) - 1; - const __m128i *w = p; - __m128i m; - ctr = _mm_add_epi64(ctr, one); - m = _mm_xor_si128(ctr, p[2]); - w += 3; - do - { - m = _mm_aesenc_si128(m, w[0]); - m = _mm_aesenc_si128(m, w[1]); - w += 2; - } - while (--numRounds2 != 0); - m = _mm_aesenc_si128(m, w[0]); - m = _mm_aesenclast_si128(m, w[1]); - *data = _mm_xor_si128(*data, m); - } - *p = ctr; -} - -#else - -void MY_FAST_CALL AesCbc_Encode(UInt32 *ivAes, Byte *data, size_t numBlocks); -void MY_FAST_CALL AesCbc_Decode(UInt32 *ivAes, Byte *data, size_t numBlocks); -void MY_FAST_CALL AesCtr_Code(UInt32 *ivAes, Byte *data, size_t numBlocks); - -void MY_FAST_CALL AesCbc_Encode_Intel(UInt32 *p, Byte *data, size_t numBlocks) -{ - AesCbc_Encode(p, data, numBlocks); -} - -void MY_FAST_CALL AesCbc_Decode_Intel(UInt32 *p, Byte *data, size_t numBlocks) -{ - AesCbc_Decode(p, data, numBlocks); -} - -void MY_FAST_CALL AesCtr_Code_Intel(UInt32 *p, Byte *data, size_t numBlocks) -{ - AesCtr_Code(p, data, numBlocks); -} - -#endif diff --git a/code/ryzom/client/src/seven_zip/Alloc.cpp b/code/ryzom/client/src/seven_zip/Alloc.cpp deleted file mode 100644 index bcede4b85..000000000 --- a/code/ryzom/client/src/seven_zip/Alloc.cpp +++ /dev/null @@ -1,455 +0,0 @@ -/* Alloc.c -- Memory allocation functions -2018-04-27 : Igor Pavlov : Public domain */ - -#include "Precomp.h" - -#include - -#ifdef _WIN32 -#include -#endif -#include - -#include "Alloc.h" - -/* #define _SZ_ALLOC_DEBUG */ - -/* use _SZ_ALLOC_DEBUG to debug alloc/free operations */ -#ifdef _SZ_ALLOC_DEBUG - -#include -int g_allocCount = 0; -int g_allocCountMid = 0; -int g_allocCountBig = 0; - - -#define CONVERT_INT_TO_STR(charType, tempSize) \ - unsigned char temp[tempSize]; unsigned i = 0; \ - while (val >= 10) { temp[i++] = (unsigned char)('0' + (unsigned)(val % 10)); val /= 10; } \ - *s++ = (charType)('0' + (unsigned)val); \ - while (i != 0) { i--; *s++ = temp[i]; } \ - *s = 0; - -static void ConvertUInt64ToString(UInt64 val, char *s) -{ - CONVERT_INT_TO_STR(char, 24); -} - -#define GET_HEX_CHAR(t) ((char)(((t < 10) ? ('0' + t) : ('A' + (t - 10))))) - -static void ConvertUInt64ToHex(UInt64 val, char *s) -{ - UInt64 v = val; - unsigned i; - for (i = 1;; i++) - { - v >>= 4; - if (v == 0) - break; - } - s[i] = 0; - do - { - unsigned t = (unsigned)(val & 0xF); - val >>= 4; - s[--i] = GET_HEX_CHAR(t); - } - while (i); -} - -#define DEBUG_OUT_STREAM stderr - -static void Print(const char *s) -{ - fputs(s, DEBUG_OUT_STREAM); -} - -static void PrintAligned(const char *s, size_t align) -{ - size_t len = strlen(s); - for(;;) - { - fputc(' ', DEBUG_OUT_STREAM); - if (len >= align) - break; - ++len; - } - Print(s); -} - -static void PrintLn() -{ - Print("\n"); -} - -static void PrintHex(UInt64 v, size_t align) -{ - char s[32]; - ConvertUInt64ToHex(v, s); - PrintAligned(s, align); -} - -static void PrintDec(UInt64 v, size_t align) -{ - char s[32]; - ConvertUInt64ToString(v, s); - PrintAligned(s, align); -} - -static void PrintAddr(void *p) -{ - PrintHex((UInt64)(size_t)(ptrdiff_t)p, 12); -} - - -#define PRINT_ALLOC(name, cnt, size, ptr) \ - Print(name " "); \ - PrintDec(cnt++, 10); \ - PrintHex(size, 10); \ - PrintAddr(ptr); \ - PrintLn(); - -#define PRINT_FREE(name, cnt, ptr) if (ptr) { \ - Print(name " "); \ - PrintDec(--cnt, 10); \ - PrintAddr(ptr); \ - PrintLn(); } - -#else - -#define PRINT_ALLOC(name, cnt, size, ptr) -#define PRINT_FREE(name, cnt, ptr) -#define Print(s) -#define PrintLn() -#define PrintHex(v, align) -#define PrintDec(v, align) -#define PrintAddr(p) - -#endif - - - -void *MyAlloc(size_t size) -{ - if (size == 0) - return NULL; - #ifdef _SZ_ALLOC_DEBUG - { - void *p = malloc(size); - PRINT_ALLOC("Alloc ", g_allocCount, size, p); - return p; - } - #else - return malloc(size); - #endif -} - -void MyFree(void *address) -{ - PRINT_FREE("Free ", g_allocCount, address); - - free(address); -} - -#ifdef _WIN32 - -void *MidAlloc(size_t size) -{ - if (size == 0) - return NULL; - - PRINT_ALLOC("Alloc-Mid", g_allocCountMid, size, NULL); - - return VirtualAlloc(NULL, size, MEM_COMMIT, PAGE_READWRITE); -} - -void MidFree(void *address) -{ - PRINT_FREE("Free-Mid", g_allocCountMid, address); - - if (!address) - return; - VirtualFree(address, 0, MEM_RELEASE); -} - -#ifndef MEM_LARGE_PAGES -#undef _7ZIP_LARGE_PAGES -#endif - -#ifdef _7ZIP_LARGE_PAGES -SIZE_T g_LargePageSize = 0; -typedef SIZE_T (WINAPI *GetLargePageMinimumP)(); -#endif - -void SetLargePageSize() -{ - #ifdef _7ZIP_LARGE_PAGES - SIZE_T size; - GetLargePageMinimumP largePageMinimum = (GetLargePageMinimumP) - GetProcAddress(GetModuleHandle(TEXT("kernel32.dll")), "GetLargePageMinimum"); - if (!largePageMinimum) - return; - size = largePageMinimum(); - if (size == 0 || (size & (size - 1)) != 0) - return; - g_LargePageSize = size; - #endif -} - - -void *BigAlloc(size_t size) -{ - if (size == 0) - return NULL; - - PRINT_ALLOC("Alloc-Big", g_allocCountBig, size, NULL); - - #ifdef _7ZIP_LARGE_PAGES - { - SIZE_T ps = g_LargePageSize; - if (ps != 0 && ps <= (1 << 30) && size > (ps / 2)) - { - size_t size2; - ps--; - size2 = (size + ps) & ~ps; - if (size2 >= size) - { - void *res = VirtualAlloc(NULL, size2, MEM_COMMIT | MEM_LARGE_PAGES, PAGE_READWRITE); - if (res) - return res; - } - } - } - #endif - - return VirtualAlloc(NULL, size, MEM_COMMIT, PAGE_READWRITE); -} - -void BigFree(void *address) -{ - PRINT_FREE("Free-Big", g_allocCountBig, address); - - if (!address) - return; - VirtualFree(address, 0, MEM_RELEASE); -} - -#endif - - -static void *SzAlloc(ISzAllocPtr p, size_t size) { UNUSED_VAR(p); return MyAlloc(size); } -static void SzFree(ISzAllocPtr p, void *address) { UNUSED_VAR(p); MyFree(address); } -const ISzAlloc g_Alloc = { SzAlloc, SzFree }; - -static void *SzMidAlloc(ISzAllocPtr p, size_t size) { UNUSED_VAR(p); return MidAlloc(size); } -static void SzMidFree(ISzAllocPtr p, void *address) { UNUSED_VAR(p); MidFree(address); } -const ISzAlloc g_MidAlloc = { SzMidAlloc, SzMidFree }; - -static void *SzBigAlloc(ISzAllocPtr p, size_t size) { UNUSED_VAR(p); return BigAlloc(size); } -static void SzBigFree(ISzAllocPtr p, void *address) { UNUSED_VAR(p); BigFree(address); } -const ISzAlloc g_BigAlloc = { SzBigAlloc, SzBigFree }; - - -/* - uintptr_t : C99 (optional) - : unsupported in VS6 -*/ - -#ifdef _WIN32 - typedef UINT_PTR UIntPtr; -#else - /* - typedef uintptr_t UIntPtr; - */ - typedef ptrdiff_t UIntPtr; -#endif - - -#define ADJUST_ALLOC_SIZE 0 -/* -#define ADJUST_ALLOC_SIZE (sizeof(void *) - 1) -*/ -/* - Use (ADJUST_ALLOC_SIZE = (sizeof(void *) - 1)), if - MyAlloc() can return address that is NOT multiple of sizeof(void *). -*/ - - -/* -#define MY_ALIGN_PTR_DOWN(p, align) ((void *)((char *)(p) - ((size_t)(UIntPtr)(p) & ((align) - 1)))) -*/ -#define MY_ALIGN_PTR_DOWN(p, align) ((void *)((((UIntPtr)(p)) & ~((UIntPtr)(align) - 1)))) - -#define MY_ALIGN_PTR_UP_PLUS(p, align) MY_ALIGN_PTR_DOWN(((char *)(p) + (align) + ADJUST_ALLOC_SIZE), align) - - -#if (_POSIX_C_SOURCE >= 200112L) && !defined(_WIN32) - #define USE_posix_memalign -#endif - -/* - This posix_memalign() is for test purposes only. - We also need special Free() function instead of free(), - if this posix_memalign() is used. -*/ - -/* -static int posix_memalign(void **ptr, size_t align, size_t size) -{ - size_t newSize = size + align; - void *p; - void *pAligned; - *ptr = NULL; - if (newSize < size) - return 12; // ENOMEM - p = MyAlloc(newSize); - if (!p) - return 12; // ENOMEM - pAligned = MY_ALIGN_PTR_UP_PLUS(p, align); - ((void **)pAligned)[-1] = p; - *ptr = pAligned; - return 0; -} -*/ - -/* - ALLOC_ALIGN_SIZE >= sizeof(void *) - ALLOC_ALIGN_SIZE >= cache_line_size -*/ - -#define ALLOC_ALIGN_SIZE ((size_t)1 << 7) - -static void *SzAlignedAlloc(ISzAllocPtr pp, size_t size) -{ - #ifndef USE_posix_memalign - - void *p; - void *pAligned; - size_t newSize; - UNUSED_VAR(pp); - - /* also we can allocate additional dummy ALLOC_ALIGN_SIZE bytes after aligned - block to prevent cache line sharing with another allocated blocks */ - - newSize = size + ALLOC_ALIGN_SIZE * 1 + ADJUST_ALLOC_SIZE; - if (newSize < size) - return NULL; - - p = MyAlloc(newSize); - - if (!p) - return NULL; - pAligned = MY_ALIGN_PTR_UP_PLUS(p, ALLOC_ALIGN_SIZE); - - Print(" size="); PrintHex(size, 8); - Print(" a_size="); PrintHex(newSize, 8); - Print(" ptr="); PrintAddr(p); - Print(" a_ptr="); PrintAddr(pAligned); - PrintLn(); - - ((void **)pAligned)[-1] = p; - - return pAligned; - - #else - - void *p; - UNUSED_VAR(pp); - if (posix_memalign(&p, ALLOC_ALIGN_SIZE, size)) - return NULL; - - Print(" posix_memalign="); PrintAddr(p); - PrintLn(); - - return p; - - #endif -} - - -static void SzAlignedFree(ISzAllocPtr pp, void *address) -{ - UNUSED_VAR(pp); - #ifndef USE_posix_memalign - if (address) - MyFree(((void **)address)[-1]); - #else - free(address); - #endif -} - - -const ISzAlloc g_AlignedAlloc = { SzAlignedAlloc, SzAlignedFree }; - - - -#define MY_ALIGN_PTR_DOWN_1(p) MY_ALIGN_PTR_DOWN(p, sizeof(void *)) - -/* we align ptr to support cases where CAlignOffsetAlloc::offset is not multiply of sizeof(void *) */ -#define REAL_BLOCK_PTR_VAR(p) ((void **)MY_ALIGN_PTR_DOWN_1(p))[-1] -/* -#define REAL_BLOCK_PTR_VAR(p) ((void **)(p))[-1] -*/ - -static void *AlignOffsetAlloc_Alloc(ISzAllocPtr pp, size_t size) -{ - CAlignOffsetAlloc *p = CONTAINER_FROM_VTBL(pp, CAlignOffsetAlloc, vt); - void *adr; - void *pAligned; - size_t newSize; - size_t extra; - size_t alignSize = (size_t)1 << p->numAlignBits; - - if (alignSize < sizeof(void *)) - alignSize = sizeof(void *); - - if (p->offset >= alignSize) - return NULL; - - /* also we can allocate additional dummy ALLOC_ALIGN_SIZE bytes after aligned - block to prevent cache line sharing with another allocated blocks */ - extra = p->offset & (sizeof(void *) - 1); - newSize = size + alignSize + extra + ADJUST_ALLOC_SIZE; - if (newSize < size) - return NULL; - - adr = ISzAlloc_Alloc(p->baseAlloc, newSize); - - if (!adr) - return NULL; - - pAligned = (char *)MY_ALIGN_PTR_DOWN((char *)adr + - alignSize - p->offset + extra + ADJUST_ALLOC_SIZE, alignSize) + p->offset; - - PrintLn(); - Print("- Aligned: "); - Print(" size="); PrintHex(size, 8); - Print(" a_size="); PrintHex(newSize, 8); - Print(" ptr="); PrintAddr(adr); - Print(" a_ptr="); PrintAddr(pAligned); - PrintLn(); - - REAL_BLOCK_PTR_VAR(pAligned) = adr; - - return pAligned; -} - - -static void AlignOffsetAlloc_Free(ISzAllocPtr pp, void *address) -{ - if (address) - { - CAlignOffsetAlloc *p = CONTAINER_FROM_VTBL(pp, CAlignOffsetAlloc, vt); - PrintLn(); - Print("- Aligned Free: "); - PrintLn(); - ISzAlloc_Free(p->baseAlloc, REAL_BLOCK_PTR_VAR(address)); - } -} - - -void AlignOffsetAlloc_CreateVTable(CAlignOffsetAlloc *p) -{ - p->vt.Alloc = AlignOffsetAlloc_Alloc; - p->vt.Free = AlignOffsetAlloc_Free; -} diff --git a/code/ryzom/client/src/seven_zip/Alloc.h b/code/ryzom/client/src/seven_zip/Alloc.h deleted file mode 100644 index 648237646..000000000 --- a/code/ryzom/client/src/seven_zip/Alloc.h +++ /dev/null @@ -1,51 +0,0 @@ -/* Alloc.h -- Memory allocation functions -2018-02-19 : Igor Pavlov : Public domain */ - -#ifndef __COMMON_ALLOC_H -#define __COMMON_ALLOC_H - -#include "7zTypes.h" - -EXTERN_C_BEGIN - -void *MyAlloc(size_t size); -void MyFree(void *address); - -#ifdef _WIN32 - -void SetLargePageSize(); - -void *MidAlloc(size_t size); -void MidFree(void *address); -void *BigAlloc(size_t size); -void BigFree(void *address); - -#else - -#define MidAlloc(size) MyAlloc(size) -#define MidFree(address) MyFree(address) -#define BigAlloc(size) MyAlloc(size) -#define BigFree(address) MyFree(address) - -#endif - -extern const ISzAlloc g_Alloc; -extern const ISzAlloc g_BigAlloc; -extern const ISzAlloc g_MidAlloc; -extern const ISzAlloc g_AlignedAlloc; - - -typedef struct -{ - ISzAlloc vt; - ISzAllocPtr baseAlloc; - unsigned numAlignBits; /* ((1 << numAlignBits) >= sizeof(void *)) */ - size_t offset; /* (offset == (k * sizeof(void *)) && offset < (1 << numAlignBits) */ -} CAlignOffsetAlloc; - -void AlignOffsetAlloc_CreateVTable(CAlignOffsetAlloc *p); - - -EXTERN_C_END - -#endif diff --git a/code/ryzom/client/src/seven_zip/Bcj2.cpp b/code/ryzom/client/src/seven_zip/Bcj2.cpp deleted file mode 100644 index 9a0046a65..000000000 --- a/code/ryzom/client/src/seven_zip/Bcj2.cpp +++ /dev/null @@ -1,257 +0,0 @@ -/* Bcj2.c -- BCJ2 Decoder (Converter for x86 code) -2018-04-28 : Igor Pavlov : Public domain */ - -#include "Precomp.h" - -#include "Bcj2.h" -#include "CpuArch.h" - -#define CProb UInt16 - -#define kTopValue ((UInt32)1 << 24) -#define kNumModelBits 11 -#define kBitModelTotal (1 << kNumModelBits) -#define kNumMoveBits 5 - -#define _IF_BIT_0 ttt = *prob; bound = (p->range >> kNumModelBits) * ttt; if (p->code < bound) -#define _UPDATE_0 p->range = bound; *prob = (CProb)(ttt + ((kBitModelTotal - ttt) >> kNumMoveBits)); -#define _UPDATE_1 p->range -= bound; p->code -= bound; *prob = (CProb)(ttt - (ttt >> kNumMoveBits)); - -void Bcj2Dec_Init(CBcj2Dec *p) -{ - unsigned i; - - p->state = BCJ2_DEC_STATE_OK; - p->ip = 0; - p->temp[3] = 0; - p->range = 0; - p->code = 0; - for (i = 0; i < sizeof(p->probs) / sizeof(p->probs[0]); i++) - p->probs[i] = kBitModelTotal >> 1; -} - -SRes Bcj2Dec_Decode(CBcj2Dec *p) -{ - if (p->range <= 5) - { - p->state = BCJ2_DEC_STATE_OK; - for (; p->range != 5; p->range++) - { - if (p->range == 1 && p->code != 0) - return SZ_ERROR_DATA; - - if (p->bufs[BCJ2_STREAM_RC] == p->lims[BCJ2_STREAM_RC]) - { - p->state = BCJ2_STREAM_RC; - return SZ_OK; - } - - p->code = (p->code << 8) | *(p->bufs[BCJ2_STREAM_RC])++; - } - - if (p->code == 0xFFFFFFFF) - return SZ_ERROR_DATA; - - p->range = 0xFFFFFFFF; - } - else if (p->state >= BCJ2_DEC_STATE_ORIG_0) - { - while (p->state <= BCJ2_DEC_STATE_ORIG_3) - { - Byte *dest = p->dest; - if (dest == p->destLim) - return SZ_OK; - *dest = p->temp[(size_t)p->state - BCJ2_DEC_STATE_ORIG_0]; - p->state++; - p->dest = dest + 1; - } - } - - /* - if (BCJ2_IS_32BIT_STREAM(p->state)) - { - const Byte *cur = p->bufs[p->state]; - if (cur == p->lims[p->state]) - return SZ_OK; - p->bufs[p->state] = cur + 4; - - { - UInt32 val; - Byte *dest; - SizeT rem; - - p->ip += 4; - val = GetBe32(cur) - p->ip; - dest = p->dest; - rem = p->destLim - dest; - if (rem < 4) - { - SizeT i; - SetUi32(p->temp, val); - for (i = 0; i < rem; i++) - dest[i] = p->temp[i]; - p->dest = dest + rem; - p->state = BCJ2_DEC_STATE_ORIG_0 + (unsigned)rem; - return SZ_OK; - } - SetUi32(dest, val); - p->temp[3] = (Byte)(val >> 24); - p->dest = dest + 4; - p->state = BCJ2_DEC_STATE_OK; - } - } - */ - - for (;;) - { - if (BCJ2_IS_32BIT_STREAM(p->state)) - p->state = BCJ2_DEC_STATE_OK; - else - { - if (p->range < kTopValue) - { - if (p->bufs[BCJ2_STREAM_RC] == p->lims[BCJ2_STREAM_RC]) - { - p->state = BCJ2_STREAM_RC; - return SZ_OK; - } - p->range <<= 8; - p->code = (p->code << 8) | *(p->bufs[BCJ2_STREAM_RC])++; - } - - { - const Byte *src = p->bufs[BCJ2_STREAM_MAIN]; - const Byte *srcLim; - Byte *dest; - SizeT num = p->lims[BCJ2_STREAM_MAIN] - src; - - if (num == 0) - { - p->state = BCJ2_STREAM_MAIN; - return SZ_OK; - } - - dest = p->dest; - if (num > (SizeT)(p->destLim - dest)) - { - num = p->destLim - dest; - if (num == 0) - { - p->state = BCJ2_DEC_STATE_ORIG; - return SZ_OK; - } - } - - srcLim = src + num; - - if (p->temp[3] == 0x0F && (src[0] & 0xF0) == 0x80) - *dest = src[0]; - else for (;;) - { - Byte b = *src; - *dest = b; - if (b != 0x0F) - { - if ((b & 0xFE) == 0xE8) - break; - dest++; - if (++src != srcLim) - continue; - break; - } - dest++; - if (++src == srcLim) - break; - if ((*src & 0xF0) != 0x80) - continue; - *dest = *src; - break; - } - - num = src - p->bufs[BCJ2_STREAM_MAIN]; - - if (src == srcLim) - { - p->temp[3] = src[-1]; - p->bufs[BCJ2_STREAM_MAIN] = src; - p->ip += (UInt32)num; - p->dest += num; - p->state = - p->bufs[BCJ2_STREAM_MAIN] == - p->lims[BCJ2_STREAM_MAIN] ? - (unsigned)BCJ2_STREAM_MAIN : - (unsigned)BCJ2_DEC_STATE_ORIG; - return SZ_OK; - } - - { - UInt32 bound, ttt; - CProb *prob; - Byte b = src[0]; - Byte prev = (Byte)(num == 0 ? p->temp[3] : src[-1]); - - p->temp[3] = b; - p->bufs[BCJ2_STREAM_MAIN] = src + 1; - num++; - p->ip += (UInt32)num; - p->dest += num; - - prob = p->probs + (unsigned)(b == 0xE8 ? 2 + (unsigned)prev : (b == 0xE9 ? 1 : 0)); - - _IF_BIT_0 - { - _UPDATE_0 - continue; - } - _UPDATE_1 - - } - } - } - - { - UInt32 val; - unsigned cj = (p->temp[3] == 0xE8) ? BCJ2_STREAM_CALL : BCJ2_STREAM_JUMP; - const Byte *cur = p->bufs[cj]; - Byte *dest; - SizeT rem; - - if (cur == p->lims[cj]) - { - p->state = cj; - break; - } - - val = GetBe32(cur); - p->bufs[cj] = cur + 4; - - p->ip += 4; - val -= p->ip; - dest = p->dest; - rem = p->destLim - dest; - - if (rem < 4) - { - p->temp[0] = (Byte)val; if (rem > 0) dest[0] = (Byte)val; val >>= 8; - p->temp[1] = (Byte)val; if (rem > 1) dest[1] = (Byte)val; val >>= 8; - p->temp[2] = (Byte)val; if (rem > 2) dest[2] = (Byte)val; val >>= 8; - p->temp[3] = (Byte)val; - p->dest = dest + rem; - p->state = BCJ2_DEC_STATE_ORIG_0 + (unsigned)rem; - break; - } - - SetUi32(dest, val); - p->temp[3] = (Byte)(val >> 24); - p->dest = dest + 4; - } - } - - if (p->range < kTopValue && p->bufs[BCJ2_STREAM_RC] != p->lims[BCJ2_STREAM_RC]) - { - p->range <<= 8; - p->code = (p->code << 8) | *(p->bufs[BCJ2_STREAM_RC])++; - } - - return SZ_OK; -} diff --git a/code/ryzom/client/src/seven_zip/Bcj2.h b/code/ryzom/client/src/seven_zip/Bcj2.h deleted file mode 100644 index 8824080ac..000000000 --- a/code/ryzom/client/src/seven_zip/Bcj2.h +++ /dev/null @@ -1,146 +0,0 @@ -/* Bcj2.h -- BCJ2 Converter for x86 code -2014-11-10 : Igor Pavlov : Public domain */ - -#ifndef __BCJ2_H -#define __BCJ2_H - -#include "7zTypes.h" - -EXTERN_C_BEGIN - -#define BCJ2_NUM_STREAMS 4 - -enum -{ - BCJ2_STREAM_MAIN, - BCJ2_STREAM_CALL, - BCJ2_STREAM_JUMP, - BCJ2_STREAM_RC -}; - -enum -{ - BCJ2_DEC_STATE_ORIG_0 = BCJ2_NUM_STREAMS, - BCJ2_DEC_STATE_ORIG_1, - BCJ2_DEC_STATE_ORIG_2, - BCJ2_DEC_STATE_ORIG_3, - - BCJ2_DEC_STATE_ORIG, - BCJ2_DEC_STATE_OK -}; - -enum -{ - BCJ2_ENC_STATE_ORIG = BCJ2_NUM_STREAMS, - BCJ2_ENC_STATE_OK -}; - - -#define BCJ2_IS_32BIT_STREAM(s) ((s) == BCJ2_STREAM_CALL || (s) == BCJ2_STREAM_JUMP) - -/* -CBcj2Dec / CBcj2Enc -bufs sizes: - BUF_SIZE(n) = lims[n] - bufs[n] -bufs sizes for BCJ2_STREAM_CALL and BCJ2_STREAM_JUMP must be mutliply of 4: - (BUF_SIZE(BCJ2_STREAM_CALL) & 3) == 0 - (BUF_SIZE(BCJ2_STREAM_JUMP) & 3) == 0 -*/ - -/* -CBcj2Dec: -dest is allowed to overlap with bufs[BCJ2_STREAM_MAIN], with the following conditions: - bufs[BCJ2_STREAM_MAIN] >= dest && - bufs[BCJ2_STREAM_MAIN] - dest >= tempReserv + - BUF_SIZE(BCJ2_STREAM_CALL) + - BUF_SIZE(BCJ2_STREAM_JUMP) - tempReserv = 0 : for first call of Bcj2Dec_Decode - tempReserv = 4 : for any other calls of Bcj2Dec_Decode - overlap with offset = 1 is not allowed -*/ - -typedef struct -{ - const Byte *bufs[BCJ2_NUM_STREAMS]; - const Byte *lims[BCJ2_NUM_STREAMS]; - Byte *dest; - const Byte *destLim; - - unsigned state; /* BCJ2_STREAM_MAIN has more priority than BCJ2_STATE_ORIG */ - - UInt32 ip; - Byte temp[4]; - UInt32 range; - UInt32 code; - UInt16 probs[2 + 256]; -} CBcj2Dec; - -void Bcj2Dec_Init(CBcj2Dec *p); - -/* Returns: SZ_OK or SZ_ERROR_DATA */ -SRes Bcj2Dec_Decode(CBcj2Dec *p); - -#define Bcj2Dec_IsFinished(_p_) ((_p_)->code == 0) - - - -typedef enum -{ - BCJ2_ENC_FINISH_MODE_CONTINUE, - BCJ2_ENC_FINISH_MODE_END_BLOCK, - BCJ2_ENC_FINISH_MODE_END_STREAM -} EBcj2Enc_FinishMode; - -typedef struct -{ - Byte *bufs[BCJ2_NUM_STREAMS]; - const Byte *lims[BCJ2_NUM_STREAMS]; - const Byte *src; - const Byte *srcLim; - - unsigned state; - EBcj2Enc_FinishMode finishMode; - - Byte prevByte; - - Byte cache; - UInt32 range; - UInt64 low; - UInt64 cacheSize; - - UInt32 ip; - - /* 32-bit ralative offset in JUMP/CALL commands is - - (mod 4 GB) in 32-bit mode - - signed Int32 in 64-bit mode - We use (mod 4 GB) check for fileSize. - Use fileSize up to 2 GB, if you want to support 32-bit and 64-bit code conversion. */ - UInt32 fileIp; - UInt32 fileSize; /* (fileSize <= ((UInt32)1 << 31)), 0 means no_limit */ - UInt32 relatLimit; /* (relatLimit <= ((UInt32)1 << 31)), 0 means desable_conversion */ - - UInt32 tempTarget; - unsigned tempPos; - Byte temp[4 * 2]; - - unsigned flushPos; - - UInt16 probs[2 + 256]; -} CBcj2Enc; - -void Bcj2Enc_Init(CBcj2Enc *p); -void Bcj2Enc_Encode(CBcj2Enc *p); - -#define Bcj2Enc_Get_InputData_Size(p) ((SizeT)((p)->srcLim - (p)->src) + (p)->tempPos) -#define Bcj2Enc_IsFinished(p) ((p)->flushPos == 5) - - -#define BCJ2_RELAT_LIMIT_NUM_BITS 26 -#define BCJ2_RELAT_LIMIT ((UInt32)1 << BCJ2_RELAT_LIMIT_NUM_BITS) - -/* limit for CBcj2Enc::fileSize variable */ -#define BCJ2_FileSize_MAX ((UInt32)1 << 31) - -EXTERN_C_END - -#endif diff --git a/code/ryzom/client/src/seven_zip/Bcj2Enc.cpp b/code/ryzom/client/src/seven_zip/Bcj2Enc.cpp deleted file mode 100644 index bfbeb8e49..000000000 --- a/code/ryzom/client/src/seven_zip/Bcj2Enc.cpp +++ /dev/null @@ -1,311 +0,0 @@ -/* Bcj2Enc.c -- BCJ2 Encoder (Converter for x86 code) -2019-02-02 : Igor Pavlov : Public domain */ - -#include "Precomp.h" - -/* #define SHOW_STAT */ - -#ifdef SHOW_STAT -#include -#define PRF(x) x -#else -#define PRF(x) -#endif - -#include - -#include "Bcj2.h" -#include "CpuArch.h" - -#define CProb UInt16 - -#define kTopValue ((UInt32)1 << 24) -#define kNumModelBits 11 -#define kBitModelTotal (1 << kNumModelBits) -#define kNumMoveBits 5 - -void Bcj2Enc_Init(CBcj2Enc *p) -{ - unsigned i; - - p->state = BCJ2_ENC_STATE_OK; - p->finishMode = BCJ2_ENC_FINISH_MODE_CONTINUE; - - p->prevByte = 0; - - p->cache = 0; - p->range = 0xFFFFFFFF; - p->low = 0; - p->cacheSize = 1; - - p->ip = 0; - - p->fileIp = 0; - p->fileSize = 0; - p->relatLimit = BCJ2_RELAT_LIMIT; - - p->tempPos = 0; - - p->flushPos = 0; - - for (i = 0; i < sizeof(p->probs) / sizeof(p->probs[0]); i++) - p->probs[i] = kBitModelTotal >> 1; -} - -static BoolInt MY_FAST_CALL RangeEnc_ShiftLow(CBcj2Enc *p) -{ - if ((UInt32)p->low < (UInt32)0xFF000000 || (UInt32)(p->low >> 32) != 0) - { - Byte *buf = p->bufs[BCJ2_STREAM_RC]; - do - { - if (buf == p->lims[BCJ2_STREAM_RC]) - { - p->state = BCJ2_STREAM_RC; - p->bufs[BCJ2_STREAM_RC] = buf; - return True; - } - *buf++ = (Byte)(p->cache + (Byte)(p->low >> 32)); - p->cache = 0xFF; - } - while (--p->cacheSize); - p->bufs[BCJ2_STREAM_RC] = buf; - p->cache = (Byte)((UInt32)p->low >> 24); - } - p->cacheSize++; - p->low = (UInt32)p->low << 8; - return False; -} - -static void Bcj2Enc_Encode_2(CBcj2Enc *p) -{ - if (BCJ2_IS_32BIT_STREAM(p->state)) - { - Byte *cur = p->bufs[p->state]; - if (cur == p->lims[p->state]) - return; - SetBe32(cur, p->tempTarget); - p->bufs[p->state] = cur + 4; - } - - p->state = BCJ2_ENC_STATE_ORIG; - - for (;;) - { - if (p->range < kTopValue) - { - if (RangeEnc_ShiftLow(p)) - return; - p->range <<= 8; - } - - { - { - const Byte *src = p->src; - const Byte *srcLim; - Byte *dest; - SizeT num = p->srcLim - src; - - if (p->finishMode == BCJ2_ENC_FINISH_MODE_CONTINUE) - { - if (num <= 4) - return; - num -= 4; - } - else if (num == 0) - break; - - dest = p->bufs[BCJ2_STREAM_MAIN]; - if (num > (SizeT)(p->lims[BCJ2_STREAM_MAIN] - dest)) - { - num = p->lims[BCJ2_STREAM_MAIN] - dest; - if (num == 0) - { - p->state = BCJ2_STREAM_MAIN; - return; - } - } - - srcLim = src + num; - - if (p->prevByte == 0x0F && (src[0] & 0xF0) == 0x80) - *dest = src[0]; - else for (;;) - { - Byte b = *src; - *dest = b; - if (b != 0x0F) - { - if ((b & 0xFE) == 0xE8) - break; - dest++; - if (++src != srcLim) - continue; - break; - } - dest++; - if (++src == srcLim) - break; - if ((*src & 0xF0) != 0x80) - continue; - *dest = *src; - break; - } - - num = src - p->src; - - if (src == srcLim) - { - p->prevByte = src[-1]; - p->bufs[BCJ2_STREAM_MAIN] = dest; - p->src = src; - p->ip += (UInt32)num; - continue; - } - - { - Byte context = (Byte)(num == 0 ? p->prevByte : src[-1]); - BoolInt needConvert; - - p->bufs[BCJ2_STREAM_MAIN] = dest + 1; - p->ip += (UInt32)num + 1; - src++; - - needConvert = False; - - if ((SizeT)(p->srcLim - src) >= 4) - { - UInt32 relatVal = GetUi32(src); - if ((p->fileSize == 0 || (UInt32)(p->ip + 4 + relatVal - p->fileIp) < p->fileSize) - && ((relatVal + p->relatLimit) >> 1) < p->relatLimit) - needConvert = True; - } - - { - UInt32 bound; - unsigned ttt; - Byte b = src[-1]; - CProb *prob = p->probs + (unsigned)(b == 0xE8 ? 2 + (unsigned)context : (b == 0xE9 ? 1 : 0)); - - ttt = *prob; - bound = (p->range >> kNumModelBits) * ttt; - - if (!needConvert) - { - p->range = bound; - *prob = (CProb)(ttt + ((kBitModelTotal - ttt) >> kNumMoveBits)); - p->src = src; - p->prevByte = b; - continue; - } - - p->low += bound; - p->range -= bound; - *prob = (CProb)(ttt - (ttt >> kNumMoveBits)); - - { - UInt32 relatVal = GetUi32(src); - UInt32 absVal; - p->ip += 4; - absVal = p->ip + relatVal; - p->prevByte = src[3]; - src += 4; - p->src = src; - { - unsigned cj = (b == 0xE8) ? BCJ2_STREAM_CALL : BCJ2_STREAM_JUMP; - Byte *cur = p->bufs[cj]; - if (cur == p->lims[cj]) - { - p->state = cj; - p->tempTarget = absVal; - return; - } - SetBe32(cur, absVal); - p->bufs[cj] = cur + 4; - } - } - } - } - } - } - } - - if (p->finishMode != BCJ2_ENC_FINISH_MODE_END_STREAM) - return; - - for (; p->flushPos < 5; p->flushPos++) - if (RangeEnc_ShiftLow(p)) - return; - p->state = BCJ2_ENC_STATE_OK; -} - - -void Bcj2Enc_Encode(CBcj2Enc *p) -{ - PRF(printf("\n")); - PRF(printf("---- ip = %8d tempPos = %8d src = %8d\n", p->ip, p->tempPos, p->srcLim - p->src)); - - if (p->tempPos != 0) - { - unsigned extra = 0; - - for (;;) - { - const Byte *src = p->src; - const Byte *srcLim = p->srcLim; - EBcj2Enc_FinishMode finishMode = p->finishMode; - - p->src = p->temp; - p->srcLim = p->temp + p->tempPos; - if (src != srcLim) - p->finishMode = BCJ2_ENC_FINISH_MODE_CONTINUE; - - PRF(printf(" ip = %8d tempPos = %8d src = %8d\n", p->ip, p->tempPos, p->srcLim - p->src)); - - Bcj2Enc_Encode_2(p); - - { - unsigned num = (unsigned)(p->src - p->temp); - unsigned tempPos = p->tempPos - num; - unsigned i; - p->tempPos = tempPos; - for (i = 0; i < tempPos; i++) - p->temp[i] = p->temp[(size_t)i + num]; - - p->src = src; - p->srcLim = srcLim; - p->finishMode = finishMode; - - if (p->state != BCJ2_ENC_STATE_ORIG || src == srcLim) - return; - - if (extra >= tempPos) - { - p->src = src - tempPos; - p->tempPos = 0; - break; - } - - p->temp[tempPos] = src[0]; - p->tempPos = tempPos + 1; - p->src = src + 1; - extra++; - } - } - } - - PRF(printf("++++ ip = %8d tempPos = %8d src = %8d\n", p->ip, p->tempPos, p->srcLim - p->src)); - - Bcj2Enc_Encode_2(p); - - if (p->state == BCJ2_ENC_STATE_ORIG) - { - const Byte *src = p->src; - unsigned rem = (unsigned)(p->srcLim - src); - unsigned i; - for (i = 0; i < rem; i++) - p->temp[i] = src[i]; - p->tempPos = rem; - p->src = src + rem; - } -} diff --git a/code/ryzom/client/src/seven_zip/Bra.cpp b/code/ryzom/client/src/seven_zip/Bra.cpp deleted file mode 100644 index aed17e330..000000000 --- a/code/ryzom/client/src/seven_zip/Bra.cpp +++ /dev/null @@ -1,230 +0,0 @@ -/* Bra.c -- Converters for RISC code -2017-04-04 : Igor Pavlov : Public domain */ - -#include "Precomp.h" - -#include "CpuArch.h" -#include "Bra.h" - -SizeT ARM_Convert(Byte *data, SizeT size, UInt32 ip, int encoding) -{ - Byte *p; - const Byte *lim; - size &= ~(size_t)3; - ip += 4; - p = data; - lim = data + size; - - if (encoding) - - for (;;) - { - for (;;) - { - if (p >= lim) - return p - data; - p += 4; - if (p[-1] == 0xEB) - break; - } - { - UInt32 v = GetUi32(p - 4); - v <<= 2; - v += ip + (UInt32)(p - data); - v >>= 2; - v &= 0x00FFFFFF; - v |= 0xEB000000; - SetUi32(p - 4, v); - } - } - - for (;;) - { - for (;;) - { - if (p >= lim) - return p - data; - p += 4; - if (p[-1] == 0xEB) - break; - } - { - UInt32 v = GetUi32(p - 4); - v <<= 2; - v -= ip + (UInt32)(p - data); - v >>= 2; - v &= 0x00FFFFFF; - v |= 0xEB000000; - SetUi32(p - 4, v); - } - } -} - - -SizeT ARMT_Convert(Byte *data, SizeT size, UInt32 ip, int encoding) -{ - Byte *p; - const Byte *lim; - size &= ~(size_t)1; - p = data; - lim = data + size - 4; - - if (encoding) - - for (;;) - { - UInt32 b1; - for (;;) - { - UInt32 b3; - if (p > lim) - return p - data; - b1 = p[1]; - b3 = p[3]; - p += 2; - b1 ^= 8; - if ((b3 & b1) >= 0xF8) - break; - } - { - UInt32 v = - ((UInt32)b1 << 19) - + (((UInt32)p[1] & 0x7) << 8) - + (((UInt32)p[-2] << 11)) - + (p[0]); - - p += 2; - { - UInt32 cur = (ip + (UInt32)(p - data)) >> 1; - v += cur; - } - - p[-4] = (Byte)(v >> 11); - p[-3] = (Byte)(0xF0 | ((v >> 19) & 0x7)); - p[-2] = (Byte)v; - p[-1] = (Byte)(0xF8 | (v >> 8)); - } - } - - for (;;) - { - UInt32 b1; - for (;;) - { - UInt32 b3; - if (p > lim) - return p - data; - b1 = p[1]; - b3 = p[3]; - p += 2; - b1 ^= 8; - if ((b3 & b1) >= 0xF8) - break; - } - { - UInt32 v = - ((UInt32)b1 << 19) - + (((UInt32)p[1] & 0x7) << 8) - + (((UInt32)p[-2] << 11)) - + (p[0]); - - p += 2; - { - UInt32 cur = (ip + (UInt32)(p - data)) >> 1; - v -= cur; - } - - /* - SetUi16(p - 4, (UInt16)(((v >> 11) & 0x7FF) | 0xF000)); - SetUi16(p - 2, (UInt16)(v | 0xF800)); - */ - - p[-4] = (Byte)(v >> 11); - p[-3] = (Byte)(0xF0 | ((v >> 19) & 0x7)); - p[-2] = (Byte)v; - p[-1] = (Byte)(0xF8 | (v >> 8)); - } - } -} - - -SizeT PPC_Convert(Byte *data, SizeT size, UInt32 ip, int encoding) -{ - Byte *p; - const Byte *lim; - size &= ~(size_t)3; - ip -= 4; - p = data; - lim = data + size; - - for (;;) - { - for (;;) - { - if (p >= lim) - return p - data; - p += 4; - /* if ((v & 0xFC000003) == 0x48000001) */ - if ((p[-4] & 0xFC) == 0x48 && (p[-1] & 3) == 1) - break; - } - { - UInt32 v = GetBe32(p - 4); - if (encoding) - v += ip + (UInt32)(p - data); - else - v -= ip + (UInt32)(p - data); - v &= 0x03FFFFFF; - v |= 0x48000000; - SetBe32(p - 4, v); - } - } -} - - -SizeT SPARC_Convert(Byte *data, SizeT size, UInt32 ip, int encoding) -{ - Byte *p; - const Byte *lim; - size &= ~(size_t)3; - ip -= 4; - p = data; - lim = data + size; - - for (;;) - { - for (;;) - { - if (p >= lim) - return p - data; - /* - v = GetBe32(p); - p += 4; - m = v + ((UInt32)5 << 29); - m ^= (UInt32)7 << 29; - m += (UInt32)1 << 22; - if ((m & ((UInt32)0x1FF << 23)) == 0) - break; - */ - p += 4; - if ((p[-4] == 0x40 && (p[-3] & 0xC0) == 0) || - (p[-4] == 0x7F && (p[-3] >= 0xC0))) - break; - } - { - UInt32 v = GetBe32(p - 4); - v <<= 2; - if (encoding) - v += ip + (UInt32)(p - data); - else - v -= ip + (UInt32)(p - data); - - v &= 0x01FFFFFF; - v -= (UInt32)1 << 24; - v ^= 0xFF000000; - v >>= 2; - v |= 0x40000000; - SetBe32(p - 4, v); - } - } -} diff --git a/code/ryzom/client/src/seven_zip/Bra.h b/code/ryzom/client/src/seven_zip/Bra.h deleted file mode 100644 index 855e37a6b..000000000 --- a/code/ryzom/client/src/seven_zip/Bra.h +++ /dev/null @@ -1,64 +0,0 @@ -/* Bra.h -- Branch converters for executables -2013-01-18 : Igor Pavlov : Public domain */ - -#ifndef __BRA_H -#define __BRA_H - -#include "7zTypes.h" - -EXTERN_C_BEGIN - -/* -These functions convert relative addresses to absolute addresses -in CALL instructions to increase the compression ratio. - - In: - data - data buffer - size - size of data - ip - current virtual Instruction Pinter (IP) value - state - state variable for x86 converter - encoding - 0 (for decoding), 1 (for encoding) - - Out: - state - state variable for x86 converter - - Returns: - The number of processed bytes. If you call these functions with multiple calls, - you must start next call with first byte after block of processed bytes. - - Type Endian Alignment LookAhead - - x86 little 1 4 - ARMT little 2 2 - ARM little 4 0 - PPC big 4 0 - SPARC big 4 0 - IA64 little 16 0 - - size must be >= Alignment + LookAhead, if it's not last block. - If (size < Alignment + LookAhead), converter returns 0. - - Example: - - UInt32 ip = 0; - for () - { - ; size must be >= Alignment + LookAhead, if it's not last block - SizeT processed = Convert(data, size, ip, 1); - data += processed; - size -= processed; - ip += processed; - } -*/ - -#define x86_Convert_Init(state) { state = 0; } -SizeT x86_Convert(Byte *data, SizeT size, UInt32 ip, UInt32 *state, int encoding); -SizeT ARM_Convert(Byte *data, SizeT size, UInt32 ip, int encoding); -SizeT ARMT_Convert(Byte *data, SizeT size, UInt32 ip, int encoding); -SizeT PPC_Convert(Byte *data, SizeT size, UInt32 ip, int encoding); -SizeT SPARC_Convert(Byte *data, SizeT size, UInt32 ip, int encoding); -SizeT IA64_Convert(Byte *data, SizeT size, UInt32 ip, int encoding); - -EXTERN_C_END - -#endif diff --git a/code/ryzom/client/src/seven_zip/Bra86.cpp b/code/ryzom/client/src/seven_zip/Bra86.cpp deleted file mode 100644 index 93ed4d762..000000000 --- a/code/ryzom/client/src/seven_zip/Bra86.cpp +++ /dev/null @@ -1,82 +0,0 @@ -/* Bra86.c -- Converter for x86 code (BCJ) -2017-04-03 : Igor Pavlov : Public domain */ - -#include "Precomp.h" - -#include "Bra.h" - -#define Test86MSByte(b) ((((b) + 1) & 0xFE) == 0) - -SizeT x86_Convert(Byte *data, SizeT size, UInt32 ip, UInt32 *state, int encoding) -{ - SizeT pos = 0; - UInt32 mask = *state & 7; - if (size < 5) - return 0; - size -= 4; - ip += 5; - - for (;;) - { - Byte *p = data + pos; - const Byte *limit = data + size; - for (; p < limit; p++) - if ((*p & 0xFE) == 0xE8) - break; - - { - SizeT d = (SizeT)(p - data - pos); - pos = (SizeT)(p - data); - if (p >= limit) - { - *state = (d > 2 ? 0 : mask >> (unsigned)d); - return pos; - } - if (d > 2) - mask = 0; - else - { - mask >>= (unsigned)d; - if (mask != 0 && (mask > 4 || mask == 3 || Test86MSByte(p[(size_t)(mask >> 1) + 1]))) - { - mask = (mask >> 1) | 4; - pos++; - continue; - } - } - } - - if (Test86MSByte(p[4])) - { - UInt32 v = ((UInt32)p[4] << 24) | ((UInt32)p[3] << 16) | ((UInt32)p[2] << 8) | ((UInt32)p[1]); - UInt32 cur = ip + (UInt32)pos; - pos += 5; - if (encoding) - v += cur; - else - v -= cur; - if (mask != 0) - { - unsigned sh = (mask & 6) << 2; - if (Test86MSByte((Byte)(v >> sh))) - { - v ^= (((UInt32)0x100 << sh) - 1); - if (encoding) - v += cur; - else - v -= cur; - } - mask = 0; - } - p[1] = (Byte)v; - p[2] = (Byte)(v >> 8); - p[3] = (Byte)(v >> 16); - p[4] = (Byte)(0 - ((v >> 24) & 1)); - } - else - { - mask = (mask >> 1) | 4; - pos++; - } - } -} diff --git a/code/ryzom/client/src/seven_zip/BraIA64.cpp b/code/ryzom/client/src/seven_zip/BraIA64.cpp deleted file mode 100644 index d1dbc62c5..000000000 --- a/code/ryzom/client/src/seven_zip/BraIA64.cpp +++ /dev/null @@ -1,53 +0,0 @@ -/* BraIA64.c -- Converter for IA-64 code -2017-01-26 : Igor Pavlov : Public domain */ - -#include "Precomp.h" - -#include "CpuArch.h" -#include "Bra.h" - -SizeT IA64_Convert(Byte *data, SizeT size, UInt32 ip, int encoding) -{ - SizeT i; - if (size < 16) - return 0; - size -= 16; - i = 0; - do - { - unsigned m = ((UInt32)0x334B0000 >> (data[i] & 0x1E)) & 3; - if (m) - { - m++; - do - { - Byte *p = data + (i + (size_t)m * 5 - 8); - if (((p[3] >> m) & 15) == 5 - && (((p[-1] | ((UInt32)p[0] << 8)) >> m) & 0x70) == 0) - { - unsigned raw = GetUi32(p); - unsigned v = raw >> m; - v = (v & 0xFFFFF) | ((v & (1 << 23)) >> 3); - - v <<= 4; - if (encoding) - v += ip + (UInt32)i; - else - v -= ip + (UInt32)i; - v >>= 4; - - v &= 0x1FFFFF; - v += 0x700000; - v &= 0x8FFFFF; - raw &= ~((UInt32)0x8FFFFF << m); - raw |= (v << m); - SetUi32(p, raw); - } - } - while (++m <= 4); - } - i += 16; - } - while (i <= size); - return i; -} diff --git a/code/ryzom/client/src/seven_zip/CMakeLists.txt b/code/ryzom/client/src/seven_zip/CMakeLists.txt deleted file mode 100644 index d62750e17..000000000 --- a/code/ryzom/client/src/seven_zip/CMakeLists.txt +++ /dev/null @@ -1,31 +0,0 @@ -INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}) - -FILE(GLOB LIB_SRC *.cpp *.h) - -LIST(REMOVE_ITEM LIB_SRC ${CMAKE_CURRENT_SOURCE_DIR}/7zMain.cpp) - -NL_TARGET_LIB(ryzom_sevenzip ${LIB_SRC}) -TARGET_LINK_LIBRARIES(ryzom_sevenzip ${NELMISC_LIBRARIES}) -NL_DEFAULT_PROPS(ryzom_sevenzip "Ryzom, Library: Seven Zip") -NL_ADD_RUNTIME_FLAGS(ryzom_sevenzip) -NL_ADD_LIB_SUFFIX(ryzom_sevenzip) - -ADD_DEFINITIONS(-DUNICODE -D_UNICODE -D_7ZIP_PPMD_SUPPPORT) - -IF(WITH_PCH) - ADD_NATIVE_PRECOMPILED_HEADER(ryzom_sevenzip ${CMAKE_CURRENT_SOURCE_DIR}/Precomp.h ${CMAKE_CURRENT_SOURCE_DIR}/Precomp.cpp) -ENDIF() - -IF((WITH_INSTALL_LIBRARIES AND WITH_STATIC) OR NOT WITH_STATIC) - INSTALL(TARGETS ryzom_sevenzip LIBRARY DESTINATION ${RYZOM_LIB_PREFIX} ARCHIVE DESTINATION ${RYZOM_LIB_PREFIX} COMPONENT libraries) -ENDIF() - -IF(WITH_RYZOM_TOOLS) - ADD_EXECUTABLE(7zDec ${CMAKE_CURRENT_SOURCE_DIR}/7zMain.cpp) - - TARGET_LINK_LIBRARIES(7zDec ryzom_sevenzip) - NL_DEFAULT_PROPS(7zDec "Ryzom, Tools, Misc: Seven Zip Decoder") - NL_ADD_RUNTIME_FLAGS(7zDec) - - INSTALL(TARGETS 7zDec RUNTIME DESTINATION ${RYZOM_BIN_PREFIX} COMPONENT tools) -ENDIF() diff --git a/code/ryzom/client/src/seven_zip/Compiler.h b/code/ryzom/client/src/seven_zip/Compiler.h deleted file mode 100644 index 0cc409d8a..000000000 --- a/code/ryzom/client/src/seven_zip/Compiler.h +++ /dev/null @@ -1,33 +0,0 @@ -/* Compiler.h -2017-04-03 : Igor Pavlov : Public domain */ - -#ifndef __7Z_COMPILER_H -#define __7Z_COMPILER_H - -#ifdef _MSC_VER - - #ifdef UNDER_CE - #define RPC_NO_WINDOWS_H - /* #pragma warning(disable : 4115) // '_RPC_ASYNC_STATE' : named type definition in parentheses */ - #pragma warning(disable : 4201) // nonstandard extension used : nameless struct/union - #pragma warning(disable : 4214) // nonstandard extension used : bit field types other than int - #endif - - #if _MSC_VER >= 1300 - #pragma warning(disable : 4996) // This function or variable may be unsafe - #else - #pragma warning(disable : 4511) // copy constructor could not be generated - #pragma warning(disable : 4512) // assignment operator could not be generated - #pragma warning(disable : 4514) // unreferenced inline function has been removed - #pragma warning(disable : 4702) // unreachable code - #pragma warning(disable : 4710) // not inlined - #pragma warning(disable : 4714) // function marked as __forceinline not inlined - #pragma warning(disable : 4786) // identifier was truncated to '255' characters in the debug information - #endif - -#endif - -#define UNUSED_VAR(x) (void)x; -/* #define UNUSED_VAR(x) x=x; */ - -#endif diff --git a/code/ryzom/client/src/seven_zip/CpuArch.cpp b/code/ryzom/client/src/seven_zip/CpuArch.cpp deleted file mode 100644 index 02e482e08..000000000 --- a/code/ryzom/client/src/seven_zip/CpuArch.cpp +++ /dev/null @@ -1,218 +0,0 @@ -/* CpuArch.c -- CPU specific code -2018-02-18: Igor Pavlov : Public domain */ - -#include "Precomp.h" - -#include "CpuArch.h" - -#ifdef MY_CPU_X86_OR_AMD64 - -#if (defined(_MSC_VER) && !defined(MY_CPU_AMD64)) || defined(__GNUC__) -#define USE_ASM -#endif - -#if !defined(USE_ASM) && _MSC_VER >= 1500 -#include -#endif - -#if defined(USE_ASM) && !defined(MY_CPU_AMD64) -static UInt32 CheckFlag(UInt32 flag) -{ - #ifdef _MSC_VER - __asm pushfd; - __asm pop EAX; - __asm mov EDX, EAX; - __asm xor EAX, flag; - __asm push EAX; - __asm popfd; - __asm pushfd; - __asm pop EAX; - __asm xor EAX, EDX; - __asm push EDX; - __asm popfd; - __asm and flag, EAX; - #else - __asm__ __volatile__ ( - "pushf\n\t" - "pop %%EAX\n\t" - "movl %%EAX,%%EDX\n\t" - "xorl %0,%%EAX\n\t" - "push %%EAX\n\t" - "popf\n\t" - "pushf\n\t" - "pop %%EAX\n\t" - "xorl %%EDX,%%EAX\n\t" - "push %%EDX\n\t" - "popf\n\t" - "andl %%EAX, %0\n\t": - "=c" (flag) : "c" (flag) : - "%eax", "%edx"); - #endif - return flag; -} -#define CHECK_CPUID_IS_SUPPORTED if (CheckFlag(1 << 18) == 0 || CheckFlag(1 << 21) == 0) return False; -#else -#define CHECK_CPUID_IS_SUPPORTED -#endif - -void MyCPUID(UInt32 function, UInt32 *a, UInt32 *b, UInt32 *c, UInt32 *d) -{ - #ifdef USE_ASM - - #ifdef _MSC_VER - - UInt32 a2, b2, c2, d2; - __asm xor EBX, EBX; - __asm xor ECX, ECX; - __asm xor EDX, EDX; - __asm mov EAX, function; - __asm cpuid; - __asm mov a2, EAX; - __asm mov b2, EBX; - __asm mov c2, ECX; - __asm mov d2, EDX; - - *a = a2; - *b = b2; - *c = c2; - *d = d2; - - #else - - __asm__ __volatile__ ( - #if defined(MY_CPU_AMD64) && defined(__PIC__) - "mov %%rbx, %%rdi;" - "cpuid;" - "xchg %%rbx, %%rdi;" - : "=a" (*a) , - "=D" (*b) , - #elif defined(MY_CPU_X86) && defined(__PIC__) - "mov %%ebx, %%edi;" - "cpuid;" - "xchgl %%ebx, %%edi;" - : "=a" (*a) , - "=D" (*b) , - #else - "cpuid" - : "=a" (*a) , - "=b" (*b) , - #endif - "=c" (*c) , - "=d" (*d) - : "0" (function)) ; - - #endif - - #else - - int CPUInfo[4]; - __cpuid(CPUInfo, function); - *a = CPUInfo[0]; - *b = CPUInfo[1]; - *c = CPUInfo[2]; - *d = CPUInfo[3]; - - #endif -} - -BoolInt x86cpuid_CheckAndRead(Cx86cpuid *p) -{ - CHECK_CPUID_IS_SUPPORTED - MyCPUID(0, &p->maxFunc, &p->vendor[0], &p->vendor[2], &p->vendor[1]); - MyCPUID(1, &p->ver, &p->b, &p->c, &p->d); - return True; -} - -static const UInt32 kVendors[][3] = -{ - { 0x756E6547, 0x49656E69, 0x6C65746E}, - { 0x68747541, 0x69746E65, 0x444D4163}, - { 0x746E6543, 0x48727561, 0x736C7561} -}; - -int x86cpuid_GetFirm(const Cx86cpuid *p) -{ - unsigned i; - for (i = 0; i < sizeof(kVendors) / sizeof(kVendors[i]); i++) - { - const UInt32 *v = kVendors[i]; - if (v[0] == p->vendor[0] && - v[1] == p->vendor[1] && - v[2] == p->vendor[2]) - return (int)i; - } - return -1; -} - -BoolInt CPU_Is_InOrder() -{ - Cx86cpuid p; - int firm; - UInt32 family, model; - if (!x86cpuid_CheckAndRead(&p)) - return True; - - family = x86cpuid_GetFamily(p.ver); - model = x86cpuid_GetModel(p.ver); - - firm = x86cpuid_GetFirm(&p); - - switch (firm) - { - case CPU_FIRM_INTEL: return (family < 6 || (family == 6 && ( - /* In-Order Atom CPU */ - model == 0x1C /* 45 nm, N4xx, D4xx, N5xx, D5xx, 230, 330 */ - || model == 0x26 /* 45 nm, Z6xx */ - || model == 0x27 /* 32 nm, Z2460 */ - || model == 0x35 /* 32 nm, Z2760 */ - || model == 0x36 /* 32 nm, N2xxx, D2xxx */ - ))); - case CPU_FIRM_AMD: return (family < 5 || (family == 5 && (model < 6 || model == 0xA))); - case CPU_FIRM_VIA: return (family < 6 || (family == 6 && model < 0xF)); - } - return True; -} - -#if !defined(MY_CPU_AMD64) && defined(_WIN32) -#include -static BoolInt CPU_Sys_Is_SSE_Supported() -{ - OSVERSIONINFO vi; - vi.dwOSVersionInfoSize = sizeof(vi); - if (!GetVersionEx(&vi)) - return False; - return (vi.dwMajorVersion >= 5); -} -#define CHECK_SYS_SSE_SUPPORT if (!CPU_Sys_Is_SSE_Supported()) return False; -#else -#define CHECK_SYS_SSE_SUPPORT -#endif - -BoolInt CPU_Is_Aes_Supported() -{ - Cx86cpuid p; - CHECK_SYS_SSE_SUPPORT - if (!x86cpuid_CheckAndRead(&p)) - return False; - return (p.c >> 25) & 1; -} - -BoolInt CPU_IsSupported_PageGB() -{ - Cx86cpuid cpuid; - if (!x86cpuid_CheckAndRead(&cpuid)) - return False; - { - UInt32 d[4] = { 0 }; - MyCPUID(0x80000000, &d[0], &d[1], &d[2], &d[3]); - if (d[0] < 0x80000001) - return False; - } - { - UInt32 d[4] = { 0 }; - MyCPUID(0x80000001, &d[0], &d[1], &d[2], &d[3]); - return (d[3] >> 26) & 1; - } -} - -#endif diff --git a/code/ryzom/client/src/seven_zip/CpuArch.h b/code/ryzom/client/src/seven_zip/CpuArch.h deleted file mode 100644 index bd4293880..000000000 --- a/code/ryzom/client/src/seven_zip/CpuArch.h +++ /dev/null @@ -1,336 +0,0 @@ -/* CpuArch.h -- CPU specific code -2018-02-18 : Igor Pavlov : Public domain */ - -#ifndef __CPU_ARCH_H -#define __CPU_ARCH_H - -#include "7zTypes.h" - -EXTERN_C_BEGIN - -/* -MY_CPU_LE means that CPU is LITTLE ENDIAN. -MY_CPU_BE means that CPU is BIG ENDIAN. -If MY_CPU_LE and MY_CPU_BE are not defined, we don't know about ENDIANNESS of platform. - -MY_CPU_LE_UNALIGN means that CPU is LITTLE ENDIAN and CPU supports unaligned memory accesses. -*/ - -#if defined(_M_X64) \ - || defined(_M_AMD64) \ - || defined(__x86_64__) \ - || defined(__AMD64__) \ - || defined(__amd64__) - #define MY_CPU_AMD64 - #ifdef __ILP32__ - #define MY_CPU_NAME "x32" - #else - #define MY_CPU_NAME "x64" - #endif - #define MY_CPU_64BIT -#endif - - -#if defined(_M_IX86) \ - || defined(__i386__) - #define MY_CPU_X86 - #define MY_CPU_NAME "x86" - #define MY_CPU_32BIT -#endif - - -#if defined(_M_ARM64) \ - || defined(__AARCH64EL__) \ - || defined(__AARCH64EB__) \ - || defined(__aarch64__) - #define MY_CPU_ARM64 - #define MY_CPU_NAME "arm64" - #define MY_CPU_64BIT -#endif - - -#if defined(_M_ARM) \ - || defined(_M_ARM_NT) \ - || defined(_M_ARMT) \ - || defined(__arm__) \ - || defined(__thumb__) \ - || defined(__ARMEL__) \ - || defined(__ARMEB__) \ - || defined(__THUMBEL__) \ - || defined(__THUMBEB__) - #define MY_CPU_ARM - #define MY_CPU_NAME "arm" - #define MY_CPU_32BIT -#endif - - -#if defined(_M_IA64) \ - || defined(__ia64__) - #define MY_CPU_IA64 - #define MY_CPU_NAME "ia64" - #define MY_CPU_64BIT -#endif - - -#if defined(__mips64) \ - || defined(__mips64__) \ - || (defined(__mips) && (__mips == 64 || __mips == 4 || __mips == 3)) - #define MY_CPU_NAME "mips64" - #define MY_CPU_64BIT -#elif defined(__mips__) - #define MY_CPU_NAME "mips" - /* #define MY_CPU_32BIT */ -#endif - - -#if defined(__ppc64__) \ - || defined(__powerpc64__) - #ifdef __ILP32__ - #define MY_CPU_NAME "ppc64-32" - #else - #define MY_CPU_NAME "ppc64" - #endif - #define MY_CPU_64BIT -#elif defined(__ppc__) \ - || defined(__powerpc__) - #define MY_CPU_NAME "ppc" - #define MY_CPU_32BIT -#endif - - -#if defined(__sparc64__) - #define MY_CPU_NAME "sparc64" - #define MY_CPU_64BIT -#elif defined(__sparc__) - #define MY_CPU_NAME "sparc" - /* #define MY_CPU_32BIT */ -#endif - - -#if defined(MY_CPU_X86) || defined(MY_CPU_AMD64) -#define MY_CPU_X86_OR_AMD64 -#endif - - -#ifdef _WIN32 - - #ifdef MY_CPU_ARM - #define MY_CPU_ARM_LE - #endif - - #ifdef MY_CPU_ARM64 - #define MY_CPU_ARM64_LE - #endif - - #ifdef _M_IA64 - #define MY_CPU_IA64_LE - #endif - -#endif - - -#if defined(MY_CPU_X86_OR_AMD64) \ - || defined(MY_CPU_ARM_LE) \ - || defined(MY_CPU_ARM64_LE) \ - || defined(MY_CPU_IA64_LE) \ - || defined(__LITTLE_ENDIAN__) \ - || defined(__ARMEL__) \ - || defined(__THUMBEL__) \ - || defined(__AARCH64EL__) \ - || defined(__MIPSEL__) \ - || defined(__MIPSEL) \ - || defined(_MIPSEL) \ - || defined(__BFIN__) \ - || (defined(__BYTE_ORDER__) && (__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__)) - #define MY_CPU_LE -#endif - -#if defined(__BIG_ENDIAN__) \ - || defined(__ARMEB__) \ - || defined(__THUMBEB__) \ - || defined(__AARCH64EB__) \ - || defined(__MIPSEB__) \ - || defined(__MIPSEB) \ - || defined(_MIPSEB) \ - || defined(__m68k__) \ - || defined(__s390__) \ - || defined(__s390x__) \ - || defined(__zarch__) \ - || (defined(__BYTE_ORDER__) && (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__)) - #define MY_CPU_BE -#endif - - -#if defined(MY_CPU_LE) && defined(MY_CPU_BE) - #error Stop_Compiling_Bad_Endian -#endif - - -#if defined(MY_CPU_32BIT) && defined(MY_CPU_64BIT) - #error Stop_Compiling_Bad_32_64_BIT -#endif - - -#ifndef MY_CPU_NAME - #ifdef MY_CPU_LE - #define MY_CPU_NAME "LE" - #elif defined(MY_CPU_BE) - #define MY_CPU_NAME "BE" - #else - /* - #define MY_CPU_NAME "" - */ - #endif -#endif - - - - - -#ifdef MY_CPU_LE - #if defined(MY_CPU_X86_OR_AMD64) \ - || defined(MY_CPU_ARM64) \ - || defined(__ARM_FEATURE_UNALIGNED) - #define MY_CPU_LE_UNALIGN - #endif -#endif - - -#ifdef MY_CPU_LE_UNALIGN - -#define GetUi16(p) (*(const UInt16 *)(const void *)(p)) -#define GetUi32(p) (*(const UInt32 *)(const void *)(p)) -#define GetUi64(p) (*(const UInt64 *)(const void *)(p)) - -#define SetUi16(p, v) { *(UInt16 *)(p) = (v); } -#define SetUi32(p, v) { *(UInt32 *)(p) = (v); } -#define SetUi64(p, v) { *(UInt64 *)(p) = (v); } - -#else - -#define GetUi16(p) ( (UInt16) ( \ - ((const Byte *)(p))[0] | \ - ((UInt16)((const Byte *)(p))[1] << 8) )) - -#define GetUi32(p) ( \ - ((const Byte *)(p))[0] | \ - ((UInt32)((const Byte *)(p))[1] << 8) | \ - ((UInt32)((const Byte *)(p))[2] << 16) | \ - ((UInt32)((const Byte *)(p))[3] << 24)) - -#define GetUi64(p) (GetUi32(p) | ((UInt64)GetUi32(((const Byte *)(p)) + 4) << 32)) - -#define SetUi16(p, v) { Byte *_ppp_ = (Byte *)(p); UInt32 _vvv_ = (v); \ - _ppp_[0] = (Byte)_vvv_; \ - _ppp_[1] = (Byte)(_vvv_ >> 8); } - -#define SetUi32(p, v) { Byte *_ppp_ = (Byte *)(p); UInt32 _vvv_ = (v); \ - _ppp_[0] = (Byte)_vvv_; \ - _ppp_[1] = (Byte)(_vvv_ >> 8); \ - _ppp_[2] = (Byte)(_vvv_ >> 16); \ - _ppp_[3] = (Byte)(_vvv_ >> 24); } - -#define SetUi64(p, v) { Byte *_ppp2_ = (Byte *)(p); UInt64 _vvv2_ = (v); \ - SetUi32(_ppp2_ , (UInt32)_vvv2_); \ - SetUi32(_ppp2_ + 4, (UInt32)(_vvv2_ >> 32)); } - -#endif - -#ifdef __has_builtin - #define MY__has_builtin(x) __has_builtin(x) -#else - #define MY__has_builtin(x) 0 -#endif - -#if defined(MY_CPU_LE_UNALIGN) && /* defined(_WIN64) && */ (_MSC_VER >= 1300) - -/* Note: we use bswap instruction, that is unsupported in 386 cpu */ - -#include - -#pragma intrinsic(_byteswap_ushort) -#pragma intrinsic(_byteswap_ulong) -#pragma intrinsic(_byteswap_uint64) - -/* #define GetBe16(p) _byteswap_ushort(*(const UInt16 *)(const Byte *)(p)) */ -#define GetBe32(p) _byteswap_ulong(*(const UInt32 *)(const Byte *)(p)) -#define GetBe64(p) _byteswap_uint64(*(const UInt64 *)(const Byte *)(p)) - -#define SetBe32(p, v) (*(UInt32 *)(void *)(p)) = _byteswap_ulong(v) - -#elif defined(MY_CPU_LE_UNALIGN) && ( \ - (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))) \ - || (defined(__clang__) && MY__has_builtin(__builtin_bswap16)) ) - -/* #define GetBe16(p) __builtin_bswap16(*(const UInt16 *)(const Byte *)(p)) */ -#define GetBe32(p) __builtin_bswap32(*(const UInt32 *)(const Byte *)(p)) -#define GetBe64(p) __builtin_bswap64(*(const UInt64 *)(const Byte *)(p)) - -#define SetBe32(p, v) (*(UInt32 *)(void *)(p)) = __builtin_bswap32(v) - -#else - -#define GetBe32(p) ( \ - ((UInt32)((const Byte *)(p))[0] << 24) | \ - ((UInt32)((const Byte *)(p))[1] << 16) | \ - ((UInt32)((const Byte *)(p))[2] << 8) | \ - ((const Byte *)(p))[3] ) - -#define GetBe64(p) (((UInt64)GetBe32(p) << 32) | GetBe32(((const Byte *)(p)) + 4)) - -#define SetBe32(p, v) { Byte *_ppp_ = (Byte *)(p); UInt32 _vvv_ = (v); \ - _ppp_[0] = (Byte)(_vvv_ >> 24); \ - _ppp_[1] = (Byte)(_vvv_ >> 16); \ - _ppp_[2] = (Byte)(_vvv_ >> 8); \ - _ppp_[3] = (Byte)_vvv_; } - -#endif - - -#ifndef GetBe16 - -#define GetBe16(p) ( (UInt16) ( \ - ((UInt16)((const Byte *)(p))[0] << 8) | \ - ((const Byte *)(p))[1] )) - -#endif - - - -#ifdef MY_CPU_X86_OR_AMD64 - -typedef struct -{ - UInt32 maxFunc; - UInt32 vendor[3]; - UInt32 ver; - UInt32 b; - UInt32 c; - UInt32 d; -} Cx86cpuid; - -enum -{ - CPU_FIRM_INTEL, - CPU_FIRM_AMD, - CPU_FIRM_VIA -}; - -void MyCPUID(UInt32 function, UInt32 *a, UInt32 *b, UInt32 *c, UInt32 *d); - -BoolInt x86cpuid_CheckAndRead(Cx86cpuid *p); -int x86cpuid_GetFirm(const Cx86cpuid *p); - -#define x86cpuid_GetFamily(ver) (((ver >> 16) & 0xFF0) | ((ver >> 8) & 0xF)) -#define x86cpuid_GetModel(ver) (((ver >> 12) & 0xF0) | ((ver >> 4) & 0xF)) -#define x86cpuid_GetStepping(ver) (ver & 0xF) - -BoolInt CPU_Is_InOrder(); -BoolInt CPU_Is_Aes_Supported(); -BoolInt CPU_IsSupported_PageGB(); - -#endif - -EXTERN_C_END - -#endif diff --git a/code/ryzom/client/src/seven_zip/Delta.cpp b/code/ryzom/client/src/seven_zip/Delta.cpp deleted file mode 100644 index e3edd21ed..000000000 --- a/code/ryzom/client/src/seven_zip/Delta.cpp +++ /dev/null @@ -1,64 +0,0 @@ -/* Delta.c -- Delta converter -2009-05-26 : Igor Pavlov : Public domain */ - -#include "Precomp.h" - -#include "Delta.h" - -void Delta_Init(Byte *state) -{ - unsigned i; - for (i = 0; i < DELTA_STATE_SIZE; i++) - state[i] = 0; -} - -static void MyMemCpy(Byte *dest, const Byte *src, unsigned size) -{ - unsigned i; - for (i = 0; i < size; i++) - dest[i] = src[i]; -} - -void Delta_Encode(Byte *state, unsigned delta, Byte *data, SizeT size) -{ - Byte buf[DELTA_STATE_SIZE]; - unsigned j = 0; - MyMemCpy(buf, state, delta); - { - SizeT i; - for (i = 0; i < size;) - { - for (j = 0; j < delta && i < size; i++, j++) - { - Byte b = data[i]; - data[i] = (Byte)(b - buf[j]); - buf[j] = b; - } - } - } - if (j == delta) - j = 0; - MyMemCpy(state, buf + j, delta - j); - MyMemCpy(state + delta - j, buf, j); -} - -void Delta_Decode(Byte *state, unsigned delta, Byte *data, SizeT size) -{ - Byte buf[DELTA_STATE_SIZE]; - unsigned j = 0; - MyMemCpy(buf, state, delta); - { - SizeT i; - for (i = 0; i < size;) - { - for (j = 0; j < delta && i < size; i++, j++) - { - buf[j] = data[i] = (Byte)(buf[j] + data[i]); - } - } - } - if (j == delta) - j = 0; - MyMemCpy(state, buf + j, delta - j); - MyMemCpy(state + delta - j, buf, j); -} diff --git a/code/ryzom/client/src/seven_zip/Delta.h b/code/ryzom/client/src/seven_zip/Delta.h deleted file mode 100644 index 2fa54ad67..000000000 --- a/code/ryzom/client/src/seven_zip/Delta.h +++ /dev/null @@ -1,19 +0,0 @@ -/* Delta.h -- Delta converter -2013-01-18 : Igor Pavlov : Public domain */ - -#ifndef __DELTA_H -#define __DELTA_H - -#include "7zTypes.h" - -EXTERN_C_BEGIN - -#define DELTA_STATE_SIZE 256 - -void Delta_Init(Byte *state); -void Delta_Encode(Byte *state, unsigned delta, Byte *data, SizeT size); -void Delta_Decode(Byte *state, unsigned delta, Byte *data, SizeT size); - -EXTERN_C_END - -#endif diff --git a/code/ryzom/client/src/seven_zip/LzFind.cpp b/code/ryzom/client/src/seven_zip/LzFind.cpp deleted file mode 100644 index df55e86c1..000000000 --- a/code/ryzom/client/src/seven_zip/LzFind.cpp +++ /dev/null @@ -1,1127 +0,0 @@ -/* LzFind.c -- Match finder for LZ algorithms -2018-07-08 : Igor Pavlov : Public domain */ - -#include "Precomp.h" - -#include - -#include "LzFind.h" -#include "LzHash.h" - -#define kEmptyHashValue 0 -#define kMaxValForNormalize ((UInt32)0xFFFFFFFF) -#define kNormalizeStepMin (1 << 10) /* it must be power of 2 */ -#define kNormalizeMask (~(UInt32)(kNormalizeStepMin - 1)) -#define kMaxHistorySize ((UInt32)7 << 29) - -#define kStartMaxLen 3 - -static void LzInWindow_Free(CMatchFinder *p, ISzAllocPtr alloc) -{ - if (!p->directInput) - { - ISzAlloc_Free(alloc, p->bufferBase); - p->bufferBase = NULL; - } -} - -/* keepSizeBefore + keepSizeAfter + keepSizeReserv must be < 4G) */ - -static int LzInWindow_Create(CMatchFinder *p, UInt32 keepSizeReserv, ISzAllocPtr alloc) -{ - UInt32 blockSize = p->keepSizeBefore + p->keepSizeAfter + keepSizeReserv; - if (p->directInput) - { - p->blockSize = blockSize; - return 1; - } - if (!p->bufferBase || p->blockSize != blockSize) - { - LzInWindow_Free(p, alloc); - p->blockSize = blockSize; - p->bufferBase = (Byte *)ISzAlloc_Alloc(alloc, (size_t)blockSize); - } - return (p->bufferBase != NULL); -} - -Byte *MatchFinder_GetPointerToCurrentPos(CMatchFinder *p) { return p->buffer; } - -UInt32 MatchFinder_GetNumAvailableBytes(CMatchFinder *p) { return p->streamPos - p->pos; } - -void MatchFinder_ReduceOffsets(CMatchFinder *p, UInt32 subValue) -{ - p->posLimit -= subValue; - p->pos -= subValue; - p->streamPos -= subValue; -} - -static void MatchFinder_ReadBlock(CMatchFinder *p) -{ - if (p->streamEndWasReached || p->result != SZ_OK) - return; - - /* We use (p->streamPos - p->pos) value. (p->streamPos < p->pos) is allowed. */ - - if (p->directInput) - { - UInt32 curSize = 0xFFFFFFFF - (p->streamPos - p->pos); - if (curSize > p->directInputRem) - curSize = (UInt32)p->directInputRem; - p->directInputRem -= curSize; - p->streamPos += curSize; - if (p->directInputRem == 0) - p->streamEndWasReached = 1; - return; - } - - for (;;) - { - Byte *dest = p->buffer + (p->streamPos - p->pos); - size_t size = (p->bufferBase + p->blockSize - dest); - if (size == 0) - return; - - p->result = ISeqInStream_Read(p->stream, dest, &size); - if (p->result != SZ_OK) - return; - if (size == 0) - { - p->streamEndWasReached = 1; - return; - } - p->streamPos += (UInt32)size; - if (p->streamPos - p->pos > p->keepSizeAfter) - return; - } -} - -void MatchFinder_MoveBlock(CMatchFinder *p) -{ - memmove(p->bufferBase, - p->buffer - p->keepSizeBefore, - (size_t)(p->streamPos - p->pos) + p->keepSizeBefore); - p->buffer = p->bufferBase + p->keepSizeBefore; -} - -int MatchFinder_NeedMove(CMatchFinder *p) -{ - if (p->directInput) - return 0; - /* if (p->streamEndWasReached) return 0; */ - return ((size_t)(p->bufferBase + p->blockSize - p->buffer) <= p->keepSizeAfter); -} - -void MatchFinder_ReadIfRequired(CMatchFinder *p) -{ - if (p->streamEndWasReached) - return; - if (p->keepSizeAfter >= p->streamPos - p->pos) - MatchFinder_ReadBlock(p); -} - -static void MatchFinder_CheckAndMoveAndRead(CMatchFinder *p) -{ - if (MatchFinder_NeedMove(p)) - MatchFinder_MoveBlock(p); - MatchFinder_ReadBlock(p); -} - -static void MatchFinder_SetDefaultSettings(CMatchFinder *p) -{ - p->cutValue = 32; - p->btMode = 1; - p->numHashBytes = 4; - p->bigHash = 0; -} - -#define kCrcPoly 0xEDB88320 - -void MatchFinder_Construct(CMatchFinder *p) -{ - unsigned i; - p->bufferBase = NULL; - p->directInput = 0; - p->hash = NULL; - p->expectedDataSize = (UInt64)(Int64)-1; - MatchFinder_SetDefaultSettings(p); - - for (i = 0; i < 256; i++) - { - UInt32 r = (UInt32)i; - unsigned j; - for (j = 0; j < 8; j++) - r = (r >> 1) ^ (kCrcPoly & ((UInt32)0 - (r & 1))); - p->crc[i] = r; - } -} - -static void MatchFinder_FreeThisClassMemory(CMatchFinder *p, ISzAllocPtr alloc) -{ - ISzAlloc_Free(alloc, p->hash); - p->hash = NULL; -} - -void MatchFinder_Free(CMatchFinder *p, ISzAllocPtr alloc) -{ - MatchFinder_FreeThisClassMemory(p, alloc); - LzInWindow_Free(p, alloc); -} - -static CLzRef* AllocRefs(size_t num, ISzAllocPtr alloc) -{ - size_t sizeInBytes = (size_t)num * sizeof(CLzRef); - if (sizeInBytes / sizeof(CLzRef) != num) - return NULL; - return (CLzRef *)ISzAlloc_Alloc(alloc, sizeInBytes); -} - -int MatchFinder_Create(CMatchFinder *p, UInt32 historySize, - UInt32 keepAddBufferBefore, UInt32 matchMaxLen, UInt32 keepAddBufferAfter, - ISzAllocPtr alloc) -{ - UInt32 sizeReserv; - - if (historySize > kMaxHistorySize) - { - MatchFinder_Free(p, alloc); - return 0; - } - - sizeReserv = historySize >> 1; - if (historySize >= ((UInt32)3 << 30)) sizeReserv = historySize >> 3; - else if (historySize >= ((UInt32)2 << 30)) sizeReserv = historySize >> 2; - - sizeReserv += (keepAddBufferBefore + matchMaxLen + keepAddBufferAfter) / 2 + (1 << 19); - - p->keepSizeBefore = historySize + keepAddBufferBefore + 1; - p->keepSizeAfter = matchMaxLen + keepAddBufferAfter; - - /* we need one additional byte, since we use MoveBlock after pos++ and before dictionary using */ - - if (LzInWindow_Create(p, sizeReserv, alloc)) - { - UInt32 newCyclicBufferSize = historySize + 1; - UInt32 hs; - p->matchMaxLen = matchMaxLen; - { - p->fixedHashSize = 0; - if (p->numHashBytes == 2) - hs = (1 << 16) - 1; - else - { - hs = historySize; - if (hs > p->expectedDataSize) - hs = (UInt32)p->expectedDataSize; - if (hs != 0) - hs--; - hs |= (hs >> 1); - hs |= (hs >> 2); - hs |= (hs >> 4); - hs |= (hs >> 8); - hs >>= 1; - hs |= 0xFFFF; /* don't change it! It's required for Deflate */ - if (hs > (1 << 24)) - { - if (p->numHashBytes == 3) - hs = (1 << 24) - 1; - else - hs >>= 1; - /* if (bigHash) mode, GetHeads4b() in LzFindMt.c needs (hs >= ((1 << 24) - 1))) */ - } - } - p->hashMask = hs; - hs++; - if (p->numHashBytes > 2) p->fixedHashSize += kHash2Size; - if (p->numHashBytes > 3) p->fixedHashSize += kHash3Size; - if (p->numHashBytes > 4) p->fixedHashSize += kHash4Size; - hs += p->fixedHashSize; - } - - { - size_t newSize; - size_t numSons; - p->historySize = historySize; - p->hashSizeSum = hs; - p->cyclicBufferSize = newCyclicBufferSize; - - numSons = newCyclicBufferSize; - if (p->btMode) - numSons <<= 1; - newSize = hs + numSons; - - if (p->hash && p->numRefs == newSize) - return 1; - - MatchFinder_FreeThisClassMemory(p, alloc); - p->numRefs = newSize; - p->hash = AllocRefs(newSize, alloc); - - if (p->hash) - { - p->son = p->hash + p->hashSizeSum; - return 1; - } - } - } - - MatchFinder_Free(p, alloc); - return 0; -} - -static void MatchFinder_SetLimits(CMatchFinder *p) -{ - UInt32 limit = kMaxValForNormalize - p->pos; - UInt32 limit2 = p->cyclicBufferSize - p->cyclicBufferPos; - - if (limit2 < limit) - limit = limit2; - limit2 = p->streamPos - p->pos; - - if (limit2 <= p->keepSizeAfter) - { - if (limit2 > 0) - limit2 = 1; - } - else - limit2 -= p->keepSizeAfter; - - if (limit2 < limit) - limit = limit2; - - { - UInt32 lenLimit = p->streamPos - p->pos; - if (lenLimit > p->matchMaxLen) - lenLimit = p->matchMaxLen; - p->lenLimit = lenLimit; - } - p->posLimit = p->pos + limit; -} - - -void MatchFinder_Init_LowHash(CMatchFinder *p) -{ - size_t i; - CLzRef *items = p->hash; - size_t numItems = p->fixedHashSize; - for (i = 0; i < numItems; i++) - items[i] = kEmptyHashValue; -} - - -void MatchFinder_Init_HighHash(CMatchFinder *p) -{ - size_t i; - CLzRef *items = p->hash + p->fixedHashSize; - size_t numItems = (size_t)p->hashMask + 1; - for (i = 0; i < numItems; i++) - items[i] = kEmptyHashValue; -} - - -void MatchFinder_Init_3(CMatchFinder *p, int readData) -{ - p->cyclicBufferPos = 0; - p->buffer = p->bufferBase; - p->pos = - p->streamPos = p->cyclicBufferSize; - p->result = SZ_OK; - p->streamEndWasReached = 0; - - if (readData) - MatchFinder_ReadBlock(p); - - MatchFinder_SetLimits(p); -} - - -void MatchFinder_Init(CMatchFinder *p) -{ - MatchFinder_Init_HighHash(p); - MatchFinder_Init_LowHash(p); - MatchFinder_Init_3(p, True); -} - - -static UInt32 MatchFinder_GetSubValue(CMatchFinder *p) -{ - return (p->pos - p->historySize - 1) & kNormalizeMask; -} - -void MatchFinder_Normalize3(UInt32 subValue, CLzRef *items, size_t numItems) -{ - size_t i; - for (i = 0; i < numItems; i++) - { - UInt32 value = items[i]; - if (value <= subValue) - value = kEmptyHashValue; - else - value -= subValue; - items[i] = value; - } -} - -static void MatchFinder_Normalize(CMatchFinder *p) -{ - UInt32 subValue = MatchFinder_GetSubValue(p); - MatchFinder_Normalize3(subValue, p->hash, p->numRefs); - MatchFinder_ReduceOffsets(p, subValue); -} - - -MY_NO_INLINE -static void MatchFinder_CheckLimits(CMatchFinder *p) -{ - if (p->pos == kMaxValForNormalize) - MatchFinder_Normalize(p); - if (!p->streamEndWasReached && p->keepSizeAfter == p->streamPos - p->pos) - MatchFinder_CheckAndMoveAndRead(p); - if (p->cyclicBufferPos == p->cyclicBufferSize) - p->cyclicBufferPos = 0; - MatchFinder_SetLimits(p); -} - - -/* - (lenLimit > maxLen) -*/ -MY_FORCE_INLINE -static UInt32 * Hc_GetMatchesSpec(unsigned lenLimit, UInt32 curMatch, UInt32 pos, const Byte *cur, CLzRef *son, - UInt32 _cyclicBufferPos, UInt32 _cyclicBufferSize, UInt32 cutValue, - UInt32 *distances, unsigned maxLen) -{ - /* - son[_cyclicBufferPos] = curMatch; - for (;;) - { - UInt32 delta = pos - curMatch; - if (cutValue-- == 0 || delta >= _cyclicBufferSize) - return distances; - { - const Byte *pb = cur - delta; - curMatch = son[_cyclicBufferPos - delta + ((delta > _cyclicBufferPos) ? _cyclicBufferSize : 0)]; - if (pb[maxLen] == cur[maxLen] && *pb == *cur) - { - UInt32 len = 0; - while (++len != lenLimit) - if (pb[len] != cur[len]) - break; - if (maxLen < len) - { - maxLen = len; - *distances++ = len; - *distances++ = delta - 1; - if (len == lenLimit) - return distances; - } - } - } - } - */ - - const Byte *lim = cur + lenLimit; - son[_cyclicBufferPos] = curMatch; - do - { - UInt32 delta = pos - curMatch; - if (delta >= _cyclicBufferSize) - break; - { - ptrdiff_t diff; - curMatch = son[_cyclicBufferPos - delta + ((delta > _cyclicBufferPos) ? _cyclicBufferSize : 0)]; - diff = (ptrdiff_t)0 - delta; - if (cur[maxLen] == cur[maxLen + diff]) - { - const Byte *c = cur; - while (*c == c[diff]) - { - if (++c == lim) - { - distances[0] = (UInt32)(lim - cur); - distances[1] = delta - 1; - return distances + 2; - } - } - { - unsigned len = (unsigned)(c - cur); - if (maxLen < len) - { - maxLen = len; - distances[0] = (UInt32)len; - distances[1] = delta - 1; - distances += 2; - } - } - } - } - } - while (--cutValue); - - return distances; -} - - -MY_FORCE_INLINE -UInt32 * GetMatchesSpec1(UInt32 lenLimit, UInt32 curMatch, UInt32 pos, const Byte *cur, CLzRef *son, - UInt32 _cyclicBufferPos, UInt32 _cyclicBufferSize, UInt32 cutValue, - UInt32 *distances, UInt32 maxLen) -{ - CLzRef *ptr0 = son + ((size_t)_cyclicBufferPos << 1) + 1; - CLzRef *ptr1 = son + ((size_t)_cyclicBufferPos << 1); - unsigned len0 = 0, len1 = 0; - for (;;) - { - UInt32 delta = pos - curMatch; - if (cutValue-- == 0 || delta >= _cyclicBufferSize) - { - *ptr0 = *ptr1 = kEmptyHashValue; - return distances; - } - { - CLzRef *pair = son + ((size_t)(_cyclicBufferPos - delta + ((delta > _cyclicBufferPos) ? _cyclicBufferSize : 0)) << 1); - const Byte *pb = cur - delta; - unsigned len = (len0 < len1 ? len0 : len1); - UInt32 pair0 = pair[0]; - if (pb[len] == cur[len]) - { - if (++len != lenLimit && pb[len] == cur[len]) - while (++len != lenLimit) - if (pb[len] != cur[len]) - break; - if (maxLen < len) - { - maxLen = (UInt32)len; - *distances++ = (UInt32)len; - *distances++ = delta - 1; - if (len == lenLimit) - { - *ptr1 = pair0; - *ptr0 = pair[1]; - return distances; - } - } - } - if (pb[len] < cur[len]) - { - *ptr1 = curMatch; - ptr1 = pair + 1; - curMatch = *ptr1; - len1 = len; - } - else - { - *ptr0 = curMatch; - ptr0 = pair; - curMatch = *ptr0; - len0 = len; - } - } - } -} - -static void SkipMatchesSpec(UInt32 lenLimit, UInt32 curMatch, UInt32 pos, const Byte *cur, CLzRef *son, - UInt32 _cyclicBufferPos, UInt32 _cyclicBufferSize, UInt32 cutValue) -{ - CLzRef *ptr0 = son + ((size_t)_cyclicBufferPos << 1) + 1; - CLzRef *ptr1 = son + ((size_t)_cyclicBufferPos << 1); - unsigned len0 = 0, len1 = 0; - for (;;) - { - UInt32 delta = pos - curMatch; - if (cutValue-- == 0 || delta >= _cyclicBufferSize) - { - *ptr0 = *ptr1 = kEmptyHashValue; - return; - } - { - CLzRef *pair = son + ((size_t)(_cyclicBufferPos - delta + ((delta > _cyclicBufferPos) ? _cyclicBufferSize : 0)) << 1); - const Byte *pb = cur - delta; - unsigned len = (len0 < len1 ? len0 : len1); - if (pb[len] == cur[len]) - { - while (++len != lenLimit) - if (pb[len] != cur[len]) - break; - { - if (len == lenLimit) - { - *ptr1 = pair[0]; - *ptr0 = pair[1]; - return; - } - } - } - if (pb[len] < cur[len]) - { - *ptr1 = curMatch; - ptr1 = pair + 1; - curMatch = *ptr1; - len1 = len; - } - else - { - *ptr0 = curMatch; - ptr0 = pair; - curMatch = *ptr0; - len0 = len; - } - } - } -} - -#define MOVE_POS \ - ++p->cyclicBufferPos; \ - p->buffer++; \ - if (++p->pos == p->posLimit) MatchFinder_CheckLimits(p); - -#define MOVE_POS_RET MOVE_POS return (UInt32)offset; - -static void MatchFinder_MovePos(CMatchFinder *p) { MOVE_POS; } - -#define GET_MATCHES_HEADER2(minLen, ret_op) \ - unsigned lenLimit; UInt32 hv; const Byte *cur; UInt32 curMatch; \ - lenLimit = (unsigned)p->lenLimit; { if (lenLimit < minLen) { MatchFinder_MovePos(p); ret_op; }} \ - cur = p->buffer; - -#define GET_MATCHES_HEADER(minLen) GET_MATCHES_HEADER2(minLen, return 0) -#define SKIP_HEADER(minLen) GET_MATCHES_HEADER2(minLen, continue) - -#define MF_PARAMS(p) p->pos, p->buffer, p->son, p->cyclicBufferPos, p->cyclicBufferSize, p->cutValue - -#define GET_MATCHES_FOOTER(offset, maxLen) \ - offset = (unsigned)(GetMatchesSpec1((UInt32)lenLimit, curMatch, MF_PARAMS(p), \ - distances + offset, (UInt32)maxLen) - distances); MOVE_POS_RET; - -#define SKIP_FOOTER \ - SkipMatchesSpec((UInt32)lenLimit, curMatch, MF_PARAMS(p)); MOVE_POS; - -#define UPDATE_maxLen { \ - ptrdiff_t diff = (ptrdiff_t)0 - d2; \ - const Byte *c = cur + maxLen; \ - const Byte *lim = cur + lenLimit; \ - for (; c != lim; c++) if (*(c + diff) != *c) break; \ - maxLen = (unsigned)(c - cur); } - -static UInt32 Bt2_MatchFinder_GetMatches(CMatchFinder *p, UInt32 *distances) -{ - unsigned offset; - GET_MATCHES_HEADER(2) - HASH2_CALC; - curMatch = p->hash[hv]; - p->hash[hv] = p->pos; - offset = 0; - GET_MATCHES_FOOTER(offset, 1) -} - -UInt32 Bt3Zip_MatchFinder_GetMatches(CMatchFinder *p, UInt32 *distances) -{ - unsigned offset; - GET_MATCHES_HEADER(3) - HASH_ZIP_CALC; - curMatch = p->hash[hv]; - p->hash[hv] = p->pos; - offset = 0; - GET_MATCHES_FOOTER(offset, 2) -} - -static UInt32 Bt3_MatchFinder_GetMatches(CMatchFinder *p, UInt32 *distances) -{ - UInt32 h2, d2, pos; - unsigned maxLen, offset; - UInt32 *hash; - GET_MATCHES_HEADER(3) - - HASH3_CALC; - - hash = p->hash; - pos = p->pos; - - d2 = pos - hash[h2]; - - curMatch = (hash + kFix3HashSize)[hv]; - - hash[h2] = pos; - (hash + kFix3HashSize)[hv] = pos; - - maxLen = 2; - offset = 0; - - if (d2 < p->cyclicBufferSize && *(cur - d2) == *cur) - { - UPDATE_maxLen - distances[0] = (UInt32)maxLen; - distances[1] = d2 - 1; - offset = 2; - if (maxLen == lenLimit) - { - SkipMatchesSpec((UInt32)lenLimit, curMatch, MF_PARAMS(p)); - MOVE_POS_RET; - } - } - - GET_MATCHES_FOOTER(offset, maxLen) -} - -static UInt32 Bt4_MatchFinder_GetMatches(CMatchFinder *p, UInt32 *distances) -{ - UInt32 h2, h3, d2, d3, pos; - unsigned maxLen, offset; - UInt32 *hash; - GET_MATCHES_HEADER(4) - - HASH4_CALC; - - hash = p->hash; - pos = p->pos; - - d2 = pos - hash [h2]; - d3 = pos - (hash + kFix3HashSize)[h3]; - - curMatch = (hash + kFix4HashSize)[hv]; - - hash [h2] = pos; - (hash + kFix3HashSize)[h3] = pos; - (hash + kFix4HashSize)[hv] = pos; - - maxLen = 0; - offset = 0; - - if (d2 < p->cyclicBufferSize && *(cur - d2) == *cur) - { - maxLen = 2; - distances[0] = 2; - distances[1] = d2 - 1; - offset = 2; - } - - if (d2 != d3 && d3 < p->cyclicBufferSize && *(cur - d3) == *cur) - { - maxLen = 3; - distances[(size_t)offset + 1] = d3 - 1; - offset += 2; - d2 = d3; - } - - if (offset != 0) - { - UPDATE_maxLen - distances[(size_t)offset - 2] = (UInt32)maxLen; - if (maxLen == lenLimit) - { - SkipMatchesSpec((UInt32)lenLimit, curMatch, MF_PARAMS(p)); - MOVE_POS_RET; - } - } - - if (maxLen < 3) - maxLen = 3; - - GET_MATCHES_FOOTER(offset, maxLen) -} - -/* -static UInt32 Bt5_MatchFinder_GetMatches(CMatchFinder *p, UInt32 *distances) -{ - UInt32 h2, h3, h4, d2, d3, d4, maxLen, offset, pos; - UInt32 *hash; - GET_MATCHES_HEADER(5) - - HASH5_CALC; - - hash = p->hash; - pos = p->pos; - - d2 = pos - hash [h2]; - d3 = pos - (hash + kFix3HashSize)[h3]; - d4 = pos - (hash + kFix4HashSize)[h4]; - - curMatch = (hash + kFix5HashSize)[hv]; - - hash [h2] = pos; - (hash + kFix3HashSize)[h3] = pos; - (hash + kFix4HashSize)[h4] = pos; - (hash + kFix5HashSize)[hv] = pos; - - maxLen = 0; - offset = 0; - - if (d2 < p->cyclicBufferSize && *(cur - d2) == *cur) - { - distances[0] = maxLen = 2; - distances[1] = d2 - 1; - offset = 2; - if (*(cur - d2 + 2) == cur[2]) - distances[0] = maxLen = 3; - else if (d3 < p->cyclicBufferSize && *(cur - d3) == *cur) - { - distances[2] = maxLen = 3; - distances[3] = d3 - 1; - offset = 4; - d2 = d3; - } - } - else if (d3 < p->cyclicBufferSize && *(cur - d3) == *cur) - { - distances[0] = maxLen = 3; - distances[1] = d3 - 1; - offset = 2; - d2 = d3; - } - - if (d2 != d4 && d4 < p->cyclicBufferSize - && *(cur - d4) == *cur - && *(cur - d4 + 3) == *(cur + 3)) - { - maxLen = 4; - distances[(size_t)offset + 1] = d4 - 1; - offset += 2; - d2 = d4; - } - - if (offset != 0) - { - UPDATE_maxLen - distances[(size_t)offset - 2] = maxLen; - if (maxLen == lenLimit) - { - SkipMatchesSpec(lenLimit, curMatch, MF_PARAMS(p)); - MOVE_POS_RET; - } - } - - if (maxLen < 4) - maxLen = 4; - - GET_MATCHES_FOOTER(offset, maxLen) -} -*/ - -static UInt32 Hc4_MatchFinder_GetMatches(CMatchFinder *p, UInt32 *distances) -{ - UInt32 h2, h3, d2, d3, pos; - unsigned maxLen, offset; - UInt32 *hash; - GET_MATCHES_HEADER(4) - - HASH4_CALC; - - hash = p->hash; - pos = p->pos; - - d2 = pos - hash [h2]; - d3 = pos - (hash + kFix3HashSize)[h3]; - curMatch = (hash + kFix4HashSize)[hv]; - - hash [h2] = pos; - (hash + kFix3HashSize)[h3] = pos; - (hash + kFix4HashSize)[hv] = pos; - - maxLen = 0; - offset = 0; - - if (d2 < p->cyclicBufferSize && *(cur - d2) == *cur) - { - maxLen = 2; - distances[0] = 2; - distances[1] = d2 - 1; - offset = 2; - } - - if (d2 != d3 && d3 < p->cyclicBufferSize && *(cur - d3) == *cur) - { - maxLen = 3; - distances[(size_t)offset + 1] = d3 - 1; - offset += 2; - d2 = d3; - } - - if (offset != 0) - { - UPDATE_maxLen - distances[(size_t)offset - 2] = (UInt32)maxLen; - if (maxLen == lenLimit) - { - p->son[p->cyclicBufferPos] = curMatch; - MOVE_POS_RET; - } - } - - if (maxLen < 3) - maxLen = 3; - - offset = (unsigned)(Hc_GetMatchesSpec(lenLimit, curMatch, MF_PARAMS(p), - distances + offset, maxLen) - (distances)); - MOVE_POS_RET -} - -/* -static UInt32 Hc5_MatchFinder_GetMatches(CMatchFinder *p, UInt32 *distances) -{ - UInt32 h2, h3, h4, d2, d3, d4, maxLen, offset, pos - UInt32 *hash; - GET_MATCHES_HEADER(5) - - HASH5_CALC; - - hash = p->hash; - pos = p->pos; - - d2 = pos - hash [h2]; - d3 = pos - (hash + kFix3HashSize)[h3]; - d4 = pos - (hash + kFix4HashSize)[h4]; - - curMatch = (hash + kFix5HashSize)[hv]; - - hash [h2] = pos; - (hash + kFix3HashSize)[h3] = pos; - (hash + kFix4HashSize)[h4] = pos; - (hash + kFix5HashSize)[hv] = pos; - - maxLen = 0; - offset = 0; - - if (d2 < p->cyclicBufferSize && *(cur - d2) == *cur) - { - distances[0] = maxLen = 2; - distances[1] = d2 - 1; - offset = 2; - if (*(cur - d2 + 2) == cur[2]) - distances[0] = maxLen = 3; - else if (d3 < p->cyclicBufferSize && *(cur - d3) == *cur) - { - distances[2] = maxLen = 3; - distances[3] = d3 - 1; - offset = 4; - d2 = d3; - } - } - else if (d3 < p->cyclicBufferSize && *(cur - d3) == *cur) - { - distances[0] = maxLen = 3; - distances[1] = d3 - 1; - offset = 2; - d2 = d3; - } - - if (d2 != d4 && d4 < p->cyclicBufferSize - && *(cur - d4) == *cur - && *(cur - d4 + 3) == *(cur + 3)) - { - maxLen = 4; - distances[(size_t)offset + 1] = d4 - 1; - offset += 2; - d2 = d4; - } - - if (offset != 0) - { - UPDATE_maxLen - distances[(size_t)offset - 2] = maxLen; - if (maxLen == lenLimit) - { - p->son[p->cyclicBufferPos] = curMatch; - MOVE_POS_RET; - } - } - - if (maxLen < 4) - maxLen = 4; - - offset = (UInt32)(Hc_GetMatchesSpec(lenLimit, curMatch, MF_PARAMS(p), - distances + offset, maxLen) - (distances)); - MOVE_POS_RET -} -*/ - -UInt32 Hc3Zip_MatchFinder_GetMatches(CMatchFinder *p, UInt32 *distances) -{ - unsigned offset; - GET_MATCHES_HEADER(3) - HASH_ZIP_CALC; - curMatch = p->hash[hv]; - p->hash[hv] = p->pos; - offset = (unsigned)(Hc_GetMatchesSpec(lenLimit, curMatch, MF_PARAMS(p), - distances, 2) - (distances)); - MOVE_POS_RET -} - -static void Bt2_MatchFinder_Skip(CMatchFinder *p, UInt32 num) -{ - do - { - SKIP_HEADER(2) - HASH2_CALC; - curMatch = p->hash[hv]; - p->hash[hv] = p->pos; - SKIP_FOOTER - } - while (--num != 0); -} - -void Bt3Zip_MatchFinder_Skip(CMatchFinder *p, UInt32 num) -{ - do - { - SKIP_HEADER(3) - HASH_ZIP_CALC; - curMatch = p->hash[hv]; - p->hash[hv] = p->pos; - SKIP_FOOTER - } - while (--num != 0); -} - -static void Bt3_MatchFinder_Skip(CMatchFinder *p, UInt32 num) -{ - do - { - UInt32 h2; - UInt32 *hash; - SKIP_HEADER(3) - HASH3_CALC; - hash = p->hash; - curMatch = (hash + kFix3HashSize)[hv]; - hash[h2] = - (hash + kFix3HashSize)[hv] = p->pos; - SKIP_FOOTER - } - while (--num != 0); -} - -static void Bt4_MatchFinder_Skip(CMatchFinder *p, UInt32 num) -{ - do - { - UInt32 h2, h3; - UInt32 *hash; - SKIP_HEADER(4) - HASH4_CALC; - hash = p->hash; - curMatch = (hash + kFix4HashSize)[hv]; - hash [h2] = - (hash + kFix3HashSize)[h3] = - (hash + kFix4HashSize)[hv] = p->pos; - SKIP_FOOTER - } - while (--num != 0); -} - -/* -static void Bt5_MatchFinder_Skip(CMatchFinder *p, UInt32 num) -{ - do - { - UInt32 h2, h3, h4; - UInt32 *hash; - SKIP_HEADER(5) - HASH5_CALC; - hash = p->hash; - curMatch = (hash + kFix5HashSize)[hv]; - hash [h2] = - (hash + kFix3HashSize)[h3] = - (hash + kFix4HashSize)[h4] = - (hash + kFix5HashSize)[hv] = p->pos; - SKIP_FOOTER - } - while (--num != 0); -} -*/ - -static void Hc4_MatchFinder_Skip(CMatchFinder *p, UInt32 num) -{ - do - { - UInt32 h2, h3; - UInt32 *hash; - SKIP_HEADER(4) - HASH4_CALC; - hash = p->hash; - curMatch = (hash + kFix4HashSize)[hv]; - hash [h2] = - (hash + kFix3HashSize)[h3] = - (hash + kFix4HashSize)[hv] = p->pos; - p->son[p->cyclicBufferPos] = curMatch; - MOVE_POS - } - while (--num != 0); -} - -/* -static void Hc5_MatchFinder_Skip(CMatchFinder *p, UInt32 num) -{ - do - { - UInt32 h2, h3, h4; - UInt32 *hash; - SKIP_HEADER(5) - HASH5_CALC; - hash = p->hash; - curMatch = hash + kFix5HashSize)[hv]; - hash [h2] = - (hash + kFix3HashSize)[h3] = - (hash + kFix4HashSize)[h4] = - (hash + kFix5HashSize)[hv] = p->pos; - p->son[p->cyclicBufferPos] = curMatch; - MOVE_POS - } - while (--num != 0); -} -*/ - -void Hc3Zip_MatchFinder_Skip(CMatchFinder *p, UInt32 num) -{ - do - { - SKIP_HEADER(3) - HASH_ZIP_CALC; - curMatch = p->hash[hv]; - p->hash[hv] = p->pos; - p->son[p->cyclicBufferPos] = curMatch; - MOVE_POS - } - while (--num != 0); -} - -void MatchFinder_CreateVTable(CMatchFinder *p, IMatchFinder *vTable) -{ - vTable->Init = (Mf_Init_Func)MatchFinder_Init; - vTable->GetNumAvailableBytes = (Mf_GetNumAvailableBytes_Func)MatchFinder_GetNumAvailableBytes; - vTable->GetPointerToCurrentPos = (Mf_GetPointerToCurrentPos_Func)MatchFinder_GetPointerToCurrentPos; - if (!p->btMode) - { - /* if (p->numHashBytes <= 4) */ - { - vTable->GetMatches = (Mf_GetMatches_Func)Hc4_MatchFinder_GetMatches; - vTable->Skip = (Mf_Skip_Func)Hc4_MatchFinder_Skip; - } - /* - else - { - vTable->GetMatches = (Mf_GetMatches_Func)Hc5_MatchFinder_GetMatches; - vTable->Skip = (Mf_Skip_Func)Hc5_MatchFinder_Skip; - } - */ - } - else if (p->numHashBytes == 2) - { - vTable->GetMatches = (Mf_GetMatches_Func)Bt2_MatchFinder_GetMatches; - vTable->Skip = (Mf_Skip_Func)Bt2_MatchFinder_Skip; - } - else if (p->numHashBytes == 3) - { - vTable->GetMatches = (Mf_GetMatches_Func)Bt3_MatchFinder_GetMatches; - vTable->Skip = (Mf_Skip_Func)Bt3_MatchFinder_Skip; - } - else /* if (p->numHashBytes == 4) */ - { - vTable->GetMatches = (Mf_GetMatches_Func)Bt4_MatchFinder_GetMatches; - vTable->Skip = (Mf_Skip_Func)Bt4_MatchFinder_Skip; - } - /* - else - { - vTable->GetMatches = (Mf_GetMatches_Func)Bt5_MatchFinder_GetMatches; - vTable->Skip = (Mf_Skip_Func)Bt5_MatchFinder_Skip; - } - */ -} diff --git a/code/ryzom/client/src/seven_zip/LzFind.h b/code/ryzom/client/src/seven_zip/LzFind.h deleted file mode 100644 index 42c13be15..000000000 --- a/code/ryzom/client/src/seven_zip/LzFind.h +++ /dev/null @@ -1,121 +0,0 @@ -/* LzFind.h -- Match finder for LZ algorithms -2017-06-10 : Igor Pavlov : Public domain */ - -#ifndef __LZ_FIND_H -#define __LZ_FIND_H - -#include "7zTypes.h" - -EXTERN_C_BEGIN - -typedef UInt32 CLzRef; - -typedef struct _CMatchFinder -{ - Byte *buffer; - UInt32 pos; - UInt32 posLimit; - UInt32 streamPos; - UInt32 lenLimit; - - UInt32 cyclicBufferPos; - UInt32 cyclicBufferSize; /* it must be = (historySize + 1) */ - - Byte streamEndWasReached; - Byte btMode; - Byte bigHash; - Byte directInput; - - UInt32 matchMaxLen; - CLzRef *hash; - CLzRef *son; - UInt32 hashMask; - UInt32 cutValue; - - Byte *bufferBase; - ISeqInStream *stream; - - UInt32 blockSize; - UInt32 keepSizeBefore; - UInt32 keepSizeAfter; - - UInt32 numHashBytes; - size_t directInputRem; - UInt32 historySize; - UInt32 fixedHashSize; - UInt32 hashSizeSum; - SRes result; - UInt32 crc[256]; - size_t numRefs; - - UInt64 expectedDataSize; -} CMatchFinder; - -#define Inline_MatchFinder_GetPointerToCurrentPos(p) ((p)->buffer) - -#define Inline_MatchFinder_GetNumAvailableBytes(p) ((p)->streamPos - (p)->pos) - -#define Inline_MatchFinder_IsFinishedOK(p) \ - ((p)->streamEndWasReached \ - && (p)->streamPos == (p)->pos \ - && (!(p)->directInput || (p)->directInputRem == 0)) - -int MatchFinder_NeedMove(CMatchFinder *p); -Byte *MatchFinder_GetPointerToCurrentPos(CMatchFinder *p); -void MatchFinder_MoveBlock(CMatchFinder *p); -void MatchFinder_ReadIfRequired(CMatchFinder *p); - -void MatchFinder_Construct(CMatchFinder *p); - -/* Conditions: - historySize <= 3 GB - keepAddBufferBefore + matchMaxLen + keepAddBufferAfter < 511MB -*/ -int MatchFinder_Create(CMatchFinder *p, UInt32 historySize, - UInt32 keepAddBufferBefore, UInt32 matchMaxLen, UInt32 keepAddBufferAfter, - ISzAllocPtr alloc); -void MatchFinder_Free(CMatchFinder *p, ISzAllocPtr alloc); -void MatchFinder_Normalize3(UInt32 subValue, CLzRef *items, size_t numItems); -void MatchFinder_ReduceOffsets(CMatchFinder *p, UInt32 subValue); - -UInt32 * GetMatchesSpec1(UInt32 lenLimit, UInt32 curMatch, UInt32 pos, const Byte *buffer, CLzRef *son, - UInt32 _cyclicBufferPos, UInt32 _cyclicBufferSize, UInt32 _cutValue, - UInt32 *distances, UInt32 maxLen); - -/* -Conditions: - Mf_GetNumAvailableBytes_Func must be called before each Mf_GetMatchLen_Func. - Mf_GetPointerToCurrentPos_Func's result must be used only before any other function -*/ - -typedef void (*Mf_Init_Func)(void *object); -typedef UInt32 (*Mf_GetNumAvailableBytes_Func)(void *object); -typedef const Byte * (*Mf_GetPointerToCurrentPos_Func)(void *object); -typedef UInt32 (*Mf_GetMatches_Func)(void *object, UInt32 *distances); -typedef void (*Mf_Skip_Func)(void *object, UInt32); - -typedef struct _IMatchFinder -{ - Mf_Init_Func Init; - Mf_GetNumAvailableBytes_Func GetNumAvailableBytes; - Mf_GetPointerToCurrentPos_Func GetPointerToCurrentPos; - Mf_GetMatches_Func GetMatches; - Mf_Skip_Func Skip; -} IMatchFinder; - -void MatchFinder_CreateVTable(CMatchFinder *p, IMatchFinder *vTable); - -void MatchFinder_Init_LowHash(CMatchFinder *p); -void MatchFinder_Init_HighHash(CMatchFinder *p); -void MatchFinder_Init_3(CMatchFinder *p, int readData); -void MatchFinder_Init(CMatchFinder *p); - -UInt32 Bt3Zip_MatchFinder_GetMatches(CMatchFinder *p, UInt32 *distances); -UInt32 Hc3Zip_MatchFinder_GetMatches(CMatchFinder *p, UInt32 *distances); - -void Bt3Zip_MatchFinder_Skip(CMatchFinder *p, UInt32 num); -void Hc3Zip_MatchFinder_Skip(CMatchFinder *p, UInt32 num); - -EXTERN_C_END - -#endif diff --git a/code/ryzom/client/src/seven_zip/LzHash.h b/code/ryzom/client/src/seven_zip/LzHash.h deleted file mode 100644 index e7c942303..000000000 --- a/code/ryzom/client/src/seven_zip/LzHash.h +++ /dev/null @@ -1,57 +0,0 @@ -/* LzHash.h -- HASH functions for LZ algorithms -2015-04-12 : Igor Pavlov : Public domain */ - -#ifndef __LZ_HASH_H -#define __LZ_HASH_H - -#define kHash2Size (1 << 10) -#define kHash3Size (1 << 16) -#define kHash4Size (1 << 20) - -#define kFix3HashSize (kHash2Size) -#define kFix4HashSize (kHash2Size + kHash3Size) -#define kFix5HashSize (kHash2Size + kHash3Size + kHash4Size) - -#define HASH2_CALC hv = cur[0] | ((UInt32)cur[1] << 8); - -#define HASH3_CALC { \ - UInt32 temp = p->crc[cur[0]] ^ cur[1]; \ - h2 = temp & (kHash2Size - 1); \ - hv = (temp ^ ((UInt32)cur[2] << 8)) & p->hashMask; } - -#define HASH4_CALC { \ - UInt32 temp = p->crc[cur[0]] ^ cur[1]; \ - h2 = temp & (kHash2Size - 1); \ - temp ^= ((UInt32)cur[2] << 8); \ - h3 = temp & (kHash3Size - 1); \ - hv = (temp ^ (p->crc[cur[3]] << 5)) & p->hashMask; } - -#define HASH5_CALC { \ - UInt32 temp = p->crc[cur[0]] ^ cur[1]; \ - h2 = temp & (kHash2Size - 1); \ - temp ^= ((UInt32)cur[2] << 8); \ - h3 = temp & (kHash3Size - 1); \ - temp ^= (p->crc[cur[3]] << 5); \ - h4 = temp & (kHash4Size - 1); \ - hv = (temp ^ (p->crc[cur[4]] << 3)) & p->hashMask; } - -/* #define HASH_ZIP_CALC hv = ((cur[0] | ((UInt32)cur[1] << 8)) ^ p->crc[cur[2]]) & 0xFFFF; */ -#define HASH_ZIP_CALC hv = ((cur[2] | ((UInt32)cur[0] << 8)) ^ p->crc[cur[1]]) & 0xFFFF; - - -#define MT_HASH2_CALC \ - h2 = (p->crc[cur[0]] ^ cur[1]) & (kHash2Size - 1); - -#define MT_HASH3_CALC { \ - UInt32 temp = p->crc[cur[0]] ^ cur[1]; \ - h2 = temp & (kHash2Size - 1); \ - h3 = (temp ^ ((UInt32)cur[2] << 8)) & (kHash3Size - 1); } - -#define MT_HASH4_CALC { \ - UInt32 temp = p->crc[cur[0]] ^ cur[1]; \ - h2 = temp & (kHash2Size - 1); \ - temp ^= ((UInt32)cur[2] << 8); \ - h3 = temp & (kHash3Size - 1); \ - h4 = (temp ^ (p->crc[cur[3]] << 5)) & (kHash4Size - 1); } - -#endif diff --git a/code/ryzom/client/src/seven_zip/Lzma2Dec.cpp b/code/ryzom/client/src/seven_zip/Lzma2Dec.cpp deleted file mode 100644 index 4e138a4ae..000000000 --- a/code/ryzom/client/src/seven_zip/Lzma2Dec.cpp +++ /dev/null @@ -1,488 +0,0 @@ -/* Lzma2Dec.c -- LZMA2 Decoder -2019-02-02 : Igor Pavlov : Public domain */ - -/* #define SHOW_DEBUG_INFO */ - -#include "Precomp.h" - -#ifdef SHOW_DEBUG_INFO -#include -#endif - -#include - -#include "Lzma2Dec.h" - -/* -00000000 - End of data -00000001 U U - Uncompressed, reset dic, need reset state and set new prop -00000010 U U - Uncompressed, no reset -100uuuuu U U P P - LZMA, no reset -101uuuuu U U P P - LZMA, reset state -110uuuuu U U P P S - LZMA, reset state + set new prop -111uuuuu U U P P S - LZMA, reset state + set new prop, reset dic - - u, U - Unpack Size - P - Pack Size - S - Props -*/ - -#define LZMA2_CONTROL_COPY_RESET_DIC 1 - -#define LZMA2_IS_UNCOMPRESSED_STATE(p) (((p)->control & (1 << 7)) == 0) - -#define LZMA2_LCLP_MAX 4 -#define LZMA2_DIC_SIZE_FROM_PROP(p) (((UInt32)2 | ((p) & 1)) << ((p) / 2 + 11)) - -#ifdef SHOW_DEBUG_INFO -#define PRF(x) x -#else -#define PRF(x) -#endif - -typedef enum -{ - LZMA2_STATE_CONTROL, - LZMA2_STATE_UNPACK0, - LZMA2_STATE_UNPACK1, - LZMA2_STATE_PACK0, - LZMA2_STATE_PACK1, - LZMA2_STATE_PROP, - LZMA2_STATE_DATA, - LZMA2_STATE_DATA_CONT, - LZMA2_STATE_FINISHED, - LZMA2_STATE_ERROR -} ELzma2State; - -static SRes Lzma2Dec_GetOldProps(Byte prop, Byte *props) -{ - UInt32 dicSize; - if (prop > 40) - return SZ_ERROR_UNSUPPORTED; - dicSize = (prop == 40) ? 0xFFFFFFFF : LZMA2_DIC_SIZE_FROM_PROP(prop); - props[0] = (Byte)LZMA2_LCLP_MAX; - props[1] = (Byte)(dicSize); - props[2] = (Byte)(dicSize >> 8); - props[3] = (Byte)(dicSize >> 16); - props[4] = (Byte)(dicSize >> 24); - return SZ_OK; -} - -SRes Lzma2Dec_AllocateProbs(CLzma2Dec *p, Byte prop, ISzAllocPtr alloc) -{ - Byte props[LZMA_PROPS_SIZE]; - RINOK(Lzma2Dec_GetOldProps(prop, props)); - return LzmaDec_AllocateProbs(&p->decoder, props, LZMA_PROPS_SIZE, alloc); -} - -SRes Lzma2Dec_Allocate(CLzma2Dec *p, Byte prop, ISzAllocPtr alloc) -{ - Byte props[LZMA_PROPS_SIZE]; - RINOK(Lzma2Dec_GetOldProps(prop, props)); - return LzmaDec_Allocate(&p->decoder, props, LZMA_PROPS_SIZE, alloc); -} - -void Lzma2Dec_Init(CLzma2Dec *p) -{ - p->state = LZMA2_STATE_CONTROL; - p->needInitLevel = 0xE0; - p->isExtraMode = False; - p->unpackSize = 0; - - // p->decoder.dicPos = 0; // we can use it instead of full init - LzmaDec_Init(&p->decoder); -} - -static ELzma2State Lzma2Dec_UpdateState(CLzma2Dec *p, Byte b) -{ - switch (p->state) - { - case LZMA2_STATE_CONTROL: - p->isExtraMode = False; - p->control = b; - PRF(printf("\n %8X", (unsigned)p->decoder.dicPos)); - PRF(printf(" %02X", (unsigned)b)); - if (b == 0) - return LZMA2_STATE_FINISHED; - if (LZMA2_IS_UNCOMPRESSED_STATE(p)) - { - if (b == LZMA2_CONTROL_COPY_RESET_DIC) - p->needInitLevel = 0xC0; - else if (b > 2 || p->needInitLevel == 0xE0) - return LZMA2_STATE_ERROR; - } - else - { - if (b < p->needInitLevel) - return LZMA2_STATE_ERROR; - p->needInitLevel = 0; - p->unpackSize = (UInt32)(b & 0x1F) << 16; - } - return LZMA2_STATE_UNPACK0; - - case LZMA2_STATE_UNPACK0: - p->unpackSize |= (UInt32)b << 8; - return LZMA2_STATE_UNPACK1; - - case LZMA2_STATE_UNPACK1: - p->unpackSize |= (UInt32)b; - p->unpackSize++; - PRF(printf(" %7u", (unsigned)p->unpackSize)); - return LZMA2_IS_UNCOMPRESSED_STATE(p) ? LZMA2_STATE_DATA : LZMA2_STATE_PACK0; - - case LZMA2_STATE_PACK0: - p->packSize = (UInt32)b << 8; - return LZMA2_STATE_PACK1; - - case LZMA2_STATE_PACK1: - p->packSize |= (UInt32)b; - p->packSize++; - // if (p->packSize < 5) return LZMA2_STATE_ERROR; - PRF(printf(" %5u", (unsigned)p->packSize)); - return (p->control & 0x40) ? LZMA2_STATE_PROP : LZMA2_STATE_DATA; - - case LZMA2_STATE_PROP: - { - unsigned lc, lp; - if (b >= (9 * 5 * 5)) - return LZMA2_STATE_ERROR; - lc = b % 9; - b /= 9; - p->decoder.prop.pb = (Byte)(b / 5); - lp = b % 5; - if (lc + lp > LZMA2_LCLP_MAX) - return LZMA2_STATE_ERROR; - p->decoder.prop.lc = (Byte)lc; - p->decoder.prop.lp = (Byte)lp; - return LZMA2_STATE_DATA; - } - } - return LZMA2_STATE_ERROR; -} - -static void LzmaDec_UpdateWithUncompressed(CLzmaDec *p, const Byte *src, SizeT size) -{ - memcpy(p->dic + p->dicPos, src, size); - p->dicPos += size; - if (p->checkDicSize == 0 && p->prop.dicSize - p->processedPos <= size) - p->checkDicSize = p->prop.dicSize; - p->processedPos += (UInt32)size; -} - -void LzmaDec_InitDicAndState(CLzmaDec *p, BoolInt initDic, BoolInt initState); - - -SRes Lzma2Dec_DecodeToDic(CLzma2Dec *p, SizeT dicLimit, - const Byte *src, SizeT *srcLen, ELzmaFinishMode finishMode, ELzmaStatus *status) -{ - SizeT inSize = *srcLen; - *srcLen = 0; - *status = LZMA_STATUS_NOT_SPECIFIED; - - while (p->state != LZMA2_STATE_ERROR) - { - SizeT dicPos; - - if (p->state == LZMA2_STATE_FINISHED) - { - *status = LZMA_STATUS_FINISHED_WITH_MARK; - return SZ_OK; - } - - dicPos = p->decoder.dicPos; - - if (dicPos == dicLimit && finishMode == LZMA_FINISH_ANY) - { - *status = LZMA_STATUS_NOT_FINISHED; - return SZ_OK; - } - - if (p->state != LZMA2_STATE_DATA && p->state != LZMA2_STATE_DATA_CONT) - { - if (*srcLen == inSize) - { - *status = LZMA_STATUS_NEEDS_MORE_INPUT; - return SZ_OK; - } - (*srcLen)++; - p->state = Lzma2Dec_UpdateState(p, *src++); - if (dicPos == dicLimit && p->state != LZMA2_STATE_FINISHED) - break; - continue; - } - - { - SizeT inCur = inSize - *srcLen; - SizeT outCur = dicLimit - dicPos; - ELzmaFinishMode curFinishMode = LZMA_FINISH_ANY; - - if (outCur >= p->unpackSize) - { - outCur = (SizeT)p->unpackSize; - curFinishMode = LZMA_FINISH_END; - } - - if (LZMA2_IS_UNCOMPRESSED_STATE(p)) - { - if (inCur == 0) - { - *status = LZMA_STATUS_NEEDS_MORE_INPUT; - return SZ_OK; - } - - if (p->state == LZMA2_STATE_DATA) - { - BoolInt initDic = (p->control == LZMA2_CONTROL_COPY_RESET_DIC); - LzmaDec_InitDicAndState(&p->decoder, initDic, False); - } - - if (inCur > outCur) - inCur = outCur; - if (inCur == 0) - break; - - LzmaDec_UpdateWithUncompressed(&p->decoder, src, inCur); - - src += inCur; - *srcLen += inCur; - p->unpackSize -= (UInt32)inCur; - p->state = (p->unpackSize == 0) ? LZMA2_STATE_CONTROL : LZMA2_STATE_DATA_CONT; - } - else - { - SRes res; - - if (p->state == LZMA2_STATE_DATA) - { - BoolInt initDic = (p->control >= 0xE0); - BoolInt initState = (p->control >= 0xA0); - LzmaDec_InitDicAndState(&p->decoder, initDic, initState); - p->state = LZMA2_STATE_DATA_CONT; - } - - if (inCur > p->packSize) - inCur = (SizeT)p->packSize; - - res = LzmaDec_DecodeToDic(&p->decoder, dicPos + outCur, src, &inCur, curFinishMode, status); - - src += inCur; - *srcLen += inCur; - p->packSize -= (UInt32)inCur; - outCur = p->decoder.dicPos - dicPos; - p->unpackSize -= (UInt32)outCur; - - if (res != 0) - break; - - if (*status == LZMA_STATUS_NEEDS_MORE_INPUT) - { - if (p->packSize == 0) - break; - return SZ_OK; - } - - if (inCur == 0 && outCur == 0) - { - if (*status != LZMA_STATUS_MAYBE_FINISHED_WITHOUT_MARK - || p->unpackSize != 0 - || p->packSize != 0) - break; - p->state = LZMA2_STATE_CONTROL; - } - - *status = LZMA_STATUS_NOT_SPECIFIED; - } - } - } - - *status = LZMA_STATUS_NOT_SPECIFIED; - p->state = LZMA2_STATE_ERROR; - return SZ_ERROR_DATA; -} - - - - -ELzma2ParseStatus Lzma2Dec_Parse(CLzma2Dec *p, - SizeT outSize, - const Byte *src, SizeT *srcLen, - int checkFinishBlock) -{ - SizeT inSize = *srcLen; - *srcLen = 0; - - while (p->state != LZMA2_STATE_ERROR) - { - if (p->state == LZMA2_STATE_FINISHED) - return (ELzma2ParseStatus)LZMA_STATUS_FINISHED_WITH_MARK; - - if (outSize == 0 && !checkFinishBlock) - return (ELzma2ParseStatus)LZMA_STATUS_NOT_FINISHED; - - if (p->state != LZMA2_STATE_DATA && p->state != LZMA2_STATE_DATA_CONT) - { - if (*srcLen == inSize) - return (ELzma2ParseStatus)LZMA_STATUS_NEEDS_MORE_INPUT; - (*srcLen)++; - - p->state = Lzma2Dec_UpdateState(p, *src++); - - if (p->state == LZMA2_STATE_UNPACK0) - { - // if (p->decoder.dicPos != 0) - if (p->control == LZMA2_CONTROL_COPY_RESET_DIC || p->control >= 0xE0) - return LZMA2_PARSE_STATUS_NEW_BLOCK; - // if (outSize == 0) return LZMA_STATUS_NOT_FINISHED; - } - - // The following code can be commented. - // It's not big problem, if we read additional input bytes. - // It will be stopped later in LZMA2_STATE_DATA / LZMA2_STATE_DATA_CONT state. - - if (outSize == 0 && p->state != LZMA2_STATE_FINISHED) - { - // checkFinishBlock is true. So we expect that block must be finished, - // We can return LZMA_STATUS_NOT_SPECIFIED or LZMA_STATUS_NOT_FINISHED here - // break; - return (ELzma2ParseStatus)LZMA_STATUS_NOT_FINISHED; - } - - if (p->state == LZMA2_STATE_DATA) - return LZMA2_PARSE_STATUS_NEW_CHUNK; - - continue; - } - - if (outSize == 0) - return (ELzma2ParseStatus)LZMA_STATUS_NOT_FINISHED; - - { - SizeT inCur = inSize - *srcLen; - - if (LZMA2_IS_UNCOMPRESSED_STATE(p)) - { - if (inCur == 0) - return (ELzma2ParseStatus)LZMA_STATUS_NEEDS_MORE_INPUT; - if (inCur > p->unpackSize) - inCur = p->unpackSize; - if (inCur > outSize) - inCur = outSize; - p->decoder.dicPos += inCur; - src += inCur; - *srcLen += inCur; - outSize -= inCur; - p->unpackSize -= (UInt32)inCur; - p->state = (p->unpackSize == 0) ? LZMA2_STATE_CONTROL : LZMA2_STATE_DATA_CONT; - } - else - { - p->isExtraMode = True; - - if (inCur == 0) - { - if (p->packSize != 0) - return (ELzma2ParseStatus)LZMA_STATUS_NEEDS_MORE_INPUT; - } - else if (p->state == LZMA2_STATE_DATA) - { - p->state = LZMA2_STATE_DATA_CONT; - if (*src != 0) - { - // first byte of lzma chunk must be Zero - *srcLen += 1; - p->packSize--; - break; - } - } - - if (inCur > p->packSize) - inCur = (SizeT)p->packSize; - - src += inCur; - *srcLen += inCur; - p->packSize -= (UInt32)inCur; - - if (p->packSize == 0) - { - SizeT rem = outSize; - if (rem > p->unpackSize) - rem = p->unpackSize; - p->decoder.dicPos += rem; - p->unpackSize -= (UInt32)rem; - outSize -= rem; - if (p->unpackSize == 0) - p->state = LZMA2_STATE_CONTROL; - } - } - } - } - - p->state = LZMA2_STATE_ERROR; - return (ELzma2ParseStatus)LZMA_STATUS_NOT_SPECIFIED; -} - - - - -SRes Lzma2Dec_DecodeToBuf(CLzma2Dec *p, Byte *dest, SizeT *destLen, const Byte *src, SizeT *srcLen, ELzmaFinishMode finishMode, ELzmaStatus *status) -{ - SizeT outSize = *destLen, inSize = *srcLen; - *srcLen = *destLen = 0; - - for (;;) - { - SizeT inCur = inSize, outCur, dicPos; - ELzmaFinishMode curFinishMode; - SRes res; - - if (p->decoder.dicPos == p->decoder.dicBufSize) - p->decoder.dicPos = 0; - dicPos = p->decoder.dicPos; - curFinishMode = LZMA_FINISH_ANY; - outCur = p->decoder.dicBufSize - dicPos; - - if (outCur >= outSize) - { - outCur = outSize; - curFinishMode = finishMode; - } - - res = Lzma2Dec_DecodeToDic(p, dicPos + outCur, src, &inCur, curFinishMode, status); - - src += inCur; - inSize -= inCur; - *srcLen += inCur; - outCur = p->decoder.dicPos - dicPos; - memcpy(dest, p->decoder.dic + dicPos, outCur); - dest += outCur; - outSize -= outCur; - *destLen += outCur; - if (res != 0) - return res; - if (outCur == 0 || outSize == 0) - return SZ_OK; - } -} - - -SRes Lzma2Decode(Byte *dest, SizeT *destLen, const Byte *src, SizeT *srcLen, - Byte prop, ELzmaFinishMode finishMode, ELzmaStatus *status, ISzAllocPtr alloc) -{ - CLzma2Dec p; - SRes res; - SizeT outSize = *destLen, inSize = *srcLen; - *destLen = *srcLen = 0; - *status = LZMA_STATUS_NOT_SPECIFIED; - Lzma2Dec_Construct(&p); - RINOK(Lzma2Dec_AllocateProbs(&p, prop, alloc)); - p.decoder.dic = dest; - p.decoder.dicBufSize = outSize; - Lzma2Dec_Init(&p); - *srcLen = inSize; - res = Lzma2Dec_DecodeToDic(&p, outSize, src, srcLen, finishMode, status); - *destLen = p.decoder.dicPos; - if (res == SZ_OK && *status == LZMA_STATUS_NEEDS_MORE_INPUT) - res = SZ_ERROR_INPUT_EOF; - Lzma2Dec_FreeProbs(&p, alloc); - return res; -} diff --git a/code/ryzom/client/src/seven_zip/Lzma2Dec.h b/code/ryzom/client/src/seven_zip/Lzma2Dec.h deleted file mode 100644 index b8ddeac89..000000000 --- a/code/ryzom/client/src/seven_zip/Lzma2Dec.h +++ /dev/null @@ -1,120 +0,0 @@ -/* Lzma2Dec.h -- LZMA2 Decoder -2018-02-19 : Igor Pavlov : Public domain */ - -#ifndef __LZMA2_DEC_H -#define __LZMA2_DEC_H - -#include "LzmaDec.h" - -EXTERN_C_BEGIN - -/* ---------- State Interface ---------- */ - -typedef struct -{ - unsigned state; - Byte control; - Byte needInitLevel; - Byte isExtraMode; - Byte _pad_; - UInt32 packSize; - UInt32 unpackSize; - CLzmaDec decoder; -} CLzma2Dec; - -#define Lzma2Dec_Construct(p) LzmaDec_Construct(&(p)->decoder) -#define Lzma2Dec_FreeProbs(p, alloc) LzmaDec_FreeProbs(&(p)->decoder, alloc) -#define Lzma2Dec_Free(p, alloc) LzmaDec_Free(&(p)->decoder, alloc) - -SRes Lzma2Dec_AllocateProbs(CLzma2Dec *p, Byte prop, ISzAllocPtr alloc); -SRes Lzma2Dec_Allocate(CLzma2Dec *p, Byte prop, ISzAllocPtr alloc); -void Lzma2Dec_Init(CLzma2Dec *p); - -/* -finishMode: - It has meaning only if the decoding reaches output limit (*destLen or dicLimit). - LZMA_FINISH_ANY - use smallest number of input bytes - LZMA_FINISH_END - read EndOfStream marker after decoding - -Returns: - SZ_OK - status: - LZMA_STATUS_FINISHED_WITH_MARK - LZMA_STATUS_NOT_FINISHED - LZMA_STATUS_NEEDS_MORE_INPUT - SZ_ERROR_DATA - Data error -*/ - -SRes Lzma2Dec_DecodeToDic(CLzma2Dec *p, SizeT dicLimit, - const Byte *src, SizeT *srcLen, ELzmaFinishMode finishMode, ELzmaStatus *status); - -SRes Lzma2Dec_DecodeToBuf(CLzma2Dec *p, Byte *dest, SizeT *destLen, - const Byte *src, SizeT *srcLen, ELzmaFinishMode finishMode, ELzmaStatus *status); - - -/* ---------- LZMA2 block and chunk parsing ---------- */ - -/* -Lzma2Dec_Parse() parses compressed data stream up to next independent block or next chunk data. -It can return LZMA_STATUS_* code or LZMA2_PARSE_STATUS_* code: - - LZMA2_PARSE_STATUS_NEW_BLOCK - there is new block, and 1 additional byte (control byte of next block header) was read from input. - - LZMA2_PARSE_STATUS_NEW_CHUNK - there is new chunk, and only lzma2 header of new chunk was read. - CLzma2Dec::unpackSize contains unpack size of that chunk -*/ - -typedef enum -{ -/* - LZMA_STATUS_NOT_SPECIFIED // data error - LZMA_STATUS_FINISHED_WITH_MARK - LZMA_STATUS_NOT_FINISHED // - LZMA_STATUS_NEEDS_MORE_INPUT - LZMA_STATUS_MAYBE_FINISHED_WITHOUT_MARK // unused -*/ - LZMA2_PARSE_STATUS_NEW_BLOCK = LZMA_STATUS_MAYBE_FINISHED_WITHOUT_MARK + 1, - LZMA2_PARSE_STATUS_NEW_CHUNK -} ELzma2ParseStatus; - -ELzma2ParseStatus Lzma2Dec_Parse(CLzma2Dec *p, - SizeT outSize, // output size - const Byte *src, SizeT *srcLen, - int checkFinishBlock // set (checkFinishBlock = 1), if it must read full input data, if decoder.dicPos reaches blockMax position. - ); - -/* -LZMA2 parser doesn't decode LZMA chunks, so we must read - full input LZMA chunk to decode some part of LZMA chunk. - -Lzma2Dec_GetUnpackExtra() returns the value that shows - max possible number of output bytes that can be output by decoder - at current input positon. -*/ - -#define Lzma2Dec_GetUnpackExtra(p) ((p)->isExtraMode ? (p)->unpackSize : 0); - - -/* ---------- One Call Interface ---------- */ - -/* -finishMode: - It has meaning only if the decoding reaches output limit (*destLen). - LZMA_FINISH_ANY - use smallest number of input bytes - LZMA_FINISH_END - read EndOfStream marker after decoding - -Returns: - SZ_OK - status: - LZMA_STATUS_FINISHED_WITH_MARK - LZMA_STATUS_NOT_FINISHED - SZ_ERROR_DATA - Data error - SZ_ERROR_MEM - Memory allocation error - SZ_ERROR_UNSUPPORTED - Unsupported properties - SZ_ERROR_INPUT_EOF - It needs more bytes in input buffer (src). -*/ - -SRes Lzma2Decode(Byte *dest, SizeT *destLen, const Byte *src, SizeT *srcLen, - Byte prop, ELzmaFinishMode finishMode, ELzmaStatus *status, ISzAllocPtr alloc); - -EXTERN_C_END - -#endif diff --git a/code/ryzom/client/src/seven_zip/Lzma2Enc.cpp b/code/ryzom/client/src/seven_zip/Lzma2Enc.cpp deleted file mode 100644 index 9af0622b0..000000000 --- a/code/ryzom/client/src/seven_zip/Lzma2Enc.cpp +++ /dev/null @@ -1,803 +0,0 @@ -/* Lzma2Enc.c -- LZMA2 Encoder -2018-07-04 : Igor Pavlov : Public domain */ - -#include "Precomp.h" - -#include - -#define _7ZIP_ST - -#include "Lzma2Enc.h" - -#ifndef _7ZIP_ST -#include "MtCoder.h" -#else -#define MTCODER__THREADS_MAX 1 -#endif - -#define LZMA2_CONTROL_LZMA (1 << 7) -#define LZMA2_CONTROL_COPY_NO_RESET 2 -#define LZMA2_CONTROL_COPY_RESET_DIC 1 -#define LZMA2_CONTROL_EOF 0 - -#define LZMA2_LCLP_MAX 4 - -#define LZMA2_DIC_SIZE_FROM_PROP(p) (((UInt32)2 | ((p) & 1)) << ((p) / 2 + 11)) - -#define LZMA2_PACK_SIZE_MAX (1 << 16) -#define LZMA2_COPY_CHUNK_SIZE LZMA2_PACK_SIZE_MAX -#define LZMA2_UNPACK_SIZE_MAX (1 << 21) -#define LZMA2_KEEP_WINDOW_SIZE LZMA2_UNPACK_SIZE_MAX - -#define LZMA2_CHUNK_SIZE_COMPRESSED_MAX ((1 << 16) + 16) - - -#define PRF(x) /* x */ - - -/* ---------- CLimitedSeqInStream ---------- */ - -typedef struct -{ - ISeqInStream vt; - ISeqInStream *realStream; - UInt64 limit; - UInt64 processed; - int finished; -} CLimitedSeqInStream; - -static void LimitedSeqInStream_Init(CLimitedSeqInStream *p) -{ - p->limit = (UInt64)(Int64)-1; - p->processed = 0; - p->finished = 0; -} - -static SRes LimitedSeqInStream_Read(const ISeqInStream *pp, void *data, size_t *size) -{ - CLimitedSeqInStream *p = CONTAINER_FROM_VTBL(pp, CLimitedSeqInStream, vt); - size_t size2 = *size; - SRes res = SZ_OK; - - if (p->limit != (UInt64)(Int64)-1) - { - UInt64 rem = p->limit - p->processed; - if (size2 > rem) - size2 = (size_t)rem; - } - if (size2 != 0) - { - res = ISeqInStream_Read(p->realStream, data, &size2); - p->finished = (size2 == 0 ? 1 : 0); - p->processed += size2; - } - *size = size2; - return res; -} - - -/* ---------- CLzma2EncInt ---------- */ - -typedef struct -{ - CLzmaEncHandle enc; - Byte propsAreSet; - Byte propsByte; - Byte needInitState; - Byte needInitProp; - UInt64 srcPos; -} CLzma2EncInt; - - -static SRes Lzma2EncInt_InitStream(CLzma2EncInt *p, const CLzma2EncProps *props) -{ - if (!p->propsAreSet) - { - SizeT propsSize = LZMA_PROPS_SIZE; - Byte propsEncoded[LZMA_PROPS_SIZE]; - RINOK(LzmaEnc_SetProps(p->enc, &props->lzmaProps)); - RINOK(LzmaEnc_WriteProperties(p->enc, propsEncoded, &propsSize)); - p->propsByte = propsEncoded[0]; - p->propsAreSet = True; - } - return SZ_OK; -} - -static void Lzma2EncInt_InitBlock(CLzma2EncInt *p) -{ - p->srcPos = 0; - p->needInitState = True; - p->needInitProp = True; -} - - -SRes LzmaEnc_PrepareForLzma2(CLzmaEncHandle pp, ISeqInStream *inStream, UInt32 keepWindowSize, - ISzAllocPtr alloc, ISzAllocPtr allocBig); -SRes LzmaEnc_MemPrepare(CLzmaEncHandle pp, const Byte *src, SizeT srcLen, - UInt32 keepWindowSize, ISzAllocPtr alloc, ISzAllocPtr allocBig); -SRes LzmaEnc_CodeOneMemBlock(CLzmaEncHandle pp, BoolInt reInit, - Byte *dest, size_t *destLen, UInt32 desiredPackSize, UInt32 *unpackSize); -const Byte *LzmaEnc_GetCurBuf(CLzmaEncHandle pp); -void LzmaEnc_Finish(CLzmaEncHandle pp); -void LzmaEnc_SaveState(CLzmaEncHandle pp); -void LzmaEnc_RestoreState(CLzmaEncHandle pp); - -/* -UInt32 LzmaEnc_GetNumAvailableBytes(CLzmaEncHandle pp); -*/ - -static SRes Lzma2EncInt_EncodeSubblock(CLzma2EncInt *p, Byte *outBuf, - size_t *packSizeRes, ISeqOutStream *outStream) -{ - size_t packSizeLimit = *packSizeRes; - size_t packSize = packSizeLimit; - UInt32 unpackSize = LZMA2_UNPACK_SIZE_MAX; - unsigned lzHeaderSize = 5 + (p->needInitProp ? 1 : 0); - BoolInt useCopyBlock; - SRes res; - - *packSizeRes = 0; - if (packSize < lzHeaderSize) - return SZ_ERROR_OUTPUT_EOF; - packSize -= lzHeaderSize; - - LzmaEnc_SaveState(p->enc); - res = LzmaEnc_CodeOneMemBlock(p->enc, p->needInitState, - outBuf + lzHeaderSize, &packSize, LZMA2_PACK_SIZE_MAX, &unpackSize); - - PRF(printf("\npackSize = %7d unpackSize = %7d ", packSize, unpackSize)); - - if (unpackSize == 0) - return res; - - if (res == SZ_OK) - useCopyBlock = (packSize + 2 >= unpackSize || packSize > (1 << 16)); - else - { - if (res != SZ_ERROR_OUTPUT_EOF) - return res; - res = SZ_OK; - useCopyBlock = True; - } - - if (useCopyBlock) - { - size_t destPos = 0; - PRF(printf("################# COPY ")); - - while (unpackSize > 0) - { - UInt32 u = (unpackSize < LZMA2_COPY_CHUNK_SIZE) ? unpackSize : LZMA2_COPY_CHUNK_SIZE; - if (packSizeLimit - destPos < u + 3) - return SZ_ERROR_OUTPUT_EOF; - outBuf[destPos++] = (Byte)(p->srcPos == 0 ? LZMA2_CONTROL_COPY_RESET_DIC : LZMA2_CONTROL_COPY_NO_RESET); - outBuf[destPos++] = (Byte)((u - 1) >> 8); - outBuf[destPos++] = (Byte)(u - 1); - memcpy(outBuf + destPos, LzmaEnc_GetCurBuf(p->enc) - unpackSize, u); - unpackSize -= u; - destPos += u; - p->srcPos += u; - - if (outStream) - { - *packSizeRes += destPos; - if (ISeqOutStream_Write(outStream, outBuf, destPos) != destPos) - return SZ_ERROR_WRITE; - destPos = 0; - } - else - *packSizeRes = destPos; - /* needInitState = True; */ - } - - LzmaEnc_RestoreState(p->enc); - return SZ_OK; - } - - { - size_t destPos = 0; - UInt32 u = unpackSize - 1; - UInt32 pm = (UInt32)(packSize - 1); - unsigned mode = (p->srcPos == 0) ? 3 : (p->needInitState ? (p->needInitProp ? 2 : 1) : 0); - - PRF(printf(" ")); - - outBuf[destPos++] = (Byte)(LZMA2_CONTROL_LZMA | (mode << 5) | ((u >> 16) & 0x1F)); - outBuf[destPos++] = (Byte)(u >> 8); - outBuf[destPos++] = (Byte)u; - outBuf[destPos++] = (Byte)(pm >> 8); - outBuf[destPos++] = (Byte)pm; - - if (p->needInitProp) - outBuf[destPos++] = p->propsByte; - - p->needInitProp = False; - p->needInitState = False; - destPos += packSize; - p->srcPos += unpackSize; - - if (outStream) - if (ISeqOutStream_Write(outStream, outBuf, destPos) != destPos) - return SZ_ERROR_WRITE; - - *packSizeRes = destPos; - return SZ_OK; - } -} - - -/* ---------- Lzma2 Props ---------- */ - -void Lzma2EncProps_Init(CLzma2EncProps *p) -{ - LzmaEncProps_Init(&p->lzmaProps); - p->blockSize = LZMA2_ENC_PROPS__BLOCK_SIZE__AUTO; - p->numBlockThreads_Reduced = -1; - p->numBlockThreads_Max = -1; - p->numTotalThreads = -1; -} - -void Lzma2EncProps_Normalize(CLzma2EncProps *p) -{ - UInt64 fileSize; - int t1, t1n, t2, t2r, t3; - { - CLzmaEncProps lzmaProps = p->lzmaProps; - LzmaEncProps_Normalize(&lzmaProps); - t1n = lzmaProps.numThreads; - } - - t1 = p->lzmaProps.numThreads; - t2 = p->numBlockThreads_Max; - t3 = p->numTotalThreads; - - if (t2 > MTCODER__THREADS_MAX) - t2 = MTCODER__THREADS_MAX; - - if (t3 <= 0) - { - if (t2 <= 0) - t2 = 1; - t3 = t1n * t2; - } - else if (t2 <= 0) - { - t2 = t3 / t1n; - if (t2 == 0) - { - t1 = 1; - t2 = t3; - } - if (t2 > MTCODER__THREADS_MAX) - t2 = MTCODER__THREADS_MAX; - } - else if (t1 <= 0) - { - t1 = t3 / t2; - if (t1 == 0) - t1 = 1; - } - else - t3 = t1n * t2; - - p->lzmaProps.numThreads = t1; - - t2r = t2; - - fileSize = p->lzmaProps.reduceSize; - - if ( p->blockSize != LZMA2_ENC_PROPS__BLOCK_SIZE__SOLID - && p->blockSize != LZMA2_ENC_PROPS__BLOCK_SIZE__AUTO - && (p->blockSize < fileSize || fileSize == (UInt64)(Int64)-1)) - p->lzmaProps.reduceSize = p->blockSize; - - LzmaEncProps_Normalize(&p->lzmaProps); - - p->lzmaProps.reduceSize = fileSize; - - t1 = p->lzmaProps.numThreads; - - if (p->blockSize == LZMA2_ENC_PROPS__BLOCK_SIZE__SOLID) - { - t2r = t2 = 1; - t3 = t1; - } - else if (p->blockSize == LZMA2_ENC_PROPS__BLOCK_SIZE__AUTO && t2 <= 1) - { - /* if there is no block multi-threading, we use SOLID block */ - p->blockSize = LZMA2_ENC_PROPS__BLOCK_SIZE__SOLID; - } - else - { - if (p->blockSize == LZMA2_ENC_PROPS__BLOCK_SIZE__AUTO) - { - const UInt32 kMinSize = (UInt32)1 << 20; - const UInt32 kMaxSize = (UInt32)1 << 28; - const UInt32 dictSize = p->lzmaProps.dictSize; - UInt64 blockSize = (UInt64)dictSize << 2; - if (blockSize < kMinSize) blockSize = kMinSize; - if (blockSize > kMaxSize) blockSize = kMaxSize; - if (blockSize < dictSize) blockSize = dictSize; - blockSize += (kMinSize - 1); - blockSize &= ~(UInt64)(kMinSize - 1); - p->blockSize = blockSize; - } - - if (t2 > 1 && fileSize != (UInt64)(Int64)-1) - { - UInt64 numBlocks = fileSize / p->blockSize; - if (numBlocks * p->blockSize != fileSize) - numBlocks++; - if (numBlocks < (unsigned)t2) - { - t2r = (unsigned)numBlocks; - if (t2r == 0) - t2r = 1; - t3 = t1 * t2r; - } - } - } - - p->numBlockThreads_Max = t2; - p->numBlockThreads_Reduced = t2r; - p->numTotalThreads = t3; -} - - -static SRes Progress(ICompressProgress *p, UInt64 inSize, UInt64 outSize) -{ - return (p && ICompressProgress_Progress(p, inSize, outSize) != SZ_OK) ? SZ_ERROR_PROGRESS : SZ_OK; -} - - -/* ---------- Lzma2 ---------- */ - -typedef struct -{ - Byte propEncoded; - CLzma2EncProps props; - UInt64 expectedDataSize; - - Byte *tempBufLzma; - - ISzAllocPtr alloc; - ISzAllocPtr allocBig; - - CLzma2EncInt coders[MTCODER__THREADS_MAX]; - - #ifndef _7ZIP_ST - - ISeqOutStream *outStream; - Byte *outBuf; - size_t outBuf_Rem; /* remainder in outBuf */ - - size_t outBufSize; /* size of allocated outBufs[i] */ - size_t outBufsDataSizes[MTCODER__BLOCKS_MAX]; - BoolInt mtCoder_WasConstructed; - CMtCoder mtCoder; - Byte *outBufs[MTCODER__BLOCKS_MAX]; - - #endif - -} CLzma2Enc; - - - -CLzma2EncHandle Lzma2Enc_Create(ISzAllocPtr alloc, ISzAllocPtr allocBig) -{ - CLzma2Enc *p = (CLzma2Enc *)ISzAlloc_Alloc(alloc, sizeof(CLzma2Enc)); - if (!p) - return NULL; - Lzma2EncProps_Init(&p->props); - Lzma2EncProps_Normalize(&p->props); - p->expectedDataSize = (UInt64)(Int64)-1; - p->tempBufLzma = NULL; - p->alloc = alloc; - p->allocBig = allocBig; - { - unsigned i; - for (i = 0; i < MTCODER__THREADS_MAX; i++) - p->coders[i].enc = NULL; - } - - #ifndef _7ZIP_ST - p->mtCoder_WasConstructed = False; - { - unsigned i; - for (i = 0; i < MTCODER__BLOCKS_MAX; i++) - p->outBufs[i] = NULL; - p->outBufSize = 0; - } - #endif - - return p; -} - - -#ifndef _7ZIP_ST - -static void Lzma2Enc_FreeOutBufs(CLzma2Enc *p) -{ - unsigned i; - for (i = 0; i < MTCODER__BLOCKS_MAX; i++) - if (p->outBufs[i]) - { - ISzAlloc_Free(p->alloc, p->outBufs[i]); - p->outBufs[i] = NULL; - } - p->outBufSize = 0; -} - -#endif - - -void Lzma2Enc_Destroy(CLzma2EncHandle pp) -{ - CLzma2Enc *p = (CLzma2Enc *)pp; - unsigned i; - for (i = 0; i < MTCODER__THREADS_MAX; i++) - { - CLzma2EncInt *t = &p->coders[i]; - if (t->enc) - { - LzmaEnc_Destroy(t->enc, p->alloc, p->allocBig); - t->enc = NULL; - } - } - - - #ifndef _7ZIP_ST - if (p->mtCoder_WasConstructed) - { - MtCoder_Destruct(&p->mtCoder); - p->mtCoder_WasConstructed = False; - } - Lzma2Enc_FreeOutBufs(p); - #endif - - ISzAlloc_Free(p->alloc, p->tempBufLzma); - p->tempBufLzma = NULL; - - ISzAlloc_Free(p->alloc, pp); -} - - -SRes Lzma2Enc_SetProps(CLzma2EncHandle pp, const CLzma2EncProps *props) -{ - CLzma2Enc *p = (CLzma2Enc *)pp; - CLzmaEncProps lzmaProps = props->lzmaProps; - LzmaEncProps_Normalize(&lzmaProps); - if (lzmaProps.lc + lzmaProps.lp > LZMA2_LCLP_MAX) - return SZ_ERROR_PARAM; - p->props = *props; - Lzma2EncProps_Normalize(&p->props); - return SZ_OK; -} - - -void Lzma2Enc_SetDataSize(CLzmaEncHandle pp, UInt64 expectedDataSiize) -{ - CLzma2Enc *p = (CLzma2Enc *)pp; - p->expectedDataSize = expectedDataSiize; -} - - -Byte Lzma2Enc_WriteProperties(CLzma2EncHandle pp) -{ - CLzma2Enc *p = (CLzma2Enc *)pp; - unsigned i; - UInt32 dicSize = LzmaEncProps_GetDictSize(&p->props.lzmaProps); - for (i = 0; i < 40; i++) - if (dicSize <= LZMA2_DIC_SIZE_FROM_PROP(i)) - break; - return (Byte)i; -} - - -static SRes Lzma2Enc_EncodeMt1( - CLzma2Enc *me, - CLzma2EncInt *p, - ISeqOutStream *outStream, - Byte *outBuf, size_t *outBufSize, - ISeqInStream *inStream, - const Byte *inData, size_t inDataSize, - int finished, - ICompressProgress *progress) -{ - UInt64 unpackTotal = 0; - UInt64 packTotal = 0; - size_t outLim = 0; - CLimitedSeqInStream limitedInStream; - - if (outBuf) - { - outLim = *outBufSize; - *outBufSize = 0; - } - - if (!p->enc) - { - p->propsAreSet = False; - p->enc = LzmaEnc_Create(me->alloc); - if (!p->enc) - return SZ_ERROR_MEM; - } - - limitedInStream.realStream = inStream; - if (inStream) - { - limitedInStream.vt.Read = LimitedSeqInStream_Read; - } - - if (!outBuf) - { - // outStream version works only in one thread. So we use CLzma2Enc::tempBufLzma - if (!me->tempBufLzma) - { - me->tempBufLzma = (Byte *)ISzAlloc_Alloc(me->alloc, LZMA2_CHUNK_SIZE_COMPRESSED_MAX); - if (!me->tempBufLzma) - return SZ_ERROR_MEM; - } - } - - RINOK(Lzma2EncInt_InitStream(p, &me->props)); - - for (;;) - { - SRes res = SZ_OK; - size_t inSizeCur = 0; - - Lzma2EncInt_InitBlock(p); - - LimitedSeqInStream_Init(&limitedInStream); - limitedInStream.limit = me->props.blockSize; - - if (inStream) - { - UInt64 expected = (UInt64)(Int64)-1; - // inStream version works only in one thread. So we use CLzma2Enc::expectedDataSize - if (me->expectedDataSize != (UInt64)(Int64)-1 - && me->expectedDataSize >= unpackTotal) - expected = me->expectedDataSize - unpackTotal; - if (me->props.blockSize != LZMA2_ENC_PROPS__BLOCK_SIZE__SOLID - && expected > me->props.blockSize) - expected = (size_t)me->props.blockSize; - - LzmaEnc_SetDataSize(p->enc, expected); - - RINOK(LzmaEnc_PrepareForLzma2(p->enc, - &limitedInStream.vt, - LZMA2_KEEP_WINDOW_SIZE, - me->alloc, - me->allocBig)); - } - else - { - inSizeCur = inDataSize - (size_t)unpackTotal; - if (me->props.blockSize != LZMA2_ENC_PROPS__BLOCK_SIZE__SOLID - && inSizeCur > me->props.blockSize) - inSizeCur = (size_t)me->props.blockSize; - - // LzmaEnc_SetDataSize(p->enc, inSizeCur); - - RINOK(LzmaEnc_MemPrepare(p->enc, - inData + (size_t)unpackTotal, inSizeCur, - LZMA2_KEEP_WINDOW_SIZE, - me->alloc, - me->allocBig)); - } - - for (;;) - { - size_t packSize = LZMA2_CHUNK_SIZE_COMPRESSED_MAX; - if (outBuf) - packSize = outLim - (size_t)packTotal; - - res = Lzma2EncInt_EncodeSubblock(p, - outBuf ? outBuf + (size_t)packTotal : me->tempBufLzma, &packSize, - outBuf ? NULL : outStream); - - if (res != SZ_OK) - break; - - packTotal += packSize; - if (outBuf) - *outBufSize = (size_t)packTotal; - - res = Progress(progress, unpackTotal + p->srcPos, packTotal); - if (res != SZ_OK) - break; - - /* - if (LzmaEnc_GetNumAvailableBytes(p->enc) == 0) - break; - */ - - if (packSize == 0) - break; - } - - LzmaEnc_Finish(p->enc); - - unpackTotal += p->srcPos; - - RINOK(res); - - if (p->srcPos != (inStream ? limitedInStream.processed : inSizeCur)) - return SZ_ERROR_FAIL; - - if (inStream ? limitedInStream.finished : (unpackTotal == inDataSize)) - { - if (finished) - { - if (outBuf) - { - size_t destPos = *outBufSize; - if (destPos >= outLim) - return SZ_ERROR_OUTPUT_EOF; - outBuf[destPos] = 0; - *outBufSize = destPos + 1; - } - else - { - Byte b = 0; - if (ISeqOutStream_Write(outStream, &b, 1) != 1) - return SZ_ERROR_WRITE; - } - } - return SZ_OK; - } - } -} - - - -#ifndef _7ZIP_ST - -static SRes Lzma2Enc_MtCallback_Code(void *pp, unsigned coderIndex, unsigned outBufIndex, - const Byte *src, size_t srcSize, int finished) -{ - CLzma2Enc *me = (CLzma2Enc *)pp; - size_t destSize = me->outBufSize; - SRes res; - CMtProgressThunk progressThunk; - - Byte *dest = me->outBufs[outBufIndex]; - - me->outBufsDataSizes[outBufIndex] = 0; - - if (!dest) - { - dest = (Byte *)ISzAlloc_Alloc(me->alloc, me->outBufSize); - if (!dest) - return SZ_ERROR_MEM; - me->outBufs[outBufIndex] = dest; - } - - MtProgressThunk_CreateVTable(&progressThunk); - progressThunk.mtProgress = &me->mtCoder.mtProgress; - progressThunk.inSize = 0; - progressThunk.outSize = 0; - - res = Lzma2Enc_EncodeMt1(me, - &me->coders[coderIndex], - NULL, dest, &destSize, - NULL, src, srcSize, - finished, - &progressThunk.vt); - - me->outBufsDataSizes[outBufIndex] = destSize; - - return res; -} - - -static SRes Lzma2Enc_MtCallback_Write(void *pp, unsigned outBufIndex) -{ - CLzma2Enc *me = (CLzma2Enc *)pp; - size_t size = me->outBufsDataSizes[outBufIndex]; - const Byte *data = me->outBufs[outBufIndex]; - - if (me->outStream) - return ISeqOutStream_Write(me->outStream, data, size) == size ? SZ_OK : SZ_ERROR_WRITE; - - if (size > me->outBuf_Rem) - return SZ_ERROR_OUTPUT_EOF; - memcpy(me->outBuf, data, size); - me->outBuf_Rem -= size; - me->outBuf += size; - return SZ_OK; -} - -#endif - - - -SRes Lzma2Enc_Encode2(CLzma2EncHandle pp, - ISeqOutStream *outStream, - Byte *outBuf, size_t *outBufSize, - ISeqInStream *inStream, - const Byte *inData, size_t inDataSize, - ICompressProgress *progress) -{ - CLzma2Enc *p = (CLzma2Enc *)pp; - - if (inStream && inData) - return SZ_ERROR_PARAM; - - if (outStream && outBuf) - return SZ_ERROR_PARAM; - - { - unsigned i; - for (i = 0; i < MTCODER__THREADS_MAX; i++) - p->coders[i].propsAreSet = False; - } - - #ifndef _7ZIP_ST - - if (p->props.numBlockThreads_Reduced > 1) - { - IMtCoderCallback2 vt; - - if (!p->mtCoder_WasConstructed) - { - p->mtCoder_WasConstructed = True; - MtCoder_Construct(&p->mtCoder); - } - - vt.Code = Lzma2Enc_MtCallback_Code; - vt.Write = Lzma2Enc_MtCallback_Write; - - p->outStream = outStream; - p->outBuf = NULL; - p->outBuf_Rem = 0; - if (!outStream) - { - p->outBuf = outBuf; - p->outBuf_Rem = *outBufSize; - *outBufSize = 0; - } - - p->mtCoder.allocBig = p->allocBig; - p->mtCoder.progress = progress; - p->mtCoder.inStream = inStream; - p->mtCoder.inData = inData; - p->mtCoder.inDataSize = inDataSize; - p->mtCoder.mtCallback = &vt; - p->mtCoder.mtCallbackObject = p; - - p->mtCoder.blockSize = (size_t)p->props.blockSize; - if (p->mtCoder.blockSize != p->props.blockSize) - return SZ_ERROR_PARAM; /* SZ_ERROR_MEM */ - - { - size_t destBlockSize = p->mtCoder.blockSize + (p->mtCoder.blockSize >> 10) + 16; - if (destBlockSize < p->mtCoder.blockSize) - return SZ_ERROR_PARAM; - if (p->outBufSize != destBlockSize) - Lzma2Enc_FreeOutBufs(p); - p->outBufSize = destBlockSize; - } - - p->mtCoder.numThreadsMax = p->props.numBlockThreads_Max; - p->mtCoder.expectedDataSize = p->expectedDataSize; - - { - SRes res = MtCoder_Code(&p->mtCoder); - if (!outStream) - *outBufSize = p->outBuf - outBuf; - return res; - } - } - - #endif - - - return Lzma2Enc_EncodeMt1(p, - &p->coders[0], - outStream, outBuf, outBufSize, - inStream, inData, inDataSize, - True, /* finished */ - progress); -} diff --git a/code/ryzom/client/src/seven_zip/Lzma2Enc.h b/code/ryzom/client/src/seven_zip/Lzma2Enc.h deleted file mode 100644 index 6a6110ff7..000000000 --- a/code/ryzom/client/src/seven_zip/Lzma2Enc.h +++ /dev/null @@ -1,55 +0,0 @@ -/* Lzma2Enc.h -- LZMA2 Encoder -2017-07-27 : Igor Pavlov : Public domain */ - -#ifndef __LZMA2_ENC_H -#define __LZMA2_ENC_H - -#include "LzmaEnc.h" - -EXTERN_C_BEGIN - -#define LZMA2_ENC_PROPS__BLOCK_SIZE__AUTO 0 -#define LZMA2_ENC_PROPS__BLOCK_SIZE__SOLID ((UInt64)(Int64)-1) - -typedef struct -{ - CLzmaEncProps lzmaProps; - UInt64 blockSize; - int numBlockThreads_Reduced; - int numBlockThreads_Max; - int numTotalThreads; -} CLzma2EncProps; - -void Lzma2EncProps_Init(CLzma2EncProps *p); -void Lzma2EncProps_Normalize(CLzma2EncProps *p); - -/* ---------- CLzmaEnc2Handle Interface ---------- */ - -/* Lzma2Enc_* functions can return the following exit codes: -SRes: - SZ_OK - OK - SZ_ERROR_MEM - Memory allocation error - SZ_ERROR_PARAM - Incorrect paramater in props - SZ_ERROR_WRITE - ISeqOutStream write callback error - SZ_ERROR_OUTPUT_EOF - output buffer overflow - version with (Byte *) output - SZ_ERROR_PROGRESS - some break from progress callback - SZ_ERROR_THREAD - error in multithreading functions (only for Mt version) -*/ - -typedef void * CLzma2EncHandle; - -CLzma2EncHandle Lzma2Enc_Create(ISzAllocPtr alloc, ISzAllocPtr allocBig); -void Lzma2Enc_Destroy(CLzma2EncHandle p); -SRes Lzma2Enc_SetProps(CLzma2EncHandle p, const CLzma2EncProps *props); -void Lzma2Enc_SetDataSize(CLzma2EncHandle p, UInt64 expectedDataSiize); -Byte Lzma2Enc_WriteProperties(CLzma2EncHandle p); -SRes Lzma2Enc_Encode2(CLzma2EncHandle p, - ISeqOutStream *outStream, - Byte *outBuf, size_t *outBufSize, - ISeqInStream *inStream, - const Byte *inData, size_t inDataSize, - ICompressProgress *progress); - -EXTERN_C_END - -#endif diff --git a/code/ryzom/client/src/seven_zip/Lzma86.h b/code/ryzom/client/src/seven_zip/Lzma86.h deleted file mode 100644 index bebed5cb7..000000000 --- a/code/ryzom/client/src/seven_zip/Lzma86.h +++ /dev/null @@ -1,111 +0,0 @@ -/* Lzma86.h -- LZMA + x86 (BCJ) Filter -2013-01-18 : Igor Pavlov : Public domain */ - -#ifndef __LZMA86_H -#define __LZMA86_H - -#include "7zTypes.h" - -EXTERN_C_BEGIN - -#define LZMA86_SIZE_OFFSET (1 + 5) -#define LZMA86_HEADER_SIZE (LZMA86_SIZE_OFFSET + 8) - -/* -It's an example for LZMA + x86 Filter use. -You can use .lzma86 extension, if you write that stream to file. -.lzma86 header adds one additional byte to standard .lzma header. -.lzma86 header (14 bytes): - Offset Size Description - 0 1 = 0 - no filter, pure LZMA - = 1 - x86 filter + LZMA - 1 1 lc, lp and pb in encoded form - 2 4 dictSize (little endian) - 6 8 uncompressed size (little endian) - - -Lzma86_Encode -------------- -level - compression level: 0 <= level <= 9, the default value for "level" is 5. - -dictSize - The dictionary size in bytes. The maximum value is - 128 MB = (1 << 27) bytes for 32-bit version - 1 GB = (1 << 30) bytes for 64-bit version - The default value is 16 MB = (1 << 24) bytes, for level = 5. - It's recommended to use the dictionary that is larger than 4 KB and - that can be calculated as (1 << N) or (3 << N) sizes. - For better compression ratio dictSize must be >= inSize. - -filterMode: - SZ_FILTER_NO - no Filter - SZ_FILTER_YES - x86 Filter - SZ_FILTER_AUTO - it tries both alternatives to select best. - Encoder will use 2 or 3 passes: - 2 passes when FILTER_NO provides better compression. - 3 passes when FILTER_YES provides better compression. - -Lzma86Encode allocates Data with MyAlloc functions. -RAM Requirements for compressing: - RamSize = dictionarySize * 11.5 + 6MB + FilterBlockSize - filterMode FilterBlockSize - SZ_FILTER_NO 0 - SZ_FILTER_YES inSize - SZ_FILTER_AUTO inSize - - -Return code: - SZ_OK - OK - SZ_ERROR_MEM - Memory allocation error - SZ_ERROR_PARAM - Incorrect paramater - SZ_ERROR_OUTPUT_EOF - output buffer overflow - SZ_ERROR_THREAD - errors in multithreading functions (only for Mt version) -*/ - -enum ESzFilterMode -{ - SZ_FILTER_NO, - SZ_FILTER_YES, - SZ_FILTER_AUTO -}; - -SRes Lzma86_Encode(Byte *dest, size_t *destLen, const Byte *src, size_t srcLen, - int level, UInt32 dictSize, int filterMode); - - -/* -Lzma86_GetUnpackSize: - In: - src - input data - srcLen - input data size - Out: - unpackSize - size of uncompressed stream - Return code: - SZ_OK - OK - SZ_ERROR_INPUT_EOF - Error in headers -*/ - -SRes Lzma86_GetUnpackSize(const Byte *src, SizeT srcLen, UInt64 *unpackSize); - -/* -Lzma86_Decode: - In: - dest - output data - destLen - output data size - src - input data - srcLen - input data size - Out: - destLen - processed output size - srcLen - processed input size - Return code: - SZ_OK - OK - SZ_ERROR_DATA - Data error - SZ_ERROR_MEM - Memory allocation error - SZ_ERROR_UNSUPPORTED - unsupported file - SZ_ERROR_INPUT_EOF - it needs more bytes in input buffer -*/ - -SRes Lzma86_Decode(Byte *dest, SizeT *destLen, const Byte *src, SizeT *srcLen); - -EXTERN_C_END - -#endif diff --git a/code/ryzom/client/src/seven_zip/Lzma86Dec.cpp b/code/ryzom/client/src/seven_zip/Lzma86Dec.cpp deleted file mode 100644 index 21031745c..000000000 --- a/code/ryzom/client/src/seven_zip/Lzma86Dec.cpp +++ /dev/null @@ -1,54 +0,0 @@ -/* Lzma86Dec.c -- LZMA + x86 (BCJ) Filter Decoder -2016-05-16 : Igor Pavlov : Public domain */ - -#include "Precomp.h" - -#include "Lzma86.h" - -#include "Alloc.h" -#include "Bra.h" -#include "LzmaDec.h" - -SRes Lzma86_GetUnpackSize(const Byte *src, SizeT srcLen, UInt64 *unpackSize) -{ - unsigned i; - if (srcLen < LZMA86_HEADER_SIZE) - return SZ_ERROR_INPUT_EOF; - *unpackSize = 0; - for (i = 0; i < sizeof(UInt64); i++) - *unpackSize += ((UInt64)src[LZMA86_SIZE_OFFSET + i]) << (8 * i); - return SZ_OK; -} - -SRes Lzma86_Decode(Byte *dest, SizeT *destLen, const Byte *src, SizeT *srcLen) -{ - SRes res; - int useFilter; - SizeT inSizePure; - ELzmaStatus status; - - if (*srcLen < LZMA86_HEADER_SIZE) - return SZ_ERROR_INPUT_EOF; - - useFilter = src[0]; - - if (useFilter > 1) - { - *destLen = 0; - return SZ_ERROR_UNSUPPORTED; - } - - inSizePure = *srcLen - LZMA86_HEADER_SIZE; - res = LzmaDecode(dest, destLen, src + LZMA86_HEADER_SIZE, &inSizePure, - src + 1, LZMA_PROPS_SIZE, LZMA_FINISH_ANY, &status, &g_Alloc); - *srcLen = inSizePure + LZMA86_HEADER_SIZE; - if (res != SZ_OK) - return res; - if (useFilter == 1) - { - UInt32 x86State; - x86_Convert_Init(x86State); - x86_Convert(dest, *destLen, 0, &x86State, 0); - } - return SZ_OK; -} diff --git a/code/ryzom/client/src/seven_zip/Lzma86Enc.cpp b/code/ryzom/client/src/seven_zip/Lzma86Enc.cpp deleted file mode 100644 index 2617bab8e..000000000 --- a/code/ryzom/client/src/seven_zip/Lzma86Enc.cpp +++ /dev/null @@ -1,106 +0,0 @@ -/* Lzma86Enc.c -- LZMA + x86 (BCJ) Filter Encoder -2018-07-04 : Igor Pavlov : Public domain */ - -#include "Precomp.h" - -#include - -#include "Lzma86.h" - -#include "Alloc.h" -#include "Bra.h" -#include "LzmaEnc.h" - -#define SZE_OUT_OVERFLOW SZE_DATA_ERROR - -int Lzma86_Encode(Byte *dest, size_t *destLen, const Byte *src, size_t srcLen, - int level, UInt32 dictSize, int filterMode) -{ - size_t outSize2 = *destLen; - Byte *filteredStream; - BoolInt useFilter; - int mainResult = SZ_ERROR_OUTPUT_EOF; - CLzmaEncProps props; - LzmaEncProps_Init(&props); - props.level = level; - props.dictSize = dictSize; - - *destLen = 0; - if (outSize2 < LZMA86_HEADER_SIZE) - return SZ_ERROR_OUTPUT_EOF; - - { - int i; - UInt64 t = srcLen; - for (i = 0; i < 8; i++, t >>= 8) - dest[LZMA86_SIZE_OFFSET + i] = (Byte)t; - } - - filteredStream = 0; - useFilter = (filterMode != SZ_FILTER_NO); - if (useFilter) - { - if (srcLen != 0) - { - filteredStream = (Byte *)MyAlloc(srcLen); - if (filteredStream == 0) - return SZ_ERROR_MEM; - memcpy(filteredStream, src, srcLen); - } - { - UInt32 x86State; - x86_Convert_Init(x86State); - x86_Convert(filteredStream, srcLen, 0, &x86State, 1); - } - } - - { - size_t minSize = 0; - BoolInt bestIsFiltered = False; - - /* passes for SZ_FILTER_AUTO: - 0 - BCJ + LZMA - 1 - LZMA - 2 - BCJ + LZMA agaian, if pass 0 (BCJ + LZMA) is better. - */ - int numPasses = (filterMode == SZ_FILTER_AUTO) ? 3 : 1; - - int i; - for (i = 0; i < numPasses; i++) - { - size_t outSizeProcessed = outSize2 - LZMA86_HEADER_SIZE; - size_t outPropsSize = 5; - SRes curRes; - BoolInt curModeIsFiltered = (numPasses > 1 && i == numPasses - 1); - if (curModeIsFiltered && !bestIsFiltered) - break; - if (useFilter && i == 0) - curModeIsFiltered = True; - - curRes = LzmaEncode(dest + LZMA86_HEADER_SIZE, &outSizeProcessed, - curModeIsFiltered ? filteredStream : src, srcLen, - &props, dest + 1, &outPropsSize, 0, - NULL, &g_Alloc, &g_Alloc); - - if (curRes != SZ_ERROR_OUTPUT_EOF) - { - if (curRes != SZ_OK) - { - mainResult = curRes; - break; - } - if (outSizeProcessed <= minSize || mainResult != SZ_OK) - { - minSize = outSizeProcessed; - bestIsFiltered = curModeIsFiltered; - mainResult = SZ_OK; - } - } - } - dest[0] = (Byte)(bestIsFiltered ? 1 : 0); - *destLen = LZMA86_HEADER_SIZE + minSize; - } - if (useFilter) - MyFree(filteredStream); - return mainResult; -} diff --git a/code/ryzom/client/src/seven_zip/LzmaDec.cpp b/code/ryzom/client/src/seven_zip/LzmaDec.cpp deleted file mode 100644 index ba3e1dd50..000000000 --- a/code/ryzom/client/src/seven_zip/LzmaDec.cpp +++ /dev/null @@ -1,1185 +0,0 @@ -/* LzmaDec.c -- LZMA Decoder -2018-07-04 : Igor Pavlov : Public domain */ - -#include "Precomp.h" - -#include - -/* #include "CpuArch.h" */ -#include "LzmaDec.h" - -#define kNumTopBits 24 -#define kTopValue ((UInt32)1 << kNumTopBits) - -#define kNumBitModelTotalBits 11 -#define kBitModelTotal (1 << kNumBitModelTotalBits) -#define kNumMoveBits 5 - -#define RC_INIT_SIZE 5 - -#define NORMALIZE if (range < kTopValue) { range <<= 8; code = (code << 8) | (*buf++); } - -#define IF_BIT_0(p) ttt = *(p); NORMALIZE; bound = (range >> kNumBitModelTotalBits) * (UInt32)ttt; if (code < bound) -#define UPDATE_0(p) range = bound; *(p) = (CLzmaProb)(ttt + ((kBitModelTotal - ttt) >> kNumMoveBits)); -#define UPDATE_1(p) range -= bound; code -= bound; *(p) = (CLzmaProb)(ttt - (ttt >> kNumMoveBits)); -#define GET_BIT2(p, i, A0, A1) IF_BIT_0(p) \ - { UPDATE_0(p); i = (i + i); A0; } else \ - { UPDATE_1(p); i = (i + i) + 1; A1; } - -#define TREE_GET_BIT(probs, i) { GET_BIT2(probs + i, i, ;, ;); } - -#define REV_BIT(p, i, A0, A1) IF_BIT_0(p + i) \ - { UPDATE_0(p + i); A0; } else \ - { UPDATE_1(p + i); A1; } -#define REV_BIT_VAR( p, i, m) REV_BIT(p, i, i += m; m += m, m += m; i += m; ) -#define REV_BIT_CONST(p, i, m) REV_BIT(p, i, i += m; , i += m * 2; ) -#define REV_BIT_LAST( p, i, m) REV_BIT(p, i, i -= m , ; ) - -#define TREE_DECODE(probs, limit, i) \ - { i = 1; do { TREE_GET_BIT(probs, i); } while (i < limit); i -= limit; } - -/* #define _LZMA_SIZE_OPT */ - -#ifdef _LZMA_SIZE_OPT -#define TREE_6_DECODE(probs, i) TREE_DECODE(probs, (1 << 6), i) -#else -#define TREE_6_DECODE(probs, i) \ - { i = 1; \ - TREE_GET_BIT(probs, i); \ - TREE_GET_BIT(probs, i); \ - TREE_GET_BIT(probs, i); \ - TREE_GET_BIT(probs, i); \ - TREE_GET_BIT(probs, i); \ - TREE_GET_BIT(probs, i); \ - i -= 0x40; } -#endif - -#define NORMAL_LITER_DEC TREE_GET_BIT(prob, symbol) -#define MATCHED_LITER_DEC \ - matchByte += matchByte; \ - bit = offs; \ - offs &= matchByte; \ - probLit = prob + (offs + bit + symbol); \ - GET_BIT2(probLit, symbol, offs ^= bit; , ;) - - - -#define NORMALIZE_CHECK if (range < kTopValue) { if (buf >= bufLimit) return DUMMY_ERROR; range <<= 8; code = (code << 8) | (*buf++); } - -#define IF_BIT_0_CHECK(p) ttt = *(p); NORMALIZE_CHECK; bound = (range >> kNumBitModelTotalBits) * (UInt32)ttt; if (code < bound) -#define UPDATE_0_CHECK range = bound; -#define UPDATE_1_CHECK range -= bound; code -= bound; -#define GET_BIT2_CHECK(p, i, A0, A1) IF_BIT_0_CHECK(p) \ - { UPDATE_0_CHECK; i = (i + i); A0; } else \ - { UPDATE_1_CHECK; i = (i + i) + 1; A1; } -#define GET_BIT_CHECK(p, i) GET_BIT2_CHECK(p, i, ; , ;) -#define TREE_DECODE_CHECK(probs, limit, i) \ - { i = 1; do { GET_BIT_CHECK(probs + i, i) } while (i < limit); i -= limit; } - - -#define REV_BIT_CHECK(p, i, m) IF_BIT_0_CHECK(p + i) \ - { UPDATE_0_CHECK; i += m; m += m; } else \ - { UPDATE_1_CHECK; m += m; i += m; } - - -#define kNumPosBitsMax 4 -#define kNumPosStatesMax (1 << kNumPosBitsMax) - -#define kLenNumLowBits 3 -#define kLenNumLowSymbols (1 << kLenNumLowBits) -#define kLenNumHighBits 8 -#define kLenNumHighSymbols (1 << kLenNumHighBits) - -#define LenLow 0 -#define LenHigh (LenLow + 2 * (kNumPosStatesMax << kLenNumLowBits)) -#define kNumLenProbs (LenHigh + kLenNumHighSymbols) - -#define LenChoice LenLow -#define LenChoice2 (LenLow + (1 << kLenNumLowBits)) - -#define kNumStates 12 -#define kNumStates2 16 -#define kNumLitStates 7 - -#define kStartPosModelIndex 4 -#define kEndPosModelIndex 14 -#define kNumFullDistances (1 << (kEndPosModelIndex >> 1)) - -#define kNumPosSlotBits 6 -#define kNumLenToPosStates 4 - -#define kNumAlignBits 4 -#define kAlignTableSize (1 << kNumAlignBits) - -#define kMatchMinLen 2 -#define kMatchSpecLenStart (kMatchMinLen + kLenNumLowSymbols * 2 + kLenNumHighSymbols) - -/* External ASM code needs same CLzmaProb array layout. So don't change it. */ - -/* (probs_1664) is faster and better for code size at some platforms */ -/* -#ifdef MY_CPU_X86_OR_AMD64 -*/ -#define kStartOffset 1664 -#define GET_PROBS p->probs_1664 -/* -#define GET_PROBS p->probs + kStartOffset -#else -#define kStartOffset 0 -#define GET_PROBS p->probs -#endif -*/ - -#define SpecPos (-kStartOffset) -#define IsRep0Long (SpecPos + kNumFullDistances) -#define RepLenCoder (IsRep0Long + (kNumStates2 << kNumPosBitsMax)) -#define LenCoder (RepLenCoder + kNumLenProbs) -#define IsMatch (LenCoder + kNumLenProbs) -#define Align (IsMatch + (kNumStates2 << kNumPosBitsMax)) -#define IsRep (Align + kAlignTableSize) -#define IsRepG0 (IsRep + kNumStates) -#define IsRepG1 (IsRepG0 + kNumStates) -#define IsRepG2 (IsRepG1 + kNumStates) -#define PosSlot (IsRepG2 + kNumStates) -#define Literal (PosSlot + (kNumLenToPosStates << kNumPosSlotBits)) -#define NUM_BASE_PROBS (Literal + kStartOffset) - -#if Align != 0 && kStartOffset != 0 - #error Stop_Compiling_Bad_LZMA_kAlign -#endif - -#if NUM_BASE_PROBS != 1984 - #error Stop_Compiling_Bad_LZMA_PROBS -#endif - - -#define LZMA_LIT_SIZE 0x300 - -#define LzmaProps_GetNumProbs(p) (NUM_BASE_PROBS + ((UInt32)LZMA_LIT_SIZE << ((p)->lc + (p)->lp))) - - -#define CALC_POS_STATE(processedPos, pbMask) (((processedPos) & (pbMask)) << 4) -#define COMBINED_PS_STATE (posState + state) -#define GET_LEN_STATE (posState) - -#define LZMA_DIC_MIN (1 << 12) - -/* -p->remainLen : shows status of LZMA decoder: - < kMatchSpecLenStart : normal remain - = kMatchSpecLenStart : finished - = kMatchSpecLenStart + 1 : need init range coder - = kMatchSpecLenStart + 2 : need init range coder and state -*/ - -/* ---------- LZMA_DECODE_REAL ---------- */ -/* -LzmaDec_DecodeReal_3() can be implemented in external ASM file. -3 - is the code compatibility version of that function for check at link time. -*/ - -#define LZMA_DECODE_REAL LzmaDec_DecodeReal_3 - -/* -LZMA_DECODE_REAL() -In: - RangeCoder is normalized - if (p->dicPos == limit) - { - LzmaDec_TryDummy() was called before to exclude LITERAL and MATCH-REP cases. - So first symbol can be only MATCH-NON-REP. And if that MATCH-NON-REP symbol - is not END_OF_PAYALOAD_MARKER, then function returns error code. - } - -Processing: - first LZMA symbol will be decoded in any case - All checks for limits are at the end of main loop, - It will decode new LZMA-symbols while (p->buf < bufLimit && dicPos < limit), - RangeCoder is still without last normalization when (p->buf < bufLimit) is being checked. - -Out: - RangeCoder is normalized - Result: - SZ_OK - OK - SZ_ERROR_DATA - Error - p->remainLen: - < kMatchSpecLenStart : normal remain - = kMatchSpecLenStart : finished -*/ - - -#ifdef _LZMA_DEC_OPT - -int MY_FAST_CALL LZMA_DECODE_REAL(CLzmaDec *p, SizeT limit, const Byte *bufLimit); - -#else - -static -int MY_FAST_CALL LZMA_DECODE_REAL(CLzmaDec *p, SizeT limit, const Byte *bufLimit) -{ - CLzmaProb *probs = GET_PROBS; - unsigned state = (unsigned)p->state; - UInt32 rep0 = p->reps[0], rep1 = p->reps[1], rep2 = p->reps[2], rep3 = p->reps[3]; - unsigned pbMask = ((unsigned)1 << (p->prop.pb)) - 1; - unsigned lc = p->prop.lc; - unsigned lpMask = ((unsigned)0x100 << p->prop.lp) - ((unsigned)0x100 >> lc); - - Byte *dic = p->dic; - SizeT dicBufSize = p->dicBufSize; - SizeT dicPos = p->dicPos; - - UInt32 processedPos = p->processedPos; - UInt32 checkDicSize = p->checkDicSize; - unsigned len = 0; - - const Byte *buf = p->buf; - UInt32 range = p->range; - UInt32 code = p->code; - - do - { - CLzmaProb *prob; - UInt32 bound; - unsigned ttt; - unsigned posState = CALC_POS_STATE(processedPos, pbMask); - - prob = probs + IsMatch + COMBINED_PS_STATE; - IF_BIT_0(prob) - { - unsigned symbol; - UPDATE_0(prob); - prob = probs + Literal; - if (processedPos != 0 || checkDicSize != 0) - prob += (UInt32)3 * ((((processedPos << 8) + dic[(dicPos == 0 ? dicBufSize : dicPos) - 1]) & lpMask) << lc); - processedPos++; - - if (state < kNumLitStates) - { - state -= (state < 4) ? state : 3; - symbol = 1; - #ifdef _LZMA_SIZE_OPT - do { NORMAL_LITER_DEC } while (symbol < 0x100); - #else - NORMAL_LITER_DEC - NORMAL_LITER_DEC - NORMAL_LITER_DEC - NORMAL_LITER_DEC - NORMAL_LITER_DEC - NORMAL_LITER_DEC - NORMAL_LITER_DEC - NORMAL_LITER_DEC - #endif - } - else - { - unsigned matchByte = dic[dicPos - rep0 + (dicPos < rep0 ? dicBufSize : 0)]; - unsigned offs = 0x100; - state -= (state < 10) ? 3 : 6; - symbol = 1; - #ifdef _LZMA_SIZE_OPT - do - { - unsigned bit; - CLzmaProb *probLit; - MATCHED_LITER_DEC - } - while (symbol < 0x100); - #else - { - unsigned bit; - CLzmaProb *probLit; - MATCHED_LITER_DEC - MATCHED_LITER_DEC - MATCHED_LITER_DEC - MATCHED_LITER_DEC - MATCHED_LITER_DEC - MATCHED_LITER_DEC - MATCHED_LITER_DEC - MATCHED_LITER_DEC - } - #endif - } - - dic[dicPos++] = (Byte)symbol; - continue; - } - - { - UPDATE_1(prob); - prob = probs + IsRep + state; - IF_BIT_0(prob) - { - UPDATE_0(prob); - state += kNumStates; - prob = probs + LenCoder; - } - else - { - UPDATE_1(prob); - /* - // that case was checked before with kBadRepCode - if (checkDicSize == 0 && processedPos == 0) - return SZ_ERROR_DATA; - */ - prob = probs + IsRepG0 + state; - IF_BIT_0(prob) - { - UPDATE_0(prob); - prob = probs + IsRep0Long + COMBINED_PS_STATE; - IF_BIT_0(prob) - { - UPDATE_0(prob); - dic[dicPos] = dic[dicPos - rep0 + (dicPos < rep0 ? dicBufSize : 0)]; - dicPos++; - processedPos++; - state = state < kNumLitStates ? 9 : 11; - continue; - } - UPDATE_1(prob); - } - else - { - UInt32 distance; - UPDATE_1(prob); - prob = probs + IsRepG1 + state; - IF_BIT_0(prob) - { - UPDATE_0(prob); - distance = rep1; - } - else - { - UPDATE_1(prob); - prob = probs + IsRepG2 + state; - IF_BIT_0(prob) - { - UPDATE_0(prob); - distance = rep2; - } - else - { - UPDATE_1(prob); - distance = rep3; - rep3 = rep2; - } - rep2 = rep1; - } - rep1 = rep0; - rep0 = distance; - } - state = state < kNumLitStates ? 8 : 11; - prob = probs + RepLenCoder; - } - - #ifdef _LZMA_SIZE_OPT - { - unsigned lim, offset; - CLzmaProb *probLen = prob + LenChoice; - IF_BIT_0(probLen) - { - UPDATE_0(probLen); - probLen = prob + LenLow + GET_LEN_STATE; - offset = 0; - lim = (1 << kLenNumLowBits); - } - else - { - UPDATE_1(probLen); - probLen = prob + LenChoice2; - IF_BIT_0(probLen) - { - UPDATE_0(probLen); - probLen = prob + LenLow + GET_LEN_STATE + (1 << kLenNumLowBits); - offset = kLenNumLowSymbols; - lim = (1 << kLenNumLowBits); - } - else - { - UPDATE_1(probLen); - probLen = prob + LenHigh; - offset = kLenNumLowSymbols * 2; - lim = (1 << kLenNumHighBits); - } - } - TREE_DECODE(probLen, lim, len); - len += offset; - } - #else - { - CLzmaProb *probLen = prob + LenChoice; - IF_BIT_0(probLen) - { - UPDATE_0(probLen); - probLen = prob + LenLow + GET_LEN_STATE; - len = 1; - TREE_GET_BIT(probLen, len); - TREE_GET_BIT(probLen, len); - TREE_GET_BIT(probLen, len); - len -= 8; - } - else - { - UPDATE_1(probLen); - probLen = prob + LenChoice2; - IF_BIT_0(probLen) - { - UPDATE_0(probLen); - probLen = prob + LenLow + GET_LEN_STATE + (1 << kLenNumLowBits); - len = 1; - TREE_GET_BIT(probLen, len); - TREE_GET_BIT(probLen, len); - TREE_GET_BIT(probLen, len); - } - else - { - UPDATE_1(probLen); - probLen = prob + LenHigh; - TREE_DECODE(probLen, (1 << kLenNumHighBits), len); - len += kLenNumLowSymbols * 2; - } - } - } - #endif - - if (state >= kNumStates) - { - UInt32 distance; - prob = probs + PosSlot + - ((len < kNumLenToPosStates ? len : kNumLenToPosStates - 1) << kNumPosSlotBits); - TREE_6_DECODE(prob, distance); - if (distance >= kStartPosModelIndex) - { - unsigned posSlot = (unsigned)distance; - unsigned numDirectBits = (unsigned)(((distance >> 1) - 1)); - distance = (2 | (distance & 1)); - if (posSlot < kEndPosModelIndex) - { - distance <<= numDirectBits; - prob = probs + SpecPos; - { - UInt32 m = 1; - distance++; - do - { - REV_BIT_VAR(prob, distance, m); - } - while (--numDirectBits); - distance -= m; - } - } - else - { - numDirectBits -= kNumAlignBits; - do - { - NORMALIZE - range >>= 1; - - { - UInt32 t; - code -= range; - t = (0 - ((UInt32)code >> 31)); /* (UInt32)((Int32)code >> 31) */ - distance = (distance << 1) + (t + 1); - code += range & t; - } - /* - distance <<= 1; - if (code >= range) - { - code -= range; - distance |= 1; - } - */ - } - while (--numDirectBits); - prob = probs + Align; - distance <<= kNumAlignBits; - { - unsigned i = 1; - REV_BIT_CONST(prob, i, 1); - REV_BIT_CONST(prob, i, 2); - REV_BIT_CONST(prob, i, 4); - REV_BIT_LAST (prob, i, 8); - distance |= i; - } - if (distance == (UInt32)0xFFFFFFFF) - { - len = kMatchSpecLenStart; - state -= kNumStates; - break; - } - } - } - - rep3 = rep2; - rep2 = rep1; - rep1 = rep0; - rep0 = distance + 1; - state = (state < kNumStates + kNumLitStates) ? kNumLitStates : kNumLitStates + 3; - if (distance >= (checkDicSize == 0 ? processedPos: checkDicSize)) - { - p->dicPos = dicPos; - return SZ_ERROR_DATA; - } - } - - len += kMatchMinLen; - - { - SizeT rem; - unsigned curLen; - SizeT pos; - - if ((rem = limit - dicPos) == 0) - { - p->dicPos = dicPos; - return SZ_ERROR_DATA; - } - - curLen = ((rem < len) ? (unsigned)rem : len); - pos = dicPos - rep0 + (dicPos < rep0 ? dicBufSize : 0); - - processedPos += (UInt32)curLen; - - len -= curLen; - if (curLen <= dicBufSize - pos) - { - Byte *dest = dic + dicPos; - ptrdiff_t src = (ptrdiff_t)pos - (ptrdiff_t)dicPos; - const Byte *lim = dest + curLen; - dicPos += (SizeT)curLen; - do - *(dest) = (Byte)*(dest + src); - while (++dest != lim); - } - else - { - do - { - dic[dicPos++] = dic[pos]; - if (++pos == dicBufSize) - pos = 0; - } - while (--curLen != 0); - } - } - } - } - while (dicPos < limit && buf < bufLimit); - - NORMALIZE; - - p->buf = buf; - p->range = range; - p->code = code; - p->remainLen = (UInt32)len; - p->dicPos = dicPos; - p->processedPos = processedPos; - p->reps[0] = rep0; - p->reps[1] = rep1; - p->reps[2] = rep2; - p->reps[3] = rep3; - p->state = (UInt32)state; - - return SZ_OK; -} -#endif - -static void MY_FAST_CALL LzmaDec_WriteRem(CLzmaDec *p, SizeT limit) -{ - if (p->remainLen != 0 && p->remainLen < kMatchSpecLenStart) - { - Byte *dic = p->dic; - SizeT dicPos = p->dicPos; - SizeT dicBufSize = p->dicBufSize; - unsigned len = (unsigned)p->remainLen; - SizeT rep0 = p->reps[0]; /* we use SizeT to avoid the BUG of VC14 for AMD64 */ - SizeT rem = limit - dicPos; - if (rem < len) - len = (unsigned)(rem); - - if (p->checkDicSize == 0 && p->prop.dicSize - p->processedPos <= len) - p->checkDicSize = p->prop.dicSize; - - p->processedPos += (UInt32)len; - p->remainLen -= (UInt32)len; - while (len != 0) - { - len--; - dic[dicPos] = dic[dicPos - rep0 + (dicPos < rep0 ? dicBufSize : 0)]; - dicPos++; - } - p->dicPos = dicPos; - } -} - - -#define kRange0 0xFFFFFFFF -#define kBound0 ((kRange0 >> kNumBitModelTotalBits) << (kNumBitModelTotalBits - 1)) -#define kBadRepCode (kBound0 + (((kRange0 - kBound0) >> kNumBitModelTotalBits) << (kNumBitModelTotalBits - 1))) -#if kBadRepCode != (0xC0000000 - 0x400) - #error Stop_Compiling_Bad_LZMA_Check -#endif - -static int MY_FAST_CALL LzmaDec_DecodeReal2(CLzmaDec *p, SizeT limit, const Byte *bufLimit) -{ - do - { - SizeT limit2 = limit; - if (p->checkDicSize == 0) - { - UInt32 rem = p->prop.dicSize - p->processedPos; - if (limit - p->dicPos > rem) - limit2 = p->dicPos + rem; - - if (p->processedPos == 0) - if (p->code >= kBadRepCode) - return SZ_ERROR_DATA; - } - - RINOK(LZMA_DECODE_REAL(p, limit2, bufLimit)); - - if (p->checkDicSize == 0 && p->processedPos >= p->prop.dicSize) - p->checkDicSize = p->prop.dicSize; - - LzmaDec_WriteRem(p, limit); - } - while (p->dicPos < limit && p->buf < bufLimit && p->remainLen < kMatchSpecLenStart); - - return 0; -} - -typedef enum -{ - DUMMY_ERROR, /* unexpected end of input stream */ - DUMMY_LIT, - DUMMY_MATCH, - DUMMY_REP -} ELzmaDummy; - -static ELzmaDummy LzmaDec_TryDummy(const CLzmaDec *p, const Byte *buf, SizeT inSize) -{ - UInt32 range = p->range; - UInt32 code = p->code; - const Byte *bufLimit = buf + inSize; - const CLzmaProb *probs = GET_PROBS; - unsigned state = (unsigned)p->state; - ELzmaDummy res; - - { - const CLzmaProb *prob; - UInt32 bound; - unsigned ttt; - unsigned posState = CALC_POS_STATE(p->processedPos, (1 << p->prop.pb) - 1); - - prob = probs + IsMatch + COMBINED_PS_STATE; - IF_BIT_0_CHECK(prob) - { - UPDATE_0_CHECK - - /* if (bufLimit - buf >= 7) return DUMMY_LIT; */ - - prob = probs + Literal; - if (p->checkDicSize != 0 || p->processedPos != 0) - prob += ((UInt32)LZMA_LIT_SIZE * - ((((p->processedPos) & ((1 << (p->prop.lp)) - 1)) << p->prop.lc) + - (p->dic[(p->dicPos == 0 ? p->dicBufSize : p->dicPos) - 1] >> (8 - p->prop.lc)))); - - if (state < kNumLitStates) - { - unsigned symbol = 1; - do { GET_BIT_CHECK(prob + symbol, symbol) } while (symbol < 0x100); - } - else - { - unsigned matchByte = p->dic[p->dicPos - p->reps[0] + - (p->dicPos < p->reps[0] ? p->dicBufSize : 0)]; - unsigned offs = 0x100; - unsigned symbol = 1; - do - { - unsigned bit; - const CLzmaProb *probLit; - matchByte += matchByte; - bit = offs; - offs &= matchByte; - probLit = prob + (offs + bit + symbol); - GET_BIT2_CHECK(probLit, symbol, offs ^= bit; , ; ) - } - while (symbol < 0x100); - } - res = DUMMY_LIT; - } - else - { - unsigned len; - UPDATE_1_CHECK; - - prob = probs + IsRep + state; - IF_BIT_0_CHECK(prob) - { - UPDATE_0_CHECK; - state = 0; - prob = probs + LenCoder; - res = DUMMY_MATCH; - } - else - { - UPDATE_1_CHECK; - res = DUMMY_REP; - prob = probs + IsRepG0 + state; - IF_BIT_0_CHECK(prob) - { - UPDATE_0_CHECK; - prob = probs + IsRep0Long + COMBINED_PS_STATE; - IF_BIT_0_CHECK(prob) - { - UPDATE_0_CHECK; - NORMALIZE_CHECK; - return DUMMY_REP; - } - else - { - UPDATE_1_CHECK; - } - } - else - { - UPDATE_1_CHECK; - prob = probs + IsRepG1 + state; - IF_BIT_0_CHECK(prob) - { - UPDATE_0_CHECK; - } - else - { - UPDATE_1_CHECK; - prob = probs + IsRepG2 + state; - IF_BIT_0_CHECK(prob) - { - UPDATE_0_CHECK; - } - else - { - UPDATE_1_CHECK; - } - } - } - state = kNumStates; - prob = probs + RepLenCoder; - } - { - unsigned limit, offset; - const CLzmaProb *probLen = prob + LenChoice; - IF_BIT_0_CHECK(probLen) - { - UPDATE_0_CHECK; - probLen = prob + LenLow + GET_LEN_STATE; - offset = 0; - limit = 1 << kLenNumLowBits; - } - else - { - UPDATE_1_CHECK; - probLen = prob + LenChoice2; - IF_BIT_0_CHECK(probLen) - { - UPDATE_0_CHECK; - probLen = prob + LenLow + GET_LEN_STATE + (1 << kLenNumLowBits); - offset = kLenNumLowSymbols; - limit = 1 << kLenNumLowBits; - } - else - { - UPDATE_1_CHECK; - probLen = prob + LenHigh; - offset = kLenNumLowSymbols * 2; - limit = 1 << kLenNumHighBits; - } - } - TREE_DECODE_CHECK(probLen, limit, len); - len += offset; - } - - if (state < 4) - { - unsigned posSlot; - prob = probs + PosSlot + - ((len < kNumLenToPosStates - 1 ? len : kNumLenToPosStates - 1) << - kNumPosSlotBits); - TREE_DECODE_CHECK(prob, 1 << kNumPosSlotBits, posSlot); - if (posSlot >= kStartPosModelIndex) - { - unsigned numDirectBits = ((posSlot >> 1) - 1); - - /* if (bufLimit - buf >= 8) return DUMMY_MATCH; */ - - if (posSlot < kEndPosModelIndex) - { - prob = probs + SpecPos + ((2 | (posSlot & 1)) << numDirectBits); - } - else - { - numDirectBits -= kNumAlignBits; - do - { - NORMALIZE_CHECK - range >>= 1; - code -= range & (((code - range) >> 31) - 1); - /* if (code >= range) code -= range; */ - } - while (--numDirectBits); - prob = probs + Align; - numDirectBits = kNumAlignBits; - } - { - unsigned i = 1; - unsigned m = 1; - do - { - REV_BIT_CHECK(prob, i, m); - } - while (--numDirectBits); - } - } - } - } - } - NORMALIZE_CHECK; - return res; -} - - -void LzmaDec_InitDicAndState(CLzmaDec *p, BoolInt initDic, BoolInt initState) -{ - p->remainLen = kMatchSpecLenStart + 1; - p->tempBufSize = 0; - - if (initDic) - { - p->processedPos = 0; - p->checkDicSize = 0; - p->remainLen = kMatchSpecLenStart + 2; - } - if (initState) - p->remainLen = kMatchSpecLenStart + 2; -} - -void LzmaDec_Init(CLzmaDec *p) -{ - p->dicPos = 0; - LzmaDec_InitDicAndState(p, True, True); -} - - -SRes LzmaDec_DecodeToDic(CLzmaDec *p, SizeT dicLimit, const Byte *src, SizeT *srcLen, - ELzmaFinishMode finishMode, ELzmaStatus *status) -{ - SizeT inSize = *srcLen; - (*srcLen) = 0; - - *status = LZMA_STATUS_NOT_SPECIFIED; - - if (p->remainLen > kMatchSpecLenStart) - { - for (; inSize > 0 && p->tempBufSize < RC_INIT_SIZE; (*srcLen)++, inSize--) - p->tempBuf[p->tempBufSize++] = *src++; - if (p->tempBufSize != 0 && p->tempBuf[0] != 0) - return SZ_ERROR_DATA; - if (p->tempBufSize < RC_INIT_SIZE) - { - *status = LZMA_STATUS_NEEDS_MORE_INPUT; - return SZ_OK; - } - p->code = - ((UInt32)p->tempBuf[1] << 24) - | ((UInt32)p->tempBuf[2] << 16) - | ((UInt32)p->tempBuf[3] << 8) - | ((UInt32)p->tempBuf[4]); - p->range = 0xFFFFFFFF; - p->tempBufSize = 0; - - if (p->remainLen > kMatchSpecLenStart + 1) - { - SizeT numProbs = LzmaProps_GetNumProbs(&p->prop); - SizeT i; - CLzmaProb *probs = p->probs; - for (i = 0; i < numProbs; i++) - probs[i] = kBitModelTotal >> 1; - p->reps[0] = p->reps[1] = p->reps[2] = p->reps[3] = 1; - p->state = 0; - } - - p->remainLen = 0; - } - - LzmaDec_WriteRem(p, dicLimit); - - while (p->remainLen != kMatchSpecLenStart) - { - int checkEndMarkNow = 0; - - if (p->dicPos >= dicLimit) - { - if (p->remainLen == 0 && p->code == 0) - { - *status = LZMA_STATUS_MAYBE_FINISHED_WITHOUT_MARK; - return SZ_OK; - } - if (finishMode == LZMA_FINISH_ANY) - { - *status = LZMA_STATUS_NOT_FINISHED; - return SZ_OK; - } - if (p->remainLen != 0) - { - *status = LZMA_STATUS_NOT_FINISHED; - return SZ_ERROR_DATA; - } - checkEndMarkNow = 1; - } - - if (p->tempBufSize == 0) - { - SizeT processed; - const Byte *bufLimit; - if (inSize < LZMA_REQUIRED_INPUT_MAX || checkEndMarkNow) - { - int dummyRes = LzmaDec_TryDummy(p, src, inSize); - if (dummyRes == DUMMY_ERROR) - { - memcpy(p->tempBuf, src, inSize); - p->tempBufSize = (unsigned)inSize; - (*srcLen) += inSize; - *status = LZMA_STATUS_NEEDS_MORE_INPUT; - return SZ_OK; - } - if (checkEndMarkNow && dummyRes != DUMMY_MATCH) - { - *status = LZMA_STATUS_NOT_FINISHED; - return SZ_ERROR_DATA; - } - bufLimit = src; - } - else - bufLimit = src + inSize - LZMA_REQUIRED_INPUT_MAX; - p->buf = src; - if (LzmaDec_DecodeReal2(p, dicLimit, bufLimit) != 0) - return SZ_ERROR_DATA; - processed = (SizeT)(p->buf - src); - (*srcLen) += processed; - src += processed; - inSize -= processed; - } - else - { - unsigned rem = p->tempBufSize, lookAhead = 0; - while (rem < LZMA_REQUIRED_INPUT_MAX && lookAhead < inSize) - p->tempBuf[rem++] = src[lookAhead++]; - p->tempBufSize = rem; - if (rem < LZMA_REQUIRED_INPUT_MAX || checkEndMarkNow) - { - int dummyRes = LzmaDec_TryDummy(p, p->tempBuf, (SizeT)rem); - if (dummyRes == DUMMY_ERROR) - { - (*srcLen) += (SizeT)lookAhead; - *status = LZMA_STATUS_NEEDS_MORE_INPUT; - return SZ_OK; - } - if (checkEndMarkNow && dummyRes != DUMMY_MATCH) - { - *status = LZMA_STATUS_NOT_FINISHED; - return SZ_ERROR_DATA; - } - } - p->buf = p->tempBuf; - if (LzmaDec_DecodeReal2(p, dicLimit, p->buf) != 0) - return SZ_ERROR_DATA; - - { - unsigned kkk = (unsigned)(p->buf - p->tempBuf); - if (rem < kkk) - return SZ_ERROR_FAIL; /* some internal error */ - rem -= kkk; - if (lookAhead < rem) - return SZ_ERROR_FAIL; /* some internal error */ - lookAhead -= rem; - } - (*srcLen) += (SizeT)lookAhead; - src += lookAhead; - inSize -= (SizeT)lookAhead; - p->tempBufSize = 0; - } - } - - if (p->code != 0) - return SZ_ERROR_DATA; - *status = LZMA_STATUS_FINISHED_WITH_MARK; - return SZ_OK; -} - - -SRes LzmaDec_DecodeToBuf(CLzmaDec *p, Byte *dest, SizeT *destLen, const Byte *src, SizeT *srcLen, ELzmaFinishMode finishMode, ELzmaStatus *status) -{ - SizeT outSize = *destLen; - SizeT inSize = *srcLen; - *srcLen = *destLen = 0; - for (;;) - { - SizeT inSizeCur = inSize, outSizeCur, dicPos; - ELzmaFinishMode curFinishMode; - SRes res; - if (p->dicPos == p->dicBufSize) - p->dicPos = 0; - dicPos = p->dicPos; - if (outSize > p->dicBufSize - dicPos) - { - outSizeCur = p->dicBufSize; - curFinishMode = LZMA_FINISH_ANY; - } - else - { - outSizeCur = dicPos + outSize; - curFinishMode = finishMode; - } - - res = LzmaDec_DecodeToDic(p, outSizeCur, src, &inSizeCur, curFinishMode, status); - src += inSizeCur; - inSize -= inSizeCur; - *srcLen += inSizeCur; - outSizeCur = p->dicPos - dicPos; - memcpy(dest, p->dic + dicPos, outSizeCur); - dest += outSizeCur; - outSize -= outSizeCur; - *destLen += outSizeCur; - if (res != 0) - return res; - if (outSizeCur == 0 || outSize == 0) - return SZ_OK; - } -} - -void LzmaDec_FreeProbs(CLzmaDec *p, ISzAllocPtr alloc) -{ - ISzAlloc_Free(alloc, p->probs); - p->probs = NULL; -} - -static void LzmaDec_FreeDict(CLzmaDec *p, ISzAllocPtr alloc) -{ - ISzAlloc_Free(alloc, p->dic); - p->dic = NULL; -} - -void LzmaDec_Free(CLzmaDec *p, ISzAllocPtr alloc) -{ - LzmaDec_FreeProbs(p, alloc); - LzmaDec_FreeDict(p, alloc); -} - -SRes LzmaProps_Decode(CLzmaProps *p, const Byte *data, unsigned size) -{ - UInt32 dicSize; - Byte d; - - if (size < LZMA_PROPS_SIZE) - return SZ_ERROR_UNSUPPORTED; - else - dicSize = data[1] | ((UInt32)data[2] << 8) | ((UInt32)data[3] << 16) | ((UInt32)data[4] << 24); - - if (dicSize < LZMA_DIC_MIN) - dicSize = LZMA_DIC_MIN; - p->dicSize = dicSize; - - d = data[0]; - if (d >= (9 * 5 * 5)) - return SZ_ERROR_UNSUPPORTED; - - p->lc = (Byte)(d % 9); - d /= 9; - p->pb = (Byte)(d / 5); - p->lp = (Byte)(d % 5); - - return SZ_OK; -} - -static SRes LzmaDec_AllocateProbs2(CLzmaDec *p, const CLzmaProps *propNew, ISzAllocPtr alloc) -{ - UInt32 numProbs = LzmaProps_GetNumProbs(propNew); - if (!p->probs || numProbs != p->numProbs) - { - LzmaDec_FreeProbs(p, alloc); - p->probs = (CLzmaProb *)ISzAlloc_Alloc(alloc, numProbs * sizeof(CLzmaProb)); - if (!p->probs) - return SZ_ERROR_MEM; - p->probs_1664 = p->probs + 1664; - p->numProbs = numProbs; - } - return SZ_OK; -} - -SRes LzmaDec_AllocateProbs(CLzmaDec *p, const Byte *props, unsigned propsSize, ISzAllocPtr alloc) -{ - CLzmaProps propNew; - RINOK(LzmaProps_Decode(&propNew, props, propsSize)); - RINOK(LzmaDec_AllocateProbs2(p, &propNew, alloc)); - p->prop = propNew; - return SZ_OK; -} - -SRes LzmaDec_Allocate(CLzmaDec *p, const Byte *props, unsigned propsSize, ISzAllocPtr alloc) -{ - CLzmaProps propNew; - SizeT dicBufSize; - RINOK(LzmaProps_Decode(&propNew, props, propsSize)); - RINOK(LzmaDec_AllocateProbs2(p, &propNew, alloc)); - - { - UInt32 dictSize = propNew.dicSize; - SizeT mask = ((UInt32)1 << 12) - 1; - if (dictSize >= ((UInt32)1 << 30)) mask = ((UInt32)1 << 22) - 1; - else if (dictSize >= ((UInt32)1 << 22)) mask = ((UInt32)1 << 20) - 1;; - dicBufSize = ((SizeT)dictSize + mask) & ~mask; - if (dicBufSize < dictSize) - dicBufSize = dictSize; - } - - if (!p->dic || dicBufSize != p->dicBufSize) - { - LzmaDec_FreeDict(p, alloc); - p->dic = (Byte *)ISzAlloc_Alloc(alloc, dicBufSize); - if (!p->dic) - { - LzmaDec_FreeProbs(p, alloc); - return SZ_ERROR_MEM; - } - } - p->dicBufSize = dicBufSize; - p->prop = propNew; - return SZ_OK; -} - -SRes LzmaDecode(Byte *dest, SizeT *destLen, const Byte *src, SizeT *srcLen, - const Byte *propData, unsigned propSize, ELzmaFinishMode finishMode, - ELzmaStatus *status, ISzAllocPtr alloc) -{ - CLzmaDec p; - SRes res; - SizeT outSize = *destLen, inSize = *srcLen; - *destLen = *srcLen = 0; - *status = LZMA_STATUS_NOT_SPECIFIED; - if (inSize < RC_INIT_SIZE) - return SZ_ERROR_INPUT_EOF; - LzmaDec_Construct(&p); - RINOK(LzmaDec_AllocateProbs(&p, propData, propSize, alloc)); - p.dic = dest; - p.dicBufSize = outSize; - LzmaDec_Init(&p); - *srcLen = inSize; - res = LzmaDec_DecodeToDic(&p, outSize, src, srcLen, finishMode, status); - *destLen = p.dicPos; - if (res == SZ_OK && *status == LZMA_STATUS_NEEDS_MORE_INPUT) - res = SZ_ERROR_INPUT_EOF; - LzmaDec_FreeProbs(&p, alloc); - return res; -} diff --git a/code/ryzom/client/src/seven_zip/LzmaDec.h b/code/ryzom/client/src/seven_zip/LzmaDec.h deleted file mode 100644 index 1f0927ab1..000000000 --- a/code/ryzom/client/src/seven_zip/LzmaDec.h +++ /dev/null @@ -1,234 +0,0 @@ -/* LzmaDec.h -- LZMA Decoder -2018-04-21 : Igor Pavlov : Public domain */ - -#ifndef __LZMA_DEC_H -#define __LZMA_DEC_H - -#include "7zTypes.h" - -EXTERN_C_BEGIN - -/* #define _LZMA_PROB32 */ -/* _LZMA_PROB32 can increase the speed on some CPUs, - but memory usage for CLzmaDec::probs will be doubled in that case */ - -typedef -#ifdef _LZMA_PROB32 - UInt32 -#else - UInt16 -#endif - CLzmaProb; - - -/* ---------- LZMA Properties ---------- */ - -#define LZMA_PROPS_SIZE 5 - -typedef struct _CLzmaProps -{ - Byte lc; - Byte lp; - Byte pb; - Byte _pad_; - UInt32 dicSize; -} CLzmaProps; - -/* LzmaProps_Decode - decodes properties -Returns: - SZ_OK - SZ_ERROR_UNSUPPORTED - Unsupported properties -*/ - -SRes LzmaProps_Decode(CLzmaProps *p, const Byte *data, unsigned size); - - -/* ---------- LZMA Decoder state ---------- */ - -/* LZMA_REQUIRED_INPUT_MAX = number of required input bytes for worst case. - Num bits = log2((2^11 / 31) ^ 22) + 26 < 134 + 26 = 160; */ - -#define LZMA_REQUIRED_INPUT_MAX 20 - -typedef struct -{ - /* Don't change this structure. ASM code can use it. */ - CLzmaProps prop; - CLzmaProb *probs; - CLzmaProb *probs_1664; - Byte *dic; - SizeT dicBufSize; - SizeT dicPos; - const Byte *buf; - UInt32 range; - UInt32 code; - UInt32 processedPos; - UInt32 checkDicSize; - UInt32 reps[4]; - UInt32 state; - UInt32 remainLen; - - UInt32 numProbs; - unsigned tempBufSize; - Byte tempBuf[LZMA_REQUIRED_INPUT_MAX]; -} CLzmaDec; - -#define LzmaDec_Construct(p) { (p)->dic = NULL; (p)->probs = NULL; } - -void LzmaDec_Init(CLzmaDec *p); - -/* There are two types of LZMA streams: - - Stream with end mark. That end mark adds about 6 bytes to compressed size. - - Stream without end mark. You must know exact uncompressed size to decompress such stream. */ - -typedef enum -{ - LZMA_FINISH_ANY, /* finish at any point */ - LZMA_FINISH_END /* block must be finished at the end */ -} ELzmaFinishMode; - -/* ELzmaFinishMode has meaning only if the decoding reaches output limit !!! - - You must use LZMA_FINISH_END, when you know that current output buffer - covers last bytes of block. In other cases you must use LZMA_FINISH_ANY. - - If LZMA decoder sees end marker before reaching output limit, it returns SZ_OK, - and output value of destLen will be less than output buffer size limit. - You can check status result also. - - You can use multiple checks to test data integrity after full decompression: - 1) Check Result and "status" variable. - 2) Check that output(destLen) = uncompressedSize, if you know real uncompressedSize. - 3) Check that output(srcLen) = compressedSize, if you know real compressedSize. - You must use correct finish mode in that case. */ - -typedef enum -{ - LZMA_STATUS_NOT_SPECIFIED, /* use main error code instead */ - LZMA_STATUS_FINISHED_WITH_MARK, /* stream was finished with end mark. */ - LZMA_STATUS_NOT_FINISHED, /* stream was not finished */ - LZMA_STATUS_NEEDS_MORE_INPUT, /* you must provide more input bytes */ - LZMA_STATUS_MAYBE_FINISHED_WITHOUT_MARK /* there is probability that stream was finished without end mark */ -} ELzmaStatus; - -/* ELzmaStatus is used only as output value for function call */ - - -/* ---------- Interfaces ---------- */ - -/* There are 3 levels of interfaces: - 1) Dictionary Interface - 2) Buffer Interface - 3) One Call Interface - You can select any of these interfaces, but don't mix functions from different - groups for same object. */ - - -/* There are two variants to allocate state for Dictionary Interface: - 1) LzmaDec_Allocate / LzmaDec_Free - 2) LzmaDec_AllocateProbs / LzmaDec_FreeProbs - You can use variant 2, if you set dictionary buffer manually. - For Buffer Interface you must always use variant 1. - -LzmaDec_Allocate* can return: - SZ_OK - SZ_ERROR_MEM - Memory allocation error - SZ_ERROR_UNSUPPORTED - Unsupported properties -*/ - -SRes LzmaDec_AllocateProbs(CLzmaDec *p, const Byte *props, unsigned propsSize, ISzAllocPtr alloc); -void LzmaDec_FreeProbs(CLzmaDec *p, ISzAllocPtr alloc); - -SRes LzmaDec_Allocate(CLzmaDec *p, const Byte *props, unsigned propsSize, ISzAllocPtr alloc); -void LzmaDec_Free(CLzmaDec *p, ISzAllocPtr alloc); - -/* ---------- Dictionary Interface ---------- */ - -/* You can use it, if you want to eliminate the overhead for data copying from - dictionary to some other external buffer. - You must work with CLzmaDec variables directly in this interface. - - STEPS: - LzmaDec_Construct() - LzmaDec_Allocate() - for (each new stream) - { - LzmaDec_Init() - while (it needs more decompression) - { - LzmaDec_DecodeToDic() - use data from CLzmaDec::dic and update CLzmaDec::dicPos - } - } - LzmaDec_Free() -*/ - -/* LzmaDec_DecodeToDic - - The decoding to internal dictionary buffer (CLzmaDec::dic). - You must manually update CLzmaDec::dicPos, if it reaches CLzmaDec::dicBufSize !!! - -finishMode: - It has meaning only if the decoding reaches output limit (dicLimit). - LZMA_FINISH_ANY - Decode just dicLimit bytes. - LZMA_FINISH_END - Stream must be finished after dicLimit. - -Returns: - SZ_OK - status: - LZMA_STATUS_FINISHED_WITH_MARK - LZMA_STATUS_NOT_FINISHED - LZMA_STATUS_NEEDS_MORE_INPUT - LZMA_STATUS_MAYBE_FINISHED_WITHOUT_MARK - SZ_ERROR_DATA - Data error -*/ - -SRes LzmaDec_DecodeToDic(CLzmaDec *p, SizeT dicLimit, - const Byte *src, SizeT *srcLen, ELzmaFinishMode finishMode, ELzmaStatus *status); - - -/* ---------- Buffer Interface ---------- */ - -/* It's zlib-like interface. - See LzmaDec_DecodeToDic description for information about STEPS and return results, - but you must use LzmaDec_DecodeToBuf instead of LzmaDec_DecodeToDic and you don't need - to work with CLzmaDec variables manually. - -finishMode: - It has meaning only if the decoding reaches output limit (*destLen). - LZMA_FINISH_ANY - Decode just destLen bytes. - LZMA_FINISH_END - Stream must be finished after (*destLen). -*/ - -SRes LzmaDec_DecodeToBuf(CLzmaDec *p, Byte *dest, SizeT *destLen, - const Byte *src, SizeT *srcLen, ELzmaFinishMode finishMode, ELzmaStatus *status); - - -/* ---------- One Call Interface ---------- */ - -/* LzmaDecode - -finishMode: - It has meaning only if the decoding reaches output limit (*destLen). - LZMA_FINISH_ANY - Decode just destLen bytes. - LZMA_FINISH_END - Stream must be finished after (*destLen). - -Returns: - SZ_OK - status: - LZMA_STATUS_FINISHED_WITH_MARK - LZMA_STATUS_NOT_FINISHED - LZMA_STATUS_MAYBE_FINISHED_WITHOUT_MARK - SZ_ERROR_DATA - Data error - SZ_ERROR_MEM - Memory allocation error - SZ_ERROR_UNSUPPORTED - Unsupported properties - SZ_ERROR_INPUT_EOF - It needs more bytes in input buffer (src). -*/ - -SRes LzmaDecode(Byte *dest, SizeT *destLen, const Byte *src, SizeT *srcLen, - const Byte *propData, unsigned propSize, ELzmaFinishMode finishMode, - ELzmaStatus *status, ISzAllocPtr alloc); - -EXTERN_C_END - -#endif diff --git a/code/ryzom/client/src/seven_zip/LzmaEnc.cpp b/code/ryzom/client/src/seven_zip/LzmaEnc.cpp deleted file mode 100644 index 54d0d0507..000000000 --- a/code/ryzom/client/src/seven_zip/LzmaEnc.cpp +++ /dev/null @@ -1,2978 +0,0 @@ -/* LzmaEnc.c -- LZMA Encoder -2019-01-10: Igor Pavlov : Public domain */ - -#include "Precomp.h" - -#include - -#define _7ZIP_ST - -/* #define SHOW_STAT */ -/* #define SHOW_STAT2 */ - -#if defined(SHOW_STAT) || defined(SHOW_STAT2) -#include -#endif - -#include "LzmaEnc.h" - -#include "LzFind.h" -#ifndef _7ZIP_ST -#include "LzFindMt.h" -#endif - -#ifdef SHOW_STAT -static unsigned g_STAT_OFFSET = 0; -#endif - -#define kLzmaMaxHistorySize ((UInt32)3 << 29) -/* #define kLzmaMaxHistorySize ((UInt32)7 << 29) */ - -#define kNumTopBits 24 -#define kTopValue ((UInt32)1 << kNumTopBits) - -#define kNumBitModelTotalBits 11 -#define kBitModelTotal (1 << kNumBitModelTotalBits) -#define kNumMoveBits 5 -#define kProbInitValue (kBitModelTotal >> 1) - -#define kNumMoveReducingBits 4 -#define kNumBitPriceShiftBits 4 -#define kBitPrice (1 << kNumBitPriceShiftBits) - -#define REP_LEN_COUNT 64 - -void LzmaEncProps_Init(CLzmaEncProps *p) -{ - p->level = 5; - p->dictSize = p->mc = 0; - p->reduceSize = (UInt64)(Int64)-1; - p->lc = p->lp = p->pb = p->algo = p->fb = p->btMode = p->numHashBytes = p->numThreads = -1; - p->writeEndMark = 0; -} - -void LzmaEncProps_Normalize(CLzmaEncProps *p) -{ - int level = p->level; - if (level < 0) level = 5; - p->level = level; - - if (p->dictSize == 0) p->dictSize = (level <= 5 ? (1 << (level * 2 + 14)) : (level <= 7 ? (1 << 25) : (1 << 26))); - if (p->dictSize > p->reduceSize) - { - unsigned i; - UInt32 reduceSize = (UInt32)p->reduceSize; - for (i = 11; i <= 30; i++) - { - if (reduceSize <= ((UInt32)2 << i)) { p->dictSize = ((UInt32)2 << i); break; } - if (reduceSize <= ((UInt32)3 << i)) { p->dictSize = ((UInt32)3 << i); break; } - } - } - - if (p->lc < 0) p->lc = 3; - if (p->lp < 0) p->lp = 0; - if (p->pb < 0) p->pb = 2; - - if (p->algo < 0) p->algo = (level < 5 ? 0 : 1); - if (p->fb < 0) p->fb = (level < 7 ? 32 : 64); - if (p->btMode < 0) p->btMode = (p->algo == 0 ? 0 : 1); - if (p->numHashBytes < 0) p->numHashBytes = 4; - if (p->mc == 0) p->mc = (16 + (p->fb >> 1)) >> (p->btMode ? 0 : 1); - - if (p->numThreads < 0) - p->numThreads = - #ifndef _7ZIP_ST - ((p->btMode && p->algo) ? 2 : 1); - #else - 1; - #endif -} - -UInt32 LzmaEncProps_GetDictSize(const CLzmaEncProps *props2) -{ - CLzmaEncProps props = *props2; - LzmaEncProps_Normalize(&props); - return props.dictSize; -} - -#if (_MSC_VER >= 1400) -/* BSR code is fast for some new CPUs */ -/* #define LZMA_LOG_BSR */ -#endif - -#ifdef LZMA_LOG_BSR - -#define kDicLogSizeMaxCompress 32 - -#define BSR2_RET(pos, res) { unsigned long zz; _BitScanReverse(&zz, (pos)); res = (zz + zz) + ((pos >> (zz - 1)) & 1); } - -static unsigned GetPosSlot1(UInt32 pos) -{ - unsigned res; - BSR2_RET(pos, res); - return res; -} -#define GetPosSlot2(pos, res) { BSR2_RET(pos, res); } -#define GetPosSlot(pos, res) { if (pos < 2) res = pos; else BSR2_RET(pos, res); } - -#else - -#define kNumLogBits (9 + sizeof(size_t) / 2) -/* #define kNumLogBits (11 + sizeof(size_t) / 8 * 3) */ - -#define kDicLogSizeMaxCompress ((kNumLogBits - 1) * 2 + 7) - -static void LzmaEnc_FastPosInit(Byte *g_FastPos) -{ - unsigned slot; - g_FastPos[0] = 0; - g_FastPos[1] = 1; - g_FastPos += 2; - - for (slot = 2; slot < kNumLogBits * 2; slot++) - { - size_t k = ((size_t)1 << ((slot >> 1) - 1)); - size_t j; - for (j = 0; j < k; j++) - g_FastPos[j] = (Byte)slot; - g_FastPos += k; - } -} - -/* we can use ((limit - pos) >> 31) only if (pos < ((UInt32)1 << 31)) */ -/* -#define BSR2_RET(pos, res) { unsigned zz = 6 + ((kNumLogBits - 1) & \ - (0 - (((((UInt32)1 << (kNumLogBits + 6)) - 1) - pos) >> 31))); \ - res = p->g_FastPos[pos >> zz] + (zz * 2); } -*/ - -/* -#define BSR2_RET(pos, res) { unsigned zz = 6 + ((kNumLogBits - 1) & \ - (0 - (((((UInt32)1 << (kNumLogBits)) - 1) - (pos >> 6)) >> 31))); \ - res = p->g_FastPos[pos >> zz] + (zz * 2); } -*/ - -#define BSR2_RET(pos, res) { unsigned zz = (pos < (1 << (kNumLogBits + 6))) ? 6 : 6 + kNumLogBits - 1; \ - res = p->g_FastPos[pos >> zz] + (zz * 2); } - -/* -#define BSR2_RET(pos, res) { res = (pos < (1 << (kNumLogBits + 6))) ? \ - p->g_FastPos[pos >> 6] + 12 : \ - p->g_FastPos[pos >> (6 + kNumLogBits - 1)] + (6 + (kNumLogBits - 1)) * 2; } -*/ - -#define GetPosSlot1(pos) p->g_FastPos[pos] -#define GetPosSlot2(pos, res) { BSR2_RET(pos, res); } -#define GetPosSlot(pos, res) { if (pos < kNumFullDistances) res = p->g_FastPos[pos & (kNumFullDistances - 1)]; else BSR2_RET(pos, res); } - -#endif - - -#define LZMA_NUM_REPS 4 - -typedef UInt16 CState; -typedef UInt16 CExtra; - -typedef struct -{ - UInt32 price; - CState state; - CExtra extra; - // 0 : normal - // 1 : LIT : MATCH - // > 1 : MATCH (extra-1) : LIT : REP0 (len) - UInt32 len; - UInt32 dist; - UInt32 reps[LZMA_NUM_REPS]; -} COptimal; - - -// 18.06 -#define kNumOpts (1 << 11) -#define kPackReserve (kNumOpts * 8) -// #define kNumOpts (1 << 12) -// #define kPackReserve (1 + kNumOpts * 2) - -#define kNumLenToPosStates 4 -#define kNumPosSlotBits 6 -#define kDicLogSizeMin 0 -#define kDicLogSizeMax 32 -#define kDistTableSizeMax (kDicLogSizeMax * 2) - -#define kNumAlignBits 4 -#define kAlignTableSize (1 << kNumAlignBits) -#define kAlignMask (kAlignTableSize - 1) - -#define kStartPosModelIndex 4 -#define kEndPosModelIndex 14 -#define kNumFullDistances (1 << (kEndPosModelIndex >> 1)) - -typedef -#ifdef _LZMA_PROB32 - UInt32 -#else - UInt16 -#endif - CLzmaProb; - -#define LZMA_PB_MAX 4 -#define LZMA_LC_MAX 8 -#define LZMA_LP_MAX 4 - -#define LZMA_NUM_PB_STATES_MAX (1 << LZMA_PB_MAX) - -#define kLenNumLowBits 3 -#define kLenNumLowSymbols (1 << kLenNumLowBits) -#define kLenNumHighBits 8 -#define kLenNumHighSymbols (1 << kLenNumHighBits) -#define kLenNumSymbolsTotal (kLenNumLowSymbols * 2 + kLenNumHighSymbols) - -#define LZMA_MATCH_LEN_MIN 2 -#define LZMA_MATCH_LEN_MAX (LZMA_MATCH_LEN_MIN + kLenNumSymbolsTotal - 1) - -#define kNumStates 12 - - -typedef struct -{ - CLzmaProb low[LZMA_NUM_PB_STATES_MAX << (kLenNumLowBits + 1)]; - CLzmaProb high[kLenNumHighSymbols]; -} CLenEnc; - - -typedef struct -{ - unsigned tableSize; - UInt32 prices[LZMA_NUM_PB_STATES_MAX][kLenNumSymbolsTotal]; - // UInt32 prices1[LZMA_NUM_PB_STATES_MAX][kLenNumLowSymbols * 2]; - // UInt32 prices2[kLenNumSymbolsTotal]; -} CLenPriceEnc; - -#define GET_PRICE_LEN(p, posState, len) \ - ((p)->prices[posState][(size_t)(len) - LZMA_MATCH_LEN_MIN]) - -/* -#define GET_PRICE_LEN(p, posState, len) \ - ((p)->prices2[(size_t)(len) - 2] + ((p)->prices1[posState][((len) - 2) & (kLenNumLowSymbols * 2 - 1)] & (((len) - 2 - kLenNumLowSymbols * 2) >> 9))) -*/ - -typedef struct -{ - UInt32 range; - unsigned cache; - UInt64 low; - UInt64 cacheSize; - Byte *buf; - Byte *bufLim; - Byte *bufBase; - ISeqOutStream *outStream; - UInt64 processed; - SRes res; -} CRangeEnc; - - -typedef struct -{ - CLzmaProb *litProbs; - - unsigned state; - UInt32 reps[LZMA_NUM_REPS]; - - CLzmaProb posAlignEncoder[1 << kNumAlignBits]; - CLzmaProb isRep[kNumStates]; - CLzmaProb isRepG0[kNumStates]; - CLzmaProb isRepG1[kNumStates]; - CLzmaProb isRepG2[kNumStates]; - CLzmaProb isMatch[kNumStates][LZMA_NUM_PB_STATES_MAX]; - CLzmaProb isRep0Long[kNumStates][LZMA_NUM_PB_STATES_MAX]; - - CLzmaProb posSlotEncoder[kNumLenToPosStates][1 << kNumPosSlotBits]; - CLzmaProb posEncoders[kNumFullDistances]; - - CLenEnc lenProbs; - CLenEnc repLenProbs; - -} CSaveState; - - -typedef UInt32 CProbPrice; - - -typedef struct -{ - void *matchFinderObj; - IMatchFinder matchFinder; - - unsigned optCur; - unsigned optEnd; - - unsigned longestMatchLen; - unsigned numPairs; - UInt32 numAvail; - - unsigned state; - unsigned numFastBytes; - unsigned additionalOffset; - UInt32 reps[LZMA_NUM_REPS]; - unsigned lpMask, pbMask; - CLzmaProb *litProbs; - CRangeEnc rc; - - UInt32 backRes; - - unsigned lc, lp, pb; - unsigned lclp; - - BoolInt fastMode; - BoolInt writeEndMark; - BoolInt finished; - BoolInt multiThread; - BoolInt needInit; - // BoolInt _maxMode; - - UInt64 nowPos64; - - unsigned matchPriceCount; - // unsigned alignPriceCount; - int repLenEncCounter; - - unsigned distTableSize; - - UInt32 dictSize; - SRes result; - - #ifndef _7ZIP_ST - BoolInt mtMode; - // begin of CMatchFinderMt is used in LZ thread - CMatchFinderMt matchFinderMt; - // end of CMatchFinderMt is used in BT and HASH threads - #endif - - CMatchFinder matchFinderBase; - - #ifndef _7ZIP_ST - Byte pad[128]; - #endif - - // LZ thread - CProbPrice ProbPrices[kBitModelTotal >> kNumMoveReducingBits]; - - UInt32 matches[LZMA_MATCH_LEN_MAX * 2 + 2 + 1]; - - UInt32 alignPrices[kAlignTableSize]; - UInt32 posSlotPrices[kNumLenToPosStates][kDistTableSizeMax]; - UInt32 distancesPrices[kNumLenToPosStates][kNumFullDistances]; - - CLzmaProb posAlignEncoder[1 << kNumAlignBits]; - CLzmaProb isRep[kNumStates]; - CLzmaProb isRepG0[kNumStates]; - CLzmaProb isRepG1[kNumStates]; - CLzmaProb isRepG2[kNumStates]; - CLzmaProb isMatch[kNumStates][LZMA_NUM_PB_STATES_MAX]; - CLzmaProb isRep0Long[kNumStates][LZMA_NUM_PB_STATES_MAX]; - CLzmaProb posSlotEncoder[kNumLenToPosStates][1 << kNumPosSlotBits]; - CLzmaProb posEncoders[kNumFullDistances]; - - CLenEnc lenProbs; - CLenEnc repLenProbs; - - #ifndef LZMA_LOG_BSR - Byte g_FastPos[1 << kNumLogBits]; - #endif - - CLenPriceEnc lenEnc; - CLenPriceEnc repLenEnc; - - COptimal opt[kNumOpts]; - - CSaveState saveState; - - #ifndef _7ZIP_ST - Byte pad2[128]; - #endif -} CLzmaEnc; - - - -#define COPY_ARR(dest, src, arr) memcpy(dest->arr, src->arr, sizeof(src->arr)); - -void LzmaEnc_SaveState(CLzmaEncHandle pp) -{ - CLzmaEnc *p = (CLzmaEnc *)pp; - CSaveState *dest = &p->saveState; - - dest->state = p->state; - - dest->lenProbs = p->lenProbs; - dest->repLenProbs = p->repLenProbs; - - COPY_ARR(dest, p, reps); - - COPY_ARR(dest, p, posAlignEncoder); - COPY_ARR(dest, p, isRep); - COPY_ARR(dest, p, isRepG0); - COPY_ARR(dest, p, isRepG1); - COPY_ARR(dest, p, isRepG2); - COPY_ARR(dest, p, isMatch); - COPY_ARR(dest, p, isRep0Long); - COPY_ARR(dest, p, posSlotEncoder); - COPY_ARR(dest, p, posEncoders); - - memcpy(dest->litProbs, p->litProbs, ((UInt32)0x300 << p->lclp) * sizeof(CLzmaProb)); -} - - -void LzmaEnc_RestoreState(CLzmaEncHandle pp) -{ - CLzmaEnc *dest = (CLzmaEnc *)pp; - const CSaveState *p = &dest->saveState; - - dest->state = p->state; - - dest->lenProbs = p->lenProbs; - dest->repLenProbs = p->repLenProbs; - - COPY_ARR(dest, p, reps); - - COPY_ARR(dest, p, posAlignEncoder); - COPY_ARR(dest, p, isRep); - COPY_ARR(dest, p, isRepG0); - COPY_ARR(dest, p, isRepG1); - COPY_ARR(dest, p, isRepG2); - COPY_ARR(dest, p, isMatch); - COPY_ARR(dest, p, isRep0Long); - COPY_ARR(dest, p, posSlotEncoder); - COPY_ARR(dest, p, posEncoders); - - memcpy(dest->litProbs, p->litProbs, ((UInt32)0x300 << dest->lclp) * sizeof(CLzmaProb)); -} - - - -SRes LzmaEnc_SetProps(CLzmaEncHandle pp, const CLzmaEncProps *props2) -{ - CLzmaEnc *p = (CLzmaEnc *)pp; - CLzmaEncProps props = *props2; - LzmaEncProps_Normalize(&props); - - if (props.lc > LZMA_LC_MAX - || props.lp > LZMA_LP_MAX - || props.pb > LZMA_PB_MAX - || props.dictSize > ((UInt64)1 << kDicLogSizeMaxCompress) - || props.dictSize > kLzmaMaxHistorySize) - return SZ_ERROR_PARAM; - - p->dictSize = props.dictSize; - { - unsigned fb = props.fb; - if (fb < 5) - fb = 5; - if (fb > LZMA_MATCH_LEN_MAX) - fb = LZMA_MATCH_LEN_MAX; - p->numFastBytes = fb; - } - p->lc = props.lc; - p->lp = props.lp; - p->pb = props.pb; - p->fastMode = (props.algo == 0); - // p->_maxMode = True; - p->matchFinderBase.btMode = (Byte)(props.btMode ? 1 : 0); - { - unsigned numHashBytes = 4; - if (props.btMode) - { - if (props.numHashBytes < 2) - numHashBytes = 2; - else if (props.numHashBytes < 4) - numHashBytes = props.numHashBytes; - } - p->matchFinderBase.numHashBytes = numHashBytes; - } - - p->matchFinderBase.cutValue = props.mc; - - p->writeEndMark = props.writeEndMark; - - #ifndef _7ZIP_ST - /* - if (newMultiThread != _multiThread) - { - ReleaseMatchFinder(); - _multiThread = newMultiThread; - } - */ - p->multiThread = (props.numThreads > 1); - #endif - - return SZ_OK; -} - - -void LzmaEnc_SetDataSize(CLzmaEncHandle pp, UInt64 expectedDataSiize) -{ - CLzmaEnc *p = (CLzmaEnc *)pp; - p->matchFinderBase.expectedDataSize = expectedDataSiize; -} - - -#define kState_Start 0 -#define kState_LitAfterMatch 4 -#define kState_LitAfterRep 5 -#define kState_MatchAfterLit 7 -#define kState_RepAfterLit 8 - -static const Byte kLiteralNextStates[kNumStates] = {0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 4, 5}; -static const Byte kMatchNextStates[kNumStates] = {7, 7, 7, 7, 7, 7, 7, 10, 10, 10, 10, 10}; -static const Byte kRepNextStates[kNumStates] = {8, 8, 8, 8, 8, 8, 8, 11, 11, 11, 11, 11}; -static const Byte kShortRepNextStates[kNumStates]= {9, 9, 9, 9, 9, 9, 9, 11, 11, 11, 11, 11}; - -#define IsLitState(s) ((s) < 7) -#define GetLenToPosState2(len) (((len) < kNumLenToPosStates - 1) ? (len) : kNumLenToPosStates - 1) -#define GetLenToPosState(len) (((len) < kNumLenToPosStates + 1) ? (len) - 2 : kNumLenToPosStates - 1) - -#define kInfinityPrice (1 << 30) - -static void RangeEnc_Construct(CRangeEnc *p) -{ - p->outStream = NULL; - p->bufBase = NULL; -} - -#define RangeEnc_GetProcessed(p) ((p)->processed + ((p)->buf - (p)->bufBase) + (p)->cacheSize) -#define RangeEnc_GetProcessed_sizet(p) ((size_t)(p)->processed + ((p)->buf - (p)->bufBase) + (size_t)(p)->cacheSize) - -#define RC_BUF_SIZE (1 << 16) - -static int RangeEnc_Alloc(CRangeEnc *p, ISzAllocPtr alloc) -{ - if (!p->bufBase) - { - p->bufBase = (Byte *)ISzAlloc_Alloc(alloc, RC_BUF_SIZE); - if (!p->bufBase) - return 0; - p->bufLim = p->bufBase + RC_BUF_SIZE; - } - return 1; -} - -static void RangeEnc_Free(CRangeEnc *p, ISzAllocPtr alloc) -{ - ISzAlloc_Free(alloc, p->bufBase); - p->bufBase = 0; -} - -static void RangeEnc_Init(CRangeEnc *p) -{ - /* Stream.Init(); */ - p->range = 0xFFFFFFFF; - p->cache = 0; - p->low = 0; - p->cacheSize = 0; - - p->buf = p->bufBase; - - p->processed = 0; - p->res = SZ_OK; -} - -MY_NO_INLINE static void RangeEnc_FlushStream(CRangeEnc *p) -{ - size_t num; - if (p->res != SZ_OK) - return; - num = p->buf - p->bufBase; - if (num != ISeqOutStream_Write(p->outStream, p->bufBase, num)) - p->res = SZ_ERROR_WRITE; - p->processed += num; - p->buf = p->bufBase; -} - -MY_NO_INLINE static void MY_FAST_CALL RangeEnc_ShiftLow(CRangeEnc *p) -{ - UInt32 low = (UInt32)p->low; - unsigned high = (unsigned)(p->low >> 32); - p->low = (UInt32)(low << 8); - if (low < (UInt32)0xFF000000 || high != 0) - { - { - Byte *buf = p->buf; - *buf++ = (Byte)(p->cache + high); - p->cache = (unsigned)(low >> 24); - p->buf = buf; - if (buf == p->bufLim) - RangeEnc_FlushStream(p); - if (p->cacheSize == 0) - return; - } - high += 0xFF; - for (;;) - { - Byte *buf = p->buf; - *buf++ = (Byte)(high); - p->buf = buf; - if (buf == p->bufLim) - RangeEnc_FlushStream(p); - if (--p->cacheSize == 0) - return; - } - } - p->cacheSize++; -} - -static void RangeEnc_FlushData(CRangeEnc *p) -{ - int i; - for (i = 0; i < 5; i++) - RangeEnc_ShiftLow(p); -} - -#define RC_NORM(p) if (range < kTopValue) { range <<= 8; RangeEnc_ShiftLow(p); } - -#define RC_BIT_PRE(p, prob) \ - ttt = *(prob); \ - newBound = (range >> kNumBitModelTotalBits) * ttt; - -// #define _LZMA_ENC_USE_BRANCH - -#ifdef _LZMA_ENC_USE_BRANCH - -#define RC_BIT(p, prob, bit) { \ - RC_BIT_PRE(p, prob) \ - if (bit == 0) { range = newBound; ttt += (kBitModelTotal - ttt) >> kNumMoveBits; } \ - else { (p)->low += newBound; range -= newBound; ttt -= ttt >> kNumMoveBits; } \ - *(prob) = (CLzmaProb)ttt; \ - RC_NORM(p) \ - } - -#else - -#define RC_BIT(p, prob, bit) { \ - UInt32 mask; \ - RC_BIT_PRE(p, prob) \ - mask = 0 - (UInt32)bit; \ - range &= mask; \ - mask &= newBound; \ - range -= mask; \ - (p)->low += mask; \ - mask = (UInt32)bit - 1; \ - range += newBound & mask; \ - mask &= (kBitModelTotal - ((1 << kNumMoveBits) - 1)); \ - mask += ((1 << kNumMoveBits) - 1); \ - ttt += (Int32)(mask - ttt) >> kNumMoveBits; \ - *(prob) = (CLzmaProb)ttt; \ - RC_NORM(p) \ - } - -#endif - - - - -#define RC_BIT_0_BASE(p, prob) \ - range = newBound; *(prob) = (CLzmaProb)(ttt + ((kBitModelTotal - ttt) >> kNumMoveBits)); - -#define RC_BIT_1_BASE(p, prob) \ - range -= newBound; (p)->low += newBound; *(prob) = (CLzmaProb)(ttt - (ttt >> kNumMoveBits)); \ - -#define RC_BIT_0(p, prob) \ - RC_BIT_0_BASE(p, prob) \ - RC_NORM(p) - -#define RC_BIT_1(p, prob) \ - RC_BIT_1_BASE(p, prob) \ - RC_NORM(p) - -static void RangeEnc_EncodeBit_0(CRangeEnc *p, CLzmaProb *prob) -{ - UInt32 range, ttt, newBound; - range = p->range; - RC_BIT_PRE(p, prob) - RC_BIT_0(p, prob) - p->range = range; -} - -static void LitEnc_Encode(CRangeEnc *p, CLzmaProb *probs, UInt32 sym) -{ - UInt32 range = p->range; - sym |= 0x100; - do - { - UInt32 ttt, newBound; - // RangeEnc_EncodeBit(p, probs + (sym >> 8), (sym >> 7) & 1); - CLzmaProb *prob = probs + (sym >> 8); - UInt32 bit = (sym >> 7) & 1; - sym <<= 1; - RC_BIT(p, prob, bit); - } - while (sym < 0x10000); - p->range = range; -} - -static void LitEnc_EncodeMatched(CRangeEnc *p, CLzmaProb *probs, UInt32 sym, UInt32 matchByte) -{ - UInt32 range = p->range; - UInt32 offs = 0x100; - sym |= 0x100; - do - { - UInt32 ttt, newBound; - CLzmaProb *prob; - UInt32 bit; - matchByte <<= 1; - // RangeEnc_EncodeBit(p, probs + (offs + (matchByte & offs) + (sym >> 8)), (sym >> 7) & 1); - prob = probs + (offs + (matchByte & offs) + (sym >> 8)); - bit = (sym >> 7) & 1; - sym <<= 1; - offs &= ~(matchByte ^ sym); - RC_BIT(p, prob, bit); - } - while (sym < 0x10000); - p->range = range; -} - - - -static void LzmaEnc_InitPriceTables(CProbPrice *ProbPrices) -{ - UInt32 i; - for (i = 0; i < (kBitModelTotal >> kNumMoveReducingBits); i++) - { - const unsigned kCyclesBits = kNumBitPriceShiftBits; - UInt32 w = (i << kNumMoveReducingBits) + (1 << (kNumMoveReducingBits - 1)); - unsigned bitCount = 0; - unsigned j; - for (j = 0; j < kCyclesBits; j++) - { - w = w * w; - bitCount <<= 1; - while (w >= ((UInt32)1 << 16)) - { - w >>= 1; - bitCount++; - } - } - ProbPrices[i] = (CProbPrice)((kNumBitModelTotalBits << kCyclesBits) - 15 - bitCount); - // printf("\n%3d: %5d", i, ProbPrices[i]); - } -} - - -#define GET_PRICE(prob, bit) \ - p->ProbPrices[((prob) ^ (unsigned)(((-(int)(bit))) & (kBitModelTotal - 1))) >> kNumMoveReducingBits]; - -#define GET_PRICEa(prob, bit) \ - ProbPrices[((prob) ^ (unsigned)((-((int)(bit))) & (kBitModelTotal - 1))) >> kNumMoveReducingBits]; - -#define GET_PRICE_0(prob) p->ProbPrices[(prob) >> kNumMoveReducingBits] -#define GET_PRICE_1(prob) p->ProbPrices[((prob) ^ (kBitModelTotal - 1)) >> kNumMoveReducingBits] - -#define GET_PRICEa_0(prob) ProbPrices[(prob) >> kNumMoveReducingBits] -#define GET_PRICEa_1(prob) ProbPrices[((prob) ^ (kBitModelTotal - 1)) >> kNumMoveReducingBits] - - -static UInt32 LitEnc_GetPrice(const CLzmaProb *probs, UInt32 sym, const CProbPrice *ProbPrices) -{ - UInt32 price = 0; - sym |= 0x100; - do - { - unsigned bit = sym & 1; - sym >>= 1; - price += GET_PRICEa(probs[sym], bit); - } - while (sym >= 2); - return price; -} - - -static UInt32 LitEnc_Matched_GetPrice(const CLzmaProb *probs, UInt32 sym, UInt32 matchByte, const CProbPrice *ProbPrices) -{ - UInt32 price = 0; - UInt32 offs = 0x100; - sym |= 0x100; - do - { - matchByte <<= 1; - price += GET_PRICEa(probs[offs + (matchByte & offs) + (sym >> 8)], (sym >> 7) & 1); - sym <<= 1; - offs &= ~(matchByte ^ sym); - } - while (sym < 0x10000); - return price; -} - - -static void RcTree_ReverseEncode(CRangeEnc *rc, CLzmaProb *probs, unsigned numBits, unsigned sym) -{ - UInt32 range = rc->range; - unsigned m = 1; - do - { - UInt32 ttt, newBound; - unsigned bit = sym & 1; - // RangeEnc_EncodeBit(rc, probs + m, bit); - sym >>= 1; - RC_BIT(rc, probs + m, bit); - m = (m << 1) | bit; - } - while (--numBits); - rc->range = range; -} - - - -static void LenEnc_Init(CLenEnc *p) -{ - unsigned i; - for (i = 0; i < (LZMA_NUM_PB_STATES_MAX << (kLenNumLowBits + 1)); i++) - p->low[i] = kProbInitValue; - for (i = 0; i < kLenNumHighSymbols; i++) - p->high[i] = kProbInitValue; -} - -static void LenEnc_Encode(CLenEnc *p, CRangeEnc *rc, unsigned sym, unsigned posState) -{ - UInt32 range, ttt, newBound; - CLzmaProb *probs = p->low; - range = rc->range; - RC_BIT_PRE(rc, probs); - if (sym >= kLenNumLowSymbols) - { - RC_BIT_1(rc, probs); - probs += kLenNumLowSymbols; - RC_BIT_PRE(rc, probs); - if (sym >= kLenNumLowSymbols * 2) - { - RC_BIT_1(rc, probs); - rc->range = range; - // RcTree_Encode(rc, p->high, kLenNumHighBits, sym - kLenNumLowSymbols * 2); - LitEnc_Encode(rc, p->high, sym - kLenNumLowSymbols * 2); - return; - } - sym -= kLenNumLowSymbols; - } - - // RcTree_Encode(rc, probs + (posState << kLenNumLowBits), kLenNumLowBits, sym); - { - unsigned m; - unsigned bit; - RC_BIT_0(rc, probs); - probs += (posState << (1 + kLenNumLowBits)); - bit = (sym >> 2) ; RC_BIT(rc, probs + 1, bit); m = (1 << 1) + bit; - bit = (sym >> 1) & 1; RC_BIT(rc, probs + m, bit); m = (m << 1) + bit; - bit = sym & 1; RC_BIT(rc, probs + m, bit); - rc->range = range; - } -} - -static void SetPrices_3(const CLzmaProb *probs, UInt32 startPrice, UInt32 *prices, const CProbPrice *ProbPrices) -{ - unsigned i; - for (i = 0; i < 8; i += 2) - { - UInt32 price = startPrice; - UInt32 prob; - price += GET_PRICEa(probs[1 ], (i >> 2)); - price += GET_PRICEa(probs[2 + (i >> 2)], (i >> 1) & 1); - prob = probs[4 + (i >> 1)]; - prices[i ] = price + GET_PRICEa_0(prob); - prices[i + 1] = price + GET_PRICEa_1(prob); - } -} - - -MY_NO_INLINE static void MY_FAST_CALL LenPriceEnc_UpdateTables( - CLenPriceEnc *p, - unsigned numPosStates, - const CLenEnc *enc, - const CProbPrice *ProbPrices) -{ - UInt32 b; - - { - unsigned prob = enc->low[0]; - UInt32 a, c; - unsigned posState; - b = GET_PRICEa_1(prob); - a = GET_PRICEa_0(prob); - c = b + GET_PRICEa_0(enc->low[kLenNumLowSymbols]); - for (posState = 0; posState < numPosStates; posState++) - { - UInt32 *prices = p->prices[posState]; - const CLzmaProb *probs = enc->low + (posState << (1 + kLenNumLowBits)); - SetPrices_3(probs, a, prices, ProbPrices); - SetPrices_3(probs + kLenNumLowSymbols, c, prices + kLenNumLowSymbols, ProbPrices); - } - } - - /* - { - unsigned i; - UInt32 b; - a = GET_PRICEa_0(enc->low[0]); - for (i = 0; i < kLenNumLowSymbols; i++) - p->prices2[i] = a; - a = GET_PRICEa_1(enc->low[0]); - b = a + GET_PRICEa_0(enc->low[kLenNumLowSymbols]); - for (i = kLenNumLowSymbols; i < kLenNumLowSymbols * 2; i++) - p->prices2[i] = b; - a += GET_PRICEa_1(enc->low[kLenNumLowSymbols]); - } - */ - - // p->counter = numSymbols; - // p->counter = 64; - - { - unsigned i = p->tableSize; - - if (i > kLenNumLowSymbols * 2) - { - const CLzmaProb *probs = enc->high; - UInt32 *prices = p->prices[0] + kLenNumLowSymbols * 2; - i -= kLenNumLowSymbols * 2 - 1; - i >>= 1; - b += GET_PRICEa_1(enc->low[kLenNumLowSymbols]); - do - { - /* - p->prices2[i] = a + - // RcTree_GetPrice(enc->high, kLenNumHighBits, i - kLenNumLowSymbols * 2, ProbPrices); - LitEnc_GetPrice(probs, i - kLenNumLowSymbols * 2, ProbPrices); - */ - // UInt32 price = a + RcTree_GetPrice(probs, kLenNumHighBits - 1, sym, ProbPrices); - unsigned sym = --i + (1 << (kLenNumHighBits - 1)); - UInt32 price = b; - do - { - unsigned bit = sym & 1; - sym >>= 1; - price += GET_PRICEa(probs[sym], bit); - } - while (sym >= 2); - - { - unsigned prob = probs[(size_t)i + (1 << (kLenNumHighBits - 1))]; - prices[(size_t)i * 2 ] = price + GET_PRICEa_0(prob); - prices[(size_t)i * 2 + 1] = price + GET_PRICEa_1(prob); - } - } - while (i); - - { - unsigned posState; - size_t num = (p->tableSize - kLenNumLowSymbols * 2) * sizeof(p->prices[0][0]); - for (posState = 1; posState < numPosStates; posState++) - memcpy(p->prices[posState] + kLenNumLowSymbols * 2, p->prices[0] + kLenNumLowSymbols * 2, num); - } - } - } -} - -/* - #ifdef SHOW_STAT - g_STAT_OFFSET += num; - printf("\n MovePos %u", num); - #endif -*/ - -#define MOVE_POS(p, num) { \ - p->additionalOffset += (num); \ - p->matchFinder.Skip(p->matchFinderObj, (UInt32)(num)); } - - -static unsigned ReadMatchDistances(CLzmaEnc *p, unsigned *numPairsRes) -{ - unsigned numPairs; - - p->additionalOffset++; - p->numAvail = p->matchFinder.GetNumAvailableBytes(p->matchFinderObj); - numPairs = p->matchFinder.GetMatches(p->matchFinderObj, p->matches); - *numPairsRes = numPairs; - - #ifdef SHOW_STAT - printf("\n i = %u numPairs = %u ", g_STAT_OFFSET, numPairs / 2); - g_STAT_OFFSET++; - { - unsigned i; - for (i = 0; i < numPairs; i += 2) - printf("%2u %6u | ", p->matches[i], p->matches[i + 1]); - } - #endif - - if (numPairs == 0) - return 0; - { - unsigned len = p->matches[(size_t)numPairs - 2]; - if (len != p->numFastBytes) - return len; - { - UInt32 numAvail = p->numAvail; - if (numAvail > LZMA_MATCH_LEN_MAX) - numAvail = LZMA_MATCH_LEN_MAX; - { - const Byte *p1 = p->matchFinder.GetPointerToCurrentPos(p->matchFinderObj) - 1; - const Byte *p2 = p1 + len; - ptrdiff_t dif = (ptrdiff_t)-1 - p->matches[(size_t)numPairs - 1]; - const Byte *lim = p1 + numAvail; - for (; p2 != lim && *p2 == p2[dif]; p2++) - {} - return (unsigned)(p2 - p1); - } - } - } -} - -#define MARK_LIT ((UInt32)(Int32)-1) - -#define MakeAs_Lit(p) { (p)->dist = MARK_LIT; (p)->extra = 0; } -#define MakeAs_ShortRep(p) { (p)->dist = 0; (p)->extra = 0; } -#define IsShortRep(p) ((p)->dist == 0) - - -#define GetPrice_ShortRep(p, state, posState) \ - ( GET_PRICE_0(p->isRepG0[state]) + GET_PRICE_0(p->isRep0Long[state][posState])) - -#define GetPrice_Rep_0(p, state, posState) ( \ - GET_PRICE_1(p->isMatch[state][posState]) \ - + GET_PRICE_1(p->isRep0Long[state][posState])) \ - + GET_PRICE_1(p->isRep[state]) \ - + GET_PRICE_0(p->isRepG0[state]) - -MY_FORCE_INLINE -static UInt32 GetPrice_PureRep(const CLzmaEnc *p, unsigned repIndex, size_t state, size_t posState) -{ - UInt32 price; - UInt32 prob = p->isRepG0[state]; - if (repIndex == 0) - { - price = GET_PRICE_0(prob); - price += GET_PRICE_1(p->isRep0Long[state][posState]); - } - else - { - price = GET_PRICE_1(prob); - prob = p->isRepG1[state]; - if (repIndex == 1) - price += GET_PRICE_0(prob); - else - { - price += GET_PRICE_1(prob); - price += GET_PRICE(p->isRepG2[state], repIndex - 2); - } - } - return price; -} - - -static unsigned Backward(CLzmaEnc *p, unsigned cur) -{ - unsigned wr = cur + 1; - p->optEnd = wr; - - for (;;) - { - UInt32 dist = p->opt[cur].dist; - unsigned len = (unsigned)p->opt[cur].len; - unsigned extra = (unsigned)p->opt[cur].extra; - cur -= len; - - if (extra) - { - wr--; - p->opt[wr].len = (UInt32)len; - cur -= extra; - len = extra; - if (extra == 1) - { - p->opt[wr].dist = dist; - dist = MARK_LIT; - } - else - { - p->opt[wr].dist = 0; - len--; - wr--; - p->opt[wr].dist = MARK_LIT; - p->opt[wr].len = 1; - } - } - - if (cur == 0) - { - p->backRes = dist; - p->optCur = wr; - return len; - } - - wr--; - p->opt[wr].dist = dist; - p->opt[wr].len = (UInt32)len; - } -} - - - -#define LIT_PROBS(pos, prevByte) \ - (p->litProbs + (UInt32)3 * (((((pos) << 8) + (prevByte)) & p->lpMask) << p->lc)) - - -static unsigned GetOptimum(CLzmaEnc *p, UInt32 position) -{ - unsigned last, cur; - UInt32 reps[LZMA_NUM_REPS]; - unsigned repLens[LZMA_NUM_REPS]; - UInt32 *matches; - - { - UInt32 numAvail; - unsigned numPairs, mainLen, repMaxIndex, i, posState; - UInt32 matchPrice, repMatchPrice; - const Byte *data; - Byte curByte, matchByte; - - p->optCur = p->optEnd = 0; - - if (p->additionalOffset == 0) - mainLen = ReadMatchDistances(p, &numPairs); - else - { - mainLen = p->longestMatchLen; - numPairs = p->numPairs; - } - - numAvail = p->numAvail; - if (numAvail < 2) - { - p->backRes = MARK_LIT; - return 1; - } - if (numAvail > LZMA_MATCH_LEN_MAX) - numAvail = LZMA_MATCH_LEN_MAX; - - data = p->matchFinder.GetPointerToCurrentPos(p->matchFinderObj) - 1; - repMaxIndex = 0; - - for (i = 0; i < LZMA_NUM_REPS; i++) - { - unsigned len; - const Byte *data2; - reps[i] = p->reps[i]; - data2 = data - reps[i]; - if (data[0] != data2[0] || data[1] != data2[1]) - { - repLens[i] = 0; - continue; - } - for (len = 2; len < numAvail && data[len] == data2[len]; len++) - {} - repLens[i] = len; - if (len > repLens[repMaxIndex]) - repMaxIndex = i; - } - - if (repLens[repMaxIndex] >= p->numFastBytes) - { - unsigned len; - p->backRes = (UInt32)repMaxIndex; - len = repLens[repMaxIndex]; - MOVE_POS(p, len - 1) - return len; - } - - matches = p->matches; - - if (mainLen >= p->numFastBytes) - { - p->backRes = matches[(size_t)numPairs - 1] + LZMA_NUM_REPS; - MOVE_POS(p, mainLen - 1) - return mainLen; - } - - curByte = *data; - matchByte = *(data - reps[0]); - - last = repLens[repMaxIndex]; - if (last <= mainLen) - last = mainLen; - - if (last < 2 && curByte != matchByte) - { - p->backRes = MARK_LIT; - return 1; - } - - p->opt[0].state = (CState)p->state; - - posState = (position & p->pbMask); - - { - const CLzmaProb *probs = LIT_PROBS(position, *(data - 1)); - p->opt[1].price = GET_PRICE_0(p->isMatch[p->state][posState]) + - (!IsLitState(p->state) ? - LitEnc_Matched_GetPrice(probs, curByte, matchByte, p->ProbPrices) : - LitEnc_GetPrice(probs, curByte, p->ProbPrices)); - } - - MakeAs_Lit(&p->opt[1]); - - matchPrice = GET_PRICE_1(p->isMatch[p->state][posState]); - repMatchPrice = matchPrice + GET_PRICE_1(p->isRep[p->state]); - - // 18.06 - if (matchByte == curByte && repLens[0] == 0) - { - UInt32 shortRepPrice = repMatchPrice + GetPrice_ShortRep(p, p->state, posState); - if (shortRepPrice < p->opt[1].price) - { - p->opt[1].price = shortRepPrice; - MakeAs_ShortRep(&p->opt[1]); - } - if (last < 2) - { - p->backRes = p->opt[1].dist; - return 1; - } - } - - p->opt[1].len = 1; - - p->opt[0].reps[0] = reps[0]; - p->opt[0].reps[1] = reps[1]; - p->opt[0].reps[2] = reps[2]; - p->opt[0].reps[3] = reps[3]; - - // ---------- REP ---------- - - for (i = 0; i < LZMA_NUM_REPS; i++) - { - unsigned repLen = repLens[i]; - UInt32 price; - if (repLen < 2) - continue; - price = repMatchPrice + GetPrice_PureRep(p, i, p->state, posState); - do - { - UInt32 price2 = price + GET_PRICE_LEN(&p->repLenEnc, posState, repLen); - COptimal *opt = &p->opt[repLen]; - if (price2 < opt->price) - { - opt->price = price2; - opt->len = (UInt32)repLen; - opt->dist = (UInt32)i; - opt->extra = 0; - } - } - while (--repLen >= 2); - } - - - // ---------- MATCH ---------- - { - unsigned len = repLens[0] + 1; - if (len <= mainLen) - { - unsigned offs = 0; - UInt32 normalMatchPrice = matchPrice + GET_PRICE_0(p->isRep[p->state]); - - if (len < 2) - len = 2; - else - while (len > matches[offs]) - offs += 2; - - for (; ; len++) - { - COptimal *opt; - UInt32 dist = matches[(size_t)offs + 1]; - UInt32 price = normalMatchPrice + GET_PRICE_LEN(&p->lenEnc, posState, len); - unsigned lenToPosState = GetLenToPosState(len); - - if (dist < kNumFullDistances) - price += p->distancesPrices[lenToPosState][dist & (kNumFullDistances - 1)]; - else - { - unsigned slot; - GetPosSlot2(dist, slot); - price += p->alignPrices[dist & kAlignMask]; - price += p->posSlotPrices[lenToPosState][slot]; - } - - opt = &p->opt[len]; - - if (price < opt->price) - { - opt->price = price; - opt->len = (UInt32)len; - opt->dist = dist + LZMA_NUM_REPS; - opt->extra = 0; - } - - if (len == matches[offs]) - { - offs += 2; - if (offs == numPairs) - break; - } - } - } - } - - - cur = 0; - - #ifdef SHOW_STAT2 - /* if (position >= 0) */ - { - unsigned i; - printf("\n pos = %4X", position); - for (i = cur; i <= last; i++) - printf("\nprice[%4X] = %u", position - cur + i, p->opt[i].price); - } - #endif - } - - - - // ---------- Optimal Parsing ---------- - - for (;;) - { - unsigned numAvail; - UInt32 numAvailFull; - unsigned newLen, numPairs, prev, state, posState, startLen; - UInt32 litPrice, matchPrice, repMatchPrice; - BoolInt nextIsLit; - Byte curByte, matchByte; - const Byte *data; - COptimal *curOpt, *nextOpt; - - if (++cur == last) - break; - - // 18.06 - if (cur >= kNumOpts - 64) - { - unsigned j, best; - UInt32 price = p->opt[cur].price; - best = cur; - for (j = cur + 1; j <= last; j++) - { - UInt32 price2 = p->opt[j].price; - if (price >= price2) - { - price = price2; - best = j; - } - } - { - unsigned delta = best - cur; - if (delta != 0) - { - MOVE_POS(p, delta); - } - } - cur = best; - break; - } - - newLen = ReadMatchDistances(p, &numPairs); - - if (newLen >= p->numFastBytes) - { - p->numPairs = numPairs; - p->longestMatchLen = newLen; - break; - } - - curOpt = &p->opt[cur]; - - position++; - - // we need that check here, if skip_items in p->opt are possible - /* - if (curOpt->price >= kInfinityPrice) - continue; - */ - - prev = cur - curOpt->len; - - if (curOpt->len == 1) - { - state = (unsigned)p->opt[prev].state; - if (IsShortRep(curOpt)) - state = kShortRepNextStates[state]; - else - state = kLiteralNextStates[state]; - } - else - { - const COptimal *prevOpt; - UInt32 b0; - UInt32 dist = curOpt->dist; - - if (curOpt->extra) - { - prev -= (unsigned)curOpt->extra; - state = kState_RepAfterLit; - if (curOpt->extra == 1) - state = (dist < LZMA_NUM_REPS ? kState_RepAfterLit : kState_MatchAfterLit); - } - else - { - state = (unsigned)p->opt[prev].state; - if (dist < LZMA_NUM_REPS) - state = kRepNextStates[state]; - else - state = kMatchNextStates[state]; - } - - prevOpt = &p->opt[prev]; - b0 = prevOpt->reps[0]; - - if (dist < LZMA_NUM_REPS) - { - if (dist == 0) - { - reps[0] = b0; - reps[1] = prevOpt->reps[1]; - reps[2] = prevOpt->reps[2]; - reps[3] = prevOpt->reps[3]; - } - else - { - reps[1] = b0; - b0 = prevOpt->reps[1]; - if (dist == 1) - { - reps[0] = b0; - reps[2] = prevOpt->reps[2]; - reps[3] = prevOpt->reps[3]; - } - else - { - reps[2] = b0; - reps[0] = prevOpt->reps[dist]; - reps[3] = prevOpt->reps[dist ^ 1]; - } - } - } - else - { - reps[0] = (dist - LZMA_NUM_REPS + 1); - reps[1] = b0; - reps[2] = prevOpt->reps[1]; - reps[3] = prevOpt->reps[2]; - } - } - - curOpt->state = (CState)state; - curOpt->reps[0] = reps[0]; - curOpt->reps[1] = reps[1]; - curOpt->reps[2] = reps[2]; - curOpt->reps[3] = reps[3]; - - data = p->matchFinder.GetPointerToCurrentPos(p->matchFinderObj) - 1; - curByte = *data; - matchByte = *(data - reps[0]); - - posState = (position & p->pbMask); - - /* - The order of Price checks: - < LIT - <= SHORT_REP - < LIT : REP_0 - < REP [ : LIT : REP_0 ] - < MATCH [ : LIT : REP_0 ] - */ - - { - UInt32 curPrice = curOpt->price; - unsigned prob = p->isMatch[state][posState]; - matchPrice = curPrice + GET_PRICE_1(prob); - litPrice = curPrice + GET_PRICE_0(prob); - } - - nextOpt = &p->opt[(size_t)cur + 1]; - nextIsLit = False; - - // here we can allow skip_items in p->opt, if we don't check (nextOpt->price < kInfinityPrice) - // 18.new.06 - if ((nextOpt->price < kInfinityPrice - // && !IsLitState(state) - && matchByte == curByte) - || litPrice > nextOpt->price - ) - litPrice = 0; - else - { - const CLzmaProb *probs = LIT_PROBS(position, *(data - 1)); - litPrice += (!IsLitState(state) ? - LitEnc_Matched_GetPrice(probs, curByte, matchByte, p->ProbPrices) : - LitEnc_GetPrice(probs, curByte, p->ProbPrices)); - - if (litPrice < nextOpt->price) - { - nextOpt->price = litPrice; - nextOpt->len = 1; - MakeAs_Lit(nextOpt); - nextIsLit = True; - } - } - - repMatchPrice = matchPrice + GET_PRICE_1(p->isRep[state]); - - numAvailFull = p->numAvail; - { - unsigned temp = kNumOpts - 1 - cur; - if (numAvailFull > temp) - numAvailFull = (UInt32)temp; - } - - // 18.06 - // ---------- SHORT_REP ---------- - if (IsLitState(state)) // 18.new - if (matchByte == curByte) - if (repMatchPrice < nextOpt->price) // 18.new - // if (numAvailFull < 2 || data[1] != *(data - reps[0] + 1)) - if ( - // nextOpt->price >= kInfinityPrice || - nextOpt->len < 2 // we can check nextOpt->len, if skip items are not allowed in p->opt - || (nextOpt->dist != 0 - // && nextOpt->extra <= 1 // 17.old - ) - ) - { - UInt32 shortRepPrice = repMatchPrice + GetPrice_ShortRep(p, state, posState); - // if (shortRepPrice <= nextOpt->price) // 17.old - if (shortRepPrice < nextOpt->price) // 18.new - { - nextOpt->price = shortRepPrice; - nextOpt->len = 1; - MakeAs_ShortRep(nextOpt); - nextIsLit = False; - } - } - - if (numAvailFull < 2) - continue; - numAvail = (numAvailFull <= p->numFastBytes ? numAvailFull : p->numFastBytes); - - // numAvail <= p->numFastBytes - - // ---------- LIT : REP_0 ---------- - - if (!nextIsLit - && litPrice != 0 // 18.new - && matchByte != curByte - && numAvailFull > 2) - { - const Byte *data2 = data - reps[0]; - if (data[1] == data2[1] && data[2] == data2[2]) - { - unsigned len; - unsigned limit = p->numFastBytes + 1; - if (limit > numAvailFull) - limit = numAvailFull; - for (len = 3; len < limit && data[len] == data2[len]; len++) - {} - - { - unsigned state2 = kLiteralNextStates[state]; - unsigned posState2 = (position + 1) & p->pbMask; - UInt32 price = litPrice + GetPrice_Rep_0(p, state2, posState2); - { - unsigned offset = cur + len; - - if (last < offset) - last = offset; - - // do - { - UInt32 price2; - COptimal *opt; - len--; - // price2 = price + GetPrice_Len_Rep_0(p, len, state2, posState2); - price2 = price + GET_PRICE_LEN(&p->repLenEnc, posState2, len); - - opt = &p->opt[offset]; - // offset--; - if (price2 < opt->price) - { - opt->price = price2; - opt->len = (UInt32)len; - opt->dist = 0; - opt->extra = 1; - } - } - // while (len >= 3); - } - } - } - } - - startLen = 2; /* speed optimization */ - - { - // ---------- REP ---------- - unsigned repIndex = 0; // 17.old - // unsigned repIndex = IsLitState(state) ? 0 : 1; // 18.notused - for (; repIndex < LZMA_NUM_REPS; repIndex++) - { - unsigned len; - UInt32 price; - const Byte *data2 = data - reps[repIndex]; - if (data[0] != data2[0] || data[1] != data2[1]) - continue; - - for (len = 2; len < numAvail && data[len] == data2[len]; len++) - {} - - // if (len < startLen) continue; // 18.new: speed optimization - - { - unsigned offset = cur + len; - if (last < offset) - last = offset; - } - { - unsigned len2 = len; - price = repMatchPrice + GetPrice_PureRep(p, repIndex, state, posState); - do - { - UInt32 price2 = price + GET_PRICE_LEN(&p->repLenEnc, posState, len2); - COptimal *opt = &p->opt[cur + len2]; - if (price2 < opt->price) - { - opt->price = price2; - opt->len = (UInt32)len2; - opt->dist = (UInt32)repIndex; - opt->extra = 0; - } - } - while (--len2 >= 2); - } - - if (repIndex == 0) startLen = len + 1; // 17.old - // startLen = len + 1; // 18.new - - /* if (_maxMode) */ - { - // ---------- REP : LIT : REP_0 ---------- - // numFastBytes + 1 + numFastBytes - - unsigned len2 = len + 1; - unsigned limit = len2 + p->numFastBytes; - if (limit > numAvailFull) - limit = numAvailFull; - - len2 += 2; - if (len2 <= limit) - if (data[len2 - 2] == data2[len2 - 2]) - if (data[len2 - 1] == data2[len2 - 1]) - { - unsigned state2 = kRepNextStates[state]; - unsigned posState2 = (position + len) & p->pbMask; - price += GET_PRICE_LEN(&p->repLenEnc, posState, len) - + GET_PRICE_0(p->isMatch[state2][posState2]) - + LitEnc_Matched_GetPrice(LIT_PROBS(position + len, data[(size_t)len - 1]), - data[len], data2[len], p->ProbPrices); - - // state2 = kLiteralNextStates[state2]; - state2 = kState_LitAfterRep; - posState2 = (posState2 + 1) & p->pbMask; - - - price += GetPrice_Rep_0(p, state2, posState2); - - for (; len2 < limit && data[len2] == data2[len2]; len2++) - {} - - len2 -= len; - // if (len2 >= 3) - { - { - unsigned offset = cur + len + len2; - - if (last < offset) - last = offset; - // do - { - UInt32 price2; - COptimal *opt; - len2--; - // price2 = price + GetPrice_Len_Rep_0(p, len2, state2, posState2); - price2 = price + GET_PRICE_LEN(&p->repLenEnc, posState2, len2); - - opt = &p->opt[offset]; - // offset--; - if (price2 < opt->price) - { - opt->price = price2; - opt->len = (UInt32)len2; - opt->extra = (CExtra)(len + 1); - opt->dist = (UInt32)repIndex; - } - } - // while (len2 >= 3); - } - } - } - } - } - } - - - // ---------- MATCH ---------- - /* for (unsigned len = 2; len <= newLen; len++) */ - if (newLen > numAvail) - { - newLen = numAvail; - for (numPairs = 0; newLen > matches[numPairs]; numPairs += 2); - matches[numPairs] = (UInt32)newLen; - numPairs += 2; - } - - // startLen = 2; /* speed optimization */ - - if (newLen >= startLen) - { - UInt32 normalMatchPrice = matchPrice + GET_PRICE_0(p->isRep[state]); - UInt32 dist; - unsigned offs, posSlot, len; - - { - unsigned offset = cur + newLen; - if (last < offset) - last = offset; - } - - offs = 0; - while (startLen > matches[offs]) - offs += 2; - dist = matches[(size_t)offs + 1]; - - // if (dist >= kNumFullDistances) - GetPosSlot2(dist, posSlot); - - for (len = /*2*/ startLen; ; len++) - { - UInt32 price = normalMatchPrice + GET_PRICE_LEN(&p->lenEnc, posState, len); - { - COptimal *opt; - unsigned lenNorm = len - 2; - lenNorm = GetLenToPosState2(lenNorm); - if (dist < kNumFullDistances) - price += p->distancesPrices[lenNorm][dist & (kNumFullDistances - 1)]; - else - price += p->posSlotPrices[lenNorm][posSlot] + p->alignPrices[dist & kAlignMask]; - - opt = &p->opt[cur + len]; - if (price < opt->price) - { - opt->price = price; - opt->len = (UInt32)len; - opt->dist = dist + LZMA_NUM_REPS; - opt->extra = 0; - } - } - - if (len == matches[offs]) - { - // if (p->_maxMode) { - // MATCH : LIT : REP_0 - - const Byte *data2 = data - dist - 1; - unsigned len2 = len + 1; - unsigned limit = len2 + p->numFastBytes; - if (limit > numAvailFull) - limit = numAvailFull; - - len2 += 2; - if (len2 <= limit) - if (data[len2 - 2] == data2[len2 - 2]) - if (data[len2 - 1] == data2[len2 - 1]) - { - for (; len2 < limit && data[len2] == data2[len2]; len2++) - {} - - len2 -= len; - - // if (len2 >= 3) - { - unsigned state2 = kMatchNextStates[state]; - unsigned posState2 = (position + len) & p->pbMask; - unsigned offset; - price += GET_PRICE_0(p->isMatch[state2][posState2]); - price += LitEnc_Matched_GetPrice(LIT_PROBS(position + len, data[(size_t)len - 1]), - data[len], data2[len], p->ProbPrices); - - // state2 = kLiteralNextStates[state2]; - state2 = kState_LitAfterMatch; - - posState2 = (posState2 + 1) & p->pbMask; - price += GetPrice_Rep_0(p, state2, posState2); - - offset = cur + len + len2; - - if (last < offset) - last = offset; - // do - { - UInt32 price2; - COptimal *opt; - len2--; - // price2 = price + GetPrice_Len_Rep_0(p, len2, state2, posState2); - price2 = price + GET_PRICE_LEN(&p->repLenEnc, posState2, len2); - opt = &p->opt[offset]; - // offset--; - if (price2 < opt->price) - { - opt->price = price2; - opt->len = (UInt32)len2; - opt->extra = (CExtra)(len + 1); - opt->dist = dist + LZMA_NUM_REPS; - } - } - // while (len2 >= 3); - } - - } - - offs += 2; - if (offs == numPairs) - break; - dist = matches[(size_t)offs + 1]; - // if (dist >= kNumFullDistances) - GetPosSlot2(dist, posSlot); - } - } - } - } - - do - p->opt[last].price = kInfinityPrice; - while (--last); - - return Backward(p, cur); -} - - - -#define ChangePair(smallDist, bigDist) (((bigDist) >> 7) > (smallDist)) - - - -static unsigned GetOptimumFast(CLzmaEnc *p) -{ - UInt32 numAvail, mainDist; - unsigned mainLen, numPairs, repIndex, repLen, i; - const Byte *data; - - if (p->additionalOffset == 0) - mainLen = ReadMatchDistances(p, &numPairs); - else - { - mainLen = p->longestMatchLen; - numPairs = p->numPairs; - } - - numAvail = p->numAvail; - p->backRes = MARK_LIT; - if (numAvail < 2) - return 1; - // if (mainLen < 2 && p->state == 0) return 1; // 18.06.notused - if (numAvail > LZMA_MATCH_LEN_MAX) - numAvail = LZMA_MATCH_LEN_MAX; - data = p->matchFinder.GetPointerToCurrentPos(p->matchFinderObj) - 1; - repLen = repIndex = 0; - - for (i = 0; i < LZMA_NUM_REPS; i++) - { - unsigned len; - const Byte *data2 = data - p->reps[i]; - if (data[0] != data2[0] || data[1] != data2[1]) - continue; - for (len = 2; len < numAvail && data[len] == data2[len]; len++) - {} - if (len >= p->numFastBytes) - { - p->backRes = (UInt32)i; - MOVE_POS(p, len - 1) - return len; - } - if (len > repLen) - { - repIndex = i; - repLen = len; - } - } - - if (mainLen >= p->numFastBytes) - { - p->backRes = p->matches[(size_t)numPairs - 1] + LZMA_NUM_REPS; - MOVE_POS(p, mainLen - 1) - return mainLen; - } - - mainDist = 0; /* for GCC */ - - if (mainLen >= 2) - { - mainDist = p->matches[(size_t)numPairs - 1]; - while (numPairs > 2) - { - UInt32 dist2; - if (mainLen != p->matches[(size_t)numPairs - 4] + 1) - break; - dist2 = p->matches[(size_t)numPairs - 3]; - if (!ChangePair(dist2, mainDist)) - break; - numPairs -= 2; - mainLen--; - mainDist = dist2; - } - if (mainLen == 2 && mainDist >= 0x80) - mainLen = 1; - } - - if (repLen >= 2) - if ( repLen + 1 >= mainLen - || (repLen + 2 >= mainLen && mainDist >= (1 << 9)) - || (repLen + 3 >= mainLen && mainDist >= (1 << 15))) - { - p->backRes = (UInt32)repIndex; - MOVE_POS(p, repLen - 1) - return repLen; - } - - if (mainLen < 2 || numAvail <= 2) - return 1; - - { - unsigned len1 = ReadMatchDistances(p, &p->numPairs); - p->longestMatchLen = len1; - - if (len1 >= 2) - { - UInt32 newDist = p->matches[(size_t)p->numPairs - 1]; - if ( (len1 >= mainLen && newDist < mainDist) - || (len1 == mainLen + 1 && !ChangePair(mainDist, newDist)) - || (len1 > mainLen + 1) - || (len1 + 1 >= mainLen && mainLen >= 3 && ChangePair(newDist, mainDist))) - return 1; - } - } - - data = p->matchFinder.GetPointerToCurrentPos(p->matchFinderObj) - 1; - - for (i = 0; i < LZMA_NUM_REPS; i++) - { - unsigned len, limit; - const Byte *data2 = data - p->reps[i]; - if (data[0] != data2[0] || data[1] != data2[1]) - continue; - limit = mainLen - 1; - for (len = 2;; len++) - { - if (len >= limit) - return 1; - if (data[len] != data2[len]) - break; - } - } - - p->backRes = mainDist + LZMA_NUM_REPS; - if (mainLen != 2) - { - MOVE_POS(p, mainLen - 2) - } - return mainLen; -} - - - - -static void WriteEndMarker(CLzmaEnc *p, unsigned posState) -{ - UInt32 range; - range = p->rc.range; - { - UInt32 ttt, newBound; - CLzmaProb *prob = &p->isMatch[p->state][posState]; - RC_BIT_PRE(&p->rc, prob) - RC_BIT_1(&p->rc, prob) - prob = &p->isRep[p->state]; - RC_BIT_PRE(&p->rc, prob) - RC_BIT_0(&p->rc, prob) - } - p->state = kMatchNextStates[p->state]; - - p->rc.range = range; - LenEnc_Encode(&p->lenProbs, &p->rc, 0, posState); - range = p->rc.range; - - { - // RcTree_Encode_PosSlot(&p->rc, p->posSlotEncoder[0], (1 << kNumPosSlotBits) - 1); - CLzmaProb *probs = p->posSlotEncoder[0]; - unsigned m = 1; - do - { - UInt32 ttt, newBound; - RC_BIT_PRE(p, probs + m) - RC_BIT_1(&p->rc, probs + m); - m = (m << 1) + 1; - } - while (m < (1 << kNumPosSlotBits)); - } - { - // RangeEnc_EncodeDirectBits(&p->rc, ((UInt32)1 << (30 - kNumAlignBits)) - 1, 30 - kNumAlignBits); UInt32 range = p->range; - unsigned numBits = 30 - kNumAlignBits; - do - { - range >>= 1; - p->rc.low += range; - RC_NORM(&p->rc) - } - while (--numBits); - } - - { - // RcTree_ReverseEncode(&p->rc, p->posAlignEncoder, kNumAlignBits, kAlignMask); - CLzmaProb *probs = p->posAlignEncoder; - unsigned m = 1; - do - { - UInt32 ttt, newBound; - RC_BIT_PRE(p, probs + m) - RC_BIT_1(&p->rc, probs + m); - m = (m << 1) + 1; - } - while (m < kAlignTableSize); - } - p->rc.range = range; -} - - -static SRes CheckErrors(CLzmaEnc *p) -{ - if (p->result != SZ_OK) - return p->result; - if (p->rc.res != SZ_OK) - p->result = SZ_ERROR_WRITE; - if (p->matchFinderBase.result != SZ_OK) - p->result = SZ_ERROR_READ; - if (p->result != SZ_OK) - p->finished = True; - return p->result; -} - - -MY_NO_INLINE static SRes Flush(CLzmaEnc *p, UInt32 nowPos) -{ - /* ReleaseMFStream(); */ - p->finished = True; - if (p->writeEndMark) - WriteEndMarker(p, nowPos & p->pbMask); - RangeEnc_FlushData(&p->rc); - RangeEnc_FlushStream(&p->rc); - return CheckErrors(p); -} - - -MY_NO_INLINE static void FillAlignPrices(CLzmaEnc *p) -{ - unsigned i; - const CProbPrice *ProbPrices = p->ProbPrices; - const CLzmaProb *probs = p->posAlignEncoder; - // p->alignPriceCount = 0; - for (i = 0; i < kAlignTableSize / 2; i++) - { - UInt32 price = 0; - unsigned sym = i; - unsigned m = 1; - unsigned bit; - UInt32 prob; - bit = sym & 1; sym >>= 1; price += GET_PRICEa(probs[m], bit); m = (m << 1) + bit; - bit = sym & 1; sym >>= 1; price += GET_PRICEa(probs[m], bit); m = (m << 1) + bit; - bit = sym & 1; sym >>= 1; price += GET_PRICEa(probs[m], bit); m = (m << 1) + bit; - prob = probs[m]; - p->alignPrices[i ] = price + GET_PRICEa_0(prob); - p->alignPrices[i + 8] = price + GET_PRICEa_1(prob); - // p->alignPrices[i] = RcTree_ReverseGetPrice(p->posAlignEncoder, kNumAlignBits, i, p->ProbPrices); - } -} - - -MY_NO_INLINE static void FillDistancesPrices(CLzmaEnc *p) -{ - // int y; for (y = 0; y < 100; y++) { - - UInt32 tempPrices[kNumFullDistances]; - unsigned i, lps; - - const CProbPrice *ProbPrices = p->ProbPrices; - p->matchPriceCount = 0; - - for (i = kStartPosModelIndex / 2; i < kNumFullDistances / 2; i++) - { - unsigned posSlot = GetPosSlot1(i); - unsigned footerBits = (posSlot >> 1) - 1; - unsigned base = ((2 | (posSlot & 1)) << footerBits); - const CLzmaProb *probs = p->posEncoders + (size_t)base * 2; - // tempPrices[i] = RcTree_ReverseGetPrice(p->posEncoders + base, footerBits, i - base, p->ProbPrices); - UInt32 price = 0; - unsigned m = 1; - unsigned sym = i; - unsigned offset = (unsigned)1 << footerBits; - base += i; - - if (footerBits) - do - { - unsigned bit = sym & 1; - sym >>= 1; - price += GET_PRICEa(probs[m], bit); - m = (m << 1) + bit; - } - while (--footerBits); - - { - unsigned prob = probs[m]; - tempPrices[base ] = price + GET_PRICEa_0(prob); - tempPrices[base + offset] = price + GET_PRICEa_1(prob); - } - } - - for (lps = 0; lps < kNumLenToPosStates; lps++) - { - unsigned slot; - unsigned distTableSize2 = (p->distTableSize + 1) >> 1; - UInt32 *posSlotPrices = p->posSlotPrices[lps]; - const CLzmaProb *probs = p->posSlotEncoder[lps]; - - for (slot = 0; slot < distTableSize2; slot++) - { - // posSlotPrices[slot] = RcTree_GetPrice(encoder, kNumPosSlotBits, slot, p->ProbPrices); - UInt32 price; - unsigned bit; - unsigned sym = slot + (1 << (kNumPosSlotBits - 1)); - unsigned prob; - bit = sym & 1; sym >>= 1; price = GET_PRICEa(probs[sym], bit); - bit = sym & 1; sym >>= 1; price += GET_PRICEa(probs[sym], bit); - bit = sym & 1; sym >>= 1; price += GET_PRICEa(probs[sym], bit); - bit = sym & 1; sym >>= 1; price += GET_PRICEa(probs[sym], bit); - bit = sym & 1; sym >>= 1; price += GET_PRICEa(probs[sym], bit); - prob = probs[(size_t)slot + (1 << (kNumPosSlotBits - 1))]; - posSlotPrices[(size_t)slot * 2 ] = price + GET_PRICEa_0(prob); - posSlotPrices[(size_t)slot * 2 + 1] = price + GET_PRICEa_1(prob); - } - - { - UInt32 delta = ((UInt32)((kEndPosModelIndex / 2 - 1) - kNumAlignBits) << kNumBitPriceShiftBits); - for (slot = kEndPosModelIndex / 2; slot < distTableSize2; slot++) - { - posSlotPrices[(size_t)slot * 2 ] += delta; - posSlotPrices[(size_t)slot * 2 + 1] += delta; - delta += ((UInt32)1 << kNumBitPriceShiftBits); - } - } - - { - UInt32 *dp = p->distancesPrices[lps]; - - dp[0] = posSlotPrices[0]; - dp[1] = posSlotPrices[1]; - dp[2] = posSlotPrices[2]; - dp[3] = posSlotPrices[3]; - - for (i = 4; i < kNumFullDistances; i += 2) - { - UInt32 slotPrice = posSlotPrices[GetPosSlot1(i)]; - dp[i ] = slotPrice + tempPrices[i]; - dp[i + 1] = slotPrice + tempPrices[i + 1]; - } - } - } - // } -} - - - -void LzmaEnc_Construct(CLzmaEnc *p) -{ - RangeEnc_Construct(&p->rc); - MatchFinder_Construct(&p->matchFinderBase); - - #ifndef _7ZIP_ST - MatchFinderMt_Construct(&p->matchFinderMt); - p->matchFinderMt.MatchFinder = &p->matchFinderBase; - #endif - - { - CLzmaEncProps props; - LzmaEncProps_Init(&props); - LzmaEnc_SetProps(p, &props); - } - - #ifndef LZMA_LOG_BSR - LzmaEnc_FastPosInit(p->g_FastPos); - #endif - - LzmaEnc_InitPriceTables(p->ProbPrices); - p->litProbs = NULL; - p->saveState.litProbs = NULL; - -} - -CLzmaEncHandle LzmaEnc_Create(ISzAllocPtr alloc) -{ - void *p; - p = ISzAlloc_Alloc(alloc, sizeof(CLzmaEnc)); - if (p) - LzmaEnc_Construct((CLzmaEnc *)p); - return p; -} - -void LzmaEnc_FreeLits(CLzmaEnc *p, ISzAllocPtr alloc) -{ - ISzAlloc_Free(alloc, p->litProbs); - ISzAlloc_Free(alloc, p->saveState.litProbs); - p->litProbs = NULL; - p->saveState.litProbs = NULL; -} - -void LzmaEnc_Destruct(CLzmaEnc *p, ISzAllocPtr alloc, ISzAllocPtr allocBig) -{ - #ifndef _7ZIP_ST - MatchFinderMt_Destruct(&p->matchFinderMt, allocBig); - #endif - - MatchFinder_Free(&p->matchFinderBase, allocBig); - LzmaEnc_FreeLits(p, alloc); - RangeEnc_Free(&p->rc, alloc); -} - -void LzmaEnc_Destroy(CLzmaEncHandle p, ISzAllocPtr alloc, ISzAllocPtr allocBig) -{ - LzmaEnc_Destruct((CLzmaEnc *)p, alloc, allocBig); - ISzAlloc_Free(alloc, p); -} - - -static SRes LzmaEnc_CodeOneBlock(CLzmaEnc *p, UInt32 maxPackSize, UInt32 maxUnpackSize) -{ - UInt32 nowPos32, startPos32; - if (p->needInit) - { - p->matchFinder.Init(p->matchFinderObj); - p->needInit = 0; - } - - if (p->finished) - return p->result; - RINOK(CheckErrors(p)); - - nowPos32 = (UInt32)p->nowPos64; - startPos32 = nowPos32; - - if (p->nowPos64 == 0) - { - unsigned numPairs; - Byte curByte; - if (p->matchFinder.GetNumAvailableBytes(p->matchFinderObj) == 0) - return Flush(p, nowPos32); - ReadMatchDistances(p, &numPairs); - RangeEnc_EncodeBit_0(&p->rc, &p->isMatch[kState_Start][0]); - // p->state = kLiteralNextStates[p->state]; - curByte = *(p->matchFinder.GetPointerToCurrentPos(p->matchFinderObj) - p->additionalOffset); - LitEnc_Encode(&p->rc, p->litProbs, curByte); - p->additionalOffset--; - nowPos32++; - } - - if (p->matchFinder.GetNumAvailableBytes(p->matchFinderObj) != 0) - - for (;;) - { - UInt32 dist; - unsigned len, posState; - UInt32 range, ttt, newBound; - CLzmaProb *probs; - - if (p->fastMode) - len = GetOptimumFast(p); - else - { - unsigned oci = p->optCur; - if (p->optEnd == oci) - len = GetOptimum(p, nowPos32); - else - { - const COptimal *opt = &p->opt[oci]; - len = opt->len; - p->backRes = opt->dist; - p->optCur = oci + 1; - } - } - - posState = (unsigned)nowPos32 & p->pbMask; - range = p->rc.range; - probs = &p->isMatch[p->state][posState]; - - RC_BIT_PRE(&p->rc, probs) - - dist = p->backRes; - - #ifdef SHOW_STAT2 - printf("\n pos = %6X, len = %3u pos = %6u", nowPos32, len, dist); - #endif - - if (dist == MARK_LIT) - { - Byte curByte; - const Byte *data; - unsigned state; - - RC_BIT_0(&p->rc, probs); - p->rc.range = range; - data = p->matchFinder.GetPointerToCurrentPos(p->matchFinderObj) - p->additionalOffset; - probs = LIT_PROBS(nowPos32, *(data - 1)); - curByte = *data; - state = p->state; - p->state = kLiteralNextStates[state]; - if (IsLitState(state)) - LitEnc_Encode(&p->rc, probs, curByte); - else - LitEnc_EncodeMatched(&p->rc, probs, curByte, *(data - p->reps[0])); - } - else - { - RC_BIT_1(&p->rc, probs); - probs = &p->isRep[p->state]; - RC_BIT_PRE(&p->rc, probs) - - if (dist < LZMA_NUM_REPS) - { - RC_BIT_1(&p->rc, probs); - probs = &p->isRepG0[p->state]; - RC_BIT_PRE(&p->rc, probs) - if (dist == 0) - { - RC_BIT_0(&p->rc, probs); - probs = &p->isRep0Long[p->state][posState]; - RC_BIT_PRE(&p->rc, probs) - if (len != 1) - { - RC_BIT_1_BASE(&p->rc, probs); - } - else - { - RC_BIT_0_BASE(&p->rc, probs); - p->state = kShortRepNextStates[p->state]; - } - } - else - { - RC_BIT_1(&p->rc, probs); - probs = &p->isRepG1[p->state]; - RC_BIT_PRE(&p->rc, probs) - if (dist == 1) - { - RC_BIT_0_BASE(&p->rc, probs); - dist = p->reps[1]; - } - else - { - RC_BIT_1(&p->rc, probs); - probs = &p->isRepG2[p->state]; - RC_BIT_PRE(&p->rc, probs) - if (dist == 2) - { - RC_BIT_0_BASE(&p->rc, probs); - dist = p->reps[2]; - } - else - { - RC_BIT_1_BASE(&p->rc, probs); - dist = p->reps[3]; - p->reps[3] = p->reps[2]; - } - p->reps[2] = p->reps[1]; - } - p->reps[1] = p->reps[0]; - p->reps[0] = dist; - } - - RC_NORM(&p->rc) - - p->rc.range = range; - - if (len != 1) - { - LenEnc_Encode(&p->repLenProbs, &p->rc, len - LZMA_MATCH_LEN_MIN, posState); - --p->repLenEncCounter; - p->state = kRepNextStates[p->state]; - } - } - else - { - unsigned posSlot; - RC_BIT_0(&p->rc, probs); - p->rc.range = range; - p->state = kMatchNextStates[p->state]; - - LenEnc_Encode(&p->lenProbs, &p->rc, len - LZMA_MATCH_LEN_MIN, posState); - // --p->lenEnc.counter; - - dist -= LZMA_NUM_REPS; - p->reps[3] = p->reps[2]; - p->reps[2] = p->reps[1]; - p->reps[1] = p->reps[0]; - p->reps[0] = dist + 1; - - p->matchPriceCount++; - GetPosSlot(dist, posSlot); - // RcTree_Encode_PosSlot(&p->rc, p->posSlotEncoder[GetLenToPosState(len)], posSlot); - { - UInt32 sym = (UInt32)posSlot + (1 << kNumPosSlotBits); - range = p->rc.range; - probs = p->posSlotEncoder[GetLenToPosState(len)]; - do - { - CLzmaProb *prob = probs + (sym >> kNumPosSlotBits); - UInt32 bit = (sym >> (kNumPosSlotBits - 1)) & 1; - sym <<= 1; - RC_BIT(&p->rc, prob, bit); - } - while (sym < (1 << kNumPosSlotBits * 2)); - p->rc.range = range; - } - - if (dist >= kStartPosModelIndex) - { - unsigned footerBits = ((posSlot >> 1) - 1); - - if (dist < kNumFullDistances) - { - unsigned base = ((2 | (posSlot & 1)) << footerBits); - RcTree_ReverseEncode(&p->rc, p->posEncoders + base, footerBits, (unsigned)(dist /* - base */)); - } - else - { - UInt32 pos2 = (dist | 0xF) << (32 - footerBits); - range = p->rc.range; - // RangeEnc_EncodeDirectBits(&p->rc, posReduced >> kNumAlignBits, footerBits - kNumAlignBits); - /* - do - { - range >>= 1; - p->rc.low += range & (0 - ((dist >> --footerBits) & 1)); - RC_NORM(&p->rc) - } - while (footerBits > kNumAlignBits); - */ - do - { - range >>= 1; - p->rc.low += range & (0 - (pos2 >> 31)); - pos2 += pos2; - RC_NORM(&p->rc) - } - while (pos2 != 0xF0000000); - - - // RcTree_ReverseEncode(&p->rc, p->posAlignEncoder, kNumAlignBits, posReduced & kAlignMask); - - { - unsigned m = 1; - unsigned bit; - bit = dist & 1; dist >>= 1; RC_BIT(&p->rc, p->posAlignEncoder + m, bit); m = (m << 1) + bit; - bit = dist & 1; dist >>= 1; RC_BIT(&p->rc, p->posAlignEncoder + m, bit); m = (m << 1) + bit; - bit = dist & 1; dist >>= 1; RC_BIT(&p->rc, p->posAlignEncoder + m, bit); m = (m << 1) + bit; - bit = dist & 1; RC_BIT(&p->rc, p->posAlignEncoder + m, bit); - p->rc.range = range; - // p->alignPriceCount++; - } - } - } - } - } - - nowPos32 += (UInt32)len; - p->additionalOffset -= len; - - if (p->additionalOffset == 0) - { - UInt32 processed; - - if (!p->fastMode) - { - /* - if (p->alignPriceCount >= 16) // kAlignTableSize - FillAlignPrices(p); - if (p->matchPriceCount >= 128) - FillDistancesPrices(p); - if (p->lenEnc.counter <= 0) - LenPriceEnc_UpdateTables(&p->lenEnc, 1 << p->pb, &p->lenProbs, p->ProbPrices); - */ - if (p->matchPriceCount >= 64) - { - FillAlignPrices(p); - // { int y; for (y = 0; y < 100; y++) { - FillDistancesPrices(p); - // }} - LenPriceEnc_UpdateTables(&p->lenEnc, 1 << p->pb, &p->lenProbs, p->ProbPrices); - } - if (p->repLenEncCounter <= 0) - { - p->repLenEncCounter = REP_LEN_COUNT; - LenPriceEnc_UpdateTables(&p->repLenEnc, 1 << p->pb, &p->repLenProbs, p->ProbPrices); - } - } - - if (p->matchFinder.GetNumAvailableBytes(p->matchFinderObj) == 0) - break; - processed = nowPos32 - startPos32; - - if (maxPackSize) - { - if (processed + kNumOpts + 300 >= maxUnpackSize - || RangeEnc_GetProcessed_sizet(&p->rc) + kPackReserve >= maxPackSize) - break; - } - else if (processed >= (1 << 17)) - { - p->nowPos64 += nowPos32 - startPos32; - return CheckErrors(p); - } - } - } - - p->nowPos64 += nowPos32 - startPos32; - return Flush(p, nowPos32); -} - - - -#define kBigHashDicLimit ((UInt32)1 << 24) - -static SRes LzmaEnc_Alloc(CLzmaEnc *p, UInt32 keepWindowSize, ISzAllocPtr alloc, ISzAllocPtr allocBig) -{ - UInt32 beforeSize = kNumOpts; - if (!RangeEnc_Alloc(&p->rc, alloc)) - return SZ_ERROR_MEM; - - #ifndef _7ZIP_ST - p->mtMode = (p->multiThread && !p->fastMode && (p->matchFinderBase.btMode != 0)); - #endif - - { - unsigned lclp = p->lc + p->lp; - if (!p->litProbs || !p->saveState.litProbs || p->lclp != lclp) - { - LzmaEnc_FreeLits(p, alloc); - p->litProbs = (CLzmaProb *)ISzAlloc_Alloc(alloc, ((UInt32)0x300 << lclp) * sizeof(CLzmaProb)); - p->saveState.litProbs = (CLzmaProb *)ISzAlloc_Alloc(alloc, ((UInt32)0x300 << lclp) * sizeof(CLzmaProb)); - if (!p->litProbs || !p->saveState.litProbs) - { - LzmaEnc_FreeLits(p, alloc); - return SZ_ERROR_MEM; - } - p->lclp = lclp; - } - } - - p->matchFinderBase.bigHash = (Byte)(p->dictSize > kBigHashDicLimit ? 1 : 0); - - if (beforeSize + p->dictSize < keepWindowSize) - beforeSize = keepWindowSize - p->dictSize; - - #ifndef _7ZIP_ST - if (p->mtMode) - { - RINOK(MatchFinderMt_Create(&p->matchFinderMt, p->dictSize, beforeSize, p->numFastBytes, - LZMA_MATCH_LEN_MAX - + 1 /* 18.04 */ - , allocBig)); - p->matchFinderObj = &p->matchFinderMt; - p->matchFinderBase.bigHash = (Byte)( - (p->dictSize > kBigHashDicLimit && p->matchFinderBase.hashMask >= 0xFFFFFF) ? 1 : 0); - MatchFinderMt_CreateVTable(&p->matchFinderMt, &p->matchFinder); - } - else - #endif - { - if (!MatchFinder_Create(&p->matchFinderBase, p->dictSize, beforeSize, p->numFastBytes, LZMA_MATCH_LEN_MAX, allocBig)) - return SZ_ERROR_MEM; - p->matchFinderObj = &p->matchFinderBase; - MatchFinder_CreateVTable(&p->matchFinderBase, &p->matchFinder); - } - - return SZ_OK; -} - -void LzmaEnc_Init(CLzmaEnc *p) -{ - unsigned i; - p->state = 0; - p->reps[0] = - p->reps[1] = - p->reps[2] = - p->reps[3] = 1; - - RangeEnc_Init(&p->rc); - - for (i = 0; i < (1 << kNumAlignBits); i++) - p->posAlignEncoder[i] = kProbInitValue; - - for (i = 0; i < kNumStates; i++) - { - unsigned j; - for (j = 0; j < LZMA_NUM_PB_STATES_MAX; j++) - { - p->isMatch[i][j] = kProbInitValue; - p->isRep0Long[i][j] = kProbInitValue; - } - p->isRep[i] = kProbInitValue; - p->isRepG0[i] = kProbInitValue; - p->isRepG1[i] = kProbInitValue; - p->isRepG2[i] = kProbInitValue; - } - - { - for (i = 0; i < kNumLenToPosStates; i++) - { - CLzmaProb *probs = p->posSlotEncoder[i]; - unsigned j; - for (j = 0; j < (1 << kNumPosSlotBits); j++) - probs[j] = kProbInitValue; - } - } - { - for (i = 0; i < kNumFullDistances; i++) - p->posEncoders[i] = kProbInitValue; - } - - { - UInt32 num = (UInt32)0x300 << (p->lp + p->lc); - UInt32 k; - CLzmaProb *probs = p->litProbs; - for (k = 0; k < num; k++) - probs[k] = kProbInitValue; - } - - - LenEnc_Init(&p->lenProbs); - LenEnc_Init(&p->repLenProbs); - - p->optEnd = 0; - p->optCur = 0; - - { - for (i = 0; i < kNumOpts; i++) - p->opt[i].price = kInfinityPrice; - } - - p->additionalOffset = 0; - - p->pbMask = (1 << p->pb) - 1; - p->lpMask = ((UInt32)0x100 << p->lp) - ((unsigned)0x100 >> p->lc); -} - - -void LzmaEnc_InitPrices(CLzmaEnc *p) -{ - if (!p->fastMode) - { - FillDistancesPrices(p); - FillAlignPrices(p); - } - - p->lenEnc.tableSize = - p->repLenEnc.tableSize = - p->numFastBytes + 1 - LZMA_MATCH_LEN_MIN; - - p->repLenEncCounter = REP_LEN_COUNT; - - LenPriceEnc_UpdateTables(&p->lenEnc, 1 << p->pb, &p->lenProbs, p->ProbPrices); - LenPriceEnc_UpdateTables(&p->repLenEnc, 1 << p->pb, &p->repLenProbs, p->ProbPrices); -} - -static SRes LzmaEnc_AllocAndInit(CLzmaEnc *p, UInt32 keepWindowSize, ISzAllocPtr alloc, ISzAllocPtr allocBig) -{ - unsigned i; - for (i = kEndPosModelIndex / 2; i < kDicLogSizeMax; i++) - if (p->dictSize <= ((UInt32)1 << i)) - break; - p->distTableSize = i * 2; - - p->finished = False; - p->result = SZ_OK; - RINOK(LzmaEnc_Alloc(p, keepWindowSize, alloc, allocBig)); - LzmaEnc_Init(p); - LzmaEnc_InitPrices(p); - p->nowPos64 = 0; - return SZ_OK; -} - -static SRes LzmaEnc_Prepare(CLzmaEncHandle pp, ISeqOutStream *outStream, ISeqInStream *inStream, - ISzAllocPtr alloc, ISzAllocPtr allocBig) -{ - CLzmaEnc *p = (CLzmaEnc *)pp; - p->matchFinderBase.stream = inStream; - p->needInit = 1; - p->rc.outStream = outStream; - return LzmaEnc_AllocAndInit(p, 0, alloc, allocBig); -} - -SRes LzmaEnc_PrepareForLzma2(CLzmaEncHandle pp, - ISeqInStream *inStream, UInt32 keepWindowSize, - ISzAllocPtr alloc, ISzAllocPtr allocBig) -{ - CLzmaEnc *p = (CLzmaEnc *)pp; - p->matchFinderBase.stream = inStream; - p->needInit = 1; - return LzmaEnc_AllocAndInit(p, keepWindowSize, alloc, allocBig); -} - -static void LzmaEnc_SetInputBuf(CLzmaEnc *p, const Byte *src, SizeT srcLen) -{ - p->matchFinderBase.directInput = 1; - p->matchFinderBase.bufferBase = (Byte *)src; - p->matchFinderBase.directInputRem = srcLen; -} - -SRes LzmaEnc_MemPrepare(CLzmaEncHandle pp, const Byte *src, SizeT srcLen, - UInt32 keepWindowSize, ISzAllocPtr alloc, ISzAllocPtr allocBig) -{ - CLzmaEnc *p = (CLzmaEnc *)pp; - LzmaEnc_SetInputBuf(p, src, srcLen); - p->needInit = 1; - - LzmaEnc_SetDataSize(pp, srcLen); - return LzmaEnc_AllocAndInit(p, keepWindowSize, alloc, allocBig); -} - -void LzmaEnc_Finish(CLzmaEncHandle pp) -{ - #ifndef _7ZIP_ST - CLzmaEnc *p = (CLzmaEnc *)pp; - if (p->mtMode) - MatchFinderMt_ReleaseStream(&p->matchFinderMt); - #else - UNUSED_VAR(pp); - #endif -} - - -typedef struct -{ - ISeqOutStream vt; - Byte *data; - SizeT rem; - BoolInt overflow; -} CLzmaEnc_SeqOutStreamBuf; - -static size_t SeqOutStreamBuf_Write(const ISeqOutStream *pp, const void *data, size_t size) -{ - CLzmaEnc_SeqOutStreamBuf *p = CONTAINER_FROM_VTBL(pp, CLzmaEnc_SeqOutStreamBuf, vt); - if (p->rem < size) - { - size = p->rem; - p->overflow = True; - } - memcpy(p->data, data, size); - p->rem -= size; - p->data += size; - return size; -} - - -UInt32 LzmaEnc_GetNumAvailableBytes(CLzmaEncHandle pp) -{ - const CLzmaEnc *p = (CLzmaEnc *)pp; - return p->matchFinder.GetNumAvailableBytes(p->matchFinderObj); -} - - -const Byte *LzmaEnc_GetCurBuf(CLzmaEncHandle pp) -{ - const CLzmaEnc *p = (CLzmaEnc *)pp; - return p->matchFinder.GetPointerToCurrentPos(p->matchFinderObj) - p->additionalOffset; -} - - -SRes LzmaEnc_CodeOneMemBlock(CLzmaEncHandle pp, BoolInt reInit, - Byte *dest, size_t *destLen, UInt32 desiredPackSize, UInt32 *unpackSize) -{ - CLzmaEnc *p = (CLzmaEnc *)pp; - UInt64 nowPos64; - SRes res; - CLzmaEnc_SeqOutStreamBuf outStream; - - outStream.vt.Write = SeqOutStreamBuf_Write; - outStream.data = dest; - outStream.rem = *destLen; - outStream.overflow = False; - - p->writeEndMark = False; - p->finished = False; - p->result = SZ_OK; - - if (reInit) - LzmaEnc_Init(p); - LzmaEnc_InitPrices(p); - - nowPos64 = p->nowPos64; - RangeEnc_Init(&p->rc); - p->rc.outStream = &outStream.vt; - - if (desiredPackSize == 0) - return SZ_ERROR_OUTPUT_EOF; - - res = LzmaEnc_CodeOneBlock(p, desiredPackSize, *unpackSize); - - *unpackSize = (UInt32)(p->nowPos64 - nowPos64); - *destLen -= outStream.rem; - if (outStream.overflow) - return SZ_ERROR_OUTPUT_EOF; - - return res; -} - - -static SRes LzmaEnc_Encode2(CLzmaEnc *p, ICompressProgress *progress) -{ - SRes res = SZ_OK; - - #ifndef _7ZIP_ST - Byte allocaDummy[0x300]; - allocaDummy[0] = 0; - allocaDummy[1] = allocaDummy[0]; - #endif - - for (;;) - { - res = LzmaEnc_CodeOneBlock(p, 0, 0); - if (res != SZ_OK || p->finished) - break; - if (progress) - { - res = ICompressProgress_Progress(progress, p->nowPos64, RangeEnc_GetProcessed(&p->rc)); - if (res != SZ_OK) - { - res = SZ_ERROR_PROGRESS; - break; - } - } - } - - LzmaEnc_Finish(p); - - /* - if (res == SZ_OK && !Inline_MatchFinder_IsFinishedOK(&p->matchFinderBase)) - res = SZ_ERROR_FAIL; - } - */ - - return res; -} - - -SRes LzmaEnc_Encode(CLzmaEncHandle pp, ISeqOutStream *outStream, ISeqInStream *inStream, ICompressProgress *progress, - ISzAllocPtr alloc, ISzAllocPtr allocBig) -{ - RINOK(LzmaEnc_Prepare(pp, outStream, inStream, alloc, allocBig)); - return LzmaEnc_Encode2((CLzmaEnc *)pp, progress); -} - - -SRes LzmaEnc_WriteProperties(CLzmaEncHandle pp, Byte *props, SizeT *size) -{ - CLzmaEnc *p = (CLzmaEnc *)pp; - unsigned i; - UInt32 dictSize = p->dictSize; - if (*size < LZMA_PROPS_SIZE) - return SZ_ERROR_PARAM; - *size = LZMA_PROPS_SIZE; - props[0] = (Byte)((p->pb * 5 + p->lp) * 9 + p->lc); - - if (dictSize >= ((UInt32)1 << 22)) - { - UInt32 kDictMask = ((UInt32)1 << 20) - 1; - if (dictSize < (UInt32)0xFFFFFFFF - kDictMask) - dictSize = (dictSize + kDictMask) & ~kDictMask; - } - else for (i = 11; i <= 30; i++) - { - if (dictSize <= ((UInt32)2 << i)) { dictSize = (2 << i); break; } - if (dictSize <= ((UInt32)3 << i)) { dictSize = (3 << i); break; } - } - - for (i = 0; i < 4; i++) - props[1 + i] = (Byte)(dictSize >> (8 * i)); - return SZ_OK; -} - - -unsigned LzmaEnc_IsWriteEndMark(CLzmaEncHandle pp) -{ - return ((CLzmaEnc *)pp)->writeEndMark; -} - - -SRes LzmaEnc_MemEncode(CLzmaEncHandle pp, Byte *dest, SizeT *destLen, const Byte *src, SizeT srcLen, - int writeEndMark, ICompressProgress *progress, ISzAllocPtr alloc, ISzAllocPtr allocBig) -{ - SRes res; - CLzmaEnc *p = (CLzmaEnc *)pp; - - CLzmaEnc_SeqOutStreamBuf outStream; - - outStream.vt.Write = SeqOutStreamBuf_Write; - outStream.data = dest; - outStream.rem = *destLen; - outStream.overflow = False; - - p->writeEndMark = writeEndMark; - p->rc.outStream = &outStream.vt; - - res = LzmaEnc_MemPrepare(pp, src, srcLen, 0, alloc, allocBig); - - if (res == SZ_OK) - { - res = LzmaEnc_Encode2(p, progress); - if (res == SZ_OK && p->nowPos64 != srcLen) - res = SZ_ERROR_FAIL; - } - - *destLen -= outStream.rem; - if (outStream.overflow) - return SZ_ERROR_OUTPUT_EOF; - return res; -} - - -SRes LzmaEncode(Byte *dest, SizeT *destLen, const Byte *src, SizeT srcLen, - const CLzmaEncProps *props, Byte *propsEncoded, SizeT *propsSize, int writeEndMark, - ICompressProgress *progress, ISzAllocPtr alloc, ISzAllocPtr allocBig) -{ - CLzmaEnc *p = (CLzmaEnc *)LzmaEnc_Create(alloc); - SRes res; - if (!p) - return SZ_ERROR_MEM; - - res = LzmaEnc_SetProps(p, props); - if (res == SZ_OK) - { - res = LzmaEnc_WriteProperties(p, propsEncoded, propsSize); - if (res == SZ_OK) - res = LzmaEnc_MemEncode(p, dest, destLen, src, srcLen, - writeEndMark, progress, alloc, allocBig); - } - - LzmaEnc_Destroy(p, alloc, allocBig); - return res; -} diff --git a/code/ryzom/client/src/seven_zip/LzmaEnc.h b/code/ryzom/client/src/seven_zip/LzmaEnc.h deleted file mode 100644 index 9194ee576..000000000 --- a/code/ryzom/client/src/seven_zip/LzmaEnc.h +++ /dev/null @@ -1,76 +0,0 @@ -/* LzmaEnc.h -- LZMA Encoder -2017-07-27 : Igor Pavlov : Public domain */ - -#ifndef __LZMA_ENC_H -#define __LZMA_ENC_H - -#include "7zTypes.h" - -EXTERN_C_BEGIN - -#define LZMA_PROPS_SIZE 5 - -typedef struct _CLzmaEncProps -{ - int level; /* 0 <= level <= 9 */ - UInt32 dictSize; /* (1 << 12) <= dictSize <= (1 << 27) for 32-bit version - (1 << 12) <= dictSize <= (3 << 29) for 64-bit version - default = (1 << 24) */ - int lc; /* 0 <= lc <= 8, default = 3 */ - int lp; /* 0 <= lp <= 4, default = 0 */ - int pb; /* 0 <= pb <= 4, default = 2 */ - int algo; /* 0 - fast, 1 - normal, default = 1 */ - int fb; /* 5 <= fb <= 273, default = 32 */ - int btMode; /* 0 - hashChain Mode, 1 - binTree mode - normal, default = 1 */ - int numHashBytes; /* 2, 3 or 4, default = 4 */ - UInt32 mc; /* 1 <= mc <= (1 << 30), default = 32 */ - unsigned writeEndMark; /* 0 - do not write EOPM, 1 - write EOPM, default = 0 */ - int numThreads; /* 1 or 2, default = 2 */ - - UInt64 reduceSize; /* estimated size of data that will be compressed. default = (UInt64)(Int64)-1. - Encoder uses this value to reduce dictionary size */ -} CLzmaEncProps; - -void LzmaEncProps_Init(CLzmaEncProps *p); -void LzmaEncProps_Normalize(CLzmaEncProps *p); -UInt32 LzmaEncProps_GetDictSize(const CLzmaEncProps *props2); - - -/* ---------- CLzmaEncHandle Interface ---------- */ - -/* LzmaEnc* functions can return the following exit codes: -SRes: - SZ_OK - OK - SZ_ERROR_MEM - Memory allocation error - SZ_ERROR_PARAM - Incorrect paramater in props - SZ_ERROR_WRITE - ISeqOutStream write callback error - SZ_ERROR_OUTPUT_EOF - output buffer overflow - version with (Byte *) output - SZ_ERROR_PROGRESS - some break from progress callback - SZ_ERROR_THREAD - error in multithreading functions (only for Mt version) -*/ - -typedef void * CLzmaEncHandle; - -CLzmaEncHandle LzmaEnc_Create(ISzAllocPtr alloc); -void LzmaEnc_Destroy(CLzmaEncHandle p, ISzAllocPtr alloc, ISzAllocPtr allocBig); - -SRes LzmaEnc_SetProps(CLzmaEncHandle p, const CLzmaEncProps *props); -void LzmaEnc_SetDataSize(CLzmaEncHandle p, UInt64 expectedDataSiize); -SRes LzmaEnc_WriteProperties(CLzmaEncHandle p, Byte *properties, SizeT *size); -unsigned LzmaEnc_IsWriteEndMark(CLzmaEncHandle p); - -SRes LzmaEnc_Encode(CLzmaEncHandle p, ISeqOutStream *outStream, ISeqInStream *inStream, - ICompressProgress *progress, ISzAllocPtr alloc, ISzAllocPtr allocBig); -SRes LzmaEnc_MemEncode(CLzmaEncHandle p, Byte *dest, SizeT *destLen, const Byte *src, SizeT srcLen, - int writeEndMark, ICompressProgress *progress, ISzAllocPtr alloc, ISzAllocPtr allocBig); - - -/* ---------- One Call Interface ---------- */ - -SRes LzmaEncode(Byte *dest, SizeT *destLen, const Byte *src, SizeT srcLen, - const CLzmaEncProps *props, Byte *propsEncoded, SizeT *propsSize, int writeEndMark, - ICompressProgress *progress, ISzAllocPtr alloc, ISzAllocPtr allocBig); - -EXTERN_C_END - -#endif diff --git a/code/ryzom/client/src/seven_zip/LzmaLib.cpp b/code/ryzom/client/src/seven_zip/LzmaLib.cpp deleted file mode 100644 index 706e9e58c..000000000 --- a/code/ryzom/client/src/seven_zip/LzmaLib.cpp +++ /dev/null @@ -1,40 +0,0 @@ -/* LzmaLib.c -- LZMA library wrapper -2015-06-13 : Igor Pavlov : Public domain */ - -#include "Alloc.h" -#include "LzmaDec.h" -#include "LzmaEnc.h" -#include "LzmaLib.h" - -MY_STDAPI LzmaCompress(unsigned char *dest, size_t *destLen, const unsigned char *src, size_t srcLen, - unsigned char *outProps, size_t *outPropsSize, - int level, /* 0 <= level <= 9, default = 5 */ - unsigned dictSize, /* use (1 << N) or (3 << N). 4 KB < dictSize <= 128 MB */ - int lc, /* 0 <= lc <= 8, default = 3 */ - int lp, /* 0 <= lp <= 4, default = 0 */ - int pb, /* 0 <= pb <= 4, default = 2 */ - int fb, /* 5 <= fb <= 273, default = 32 */ - int numThreads /* 1 or 2, default = 2 */ -) -{ - CLzmaEncProps props; - LzmaEncProps_Init(&props); - props.level = level; - props.dictSize = dictSize; - props.lc = lc; - props.lp = lp; - props.pb = pb; - props.fb = fb; - props.numThreads = numThreads; - - return LzmaEncode(dest, destLen, src, srcLen, &props, outProps, outPropsSize, 0, - NULL, &g_Alloc, &g_Alloc); -} - - -MY_STDAPI LzmaUncompress(unsigned char *dest, size_t *destLen, const unsigned char *src, size_t *srcLen, - const unsigned char *props, size_t propsSize) -{ - ELzmaStatus status; - return LzmaDecode(dest, destLen, src, srcLen, props, (unsigned)propsSize, LZMA_FINISH_ANY, &status, &g_Alloc); -} diff --git a/code/ryzom/client/src/seven_zip/LzmaLib.h b/code/ryzom/client/src/seven_zip/LzmaLib.h deleted file mode 100644 index 88fa87d35..000000000 --- a/code/ryzom/client/src/seven_zip/LzmaLib.h +++ /dev/null @@ -1,131 +0,0 @@ -/* LzmaLib.h -- LZMA library interface -2013-01-18 : Igor Pavlov : Public domain */ - -#ifndef __LZMA_LIB_H -#define __LZMA_LIB_H - -#include "7zTypes.h" - -EXTERN_C_BEGIN - -#define MY_STDAPI int MY_STD_CALL - -#define LZMA_PROPS_SIZE 5 - -/* -RAM requirements for LZMA: - for compression: (dictSize * 11.5 + 6 MB) + state_size - for decompression: dictSize + state_size - state_size = (4 + (1.5 << (lc + lp))) KB - by default (lc=3, lp=0), state_size = 16 KB. - -LZMA properties (5 bytes) format - Offset Size Description - 0 1 lc, lp and pb in encoded form. - 1 4 dictSize (little endian). -*/ - -/* -LzmaCompress ------------- - -outPropsSize - - In: the pointer to the size of outProps buffer; *outPropsSize = LZMA_PROPS_SIZE = 5. - Out: the pointer to the size of written properties in outProps buffer; *outPropsSize = LZMA_PROPS_SIZE = 5. - - LZMA Encoder will use defult values for any parameter, if it is - -1 for any from: level, loc, lp, pb, fb, numThreads - 0 for dictSize - -level - compression level: 0 <= level <= 9; - - level dictSize algo fb - 0: 16 KB 0 32 - 1: 64 KB 0 32 - 2: 256 KB 0 32 - 3: 1 MB 0 32 - 4: 4 MB 0 32 - 5: 16 MB 1 32 - 6: 32 MB 1 32 - 7+: 64 MB 1 64 - - The default value for "level" is 5. - - algo = 0 means fast method - algo = 1 means normal method - -dictSize - The dictionary size in bytes. The maximum value is - 128 MB = (1 << 27) bytes for 32-bit version - 1 GB = (1 << 30) bytes for 64-bit version - The default value is 16 MB = (1 << 24) bytes. - It's recommended to use the dictionary that is larger than 4 KB and - that can be calculated as (1 << N) or (3 << N) sizes. - -lc - The number of literal context bits (high bits of previous literal). - It can be in the range from 0 to 8. The default value is 3. - Sometimes lc=4 gives the gain for big files. - -lp - The number of literal pos bits (low bits of current position for literals). - It can be in the range from 0 to 4. The default value is 0. - The lp switch is intended for periodical data when the period is equal to 2^lp. - For example, for 32-bit (4 bytes) periodical data you can use lp=2. Often it's - better to set lc=0, if you change lp switch. - -pb - The number of pos bits (low bits of current position). - It can be in the range from 0 to 4. The default value is 2. - The pb switch is intended for periodical data when the period is equal 2^pb. - -fb - Word size (the number of fast bytes). - It can be in the range from 5 to 273. The default value is 32. - Usually, a big number gives a little bit better compression ratio and - slower compression process. - -numThreads - The number of thereads. 1 or 2. The default value is 2. - Fast mode (algo = 0) can use only 1 thread. - -Out: - destLen - processed output size -Returns: - SZ_OK - OK - SZ_ERROR_MEM - Memory allocation error - SZ_ERROR_PARAM - Incorrect paramater - SZ_ERROR_OUTPUT_EOF - output buffer overflow - SZ_ERROR_THREAD - errors in multithreading functions (only for Mt version) -*/ - -MY_STDAPI LzmaCompress(unsigned char *dest, size_t *destLen, const unsigned char *src, size_t srcLen, - unsigned char *outProps, size_t *outPropsSize, /* *outPropsSize must be = 5 */ - int level, /* 0 <= level <= 9, default = 5 */ - unsigned dictSize, /* default = (1 << 24) */ - int lc, /* 0 <= lc <= 8, default = 3 */ - int lp, /* 0 <= lp <= 4, default = 0 */ - int pb, /* 0 <= pb <= 4, default = 2 */ - int fb, /* 5 <= fb <= 273, default = 32 */ - int numThreads /* 1 or 2, default = 2 */ - ); - -/* -LzmaUncompress --------------- -In: - dest - output data - destLen - output data size - src - input data - srcLen - input data size -Out: - destLen - processed output size - srcLen - processed input size -Returns: - SZ_OK - OK - SZ_ERROR_DATA - Data error - SZ_ERROR_MEM - Memory allocation arror - SZ_ERROR_UNSUPPORTED - Unsupported properties - SZ_ERROR_INPUT_EOF - it needs more bytes in input buffer (src) -*/ - -MY_STDAPI LzmaUncompress(unsigned char *dest, size_t *destLen, const unsigned char *src, SizeT *srcLen, - const unsigned char *props, size_t propsSize); - -EXTERN_C_END - -#endif diff --git a/code/ryzom/client/src/seven_zip/Ppmd.h b/code/ryzom/client/src/seven_zip/Ppmd.h deleted file mode 100644 index a5c1e3ef2..000000000 --- a/code/ryzom/client/src/seven_zip/Ppmd.h +++ /dev/null @@ -1,85 +0,0 @@ -/* Ppmd.h -- PPMD codec common code -2017-04-03 : Igor Pavlov : Public domain -This code is based on PPMd var.H (2001): Dmitry Shkarin : Public domain */ - -#ifndef __PPMD_H -#define __PPMD_H - -#include "CpuArch.h" - -EXTERN_C_BEGIN - -#ifdef MY_CPU_32BIT - #define PPMD_32BIT -#endif - -#define PPMD_INT_BITS 7 -#define PPMD_PERIOD_BITS 7 -#define PPMD_BIN_SCALE (1 << (PPMD_INT_BITS + PPMD_PERIOD_BITS)) - -#define PPMD_GET_MEAN_SPEC(summ, shift, round) (((summ) + (1 << ((shift) - (round)))) >> (shift)) -#define PPMD_GET_MEAN(summ) PPMD_GET_MEAN_SPEC((summ), PPMD_PERIOD_BITS, 2) -#define PPMD_UPDATE_PROB_0(prob) ((prob) + (1 << PPMD_INT_BITS) - PPMD_GET_MEAN(prob)) -#define PPMD_UPDATE_PROB_1(prob) ((prob) - PPMD_GET_MEAN(prob)) - -#define PPMD_N1 4 -#define PPMD_N2 4 -#define PPMD_N3 4 -#define PPMD_N4 ((128 + 3 - 1 * PPMD_N1 - 2 * PPMD_N2 - 3 * PPMD_N3) / 4) -#define PPMD_NUM_INDEXES (PPMD_N1 + PPMD_N2 + PPMD_N3 + PPMD_N4) - -#pragma pack(push, 1) -/* Most compilers works OK here even without #pragma pack(push, 1), but some GCC compilers need it. */ - -/* SEE-contexts for PPM-contexts with masked symbols */ -typedef struct -{ - UInt16 Summ; /* Freq */ - Byte Shift; /* Speed of Freq change; low Shift is for fast change */ - Byte Count; /* Count to next change of Shift */ -} CPpmd_See; - -#define Ppmd_See_Update(p) if ((p)->Shift < PPMD_PERIOD_BITS && --(p)->Count == 0) \ - { (p)->Summ <<= 1; (p)->Count = (Byte)(3 << (p)->Shift++); } - -typedef struct -{ - Byte Symbol; - Byte Freq; - UInt16 SuccessorLow; - UInt16 SuccessorHigh; -} CPpmd_State; - -#pragma pack(pop) - -typedef - #ifdef PPMD_32BIT - CPpmd_State * - #else - UInt32 - #endif - CPpmd_State_Ref; - -typedef - #ifdef PPMD_32BIT - void * - #else - UInt32 - #endif - CPpmd_Void_Ref; - -typedef - #ifdef PPMD_32BIT - Byte * - #else - UInt32 - #endif - CPpmd_Byte_Ref; - -#define PPMD_SetAllBitsIn256Bytes(p) \ - { size_t z; for (z = 0; z < 256 / sizeof(p[0]); z += 8) { \ - p[z+7] = p[z+6] = p[z+5] = p[z+4] = p[z+3] = p[z+2] = p[z+1] = p[z+0] = ~(size_t)0; }} - -EXTERN_C_END - -#endif diff --git a/code/ryzom/client/src/seven_zip/Ppmd7.cpp b/code/ryzom/client/src/seven_zip/Ppmd7.cpp deleted file mode 100644 index 470aadccf..000000000 --- a/code/ryzom/client/src/seven_zip/Ppmd7.cpp +++ /dev/null @@ -1,712 +0,0 @@ -/* Ppmd7.c -- PPMdH codec -2018-07-04 : Igor Pavlov : Public domain -This code is based on PPMd var.H (2001): Dmitry Shkarin : Public domain */ - -#include "Precomp.h" - -#include - -#include "Ppmd7.h" - -const Byte PPMD7_kExpEscape[16] = { 25, 14, 9, 7, 5, 5, 4, 4, 4, 3, 3, 3, 2, 2, 2, 2 }; -static const UInt16 kInitBinEsc[] = { 0x3CDD, 0x1F3F, 0x59BF, 0x48F3, 0x64A1, 0x5ABC, 0x6632, 0x6051}; - -#define MAX_FREQ 124 -#define UNIT_SIZE 12 - -#define U2B(nu) ((UInt32)(nu) * UNIT_SIZE) -#define U2I(nu) (p->Units2Indx[(size_t)(nu) - 1]) -#define I2U(indx) (p->Indx2Units[indx]) - -#ifdef PPMD_32BIT - #define REF(ptr) (ptr) -#else - #define REF(ptr) ((UInt32)((Byte *)(ptr) - (p)->Base)) -#endif - -#define STATS_REF(ptr) ((CPpmd_State_Ref)REF(ptr)) - -#define CTX(ref) ((CPpmd7_Context *)Ppmd7_GetContext(p, ref)) -#define STATS(ctx) Ppmd7_GetStats(p, ctx) -#define ONE_STATE(ctx) Ppmd7Context_OneState(ctx) -#define SUFFIX(ctx) CTX((ctx)->Suffix) - -typedef CPpmd7_Context * CTX_PTR; - -struct CPpmd7_Node_; - -typedef - #ifdef PPMD_32BIT - struct CPpmd7_Node_ * - #else - UInt32 - #endif - CPpmd7_Node_Ref; - -typedef struct CPpmd7_Node_ -{ - UInt16 Stamp; /* must be at offset 0 as CPpmd7_Context::NumStats. Stamp=0 means free */ - UInt16 NU; - CPpmd7_Node_Ref Next; /* must be at offset >= 4 */ - CPpmd7_Node_Ref Prev; -} CPpmd7_Node; - -#ifdef PPMD_32BIT - #define NODE(ptr) (ptr) -#else - #define NODE(offs) ((CPpmd7_Node *)(p->Base + (offs))) -#endif - -void Ppmd7_Construct(CPpmd7 *p) -{ - unsigned i, k, m; - - p->Base = 0; - - for (i = 0, k = 0; i < PPMD_NUM_INDEXES; i++) - { - unsigned step = (i >= 12 ? 4 : (i >> 2) + 1); - do { p->Units2Indx[k++] = (Byte)i; } while (--step); - p->Indx2Units[i] = (Byte)k; - } - - p->NS2BSIndx[0] = (0 << 1); - p->NS2BSIndx[1] = (1 << 1); - memset(p->NS2BSIndx + 2, (2 << 1), 9); - memset(p->NS2BSIndx + 11, (3 << 1), 256 - 11); - - for (i = 0; i < 3; i++) - p->NS2Indx[i] = (Byte)i; - for (m = i, k = 1; i < 256; i++) - { - p->NS2Indx[i] = (Byte)m; - if (--k == 0) - k = (++m) - 2; - } - - memset(p->HB2Flag, 0, 0x40); - memset(p->HB2Flag + 0x40, 8, 0x100 - 0x40); -} - -void Ppmd7_Free(CPpmd7 *p, ISzAllocPtr alloc) -{ - ISzAlloc_Free(alloc, p->Base); - p->Size = 0; - p->Base = 0; -} - -BoolInt Ppmd7_Alloc(CPpmd7 *p, UInt32 size, ISzAllocPtr alloc) -{ - if (!p->Base || p->Size != size) - { - size_t size2; - Ppmd7_Free(p, alloc); - size2 = 0 - #ifndef PPMD_32BIT - + UNIT_SIZE - #endif - ; - p->AlignOffset = - #ifdef PPMD_32BIT - (4 - size) & 3; - #else - 4 - (size & 3); - #endif - if ((p->Base = (Byte *)ISzAlloc_Alloc(alloc, p->AlignOffset + size + size2)) == 0) - return False; - p->Size = size; - } - return True; -} - -static void InsertNode(CPpmd7 *p, void *node, unsigned indx) -{ - *((CPpmd_Void_Ref *)node) = p->FreeList[indx]; - p->FreeList[indx] = REF(node); -} - -static void *RemoveNode(CPpmd7 *p, unsigned indx) -{ - CPpmd_Void_Ref *node = (CPpmd_Void_Ref *)Ppmd7_GetPtr(p, p->FreeList[indx]); - p->FreeList[indx] = *node; - return node; -} - -static void SplitBlock(CPpmd7 *p, void *ptr, unsigned oldIndx, unsigned newIndx) -{ - unsigned i, nu = I2U(oldIndx) - I2U(newIndx); - ptr = (Byte *)ptr + U2B(I2U(newIndx)); - if (I2U(i = U2I(nu)) != nu) - { - unsigned k = I2U(--i); - InsertNode(p, ((Byte *)ptr) + U2B(k), nu - k - 1); - } - InsertNode(p, ptr, i); -} - -static void GlueFreeBlocks(CPpmd7 *p) -{ - #ifdef PPMD_32BIT - CPpmd7_Node headItem; - CPpmd7_Node_Ref head = &headItem; - #else - CPpmd7_Node_Ref head = p->AlignOffset + p->Size; - #endif - - CPpmd7_Node_Ref n = head; - unsigned i; - - p->GlueCount = 255; - - /* create doubly-linked list of free blocks */ - for (i = 0; i < PPMD_NUM_INDEXES; i++) - { - UInt16 nu = I2U(i); - CPpmd7_Node_Ref next = (CPpmd7_Node_Ref)p->FreeList[i]; - p->FreeList[i] = 0; - while (next != 0) - { - CPpmd7_Node *node = NODE(next); - node->Next = n; - n = NODE(n)->Prev = next; - next = *(const CPpmd7_Node_Ref *)node; - node->Stamp = 0; - node->NU = (UInt16)nu; - } - } - NODE(head)->Stamp = 1; - NODE(head)->Next = n; - NODE(n)->Prev = head; - if (p->LoUnit != p->HiUnit) - ((CPpmd7_Node *)p->LoUnit)->Stamp = 1; - - /* Glue free blocks */ - while (n != head) - { - CPpmd7_Node *node = NODE(n); - UInt32 nu = (UInt32)node->NU; - for (;;) - { - CPpmd7_Node *node2 = NODE(n) + nu; - nu += node2->NU; - if (node2->Stamp != 0 || nu >= 0x10000) - break; - NODE(node2->Prev)->Next = node2->Next; - NODE(node2->Next)->Prev = node2->Prev; - node->NU = (UInt16)nu; - } - n = node->Next; - } - - /* Fill lists of free blocks */ - for (n = NODE(head)->Next; n != head;) - { - CPpmd7_Node *node = NODE(n); - unsigned nu; - CPpmd7_Node_Ref next = node->Next; - for (nu = node->NU; nu > 128; nu -= 128, node += 128) - InsertNode(p, node, PPMD_NUM_INDEXES - 1); - if (I2U(i = U2I(nu)) != nu) - { - unsigned k = I2U(--i); - InsertNode(p, node + k, nu - k - 1); - } - InsertNode(p, node, i); - n = next; - } -} - -static void *AllocUnitsRare(CPpmd7 *p, unsigned indx) -{ - unsigned i; - void *retVal; - if (p->GlueCount == 0) - { - GlueFreeBlocks(p); - if (p->FreeList[indx] != 0) - return RemoveNode(p, indx); - } - i = indx; - do - { - if (++i == PPMD_NUM_INDEXES) - { - UInt32 numBytes = U2B(I2U(indx)); - p->GlueCount--; - return ((UInt32)(p->UnitsStart - p->Text) > numBytes) ? (p->UnitsStart -= numBytes) : (NULL); - } - } - while (p->FreeList[i] == 0); - retVal = RemoveNode(p, i); - SplitBlock(p, retVal, i, indx); - return retVal; -} - -static void *AllocUnits(CPpmd7 *p, unsigned indx) -{ - UInt32 numBytes; - if (p->FreeList[indx] != 0) - return RemoveNode(p, indx); - numBytes = U2B(I2U(indx)); - if (numBytes <= (UInt32)(p->HiUnit - p->LoUnit)) - { - void *retVal = p->LoUnit; - p->LoUnit += numBytes; - return retVal; - } - return AllocUnitsRare(p, indx); -} - -#define MyMem12Cpy(dest, src, num) \ - { UInt32 *d = (UInt32 *)dest; const UInt32 *s = (const UInt32 *)src; UInt32 n = num; \ - do { d[0] = s[0]; d[1] = s[1]; d[2] = s[2]; s += 3; d += 3; } while (--n); } - -static void *ShrinkUnits(CPpmd7 *p, void *oldPtr, unsigned oldNU, unsigned newNU) -{ - unsigned i0 = U2I(oldNU); - unsigned i1 = U2I(newNU); - if (i0 == i1) - return oldPtr; - if (p->FreeList[i1] != 0) - { - void *ptr = RemoveNode(p, i1); - MyMem12Cpy(ptr, oldPtr, newNU); - InsertNode(p, oldPtr, i0); - return ptr; - } - SplitBlock(p, oldPtr, i0, i1); - return oldPtr; -} - -#define SUCCESSOR(p) ((CPpmd_Void_Ref)((p)->SuccessorLow | ((UInt32)(p)->SuccessorHigh << 16))) - -static void SetSuccessor(CPpmd_State *p, CPpmd_Void_Ref v) -{ - (p)->SuccessorLow = (UInt16)((UInt32)(v) & 0xFFFF); - (p)->SuccessorHigh = (UInt16)(((UInt32)(v) >> 16) & 0xFFFF); -} - -static void RestartModel(CPpmd7 *p) -{ - unsigned i, k, m; - - memset(p->FreeList, 0, sizeof(p->FreeList)); - p->Text = p->Base + p->AlignOffset; - p->HiUnit = p->Text + p->Size; - p->LoUnit = p->UnitsStart = p->HiUnit - p->Size / 8 / UNIT_SIZE * 7 * UNIT_SIZE; - p->GlueCount = 0; - - p->OrderFall = p->MaxOrder; - p->RunLength = p->InitRL = -(Int32)((p->MaxOrder < 12) ? p->MaxOrder : 12) - 1; - p->PrevSuccess = 0; - - p->MinContext = p->MaxContext = (CTX_PTR)(p->HiUnit -= UNIT_SIZE); /* AllocContext(p); */ - p->MinContext->Suffix = 0; - p->MinContext->NumStats = 256; - p->MinContext->SummFreq = 256 + 1; - p->FoundState = (CPpmd_State *)p->LoUnit; /* AllocUnits(p, PPMD_NUM_INDEXES - 1); */ - p->LoUnit += U2B(256 / 2); - p->MinContext->Stats = REF(p->FoundState); - for (i = 0; i < 256; i++) - { - CPpmd_State *s = &p->FoundState[i]; - s->Symbol = (Byte)i; - s->Freq = 1; - SetSuccessor(s, 0); - } - - for (i = 0; i < 128; i++) - for (k = 0; k < 8; k++) - { - UInt16 *dest = p->BinSumm[i] + k; - UInt16 val = (UInt16)(PPMD_BIN_SCALE - kInitBinEsc[k] / (i + 2)); - for (m = 0; m < 64; m += 8) - dest[m] = val; - } - - for (i = 0; i < 25; i++) - for (k = 0; k < 16; k++) - { - CPpmd_See *s = &p->See[i][k]; - s->Summ = (UInt16)((5 * i + 10) << (s->Shift = PPMD_PERIOD_BITS - 4)); - s->Count = 4; - } -} - -void Ppmd7_Init(CPpmd7 *p, unsigned maxOrder) -{ - p->MaxOrder = maxOrder; - RestartModel(p); - p->DummySee.Shift = PPMD_PERIOD_BITS; - p->DummySee.Summ = 0; /* unused */ - p->DummySee.Count = 64; /* unused */ -} - -static CTX_PTR CreateSuccessors(CPpmd7 *p, BoolInt skip) -{ - CPpmd_State upState; - CTX_PTR c = p->MinContext; - CPpmd_Byte_Ref upBranch = (CPpmd_Byte_Ref)SUCCESSOR(p->FoundState); - CPpmd_State *ps[PPMD7_MAX_ORDER]; - unsigned numPs = 0; - - if (!skip) - ps[numPs++] = p->FoundState; - - while (c->Suffix) - { - CPpmd_Void_Ref successor; - CPpmd_State *s; - c = SUFFIX(c); - if (c->NumStats != 1) - { - for (s = STATS(c); s->Symbol != p->FoundState->Symbol; s++); - } - else - s = ONE_STATE(c); - successor = SUCCESSOR(s); - if (successor != upBranch) - { - c = CTX(successor); - if (numPs == 0) - return c; - break; - } - ps[numPs++] = s; - } - - upState.Symbol = *(const Byte *)Ppmd7_GetPtr(p, upBranch); - SetSuccessor(&upState, upBranch + 1); - - if (c->NumStats == 1) - upState.Freq = ONE_STATE(c)->Freq; - else - { - UInt32 cf, s0; - CPpmd_State *s; - for (s = STATS(c); s->Symbol != upState.Symbol; s++); - cf = s->Freq - 1; - s0 = c->SummFreq - c->NumStats - cf; - upState.Freq = (Byte)(1 + ((2 * cf <= s0) ? (5 * cf > s0) : ((2 * cf + 3 * s0 - 1) / (2 * s0)))); - } - - do - { - /* Create Child */ - CTX_PTR c1; /* = AllocContext(p); */ - if (p->HiUnit != p->LoUnit) - c1 = (CTX_PTR)(p->HiUnit -= UNIT_SIZE); - else if (p->FreeList[0] != 0) - c1 = (CTX_PTR)RemoveNode(p, 0); - else - { - c1 = (CTX_PTR)AllocUnitsRare(p, 0); - if (!c1) - return NULL; - } - c1->NumStats = 1; - *ONE_STATE(c1) = upState; - c1->Suffix = REF(c); - SetSuccessor(ps[--numPs], REF(c1)); - c = c1; - } - while (numPs != 0); - - return c; -} - -static void SwapStates(CPpmd_State *t1, CPpmd_State *t2) -{ - CPpmd_State tmp = *t1; - *t1 = *t2; - *t2 = tmp; -} - -static void UpdateModel(CPpmd7 *p) -{ - CPpmd_Void_Ref successor, fSuccessor = SUCCESSOR(p->FoundState); - CTX_PTR c; - unsigned s0, ns; - - if (p->FoundState->Freq < MAX_FREQ / 4 && p->MinContext->Suffix != 0) - { - c = SUFFIX(p->MinContext); - - if (c->NumStats == 1) - { - CPpmd_State *s = ONE_STATE(c); - if (s->Freq < 32) - s->Freq++; - } - else - { - CPpmd_State *s = STATS(c); - if (s->Symbol != p->FoundState->Symbol) - { - do { s++; } while (s->Symbol != p->FoundState->Symbol); - if (s[0].Freq >= s[-1].Freq) - { - SwapStates(&s[0], &s[-1]); - s--; - } - } - if (s->Freq < MAX_FREQ - 9) - { - s->Freq += 2; - c->SummFreq += 2; - } - } - } - - if (p->OrderFall == 0) - { - p->MinContext = p->MaxContext = CreateSuccessors(p, True); - if (p->MinContext == 0) - { - RestartModel(p); - return; - } - SetSuccessor(p->FoundState, REF(p->MinContext)); - return; - } - - *p->Text++ = p->FoundState->Symbol; - successor = REF(p->Text); - if (p->Text >= p->UnitsStart) - { - RestartModel(p); - return; - } - - if (fSuccessor) - { - if (fSuccessor <= successor) - { - CTX_PTR cs = CreateSuccessors(p, False); - if (cs == NULL) - { - RestartModel(p); - return; - } - fSuccessor = REF(cs); - } - if (--p->OrderFall == 0) - { - successor = fSuccessor; - p->Text -= (p->MaxContext != p->MinContext); - } - } - else - { - SetSuccessor(p->FoundState, successor); - fSuccessor = REF(p->MinContext); - } - - s0 = p->MinContext->SummFreq - (ns = p->MinContext->NumStats) - (p->FoundState->Freq - 1); - - for (c = p->MaxContext; c != p->MinContext; c = SUFFIX(c)) - { - unsigned ns1; - UInt32 cf, sf; - if ((ns1 = c->NumStats) != 1) - { - if ((ns1 & 1) == 0) - { - /* Expand for one UNIT */ - unsigned oldNU = ns1 >> 1; - unsigned i = U2I(oldNU); - if (i != U2I((size_t)oldNU + 1)) - { - void *ptr = AllocUnits(p, i + 1); - void *oldPtr; - if (!ptr) - { - RestartModel(p); - return; - } - oldPtr = STATS(c); - MyMem12Cpy(ptr, oldPtr, oldNU); - InsertNode(p, oldPtr, i); - c->Stats = STATS_REF(ptr); - } - } - c->SummFreq = (UInt16)(c->SummFreq + (2 * ns1 < ns) + 2 * ((4 * ns1 <= ns) & (c->SummFreq <= 8 * ns1))); - } - else - { - CPpmd_State *s = (CPpmd_State*)AllocUnits(p, 0); - if (!s) - { - RestartModel(p); - return; - } - *s = *ONE_STATE(c); - c->Stats = REF(s); - if (s->Freq < MAX_FREQ / 4 - 1) - s->Freq <<= 1; - else - s->Freq = MAX_FREQ - 4; - c->SummFreq = (UInt16)(s->Freq + p->InitEsc + (ns > 3)); - } - cf = 2 * (UInt32)p->FoundState->Freq * (c->SummFreq + 6); - sf = (UInt32)s0 + c->SummFreq; - if (cf < 6 * sf) - { - cf = 1 + (cf > sf) + (cf >= 4 * sf); - c->SummFreq += 3; - } - else - { - cf = 4 + (cf >= 9 * sf) + (cf >= 12 * sf) + (cf >= 15 * sf); - c->SummFreq = (UInt16)(c->SummFreq + cf); - } - { - CPpmd_State *s = STATS(c) + ns1; - SetSuccessor(s, successor); - s->Symbol = p->FoundState->Symbol; - s->Freq = (Byte)cf; - c->NumStats = (UInt16)(ns1 + 1); - } - } - p->MaxContext = p->MinContext = CTX(fSuccessor); -} - -static void Rescale(CPpmd7 *p) -{ - unsigned i, adder, sumFreq, escFreq; - CPpmd_State *stats = STATS(p->MinContext); - CPpmd_State *s = p->FoundState; - { - CPpmd_State tmp = *s; - for (; s != stats; s--) - s[0] = s[-1]; - *s = tmp; - } - escFreq = p->MinContext->SummFreq - s->Freq; - s->Freq += 4; - adder = (p->OrderFall != 0); - s->Freq = (Byte)((s->Freq + adder) >> 1); - sumFreq = s->Freq; - - i = p->MinContext->NumStats - 1; - do - { - escFreq -= (++s)->Freq; - s->Freq = (Byte)((s->Freq + adder) >> 1); - sumFreq += s->Freq; - if (s[0].Freq > s[-1].Freq) - { - CPpmd_State *s1 = s; - CPpmd_State tmp = *s1; - do - s1[0] = s1[-1]; - while (--s1 != stats && tmp.Freq > s1[-1].Freq); - *s1 = tmp; - } - } - while (--i); - - if (s->Freq == 0) - { - unsigned numStats = p->MinContext->NumStats; - unsigned n0, n1; - do { i++; } while ((--s)->Freq == 0); - escFreq += i; - p->MinContext->NumStats = (UInt16)(p->MinContext->NumStats - i); - if (p->MinContext->NumStats == 1) - { - CPpmd_State tmp = *stats; - do - { - tmp.Freq = (Byte)(tmp.Freq - (tmp.Freq >> 1)); - escFreq >>= 1; - } - while (escFreq > 1); - InsertNode(p, stats, U2I(((numStats + 1) >> 1))); - *(p->FoundState = ONE_STATE(p->MinContext)) = tmp; - return; - } - n0 = (numStats + 1) >> 1; - n1 = (p->MinContext->NumStats + 1) >> 1; - if (n0 != n1) - p->MinContext->Stats = STATS_REF(ShrinkUnits(p, stats, n0, n1)); - } - p->MinContext->SummFreq = (UInt16)(sumFreq + escFreq - (escFreq >> 1)); - p->FoundState = STATS(p->MinContext); -} - -CPpmd_See *Ppmd7_MakeEscFreq(CPpmd7 *p, unsigned numMasked, UInt32 *escFreq) -{ - CPpmd_See *see; - unsigned nonMasked = p->MinContext->NumStats - numMasked; - if (p->MinContext->NumStats != 256) - { - see = p->See[(unsigned)p->NS2Indx[(size_t)nonMasked - 1]] + - (nonMasked < (unsigned)SUFFIX(p->MinContext)->NumStats - p->MinContext->NumStats) + - 2 * (unsigned)(p->MinContext->SummFreq < 11 * p->MinContext->NumStats) + - 4 * (unsigned)(numMasked > nonMasked) + - p->HiBitsFlag; - { - unsigned r = (see->Summ >> see->Shift); - see->Summ = (UInt16)(see->Summ - r); - *escFreq = r + (r == 0); - } - } - else - { - see = &p->DummySee; - *escFreq = 1; - } - return see; -} - -static void NextContext(CPpmd7 *p) -{ - CTX_PTR c = CTX(SUCCESSOR(p->FoundState)); - if (p->OrderFall == 0 && (Byte *)c > p->Text) - p->MinContext = p->MaxContext = c; - else - UpdateModel(p); -} - -void Ppmd7_Update1(CPpmd7 *p) -{ - CPpmd_State *s = p->FoundState; - s->Freq += 4; - p->MinContext->SummFreq += 4; - if (s[0].Freq > s[-1].Freq) - { - SwapStates(&s[0], &s[-1]); - p->FoundState = --s; - if (s->Freq > MAX_FREQ) - Rescale(p); - } - NextContext(p); -} - -void Ppmd7_Update1_0(CPpmd7 *p) -{ - p->PrevSuccess = (2 * p->FoundState->Freq > p->MinContext->SummFreq); - p->RunLength += p->PrevSuccess; - p->MinContext->SummFreq += 4; - if ((p->FoundState->Freq += 4) > MAX_FREQ) - Rescale(p); - NextContext(p); -} - -void Ppmd7_UpdateBin(CPpmd7 *p) -{ - p->FoundState->Freq = (Byte)(p->FoundState->Freq + (p->FoundState->Freq < 128 ? 1: 0)); - p->PrevSuccess = 1; - p->RunLength++; - NextContext(p); -} - -void Ppmd7_Update2(CPpmd7 *p) -{ - p->MinContext->SummFreq += 4; - if ((p->FoundState->Freq += 4) > MAX_FREQ) - Rescale(p); - p->RunLength = p->InitRL; - UpdateModel(p); -} diff --git a/code/ryzom/client/src/seven_zip/Ppmd7.h b/code/ryzom/client/src/seven_zip/Ppmd7.h deleted file mode 100644 index 610539a04..000000000 --- a/code/ryzom/client/src/seven_zip/Ppmd7.h +++ /dev/null @@ -1,142 +0,0 @@ -/* Ppmd7.h -- PPMdH compression codec -2018-07-04 : Igor Pavlov : Public domain -This code is based on PPMd var.H (2001): Dmitry Shkarin : Public domain */ - -/* This code supports virtual RangeDecoder and includes the implementation -of RangeCoder from 7z, instead of RangeCoder from original PPMd var.H. -If you need the compatibility with original PPMd var.H, you can use external RangeDecoder */ - -#ifndef __PPMD7_H -#define __PPMD7_H - -#include "Ppmd.h" - -EXTERN_C_BEGIN - -#define PPMD7_MIN_ORDER 2 -#define PPMD7_MAX_ORDER 64 - -#define PPMD7_MIN_MEM_SIZE (1 << 11) -#define PPMD7_MAX_MEM_SIZE (0xFFFFFFFF - 12 * 3) - -struct CPpmd7_Context_; - -typedef - #ifdef PPMD_32BIT - struct CPpmd7_Context_ * - #else - UInt32 - #endif - CPpmd7_Context_Ref; - -typedef struct CPpmd7_Context_ -{ - UInt16 NumStats; - UInt16 SummFreq; - CPpmd_State_Ref Stats; - CPpmd7_Context_Ref Suffix; -} CPpmd7_Context; - -#define Ppmd7Context_OneState(p) ((CPpmd_State *)&(p)->SummFreq) - -typedef struct -{ - CPpmd7_Context *MinContext, *MaxContext; - CPpmd_State *FoundState; - unsigned OrderFall, InitEsc, PrevSuccess, MaxOrder, HiBitsFlag; - Int32 RunLength, InitRL; /* must be 32-bit at least */ - - UInt32 Size; - UInt32 GlueCount; - Byte *Base, *LoUnit, *HiUnit, *Text, *UnitsStart; - UInt32 AlignOffset; - - Byte Indx2Units[PPMD_NUM_INDEXES]; - Byte Units2Indx[128]; - CPpmd_Void_Ref FreeList[PPMD_NUM_INDEXES]; - Byte NS2Indx[256], NS2BSIndx[256], HB2Flag[256]; - CPpmd_See DummySee, See[25][16]; - UInt16 BinSumm[128][64]; -} CPpmd7; - -void Ppmd7_Construct(CPpmd7 *p); -BoolInt Ppmd7_Alloc(CPpmd7 *p, UInt32 size, ISzAllocPtr alloc); -void Ppmd7_Free(CPpmd7 *p, ISzAllocPtr alloc); -void Ppmd7_Init(CPpmd7 *p, unsigned maxOrder); -#define Ppmd7_WasAllocated(p) ((p)->Base != NULL) - - -/* ---------- Internal Functions ---------- */ - -extern const Byte PPMD7_kExpEscape[16]; - -#ifdef PPMD_32BIT - #define Ppmd7_GetPtr(p, ptr) (ptr) - #define Ppmd7_GetContext(p, ptr) (ptr) - #define Ppmd7_GetStats(p, ctx) ((ctx)->Stats) -#else - #define Ppmd7_GetPtr(p, offs) ((void *)((p)->Base + (offs))) - #define Ppmd7_GetContext(p, offs) ((CPpmd7_Context *)Ppmd7_GetPtr((p), (offs))) - #define Ppmd7_GetStats(p, ctx) ((CPpmd_State *)Ppmd7_GetPtr((p), ((ctx)->Stats))) -#endif - -void Ppmd7_Update1(CPpmd7 *p); -void Ppmd7_Update1_0(CPpmd7 *p); -void Ppmd7_Update2(CPpmd7 *p); -void Ppmd7_UpdateBin(CPpmd7 *p); - -#define Ppmd7_GetBinSumm(p) \ - &p->BinSumm[(size_t)(unsigned)Ppmd7Context_OneState(p->MinContext)->Freq - 1][p->PrevSuccess + \ - p->NS2BSIndx[(size_t)Ppmd7_GetContext(p, p->MinContext->Suffix)->NumStats - 1] + \ - (p->HiBitsFlag = p->HB2Flag[p->FoundState->Symbol]) + \ - 2 * p->HB2Flag[(unsigned)Ppmd7Context_OneState(p->MinContext)->Symbol] + \ - ((p->RunLength >> 26) & 0x20)] - -CPpmd_See *Ppmd7_MakeEscFreq(CPpmd7 *p, unsigned numMasked, UInt32 *scale); - - -/* ---------- Decode ---------- */ - -typedef struct IPpmd7_RangeDec IPpmd7_RangeDec; - -struct IPpmd7_RangeDec -{ - UInt32 (*GetThreshold)(const IPpmd7_RangeDec *p, UInt32 total); - void (*Decode)(const IPpmd7_RangeDec *p, UInt32 start, UInt32 size); - UInt32 (*DecodeBit)(const IPpmd7_RangeDec *p, UInt32 size0); -}; - -typedef struct -{ - IPpmd7_RangeDec vt; - UInt32 Range; - UInt32 Code; - IByteIn *Stream; -} CPpmd7z_RangeDec; - -void Ppmd7z_RangeDec_CreateVTable(CPpmd7z_RangeDec *p); -BoolInt Ppmd7z_RangeDec_Init(CPpmd7z_RangeDec *p); -#define Ppmd7z_RangeDec_IsFinishedOK(p) ((p)->Code == 0) - -int Ppmd7_DecodeSymbol(CPpmd7 *p, const IPpmd7_RangeDec *rc); - - -/* ---------- Encode ---------- */ - -typedef struct -{ - UInt64 Low; - UInt32 Range; - Byte Cache; - UInt64 CacheSize; - IByteOut *Stream; -} CPpmd7z_RangeEnc; - -void Ppmd7z_RangeEnc_Init(CPpmd7z_RangeEnc *p); -void Ppmd7z_RangeEnc_FlushData(CPpmd7z_RangeEnc *p); - -void Ppmd7_EncodeSymbol(CPpmd7 *p, CPpmd7z_RangeEnc *rc, int symbol); - -EXTERN_C_END - -#endif diff --git a/code/ryzom/client/src/seven_zip/Ppmd7Dec.cpp b/code/ryzom/client/src/seven_zip/Ppmd7Dec.cpp deleted file mode 100644 index 311e9f9dd..000000000 --- a/code/ryzom/client/src/seven_zip/Ppmd7Dec.cpp +++ /dev/null @@ -1,191 +0,0 @@ -/* Ppmd7Dec.c -- PPMdH Decoder -2018-07-04 : Igor Pavlov : Public domain -This code is based on PPMd var.H (2001): Dmitry Shkarin : Public domain */ - -#include "Precomp.h" - -#include "Ppmd7.h" - -#define kTopValue (1 << 24) - -BoolInt Ppmd7z_RangeDec_Init(CPpmd7z_RangeDec *p) -{ - unsigned i; - p->Code = 0; - p->Range = 0xFFFFFFFF; - if (IByteIn_Read(p->Stream) != 0) - return False; - for (i = 0; i < 4; i++) - p->Code = (p->Code << 8) | IByteIn_Read(p->Stream); - return (p->Code < 0xFFFFFFFF); -} - -#define GET_Ppmd7z_RangeDec CPpmd7z_RangeDec *p = CONTAINER_FROM_VTBL(pp, CPpmd7z_RangeDec, vt); - -static UInt32 Range_GetThreshold(const IPpmd7_RangeDec *pp, UInt32 total) -{ - GET_Ppmd7z_RangeDec - return p->Code / (p->Range /= total); -} - -static void Range_Normalize(CPpmd7z_RangeDec *p) -{ - if (p->Range < kTopValue) - { - p->Code = (p->Code << 8) | IByteIn_Read(p->Stream); - p->Range <<= 8; - if (p->Range < kTopValue) - { - p->Code = (p->Code << 8) | IByteIn_Read(p->Stream); - p->Range <<= 8; - } - } -} - -static void Range_Decode(const IPpmd7_RangeDec *pp, UInt32 start, UInt32 size) -{ - GET_Ppmd7z_RangeDec - p->Code -= start * p->Range; - p->Range *= size; - Range_Normalize(p); -} - -static UInt32 Range_DecodeBit(const IPpmd7_RangeDec *pp, UInt32 size0) -{ - GET_Ppmd7z_RangeDec - UInt32 newBound = (p->Range >> 14) * size0; - UInt32 symbol; - if (p->Code < newBound) - { - symbol = 0; - p->Range = newBound; - } - else - { - symbol = 1; - p->Code -= newBound; - p->Range -= newBound; - } - Range_Normalize(p); - return symbol; -} - -void Ppmd7z_RangeDec_CreateVTable(CPpmd7z_RangeDec *p) -{ - p->vt.GetThreshold = Range_GetThreshold; - p->vt.Decode = Range_Decode; - p->vt.DecodeBit = Range_DecodeBit; -} - - -#define MASK(sym) ((signed char *)charMask)[sym] - -int Ppmd7_DecodeSymbol(CPpmd7 *p, const IPpmd7_RangeDec *rc) -{ - size_t charMask[256 / sizeof(size_t)]; - if (p->MinContext->NumStats != 1) - { - CPpmd_State *s = Ppmd7_GetStats(p, p->MinContext); - unsigned i; - UInt32 count, hiCnt; - if ((count = rc->GetThreshold(rc, p->MinContext->SummFreq)) < (hiCnt = s->Freq)) - { - Byte symbol; - rc->Decode(rc, 0, s->Freq); - p->FoundState = s; - symbol = s->Symbol; - Ppmd7_Update1_0(p); - return symbol; - } - p->PrevSuccess = 0; - i = p->MinContext->NumStats - 1; - do - { - if ((hiCnt += (++s)->Freq) > count) - { - Byte symbol; - rc->Decode(rc, hiCnt - s->Freq, s->Freq); - p->FoundState = s; - symbol = s->Symbol; - Ppmd7_Update1(p); - return symbol; - } - } - while (--i); - if (count >= p->MinContext->SummFreq) - return -2; - p->HiBitsFlag = p->HB2Flag[p->FoundState->Symbol]; - rc->Decode(rc, hiCnt, p->MinContext->SummFreq - hiCnt); - PPMD_SetAllBitsIn256Bytes(charMask); - MASK(s->Symbol) = 0; - i = p->MinContext->NumStats - 1; - do { MASK((--s)->Symbol) = 0; } while (--i); - } - else - { - UInt16 *prob = Ppmd7_GetBinSumm(p); - if (rc->DecodeBit(rc, *prob) == 0) - { - Byte symbol; - *prob = (UInt16)PPMD_UPDATE_PROB_0(*prob); - symbol = (p->FoundState = Ppmd7Context_OneState(p->MinContext))->Symbol; - Ppmd7_UpdateBin(p); - return symbol; - } - *prob = (UInt16)PPMD_UPDATE_PROB_1(*prob); - p->InitEsc = PPMD7_kExpEscape[*prob >> 10]; - PPMD_SetAllBitsIn256Bytes(charMask); - MASK(Ppmd7Context_OneState(p->MinContext)->Symbol) = 0; - p->PrevSuccess = 0; - } - for (;;) - { - CPpmd_State *ps[256], *s; - UInt32 freqSum, count, hiCnt; - CPpmd_See *see; - unsigned i, num, numMasked = p->MinContext->NumStats; - do - { - p->OrderFall++; - if (!p->MinContext->Suffix) - return -1; - p->MinContext = Ppmd7_GetContext(p, p->MinContext->Suffix); - } - while (p->MinContext->NumStats == numMasked); - hiCnt = 0; - s = Ppmd7_GetStats(p, p->MinContext); - i = 0; - num = p->MinContext->NumStats - numMasked; - do - { - int k = (int)(MASK(s->Symbol)); - hiCnt += (s->Freq & k); - ps[i] = s++; - i -= k; - } - while (i != num); - - see = Ppmd7_MakeEscFreq(p, numMasked, &freqSum); - freqSum += hiCnt; - count = rc->GetThreshold(rc, freqSum); - - if (count < hiCnt) - { - Byte symbol; - CPpmd_State **pps = ps; - for (hiCnt = 0; (hiCnt += (*pps)->Freq) <= count; pps++); - s = *pps; - rc->Decode(rc, hiCnt - s->Freq, s->Freq); - Ppmd_See_Update(see); - p->FoundState = s; - symbol = s->Symbol; - Ppmd7_Update2(p); - return symbol; - } - if (count >= freqSum) - return -2; - rc->Decode(rc, hiCnt, freqSum - hiCnt); - see->Summ = (UInt16)(see->Summ + freqSum); - do { MASK(ps[--i]->Symbol) = 0; } while (i != 0); - } -} diff --git a/code/ryzom/client/src/seven_zip/Ppmd7Enc.cpp b/code/ryzom/client/src/seven_zip/Ppmd7Enc.cpp deleted file mode 100644 index 286b8712c..000000000 --- a/code/ryzom/client/src/seven_zip/Ppmd7Enc.cpp +++ /dev/null @@ -1,187 +0,0 @@ -/* Ppmd7Enc.c -- PPMdH Encoder -2017-04-03 : Igor Pavlov : Public domain -This code is based on PPMd var.H (2001): Dmitry Shkarin : Public domain */ - -#include "Precomp.h" - -#include "Ppmd7.h" - -#define kTopValue (1 << 24) - -void Ppmd7z_RangeEnc_Init(CPpmd7z_RangeEnc *p) -{ - p->Low = 0; - p->Range = 0xFFFFFFFF; - p->Cache = 0; - p->CacheSize = 1; -} - -static void RangeEnc_ShiftLow(CPpmd7z_RangeEnc *p) -{ - if ((UInt32)p->Low < (UInt32)0xFF000000 || (unsigned)(p->Low >> 32) != 0) - { - Byte temp = p->Cache; - do - { - IByteOut_Write(p->Stream, (Byte)(temp + (Byte)(p->Low >> 32))); - temp = 0xFF; - } - while (--p->CacheSize != 0); - p->Cache = (Byte)((UInt32)p->Low >> 24); - } - p->CacheSize++; - p->Low = (UInt32)p->Low << 8; -} - -static void RangeEnc_Encode(CPpmd7z_RangeEnc *p, UInt32 start, UInt32 size, UInt32 total) -{ - p->Low += start * (p->Range /= total); - p->Range *= size; - while (p->Range < kTopValue) - { - p->Range <<= 8; - RangeEnc_ShiftLow(p); - } -} - -static void RangeEnc_EncodeBit_0(CPpmd7z_RangeEnc *p, UInt32 size0) -{ - p->Range = (p->Range >> 14) * size0; - while (p->Range < kTopValue) - { - p->Range <<= 8; - RangeEnc_ShiftLow(p); - } -} - -static void RangeEnc_EncodeBit_1(CPpmd7z_RangeEnc *p, UInt32 size0) -{ - UInt32 newBound = (p->Range >> 14) * size0; - p->Low += newBound; - p->Range -= newBound; - while (p->Range < kTopValue) - { - p->Range <<= 8; - RangeEnc_ShiftLow(p); - } -} - -void Ppmd7z_RangeEnc_FlushData(CPpmd7z_RangeEnc *p) -{ - unsigned i; - for (i = 0; i < 5; i++) - RangeEnc_ShiftLow(p); -} - - -#define MASK(sym) ((signed char *)charMask)[sym] - -void Ppmd7_EncodeSymbol(CPpmd7 *p, CPpmd7z_RangeEnc *rc, int symbol) -{ - size_t charMask[256 / sizeof(size_t)]; - if (p->MinContext->NumStats != 1) - { - CPpmd_State *s = Ppmd7_GetStats(p, p->MinContext); - UInt32 sum; - unsigned i; - if (s->Symbol == symbol) - { - RangeEnc_Encode(rc, 0, s->Freq, p->MinContext->SummFreq); - p->FoundState = s; - Ppmd7_Update1_0(p); - return; - } - p->PrevSuccess = 0; - sum = s->Freq; - i = p->MinContext->NumStats - 1; - do - { - if ((++s)->Symbol == symbol) - { - RangeEnc_Encode(rc, sum, s->Freq, p->MinContext->SummFreq); - p->FoundState = s; - Ppmd7_Update1(p); - return; - } - sum += s->Freq; - } - while (--i); - - p->HiBitsFlag = p->HB2Flag[p->FoundState->Symbol]; - PPMD_SetAllBitsIn256Bytes(charMask); - MASK(s->Symbol) = 0; - i = p->MinContext->NumStats - 1; - do { MASK((--s)->Symbol) = 0; } while (--i); - RangeEnc_Encode(rc, sum, p->MinContext->SummFreq - sum, p->MinContext->SummFreq); - } - else - { - UInt16 *prob = Ppmd7_GetBinSumm(p); - CPpmd_State *s = Ppmd7Context_OneState(p->MinContext); - if (s->Symbol == symbol) - { - RangeEnc_EncodeBit_0(rc, *prob); - *prob = (UInt16)PPMD_UPDATE_PROB_0(*prob); - p->FoundState = s; - Ppmd7_UpdateBin(p); - return; - } - else - { - RangeEnc_EncodeBit_1(rc, *prob); - *prob = (UInt16)PPMD_UPDATE_PROB_1(*prob); - p->InitEsc = PPMD7_kExpEscape[*prob >> 10]; - PPMD_SetAllBitsIn256Bytes(charMask); - MASK(s->Symbol) = 0; - p->PrevSuccess = 0; - } - } - for (;;) - { - UInt32 escFreq; - CPpmd_See *see; - CPpmd_State *s; - UInt32 sum; - unsigned i, numMasked = p->MinContext->NumStats; - do - { - p->OrderFall++; - if (!p->MinContext->Suffix) - return; /* EndMarker (symbol = -1) */ - p->MinContext = Ppmd7_GetContext(p, p->MinContext->Suffix); - } - while (p->MinContext->NumStats == numMasked); - - see = Ppmd7_MakeEscFreq(p, numMasked, &escFreq); - s = Ppmd7_GetStats(p, p->MinContext); - sum = 0; - i = p->MinContext->NumStats; - do - { - int cur = s->Symbol; - if (cur == symbol) - { - UInt32 low = sum; - CPpmd_State *s1 = s; - do - { - sum += (s->Freq & (int)(MASK(s->Symbol))); - s++; - } - while (--i); - RangeEnc_Encode(rc, low, s1->Freq, sum + escFreq); - Ppmd_See_Update(see); - p->FoundState = s1; - Ppmd7_Update2(p); - return; - } - sum += (s->Freq & (int)(MASK(cur))); - MASK(cur) = 0; - s++; - } - while (--i); - - RangeEnc_Encode(rc, sum, escFreq, sum + escFreq); - see->Summ = (UInt16)(see->Summ + sum + escFreq); - } -} diff --git a/code/ryzom/client/src/seven_zip/Precomp.cpp b/code/ryzom/client/src/seven_zip/Precomp.cpp deleted file mode 100644 index 01605e3c2..000000000 --- a/code/ryzom/client/src/seven_zip/Precomp.cpp +++ /dev/null @@ -1,4 +0,0 @@ -/* Precomp.c -- StdAfx -2013-01-21 : Igor Pavlov : Public domain */ - -#include "Precomp.h" diff --git a/code/ryzom/client/src/seven_zip/Precomp.h b/code/ryzom/client/src/seven_zip/Precomp.h deleted file mode 100644 index dcaf49475..000000000 --- a/code/ryzom/client/src/seven_zip/Precomp.h +++ /dev/null @@ -1,19 +0,0 @@ -/* Precomp.h -- StdAfx -2013-11-12 : Igor Pavlov : Public domain */ - -#ifndef __7Z_PRECOMP_H -#define __7Z_PRECOMP_H - -#if defined(_MSC_VER) && defined(_DEBUG) - #define _CRTDBG_MAP_ALLOC - #include - #include - #define DEBUG_NEW new(_NORMAL_BLOCK, __FILE__, __LINE__) -#endif - -#define _7ZIP_ST - -#include "Compiler.h" -/* #include "7zTypes.h" */ - -#endif diff --git a/code/ryzom/client/src/seven_zip/RotateDefs.h b/code/ryzom/client/src/seven_zip/RotateDefs.h deleted file mode 100644 index 8f01d1a6c..000000000 --- a/code/ryzom/client/src/seven_zip/RotateDefs.h +++ /dev/null @@ -1,30 +0,0 @@ -/* RotateDefs.h -- Rotate functions -2015-03-25 : Igor Pavlov : Public domain */ - -#ifndef __ROTATE_DEFS_H -#define __ROTATE_DEFS_H - -#ifdef _MSC_VER - -#include - -/* don't use _rotl with MINGW. It can insert slow call to function. */ - -/* #if (_MSC_VER >= 1200) */ -#pragma intrinsic(_rotl) -#pragma intrinsic(_rotr) -/* #endif */ - -#define rotlFixed(x, n) _rotl((x), (n)) -#define rotrFixed(x, n) _rotr((x), (n)) - -#else - -/* new compilers can translate these macros to fast commands. */ - -#define rotlFixed(x, n) (((x) << (n)) | ((x) >> (32 - (n)))) -#define rotrFixed(x, n) (((x) >> (n)) | ((x) << (32 - (n)))) - -#endif - -#endif diff --git a/code/ryzom/client/src/seven_zip/Sha256.cpp b/code/ryzom/client/src/seven_zip/Sha256.cpp deleted file mode 100644 index 04b688c6b..000000000 --- a/code/ryzom/client/src/seven_zip/Sha256.cpp +++ /dev/null @@ -1,248 +0,0 @@ -/* Crypto/Sha256.c -- SHA-256 Hash -2017-04-03 : Igor Pavlov : Public domain -This code is based on public domain code from Wei Dai's Crypto++ library. */ - -#include "Precomp.h" - -#include - -#include "CpuArch.h" -#include "RotateDefs.h" -#include "Sha256.h" - -/* define it for speed optimization */ -#ifndef _SFX -#define _SHA256_UNROLL -#define _SHA256_UNROLL2 -#endif - -/* #define _SHA256_UNROLL2 */ - -void Sha256_Init(CSha256 *p) -{ - p->state[0] = 0x6a09e667; - p->state[1] = 0xbb67ae85; - p->state[2] = 0x3c6ef372; - p->state[3] = 0xa54ff53a; - p->state[4] = 0x510e527f; - p->state[5] = 0x9b05688c; - p->state[6] = 0x1f83d9ab; - p->state[7] = 0x5be0cd19; - p->count = 0; -} - -#define S0(x) (rotrFixed(x, 2) ^ rotrFixed(x,13) ^ rotrFixed(x, 22)) -#define S1(x) (rotrFixed(x, 6) ^ rotrFixed(x,11) ^ rotrFixed(x, 25)) -#define s0(x) (rotrFixed(x, 7) ^ rotrFixed(x,18) ^ (x >> 3)) -#define s1(x) (rotrFixed(x,17) ^ rotrFixed(x,19) ^ (x >> 10)) - -#define blk0(i) (W[i]) -#define blk2(i) (W[i] += s1(W[((i)-2)&15]) + W[((i)-7)&15] + s0(W[((i)-15)&15])) - -#define Ch(x,y,z) (z^(x&(y^z))) -#define Maj(x,y,z) ((x&y)|(z&(x|y))) - -#ifdef _SHA256_UNROLL2 - -#define R(a,b,c,d,e,f,g,h, i) \ - h += S1(e) + Ch(e,f,g) + K[(i)+(size_t)(j)] + (j ? blk2(i) : blk0(i)); \ - d += h; \ - h += S0(a) + Maj(a, b, c) - -#define RX_8(i) \ - R(a,b,c,d,e,f,g,h, i); \ - R(h,a,b,c,d,e,f,g, i+1); \ - R(g,h,a,b,c,d,e,f, i+2); \ - R(f,g,h,a,b,c,d,e, i+3); \ - R(e,f,g,h,a,b,c,d, i+4); \ - R(d,e,f,g,h,a,b,c, i+5); \ - R(c,d,e,f,g,h,a,b, i+6); \ - R(b,c,d,e,f,g,h,a, i+7) - -#define RX_16 RX_8(0); RX_8(8); - -#else - -#define a(i) T[(0-(i))&7] -#define b(i) T[(1-(i))&7] -#define c(i) T[(2-(i))&7] -#define d(i) T[(3-(i))&7] -#define e(i) T[(4-(i))&7] -#define f(i) T[(5-(i))&7] -#define g(i) T[(6-(i))&7] -#define h(i) T[(7-(i))&7] - -#define R(i) \ - h(i) += S1(e(i)) + Ch(e(i),f(i),g(i)) + K[(i)+(size_t)(j)] + (j ? blk2(i) : blk0(i)); \ - d(i) += h(i); \ - h(i) += S0(a(i)) + Maj(a(i), b(i), c(i)) \ - -#ifdef _SHA256_UNROLL - -#define RX_8(i) R(i+0); R(i+1); R(i+2); R(i+3); R(i+4); R(i+5); R(i+6); R(i+7); -#define RX_16 RX_8(0); RX_8(8); - -#else - -#define RX_16 unsigned i; for (i = 0; i < 16; i++) { R(i); } - -#endif - -#endif - -static const UInt32 K[64] = { - 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, - 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5, - 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3, - 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174, - 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc, - 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da, - 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7, - 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967, - 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13, - 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85, - 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3, - 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070, - 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5, - 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3, - 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208, - 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2 -}; - -static void Sha256_WriteByteBlock(CSha256 *p) -{ - UInt32 W[16]; - unsigned j; - UInt32 *state; - - #ifdef _SHA256_UNROLL2 - UInt32 a,b,c,d,e,f,g,h; - #else - UInt32 T[8]; - #endif - - for (j = 0; j < 16; j += 4) - { - const Byte *ccc = p->buffer + j * 4; - W[j ] = GetBe32(ccc); - W[j + 1] = GetBe32(ccc + 4); - W[j + 2] = GetBe32(ccc + 8); - W[j + 3] = GetBe32(ccc + 12); - } - - state = p->state; - - #ifdef _SHA256_UNROLL2 - a = state[0]; - b = state[1]; - c = state[2]; - d = state[3]; - e = state[4]; - f = state[5]; - g = state[6]; - h = state[7]; - #else - for (j = 0; j < 8; j++) - T[j] = state[j]; - #endif - - for (j = 0; j < 64; j += 16) - { - RX_16 - } - - #ifdef _SHA256_UNROLL2 - state[0] += a; - state[1] += b; - state[2] += c; - state[3] += d; - state[4] += e; - state[5] += f; - state[6] += g; - state[7] += h; - #else - for (j = 0; j < 8; j++) - state[j] += T[j]; - #endif - - /* Wipe variables */ - /* memset(W, 0, sizeof(W)); */ - /* memset(T, 0, sizeof(T)); */ -} - -#undef S0 -#undef S1 -#undef s0 -#undef s1 - -void Sha256_Update(CSha256 *p, const Byte *data, size_t size) -{ - if (size == 0) - return; - - { - unsigned pos = (unsigned)p->count & 0x3F; - unsigned num; - - p->count += size; - - num = 64 - pos; - if (num > size) - { - memcpy(p->buffer + pos, data, size); - return; - } - - size -= num; - memcpy(p->buffer + pos, data, num); - data += num; - } - - for (;;) - { - Sha256_WriteByteBlock(p); - if (size < 64) - break; - size -= 64; - memcpy(p->buffer, data, 64); - data += 64; - } - - if (size != 0) - memcpy(p->buffer, data, size); -} - -void Sha256_Final(CSha256 *p, Byte *digest) -{ - unsigned pos = (unsigned)p->count & 0x3F; - unsigned i; - - p->buffer[pos++] = 0x80; - - while (pos != (64 - 8)) - { - pos &= 0x3F; - if (pos == 0) - Sha256_WriteByteBlock(p); - p->buffer[pos++] = 0; - } - - { - UInt64 numBits = (p->count << 3); - SetBe32(p->buffer + 64 - 8, (UInt32)(numBits >> 32)); - SetBe32(p->buffer + 64 - 4, (UInt32)(numBits)); - } - - Sha256_WriteByteBlock(p); - - for (i = 0; i < 8; i += 2) - { - UInt32 v0 = p->state[i]; - UInt32 v1 = p->state[i + 1]; - SetBe32(digest , v0); - SetBe32(digest + 4, v1); - digest += 8; - } - - Sha256_Init(p); -} diff --git a/code/ryzom/client/src/seven_zip/Sha256.h b/code/ryzom/client/src/seven_zip/Sha256.h deleted file mode 100644 index 3f455dbc0..000000000 --- a/code/ryzom/client/src/seven_zip/Sha256.h +++ /dev/null @@ -1,26 +0,0 @@ -/* Sha256.h -- SHA-256 Hash -2013-01-18 : Igor Pavlov : Public domain */ - -#ifndef __CRYPTO_SHA256_H -#define __CRYPTO_SHA256_H - -#include "7zTypes.h" - -EXTERN_C_BEGIN - -#define SHA256_DIGEST_SIZE 32 - -typedef struct -{ - UInt32 state[8]; - UInt64 count; - Byte buffer[64]; -} CSha256; - -void Sha256_Init(CSha256 *p); -void Sha256_Update(CSha256 *p, const Byte *data, size_t size); -void Sha256_Final(CSha256 *p, Byte *digest); - -EXTERN_C_END - -#endif diff --git a/code/ryzom/client/src/seven_zip/Sort.cpp b/code/ryzom/client/src/seven_zip/Sort.cpp deleted file mode 100644 index e1097e380..000000000 --- a/code/ryzom/client/src/seven_zip/Sort.cpp +++ /dev/null @@ -1,141 +0,0 @@ -/* Sort.c -- Sort functions -2014-04-05 : Igor Pavlov : Public domain */ - -#include "Precomp.h" - -#include "Sort.h" - -#define HeapSortDown(p, k, size, temp) \ - { for (;;) { \ - size_t s = (k << 1); \ - if (s > size) break; \ - if (s < size && p[s + 1] > p[s]) s++; \ - if (temp >= p[s]) break; \ - p[k] = p[s]; k = s; \ - } p[k] = temp; } - -void HeapSort(UInt32 *p, size_t size) -{ - if (size <= 1) - return; - p--; - { - size_t i = size / 2; - do - { - UInt32 temp = p[i]; - size_t k = i; - HeapSortDown(p, k, size, temp) - } - while (--i != 0); - } - /* - do - { - size_t k = 1; - UInt32 temp = p[size]; - p[size--] = p[1]; - HeapSortDown(p, k, size, temp) - } - while (size > 1); - */ - while (size > 3) - { - UInt32 temp = p[size]; - size_t k = (p[3] > p[2]) ? 3 : 2; - p[size--] = p[1]; - p[1] = p[k]; - HeapSortDown(p, k, size, temp) - } - { - UInt32 temp = p[size]; - p[size] = p[1]; - if (size > 2 && p[2] < temp) - { - p[1] = p[2]; - p[2] = temp; - } - else - p[1] = temp; - } -} - -void HeapSort64(UInt64 *p, size_t size) -{ - if (size <= 1) - return; - p--; - { - size_t i = size / 2; - do - { - UInt64 temp = p[i]; - size_t k = i; - HeapSortDown(p, k, size, temp) - } - while (--i != 0); - } - /* - do - { - size_t k = 1; - UInt64 temp = p[size]; - p[size--] = p[1]; - HeapSortDown(p, k, size, temp) - } - while (size > 1); - */ - while (size > 3) - { - UInt64 temp = p[size]; - size_t k = (p[3] > p[2]) ? 3 : 2; - p[size--] = p[1]; - p[1] = p[k]; - HeapSortDown(p, k, size, temp) - } - { - UInt64 temp = p[size]; - p[size] = p[1]; - if (size > 2 && p[2] < temp) - { - p[1] = p[2]; - p[2] = temp; - } - else - p[1] = temp; - } -} - -/* -#define HeapSortRefDown(p, vals, n, size, temp) \ - { size_t k = n; UInt32 val = vals[temp]; for (;;) { \ - size_t s = (k << 1); \ - if (s > size) break; \ - if (s < size && vals[p[s + 1]] > vals[p[s]]) s++; \ - if (val >= vals[p[s]]) break; \ - p[k] = p[s]; k = s; \ - } p[k] = temp; } - -void HeapSortRef(UInt32 *p, UInt32 *vals, size_t size) -{ - if (size <= 1) - return; - p--; - { - size_t i = size / 2; - do - { - UInt32 temp = p[i]; - HeapSortRefDown(p, vals, i, size, temp); - } - while (--i != 0); - } - do - { - UInt32 temp = p[size]; - p[size--] = p[1]; - HeapSortRefDown(p, vals, 1, size, temp); - } - while (size > 1); -} -*/ diff --git a/code/ryzom/client/src/seven_zip/Sort.h b/code/ryzom/client/src/seven_zip/Sort.h deleted file mode 100644 index 2e2963a23..000000000 --- a/code/ryzom/client/src/seven_zip/Sort.h +++ /dev/null @@ -1,18 +0,0 @@ -/* Sort.h -- Sort functions -2014-04-05 : Igor Pavlov : Public domain */ - -#ifndef __7Z_SORT_H -#define __7Z_SORT_H - -#include "7zTypes.h" - -EXTERN_C_BEGIN - -void HeapSort(UInt32 *p, size_t size); -void HeapSort64(UInt64 *p, size_t size); - -/* void HeapSortRef(UInt32 *p, UInt32 *vals, size_t size); */ - -EXTERN_C_END - -#endif diff --git a/code/ryzom/client/src/seven_zip/Xz.cpp b/code/ryzom/client/src/seven_zip/Xz.cpp deleted file mode 100644 index d9f83df16..000000000 --- a/code/ryzom/client/src/seven_zip/Xz.cpp +++ /dev/null @@ -1,90 +0,0 @@ -/* Xz.c - Xz -2017-05-12 : Igor Pavlov : Public domain */ - -#include "Precomp.h" - -#include "7zCrc.h" -#include "CpuArch.h" -#include "Xz.h" -#include "XzCrc64.h" - -const Byte XZ_SIG[XZ_SIG_SIZE] = { 0xFD, '7', 'z', 'X', 'Z', 0 }; -/* const Byte XZ_FOOTER_SIG[XZ_FOOTER_SIG_SIZE] = { 'Y', 'Z' }; */ - -unsigned Xz_WriteVarInt(Byte *buf, UInt64 v) -{ - unsigned i = 0; - do - { - buf[i++] = (Byte)((v & 0x7F) | 0x80); - v >>= 7; - } - while (v != 0); - buf[(size_t)i - 1] &= 0x7F; - return i; -} - -void Xz_Construct(CXzStream *p) -{ - p->numBlocks = 0; - p->blocks = NULL; - p->flags = 0; -} - -void Xz_Free(CXzStream *p, ISzAllocPtr alloc) -{ - ISzAlloc_Free(alloc, p->blocks); - p->numBlocks = 0; - p->blocks = NULL; -} - -unsigned XzFlags_GetCheckSize(CXzStreamFlags f) -{ - unsigned t = XzFlags_GetCheckType(f); - return (t == 0) ? 0 : (4 << ((t - 1) / 3)); -} - -void XzCheck_Init(CXzCheck *p, unsigned mode) -{ - p->mode = mode; - switch (mode) - { - case XZ_CHECK_CRC32: p->crc = CRC_INIT_VAL; break; - case XZ_CHECK_CRC64: p->crc64 = CRC64_INIT_VAL; break; - case XZ_CHECK_SHA256: Sha256_Init(&p->sha); break; - } -} - -void XzCheck_Update(CXzCheck *p, const void *data, size_t size) -{ - switch (p->mode) - { - case XZ_CHECK_CRC32: p->crc = CrcUpdate(p->crc, data, size); break; - case XZ_CHECK_CRC64: p->crc64 = Crc64Update(p->crc64, data, size); break; - case XZ_CHECK_SHA256: Sha256_Update(&p->sha, (const Byte *)data, size); break; - } -} - -int XzCheck_Final(CXzCheck *p, Byte *digest) -{ - switch (p->mode) - { - case XZ_CHECK_CRC32: - SetUi32(digest, CRC_GET_DIGEST(p->crc)); - break; - case XZ_CHECK_CRC64: - { - int i; - UInt64 v = CRC64_GET_DIGEST(p->crc64); - for (i = 0; i < 8; i++, v >>= 8) - digest[i] = (Byte)(v & 0xFF); - break; - } - case XZ_CHECK_SHA256: - Sha256_Final(&p->sha, digest); - break; - default: - return 0; - } - return 1; -} diff --git a/code/ryzom/client/src/seven_zip/Xz.h b/code/ryzom/client/src/seven_zip/Xz.h deleted file mode 100644 index 544ee18f2..000000000 --- a/code/ryzom/client/src/seven_zip/Xz.h +++ /dev/null @@ -1,460 +0,0 @@ -/* Xz.h - Xz interface -2018-07-04 : Igor Pavlov : Public domain */ - -#ifndef __XZ_H -#define __XZ_H - -#include "Sha256.h" - -EXTERN_C_BEGIN - -#define XZ_ID_Subblock 1 -#define XZ_ID_Delta 3 -#define XZ_ID_X86 4 -#define XZ_ID_PPC 5 -#define XZ_ID_IA64 6 -#define XZ_ID_ARM 7 -#define XZ_ID_ARMT 8 -#define XZ_ID_SPARC 9 -#define XZ_ID_LZMA2 0x21 - -unsigned Xz_ReadVarInt(const Byte *p, size_t maxSize, UInt64 *value); -unsigned Xz_WriteVarInt(Byte *buf, UInt64 v); - -/* ---------- xz block ---------- */ - -#define XZ_BLOCK_HEADER_SIZE_MAX 1024 - -#define XZ_NUM_FILTERS_MAX 4 -#define XZ_BF_NUM_FILTERS_MASK 3 -#define XZ_BF_PACK_SIZE (1 << 6) -#define XZ_BF_UNPACK_SIZE (1 << 7) - -#define XZ_FILTER_PROPS_SIZE_MAX 20 - -typedef struct -{ - UInt64 id; - UInt32 propsSize; - Byte props[XZ_FILTER_PROPS_SIZE_MAX]; -} CXzFilter; - -typedef struct -{ - UInt64 packSize; - UInt64 unpackSize; - Byte flags; - CXzFilter filters[XZ_NUM_FILTERS_MAX]; -} CXzBlock; - -#define XzBlock_GetNumFilters(p) (((p)->flags & XZ_BF_NUM_FILTERS_MASK) + 1) -#define XzBlock_HasPackSize(p) (((p)->flags & XZ_BF_PACK_SIZE) != 0) -#define XzBlock_HasUnpackSize(p) (((p)->flags & XZ_BF_UNPACK_SIZE) != 0) -#define XzBlock_HasUnsupportedFlags(p) (((p)->flags & ~(XZ_BF_NUM_FILTERS_MASK | XZ_BF_PACK_SIZE | XZ_BF_UNPACK_SIZE)) != 0) - -SRes XzBlock_Parse(CXzBlock *p, const Byte *header); -SRes XzBlock_ReadHeader(CXzBlock *p, ISeqInStream *inStream, BoolInt *isIndex, UInt32 *headerSizeRes); - -/* ---------- xz stream ---------- */ - -#define XZ_SIG_SIZE 6 -#define XZ_FOOTER_SIG_SIZE 2 - -extern const Byte XZ_SIG[XZ_SIG_SIZE]; - -/* -extern const Byte XZ_FOOTER_SIG[XZ_FOOTER_SIG_SIZE]; -*/ - -#define XZ_FOOTER_SIG_0 'Y' -#define XZ_FOOTER_SIG_1 'Z' - -#define XZ_STREAM_FLAGS_SIZE 2 -#define XZ_STREAM_CRC_SIZE 4 - -#define XZ_STREAM_HEADER_SIZE (XZ_SIG_SIZE + XZ_STREAM_FLAGS_SIZE + XZ_STREAM_CRC_SIZE) -#define XZ_STREAM_FOOTER_SIZE (XZ_FOOTER_SIG_SIZE + XZ_STREAM_FLAGS_SIZE + XZ_STREAM_CRC_SIZE + 4) - -#define XZ_CHECK_MASK 0xF -#define XZ_CHECK_NO 0 -#define XZ_CHECK_CRC32 1 -#define XZ_CHECK_CRC64 4 -#define XZ_CHECK_SHA256 10 - -typedef struct -{ - unsigned mode; - UInt32 crc; - UInt64 crc64; - CSha256 sha; -} CXzCheck; - -void XzCheck_Init(CXzCheck *p, unsigned mode); -void XzCheck_Update(CXzCheck *p, const void *data, size_t size); -int XzCheck_Final(CXzCheck *p, Byte *digest); - -typedef UInt16 CXzStreamFlags; - -#define XzFlags_IsSupported(f) ((f) <= XZ_CHECK_MASK) -#define XzFlags_GetCheckType(f) ((f) & XZ_CHECK_MASK) -#define XzFlags_HasDataCrc32(f) (Xz_GetCheckType(f) == XZ_CHECK_CRC32) -unsigned XzFlags_GetCheckSize(CXzStreamFlags f); - -SRes Xz_ParseHeader(CXzStreamFlags *p, const Byte *buf); -SRes Xz_ReadHeader(CXzStreamFlags *p, ISeqInStream *inStream); - -typedef struct -{ - UInt64 unpackSize; - UInt64 totalSize; -} CXzBlockSizes; - -typedef struct -{ - CXzStreamFlags flags; - size_t numBlocks; - CXzBlockSizes *blocks; - UInt64 startOffset; -} CXzStream; - -void Xz_Construct(CXzStream *p); -void Xz_Free(CXzStream *p, ISzAllocPtr alloc); - -#define XZ_SIZE_OVERFLOW ((UInt64)(Int64)-1) - -UInt64 Xz_GetUnpackSize(const CXzStream *p); -UInt64 Xz_GetPackSize(const CXzStream *p); - -typedef struct -{ - size_t num; - size_t numAllocated; - CXzStream *streams; -} CXzs; - -void Xzs_Construct(CXzs *p); -void Xzs_Free(CXzs *p, ISzAllocPtr alloc); -SRes Xzs_ReadBackward(CXzs *p, ILookInStream *inStream, Int64 *startOffset, ICompressProgress *progress, ISzAllocPtr alloc); - -UInt64 Xzs_GetNumBlocks(const CXzs *p); -UInt64 Xzs_GetUnpackSize(const CXzs *p); - - -// ECoderStatus values are identical to ELzmaStatus values of LZMA2 decoder - -typedef enum -{ - CODER_STATUS_NOT_SPECIFIED, /* use main error code instead */ - CODER_STATUS_FINISHED_WITH_MARK, /* stream was finished with end mark. */ - CODER_STATUS_NOT_FINISHED, /* stream was not finished */ - CODER_STATUS_NEEDS_MORE_INPUT /* you must provide more input bytes */ -} ECoderStatus; - - -// ECoderFinishMode values are identical to ELzmaFinishMode - -typedef enum -{ - CODER_FINISH_ANY, /* finish at any point */ - CODER_FINISH_END /* block must be finished at the end */ -} ECoderFinishMode; - - -typedef struct _IStateCoder -{ - void *p; - void (*Free)(void *p, ISzAllocPtr alloc); - SRes (*SetProps)(void *p, const Byte *props, size_t propSize, ISzAllocPtr alloc); - void (*Init)(void *p); - SRes (*Code2)(void *p, Byte *dest, SizeT *destLen, const Byte *src, SizeT *srcLen, - int srcWasFinished, ECoderFinishMode finishMode, - // int *wasFinished, - ECoderStatus *status); - SizeT (*Filter)(void *p, Byte *data, SizeT size); -} IStateCoder; - - - -#define MIXCODER_NUM_FILTERS_MAX 4 - -typedef struct -{ - ISzAllocPtr alloc; - Byte *buf; - unsigned numCoders; - - Byte *outBuf; - size_t outBufSize; - size_t outWritten; // is equal to lzmaDecoder.dicPos (in outBuf mode) - BoolInt wasFinished; - SRes res; - ECoderStatus status; - // BoolInt SingleBufMode; - - int finished[MIXCODER_NUM_FILTERS_MAX - 1]; - size_t pos[MIXCODER_NUM_FILTERS_MAX - 1]; - size_t size[MIXCODER_NUM_FILTERS_MAX - 1]; - UInt64 ids[MIXCODER_NUM_FILTERS_MAX]; - SRes results[MIXCODER_NUM_FILTERS_MAX]; - IStateCoder coders[MIXCODER_NUM_FILTERS_MAX]; -} CMixCoder; - - -typedef enum -{ - XZ_STATE_STREAM_HEADER, - XZ_STATE_STREAM_INDEX, - XZ_STATE_STREAM_INDEX_CRC, - XZ_STATE_STREAM_FOOTER, - XZ_STATE_STREAM_PADDING, - XZ_STATE_BLOCK_HEADER, - XZ_STATE_BLOCK, - XZ_STATE_BLOCK_FOOTER -} EXzState; - - -typedef struct -{ - EXzState state; - UInt32 pos; - unsigned alignPos; - unsigned indexPreSize; - - CXzStreamFlags streamFlags; - - UInt32 blockHeaderSize; - UInt64 packSize; - UInt64 unpackSize; - - UInt64 numBlocks; // number of finished blocks in current stream - UInt64 indexSize; - UInt64 indexPos; - UInt64 padSize; - - UInt64 numStartedStreams; - UInt64 numFinishedStreams; - UInt64 numTotalBlocks; - - UInt32 crc; - CMixCoder decoder; - CXzBlock block; - CXzCheck check; - CSha256 sha; - - BoolInt parseMode; - BoolInt headerParsedOk; - BoolInt decodeToStreamSignature; - unsigned decodeOnlyOneBlock; - - Byte *outBuf; - size_t outBufSize; - size_t outDataWritten; // the size of data in (outBuf) that were fully unpacked - - Byte shaDigest[SHA256_DIGEST_SIZE]; - Byte buf[XZ_BLOCK_HEADER_SIZE_MAX]; -} CXzUnpacker; - -/* alloc : aligned for cache line allocation is better */ -void XzUnpacker_Construct(CXzUnpacker *p, ISzAllocPtr alloc); -void XzUnpacker_Init(CXzUnpacker *p); -void XzUnpacker_SetOutBuf(CXzUnpacker *p, Byte *outBuf, size_t outBufSize); -void XzUnpacker_Free(CXzUnpacker *p); - -/* - XzUnpacker - The sequence for decoding functions: - { - XzUnpacker_Construct() - [Decoding_Calls] - XzUnpacker_Free() - } - - [Decoding_Calls] - - There are 3 types of interfaces for [Decoding_Calls] calls: - - Interface-1 : Partial output buffers: - { - XzUnpacker_Init() - for() - XzUnpacker_Code(); - } - - Interface-2 : Direct output buffer: - Use it, if you know exact size of decoded data, and you need - whole xz unpacked data in one output buffer. - xz unpacker doesn't allocate additional buffer for lzma2 dictionary in that mode. - { - XzUnpacker_Init() - XzUnpacker_SetOutBufMode(); // to set output buffer and size - for() - XzUnpacker_Code(); // (dest = NULL) in XzUnpacker_Code() - } - - Interface-3 : Direct output buffer : One call full decoding - It unpacks whole input buffer to output buffer in one call. - It uses Interface-2 internally. - { - XzUnpacker_CodeFull() - } -*/ - -/* -finishMode: - It has meaning only if the decoding reaches output limit (*destLen). - CODER_FINISH_ANY - use smallest number of input bytes - CODER_FINISH_END - read EndOfStream marker after decoding - -Returns: - SZ_OK - status: - CODER_STATUS_NOT_FINISHED, - CODER_STATUS_NEEDS_MORE_INPUT - maybe there are more xz streams, - call XzUnpacker_IsStreamWasFinished to check that current stream was finished - SZ_ERROR_MEM - Memory allocation error - SZ_ERROR_DATA - Data error - SZ_ERROR_UNSUPPORTED - Unsupported method or method properties - SZ_ERROR_CRC - CRC error - // SZ_ERROR_INPUT_EOF - It needs more bytes in input buffer (src). - - SZ_ERROR_NO_ARCHIVE - the error with xz Stream Header with one of the following reasons: - - xz Stream Signature failure - - CRC32 of xz Stream Header is failed - - The size of Stream padding is not multiple of four bytes. - It's possible to get that error, if xz stream was finished and the stream - contains some another data. In that case you can call XzUnpacker_GetExtraSize() - function to get real size of xz stream. -*/ - - -SRes XzUnpacker_Code(CXzUnpacker *p, Byte *dest, SizeT *destLen, - const Byte *src, SizeT *srcLen, int srcFinished, - ECoderFinishMode finishMode, ECoderStatus *status); - -SRes XzUnpacker_CodeFull(CXzUnpacker *p, Byte *dest, SizeT *destLen, - const Byte *src, SizeT *srcLen, - ECoderFinishMode finishMode, ECoderStatus *status); - -BoolInt XzUnpacker_IsStreamWasFinished(const CXzUnpacker *p); - -/* -XzUnpacker_GetExtraSize() returns then number of uncofirmed bytes, - if it's in (XZ_STATE_STREAM_HEADER) state or in (XZ_STATE_STREAM_PADDING) state. -These bytes can be some bytes after xz archive, or -it can be start of new xz stream. - -Call XzUnpacker_GetExtraSize() after XzUnpacker_Code() function to detect real size of -xz stream in two cases, if XzUnpacker_Code() returns: - res == SZ_OK && status == CODER_STATUS_NEEDS_MORE_INPUT - res == SZ_ERROR_NO_ARCHIVE -*/ - -UInt64 XzUnpacker_GetExtraSize(const CXzUnpacker *p); - - -/* - for random block decoding: - XzUnpacker_Init(); - set CXzUnpacker::streamFlags - XzUnpacker_PrepareToRandomBlockDecoding() - loop - { - XzUnpacker_Code() - XzUnpacker_IsBlockFinished() - } -*/ - -void XzUnpacker_PrepareToRandomBlockDecoding(CXzUnpacker *p); -BoolInt XzUnpacker_IsBlockFinished(const CXzUnpacker *p); - -#define XzUnpacker_GetPackSizeForIndex(p) ((p)->packSize + (p)->blockHeaderSize + XzFlags_GetCheckSize((p)->streamFlags)) - - - -/* ---------- Multi Threading Decoding ---------- */ - - -typedef struct -{ - size_t inBufSize_ST; - size_t outStep_ST; - BoolInt ignoreErrors; - - #ifndef _7ZIP_ST - unsigned numThreads; - size_t inBufSize_MT; - size_t memUseMax; - #endif -} CXzDecMtProps; - -void XzDecMtProps_Init(CXzDecMtProps *p); - - -typedef void * CXzDecMtHandle; - -/* - alloc : XzDecMt uses CAlignOffsetAlloc for addresses allocated by (alloc). - allocMid : for big allocations, aligned allocation is better -*/ - -CXzDecMtHandle XzDecMt_Create(ISzAllocPtr alloc, ISzAllocPtr allocMid); -void XzDecMt_Destroy(CXzDecMtHandle p); - - -typedef struct -{ - Byte UnpackSize_Defined; - Byte NumStreams_Defined; - Byte NumBlocks_Defined; - - Byte DataAfterEnd; - Byte DecodingTruncated; // Decoding was Truncated, we need only partial output data - - UInt64 InSize; // pack size processed - UInt64 OutSize; - - UInt64 NumStreams; - UInt64 NumBlocks; - - SRes DecodeRes; - SRes ReadRes; - SRes ProgressRes; - SRes CombinedRes; - SRes CombinedRes_Type; - -} CXzStatInfo; - -void XzStatInfo_Clear(CXzStatInfo *p); - -/* -XzDecMt_Decode() -SRes: - SZ_OK - OK - SZ_ERROR_MEM - Memory allocation error - SZ_ERROR_NO_ARCHIVE - is not xz archive - SZ_ERROR_ARCHIVE - Headers error - SZ_ERROR_DATA - Data Error - SZ_ERROR_CRC - CRC Error - SZ_ERROR_INPUT_EOF - it needs more input data - SZ_ERROR_WRITE - ISeqOutStream error - (SZ_ERROR_READ) - ISeqInStream errors - (SZ_ERROR_PROGRESS) - ICompressProgress errors - // SZ_ERROR_THREAD - error in multi-threading functions - MY_SRes_HRESULT_FROM_WRes(WRes_error) - error in multi-threading function -*/ - -SRes XzDecMt_Decode(CXzDecMtHandle p, - const CXzDecMtProps *props, - const UInt64 *outDataSize, // NULL means undefined - int finishMode, // 0 - partial unpacking is allowed, 1 - xz stream(s) must be finished - ISeqOutStream *outStream, - // Byte *outBuf, size_t *outBufSize, - ISeqInStream *inStream, - // const Byte *inData, size_t inDataSize, - CXzStatInfo *stat, - int *isMT, // 0 means that ST (Single-Thread) version was used - ICompressProgress *progress); - -EXTERN_C_END - -#endif diff --git a/code/ryzom/client/src/seven_zip/XzCrc64.cpp b/code/ryzom/client/src/seven_zip/XzCrc64.cpp deleted file mode 100644 index b6d02cbeb..000000000 --- a/code/ryzom/client/src/seven_zip/XzCrc64.cpp +++ /dev/null @@ -1,86 +0,0 @@ -/* XzCrc64.c -- CRC64 calculation -2017-05-23 : Igor Pavlov : Public domain */ - -#include "Precomp.h" - -#include "XzCrc64.h" -#include "CpuArch.h" - -#define kCrc64Poly UINT64_CONST(0xC96C5795D7870F42) - -#ifdef MY_CPU_LE - #define CRC64_NUM_TABLES 4 -#else - #define CRC64_NUM_TABLES 5 - #define CRC_UINT64_SWAP(v) \ - ((v >> 56) \ - | ((v >> 40) & ((UInt64)0xFF << 8)) \ - | ((v >> 24) & ((UInt64)0xFF << 16)) \ - | ((v >> 8) & ((UInt64)0xFF << 24)) \ - | ((v << 8) & ((UInt64)0xFF << 32)) \ - | ((v << 24) & ((UInt64)0xFF << 40)) \ - | ((v << 40) & ((UInt64)0xFF << 48)) \ - | ((v << 56))) - - UInt64 MY_FAST_CALL XzCrc64UpdateT1_BeT4(UInt64 v, const void *data, size_t size, const UInt64 *table); -#endif - -#ifndef MY_CPU_BE - UInt64 MY_FAST_CALL XzCrc64UpdateT4(UInt64 v, const void *data, size_t size, const UInt64 *table); -#endif - -typedef UInt64 (MY_FAST_CALL *CRC64_FUNC)(UInt64 v, const void *data, size_t size, const UInt64 *table); - -static CRC64_FUNC g_Crc64Update; -UInt64 g_Crc64Table[256 * CRC64_NUM_TABLES]; - -UInt64 MY_FAST_CALL Crc64Update(UInt64 v, const void *data, size_t size) -{ - return g_Crc64Update(v, data, size, g_Crc64Table); -} - -UInt64 MY_FAST_CALL Crc64Calc(const void *data, size_t size) -{ - return g_Crc64Update(CRC64_INIT_VAL, data, size, g_Crc64Table) ^ CRC64_INIT_VAL; -} - -void MY_FAST_CALL Crc64GenerateTable() -{ - UInt32 i; - for (i = 0; i < 256; i++) - { - UInt64 r = i; - unsigned j; - for (j = 0; j < 8; j++) - r = (r >> 1) ^ (kCrc64Poly & ((UInt64)0 - (r & 1))); - g_Crc64Table[i] = r; - } - for (i = 256; i < 256 * CRC64_NUM_TABLES; i++) - { - UInt64 r = g_Crc64Table[(size_t)i - 256]; - g_Crc64Table[i] = g_Crc64Table[r & 0xFF] ^ (r >> 8); - } - - #ifdef MY_CPU_LE - - g_Crc64Update = XzCrc64UpdateT4; - - #else - { - #ifndef MY_CPU_BE - UInt32 k = 1; - if (*(const Byte *)&k == 1) - g_Crc64Update = XzCrc64UpdateT4; - else - #endif - { - for (i = 256 * CRC64_NUM_TABLES - 1; i >= 256; i--) - { - UInt64 x = g_Crc64Table[(size_t)i - 256]; - g_Crc64Table[i] = CRC_UINT64_SWAP(x); - } - g_Crc64Update = XzCrc64UpdateT1_BeT4; - } - } - #endif -} diff --git a/code/ryzom/client/src/seven_zip/XzCrc64.h b/code/ryzom/client/src/seven_zip/XzCrc64.h deleted file mode 100644 index 08dbc330c..000000000 --- a/code/ryzom/client/src/seven_zip/XzCrc64.h +++ /dev/null @@ -1,26 +0,0 @@ -/* XzCrc64.h -- CRC64 calculation -2013-01-18 : Igor Pavlov : Public domain */ - -#ifndef __XZ_CRC64_H -#define __XZ_CRC64_H - -#include - -#include "7zTypes.h" - -EXTERN_C_BEGIN - -extern UInt64 g_Crc64Table[]; - -void MY_FAST_CALL Crc64GenerateTable(void); - -#define CRC64_INIT_VAL UINT64_CONST(0xFFFFFFFFFFFFFFFF) -#define CRC64_GET_DIGEST(crc) ((crc) ^ CRC64_INIT_VAL) -#define CRC64_UPDATE_BYTE(crc, b) (g_Crc64Table[((crc) ^ (b)) & 0xFF] ^ ((crc) >> 8)) - -UInt64 MY_FAST_CALL Crc64Update(UInt64 crc, const void *data, size_t size); -UInt64 MY_FAST_CALL Crc64Calc(const void *data, size_t size); - -EXTERN_C_END - -#endif diff --git a/code/ryzom/client/src/seven_zip/XzCrc64Opt.cpp b/code/ryzom/client/src/seven_zip/XzCrc64Opt.cpp deleted file mode 100644 index b2852de4d..000000000 --- a/code/ryzom/client/src/seven_zip/XzCrc64Opt.cpp +++ /dev/null @@ -1,69 +0,0 @@ -/* XzCrc64Opt.c -- CRC64 calculation -2017-06-30 : Igor Pavlov : Public domain */ - -#include "Precomp.h" - -#include "CpuArch.h" - -#ifndef MY_CPU_BE - -#define CRC64_UPDATE_BYTE_2(crc, b) (table[((crc) ^ (b)) & 0xFF] ^ ((crc) >> 8)) - -UInt64 MY_FAST_CALL XzCrc64UpdateT4(UInt64 v, const void *data, size_t size, const UInt64 *table) -{ - const Byte *p = (const Byte *)data; - for (; size > 0 && ((unsigned)(ptrdiff_t)p & 3) != 0; size--, p++) - v = CRC64_UPDATE_BYTE_2(v, *p); - for (; size >= 4; size -= 4, p += 4) - { - UInt32 d = (UInt32)v ^ *(const UInt32 *)p; - v = (v >> 32) - ^ (table + 0x300)[((d ) & 0xFF)] - ^ (table + 0x200)[((d >> 8) & 0xFF)] - ^ (table + 0x100)[((d >> 16) & 0xFF)] - ^ (table + 0x000)[((d >> 24))]; - } - for (; size > 0; size--, p++) - v = CRC64_UPDATE_BYTE_2(v, *p); - return v; -} - -#endif - - -#ifndef MY_CPU_LE - -#define CRC_UINT64_SWAP(v) \ - ((v >> 56) \ - | ((v >> 40) & ((UInt64)0xFF << 8)) \ - | ((v >> 24) & ((UInt64)0xFF << 16)) \ - | ((v >> 8) & ((UInt64)0xFF << 24)) \ - | ((v << 8) & ((UInt64)0xFF << 32)) \ - | ((v << 24) & ((UInt64)0xFF << 40)) \ - | ((v << 40) & ((UInt64)0xFF << 48)) \ - | ((v << 56))) - -#define CRC64_UPDATE_BYTE_2_BE(crc, b) (table[(Byte)((crc) >> 56) ^ (b)] ^ ((crc) << 8)) - -UInt64 MY_FAST_CALL XzCrc64UpdateT1_BeT4(UInt64 v, const void *data, size_t size, const UInt64 *table) -{ - const Byte *p = (const Byte *)data; - table += 0x100; - v = CRC_UINT64_SWAP(v); - for (; size > 0 && ((unsigned)(ptrdiff_t)p & 3) != 0; size--, p++) - v = CRC64_UPDATE_BYTE_2_BE(v, *p); - for (; size >= 4; size -= 4, p += 4) - { - UInt32 d = (UInt32)(v >> 32) ^ *(const UInt32 *)p; - v = (v << 32) - ^ (table + 0x000)[((d ) & 0xFF)] - ^ (table + 0x100)[((d >> 8) & 0xFF)] - ^ (table + 0x200)[((d >> 16) & 0xFF)] - ^ (table + 0x300)[((d >> 24))]; - } - for (; size > 0; size--, p++) - v = CRC64_UPDATE_BYTE_2_BE(v, *p); - return CRC_UINT64_SWAP(v); -} - -#endif diff --git a/code/ryzom/client/src/seven_zip/XzDec.cpp b/code/ryzom/client/src/seven_zip/XzDec.cpp deleted file mode 100644 index 395e83f67..000000000 --- a/code/ryzom/client/src/seven_zip/XzDec.cpp +++ /dev/null @@ -1,2766 +0,0 @@ -/* XzDec.c -- Xz Decode -2019-02-02 : Igor Pavlov : Public domain */ - -#include "Precomp.h" - -// #include - -// #define XZ_DUMP - -/* #define XZ_DUMP */ - -#ifdef XZ_DUMP -#include -#endif - -// #define SHOW_DEBUG_INFO - -#ifdef SHOW_DEBUG_INFO -#include -#endif - -#ifdef SHOW_DEBUG_INFO -#define PRF(x) x -#else -#define PRF(x) -#endif - -#define PRF_STR(s) PRF(printf("\n" s "\n")) -#define PRF_STR_INT(s, d) PRF(printf("\n" s " %d\n", (unsigned)d)) - -#include -#include - -#include "7zCrc.h" -#include "Alloc.h" -#include "Bra.h" -#include "CpuArch.h" -#include "Delta.h" -#include "Lzma2Dec.h" - -// #define USE_SUBBLOCK - -#ifdef USE_SUBBLOCK -#include "Bcj3Dec.c" -#include "SbDec.h" -#endif - -#include "Xz.h" - -#define XZ_CHECK_SIZE_MAX 64 - -#define CODER_BUF_SIZE ((size_t)1 << 17) - -unsigned Xz_ReadVarInt(const Byte *p, size_t maxSize, UInt64 *value) -{ - unsigned i, limit; - *value = 0; - limit = (maxSize > 9) ? 9 : (unsigned)maxSize; - - for (i = 0; i < limit;) - { - Byte b = p[i]; - *value |= (UInt64)(b & 0x7F) << (7 * i++); - if ((b & 0x80) == 0) - return (b == 0 && i != 1) ? 0 : i; - } - return 0; -} - -/* ---------- BraState ---------- */ - -#define BRA_BUF_SIZE (1 << 14) - -typedef struct -{ - size_t bufPos; - size_t bufConv; - size_t bufTotal; - - int encodeMode; - - UInt32 methodId; - UInt32 delta; - UInt32 ip; - UInt32 x86State; - Byte deltaState[DELTA_STATE_SIZE]; - - Byte buf[BRA_BUF_SIZE]; -} CBraState; - -static void BraState_Free(void *pp, ISzAllocPtr alloc) -{ - ISzAlloc_Free(alloc, pp); -} - -static SRes BraState_SetProps(void *pp, const Byte *props, size_t propSize, ISzAllocPtr alloc) -{ - CBraState *p = ((CBraState *)pp); - UNUSED_VAR(alloc); - p->ip = 0; - if (p->methodId == XZ_ID_Delta) - { - if (propSize != 1) - return SZ_ERROR_UNSUPPORTED; - p->delta = (unsigned)props[0] + 1; - } - else - { - if (propSize == 4) - { - UInt32 v = GetUi32(props); - switch (p->methodId) - { - case XZ_ID_PPC: - case XZ_ID_ARM: - case XZ_ID_SPARC: - if ((v & 3) != 0) - return SZ_ERROR_UNSUPPORTED; - break; - case XZ_ID_ARMT: - if ((v & 1) != 0) - return SZ_ERROR_UNSUPPORTED; - break; - case XZ_ID_IA64: - if ((v & 0xF) != 0) - return SZ_ERROR_UNSUPPORTED; - break; - } - p->ip = v; - } - else if (propSize != 0) - return SZ_ERROR_UNSUPPORTED; - } - return SZ_OK; -} - -static void BraState_Init(void *pp) -{ - CBraState *p = ((CBraState *)pp); - p->bufPos = p->bufConv = p->bufTotal = 0; - x86_Convert_Init(p->x86State); - if (p->methodId == XZ_ID_Delta) - Delta_Init(p->deltaState); -} - - -#define CASE_BRA_CONV(isa) case XZ_ID_ ## isa: size = isa ## _Convert(data, size, p->ip, p->encodeMode); break; - -static SizeT BraState_Filter(void *pp, Byte *data, SizeT size) -{ - CBraState *p = ((CBraState *)pp); - switch (p->methodId) - { - case XZ_ID_Delta: - if (p->encodeMode) - Delta_Encode(p->deltaState, p->delta, data, size); - else - Delta_Decode(p->deltaState, p->delta, data, size); - break; - case XZ_ID_X86: - size = x86_Convert(data, size, p->ip, &p->x86State, p->encodeMode); - break; - CASE_BRA_CONV(PPC) - CASE_BRA_CONV(IA64) - CASE_BRA_CONV(ARM) - CASE_BRA_CONV(ARMT) - CASE_BRA_CONV(SPARC) - } - p->ip += (UInt32)size; - return size; -} - - -static SRes BraState_Code2(void *pp, - Byte *dest, SizeT *destLen, - const Byte *src, SizeT *srcLen, int srcWasFinished, - ECoderFinishMode finishMode, - // int *wasFinished - ECoderStatus *status) -{ - CBraState *p = ((CBraState *)pp); - SizeT destRem = *destLen; - SizeT srcRem = *srcLen; - UNUSED_VAR(finishMode); - - *destLen = 0; - *srcLen = 0; - // *wasFinished = False; - *status = CODER_STATUS_NOT_FINISHED; - - while (destRem > 0) - { - if (p->bufPos != p->bufConv) - { - size_t size = p->bufConv - p->bufPos; - if (size > destRem) - size = destRem; - memcpy(dest, p->buf + p->bufPos, size); - p->bufPos += size; - *destLen += size; - dest += size; - destRem -= size; - continue; - } - - p->bufTotal -= p->bufPos; - memmove(p->buf, p->buf + p->bufPos, p->bufTotal); - p->bufPos = 0; - p->bufConv = 0; - { - size_t size = BRA_BUF_SIZE - p->bufTotal; - if (size > srcRem) - size = srcRem; - memcpy(p->buf + p->bufTotal, src, size); - *srcLen += size; - src += size; - srcRem -= size; - p->bufTotal += size; - } - if (p->bufTotal == 0) - break; - - p->bufConv = BraState_Filter(pp, p->buf, p->bufTotal); - - if (p->bufConv == 0) - { - if (!srcWasFinished) - break; - p->bufConv = p->bufTotal; - } - } - - if (p->bufTotal == p->bufPos && srcRem == 0 && srcWasFinished) - { - *status = CODER_STATUS_FINISHED_WITH_MARK; - // *wasFinished = 1; - } - - return SZ_OK; -} - - -SRes BraState_SetFromMethod(IStateCoder *p, UInt64 id, int encodeMode, ISzAllocPtr alloc) -{ - CBraState *decoder; - if (id < XZ_ID_Delta || id > XZ_ID_SPARC) - return SZ_ERROR_UNSUPPORTED; - decoder = (CBraState *)p->p; - if (!decoder) - { - decoder = (CBraState *)ISzAlloc_Alloc(alloc, sizeof(CBraState)); - if (!decoder) - return SZ_ERROR_MEM; - p->p = decoder; - p->Free = BraState_Free; - p->SetProps = BraState_SetProps; - p->Init = BraState_Init; - p->Code2 = BraState_Code2; - p->Filter = BraState_Filter; - } - decoder->methodId = (UInt32)id; - decoder->encodeMode = encodeMode; - return SZ_OK; -} - - - -/* ---------- SbState ---------- */ - -#ifdef USE_SUBBLOCK - -static void SbState_Free(void *pp, ISzAllocPtr alloc) -{ - CSbDec *p = (CSbDec *)pp; - SbDec_Free(p); - ISzAlloc_Free(alloc, pp); -} - -static SRes SbState_SetProps(void *pp, const Byte *props, size_t propSize, ISzAllocPtr alloc) -{ - UNUSED_VAR(pp); - UNUSED_VAR(props); - UNUSED_VAR(alloc); - return (propSize == 0) ? SZ_OK : SZ_ERROR_UNSUPPORTED; -} - -static void SbState_Init(void *pp) -{ - SbDec_Init((CSbDec *)pp); -} - -static SRes SbState_Code2(void *pp, Byte *dest, SizeT *destLen, const Byte *src, SizeT *srcLen, - int srcWasFinished, ECoderFinishMode finishMode, - // int *wasFinished - ECoderStatus *status) -{ - CSbDec *p = (CSbDec *)pp; - SRes res; - UNUSED_VAR(srcWasFinished); - p->dest = dest; - p->destLen = *destLen; - p->src = src; - p->srcLen = *srcLen; - p->finish = finishMode; /* change it */ - res = SbDec_Decode((CSbDec *)pp); - *destLen -= p->destLen; - *srcLen -= p->srcLen; - // *wasFinished = (*destLen == 0 && *srcLen == 0); /* change it */ - *status = (*destLen == 0 && *srcLen == 0) ? - CODER_STATUS_FINISHED_WITH_MARK : - CODER_STATUS_NOT_FINISHED; - return res; -} - -static SRes SbState_SetFromMethod(IStateCoder *p, ISzAllocPtr alloc) -{ - CSbDec *decoder = (CSbDec *)p->p; - if (!decoder) - { - decoder = (CSbDec *)ISzAlloc_Alloc(alloc, sizeof(CSbDec)); - if (!decoder) - return SZ_ERROR_MEM; - p->p = decoder; - p->Free = SbState_Free; - p->SetProps = SbState_SetProps; - p->Init = SbState_Init; - p->Code2 = SbState_Code2; - p->Filter = NULL; - } - SbDec_Construct(decoder); - SbDec_SetAlloc(decoder, alloc); - return SZ_OK; -} - -#endif - - - -/* ---------- Lzma2 ---------- */ - -typedef struct -{ - CLzma2Dec decoder; - BoolInt outBufMode; -} CLzma2Dec_Spec; - - -static void Lzma2State_Free(void *pp, ISzAllocPtr alloc) -{ - CLzma2Dec_Spec *p = (CLzma2Dec_Spec *)pp; - if (p->outBufMode) - Lzma2Dec_FreeProbs(&p->decoder, alloc); - else - Lzma2Dec_Free(&p->decoder, alloc); - ISzAlloc_Free(alloc, pp); -} - -static SRes Lzma2State_SetProps(void *pp, const Byte *props, size_t propSize, ISzAllocPtr alloc) -{ - if (propSize != 1) - return SZ_ERROR_UNSUPPORTED; - { - CLzma2Dec_Spec *p = (CLzma2Dec_Spec *)pp; - if (p->outBufMode) - return Lzma2Dec_AllocateProbs(&p->decoder, props[0], alloc); - else - return Lzma2Dec_Allocate(&p->decoder, props[0], alloc); - } -} - -static void Lzma2State_Init(void *pp) -{ - Lzma2Dec_Init(&((CLzma2Dec_Spec *)pp)->decoder); -} - - -/* - if (outBufMode), then (dest) is not used. Use NULL. - Data is unpacked to (spec->decoder.decoder.dic) output buffer. -*/ - -static SRes Lzma2State_Code2(void *pp, Byte *dest, SizeT *destLen, const Byte *src, SizeT *srcLen, - int srcWasFinished, ECoderFinishMode finishMode, - // int *wasFinished, - ECoderStatus *status) -{ - CLzma2Dec_Spec *spec = (CLzma2Dec_Spec *)pp; - ELzmaStatus status2; - /* ELzmaFinishMode fm = (finishMode == LZMA_FINISH_ANY) ? LZMA_FINISH_ANY : LZMA_FINISH_END; */ - SRes res; - UNUSED_VAR(srcWasFinished); - if (spec->outBufMode) - { - SizeT dicPos = spec->decoder.decoder.dicPos; - SizeT dicLimit = dicPos + *destLen; - res = Lzma2Dec_DecodeToDic(&spec->decoder, dicLimit, src, srcLen, (ELzmaFinishMode)finishMode, &status2); - *destLen = spec->decoder.decoder.dicPos - dicPos; - } - else - res = Lzma2Dec_DecodeToBuf(&spec->decoder, dest, destLen, src, srcLen, (ELzmaFinishMode)finishMode, &status2); - // *wasFinished = (status2 == LZMA_STATUS_FINISHED_WITH_MARK); - // ECoderStatus values are identical to ELzmaStatus values of LZMA2 decoder - *status = (ECoderStatus)status2; - return res; -} - - -static SRes Lzma2State_SetFromMethod(IStateCoder *p, Byte *outBuf, size_t outBufSize, ISzAllocPtr alloc) -{ - CLzma2Dec_Spec *spec = (CLzma2Dec_Spec *)p->p; - if (!spec) - { - spec = (CLzma2Dec_Spec *)ISzAlloc_Alloc(alloc, sizeof(CLzma2Dec_Spec)); - if (!spec) - return SZ_ERROR_MEM; - p->p = spec; - p->Free = Lzma2State_Free; - p->SetProps = Lzma2State_SetProps; - p->Init = Lzma2State_Init; - p->Code2 = Lzma2State_Code2; - p->Filter = NULL; - Lzma2Dec_Construct(&spec->decoder); - } - spec->outBufMode = False; - if (outBuf) - { - spec->outBufMode = True; - spec->decoder.decoder.dic = outBuf; - spec->decoder.decoder.dicBufSize = outBufSize; - } - return SZ_OK; -} - - -static SRes Lzma2State_ResetOutBuf(IStateCoder *p, Byte *outBuf, size_t outBufSize) -{ - CLzma2Dec_Spec *spec = (CLzma2Dec_Spec *)p->p; - if ((spec->outBufMode && !outBuf) || (!spec->outBufMode && outBuf)) - return SZ_ERROR_FAIL; - if (outBuf) - { - spec->decoder.decoder.dic = outBuf; - spec->decoder.decoder.dicBufSize = outBufSize; - } - return SZ_OK; -} - - - -static void MixCoder_Construct(CMixCoder *p, ISzAllocPtr alloc) -{ - unsigned i; - p->alloc = alloc; - p->buf = NULL; - p->numCoders = 0; - - p->outBufSize = 0; - p->outBuf = NULL; - // p->SingleBufMode = False; - - for (i = 0; i < MIXCODER_NUM_FILTERS_MAX; i++) - p->coders[i].p = NULL; -} - - -static void MixCoder_Free(CMixCoder *p) -{ - unsigned i; - p->numCoders = 0; - for (i = 0; i < MIXCODER_NUM_FILTERS_MAX; i++) - { - IStateCoder *sc = &p->coders[i]; - if (sc->p) - { - sc->Free(sc->p, p->alloc); - sc->p = NULL; - } - } - if (p->buf) - { - ISzAlloc_Free(p->alloc, p->buf); - p->buf = NULL; /* 9.31: the BUG was fixed */ - } -} - -static void MixCoder_Init(CMixCoder *p) -{ - unsigned i; - for (i = 0; i < MIXCODER_NUM_FILTERS_MAX - 1; i++) - { - p->size[i] = 0; - p->pos[i] = 0; - p->finished[i] = 0; - } - for (i = 0; i < p->numCoders; i++) - { - IStateCoder *coder = &p->coders[i]; - coder->Init(coder->p); - p->results[i] = SZ_OK; - } - p->outWritten = 0; - p->wasFinished = False; - p->res = SZ_OK; - p->status = CODER_STATUS_NOT_SPECIFIED; -} - - -static SRes MixCoder_SetFromMethod(CMixCoder *p, unsigned coderIndex, UInt64 methodId, Byte *outBuf, size_t outBufSize) -{ - IStateCoder *sc = &p->coders[coderIndex]; - p->ids[coderIndex] = methodId; - switch (methodId) - { - case XZ_ID_LZMA2: return Lzma2State_SetFromMethod(sc, outBuf, outBufSize, p->alloc); - #ifdef USE_SUBBLOCK - case XZ_ID_Subblock: return SbState_SetFromMethod(sc, p->alloc); - #endif - } - if (coderIndex == 0) - return SZ_ERROR_UNSUPPORTED; - return BraState_SetFromMethod(sc, methodId, 0, p->alloc); -} - - -static SRes MixCoder_ResetFromMethod(CMixCoder *p, unsigned coderIndex, UInt64 methodId, Byte *outBuf, size_t outBufSize) -{ - IStateCoder *sc = &p->coders[coderIndex]; - switch (methodId) - { - case XZ_ID_LZMA2: return Lzma2State_ResetOutBuf(sc, outBuf, outBufSize); - } - return SZ_ERROR_UNSUPPORTED; -} - - - -/* - if (destFinish) - then unpack data block is finished at (*destLen) position, - and we can return data that were not processed by filter - -output (status) can be : - CODER_STATUS_NOT_FINISHED - CODER_STATUS_FINISHED_WITH_MARK - CODER_STATUS_NEEDS_MORE_INPUT - not implemented still -*/ - -static SRes MixCoder_Code(CMixCoder *p, - Byte *dest, SizeT *destLen, int destFinish, - const Byte *src, SizeT *srcLen, int srcWasFinished, - ECoderFinishMode finishMode) -{ - SizeT destLenOrig = *destLen; - SizeT srcLenOrig = *srcLen; - - *destLen = 0; - *srcLen = 0; - - if (p->wasFinished) - return p->res; - - p->status = CODER_STATUS_NOT_FINISHED; - - // if (p->SingleBufMode) - if (p->outBuf) - { - SRes res; - SizeT destLen2, srcLen2; - int wasFinished; - - PRF_STR("------- MixCoder Single ----------"); - - srcLen2 = srcLenOrig; - destLen2 = destLenOrig; - - { - IStateCoder *coder = &p->coders[0]; - res = coder->Code2(coder->p, NULL, &destLen2, src, &srcLen2, srcWasFinished, finishMode, - // &wasFinished, - &p->status); - wasFinished = (p->status == CODER_STATUS_FINISHED_WITH_MARK); - } - - p->res = res; - - /* - if (wasFinished) - p->status = CODER_STATUS_FINISHED_WITH_MARK; - else - { - if (res == SZ_OK) - if (destLen2 != destLenOrig) - p->status = CODER_STATUS_NEEDS_MORE_INPUT; - } - */ - - - *srcLen = srcLen2; - src += srcLen2; - p->outWritten += destLen2; - - if (res != SZ_OK || srcWasFinished || wasFinished) - p->wasFinished = True; - - if (p->numCoders == 1) - *destLen = destLen2; - else if (p->wasFinished) - { - unsigned i; - size_t processed = p->outWritten; - - for (i = 1; i < p->numCoders; i++) - { - IStateCoder *coder = &p->coders[i]; - processed = coder->Filter(coder->p, p->outBuf, processed); - if (wasFinished || (destFinish && p->outWritten == destLenOrig)) - processed = p->outWritten; - PRF_STR_INT("filter", i); - } - *destLen = processed; - } - return res; - } - - PRF_STR("standard mix"); - - if (p->numCoders != 1) - { - if (!p->buf) - { - p->buf = (Byte *)ISzAlloc_Alloc(p->alloc, CODER_BUF_SIZE * (MIXCODER_NUM_FILTERS_MAX - 1)); - if (!p->buf) - return SZ_ERROR_MEM; - } - - finishMode = CODER_FINISH_ANY; - } - - for (;;) - { - BoolInt processed = False; - BoolInt allFinished = True; - SRes resMain = SZ_OK; - unsigned i; - - p->status = CODER_STATUS_NOT_FINISHED; - /* - if (p->numCoders == 1 && *destLen == destLenOrig && finishMode == LZMA_FINISH_ANY) - break; - */ - - for (i = 0; i < p->numCoders; i++) - { - SRes res; - IStateCoder *coder = &p->coders[i]; - Byte *dest2; - SizeT destLen2, srcLen2; // destLen2_Orig; - const Byte *src2; - int srcFinished2; - int encodingWasFinished; - ECoderStatus status2; - - if (i == 0) - { - src2 = src; - srcLen2 = srcLenOrig - *srcLen; - srcFinished2 = srcWasFinished; - } - else - { - size_t k = i - 1; - src2 = p->buf + (CODER_BUF_SIZE * k) + p->pos[k]; - srcLen2 = p->size[k] - p->pos[k]; - srcFinished2 = p->finished[k]; - } - - if (i == p->numCoders - 1) - { - dest2 = dest; - destLen2 = destLenOrig - *destLen; - } - else - { - if (p->pos[i] != p->size[i]) - continue; - dest2 = p->buf + (CODER_BUF_SIZE * i); - destLen2 = CODER_BUF_SIZE; - } - - // destLen2_Orig = destLen2; - - if (p->results[i] != SZ_OK) - { - if (resMain == SZ_OK) - resMain = p->results[i]; - continue; - } - - res = coder->Code2(coder->p, - dest2, &destLen2, - src2, &srcLen2, srcFinished2, - finishMode, - // &encodingWasFinished, - &status2); - - if (res != SZ_OK) - { - p->results[i] = res; - if (resMain == SZ_OK) - resMain = res; - } - - encodingWasFinished = (status2 == CODER_STATUS_FINISHED_WITH_MARK); - - if (!encodingWasFinished) - { - allFinished = False; - if (p->numCoders == 1 && res == SZ_OK) - p->status = status2; - } - - if (i == 0) - { - *srcLen += srcLen2; - src += srcLen2; - } - else - p->pos[(size_t)i - 1] += srcLen2; - - if (i == p->numCoders - 1) - { - *destLen += destLen2; - dest += destLen2; - } - else - { - p->size[i] = destLen2; - p->pos[i] = 0; - p->finished[i] = encodingWasFinished; - } - - if (destLen2 != 0 || srcLen2 != 0) - processed = True; - } - - if (!processed) - { - if (allFinished) - p->status = CODER_STATUS_FINISHED_WITH_MARK; - return resMain; - } - } -} - - -SRes Xz_ParseHeader(CXzStreamFlags *p, const Byte *buf) -{ - *p = (CXzStreamFlags)GetBe16(buf + XZ_SIG_SIZE); - if (CrcCalc(buf + XZ_SIG_SIZE, XZ_STREAM_FLAGS_SIZE) != - GetUi32(buf + XZ_SIG_SIZE + XZ_STREAM_FLAGS_SIZE)) - return SZ_ERROR_NO_ARCHIVE; - return XzFlags_IsSupported(*p) ? SZ_OK : SZ_ERROR_UNSUPPORTED; -} - -static BoolInt Xz_CheckFooter(CXzStreamFlags flags, UInt64 indexSize, const Byte *buf) -{ - return indexSize == (((UInt64)GetUi32(buf + 4) + 1) << 2) - && GetUi32(buf) == CrcCalc(buf + 4, 6) - && flags == GetBe16(buf + 8) - && buf[10] == XZ_FOOTER_SIG_0 - && buf[11] == XZ_FOOTER_SIG_1; -} - -#define READ_VARINT_AND_CHECK(buf, pos, size, res) \ - { unsigned s = Xz_ReadVarInt(buf + pos, size - pos, res); \ - if (s == 0) return SZ_ERROR_ARCHIVE; pos += s; } - - -static BoolInt XzBlock_AreSupportedFilters(const CXzBlock *p) -{ - unsigned numFilters = XzBlock_GetNumFilters(p) - 1; - unsigned i; - { - const CXzFilter *f = &p->filters[numFilters]; - if (f->id != XZ_ID_LZMA2 || f->propsSize != 1 || f->props[0] > 40) - return False; - } - - for (i = 0; i < numFilters; i++) - { - const CXzFilter *f = &p->filters[i]; - if (f->id == XZ_ID_Delta) - { - if (f->propsSize != 1) - return False; - } - else if (f->id < XZ_ID_Delta - || f->id > XZ_ID_SPARC - || (f->propsSize != 0 && f->propsSize != 4)) - return False; - } - return True; -} - - -SRes XzBlock_Parse(CXzBlock *p, const Byte *header) -{ - unsigned pos; - unsigned numFilters, i; - unsigned headerSize = (unsigned)header[0] << 2; - - /* (headerSize != 0) : another code checks */ - - if (CrcCalc(header, headerSize) != GetUi32(header + headerSize)) - return SZ_ERROR_ARCHIVE; - - pos = 1; - p->flags = header[pos++]; - - p->packSize = (UInt64)(Int64)-1; - if (XzBlock_HasPackSize(p)) - { - READ_VARINT_AND_CHECK(header, pos, headerSize, &p->packSize); - if (p->packSize == 0 || p->packSize + headerSize >= (UInt64)1 << 63) - return SZ_ERROR_ARCHIVE; - } - - p->unpackSize = (UInt64)(Int64)-1; - if (XzBlock_HasUnpackSize(p)) - READ_VARINT_AND_CHECK(header, pos, headerSize, &p->unpackSize); - - numFilters = XzBlock_GetNumFilters(p); - for (i = 0; i < numFilters; i++) - { - CXzFilter *filter = p->filters + i; - UInt64 size; - READ_VARINT_AND_CHECK(header, pos, headerSize, &filter->id); - READ_VARINT_AND_CHECK(header, pos, headerSize, &size); - if (size > headerSize - pos || size > XZ_FILTER_PROPS_SIZE_MAX) - return SZ_ERROR_ARCHIVE; - filter->propsSize = (UInt32)size; - memcpy(filter->props, header + pos, (size_t)size); - pos += (unsigned)size; - - #ifdef XZ_DUMP - printf("\nf[%u] = %2X: ", i, (unsigned)filter->id); - { - unsigned i; - for (i = 0; i < size; i++) - printf(" %2X", filter->props[i]); - } - #endif - } - - if (XzBlock_HasUnsupportedFlags(p)) - return SZ_ERROR_UNSUPPORTED; - - while (pos < headerSize) - if (header[pos++] != 0) - return SZ_ERROR_ARCHIVE; - return SZ_OK; -} - - - - -static SRes XzDecMix_Init(CMixCoder *p, const CXzBlock *block, Byte *outBuf, size_t outBufSize) -{ - unsigned i; - BoolInt needReInit = True; - unsigned numFilters = XzBlock_GetNumFilters(block); - - if (numFilters == p->numCoders && ((p->outBuf && outBuf) || (!p->outBuf && !outBuf))) - { - needReInit = False; - for (i = 0; i < numFilters; i++) - if (p->ids[i] != block->filters[numFilters - 1 - i].id) - { - needReInit = True; - break; - } - } - - // p->SingleBufMode = (outBuf != NULL); - p->outBuf = outBuf; - p->outBufSize = outBufSize; - - // p->SingleBufMode = False; - // outBuf = NULL; - - if (needReInit) - { - MixCoder_Free(p); - for (i = 0; i < numFilters; i++) - { - RINOK(MixCoder_SetFromMethod(p, i, block->filters[numFilters - 1 - i].id, outBuf, outBufSize)); - } - p->numCoders = numFilters; - } - else - { - RINOK(MixCoder_ResetFromMethod(p, 0, block->filters[numFilters - 1].id, outBuf, outBufSize)); - } - - for (i = 0; i < numFilters; i++) - { - const CXzFilter *f = &block->filters[numFilters - 1 - i]; - IStateCoder *sc = &p->coders[i]; - RINOK(sc->SetProps(sc->p, f->props, f->propsSize, p->alloc)); - } - - MixCoder_Init(p); - return SZ_OK; -} - - - -void XzUnpacker_Init(CXzUnpacker *p) -{ - p->state = XZ_STATE_STREAM_HEADER; - p->pos = 0; - p->numStartedStreams = 0; - p->numFinishedStreams = 0; - p->numTotalBlocks = 0; - p->padSize = 0; - p->decodeOnlyOneBlock = 0; - - p->parseMode = False; - p->decodeToStreamSignature = False; - - // p->outBuf = NULL; - // p->outBufSize = 0; - p->outDataWritten = 0; -} - - -void XzUnpacker_SetOutBuf(CXzUnpacker *p, Byte *outBuf, size_t outBufSize) -{ - p->outBuf = outBuf; - p->outBufSize = outBufSize; -} - - -void XzUnpacker_Construct(CXzUnpacker *p, ISzAllocPtr alloc) -{ - MixCoder_Construct(&p->decoder, alloc); - p->outBuf = NULL; - p->outBufSize = 0; - XzUnpacker_Init(p); -} - - -void XzUnpacker_Free(CXzUnpacker *p) -{ - MixCoder_Free(&p->decoder); -} - - -void XzUnpacker_PrepareToRandomBlockDecoding(CXzUnpacker *p) -{ - p->indexSize = 0; - p->numBlocks = 0; - Sha256_Init(&p->sha); - p->state = XZ_STATE_BLOCK_HEADER; - p->pos = 0; - p->decodeOnlyOneBlock = 1; -} - - -static void XzUnpacker_UpdateIndex(CXzUnpacker *p, UInt64 packSize, UInt64 unpackSize) -{ - Byte temp[32]; - unsigned num = Xz_WriteVarInt(temp, packSize); - num += Xz_WriteVarInt(temp + num, unpackSize); - Sha256_Update(&p->sha, temp, num); - p->indexSize += num; - p->numBlocks++; -} - - - -SRes XzUnpacker_Code(CXzUnpacker *p, Byte *dest, SizeT *destLen, - const Byte *src, SizeT *srcLen, int srcFinished, - ECoderFinishMode finishMode, ECoderStatus *status) -{ - SizeT destLenOrig = *destLen; - SizeT srcLenOrig = *srcLen; - *destLen = 0; - *srcLen = 0; - *status = CODER_STATUS_NOT_SPECIFIED; - - for (;;) - { - SizeT srcRem; - - if (p->state == XZ_STATE_BLOCK) - { - SizeT destLen2 = destLenOrig - *destLen; - SizeT srcLen2 = srcLenOrig - *srcLen; - SRes res; - - ECoderFinishMode finishMode2 = finishMode; - BoolInt srcFinished2 = srcFinished; - BoolInt destFinish = False; - - if (p->block.packSize != (UInt64)(Int64)-1) - { - UInt64 rem = p->block.packSize - p->packSize; - if (srcLen2 >= rem) - { - srcFinished2 = True; - srcLen2 = (SizeT)rem; - } - if (rem == 0 && p->block.unpackSize == p->unpackSize) - return SZ_ERROR_DATA; - } - - if (p->block.unpackSize != (UInt64)(Int64)-1) - { - UInt64 rem = p->block.unpackSize - p->unpackSize; - if (destLen2 >= rem) - { - destFinish = True; - finishMode2 = CODER_FINISH_END; - destLen2 = (SizeT)rem; - } - } - - /* - if (srcLen2 == 0 && destLen2 == 0) - { - *status = CODER_STATUS_NOT_FINISHED; - return SZ_OK; - } - */ - - { - res = MixCoder_Code(&p->decoder, - (p->outBuf ? NULL : dest), &destLen2, destFinish, - src, &srcLen2, srcFinished2, - finishMode2); - - *status = p->decoder.status; - XzCheck_Update(&p->check, (p->outBuf ? p->outBuf + p->outDataWritten : dest), destLen2); - if (!p->outBuf) - dest += destLen2; - p->outDataWritten += destLen2; - } - - (*srcLen) += srcLen2; - src += srcLen2; - p->packSize += srcLen2; - (*destLen) += destLen2; - p->unpackSize += destLen2; - - RINOK(res); - - if (*status != CODER_STATUS_FINISHED_WITH_MARK) - { - if (p->block.packSize == p->packSize - && *status == CODER_STATUS_NEEDS_MORE_INPUT) - { - PRF_STR("CODER_STATUS_NEEDS_MORE_INPUT"); - *status = CODER_STATUS_NOT_SPECIFIED; - return SZ_ERROR_DATA; - } - - return SZ_OK; - } - { - XzUnpacker_UpdateIndex(p, XzUnpacker_GetPackSizeForIndex(p), p->unpackSize); - p->state = XZ_STATE_BLOCK_FOOTER; - p->pos = 0; - p->alignPos = 0; - *status = CODER_STATUS_NOT_SPECIFIED; - - if ((p->block.packSize != (UInt64)(Int64)-1 && p->block.packSize != p->packSize) - || (p->block.unpackSize != (UInt64)(Int64)-1 && p->block.unpackSize != p->unpackSize)) - { - PRF_STR("ERROR: block.size mismatch"); - return SZ_ERROR_DATA; - } - } - // continue; - } - - srcRem = srcLenOrig - *srcLen; - - // XZ_STATE_BLOCK_FOOTER can transit to XZ_STATE_BLOCK_HEADER without input bytes - if (srcRem == 0 && p->state != XZ_STATE_BLOCK_FOOTER) - { - *status = CODER_STATUS_NEEDS_MORE_INPUT; - return SZ_OK; - } - - switch (p->state) - { - case XZ_STATE_STREAM_HEADER: - { - if (p->pos < XZ_STREAM_HEADER_SIZE) - { - if (p->pos < XZ_SIG_SIZE && *src != XZ_SIG[p->pos]) - return SZ_ERROR_NO_ARCHIVE; - if (p->decodeToStreamSignature) - return SZ_OK; - p->buf[p->pos++] = *src++; - (*srcLen)++; - } - else - { - RINOK(Xz_ParseHeader(&p->streamFlags, p->buf)); - p->numStartedStreams++; - p->indexSize = 0; - p->numBlocks = 0; - Sha256_Init(&p->sha); - p->state = XZ_STATE_BLOCK_HEADER; - p->pos = 0; - } - break; - } - - case XZ_STATE_BLOCK_HEADER: - { - if (p->pos == 0) - { - p->buf[p->pos++] = *src++; - (*srcLen)++; - if (p->buf[0] == 0) - { - if (p->decodeOnlyOneBlock) - return SZ_ERROR_DATA; - p->indexPreSize = 1 + Xz_WriteVarInt(p->buf + 1, p->numBlocks); - p->indexPos = p->indexPreSize; - p->indexSize += p->indexPreSize; - Sha256_Final(&p->sha, p->shaDigest); - Sha256_Init(&p->sha); - p->crc = CrcUpdate(CRC_INIT_VAL, p->buf, p->indexPreSize); - p->state = XZ_STATE_STREAM_INDEX; - break; - } - p->blockHeaderSize = ((UInt32)p->buf[0] << 2) + 4; - break; - } - - if (p->pos != p->blockHeaderSize) - { - UInt32 cur = p->blockHeaderSize - p->pos; - if (cur > srcRem) - cur = (UInt32)srcRem; - memcpy(p->buf + p->pos, src, cur); - p->pos += cur; - (*srcLen) += cur; - src += cur; - } - else - { - RINOK(XzBlock_Parse(&p->block, p->buf)); - if (!XzBlock_AreSupportedFilters(&p->block)) - return SZ_ERROR_UNSUPPORTED; - p->numTotalBlocks++; - p->state = XZ_STATE_BLOCK; - p->packSize = 0; - p->unpackSize = 0; - XzCheck_Init(&p->check, XzFlags_GetCheckType(p->streamFlags)); - if (p->parseMode) - { - p->headerParsedOk = True; - return SZ_OK; - } - RINOK(XzDecMix_Init(&p->decoder, &p->block, p->outBuf, p->outBufSize)); - } - break; - } - - case XZ_STATE_BLOCK_FOOTER: - { - if ((((unsigned)p->packSize + p->alignPos) & 3) != 0) - { - if (srcRem == 0) - { - *status = CODER_STATUS_NEEDS_MORE_INPUT; - return SZ_OK; - } - (*srcLen)++; - p->alignPos++; - if (*src++ != 0) - return SZ_ERROR_CRC; - } - else - { - UInt32 checkSize = XzFlags_GetCheckSize(p->streamFlags); - UInt32 cur = checkSize - p->pos; - if (cur != 0) - { - if (srcRem == 0) - { - *status = CODER_STATUS_NEEDS_MORE_INPUT; - return SZ_OK; - } - if (cur > srcRem) - cur = (UInt32)srcRem; - memcpy(p->buf + p->pos, src, cur); - p->pos += cur; - (*srcLen) += cur; - src += cur; - if (checkSize != p->pos) - break; - } - { - Byte digest[XZ_CHECK_SIZE_MAX]; - p->state = XZ_STATE_BLOCK_HEADER; - p->pos = 0; - if (XzCheck_Final(&p->check, digest) && memcmp(digest, p->buf, checkSize) != 0) - return SZ_ERROR_CRC; - if (p->decodeOnlyOneBlock) - { - *status = CODER_STATUS_FINISHED_WITH_MARK; - return SZ_OK; - } - } - } - break; - } - - case XZ_STATE_STREAM_INDEX: - { - if (p->pos < p->indexPreSize) - { - (*srcLen)++; - if (*src++ != p->buf[p->pos++]) - return SZ_ERROR_CRC; - } - else - { - if (p->indexPos < p->indexSize) - { - UInt64 cur = p->indexSize - p->indexPos; - if (srcRem > cur) - srcRem = (SizeT)cur; - p->crc = CrcUpdate(p->crc, src, srcRem); - Sha256_Update(&p->sha, src, srcRem); - (*srcLen) += srcRem; - src += srcRem; - p->indexPos += srcRem; - } - else if ((p->indexPos & 3) != 0) - { - Byte b = *src++; - p->crc = CRC_UPDATE_BYTE(p->crc, b); - (*srcLen)++; - p->indexPos++; - p->indexSize++; - if (b != 0) - return SZ_ERROR_CRC; - } - else - { - Byte digest[SHA256_DIGEST_SIZE]; - p->state = XZ_STATE_STREAM_INDEX_CRC; - p->indexSize += 4; - p->pos = 0; - Sha256_Final(&p->sha, digest); - if (memcmp(digest, p->shaDigest, SHA256_DIGEST_SIZE) != 0) - return SZ_ERROR_CRC; - } - } - break; - } - - case XZ_STATE_STREAM_INDEX_CRC: - { - if (p->pos < 4) - { - (*srcLen)++; - p->buf[p->pos++] = *src++; - } - else - { - p->state = XZ_STATE_STREAM_FOOTER; - p->pos = 0; - if (CRC_GET_DIGEST(p->crc) != GetUi32(p->buf)) - return SZ_ERROR_CRC; - } - break; - } - - case XZ_STATE_STREAM_FOOTER: - { - UInt32 cur = XZ_STREAM_FOOTER_SIZE - p->pos; - if (cur > srcRem) - cur = (UInt32)srcRem; - memcpy(p->buf + p->pos, src, cur); - p->pos += cur; - (*srcLen) += cur; - src += cur; - if (p->pos == XZ_STREAM_FOOTER_SIZE) - { - p->state = XZ_STATE_STREAM_PADDING; - p->numFinishedStreams++; - p->padSize = 0; - if (!Xz_CheckFooter(p->streamFlags, p->indexSize, p->buf)) - return SZ_ERROR_CRC; - } - break; - } - - case XZ_STATE_STREAM_PADDING: - { - if (*src != 0) - { - if (((UInt32)p->padSize & 3) != 0) - return SZ_ERROR_NO_ARCHIVE; - p->pos = 0; - p->state = XZ_STATE_STREAM_HEADER; - } - else - { - (*srcLen)++; - src++; - p->padSize++; - } - break; - } - - case XZ_STATE_BLOCK: break; /* to disable GCC warning */ - } - } - /* - if (p->state == XZ_STATE_FINISHED) - *status = CODER_STATUS_FINISHED_WITH_MARK; - return SZ_OK; - */ -} - - -SRes XzUnpacker_CodeFull(CXzUnpacker *p, Byte *dest, SizeT *destLen, - const Byte *src, SizeT *srcLen, - ECoderFinishMode finishMode, ECoderStatus *status) -{ - XzUnpacker_Init(p); - XzUnpacker_SetOutBuf(p, dest, *destLen); - - return XzUnpacker_Code(p, - NULL, destLen, - src, srcLen, True, - finishMode, status); -} - - -BoolInt XzUnpacker_IsBlockFinished(const CXzUnpacker *p) -{ - return (p->state == XZ_STATE_BLOCK_HEADER) && (p->pos == 0); -} - -BoolInt XzUnpacker_IsStreamWasFinished(const CXzUnpacker *p) -{ - return (p->state == XZ_STATE_STREAM_PADDING) && (((UInt32)p->padSize & 3) == 0); -} - -UInt64 XzUnpacker_GetExtraSize(const CXzUnpacker *p) -{ - UInt64 num = 0; - if (p->state == XZ_STATE_STREAM_PADDING) - num = p->padSize; - else if (p->state == XZ_STATE_STREAM_HEADER) - num = p->padSize + p->pos; - return num; -} - - - - - - - - - - - - - - - - - - - - - -#ifndef _7ZIP_ST -#include "MtDec.h" -#endif - - -void XzDecMtProps_Init(CXzDecMtProps *p) -{ - p->inBufSize_ST = 1 << 18; - p->outStep_ST = 1 << 20; - p->ignoreErrors = False; - - #ifndef _7ZIP_ST - p->numThreads = 1; - p->inBufSize_MT = 1 << 18; - p->memUseMax = sizeof(size_t) << 28; - #endif -} - - - -#ifndef _7ZIP_ST - -/* ---------- CXzDecMtThread ---------- */ - -typedef struct -{ - Byte *outBuf; - size_t outBufSize; - size_t outPreSize; - size_t inPreSize; - size_t inPreHeaderSize; - size_t blockPackSize_for_Index; // including block header and checksum. - size_t blockPackTotal; // including stream header, block header and checksum. - size_t inCodeSize; - size_t outCodeSize; - ECoderStatus status; - SRes codeRes; - BoolInt skipMode; - // BoolInt finishedWithMark; - EMtDecParseState parseState; - BoolInt parsing_Truncated; - BoolInt atBlockHeader; - CXzStreamFlags streamFlags; - // UInt64 numFinishedStreams - UInt64 numStreams; - UInt64 numTotalBlocks; - UInt64 numBlocks; - - BoolInt dec_created; - CXzUnpacker dec; - - Byte mtPad[1 << 7]; -} CXzDecMtThread; - -#endif - - -/* ---------- CXzDecMt ---------- */ - -typedef struct -{ - CAlignOffsetAlloc alignOffsetAlloc; - ISzAllocPtr allocMid; - - CXzDecMtProps props; - size_t unpackBlockMaxSize; - - ISeqInStream *inStream; - ISeqOutStream *outStream; - ICompressProgress *progress; - // CXzStatInfo *stat; - - BoolInt finishMode; - BoolInt outSize_Defined; - UInt64 outSize; - - UInt64 outProcessed; - UInt64 inProcessed; - UInt64 readProcessed; - BoolInt readWasFinished; - SRes readRes; - SRes writeRes; - - Byte *outBuf; - size_t outBufSize; - Byte *inBuf; - size_t inBufSize; - - CXzUnpacker dec; - - ECoderStatus status; - SRes codeRes; - - #ifndef _7ZIP_ST - BoolInt mainDecoderWasCalled; - // int statErrorDefined; - int finishedDecoderIndex; - - // global values that are used in Parse stage - CXzStreamFlags streamFlags; - // UInt64 numFinishedStreams - UInt64 numStreams; - UInt64 numTotalBlocks; - UInt64 numBlocks; - - // UInt64 numBadBlocks; - SRes mainErrorCode; - - BoolInt isBlockHeaderState_Parse; - BoolInt isBlockHeaderState_Write; - UInt64 outProcessed_Parse; - BoolInt parsing_Truncated; - - BoolInt mtc_WasConstructed; - CMtDec mtc; - CXzDecMtThread coders[MTDEC__THREADS_MAX]; - #endif - -} CXzDecMt; - - - -CXzDecMtHandle XzDecMt_Create(ISzAllocPtr alloc, ISzAllocPtr allocMid) -{ - CXzDecMt *p = (CXzDecMt *)ISzAlloc_Alloc(alloc, sizeof(CXzDecMt)); - if (!p) - return NULL; - - AlignOffsetAlloc_CreateVTable(&p->alignOffsetAlloc); - p->alignOffsetAlloc.baseAlloc = alloc; - p->alignOffsetAlloc.numAlignBits = 7; - p->alignOffsetAlloc.offset = 0; - - p->allocMid = allocMid; - - p->outBuf = NULL; - p->outBufSize = 0; - p->inBuf = NULL; - p->inBufSize = 0; - - XzUnpacker_Construct(&p->dec, &p->alignOffsetAlloc.vt); - - p->unpackBlockMaxSize = 0; - - XzDecMtProps_Init(&p->props); - - #ifndef _7ZIP_ST - p->mtc_WasConstructed = False; - { - unsigned i; - for (i = 0; i < MTDEC__THREADS_MAX; i++) - { - CXzDecMtThread *coder = &p->coders[i]; - coder->dec_created = False; - coder->outBuf = NULL; - coder->outBufSize = 0; - } - } - #endif - - return p; -} - - -#ifndef _7ZIP_ST - -static void XzDecMt_FreeOutBufs(CXzDecMt *p) -{ - unsigned i; - for (i = 0; i < MTDEC__THREADS_MAX; i++) - { - CXzDecMtThread *coder = &p->coders[i]; - if (coder->outBuf) - { - ISzAlloc_Free(p->allocMid, coder->outBuf); - coder->outBuf = NULL; - coder->outBufSize = 0; - } - } - p->unpackBlockMaxSize = 0; -} - -#endif - - - -static void XzDecMt_FreeSt(CXzDecMt *p) -{ - XzUnpacker_Free(&p->dec); - - if (p->outBuf) - { - ISzAlloc_Free(p->allocMid, p->outBuf); - p->outBuf = NULL; - } - p->outBufSize = 0; - - if (p->inBuf) - { - ISzAlloc_Free(p->allocMid, p->inBuf); - p->inBuf = NULL; - } - p->inBufSize = 0; -} - - -void XzDecMt_Destroy(CXzDecMtHandle pp) -{ - CXzDecMt *p = (CXzDecMt *)pp; - - XzDecMt_FreeSt(p); - - #ifndef _7ZIP_ST - - if (p->mtc_WasConstructed) - { - MtDec_Destruct(&p->mtc); - p->mtc_WasConstructed = False; - } - { - unsigned i; - for (i = 0; i < MTDEC__THREADS_MAX; i++) - { - CXzDecMtThread *t = &p->coders[i]; - if (t->dec_created) - { - // we don't need to free dict here - XzUnpacker_Free(&t->dec); - t->dec_created = False; - } - } - } - XzDecMt_FreeOutBufs(p); - - #endif - - ISzAlloc_Free(p->alignOffsetAlloc.baseAlloc, pp); -} - - - -#ifndef _7ZIP_ST - -static void XzDecMt_Callback_Parse(void *obj, unsigned coderIndex, CMtDecCallbackInfo *cc) -{ - CXzDecMt *me = (CXzDecMt *)obj; - CXzDecMtThread *coder = &me->coders[coderIndex]; - size_t srcSize = cc->srcSize; - - cc->srcSize = 0; - cc->outPos = 0; - cc->state = MTDEC_PARSE_CONTINUE; - - cc->canCreateNewThread = True; - - if (cc->startCall) - { - coder->outPreSize = 0; - coder->inPreSize = 0; - coder->inPreHeaderSize = 0; - coder->parseState = MTDEC_PARSE_CONTINUE; - coder->parsing_Truncated = False; - coder->skipMode = False; - coder->codeRes = SZ_OK; - coder->status = CODER_STATUS_NOT_SPECIFIED; - coder->inCodeSize = 0; - coder->outCodeSize = 0; - - coder->numStreams = me->numStreams; - coder->numTotalBlocks = me->numTotalBlocks; - coder->numBlocks = me->numBlocks; - - if (!coder->dec_created) - { - XzUnpacker_Construct(&coder->dec, &me->alignOffsetAlloc.vt); - coder->dec_created = True; - } - - XzUnpacker_Init(&coder->dec); - - if (me->isBlockHeaderState_Parse) - { - coder->dec.streamFlags = me->streamFlags; - coder->atBlockHeader = True; - XzUnpacker_PrepareToRandomBlockDecoding(&coder->dec); - } - else - { - coder->atBlockHeader = False; - me->isBlockHeaderState_Parse = True; - } - - coder->dec.numStartedStreams = me->numStreams; - coder->dec.numTotalBlocks = me->numTotalBlocks; - coder->dec.numBlocks = me->numBlocks; - } - - while (!coder->skipMode) - { - ECoderStatus status; - SRes res; - size_t srcSize2 = srcSize; - size_t destSize = (size_t)0 - 1; - - coder->dec.parseMode = True; - coder->dec.headerParsedOk = False; - - PRF_STR_INT("Parse", srcSize2); - - res = XzUnpacker_Code(&coder->dec, - NULL, &destSize, - cc->src, &srcSize2, cc->srcFinished, - CODER_FINISH_END, &status); - - // PRF(printf(" res = %d, srcSize2 = %d", res, (unsigned)srcSize2)); - - coder->codeRes = res; - coder->status = status; - cc->srcSize += srcSize2; - srcSize -= srcSize2; - coder->inPreHeaderSize += srcSize2; - coder->inPreSize = coder->inPreHeaderSize; - - if (res != SZ_OK) - { - cc->state = - coder->parseState = MTDEC_PARSE_END; - /* - if (res == SZ_ERROR_MEM) - return res; - return SZ_OK; - */ - return; // res; - } - - if (coder->dec.headerParsedOk) - { - const CXzBlock *block = &coder->dec.block; - if (XzBlock_HasUnpackSize(block) - // && block->unpackSize <= me->props.outBlockMax - && XzBlock_HasPackSize(block)) - { - { - if (block->unpackSize * 2 * me->mtc.numStartedThreads > me->props.memUseMax) - { - cc->state = MTDEC_PARSE_OVERFLOW; - return; // SZ_OK; - } - } - { - UInt64 packSize = block->packSize; - UInt64 packSizeAligned = packSize + ((0 - (unsigned)packSize) & 3); - UInt32 checkSize = XzFlags_GetCheckSize(coder->dec.streamFlags); - UInt64 blockPackSum = coder->inPreSize + packSizeAligned + checkSize; - // if (blockPackSum <= me->props.inBlockMax) - // unpackBlockMaxSize - { - coder->blockPackSize_for_Index = (size_t)(coder->dec.blockHeaderSize + packSize + checkSize); - coder->blockPackTotal = (size_t)blockPackSum; - coder->outPreSize = (size_t)block->unpackSize; - coder->streamFlags = coder->dec.streamFlags; - me->streamFlags = coder->dec.streamFlags; - coder->skipMode = True; - break; - } - } - } - } - else - // if (coder->inPreSize <= me->props.inBlockMax) - { - if (!cc->srcFinished) - return; // SZ_OK; - cc->state = - coder->parseState = MTDEC_PARSE_END; - return; // SZ_OK; - } - cc->state = MTDEC_PARSE_OVERFLOW; - return; // SZ_OK; - } - - // ---------- skipMode ---------- - { - UInt64 rem = coder->blockPackTotal - coder->inPreSize; - size_t cur = srcSize; - if (cur > rem) - cur = (size_t)rem; - cc->srcSize += cur; - coder->inPreSize += cur; - srcSize -= cur; - - if (coder->inPreSize == coder->blockPackTotal) - { - if (srcSize == 0) - { - if (!cc->srcFinished) - return; // SZ_OK; - cc->state = MTDEC_PARSE_END; - } - else if ((cc->src)[cc->srcSize] == 0) // we check control byte of next block - cc->state = MTDEC_PARSE_END; - else - { - cc->state = MTDEC_PARSE_NEW; - - { - size_t blockMax = me->unpackBlockMaxSize; - if (blockMax < coder->outPreSize) - blockMax = coder->outPreSize; - { - UInt64 required = (UInt64)blockMax * (me->mtc.numStartedThreads + 1) * 2; - if (me->props.memUseMax < required) - cc->canCreateNewThread = False; - } - } - - if (me->outSize_Defined) - { - // next block can be zero size - const UInt64 rem2 = me->outSize - me->outProcessed_Parse; - if (rem2 < coder->outPreSize) - { - coder->parsing_Truncated = True; - cc->state = MTDEC_PARSE_END; - } - me->outProcessed_Parse += coder->outPreSize; - } - } - } - else if (cc->srcFinished) - cc->state = MTDEC_PARSE_END; - else - return; // SZ_OK; - - coder->parseState = cc->state; - cc->outPos = coder->outPreSize; - - me->numStreams = coder->dec.numStartedStreams; - me->numTotalBlocks = coder->dec.numTotalBlocks; - me->numBlocks = coder->dec.numBlocks + 1; - return; // SZ_OK; - } -} - - -static SRes XzDecMt_Callback_PreCode(void *pp, unsigned coderIndex) -{ - CXzDecMt *me = (CXzDecMt *)pp; - CXzDecMtThread *coder = &me->coders[coderIndex]; - Byte *dest; - - if (!coder->dec.headerParsedOk) - return SZ_OK; - - dest = coder->outBuf; - - if (!dest || coder->outBufSize < coder->outPreSize) - { - if (dest) - { - ISzAlloc_Free(me->allocMid, dest); - coder->outBuf = NULL; - coder->outBufSize = 0; - } - { - size_t outPreSize = coder->outPreSize; - if (outPreSize == 0) - outPreSize = 1; - dest = (Byte *)ISzAlloc_Alloc(me->allocMid, outPreSize); - } - if (!dest) - return SZ_ERROR_MEM; - coder->outBuf = dest; - coder->outBufSize = coder->outPreSize; - - if (coder->outBufSize > me->unpackBlockMaxSize) - me->unpackBlockMaxSize = coder->outBufSize; - } - - // return SZ_ERROR_MEM; - - XzUnpacker_SetOutBuf(&coder->dec, coder->outBuf, coder->outBufSize); - - { - SRes res = XzDecMix_Init(&coder->dec.decoder, &coder->dec.block, coder->outBuf, coder->outBufSize); - // res = SZ_ERROR_UNSUPPORTED; // to test - coder->codeRes = res; - if (res != SZ_OK) - { - // if (res == SZ_ERROR_MEM) return res; - if (me->props.ignoreErrors && res != SZ_ERROR_MEM) - return S_OK; - return res; - } - } - - return SZ_OK; -} - - -static SRes XzDecMt_Callback_Code(void *pp, unsigned coderIndex, - const Byte *src, size_t srcSize, int srcFinished, - // int finished, int blockFinished, - UInt64 *inCodePos, UInt64 *outCodePos, int *stop) -{ - CXzDecMt *me = (CXzDecMt *)pp; - CXzDecMtThread *coder = &me->coders[coderIndex]; - - *inCodePos = coder->inCodeSize; - *outCodePos = coder->outCodeSize; - *stop = True; - - if (coder->inCodeSize < coder->inPreHeaderSize) - { - UInt64 rem = coder->inPreHeaderSize - coder->inCodeSize; - size_t step = srcSize; - if (step > rem) - step = (size_t)rem; - src += step; - srcSize -= step; - coder->inCodeSize += step; - if (coder->inCodeSize < coder->inPreHeaderSize) - { - *stop = False; - return SZ_OK; - } - } - - if (!coder->dec.headerParsedOk) - return SZ_OK; - if (!coder->outBuf) - return SZ_OK; - - if (coder->codeRes == SZ_OK) - { - ECoderStatus status; - SRes res; - size_t srcProcessed = srcSize; - size_t outSizeCur = coder->outPreSize - coder->dec.outDataWritten; - - // PRF(printf("\nCallback_Code: Code %d %d\n", (unsigned)srcSize, (unsigned)outSizeCur)); - - res = XzUnpacker_Code(&coder->dec, - NULL, &outSizeCur, - src, &srcProcessed, srcFinished, - // coder->finishedWithMark ? CODER_FINISH_END : CODER_FINISH_ANY, - CODER_FINISH_END, - &status); - - // PRF(printf(" res = %d, srcSize2 = %d, outSizeCur = %d", res, (unsigned)srcProcessed, (unsigned)outSizeCur)); - - coder->codeRes = res; - coder->status = status; - coder->inCodeSize += srcProcessed; - coder->outCodeSize = coder->dec.outDataWritten; - *inCodePos = coder->inCodeSize; - *outCodePos = coder->outCodeSize; - - if (res == SZ_OK) - { - if (srcProcessed == srcSize) - *stop = False; - return SZ_OK; - } - } - - if (me->props.ignoreErrors && coder->codeRes != SZ_ERROR_MEM) - { - *inCodePos = coder->inPreSize; - *outCodePos = coder->outPreSize; - return S_OK; - } - return coder->codeRes; -} - - -#define XZDECMT_STREAM_WRITE_STEP (1 << 24) - -static SRes XzDecMt_Callback_Write(void *pp, unsigned coderIndex, - BoolInt needWriteToStream, - const Byte *src, size_t srcSize, - // int srcFinished, - BoolInt *needContinue, - BoolInt *canRecode) -{ - CXzDecMt *me = (CXzDecMt *)pp; - const CXzDecMtThread *coder = &me->coders[coderIndex]; - - // PRF(printf("\nWrite processed = %d srcSize = %d\n", (unsigned)me->mtc.inProcessed, (unsigned)srcSize)); - - *needContinue = False; - *canRecode = True; - - if (!needWriteToStream) - return SZ_OK; - - if (!coder->dec.headerParsedOk || !coder->outBuf) - { - if (me->finishedDecoderIndex < 0) - me->finishedDecoderIndex = coderIndex; - return SZ_OK; - } - - if (me->finishedDecoderIndex >= 0) - return SZ_OK; - - me->mtc.inProcessed += coder->inCodeSize; - - *canRecode = False; - - { - SRes res; - size_t size = coder->outCodeSize; - Byte *data = coder->outBuf; - - // we use in me->dec: sha, numBlocks, indexSize - - if (!me->isBlockHeaderState_Write) - { - XzUnpacker_PrepareToRandomBlockDecoding(&me->dec); - me->dec.decodeOnlyOneBlock = False; - me->dec.numStartedStreams = coder->dec.numStartedStreams; - me->dec.streamFlags = coder->streamFlags; - - me->isBlockHeaderState_Write = True; - } - - me->dec.numTotalBlocks = coder->dec.numTotalBlocks; - XzUnpacker_UpdateIndex(&me->dec, coder->blockPackSize_for_Index, coder->outPreSize); - - if (coder->outPreSize != size) - { - if (me->props.ignoreErrors) - { - memset(data + size, 0, coder->outPreSize - size); - size = coder->outPreSize; - } - // me->numBadBlocks++; - if (me->mainErrorCode == SZ_OK) - { - if ((int)coder->status == LZMA_STATUS_NEEDS_MORE_INPUT) - me->mainErrorCode = SZ_ERROR_INPUT_EOF; - else - me->mainErrorCode = SZ_ERROR_DATA; - } - } - - if (me->writeRes != SZ_OK) - return me->writeRes; - - res = SZ_OK; - { - if (me->outSize_Defined) - { - const UInt64 rem = me->outSize - me->outProcessed; - if (size > rem) - size = (SizeT)rem; - } - - for (;;) - { - size_t cur = size; - size_t written; - if (cur > XZDECMT_STREAM_WRITE_STEP) - cur = XZDECMT_STREAM_WRITE_STEP; - - written = ISeqOutStream_Write(me->outStream, data, cur); - - // PRF(printf("\nWritten ask = %d written = %d\n", (unsigned)cur, (unsigned)written)); - - me->outProcessed += written; - if (written != cur) - { - me->writeRes = SZ_ERROR_WRITE; - res = me->writeRes; - break; - } - data += cur; - size -= cur; - // PRF_STR_INT("Written size =", size); - if (size == 0) - break; - res = MtProgress_ProgressAdd(&me->mtc.mtProgress, 0, 0); - if (res != SZ_OK) - break; - } - } - - if (coder->codeRes != SZ_OK) - if (!me->props.ignoreErrors) - { - me->finishedDecoderIndex = coderIndex; - return res; - } - - RINOK(res); - - if (coder->inPreSize != coder->inCodeSize - || coder->blockPackTotal != coder->inCodeSize) - { - me->finishedDecoderIndex = coderIndex; - return SZ_OK; - } - - if (coder->parseState != MTDEC_PARSE_END) - { - *needContinue = True; - return SZ_OK; - } - } - - // (coder->state == MTDEC_PARSE_END) means that there are no other working threads - // so we can use mtc variables without lock - - PRF_STR_INT("Write MTDEC_PARSE_END", me->mtc.inProcessed); - - me->mtc.mtProgress.totalInSize = me->mtc.inProcessed; - { - CXzUnpacker *dec = &me->dec; - - PRF_STR_INT("PostSingle", srcSize); - - { - size_t srcProcessed = srcSize; - ECoderStatus status; - size_t outSizeCur = 0; - SRes res; - - // dec->decodeOnlyOneBlock = False; - dec->decodeToStreamSignature = True; - - me->mainDecoderWasCalled = True; - - if (coder->parsing_Truncated) - { - me->parsing_Truncated = True; - return SZ_OK; - } - - res = XzUnpacker_Code(dec, - NULL, &outSizeCur, - src, &srcProcessed, - me->mtc.readWasFinished, // srcFinished - CODER_FINISH_END, // CODER_FINISH_ANY, - &status); - - me->status = status; - me->codeRes = res; - - me->mtc.inProcessed += srcProcessed; - me->mtc.mtProgress.totalInSize = me->mtc.inProcessed; - - if (res != SZ_OK) - { - return S_OK; - // return res; - } - - if (dec->state == XZ_STATE_STREAM_HEADER) - { - *needContinue = True; - me->isBlockHeaderState_Parse = False; - me->isBlockHeaderState_Write = False; - { - Byte *crossBuf = MtDec_GetCrossBuff(&me->mtc); - if (!crossBuf) - return SZ_ERROR_MEM; - memcpy(crossBuf, src + srcProcessed, srcSize - srcProcessed); - } - me->mtc.crossStart = 0; - me->mtc.crossEnd = srcSize - srcProcessed; - return SZ_OK; - } - - if (status != CODER_STATUS_NEEDS_MORE_INPUT) - { - return E_FAIL; - } - - if (me->mtc.readWasFinished) - { - return SZ_OK; - } - } - - { - size_t inPos; - size_t inLim; - const Byte *inData; - UInt64 inProgressPrev = me->mtc.inProcessed; - - // XzDecMt_Prepare_InBuf_ST(p); - Byte *crossBuf = MtDec_GetCrossBuff(&me->mtc); - if (!crossBuf) - return SZ_ERROR_MEM; - - inPos = 0; - inLim = 0; - // outProcessed = 0; - - inData = crossBuf; - - for (;;) - { - SizeT inProcessed; - SizeT outProcessed; - ECoderStatus status; - SRes res; - - if (inPos == inLim) - { - if (!me->mtc.readWasFinished) - { - inPos = 0; - inLim = me->mtc.inBufSize; - me->mtc.readRes = ISeqInStream_Read(me->inStream, (void *)inData, &inLim); - me->mtc.readProcessed += inLim; - if (inLim == 0 || me->mtc.readRes != SZ_OK) - me->mtc.readWasFinished = True; - } - } - - inProcessed = inLim - inPos; - outProcessed = 0; - - res = XzUnpacker_Code(dec, - NULL, &outProcessed, - inData + inPos, &inProcessed, - (inProcessed == 0), // srcFinished - CODER_FINISH_END, &status); - - me->codeRes = res; - me->status = status; - inPos += inProcessed; - me->mtc.inProcessed += inProcessed; - me->mtc.mtProgress.totalInSize = me->mtc.inProcessed; - - if (res != SZ_OK) - { - return S_OK; - // return res; - } - - if (dec->state == XZ_STATE_STREAM_HEADER) - { - *needContinue = True; - me->mtc.crossStart = inPos; - me->mtc.crossEnd = inLim; - me->isBlockHeaderState_Parse = False; - me->isBlockHeaderState_Write = False; - return SZ_OK; - } - - if (status != CODER_STATUS_NEEDS_MORE_INPUT) - return E_FAIL; - - if (me->mtc.progress) - { - UInt64 inDelta = me->mtc.inProcessed - inProgressPrev; - if (inDelta >= (1 << 22)) - { - RINOK(MtProgress_Progress_ST(&me->mtc.mtProgress)); - inProgressPrev = me->mtc.inProcessed; - } - } - if (me->mtc.readWasFinished) - return SZ_OK; - } - } - } -} - - -#endif - - - -void XzStatInfo_Clear(CXzStatInfo *p) -{ - p->InSize = 0; - p->OutSize = 0; - - p->NumStreams = 0; - p->NumBlocks = 0; - - p->UnpackSize_Defined = False; - - p->NumStreams_Defined = False; - p->NumBlocks_Defined = False; - - // p->IsArc = False; - // p->UnexpectedEnd = False; - // p->Unsupported = False; - // p->HeadersError = False; - // p->DataError = False; - // p->CrcError = False; - - p->DataAfterEnd = False; - p->DecodingTruncated = False; - - p->DecodeRes = SZ_OK; - p->ReadRes = SZ_OK; - p->ProgressRes = SZ_OK; - - p->CombinedRes = SZ_OK; - p->CombinedRes_Type = SZ_OK; -} - - - - -static SRes XzDecMt_Decode_ST(CXzDecMt *p - #ifndef _7ZIP_ST - , BoolInt tMode - #endif - , CXzStatInfo *stat) -{ - size_t outPos; - size_t inPos, inLim; - const Byte *inData; - UInt64 inPrev, outPrev; - - CXzUnpacker *dec; - - #ifndef _7ZIP_ST - if (tMode) - { - XzDecMt_FreeOutBufs(p); - tMode = MtDec_PrepareRead(&p->mtc); - } - #endif - - if (!p->outBuf || p->outBufSize != p->props.outStep_ST) - { - ISzAlloc_Free(p->allocMid, p->outBuf); - p->outBufSize = 0; - p->outBuf = (Byte *)ISzAlloc_Alloc(p->allocMid, p->props.outStep_ST); - if (!p->outBuf) - return SZ_ERROR_MEM; - p->outBufSize = p->props.outStep_ST; - } - - if (!p->inBuf || p->inBufSize != p->props.inBufSize_ST) - { - ISzAlloc_Free(p->allocMid, p->inBuf); - p->inBufSize = 0; - p->inBuf = (Byte *)ISzAlloc_Alloc(p->allocMid, p->props.inBufSize_ST); - if (!p->inBuf) - return SZ_ERROR_MEM; - p->inBufSize = p->props.inBufSize_ST; - } - - dec = &p->dec; - dec->decodeToStreamSignature = False; - // dec->decodeOnlyOneBlock = False; - - XzUnpacker_SetOutBuf(dec, NULL, 0); - - inPrev = p->inProcessed; - outPrev = p->outProcessed; - - inPos = 0; - inLim = 0; - inData = NULL; - outPos = 0; - - for (;;) - { - SizeT outSize; - BoolInt finished; - ECoderFinishMode finishMode; - SizeT inProcessed; - ECoderStatus status; - SRes res; - - SizeT outProcessed; - - - - if (inPos == inLim) - { - #ifndef _7ZIP_ST - if (tMode) - { - inData = MtDec_Read(&p->mtc, &inLim); - inPos = 0; - if (inData) - continue; - tMode = False; - inLim = 0; - } - #endif - - if (!p->readWasFinished) - { - inPos = 0; - inLim = p->inBufSize; - inData = p->inBuf; - p->readRes = ISeqInStream_Read(p->inStream, (void *)inData, &inLim); - p->readProcessed += inLim; - if (inLim == 0 || p->readRes != SZ_OK) - p->readWasFinished = True; - } - } - - outSize = p->props.outStep_ST - outPos; - - finishMode = CODER_FINISH_ANY; - if (p->outSize_Defined) - { - const UInt64 rem = p->outSize - p->outProcessed; - if (outSize >= rem) - { - outSize = (SizeT)rem; - if (p->finishMode) - finishMode = CODER_FINISH_END; - } - } - - inProcessed = inLim - inPos; - outProcessed = outSize; - - res = XzUnpacker_Code(dec, p->outBuf + outPos, &outProcessed, - inData + inPos, &inProcessed, - (inPos == inLim), // srcFinished - finishMode, &status); - - p->codeRes = res; - p->status = status; - - inPos += inProcessed; - outPos += outProcessed; - p->inProcessed += inProcessed; - p->outProcessed += outProcessed; - - finished = ((inProcessed == 0 && outProcessed == 0) || res != SZ_OK); - - if (finished || outProcessed >= outSize) - if (outPos != 0) - { - size_t written = ISeqOutStream_Write(p->outStream, p->outBuf, outPos); - p->outProcessed += written; - if (written != outPos) - { - stat->CombinedRes_Type = SZ_ERROR_WRITE; - return SZ_ERROR_WRITE; - } - outPos = 0; - } - - if (p->progress && res == SZ_OK) - { - UInt64 inDelta = p->inProcessed - inPrev; - UInt64 outDelta = p->outProcessed - outPrev; - if (inDelta >= (1 << 22) || outDelta >= (1 << 22)) - { - res = ICompressProgress_Progress(p->progress, p->inProcessed, p->outProcessed); - if (res != SZ_OK) - { - stat->CombinedRes_Type = SZ_ERROR_PROGRESS; - stat->ProgressRes = res; - return res; - } - inPrev = p->inProcessed; - outPrev = p->outProcessed; - } - } - - if (finished) - return res; - } -} - -static SRes XzStatInfo_SetStat(const CXzUnpacker *dec, - int finishMode, - UInt64 readProcessed, UInt64 inProcessed, - SRes res, ECoderStatus status, - BoolInt decodingTruncated, - CXzStatInfo *stat) -{ - UInt64 extraSize; - - stat->DecodingTruncated = (Byte)(decodingTruncated ? 1 : 0); - stat->InSize = inProcessed; - stat->NumStreams = dec->numStartedStreams; - stat->NumBlocks = dec->numTotalBlocks; - - stat->UnpackSize_Defined = True; - stat->NumStreams_Defined = True; - stat->NumBlocks_Defined = True; - - extraSize = XzUnpacker_GetExtraSize(dec); - - if (res == SZ_OK) - { - if (status == CODER_STATUS_NEEDS_MORE_INPUT) - { - // CODER_STATUS_NEEDS_MORE_INPUT is expected status for correct xz streams - extraSize = 0; - if (!XzUnpacker_IsStreamWasFinished(dec)) - res = SZ_ERROR_INPUT_EOF; - } - else if (!decodingTruncated || finishMode) // (status == CODER_STATUS_NOT_FINISHED) - res = SZ_ERROR_DATA; - } - else if (res == SZ_ERROR_NO_ARCHIVE) - { - /* - SZ_ERROR_NO_ARCHIVE is possible for 2 states: - XZ_STATE_STREAM_HEADER - if bad signature or bad CRC - XZ_STATE_STREAM_PADDING - if non-zero padding data - extraSize / inProcessed don't include "bad" byte - */ - if (inProcessed != extraSize) // if good streams before error - if (extraSize != 0 || readProcessed != inProcessed) - { - stat->DataAfterEnd = True; - // there is some good xz stream before. So we set SZ_OK - res = SZ_OK; - } - } - - stat->DecodeRes = res; - - stat->InSize -= extraSize; - return res; -} - - -SRes XzDecMt_Decode(CXzDecMtHandle pp, - const CXzDecMtProps *props, - const UInt64 *outDataSize, int finishMode, - ISeqOutStream *outStream, - // Byte *outBuf, size_t *outBufSize, - ISeqInStream *inStream, - // const Byte *inData, size_t inDataSize, - CXzStatInfo *stat, - int *isMT, - ICompressProgress *progress) -{ - CXzDecMt *p = (CXzDecMt *)pp; - #ifndef _7ZIP_ST - BoolInt tMode; - #endif - - XzStatInfo_Clear(stat); - - p->props = *props; - - p->inStream = inStream; - p->outStream = outStream; - p->progress = progress; - // p->stat = stat; - - p->outSize = 0; - p->outSize_Defined = False; - if (outDataSize) - { - p->outSize_Defined = True; - p->outSize = *outDataSize; - } - - p->finishMode = finishMode; - - // p->outSize = 457; p->outSize_Defined = True; p->finishMode = False; // for test - - p->writeRes = SZ_OK; - p->outProcessed = 0; - p->inProcessed = 0; - p->readProcessed = 0; - p->readWasFinished = False; - - p->codeRes = 0; - p->status = CODER_STATUS_NOT_SPECIFIED; - - XzUnpacker_Init(&p->dec); - - *isMT = False; - - /* - p->outBuf = NULL; - p->outBufSize = 0; - if (!outStream) - { - p->outBuf = outBuf; - p->outBufSize = *outBufSize; - *outBufSize = 0; - } - */ - - - #ifndef _7ZIP_ST - - p->isBlockHeaderState_Parse = False; - p->isBlockHeaderState_Write = False; - // p->numBadBlocks = 0; - p->mainErrorCode = SZ_OK; - p->mainDecoderWasCalled = False; - - tMode = False; - - if (p->props.numThreads > 1) - { - IMtDecCallback vt; - - // we just free ST buffers here - // but we still keep state variables, that was set in XzUnpacker_Init() - XzDecMt_FreeSt(p); - - p->outProcessed_Parse = 0; - p->parsing_Truncated = False; - - p->numStreams = 0; - p->numTotalBlocks = 0; - p->numBlocks = 0; - p->finishedDecoderIndex = -1; - - if (!p->mtc_WasConstructed) - { - p->mtc_WasConstructed = True; - MtDec_Construct(&p->mtc); - } - - p->mtc.mtCallback = &vt; - p->mtc.mtCallbackObject = p; - - p->mtc.progress = progress; - p->mtc.inStream = inStream; - p->mtc.alloc = &p->alignOffsetAlloc.vt; - // p->mtc.inData = inData; - // p->mtc.inDataSize = inDataSize; - p->mtc.inBufSize = p->props.inBufSize_MT; - // p->mtc.inBlockMax = p->props.inBlockMax; - p->mtc.numThreadsMax = p->props.numThreads; - - *isMT = True; - - vt.Parse = XzDecMt_Callback_Parse; - vt.PreCode = XzDecMt_Callback_PreCode; - vt.Code = XzDecMt_Callback_Code; - vt.Write = XzDecMt_Callback_Write; - - { - BoolInt needContinue; - - SRes res = MtDec_Code(&p->mtc); - - stat->InSize = p->mtc.inProcessed; - - p->inProcessed = p->mtc.inProcessed; - p->readRes = p->mtc.readRes; - p->readWasFinished = p->mtc.readWasFinished; - p->readProcessed = p->mtc.readProcessed; - - tMode = True; - needContinue = False; - - if (res == SZ_OK) - { - if (p->mtc.mtProgress.res != SZ_OK) - { - res = p->mtc.mtProgress.res; - stat->ProgressRes = res; - stat->CombinedRes_Type = SZ_ERROR_PROGRESS; - } - else - needContinue = p->mtc.needContinue; - } - - if (!needContinue) - { - SRes codeRes; - BoolInt truncated = False; - ECoderStatus status; - CXzUnpacker *dec; - - stat->OutSize = p->outProcessed; - - if (p->finishedDecoderIndex >= 0) - { - CXzDecMtThread *coder = &p->coders[(unsigned)p->finishedDecoderIndex]; - codeRes = coder->codeRes; - dec = &coder->dec; - status = coder->status; - } - else if (p->mainDecoderWasCalled) - { - codeRes = p->codeRes; - dec = &p->dec; - status = p->status; - truncated = p->parsing_Truncated; - } - else - return E_FAIL; - - XzStatInfo_SetStat(dec, p->finishMode, - p->mtc.readProcessed, p->mtc.inProcessed, - codeRes, status, - truncated, - stat); - - if (res == SZ_OK) - { - if (p->writeRes != SZ_OK) - { - res = p->writeRes; - stat->CombinedRes_Type = SZ_ERROR_WRITE; - } - else if (p->mtc.readRes != SZ_OK && p->mtc.inProcessed == p->mtc.readProcessed) - { - res = p->mtc.readRes; - stat->ReadRes = res; - stat->CombinedRes_Type = SZ_ERROR_READ; - } - else if (p->mainErrorCode != SZ_OK) - { - res = p->mainErrorCode; - } - } - - stat->CombinedRes = res; - if (stat->CombinedRes_Type == SZ_OK) - stat->CombinedRes_Type = res; - return res; - } - - PRF_STR("----- decoding ST -----"); - } - } - - #endif - - - *isMT = False; - - { - SRes res = XzDecMt_Decode_ST(p - #ifndef _7ZIP_ST - , tMode - #endif - , stat - ); - - XzStatInfo_SetStat(&p->dec, - p->finishMode, - p->readProcessed, p->inProcessed, - p->codeRes, p->status, - False, // truncated - stat); - - if (res == SZ_OK) - { - /* - if (p->writeRes != SZ_OK) - { - res = p->writeRes; - stat->CombinedRes_Type = SZ_ERROR_WRITE; - } - else - */ - if (p->readRes != SZ_OK && p->inProcessed == p->readProcessed) - { - res = p->readRes; - stat->ReadRes = res; - stat->CombinedRes_Type = SZ_ERROR_READ; - } - #ifndef _7ZIP_ST - else if (p->mainErrorCode != SZ_OK) - res = p->mainErrorCode; - #endif - } - - stat->CombinedRes = res; - if (stat->CombinedRes_Type == SZ_OK) - stat->CombinedRes_Type = res; - return res; - } -} diff --git a/code/ryzom/client/src/seven_zip/XzEnc.cpp b/code/ryzom/client/src/seven_zip/XzEnc.cpp deleted file mode 100644 index d0a8b4489..000000000 --- a/code/ryzom/client/src/seven_zip/XzEnc.cpp +++ /dev/null @@ -1,1329 +0,0 @@ -/* XzEnc.c -- Xz Encode -2019-02-02 : Igor Pavlov : Public domain */ - -#include "Precomp.h" - -#include -#include - -#include "7zCrc.h" -#include "Bra.h" -#include "CpuArch.h" - -#ifdef USE_SUBBLOCK -#include "Bcj3Enc.c" -#include "SbFind.c" -#include "SbEnc.c" -#endif - -#include "XzEnc.h" - -// #define _7ZIP_ST - -#ifndef _7ZIP_ST -#include "MtCoder.h" -#else -#define MTCODER__THREADS_MAX 1 -#define MTCODER__BLOCKS_MAX 1 -#endif - -#define XZ_GET_PAD_SIZE(dataSize) ((4 - ((unsigned)(dataSize) & 3)) & 3) - -/* max pack size for LZMA2 block + check-64bytrs: */ -#define XZ_GET_MAX_BLOCK_PACK_SIZE(unpackSize) ((unpackSize) + ((unpackSize) >> 10) + 16 + 64) - -#define XZ_GET_ESTIMATED_BLOCK_TOTAL_PACK_SIZE(unpackSize) (XZ_BLOCK_HEADER_SIZE_MAX + XZ_GET_MAX_BLOCK_PACK_SIZE(unpackSize)) - - -#define XzBlock_ClearFlags(p) (p)->flags = 0; -#define XzBlock_SetNumFilters(p, n) (p)->flags |= ((n) - 1); -#define XzBlock_SetHasPackSize(p) (p)->flags |= XZ_BF_PACK_SIZE; -#define XzBlock_SetHasUnpackSize(p) (p)->flags |= XZ_BF_UNPACK_SIZE; - - -static SRes WriteBytes(ISeqOutStream *s, const void *buf, size_t size) -{ - return (ISeqOutStream_Write(s, buf, size) == size) ? SZ_OK : SZ_ERROR_WRITE; -} - -static SRes WriteBytesUpdateCrc(ISeqOutStream *s, const void *buf, size_t size, UInt32 *crc) -{ - *crc = CrcUpdate(*crc, buf, size); - return WriteBytes(s, buf, size); -} - - -static SRes Xz_WriteHeader(CXzStreamFlags f, ISeqOutStream *s) -{ - UInt32 crc; - Byte header[XZ_STREAM_HEADER_SIZE]; - memcpy(header, XZ_SIG, XZ_SIG_SIZE); - header[XZ_SIG_SIZE] = (Byte)(f >> 8); - header[XZ_SIG_SIZE + 1] = (Byte)(f & 0xFF); - crc = CrcCalc(header + XZ_SIG_SIZE, XZ_STREAM_FLAGS_SIZE); - SetUi32(header + XZ_SIG_SIZE + XZ_STREAM_FLAGS_SIZE, crc); - return WriteBytes(s, header, XZ_STREAM_HEADER_SIZE); -} - - -static SRes XzBlock_WriteHeader(const CXzBlock *p, ISeqOutStream *s) -{ - Byte header[XZ_BLOCK_HEADER_SIZE_MAX]; - - unsigned pos = 1; - unsigned numFilters, i; - header[pos++] = p->flags; - - if (XzBlock_HasPackSize(p)) pos += Xz_WriteVarInt(header + pos, p->packSize); - if (XzBlock_HasUnpackSize(p)) pos += Xz_WriteVarInt(header + pos, p->unpackSize); - numFilters = XzBlock_GetNumFilters(p); - - for (i = 0; i < numFilters; i++) - { - const CXzFilter *f = &p->filters[i]; - pos += Xz_WriteVarInt(header + pos, f->id); - pos += Xz_WriteVarInt(header + pos, f->propsSize); - memcpy(header + pos, f->props, f->propsSize); - pos += f->propsSize; - } - - while ((pos & 3) != 0) - header[pos++] = 0; - - header[0] = (Byte)(pos >> 2); - SetUi32(header + pos, CrcCalc(header, pos)); - return WriteBytes(s, header, pos + 4); -} - - - - -typedef struct -{ - size_t numBlocks; - size_t size; - size_t allocated; - Byte *blocks; -} CXzEncIndex; - - -static void XzEncIndex_Construct(CXzEncIndex *p) -{ - p->numBlocks = 0; - p->size = 0; - p->allocated = 0; - p->blocks = NULL; -} - -static void XzEncIndex_Init(CXzEncIndex *p) -{ - p->numBlocks = 0; - p->size = 0; -} - -static void XzEncIndex_Free(CXzEncIndex *p, ISzAllocPtr alloc) -{ - if (p->blocks) - { - ISzAlloc_Free(alloc, p->blocks); - p->blocks = NULL; - } - p->numBlocks = 0; - p->size = 0; - p->allocated = 0; -} - - -static SRes XzEncIndex_ReAlloc(CXzEncIndex *p, size_t newSize, ISzAllocPtr alloc) -{ - Byte *blocks = (Byte *)ISzAlloc_Alloc(alloc, newSize); - if (!blocks) - return SZ_ERROR_MEM; - if (p->size != 0) - memcpy(blocks, p->blocks, p->size); - if (p->blocks) - ISzAlloc_Free(alloc, p->blocks); - p->blocks = blocks; - p->allocated = newSize; - return SZ_OK; -} - - -static SRes XzEncIndex_PreAlloc(CXzEncIndex *p, UInt64 numBlocks, UInt64 unpackSize, UInt64 totalSize, ISzAllocPtr alloc) -{ - UInt64 pos; - { - Byte buf[32]; - unsigned pos2 = Xz_WriteVarInt(buf, totalSize); - pos2 += Xz_WriteVarInt(buf + pos2, unpackSize); - pos = numBlocks * pos2; - } - - if (pos <= p->allocated - p->size) - return SZ_OK; - { - UInt64 newSize64 = p->size + pos; - size_t newSize = (size_t)newSize64; - if (newSize != newSize64) - return SZ_ERROR_MEM; - return XzEncIndex_ReAlloc(p, newSize, alloc); - } -} - - -static SRes XzEncIndex_AddIndexRecord(CXzEncIndex *p, UInt64 unpackSize, UInt64 totalSize, ISzAllocPtr alloc) -{ - Byte buf[32]; - unsigned pos = Xz_WriteVarInt(buf, totalSize); - pos += Xz_WriteVarInt(buf + pos, unpackSize); - - if (pos > p->allocated - p->size) - { - size_t newSize = p->allocated * 2 + 16 * 2; - if (newSize < p->size + pos) - return SZ_ERROR_MEM; - RINOK(XzEncIndex_ReAlloc(p, newSize, alloc)); - } - memcpy(p->blocks + p->size, buf, pos); - p->size += pos; - p->numBlocks++; - return SZ_OK; -} - - -static SRes XzEncIndex_WriteFooter(const CXzEncIndex *p, CXzStreamFlags flags, ISeqOutStream *s) -{ - Byte buf[32]; - UInt64 globalPos; - UInt32 crc = CRC_INIT_VAL; - unsigned pos = 1 + Xz_WriteVarInt(buf + 1, p->numBlocks); - - globalPos = pos; - buf[0] = 0; - RINOK(WriteBytesUpdateCrc(s, buf, pos, &crc)); - RINOK(WriteBytesUpdateCrc(s, p->blocks, p->size, &crc)); - globalPos += p->size; - - pos = XZ_GET_PAD_SIZE(globalPos); - buf[1] = 0; - buf[2] = 0; - buf[3] = 0; - globalPos += pos; - - crc = CrcUpdate(crc, buf + 4 - pos, pos); - SetUi32(buf + 4, CRC_GET_DIGEST(crc)); - - SetUi32(buf + 8 + 4, (UInt32)(globalPos >> 2)); - buf[8 + 8] = (Byte)(flags >> 8); - buf[8 + 9] = (Byte)(flags & 0xFF); - SetUi32(buf + 8, CrcCalc(buf + 8 + 4, 6)); - buf[8 + 10] = XZ_FOOTER_SIG_0; - buf[8 + 11] = XZ_FOOTER_SIG_1; - - return WriteBytes(s, buf + 4 - pos, pos + 4 + 12); -} - - - -/* ---------- CSeqCheckInStream ---------- */ - -typedef struct -{ - ISeqInStream vt; - ISeqInStream *realStream; - const Byte *data; - UInt64 limit; - UInt64 processed; - int realStreamFinished; - CXzCheck check; -} CSeqCheckInStream; - -static void SeqCheckInStream_Init(CSeqCheckInStream *p, unsigned checkMode) -{ - p->limit = (UInt64)(Int64)-1; - p->processed = 0; - p->realStreamFinished = 0; - XzCheck_Init(&p->check, checkMode); -} - -static void SeqCheckInStream_GetDigest(CSeqCheckInStream *p, Byte *digest) -{ - XzCheck_Final(&p->check, digest); -} - -static SRes SeqCheckInStream_Read(const ISeqInStream *pp, void *data, size_t *size) -{ - CSeqCheckInStream *p = CONTAINER_FROM_VTBL(pp, CSeqCheckInStream, vt); - size_t size2 = *size; - SRes res = SZ_OK; - - if (p->limit != (UInt64)(Int64)-1) - { - UInt64 rem = p->limit - p->processed; - if (size2 > rem) - size2 = (size_t)rem; - } - if (size2 != 0) - { - if (p->realStream) - { - res = ISeqInStream_Read(p->realStream, data, &size2); - p->realStreamFinished = (size2 == 0) ? 1 : 0; - } - else - memcpy(data, p->data + (size_t)p->processed, size2); - XzCheck_Update(&p->check, data, size2); - p->processed += size2; - } - *size = size2; - return res; -} - - -/* ---------- CSeqSizeOutStream ---------- */ - -typedef struct -{ - ISeqOutStream vt; - ISeqOutStream *realStream; - Byte *outBuf; - size_t outBufLimit; - UInt64 processed; -} CSeqSizeOutStream; - -static size_t SeqSizeOutStream_Write(const ISeqOutStream *pp, const void *data, size_t size) -{ - CSeqSizeOutStream *p = CONTAINER_FROM_VTBL(pp, CSeqSizeOutStream, vt); - if (p->realStream) - size = ISeqOutStream_Write(p->realStream, data, size); - else - { - if (size > p->outBufLimit - (size_t)p->processed) - return 0; - memcpy(p->outBuf + (size_t)p->processed, data, size); - } - p->processed += size; - return size; -} - - -/* ---------- CSeqInFilter ---------- */ - -#define FILTER_BUF_SIZE (1 << 20) - -typedef struct -{ - ISeqInStream p; - ISeqInStream *realStream; - IStateCoder StateCoder; - Byte *buf; - size_t curPos; - size_t endPos; - int srcWasFinished; -} CSeqInFilter; - - -SRes BraState_SetFromMethod(IStateCoder *p, UInt64 id, int encodeMode, ISzAllocPtr alloc); - -static SRes SeqInFilter_Init(CSeqInFilter *p, const CXzFilter *props, ISzAllocPtr alloc) -{ - if (!p->buf) - { - p->buf = (Byte *)ISzAlloc_Alloc(alloc, FILTER_BUF_SIZE); - if (!p->buf) - return SZ_ERROR_MEM; - } - p->curPos = p->endPos = 0; - p->srcWasFinished = 0; - RINOK(BraState_SetFromMethod(&p->StateCoder, props->id, 1, alloc)); - RINOK(p->StateCoder.SetProps(p->StateCoder.p, props->props, props->propsSize, alloc)); - p->StateCoder.Init(p->StateCoder.p); - return SZ_OK; -} - - -static SRes SeqInFilter_Read(const ISeqInStream *pp, void *data, size_t *size) -{ - CSeqInFilter *p = CONTAINER_FROM_VTBL(pp, CSeqInFilter, p); - size_t sizeOriginal = *size; - if (sizeOriginal == 0) - return SZ_OK; - *size = 0; - - for (;;) - { - if (!p->srcWasFinished && p->curPos == p->endPos) - { - p->curPos = 0; - p->endPos = FILTER_BUF_SIZE; - RINOK(ISeqInStream_Read(p->realStream, p->buf, &p->endPos)); - if (p->endPos == 0) - p->srcWasFinished = 1; - } - { - SizeT srcLen = p->endPos - p->curPos; - ECoderStatus status; - SRes res; - *size = sizeOriginal; - res = p->StateCoder.Code2(p->StateCoder.p, - (Byte *)data, size, - p->buf + p->curPos, &srcLen, - p->srcWasFinished, CODER_FINISH_ANY, - &status); - p->curPos += srcLen; - if (*size != 0 || srcLen == 0 || res != SZ_OK) - return res; - } - } -} - -static void SeqInFilter_Construct(CSeqInFilter *p) -{ - p->buf = NULL; - p->StateCoder.p = NULL; - p->p.Read = SeqInFilter_Read; -} - -static void SeqInFilter_Free(CSeqInFilter *p, ISzAllocPtr alloc) -{ - if (p->StateCoder.p) - { - p->StateCoder.Free(p->StateCoder.p, alloc); - p->StateCoder.p = NULL; - } - if (p->buf) - { - ISzAlloc_Free(alloc, p->buf); - p->buf = NULL; - } -} - - -/* ---------- CSbEncInStream ---------- */ - -#ifdef USE_SUBBLOCK - -typedef struct -{ - ISeqInStream vt; - ISeqInStream *inStream; - CSbEnc enc; -} CSbEncInStream; - -static SRes SbEncInStream_Read(const ISeqInStream *pp, void *data, size_t *size) -{ - CSbEncInStream *p = CONTAINER_FROM_VTBL(pp, CSbEncInStream, vt); - size_t sizeOriginal = *size; - if (sizeOriginal == 0) - return SZ_OK; - - for (;;) - { - if (p->enc.needRead && !p->enc.readWasFinished) - { - size_t processed = p->enc.needReadSizeMax; - RINOK(p->inStream->Read(p->inStream, p->enc.buf + p->enc.readPos, &processed)); - p->enc.readPos += processed; - if (processed == 0) - { - p->enc.readWasFinished = True; - p->enc.isFinalFinished = True; - } - p->enc.needRead = False; - } - - *size = sizeOriginal; - RINOK(SbEnc_Read(&p->enc, data, size)); - if (*size != 0 || !p->enc.needRead) - return SZ_OK; - } -} - -void SbEncInStream_Construct(CSbEncInStream *p, ISzAllocPtr alloc) -{ - SbEnc_Construct(&p->enc, alloc); - p->vt.Read = SbEncInStream_Read; -} - -SRes SbEncInStream_Init(CSbEncInStream *p) -{ - return SbEnc_Init(&p->enc); -} - -void SbEncInStream_Free(CSbEncInStream *p) -{ - SbEnc_Free(&p->enc); -} - -#endif - - - -/* ---------- CXzProps ---------- */ - - -void XzFilterProps_Init(CXzFilterProps *p) -{ - p->id = 0; - p->delta = 0; - p->ip = 0; - p->ipDefined = False; -} - -void XzProps_Init(CXzProps *p) -{ - p->checkId = XZ_CHECK_CRC32; - p->blockSize = XZ_PROPS__BLOCK_SIZE__AUTO; - p->numBlockThreads_Reduced = -1; - p->numBlockThreads_Max = -1; - p->numTotalThreads = -1; - p->reduceSize = (UInt64)(Int64)-1; - p->forceWriteSizesInHeader = 0; - // p->forceWriteSizesInHeader = 1; - - XzFilterProps_Init(&p->filterProps); - Lzma2EncProps_Init(&p->lzma2Props); -} - - -static void XzEncProps_Normalize_Fixed(CXzProps *p) -{ - UInt64 fileSize; - int t1, t1n, t2, t2r, t3; - { - CLzma2EncProps tp = p->lzma2Props; - if (tp.numTotalThreads <= 0) - tp.numTotalThreads = p->numTotalThreads; - Lzma2EncProps_Normalize(&tp); - t1n = tp.numTotalThreads; - } - - t1 = p->lzma2Props.numTotalThreads; - t2 = p->numBlockThreads_Max; - t3 = p->numTotalThreads; - - if (t2 > MTCODER__THREADS_MAX) - t2 = MTCODER__THREADS_MAX; - - if (t3 <= 0) - { - if (t2 <= 0) - t2 = 1; - t3 = t1n * t2; - } - else if (t2 <= 0) - { - t2 = t3 / t1n; - if (t2 == 0) - { - t1 = 1; - t2 = t3; - } - if (t2 > MTCODER__THREADS_MAX) - t2 = MTCODER__THREADS_MAX; - } - else if (t1 <= 0) - { - t1 = t3 / t2; - if (t1 == 0) - t1 = 1; - } - else - t3 = t1n * t2; - - p->lzma2Props.numTotalThreads = t1; - - t2r = t2; - - fileSize = p->reduceSize; - - if ((p->blockSize < fileSize || fileSize == (UInt64)(Int64)-1)) - p->lzma2Props.lzmaProps.reduceSize = p->blockSize; - - Lzma2EncProps_Normalize(&p->lzma2Props); - - t1 = p->lzma2Props.numTotalThreads; - - { - if (t2 > 1 && fileSize != (UInt64)(Int64)-1) - { - UInt64 numBlocks = fileSize / p->blockSize; - if (numBlocks * p->blockSize != fileSize) - numBlocks++; - if (numBlocks < (unsigned)t2) - { - t2r = (unsigned)numBlocks; - if (t2r == 0) - t2r = 1; - t3 = t1 * t2r; - } - } - } - - p->numBlockThreads_Max = t2; - p->numBlockThreads_Reduced = t2r; - p->numTotalThreads = t3; -} - - -static void XzProps_Normalize(CXzProps *p) -{ - /* we normalize xzProps properties, but we normalize only some of CXzProps::lzma2Props properties. - Lzma2Enc_SetProps() will normalize lzma2Props later. */ - - if (p->blockSize == XZ_PROPS__BLOCK_SIZE__SOLID) - { - p->lzma2Props.lzmaProps.reduceSize = p->reduceSize; - p->numBlockThreads_Reduced = 1; - p->numBlockThreads_Max = 1; - if (p->lzma2Props.numTotalThreads <= 0) - p->lzma2Props.numTotalThreads = p->numTotalThreads; - return; - } - else - { - CLzma2EncProps *lzma2 = &p->lzma2Props; - if (p->blockSize == LZMA2_ENC_PROPS__BLOCK_SIZE__AUTO) - { - // xz-auto - p->lzma2Props.lzmaProps.reduceSize = p->reduceSize; - - if (lzma2->blockSize == LZMA2_ENC_PROPS__BLOCK_SIZE__SOLID) - { - // if (xz-auto && lzma2-solid) - we use solid for both - p->blockSize = XZ_PROPS__BLOCK_SIZE__SOLID; - p->numBlockThreads_Reduced = 1; - p->numBlockThreads_Max = 1; - if (p->lzma2Props.numTotalThreads <= 0) - p->lzma2Props.numTotalThreads = p->numTotalThreads; - } - else - { - // if (xz-auto && (lzma2-auto || lzma2-fixed_) - // we calculate block size for lzma2 and use that block size for xz, lzma2 uses single-chunk per block - CLzma2EncProps tp = p->lzma2Props; - if (tp.numTotalThreads <= 0) - tp.numTotalThreads = p->numTotalThreads; - - Lzma2EncProps_Normalize(&tp); - - p->blockSize = tp.blockSize; // fixed or solid - p->numBlockThreads_Reduced = tp.numBlockThreads_Reduced; - p->numBlockThreads_Max = tp.numBlockThreads_Max; - if (lzma2->blockSize == LZMA2_ENC_PROPS__BLOCK_SIZE__AUTO) - lzma2->blockSize = tp.blockSize; // fixed or solid, LZMA2_ENC_PROPS__BLOCK_SIZE__SOLID - if (lzma2->lzmaProps.reduceSize > tp.blockSize && tp.blockSize != LZMA2_ENC_PROPS__BLOCK_SIZE__SOLID) - lzma2->lzmaProps.reduceSize = tp.blockSize; - lzma2->numBlockThreads_Reduced = 1; - lzma2->numBlockThreads_Max = 1; - return; - } - } - else - { - // xz-fixed - // we can use xz::reduceSize or xz::blockSize as base for lzmaProps::reduceSize - - p->lzma2Props.lzmaProps.reduceSize = p->reduceSize; - { - UInt64 r = p->reduceSize; - if (r > p->blockSize || r == (UInt64)(Int64)-1) - r = p->blockSize; - lzma2->lzmaProps.reduceSize = r; - } - if (lzma2->blockSize == LZMA2_ENC_PROPS__BLOCK_SIZE__AUTO) - lzma2->blockSize = LZMA2_ENC_PROPS__BLOCK_SIZE__SOLID; - else if (lzma2->blockSize > p->blockSize && lzma2->blockSize != LZMA2_ENC_PROPS__BLOCK_SIZE__SOLID) - lzma2->blockSize = p->blockSize; - - XzEncProps_Normalize_Fixed(p); - } - } -} - - -/* ---------- CLzma2WithFilters ---------- */ - -typedef struct -{ - CLzma2EncHandle lzma2; - CSeqInFilter filter; - - #ifdef USE_SUBBLOCK - CSbEncInStream sb; - #endif -} CLzma2WithFilters; - - -static void Lzma2WithFilters_Construct(CLzma2WithFilters *p) -{ - p->lzma2 = NULL; - SeqInFilter_Construct(&p->filter); - - #ifdef USE_SUBBLOCK - SbEncInStream_Construct(&p->sb, alloc); - #endif -} - - -static SRes Lzma2WithFilters_Create(CLzma2WithFilters *p, ISzAllocPtr alloc, ISzAllocPtr bigAlloc) -{ - if (!p->lzma2) - { - p->lzma2 = Lzma2Enc_Create(alloc, bigAlloc); - if (!p->lzma2) - return SZ_ERROR_MEM; - } - return SZ_OK; -} - - -static void Lzma2WithFilters_Free(CLzma2WithFilters *p, ISzAllocPtr alloc) -{ - #ifdef USE_SUBBLOCK - SbEncInStream_Free(&p->sb); - #endif - - SeqInFilter_Free(&p->filter, alloc); - if (p->lzma2) - { - Lzma2Enc_Destroy(p->lzma2); - p->lzma2 = NULL; - } -} - - -typedef struct -{ - UInt64 unpackSize; - UInt64 totalSize; - size_t headerSize; -} CXzEncBlockInfo; - - -static SRes Xz_CompressBlock( - CLzma2WithFilters *lzmaf, - - ISeqOutStream *outStream, - Byte *outBufHeader, - Byte *outBufData, size_t outBufDataLimit, - - ISeqInStream *inStream, - // UInt64 expectedSize, - const Byte *inBuf, // used if (!inStream) - size_t inBufSize, // used if (!inStream), it's block size, props->blockSize is ignored - - const CXzProps *props, - ICompressProgress *progress, - int *inStreamFinished, /* only for inStream version */ - CXzEncBlockInfo *blockSizes, - ISzAllocPtr alloc, - ISzAllocPtr allocBig) -{ - CSeqCheckInStream checkInStream; - CSeqSizeOutStream seqSizeOutStream; - CXzBlock block; - unsigned filterIndex = 0; - CXzFilter *filter = NULL; - const CXzFilterProps *fp = &props->filterProps; - if (fp->id == 0) - fp = NULL; - - *inStreamFinished = False; - - RINOK(Lzma2WithFilters_Create(lzmaf, alloc, allocBig)); - - RINOK(Lzma2Enc_SetProps(lzmaf->lzma2, &props->lzma2Props)); - - XzBlock_ClearFlags(&block); - XzBlock_SetNumFilters(&block, 1 + (fp ? 1 : 0)); - - if (fp) - { - filter = &block.filters[filterIndex++]; - filter->id = fp->id; - filter->propsSize = 0; - - if (fp->id == XZ_ID_Delta) - { - filter->props[0] = (Byte)(fp->delta - 1); - filter->propsSize = 1; - } - else if (fp->ipDefined) - { - SetUi32(filter->props, fp->ip); - filter->propsSize = 4; - } - } - - { - CXzFilter *f = &block.filters[filterIndex++]; - f->id = XZ_ID_LZMA2; - f->propsSize = 1; - f->props[0] = Lzma2Enc_WriteProperties(lzmaf->lzma2); - } - - seqSizeOutStream.vt.Write = SeqSizeOutStream_Write; - seqSizeOutStream.realStream = outStream; - seqSizeOutStream.outBuf = outBufData; - seqSizeOutStream.outBufLimit = outBufDataLimit; - seqSizeOutStream.processed = 0; - - /* - if (expectedSize != (UInt64)(Int64)-1) - { - block.unpackSize = expectedSize; - if (props->blockSize != (UInt64)(Int64)-1) - if (expectedSize > props->blockSize) - block.unpackSize = props->blockSize; - XzBlock_SetHasUnpackSize(&block); - } - */ - - if (outStream) - { - RINOK(XzBlock_WriteHeader(&block, &seqSizeOutStream.vt)); - } - - checkInStream.vt.Read = SeqCheckInStream_Read; - SeqCheckInStream_Init(&checkInStream, props->checkId); - - checkInStream.realStream = inStream; - checkInStream.data = inBuf; - checkInStream.limit = props->blockSize; - if (!inStream) - checkInStream.limit = inBufSize; - - if (fp) - { - #ifdef USE_SUBBLOCK - if (fp->id == XZ_ID_Subblock) - { - lzmaf->sb.inStream = &checkInStream.vt; - RINOK(SbEncInStream_Init(&lzmaf->sb)); - } - else - #endif - { - lzmaf->filter.realStream = &checkInStream.vt; - RINOK(SeqInFilter_Init(&lzmaf->filter, filter, alloc)); - } - } - - { - SRes res; - Byte *outBuf = NULL; - size_t outSize = 0; - BoolInt useStream = (fp || inStream); - // useStream = True; - - if (!useStream) - { - XzCheck_Update(&checkInStream.check, inBuf, inBufSize); - checkInStream.processed = inBufSize; - } - - if (!outStream) - { - outBuf = seqSizeOutStream.outBuf; // + (size_t)seqSizeOutStream.processed; - outSize = seqSizeOutStream.outBufLimit; // - (size_t)seqSizeOutStream.processed; - } - - res = Lzma2Enc_Encode2(lzmaf->lzma2, - outBuf ? NULL : &seqSizeOutStream.vt, - outBuf, - outBuf ? &outSize : NULL, - - useStream ? - (fp ? - ( - #ifdef USE_SUBBLOCK - (fp->id == XZ_ID_Subblock) ? &lzmaf->sb.vt: - #endif - &lzmaf->filter.p) : - &checkInStream.vt) : NULL, - - useStream ? NULL : inBuf, - useStream ? 0 : inBufSize, - - progress); - - if (outBuf) - seqSizeOutStream.processed += outSize; - - RINOK(res); - blockSizes->unpackSize = checkInStream.processed; - } - { - Byte buf[4 + 64]; - unsigned padSize = XZ_GET_PAD_SIZE(seqSizeOutStream.processed); - UInt64 packSize = seqSizeOutStream.processed; - - buf[0] = 0; - buf[1] = 0; - buf[2] = 0; - buf[3] = 0; - - SeqCheckInStream_GetDigest(&checkInStream, buf + 4); - RINOK(WriteBytes(&seqSizeOutStream.vt, buf + (4 - padSize), padSize + XzFlags_GetCheckSize((CXzStreamFlags)props->checkId))); - - blockSizes->totalSize = seqSizeOutStream.processed - padSize; - - if (!outStream) - { - seqSizeOutStream.outBuf = outBufHeader; - seqSizeOutStream.outBufLimit = XZ_BLOCK_HEADER_SIZE_MAX; - seqSizeOutStream.processed = 0; - - block.unpackSize = blockSizes->unpackSize; - XzBlock_SetHasUnpackSize(&block); - - block.packSize = packSize; - XzBlock_SetHasPackSize(&block); - - RINOK(XzBlock_WriteHeader(&block, &seqSizeOutStream.vt)); - - blockSizes->headerSize = (size_t)seqSizeOutStream.processed; - blockSizes->totalSize += seqSizeOutStream.processed; - } - } - - if (inStream) - *inStreamFinished = checkInStream.realStreamFinished; - else - { - *inStreamFinished = False; - if (checkInStream.processed != inBufSize) - return SZ_ERROR_FAIL; - } - - return SZ_OK; -} - - - -typedef struct -{ - ICompressProgress vt; - ICompressProgress *progress; - UInt64 inOffset; - UInt64 outOffset; -} CCompressProgress_XzEncOffset; - - -static SRes CompressProgress_XzEncOffset_Progress(const ICompressProgress *pp, UInt64 inSize, UInt64 outSize) -{ - const CCompressProgress_XzEncOffset *p = CONTAINER_FROM_VTBL(pp, CCompressProgress_XzEncOffset, vt); - inSize += p->inOffset; - outSize += p->outOffset; - return ICompressProgress_Progress(p->progress, inSize, outSize); -} - - - - -typedef struct -{ - ISzAllocPtr alloc; - ISzAllocPtr allocBig; - - CXzProps xzProps; - UInt64 expectedDataSize; - - CXzEncIndex xzIndex; - - CLzma2WithFilters lzmaf_Items[MTCODER__THREADS_MAX]; - - size_t outBufSize; /* size of allocated outBufs[i] */ - Byte *outBufs[MTCODER__BLOCKS_MAX]; - - #ifndef _7ZIP_ST - unsigned checkType; - ISeqOutStream *outStream; - BoolInt mtCoder_WasConstructed; - CMtCoder mtCoder; - CXzEncBlockInfo EncBlocks[MTCODER__BLOCKS_MAX]; - #endif - -} CXzEnc; - - -static void XzEnc_Construct(CXzEnc *p) -{ - unsigned i; - - XzEncIndex_Construct(&p->xzIndex); - - for (i = 0; i < MTCODER__THREADS_MAX; i++) - Lzma2WithFilters_Construct(&p->lzmaf_Items[i]); - - #ifndef _7ZIP_ST - p->mtCoder_WasConstructed = False; - { - for (i = 0; i < MTCODER__BLOCKS_MAX; i++) - p->outBufs[i] = NULL; - p->outBufSize = 0; - } - #endif -} - - -static void XzEnc_FreeOutBufs(CXzEnc *p) -{ - unsigned i; - for (i = 0; i < MTCODER__BLOCKS_MAX; i++) - if (p->outBufs[i]) - { - ISzAlloc_Free(p->alloc, p->outBufs[i]); - p->outBufs[i] = NULL; - } - p->outBufSize = 0; -} - - -static void XzEnc_Free(CXzEnc *p, ISzAllocPtr alloc) -{ - unsigned i; - - XzEncIndex_Free(&p->xzIndex, alloc); - - for (i = 0; i < MTCODER__THREADS_MAX; i++) - Lzma2WithFilters_Free(&p->lzmaf_Items[i], alloc); - - #ifndef _7ZIP_ST - if (p->mtCoder_WasConstructed) - { - MtCoder_Destruct(&p->mtCoder); - p->mtCoder_WasConstructed = False; - } - XzEnc_FreeOutBufs(p); - #endif -} - - -CXzEncHandle XzEnc_Create(ISzAllocPtr alloc, ISzAllocPtr allocBig) -{ - CXzEnc *p = (CXzEnc *)ISzAlloc_Alloc(alloc, sizeof(CXzEnc)); - if (!p) - return NULL; - XzEnc_Construct(p); - XzProps_Init(&p->xzProps); - XzProps_Normalize(&p->xzProps); - p->expectedDataSize = (UInt64)(Int64)-1; - p->alloc = alloc; - p->allocBig = allocBig; - return p; -} - - -void XzEnc_Destroy(CXzEncHandle pp) -{ - CXzEnc *p = (CXzEnc *)pp; - XzEnc_Free(p, p->alloc); - ISzAlloc_Free(p->alloc, p); -} - - -SRes XzEnc_SetProps(CXzEncHandle pp, const CXzProps *props) -{ - CXzEnc *p = (CXzEnc *)pp; - p->xzProps = *props; - XzProps_Normalize(&p->xzProps); - return SZ_OK; -} - - -void XzEnc_SetDataSize(CXzEncHandle pp, UInt64 expectedDataSiize) -{ - CXzEnc *p = (CXzEnc *)pp; - p->expectedDataSize = expectedDataSiize; -} - - - - -#ifndef _7ZIP_ST - -static SRes XzEnc_MtCallback_Code(void *pp, unsigned coderIndex, unsigned outBufIndex, - const Byte *src, size_t srcSize, int finished) -{ - CXzEnc *me = (CXzEnc *)pp; - SRes res; - CMtProgressThunk progressThunk; - - Byte *dest = me->outBufs[outBufIndex]; - - UNUSED_VAR(finished) - - { - CXzEncBlockInfo *bInfo = &me->EncBlocks[outBufIndex]; - bInfo->totalSize = 0; - bInfo->unpackSize = 0; - bInfo->headerSize = 0; - } - - if (!dest) - { - dest = (Byte *)ISzAlloc_Alloc(me->alloc, me->outBufSize); - if (!dest) - return SZ_ERROR_MEM; - me->outBufs[outBufIndex] = dest; - } - - MtProgressThunk_CreateVTable(&progressThunk); - progressThunk.mtProgress = &me->mtCoder.mtProgress; - MtProgressThunk_Init(&progressThunk); - - { - CXzEncBlockInfo blockSizes; - int inStreamFinished; - - res = Xz_CompressBlock( - &me->lzmaf_Items[coderIndex], - - NULL, - dest, - dest + XZ_BLOCK_HEADER_SIZE_MAX, me->outBufSize - XZ_BLOCK_HEADER_SIZE_MAX, - - NULL, - // srcSize, // expectedSize - src, srcSize, - - &me->xzProps, - &progressThunk.vt, - &inStreamFinished, - &blockSizes, - me->alloc, - me->allocBig); - - if (res == SZ_OK) - me->EncBlocks[outBufIndex] = blockSizes; - - return res; - } -} - - -static SRes XzEnc_MtCallback_Write(void *pp, unsigned outBufIndex) -{ - CXzEnc *me = (CXzEnc *)pp; - - const CXzEncBlockInfo *bInfo = &me->EncBlocks[outBufIndex]; - const Byte *data = me->outBufs[outBufIndex]; - - RINOK(WriteBytes(me->outStream, data, bInfo->headerSize)); - - { - UInt64 totalPackFull = bInfo->totalSize + XZ_GET_PAD_SIZE(bInfo->totalSize); - RINOK(WriteBytes(me->outStream, data + XZ_BLOCK_HEADER_SIZE_MAX, (size_t)totalPackFull - bInfo->headerSize)); - } - - return XzEncIndex_AddIndexRecord(&me->xzIndex, bInfo->unpackSize, bInfo->totalSize, me->alloc); -} - -#endif - - - -SRes XzEnc_Encode(CXzEncHandle pp, ISeqOutStream *outStream, ISeqInStream *inStream, ICompressProgress *progress) -{ - CXzEnc *p = (CXzEnc *)pp; - - const CXzProps *props = &p->xzProps; - - XzEncIndex_Init(&p->xzIndex); - { - UInt64 numBlocks = 1; - UInt64 blockSize = props->blockSize; - - if (blockSize != XZ_PROPS__BLOCK_SIZE__SOLID - && props->reduceSize != (UInt64)(Int64)-1) - { - numBlocks = props->reduceSize / blockSize; - if (numBlocks * blockSize != props->reduceSize) - numBlocks++; - } - else - blockSize = (UInt64)1 << 62; - - RINOK(XzEncIndex_PreAlloc(&p->xzIndex, numBlocks, blockSize, XZ_GET_ESTIMATED_BLOCK_TOTAL_PACK_SIZE(blockSize), p->alloc)); - } - - RINOK(Xz_WriteHeader((CXzStreamFlags)props->checkId, outStream)); - - - #ifndef _7ZIP_ST - if (props->numBlockThreads_Reduced > 1) - { - IMtCoderCallback2 vt; - - if (!p->mtCoder_WasConstructed) - { - p->mtCoder_WasConstructed = True; - MtCoder_Construct(&p->mtCoder); - } - - vt.Code = XzEnc_MtCallback_Code; - vt.Write = XzEnc_MtCallback_Write; - - p->checkType = props->checkId; - p->xzProps = *props; - - p->outStream = outStream; - - p->mtCoder.allocBig = p->allocBig; - p->mtCoder.progress = progress; - p->mtCoder.inStream = inStream; - p->mtCoder.inData = NULL; - p->mtCoder.inDataSize = 0; - p->mtCoder.mtCallback = &vt; - p->mtCoder.mtCallbackObject = p; - - if ( props->blockSize == XZ_PROPS__BLOCK_SIZE__SOLID - || props->blockSize == XZ_PROPS__BLOCK_SIZE__AUTO) - return SZ_ERROR_FAIL; - - p->mtCoder.blockSize = (size_t)props->blockSize; - if (p->mtCoder.blockSize != props->blockSize) - return SZ_ERROR_PARAM; /* SZ_ERROR_MEM */ - - { - size_t destBlockSize = XZ_BLOCK_HEADER_SIZE_MAX + XZ_GET_MAX_BLOCK_PACK_SIZE(p->mtCoder.blockSize); - if (destBlockSize < p->mtCoder.blockSize) - return SZ_ERROR_PARAM; - if (p->outBufSize != destBlockSize) - XzEnc_FreeOutBufs(p); - p->outBufSize = destBlockSize; - } - - p->mtCoder.numThreadsMax = props->numBlockThreads_Max; - p->mtCoder.expectedDataSize = p->expectedDataSize; - - RINOK(MtCoder_Code(&p->mtCoder)); - } - else - #endif - { - int writeStartSizes; - CCompressProgress_XzEncOffset progress2; - Byte *bufData = NULL; - size_t bufSize = 0; - - progress2.vt.Progress = CompressProgress_XzEncOffset_Progress; - progress2.inOffset = 0; - progress2.outOffset = 0; - progress2.progress = progress; - - writeStartSizes = 0; - - if (props->blockSize != XZ_PROPS__BLOCK_SIZE__SOLID) - { - writeStartSizes = (props->forceWriteSizesInHeader > 0); - - if (writeStartSizes) - { - size_t t2; - size_t t = (size_t)props->blockSize; - if (t != props->blockSize) - return SZ_ERROR_PARAM; - t = XZ_GET_MAX_BLOCK_PACK_SIZE(t); - if (t < props->blockSize) - return SZ_ERROR_PARAM; - t2 = XZ_BLOCK_HEADER_SIZE_MAX + t; - if (!p->outBufs[0] || t2 != p->outBufSize) - { - XzEnc_FreeOutBufs(p); - p->outBufs[0] = (Byte *)ISzAlloc_Alloc(p->alloc, t2); - if (!p->outBufs[0]) - return SZ_ERROR_MEM; - p->outBufSize = t2; - } - bufData = p->outBufs[0] + XZ_BLOCK_HEADER_SIZE_MAX; - bufSize = t; - } - } - - for (;;) - { - CXzEncBlockInfo blockSizes; - int inStreamFinished; - - /* - UInt64 rem = (UInt64)(Int64)-1; - if (props->reduceSize != (UInt64)(Int64)-1 - && props->reduceSize >= progress2.inOffset) - rem = props->reduceSize - progress2.inOffset; - */ - - blockSizes.headerSize = 0; // for GCC - - RINOK(Xz_CompressBlock( - &p->lzmaf_Items[0], - - writeStartSizes ? NULL : outStream, - writeStartSizes ? p->outBufs[0] : NULL, - bufData, bufSize, - - inStream, - // rem, - NULL, 0, - - props, - progress ? &progress2.vt : NULL, - &inStreamFinished, - &blockSizes, - p->alloc, - p->allocBig)); - - { - UInt64 totalPackFull = blockSizes.totalSize + XZ_GET_PAD_SIZE(blockSizes.totalSize); - - if (writeStartSizes) - { - RINOK(WriteBytes(outStream, p->outBufs[0], blockSizes.headerSize)); - RINOK(WriteBytes(outStream, bufData, (size_t)totalPackFull - blockSizes.headerSize)); - } - - RINOK(XzEncIndex_AddIndexRecord(&p->xzIndex, blockSizes.unpackSize, blockSizes.totalSize, p->alloc)); - - progress2.inOffset += blockSizes.unpackSize; - progress2.outOffset += totalPackFull; - } - - if (inStreamFinished) - break; - } - } - - return XzEncIndex_WriteFooter(&p->xzIndex, (CXzStreamFlags)props->checkId, outStream); -} - - -#include "Alloc.h" - -SRes Xz_Encode(ISeqOutStream *outStream, ISeqInStream *inStream, - const CXzProps *props, ICompressProgress *progress) -{ - SRes res; - CXzEncHandle xz = XzEnc_Create(&g_Alloc, &g_BigAlloc); - if (!xz) - return SZ_ERROR_MEM; - res = XzEnc_SetProps(xz, props); - if (res == SZ_OK) - res = XzEnc_Encode(xz, outStream, inStream, progress); - XzEnc_Destroy(xz); - return res; -} - - -SRes Xz_EncodeEmpty(ISeqOutStream *outStream) -{ - SRes res; - CXzEncIndex xzIndex; - XzEncIndex_Construct(&xzIndex); - res = Xz_WriteHeader((CXzStreamFlags)0, outStream); - if (res == SZ_OK) - res = XzEncIndex_WriteFooter(&xzIndex, (CXzStreamFlags)0, outStream); - XzEncIndex_Free(&xzIndex, NULL); // g_Alloc - return res; -} diff --git a/code/ryzom/client/src/seven_zip/XzEnc.h b/code/ryzom/client/src/seven_zip/XzEnc.h deleted file mode 100644 index 0c29e7e1e..000000000 --- a/code/ryzom/client/src/seven_zip/XzEnc.h +++ /dev/null @@ -1,60 +0,0 @@ -/* XzEnc.h -- Xz Encode -2017-06-27 : Igor Pavlov : Public domain */ - -#ifndef __XZ_ENC_H -#define __XZ_ENC_H - -#include "Lzma2Enc.h" - -#include "Xz.h" - -EXTERN_C_BEGIN - - -#define XZ_PROPS__BLOCK_SIZE__AUTO LZMA2_ENC_PROPS__BLOCK_SIZE__AUTO -#define XZ_PROPS__BLOCK_SIZE__SOLID LZMA2_ENC_PROPS__BLOCK_SIZE__SOLID - - -typedef struct -{ - UInt32 id; - UInt32 delta; - UInt32 ip; - int ipDefined; -} CXzFilterProps; - -void XzFilterProps_Init(CXzFilterProps *p); - - -typedef struct -{ - CLzma2EncProps lzma2Props; - CXzFilterProps filterProps; - unsigned checkId; - UInt64 blockSize; - int numBlockThreads_Reduced; - int numBlockThreads_Max; - int numTotalThreads; - int forceWriteSizesInHeader; - UInt64 reduceSize; -} CXzProps; - -void XzProps_Init(CXzProps *p); - - -typedef void * CXzEncHandle; - -CXzEncHandle XzEnc_Create(ISzAllocPtr alloc, ISzAllocPtr allocBig); -void XzEnc_Destroy(CXzEncHandle p); -SRes XzEnc_SetProps(CXzEncHandle p, const CXzProps *props); -void XzEnc_SetDataSize(CXzEncHandle p, UInt64 expectedDataSiize); -SRes XzEnc_Encode(CXzEncHandle p, ISeqOutStream *outStream, ISeqInStream *inStream, ICompressProgress *progress); - -SRes Xz_Encode(ISeqOutStream *outStream, ISeqInStream *inStream, - const CXzProps *props, ICompressProgress *progress); - -SRes Xz_EncodeEmpty(ISeqOutStream *outStream); - -EXTERN_C_END - -#endif diff --git a/code/ryzom/client/src/seven_zip/XzIn.cpp b/code/ryzom/client/src/seven_zip/XzIn.cpp deleted file mode 100644 index ff48e2dd4..000000000 --- a/code/ryzom/client/src/seven_zip/XzIn.cpp +++ /dev/null @@ -1,319 +0,0 @@ -/* XzIn.c - Xz input -2018-07-04 : Igor Pavlov : Public domain */ - -#include "Precomp.h" - -#include - -#include "7zCrc.h" -#include "CpuArch.h" -#include "Xz.h" - -/* -#define XZ_FOOTER_SIG_CHECK(p) (memcmp((p), XZ_FOOTER_SIG, XZ_FOOTER_SIG_SIZE) == 0) -*/ -#define XZ_FOOTER_SIG_CHECK(p) ((p)[0] == XZ_FOOTER_SIG_0 && (p)[1] == XZ_FOOTER_SIG_1) - - -SRes Xz_ReadHeader(CXzStreamFlags *p, ISeqInStream *inStream) -{ - Byte sig[XZ_STREAM_HEADER_SIZE]; - RINOK(SeqInStream_Read2(inStream, sig, XZ_STREAM_HEADER_SIZE, SZ_ERROR_NO_ARCHIVE)); - if (memcmp(sig, XZ_SIG, XZ_SIG_SIZE) != 0) - return SZ_ERROR_NO_ARCHIVE; - return Xz_ParseHeader(p, sig); -} - -#define READ_VARINT_AND_CHECK(buf, pos, size, res) \ - { unsigned s = Xz_ReadVarInt(buf + pos, size - pos, res); \ - if (s == 0) return SZ_ERROR_ARCHIVE; pos += s; } - -SRes XzBlock_ReadHeader(CXzBlock *p, ISeqInStream *inStream, BoolInt *isIndex, UInt32 *headerSizeRes) -{ - Byte header[XZ_BLOCK_HEADER_SIZE_MAX]; - unsigned headerSize; - *headerSizeRes = 0; - RINOK(SeqInStream_ReadByte(inStream, &header[0])); - headerSize = (unsigned)header[0]; - if (headerSize == 0) - { - *headerSizeRes = 1; - *isIndex = True; - return SZ_OK; - } - - *isIndex = False; - headerSize = (headerSize << 2) + 4; - *headerSizeRes = headerSize; - RINOK(SeqInStream_Read(inStream, header + 1, headerSize - 1)); - return XzBlock_Parse(p, header); -} - -#define ADD_SIZE_CHECK(size, val) \ - { UInt64 newSize = size + (val); if (newSize < size) return XZ_SIZE_OVERFLOW; size = newSize; } - -UInt64 Xz_GetUnpackSize(const CXzStream *p) -{ - UInt64 size = 0; - size_t i; - for (i = 0; i < p->numBlocks; i++) - ADD_SIZE_CHECK(size, p->blocks[i].unpackSize); - return size; -} - -UInt64 Xz_GetPackSize(const CXzStream *p) -{ - UInt64 size = 0; - size_t i; - for (i = 0; i < p->numBlocks; i++) - ADD_SIZE_CHECK(size, (p->blocks[i].totalSize + 3) & ~(UInt64)3); - return size; -} - -/* -SRes XzBlock_ReadFooter(CXzBlock *p, CXzStreamFlags f, ISeqInStream *inStream) -{ - return SeqInStream_Read(inStream, p->check, XzFlags_GetCheckSize(f)); -} -*/ - -static SRes Xz_ReadIndex2(CXzStream *p, const Byte *buf, size_t size, ISzAllocPtr alloc) -{ - size_t numBlocks, pos = 1; - UInt32 crc; - - if (size < 5 || buf[0] != 0) - return SZ_ERROR_ARCHIVE; - - size -= 4; - crc = CrcCalc(buf, size); - if (crc != GetUi32(buf + size)) - return SZ_ERROR_ARCHIVE; - - { - UInt64 numBlocks64; - READ_VARINT_AND_CHECK(buf, pos, size, &numBlocks64); - numBlocks = (size_t)numBlocks64; - if (numBlocks != numBlocks64 || numBlocks * 2 > size) - return SZ_ERROR_ARCHIVE; - } - - Xz_Free(p, alloc); - if (numBlocks != 0) - { - size_t i; - p->numBlocks = numBlocks; - p->blocks = (CXzBlockSizes *)ISzAlloc_Alloc(alloc, sizeof(CXzBlockSizes) * numBlocks); - if (!p->blocks) - return SZ_ERROR_MEM; - for (i = 0; i < numBlocks; i++) - { - CXzBlockSizes *block = &p->blocks[i]; - READ_VARINT_AND_CHECK(buf, pos, size, &block->totalSize); - READ_VARINT_AND_CHECK(buf, pos, size, &block->unpackSize); - if (block->totalSize == 0) - return SZ_ERROR_ARCHIVE; - } - } - while ((pos & 3) != 0) - if (buf[pos++] != 0) - return SZ_ERROR_ARCHIVE; - return (pos == size) ? SZ_OK : SZ_ERROR_ARCHIVE; -} - -static SRes Xz_ReadIndex(CXzStream *p, ILookInStream *stream, UInt64 indexSize, ISzAllocPtr alloc) -{ - SRes res; - size_t size; - Byte *buf; - if (indexSize > ((UInt32)1 << 31)) - return SZ_ERROR_UNSUPPORTED; - size = (size_t)indexSize; - if (size != indexSize) - return SZ_ERROR_UNSUPPORTED; - buf = (Byte *)ISzAlloc_Alloc(alloc, size); - if (!buf) - return SZ_ERROR_MEM; - res = LookInStream_Read2(stream, buf, size, SZ_ERROR_UNSUPPORTED); - if (res == SZ_OK) - res = Xz_ReadIndex2(p, buf, size, alloc); - ISzAlloc_Free(alloc, buf); - return res; -} - -static SRes LookInStream_SeekRead_ForArc(ILookInStream *stream, UInt64 offset, void *buf, size_t size) -{ - RINOK(LookInStream_SeekTo(stream, offset)); - return LookInStream_Read(stream, buf, size); - /* return LookInStream_Read2(stream, buf, size, SZ_ERROR_NO_ARCHIVE); */ -} - -static SRes Xz_ReadBackward(CXzStream *p, ILookInStream *stream, Int64 *startOffset, ISzAllocPtr alloc) -{ - UInt64 indexSize; - Byte buf[XZ_STREAM_FOOTER_SIZE]; - UInt64 pos = *startOffset; - - if ((pos & 3) != 0 || pos < XZ_STREAM_FOOTER_SIZE) - return SZ_ERROR_NO_ARCHIVE; - - pos -= XZ_STREAM_FOOTER_SIZE; - RINOK(LookInStream_SeekRead_ForArc(stream, pos, buf, XZ_STREAM_FOOTER_SIZE)); - - if (!XZ_FOOTER_SIG_CHECK(buf + 10)) - { - UInt32 total = 0; - pos += XZ_STREAM_FOOTER_SIZE; - - for (;;) - { - size_t i; - #define TEMP_BUF_SIZE (1 << 10) - Byte temp[TEMP_BUF_SIZE]; - - i = (pos > TEMP_BUF_SIZE) ? TEMP_BUF_SIZE : (size_t)pos; - pos -= i; - RINOK(LookInStream_SeekRead_ForArc(stream, pos, temp, i)); - total += (UInt32)i; - for (; i != 0; i--) - if (temp[i - 1] != 0) - break; - if (i != 0) - { - if ((i & 3) != 0) - return SZ_ERROR_NO_ARCHIVE; - pos += i; - break; - } - if (pos < XZ_STREAM_FOOTER_SIZE || total > (1 << 16)) - return SZ_ERROR_NO_ARCHIVE; - } - - if (pos < XZ_STREAM_FOOTER_SIZE) - return SZ_ERROR_NO_ARCHIVE; - pos -= XZ_STREAM_FOOTER_SIZE; - RINOK(LookInStream_SeekRead_ForArc(stream, pos, buf, XZ_STREAM_FOOTER_SIZE)); - if (!XZ_FOOTER_SIG_CHECK(buf + 10)) - return SZ_ERROR_NO_ARCHIVE; - } - - p->flags = (CXzStreamFlags)GetBe16(buf + 8); - - if (!XzFlags_IsSupported(p->flags)) - return SZ_ERROR_UNSUPPORTED; - - if (GetUi32(buf) != CrcCalc(buf + 4, 6)) - return SZ_ERROR_ARCHIVE; - - indexSize = ((UInt64)GetUi32(buf + 4) + 1) << 2; - - if (pos < indexSize) - return SZ_ERROR_ARCHIVE; - - pos -= indexSize; - RINOK(LookInStream_SeekTo(stream, pos)); - RINOK(Xz_ReadIndex(p, stream, indexSize, alloc)); - - { - UInt64 totalSize = Xz_GetPackSize(p); - if (totalSize == XZ_SIZE_OVERFLOW - || totalSize >= ((UInt64)1 << 63) - || pos < totalSize + XZ_STREAM_HEADER_SIZE) - return SZ_ERROR_ARCHIVE; - pos -= (totalSize + XZ_STREAM_HEADER_SIZE); - RINOK(LookInStream_SeekTo(stream, pos)); - *startOffset = pos; - } - { - CXzStreamFlags headerFlags; - CSecToRead secToRead; - SecToRead_CreateVTable(&secToRead); - secToRead.realStream = stream; - - RINOK(Xz_ReadHeader(&headerFlags, &secToRead.vt)); - return (p->flags == headerFlags) ? SZ_OK : SZ_ERROR_ARCHIVE; - } -} - - -/* ---------- Xz Streams ---------- */ - -void Xzs_Construct(CXzs *p) -{ - p->num = p->numAllocated = 0; - p->streams = 0; -} - -void Xzs_Free(CXzs *p, ISzAllocPtr alloc) -{ - size_t i; - for (i = 0; i < p->num; i++) - Xz_Free(&p->streams[i], alloc); - ISzAlloc_Free(alloc, p->streams); - p->num = p->numAllocated = 0; - p->streams = 0; -} - -UInt64 Xzs_GetNumBlocks(const CXzs *p) -{ - UInt64 num = 0; - size_t i; - for (i = 0; i < p->num; i++) - num += p->streams[i].numBlocks; - return num; -} - -UInt64 Xzs_GetUnpackSize(const CXzs *p) -{ - UInt64 size = 0; - size_t i; - for (i = 0; i < p->num; i++) - ADD_SIZE_CHECK(size, Xz_GetUnpackSize(&p->streams[i])); - return size; -} - -/* -UInt64 Xzs_GetPackSize(const CXzs *p) -{ - UInt64 size = 0; - size_t i; - for (i = 0; i < p->num; i++) - ADD_SIZE_CHECK(size, Xz_GetTotalSize(&p->streams[i])); - return size; -} -*/ - -SRes Xzs_ReadBackward(CXzs *p, ILookInStream *stream, Int64 *startOffset, ICompressProgress *progress, ISzAllocPtr alloc) -{ - Int64 endOffset = 0; - RINOK(ILookInStream_Seek(stream, &endOffset, SZ_SEEK_END)); - *startOffset = endOffset; - for (;;) - { - CXzStream st; - SRes res; - Xz_Construct(&st); - res = Xz_ReadBackward(&st, stream, startOffset, alloc); - st.startOffset = *startOffset; - RINOK(res); - if (p->num == p->numAllocated) - { - size_t newNum = p->num + p->num / 4 + 1; - Byte *data = (Byte *)ISzAlloc_Alloc(alloc, newNum * sizeof(CXzStream)); - if (!data) - return SZ_ERROR_MEM; - p->numAllocated = newNum; - if (p->num != 0) - memcpy(data, p->streams, p->num * sizeof(CXzStream)); - ISzAlloc_Free(alloc, p->streams); - p->streams = (CXzStream *)data; - } - p->streams[p->num++] = st; - if (*startOffset == 0) - break; - RINOK(LookInStream_SeekTo(stream, *startOffset)); - if (progress && ICompressProgress_Progress(progress, endOffset - *startOffset, (UInt64)(Int64)-1) != SZ_OK) - return SZ_ERROR_PROGRESS; - } - return SZ_OK; -} diff --git a/code/ryzom/tools/client/client_patcher/CMakeLists.txt b/code/ryzom/tools/client/client_patcher/CMakeLists.txt index ad2eeb629..810f4ccfd 100644 --- a/code/ryzom/tools/client/client_patcher/CMakeLists.txt +++ b/code/ryzom/tools/client/client_patcher/CMakeLists.txt @@ -23,7 +23,7 @@ TARGET_LINK_LIBRARIES(ryzom_client_patcher nelmisc nelnet ryzom_gameshare - ryzom_sevenzip + nel_sevenzip ${CURL_LIBRARIES}) IF(APPLE) diff --git a/code/ryzom/tools/client/ryzom_installer/CMakeLists.txt b/code/ryzom/tools/client/ryzom_installer/CMakeLists.txt index f3949055d..bdd076aec 100644 --- a/code/ryzom/tools/client/ryzom_installer/CMakeLists.txt +++ b/code/ryzom/tools/client/ryzom_installer/CMakeLists.txt @@ -1,5 +1,5 @@ INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR}/src ${CMAKE_CURRENT_SOURCE_DIR} ${NEL_INCLUDE_DIR}) -INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/ryzom/client/src/seven_zip ${ZLIB_INCLUDE_DIR}) +INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/nel/3rdparty/seven_zip ${ZLIB_INCLUDE_DIR}) FILE(GLOB SRC src/*.cpp src/*.h res/*.rc) FILE(GLOB CLIENT_INSTALL_HDR src/*.h) @@ -74,7 +74,7 @@ ENDIF() NL_DEFAULT_PROPS(ryzom_installer_qt "Ryzom, Tools: Ryzom Installer" ) NL_ADD_RUNTIME_FLAGS(ryzom_installer_qt) NL_ADD_LIB_SUFFIX(ryzom_installer_qt) -TARGET_LINK_LIBRARIES(ryzom_installer_qt nelmisc ryzom_sevenzip ${QT_LIBRARIES}) +TARGET_LINK_LIBRARIES(ryzom_installer_qt nelmisc nel_sevenzip ${QT_LIBRARIES}) IF(WIN32) TARGET_LINK_LIBRARIES(ryzom_installer_qt nelmisc ${WINSDK_LIBRARY_DIR}/Version.lib) diff --git a/code/ryzom/tools/patch_gen/CMakeLists.txt b/code/ryzom/tools/patch_gen/CMakeLists.txt index 330733cc2..477e13c26 100644 --- a/code/ryzom/tools/patch_gen/CMakeLists.txt +++ b/code/ryzom/tools/patch_gen/CMakeLists.txt @@ -1,15 +1,15 @@ -INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/ryzom/client/src/seven_zip) +INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/nel/3rdparty/seven_zip) SET(MAIN_SRC patch_gen_common.cpp patch_gen_main.cpp patch_gen_main.h patch_gen.rc) SET(SERVICE_SRC patch_gen_common.cpp patch_gen_service.cpp patch_gen_service.h patch_gen_service.rc) ADD_EXECUTABLE(patch_gen ${MAIN_SRC} ${RECS}) -TARGET_LINK_LIBRARIES(patch_gen ryzom_sevenzip ryzom_gameshare nelmisc nelnet nelligo nelgeorges) +TARGET_LINK_LIBRARIES(patch_gen nel_sevenzip ryzom_gameshare nelmisc nelnet nelligo nelgeorges) NL_DEFAULT_PROPS(patch_gen "Ryzom, Tools: Patch Generator") NL_ADD_RUNTIME_FLAGS(patch_gen) ADD_EXECUTABLE(patch_gen_service WIN32 ${SERVICE_SRC} ${RECS}) -TARGET_LINK_LIBRARIES(patch_gen_service ryzom_sevenzip ryzom_gameshare nelmisc nelnet nelligo nelgeorges) +TARGET_LINK_LIBRARIES(patch_gen_service nel_sevenzip ryzom_gameshare nelmisc nelnet nelligo nelgeorges) NL_DEFAULT_PROPS(patch_gen_service "Ryzom, Tools: Patch Generator Service") NL_ADD_RUNTIME_FLAGS(patch_gen_service) From cf2d5e939f66d4cd8507ee874e253d2c994cc434 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Wed, 13 Nov 2019 18:30:44 +0800 Subject: [PATCH 062/236] Fix build --- code/ryzom/client/src/login_patch.cpp | 2 +- code/ryzom/common/src/game_share/bnp_patch.cpp | 6 +++--- code/ryzom/common/src/game_share/bnp_patch.h | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/code/ryzom/client/src/login_patch.cpp b/code/ryzom/client/src/login_patch.cpp index 908f12977..a21f7cab1 100644 --- a/code/ryzom/client/src/login_patch.cpp +++ b/code/ryzom/client/src/login_patch.cpp @@ -48,6 +48,7 @@ #include "nel/misc/big_file.h" #include "nel/misc/i18n.h" #include "nel/misc/cmd_args.h" +#include "nel/misc/seven_zip.h" #include "game_share/bg_downloader_msg.h" @@ -55,7 +56,6 @@ #include "login.h" #include "user_agent.h" -#include "seven_zip/seven_zip.h" #ifndef RY_BG_DOWNLOADER #include "client_cfg.h" diff --git a/code/ryzom/common/src/game_share/bnp_patch.cpp b/code/ryzom/common/src/game_share/bnp_patch.cpp index baac733e8..72c484c84 100644 --- a/code/ryzom/common/src/game_share/bnp_patch.cpp +++ b/code/ryzom/common/src/game_share/bnp_patch.cpp @@ -74,7 +74,7 @@ bool CBNPFileVersion::setup(const std::string &fileName, uint32 versionNumber) BOMB_IF(!NLMISC::CFile::fileExists(fileName),("File not found: "+fileName).c_str(),return false); // generate a hash key for the file and store it in a vector of uint32 - CHashKey hashKey= getSHA1(fileName); + NLMISC::CHashKey hashKey= NLMISC::getSHA1(fileName); nlassert(hashKey.HashKeyString.size()==20); _HashKey.clear(); for (uint32 i=0;i<5;++i) @@ -137,10 +137,10 @@ uint32 CBNPFileVersion::getPatchSize() const return _PatchSize; } -CHashKey CBNPFileVersion::getHashKey() const +NLMISC::CHashKey CBNPFileVersion::getHashKey() const { nlassert(_HashKey.size()==5); - CHashKey hashKey; + NLMISC::CHashKey hashKey; for (uint32 i=0;i<5;++i) { *(uint32*)&hashKey.HashKeyString[4*i]=_HashKey[i]; diff --git a/code/ryzom/common/src/game_share/bnp_patch.h b/code/ryzom/common/src/game_share/bnp_patch.h index 395727bf0..b2d602194 100644 --- a/code/ryzom/common/src/game_share/bnp_patch.h +++ b/code/ryzom/common/src/game_share/bnp_patch.h @@ -72,7 +72,7 @@ public: uint32 get7ZFileSize() const; uint32 getFileSize() const; uint32 getPatchSize() const; - CHashKey getHashKey() const; + NLMISC::CHashKey getHashKey() const; // == operator bool operator==(const CBNPFileVersion& other) const; From dedb0cbc087ac6b1cdc00eb97ce1292a6fc539ce Mon Sep 17 00:00:00 2001 From: kaetemi Date: Wed, 13 Nov 2019 18:45:36 +0800 Subject: [PATCH 063/236] Revert unused changes --- code/nel/include/nel/misc/sha1.h | 30 ------- code/nel/src/misc/sha1.cpp | 142 ++++++++++++------------------- 2 files changed, 53 insertions(+), 119 deletions(-) diff --git a/code/nel/include/nel/misc/sha1.h b/code/nel/include/nel/misc/sha1.h index 9b7fe937b..33db14f75 100644 --- a/code/nel/include/nel/misc/sha1.h +++ b/code/nel/include/nel/misc/sha1.h @@ -101,27 +101,6 @@ inline bool operator <(const struct CHashKey &a,const struct CHashKey &b) return a.HashKeyString= 16 bits - * - */ - -typedef unsigned int uint32_t; -typedef unsigned char uint8_t; -typedef short int_least16_t; +static const int bufferSize = 100000; +static uint8 buffer[bufferSize]; -namespace NLMISC { +#define SHA1HashSize 20 // -// Constantes +// Types // -static const int bufferSize = 100000; -static uint8_t buffer[bufferSize]; +/* +* This structure will hold context information for the SHA-1 +* hashing operation +*/ +typedef struct SHA1Context +{ + uint32 Intermediate_Hash[SHA1HashSize/4]; /* Message Digest */ + + uint32 Length_Low; /* Message length in bits */ + uint32 Length_High; /* Message length in bits */ + + /* Index into message block array */ + sint16 Message_Block_Index; + uint8 Message_Block[64]; /* 512-bit message blocks */ + + int Computed; /* Is the digest computed? */ + int Corrupted; /* Is the message digest corrupted? */ +} SHA1Context; enum { @@ -75,8 +82,8 @@ enum // int SHA1Reset (SHA1Context *); -int SHA1Input (SHA1Context *, const uint8_t *, unsigned int); -int SHA1Result (SHA1Context *, uint8_t Message_Digest[SHA1HashSize]); +int SHA1Input (SHA1Context *, const uint8 *, unsigned int); +int SHA1Result (SHA1Context *, uint8 Message_Digest[SHA1HashSize]); // // Functions @@ -86,7 +93,7 @@ CHashKey getSHA1(const uint8 *buffer, uint32 size) { SHA1Context sha; int err; - uint8_t Message_Digest[20]; + uint8 Message_Digest[20]; err = SHA1Reset(&sha); if (err) @@ -95,7 +102,7 @@ CHashKey getSHA1(const uint8 *buffer, uint32 size) return CHashKey(); } - err = SHA1Input(&sha, (const uint8_t*)buffer, size); + err = SHA1Input(&sha, (const uint8*)buffer, size); if (err) { nlwarning ("SHA: SHA1Input Error %d.\n", err); @@ -117,7 +124,7 @@ CHashKey getSHA1(const string &filename, bool forcePath) { SHA1Context sha; int err; - uint8_t Message_Digest[20]; + uint8 Message_Digest[20]; //printf("reading '%s'\n", findData.cFileName); CIFile ifile; @@ -168,50 +175,7 @@ CHashKey getSHA1(const string &filename, bool forcePath) return CHashKey(); } - CHashKey hk(Message_Digest); - return hk; -} - -// Begin calculating a SHA1 hash -bool resetSHA1(SHA1Context *context) -{ - int err; - err = SHA1Reset(context); - if (err) - { - nlwarning("SHA: SHA1Reset Error %d.\n", err ); - return false; - } - return true; -} - -// Add data to a SHA1 hash calculation -bool inputSHA1(SHA1Context *context, const uint8 *buffer, uint32 size) -{ - int err; - err = SHA1Input(context, buffer, size); - if (err) - { - nlwarning ("SHA: SHA1Input Error %d.\n", err); - return false; - } - return true; -} - -// Get the SHA1 result -CHashKey getSHA1(SHA1Context *context) -{ - int err; - uint8_t messageDigest[20]; - - err = SHA1Result(context, messageDigest); - if (err) - { - nlwarning("SHA: SHA1Result Error %d, could not compute message digest.\n", err ); - return CHashKey(); - } - - CHashKey hk(messageDigest); + CHashKey hk (Message_Digest); return hk; } @@ -225,9 +189,9 @@ CHashKey getHMacSHA1(const uint8 *text, uint32 text_len, const uint8 *key, uint3 { SHA1Context sha; - uint8_t SHA1_Key[64]; - uint8_t SHA1_Key1[20]; - uint8_t SHA1_Key2[20]; + uint8 SHA1_Key[64]; + uint8 SHA1_Key1[20]; + uint8 SHA1_Key2[20]; string buffer1; string buffer2; @@ -238,9 +202,9 @@ CHashKey getHMacSHA1(const uint8 *text, uint32 text_len, const uint8 *key, uint3 // If lenght of key > 64 use sha1 hash if (key_len > 64) { - uint8_t SHA1_Key0[20]; + uint8 SHA1_Key0[20]; SHA1Reset(&sha); - SHA1Input(&sha, (const uint8_t*)key, key_len); + SHA1Input(&sha, (const uint8*)key, key_len); SHA1Result(&sha, SHA1_Key0); CHashKey hk0 (SHA1_Key0); for (uint i = 0; i < 20; i++) @@ -260,7 +224,7 @@ CHashKey getHMacSHA1(const uint8 *text, uint32 text_len, const uint8 *key, uint3 // Get hash SHA1Reset(&sha); - SHA1Input(&sha, (const uint8_t*)buffer1.c_str(), (uint)buffer1.size()); + SHA1Input(&sha, (const uint8*)buffer1.c_str(), (uint)buffer1.size()); SHA1Result(&sha, SHA1_Key1); CHashKey hk1 (SHA1_Key1); @@ -274,7 +238,7 @@ CHashKey getHMacSHA1(const uint8 *text, uint32 text_len, const uint8 *key, uint3 // Get new hash SHA1Reset(&sha); - SHA1Input(&sha, (const uint8_t*)buffer2.c_str(), (uint)buffer2.size()); + SHA1Input(&sha, (const uint8*)buffer2.c_str(), (uint)buffer2.size()); SHA1Result(&sha, SHA1_Key2); CHashKey hk (SHA1_Key2); @@ -354,7 +318,7 @@ int SHA1Reset(SHA1Context *context) * */ int SHA1Result( SHA1Context *context, - uint8_t Message_Digest[SHA1HashSize]) + uint8 Message_Digest[SHA1HashSize]) { int i; @@ -384,7 +348,7 @@ int SHA1Result( SHA1Context *context, for(i = 0; i < SHA1HashSize; ++i) { - Message_Digest[i] = uint8_t((context->Intermediate_Hash[i>>2] + Message_Digest[i] = uint8((context->Intermediate_Hash[i>>2] >> 8 * ( 3 - ( i & 0x03 ) ) ) & 0xff ); } @@ -412,7 +376,7 @@ int SHA1Result( SHA1Context *context, * */ int SHA1Input( SHA1Context *context, - const uint8_t *message_array, + const uint8 *message_array, unsigned length) { if (!length) @@ -486,16 +450,16 @@ int SHA1Input( SHA1Context *context, */ void SHA1ProcessMessageBlock(SHA1Context *context) { - const uint32_t K[] = { /* Constants defined in SHA-1 */ + const uint32 K[] = { /* Constants defined in SHA-1 */ 0x5A827999, 0x6ED9EBA1, 0x8F1BBCDC, 0xCA62C1D6 }; int t; /* Loop counter */ - uint32_t temp; /* Temporary word value */ - uint32_t W[80]; /* Word sequence */ - uint32_t A, B, C, D, E; /* Word buffers */ + uint32 temp; /* Temporary word value */ + uint32 W[80]; /* Word sequence */ + uint32 A, B, C, D, E; /* Word buffers */ /* * Initialize the first 16 words in the array W @@ -631,14 +595,14 @@ void SHA1PadMessage(SHA1Context *context) /* * Store the message length as the last 8 octets */ - context->Message_Block[56] = uint8_t((context->Length_High >> 24)&0xff); - context->Message_Block[57] = uint8_t((context->Length_High >> 16)&0xff); - context->Message_Block[58] = uint8_t((context->Length_High >> 8)&0xff); - context->Message_Block[59] = uint8_t((context->Length_High)&0xff); - context->Message_Block[60] = uint8_t((context->Length_Low >> 24)&0xff); - context->Message_Block[61] = uint8_t((context->Length_Low >> 16)&0xff); - context->Message_Block[62] = uint8_t((context->Length_Low >> 8)&0xff); - context->Message_Block[63] = uint8_t((context->Length_Low)&0xff); + context->Message_Block[56] = uint8((context->Length_High >> 24)&0xff); + context->Message_Block[57] = uint8((context->Length_High >> 16)&0xff); + context->Message_Block[58] = uint8((context->Length_High >> 8)&0xff); + context->Message_Block[59] = uint8((context->Length_High)&0xff); + context->Message_Block[60] = uint8((context->Length_Low >> 24)&0xff); + context->Message_Block[61] = uint8((context->Length_Low >> 16)&0xff); + context->Message_Block[62] = uint8((context->Length_Low >> 8)&0xff); + context->Message_Block[63] = uint8((context->Length_Low)&0xff); SHA1ProcessMessageBlock(context); } From e9c175d3f320e68d1d8f378bab18aec54a9ccf96 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Wed, 13 Nov 2019 20:04:01 +0800 Subject: [PATCH 064/236] Add ignored files --- .gitignore | 1 - code/nel/3rdparty/seven_zip/7z.h | 202 ++ code/nel/3rdparty/seven_zip/7zAlloc.c | 80 + code/nel/3rdparty/seven_zip/7zArcIn.c | 1771 ++++++++++ code/nel/3rdparty/seven_zip/7zBuf.c | 36 + code/nel/3rdparty/seven_zip/7zBuf.h | 35 + code/nel/3rdparty/seven_zip/7zBuf2.c | 52 + code/nel/3rdparty/seven_zip/7zCrc.c | 128 + code/nel/3rdparty/seven_zip/7zCrcOpt.c | 115 + code/nel/3rdparty/seven_zip/7zDec.c | 591 ++++ code/nel/3rdparty/seven_zip/7zFile.c | 286 ++ code/nel/3rdparty/seven_zip/7zFile.h | 83 + code/nel/3rdparty/seven_zip/7zStream.c | 176 + code/nel/3rdparty/seven_zip/7zVersion.h | 27 + code/nel/3rdparty/seven_zip/7zVersion.rc | 55 + code/nel/3rdparty/seven_zip/Aes.c | 306 ++ code/nel/3rdparty/seven_zip/Aes.h | 38 + code/nel/3rdparty/seven_zip/AesOpt.c | 184 + code/nel/3rdparty/seven_zip/Alloc.c | 455 +++ code/nel/3rdparty/seven_zip/Alloc.h | 51 + code/nel/3rdparty/seven_zip/Bcj2.c | 257 ++ code/nel/3rdparty/seven_zip/Bcj2.h | 146 + code/nel/3rdparty/seven_zip/Bcj2Enc.c | 311 ++ code/nel/3rdparty/seven_zip/Bra.c | 230 ++ code/nel/3rdparty/seven_zip/Bra.h | 64 + code/nel/3rdparty/seven_zip/Bra86.c | 82 + code/nel/3rdparty/seven_zip/BraIA64.c | 53 + code/nel/3rdparty/seven_zip/CMakeLists.txt | 2 +- code/nel/3rdparty/seven_zip/Compiler.h | 33 + code/nel/3rdparty/seven_zip/CpuArch.c | 218 ++ code/nel/3rdparty/seven_zip/CpuArch.h | 336 ++ code/nel/3rdparty/seven_zip/Delta.c | 64 + code/nel/3rdparty/seven_zip/Delta.h | 19 + code/nel/3rdparty/seven_zip/DllSecur.c | 108 + code/nel/3rdparty/seven_zip/DllSecur.h | 20 + code/nel/3rdparty/seven_zip/LzFind.c | 1127 +++++++ code/nel/3rdparty/seven_zip/LzFind.h | 121 + code/nel/3rdparty/seven_zip/LzHash.h | 57 + code/nel/3rdparty/seven_zip/Lzma2Dec.c | 488 +++ code/nel/3rdparty/seven_zip/Lzma2Dec.h | 120 + code/nel/3rdparty/seven_zip/Lzma2DecMt.c | 1082 ++++++ code/nel/3rdparty/seven_zip/Lzma2DecMt.h | 79 + code/nel/3rdparty/seven_zip/Lzma2Enc.c | 803 +++++ code/nel/3rdparty/seven_zip/Lzma2Enc.h | 55 + code/nel/3rdparty/seven_zip/Lzma86.h | 111 + code/nel/3rdparty/seven_zip/Lzma86Dec.c | 54 + code/nel/3rdparty/seven_zip/Lzma86Enc.c | 106 + code/nel/3rdparty/seven_zip/LzmaDec.c | 1185 +++++++ code/nel/3rdparty/seven_zip/LzmaDec.h | 234 ++ code/nel/3rdparty/seven_zip/LzmaEnc.c | 2976 +++++++++++++++++ code/nel/3rdparty/seven_zip/LzmaEnc.h | 76 + code/nel/3rdparty/seven_zip/LzmaLib.c | 40 + code/nel/3rdparty/seven_zip/LzmaLib.h | 131 + code/nel/3rdparty/seven_zip/LzmaUtil.c | 258 ++ code/nel/3rdparty/seven_zip/Ppmd.h | 85 + code/nel/3rdparty/seven_zip/Ppmd7.c | 712 ++++ code/nel/3rdparty/seven_zip/Ppmd7.h | 142 + code/nel/3rdparty/seven_zip/Ppmd7Dec.c | 191 ++ code/nel/3rdparty/seven_zip/Ppmd7Enc.c | 187 ++ code/nel/3rdparty/seven_zip/Precomp.h | 10 + code/nel/3rdparty/seven_zip/RotateDefs.h | 30 + code/nel/3rdparty/seven_zip/Sha256.c | 248 ++ code/nel/3rdparty/seven_zip/Sha256.h | 26 + code/nel/3rdparty/seven_zip/Sort.c | 141 + code/nel/3rdparty/seven_zip/Sort.h | 18 + code/nel/3rdparty/seven_zip/Xz.c | 90 + code/nel/3rdparty/seven_zip/Xz.h | 460 +++ code/nel/3rdparty/seven_zip/XzCrc64.c | 86 + code/nel/3rdparty/seven_zip/XzCrc64.h | 26 + code/nel/3rdparty/seven_zip/XzCrc64Opt.c | 69 + code/nel/3rdparty/seven_zip/XzDec.c | 2766 +++++++++++++++ code/nel/3rdparty/seven_zip/XzEnc.c | 1329 ++++++++ code/nel/3rdparty/seven_zip/XzEnc.h | 60 + code/nel/3rdparty/seven_zip/XzIn.c | 319 ++ .../tools/patch_gen/patch_gen_common.cpp | 2 +- 75 files changed, 22712 insertions(+), 3 deletions(-) create mode 100644 code/nel/3rdparty/seven_zip/7z.h create mode 100644 code/nel/3rdparty/seven_zip/7zAlloc.c create mode 100644 code/nel/3rdparty/seven_zip/7zArcIn.c create mode 100644 code/nel/3rdparty/seven_zip/7zBuf.c create mode 100644 code/nel/3rdparty/seven_zip/7zBuf.h create mode 100644 code/nel/3rdparty/seven_zip/7zBuf2.c create mode 100644 code/nel/3rdparty/seven_zip/7zCrc.c create mode 100644 code/nel/3rdparty/seven_zip/7zCrcOpt.c create mode 100644 code/nel/3rdparty/seven_zip/7zDec.c create mode 100644 code/nel/3rdparty/seven_zip/7zFile.c create mode 100644 code/nel/3rdparty/seven_zip/7zFile.h create mode 100644 code/nel/3rdparty/seven_zip/7zStream.c create mode 100644 code/nel/3rdparty/seven_zip/7zVersion.h create mode 100644 code/nel/3rdparty/seven_zip/7zVersion.rc create mode 100644 code/nel/3rdparty/seven_zip/Aes.c create mode 100644 code/nel/3rdparty/seven_zip/Aes.h create mode 100644 code/nel/3rdparty/seven_zip/AesOpt.c create mode 100644 code/nel/3rdparty/seven_zip/Alloc.c create mode 100644 code/nel/3rdparty/seven_zip/Alloc.h create mode 100644 code/nel/3rdparty/seven_zip/Bcj2.c create mode 100644 code/nel/3rdparty/seven_zip/Bcj2.h create mode 100644 code/nel/3rdparty/seven_zip/Bcj2Enc.c create mode 100644 code/nel/3rdparty/seven_zip/Bra.c create mode 100644 code/nel/3rdparty/seven_zip/Bra.h create mode 100644 code/nel/3rdparty/seven_zip/Bra86.c create mode 100644 code/nel/3rdparty/seven_zip/BraIA64.c create mode 100644 code/nel/3rdparty/seven_zip/Compiler.h create mode 100644 code/nel/3rdparty/seven_zip/CpuArch.c create mode 100644 code/nel/3rdparty/seven_zip/CpuArch.h create mode 100644 code/nel/3rdparty/seven_zip/Delta.c create mode 100644 code/nel/3rdparty/seven_zip/Delta.h create mode 100644 code/nel/3rdparty/seven_zip/DllSecur.c create mode 100644 code/nel/3rdparty/seven_zip/DllSecur.h create mode 100644 code/nel/3rdparty/seven_zip/LzFind.c create mode 100644 code/nel/3rdparty/seven_zip/LzFind.h create mode 100644 code/nel/3rdparty/seven_zip/LzHash.h create mode 100644 code/nel/3rdparty/seven_zip/Lzma2Dec.c create mode 100644 code/nel/3rdparty/seven_zip/Lzma2Dec.h create mode 100644 code/nel/3rdparty/seven_zip/Lzma2DecMt.c create mode 100644 code/nel/3rdparty/seven_zip/Lzma2DecMt.h create mode 100644 code/nel/3rdparty/seven_zip/Lzma2Enc.c create mode 100644 code/nel/3rdparty/seven_zip/Lzma2Enc.h create mode 100644 code/nel/3rdparty/seven_zip/Lzma86.h create mode 100644 code/nel/3rdparty/seven_zip/Lzma86Dec.c create mode 100644 code/nel/3rdparty/seven_zip/Lzma86Enc.c create mode 100644 code/nel/3rdparty/seven_zip/LzmaDec.c create mode 100644 code/nel/3rdparty/seven_zip/LzmaDec.h create mode 100644 code/nel/3rdparty/seven_zip/LzmaEnc.c create mode 100644 code/nel/3rdparty/seven_zip/LzmaEnc.h create mode 100644 code/nel/3rdparty/seven_zip/LzmaLib.c create mode 100644 code/nel/3rdparty/seven_zip/LzmaLib.h create mode 100644 code/nel/3rdparty/seven_zip/LzmaUtil.c create mode 100644 code/nel/3rdparty/seven_zip/Ppmd.h create mode 100644 code/nel/3rdparty/seven_zip/Ppmd7.c create mode 100644 code/nel/3rdparty/seven_zip/Ppmd7.h create mode 100644 code/nel/3rdparty/seven_zip/Ppmd7Dec.c create mode 100644 code/nel/3rdparty/seven_zip/Ppmd7Enc.c create mode 100644 code/nel/3rdparty/seven_zip/Precomp.h create mode 100644 code/nel/3rdparty/seven_zip/RotateDefs.h create mode 100644 code/nel/3rdparty/seven_zip/Sha256.c create mode 100644 code/nel/3rdparty/seven_zip/Sha256.h create mode 100644 code/nel/3rdparty/seven_zip/Sort.c create mode 100644 code/nel/3rdparty/seven_zip/Sort.h create mode 100644 code/nel/3rdparty/seven_zip/Xz.c create mode 100644 code/nel/3rdparty/seven_zip/Xz.h create mode 100644 code/nel/3rdparty/seven_zip/XzCrc64.c create mode 100644 code/nel/3rdparty/seven_zip/XzCrc64.h create mode 100644 code/nel/3rdparty/seven_zip/XzCrc64Opt.c create mode 100644 code/nel/3rdparty/seven_zip/XzDec.c create mode 100644 code/nel/3rdparty/seven_zip/XzEnc.c create mode 100644 code/nel/3rdparty/seven_zip/XzEnc.h create mode 100644 code/nel/3rdparty/seven_zip/XzIn.c diff --git a/.gitignore b/.gitignore index 1f3f7abba..22089c19f 100644 --- a/.gitignore +++ b/.gitignore @@ -142,7 +142,6 @@ moc_*.cpp *.cache *.patch *.7z -3rdParty .svn thumbs.db Thumbs.db diff --git a/code/nel/3rdparty/seven_zip/7z.h b/code/nel/3rdparty/seven_zip/7z.h new file mode 100644 index 000000000..6c7886e38 --- /dev/null +++ b/code/nel/3rdparty/seven_zip/7z.h @@ -0,0 +1,202 @@ +/* 7z.h -- 7z interface +2017-04-03 : Igor Pavlov : Public domain */ + +#ifndef __7Z_H +#define __7Z_H + +#include "7zTypes.h" + +EXTERN_C_BEGIN + +#define k7zStartHeaderSize 0x20 +#define k7zSignatureSize 6 + +extern const Byte k7zSignature[k7zSignatureSize]; + +typedef struct +{ + const Byte *Data; + size_t Size; +} CSzData; + +/* CSzCoderInfo & CSzFolder support only default methods */ + +typedef struct +{ + size_t PropsOffset; + UInt32 MethodID; + Byte NumStreams; + Byte PropsSize; +} CSzCoderInfo; + +typedef struct +{ + UInt32 InIndex; + UInt32 OutIndex; +} CSzBond; + +#define SZ_NUM_CODERS_IN_FOLDER_MAX 4 +#define SZ_NUM_BONDS_IN_FOLDER_MAX 3 +#define SZ_NUM_PACK_STREAMS_IN_FOLDER_MAX 4 + +typedef struct +{ + UInt32 NumCoders; + UInt32 NumBonds; + UInt32 NumPackStreams; + UInt32 UnpackStream; + UInt32 PackStreams[SZ_NUM_PACK_STREAMS_IN_FOLDER_MAX]; + CSzBond Bonds[SZ_NUM_BONDS_IN_FOLDER_MAX]; + CSzCoderInfo Coders[SZ_NUM_CODERS_IN_FOLDER_MAX]; +} CSzFolder; + + +SRes SzGetNextFolderItem(CSzFolder *f, CSzData *sd); + +typedef struct +{ + UInt32 Low; + UInt32 High; +} CNtfsFileTime; + +typedef struct +{ + Byte *Defs; /* MSB 0 bit numbering */ + UInt32 *Vals; +} CSzBitUi32s; + +typedef struct +{ + Byte *Defs; /* MSB 0 bit numbering */ + // UInt64 *Vals; + CNtfsFileTime *Vals; +} CSzBitUi64s; + +#define SzBitArray_Check(p, i) (((p)[(i) >> 3] & (0x80 >> ((i) & 7))) != 0) + +#define SzBitWithVals_Check(p, i) ((p)->Defs && ((p)->Defs[(i) >> 3] & (0x80 >> ((i) & 7))) != 0) + +typedef struct +{ + UInt32 NumPackStreams; + UInt32 NumFolders; + + UInt64 *PackPositions; // NumPackStreams + 1 + CSzBitUi32s FolderCRCs; // NumFolders + + size_t *FoCodersOffsets; // NumFolders + 1 + UInt32 *FoStartPackStreamIndex; // NumFolders + 1 + UInt32 *FoToCoderUnpackSizes; // NumFolders + 1 + Byte *FoToMainUnpackSizeIndex; // NumFolders + UInt64 *CoderUnpackSizes; // for all coders in all folders + + Byte *CodersData; +} CSzAr; + +UInt64 SzAr_GetFolderUnpackSize(const CSzAr *p, UInt32 folderIndex); + +SRes SzAr_DecodeFolder(const CSzAr *p, UInt32 folderIndex, + ILookInStream *stream, UInt64 startPos, + Byte *outBuffer, size_t outSize, + ISzAllocPtr allocMain); + +typedef struct +{ + CSzAr db; + + UInt64 startPosAfterHeader; + UInt64 dataPos; + + UInt32 NumFiles; + + UInt64 *UnpackPositions; // NumFiles + 1 + // Byte *IsEmptyFiles; + Byte *IsDirs; + CSzBitUi32s CRCs; + + CSzBitUi32s Attribs; + // CSzBitUi32s Parents; + CSzBitUi64s MTime; + CSzBitUi64s CTime; + + UInt32 *FolderToFile; // NumFolders + 1 + UInt32 *FileToFolder; // NumFiles + + size_t *FileNameOffsets; /* in 2-byte steps */ + Byte *FileNames; /* UTF-16-LE */ +} CSzArEx; + +#define SzArEx_IsDir(p, i) (SzBitArray_Check((p)->IsDirs, i)) + +#define SzArEx_GetFileSize(p, i) ((p)->UnpackPositions[(i) + 1] - (p)->UnpackPositions[i]) + +void SzArEx_Init(CSzArEx *p); +void SzArEx_Free(CSzArEx *p, ISzAllocPtr alloc); +UInt64 SzArEx_GetFolderStreamPos(const CSzArEx *p, UInt32 folderIndex, UInt32 indexInFolder); +int SzArEx_GetFolderFullPackSize(const CSzArEx *p, UInt32 folderIndex, UInt64 *resSize); + +/* +if dest == NULL, the return value specifies the required size of the buffer, + in 16-bit characters, including the null-terminating character. +if dest != NULL, the return value specifies the number of 16-bit characters that + are written to the dest, including the null-terminating character. */ + +size_t SzArEx_GetFileNameUtf16(const CSzArEx *p, size_t fileIndex, UInt16 *dest); + +/* +size_t SzArEx_GetFullNameLen(const CSzArEx *p, size_t fileIndex); +UInt16 *SzArEx_GetFullNameUtf16_Back(const CSzArEx *p, size_t fileIndex, UInt16 *dest); +*/ + + + +/* + SzArEx_Extract extracts file from archive + + *outBuffer must be 0 before first call for each new archive. + + Extracting cache: + If you need to decompress more than one file, you can send + these values from previous call: + *blockIndex, + *outBuffer, + *outBufferSize + You can consider "*outBuffer" as cache of solid block. If your archive is solid, + it will increase decompression speed. + + If you use external function, you can declare these 3 cache variables + (blockIndex, outBuffer, outBufferSize) as static in that external function. + + Free *outBuffer and set *outBuffer to 0, if you want to flush cache. +*/ + +SRes SzArEx_Extract( + const CSzArEx *db, + ILookInStream *inStream, + UInt32 fileIndex, /* index of file */ + UInt32 *blockIndex, /* index of solid block */ + Byte **outBuffer, /* pointer to pointer to output buffer (allocated with allocMain) */ + size_t *outBufferSize, /* buffer size for output buffer */ + size_t *offset, /* offset of stream for required file in *outBuffer */ + size_t *outSizeProcessed, /* size of file in *outBuffer */ + ISzAllocPtr allocMain, + ISzAllocPtr allocTemp); + + +/* +SzArEx_Open Errors: +SZ_ERROR_NO_ARCHIVE +SZ_ERROR_ARCHIVE +SZ_ERROR_UNSUPPORTED +SZ_ERROR_MEM +SZ_ERROR_CRC +SZ_ERROR_INPUT_EOF +SZ_ERROR_FAIL +*/ + +SRes SzArEx_Open(CSzArEx *p, ILookInStream *inStream, + ISzAllocPtr allocMain, ISzAllocPtr allocTemp); + +EXTERN_C_END + +#endif diff --git a/code/nel/3rdparty/seven_zip/7zAlloc.c b/code/nel/3rdparty/seven_zip/7zAlloc.c new file mode 100644 index 000000000..c924a529f --- /dev/null +++ b/code/nel/3rdparty/seven_zip/7zAlloc.c @@ -0,0 +1,80 @@ +/* 7zAlloc.c -- Allocation functions +2017-04-03 : Igor Pavlov : Public domain */ + +#include "Precomp.h" + +#include + +#include "7zAlloc.h" + +/* #define _SZ_ALLOC_DEBUG */ +/* use _SZ_ALLOC_DEBUG to debug alloc/free operations */ + +#ifdef _SZ_ALLOC_DEBUG + +#ifdef _WIN32 +#include +#endif + +#include +int g_allocCount = 0; +int g_allocCountTemp = 0; + +#endif + +void *SzAlloc(ISzAllocPtr p, size_t size) +{ + UNUSED_VAR(p); + if (size == 0) + return 0; + #ifdef _SZ_ALLOC_DEBUG + fprintf(stderr, "\nAlloc %10u bytes; count = %10d", (unsigned)size, g_allocCount); + g_allocCount++; + #endif + return malloc(size); +} + +void SzFree(ISzAllocPtr p, void *address) +{ + UNUSED_VAR(p); + #ifdef _SZ_ALLOC_DEBUG + if (address != 0) + { + g_allocCount--; + fprintf(stderr, "\nFree; count = %10d", g_allocCount); + } + #endif + free(address); +} + +void *SzAllocTemp(ISzAllocPtr p, size_t size) +{ + UNUSED_VAR(p); + if (size == 0) + return 0; + #ifdef _SZ_ALLOC_DEBUG + fprintf(stderr, "\nAlloc_temp %10u bytes; count = %10d", (unsigned)size, g_allocCountTemp); + g_allocCountTemp++; + #ifdef _WIN32 + return HeapAlloc(GetProcessHeap(), 0, size); + #endif + #endif + return malloc(size); +} + +void SzFreeTemp(ISzAllocPtr p, void *address) +{ + UNUSED_VAR(p); + #ifdef _SZ_ALLOC_DEBUG + if (address != 0) + { + g_allocCountTemp--; + fprintf(stderr, "\nFree_temp; count = %10d", g_allocCountTemp); + } + #ifdef _WIN32 + HeapFree(GetProcessHeap(), 0, address); + return; + #endif + #endif + free(address); +} diff --git a/code/nel/3rdparty/seven_zip/7zArcIn.c b/code/nel/3rdparty/seven_zip/7zArcIn.c new file mode 100644 index 000000000..f74d0fad5 --- /dev/null +++ b/code/nel/3rdparty/seven_zip/7zArcIn.c @@ -0,0 +1,1771 @@ +/* 7zArcIn.c -- 7z Input functions +2018-12-31 : Igor Pavlov : Public domain */ + +#include "Precomp.h" + +#include + +#include "7z.h" +#include "7zBuf.h" +#include "7zCrc.h" +#include "CpuArch.h" + +#define MY_ALLOC(T, p, size, alloc) { \ + if ((p = (T *)ISzAlloc_Alloc(alloc, (size) * sizeof(T))) == NULL) return SZ_ERROR_MEM; } + +#define MY_ALLOC_ZE(T, p, size, alloc) { if ((size) == 0) p = NULL; else MY_ALLOC(T, p, size, alloc) } + +#define MY_ALLOC_AND_CPY(to, size, from, alloc) \ + { MY_ALLOC(Byte, to, size, alloc); memcpy(to, from, size); } + +#define MY_ALLOC_ZE_AND_CPY(to, size, from, alloc) \ + { if ((size) == 0) to = NULL; else { MY_ALLOC_AND_CPY(to, size, from, alloc) } } + +#define k7zMajorVersion 0 + +enum EIdEnum +{ + k7zIdEnd, + k7zIdHeader, + k7zIdArchiveProperties, + k7zIdAdditionalStreamsInfo, + k7zIdMainStreamsInfo, + k7zIdFilesInfo, + k7zIdPackInfo, + k7zIdUnpackInfo, + k7zIdSubStreamsInfo, + k7zIdSize, + k7zIdCRC, + k7zIdFolder, + k7zIdCodersUnpackSize, + k7zIdNumUnpackStream, + k7zIdEmptyStream, + k7zIdEmptyFile, + k7zIdAnti, + k7zIdName, + k7zIdCTime, + k7zIdATime, + k7zIdMTime, + k7zIdWinAttrib, + k7zIdComment, + k7zIdEncodedHeader, + k7zIdStartPos, + k7zIdDummy + // k7zNtSecure, + // k7zParent, + // k7zIsReal +}; + +const Byte k7zSignature[k7zSignatureSize] = {'7', 'z', 0xBC, 0xAF, 0x27, 0x1C}; + +#define SzBitUi32s_Init(p) { (p)->Defs = NULL; (p)->Vals = NULL; } + +static SRes SzBitUi32s_Alloc(CSzBitUi32s *p, size_t num, ISzAllocPtr alloc) +{ + if (num == 0) + { + p->Defs = NULL; + p->Vals = NULL; + } + else + { + MY_ALLOC(Byte, p->Defs, (num + 7) >> 3, alloc); + MY_ALLOC(UInt32, p->Vals, num, alloc); + } + return SZ_OK; +} + +void SzBitUi32s_Free(CSzBitUi32s *p, ISzAllocPtr alloc) +{ + ISzAlloc_Free(alloc, p->Defs); p->Defs = NULL; + ISzAlloc_Free(alloc, p->Vals); p->Vals = NULL; +} + +#define SzBitUi64s_Init(p) { (p)->Defs = NULL; (p)->Vals = NULL; } + +void SzBitUi64s_Free(CSzBitUi64s *p, ISzAllocPtr alloc) +{ + ISzAlloc_Free(alloc, p->Defs); p->Defs = NULL; + ISzAlloc_Free(alloc, p->Vals); p->Vals = NULL; +} + + +static void SzAr_Init(CSzAr *p) +{ + p->NumPackStreams = 0; + p->NumFolders = 0; + + p->PackPositions = NULL; + SzBitUi32s_Init(&p->FolderCRCs); + + p->FoCodersOffsets = NULL; + p->FoStartPackStreamIndex = NULL; + p->FoToCoderUnpackSizes = NULL; + p->FoToMainUnpackSizeIndex = NULL; + p->CoderUnpackSizes = NULL; + + p->CodersData = NULL; +} + +static void SzAr_Free(CSzAr *p, ISzAllocPtr alloc) +{ + ISzAlloc_Free(alloc, p->PackPositions); + SzBitUi32s_Free(&p->FolderCRCs, alloc); + + ISzAlloc_Free(alloc, p->FoCodersOffsets); + ISzAlloc_Free(alloc, p->FoStartPackStreamIndex); + ISzAlloc_Free(alloc, p->FoToCoderUnpackSizes); + ISzAlloc_Free(alloc, p->FoToMainUnpackSizeIndex); + ISzAlloc_Free(alloc, p->CoderUnpackSizes); + + ISzAlloc_Free(alloc, p->CodersData); + + SzAr_Init(p); +} + + +void SzArEx_Init(CSzArEx *p) +{ + SzAr_Init(&p->db); + + p->NumFiles = 0; + p->dataPos = 0; + + p->UnpackPositions = NULL; + p->IsDirs = NULL; + + p->FolderToFile = NULL; + p->FileToFolder = NULL; + + p->FileNameOffsets = NULL; + p->FileNames = NULL; + + SzBitUi32s_Init(&p->CRCs); + SzBitUi32s_Init(&p->Attribs); + // SzBitUi32s_Init(&p->Parents); + SzBitUi64s_Init(&p->MTime); + SzBitUi64s_Init(&p->CTime); +} + +void SzArEx_Free(CSzArEx *p, ISzAllocPtr alloc) +{ + ISzAlloc_Free(alloc, p->UnpackPositions); + ISzAlloc_Free(alloc, p->IsDirs); + + ISzAlloc_Free(alloc, p->FolderToFile); + ISzAlloc_Free(alloc, p->FileToFolder); + + ISzAlloc_Free(alloc, p->FileNameOffsets); + ISzAlloc_Free(alloc, p->FileNames); + + SzBitUi32s_Free(&p->CRCs, alloc); + SzBitUi32s_Free(&p->Attribs, alloc); + // SzBitUi32s_Free(&p->Parents, alloc); + SzBitUi64s_Free(&p->MTime, alloc); + SzBitUi64s_Free(&p->CTime, alloc); + + SzAr_Free(&p->db, alloc); + SzArEx_Init(p); +} + + +static int TestSignatureCandidate(const Byte *testBytes) +{ + unsigned i; + for (i = 0; i < k7zSignatureSize; i++) + if (testBytes[i] != k7zSignature[i]) + return 0; + return 1; +} + +#define SzData_Clear(p) { (p)->Data = NULL; (p)->Size = 0; } + +#define SZ_READ_BYTE_SD(_sd_, dest) if ((_sd_)->Size == 0) return SZ_ERROR_ARCHIVE; (_sd_)->Size--; dest = *(_sd_)->Data++; +#define SZ_READ_BYTE(dest) SZ_READ_BYTE_SD(sd, dest) +#define SZ_READ_BYTE_2(dest) if (sd.Size == 0) return SZ_ERROR_ARCHIVE; sd.Size--; dest = *sd.Data++; + +#define SKIP_DATA(sd, size) { sd->Size -= (size_t)(size); sd->Data += (size_t)(size); } +#define SKIP_DATA2(sd, size) { sd.Size -= (size_t)(size); sd.Data += (size_t)(size); } + +#define SZ_READ_32(dest) if (sd.Size < 4) return SZ_ERROR_ARCHIVE; \ + dest = GetUi32(sd.Data); SKIP_DATA2(sd, 4); + +static MY_NO_INLINE SRes ReadNumber(CSzData *sd, UInt64 *value) +{ + Byte firstByte, mask; + unsigned i; + UInt32 v; + + SZ_READ_BYTE(firstByte); + if ((firstByte & 0x80) == 0) + { + *value = firstByte; + return SZ_OK; + } + SZ_READ_BYTE(v); + if ((firstByte & 0x40) == 0) + { + *value = (((UInt32)firstByte & 0x3F) << 8) | v; + return SZ_OK; + } + SZ_READ_BYTE(mask); + *value = v | ((UInt32)mask << 8); + mask = 0x20; + for (i = 2; i < 8; i++) + { + Byte b; + if ((firstByte & mask) == 0) + { + UInt64 highPart = (unsigned)firstByte & (unsigned)(mask - 1); + *value |= (highPart << (8 * i)); + return SZ_OK; + } + SZ_READ_BYTE(b); + *value |= ((UInt64)b << (8 * i)); + mask >>= 1; + } + return SZ_OK; +} + + +static MY_NO_INLINE SRes SzReadNumber32(CSzData *sd, UInt32 *value) +{ + Byte firstByte; + UInt64 value64; + if (sd->Size == 0) + return SZ_ERROR_ARCHIVE; + firstByte = *sd->Data; + if ((firstByte & 0x80) == 0) + { + *value = firstByte; + sd->Data++; + sd->Size--; + return SZ_OK; + } + RINOK(ReadNumber(sd, &value64)); + if (value64 >= (UInt32)0x80000000 - 1) + return SZ_ERROR_UNSUPPORTED; + if (value64 >= ((UInt64)(1) << ((sizeof(size_t) - 1) * 8 + 4))) + return SZ_ERROR_UNSUPPORTED; + *value = (UInt32)value64; + return SZ_OK; +} + +#define ReadID(sd, value) ReadNumber(sd, value) + +static SRes SkipData(CSzData *sd) +{ + UInt64 size; + RINOK(ReadNumber(sd, &size)); + if (size > sd->Size) + return SZ_ERROR_ARCHIVE; + SKIP_DATA(sd, size); + return SZ_OK; +} + +static SRes WaitId(CSzData *sd, UInt32 id) +{ + for (;;) + { + UInt64 type; + RINOK(ReadID(sd, &type)); + if (type == id) + return SZ_OK; + if (type == k7zIdEnd) + return SZ_ERROR_ARCHIVE; + RINOK(SkipData(sd)); + } +} + +static SRes RememberBitVector(CSzData *sd, UInt32 numItems, const Byte **v) +{ + UInt32 numBytes = (numItems + 7) >> 3; + if (numBytes > sd->Size) + return SZ_ERROR_ARCHIVE; + *v = sd->Data; + SKIP_DATA(sd, numBytes); + return SZ_OK; +} + +static UInt32 CountDefinedBits(const Byte *bits, UInt32 numItems) +{ + Byte b = 0; + unsigned m = 0; + UInt32 sum = 0; + for (; numItems != 0; numItems--) + { + if (m == 0) + { + b = *bits++; + m = 8; + } + m--; + sum += ((b >> m) & 1); + } + return sum; +} + +static MY_NO_INLINE SRes ReadBitVector(CSzData *sd, UInt32 numItems, Byte **v, ISzAllocPtr alloc) +{ + Byte allAreDefined; + Byte *v2; + UInt32 numBytes = (numItems + 7) >> 3; + *v = NULL; + SZ_READ_BYTE(allAreDefined); + if (numBytes == 0) + return SZ_OK; + if (allAreDefined == 0) + { + if (numBytes > sd->Size) + return SZ_ERROR_ARCHIVE; + MY_ALLOC_AND_CPY(*v, numBytes, sd->Data, alloc); + SKIP_DATA(sd, numBytes); + return SZ_OK; + } + MY_ALLOC(Byte, *v, numBytes, alloc); + v2 = *v; + memset(v2, 0xFF, (size_t)numBytes); + { + unsigned numBits = (unsigned)numItems & 7; + if (numBits != 0) + v2[(size_t)numBytes - 1] = (Byte)((((UInt32)1 << numBits) - 1) << (8 - numBits)); + } + return SZ_OK; +} + +static MY_NO_INLINE SRes ReadUi32s(CSzData *sd2, UInt32 numItems, CSzBitUi32s *crcs, ISzAllocPtr alloc) +{ + UInt32 i; + CSzData sd; + UInt32 *vals; + const Byte *defs; + MY_ALLOC_ZE(UInt32, crcs->Vals, numItems, alloc); + sd = *sd2; + defs = crcs->Defs; + vals = crcs->Vals; + for (i = 0; i < numItems; i++) + if (SzBitArray_Check(defs, i)) + { + SZ_READ_32(vals[i]); + } + else + vals[i] = 0; + *sd2 = sd; + return SZ_OK; +} + +static SRes ReadBitUi32s(CSzData *sd, UInt32 numItems, CSzBitUi32s *crcs, ISzAllocPtr alloc) +{ + SzBitUi32s_Free(crcs, alloc); + RINOK(ReadBitVector(sd, numItems, &crcs->Defs, alloc)); + return ReadUi32s(sd, numItems, crcs, alloc); +} + +static SRes SkipBitUi32s(CSzData *sd, UInt32 numItems) +{ + Byte allAreDefined; + UInt32 numDefined = numItems; + SZ_READ_BYTE(allAreDefined); + if (!allAreDefined) + { + size_t numBytes = (numItems + 7) >> 3; + if (numBytes > sd->Size) + return SZ_ERROR_ARCHIVE; + numDefined = CountDefinedBits(sd->Data, numItems); + SKIP_DATA(sd, numBytes); + } + if (numDefined > (sd->Size >> 2)) + return SZ_ERROR_ARCHIVE; + SKIP_DATA(sd, (size_t)numDefined * 4); + return SZ_OK; +} + +static SRes ReadPackInfo(CSzAr *p, CSzData *sd, ISzAllocPtr alloc) +{ + RINOK(SzReadNumber32(sd, &p->NumPackStreams)); + + RINOK(WaitId(sd, k7zIdSize)); + MY_ALLOC(UInt64, p->PackPositions, (size_t)p->NumPackStreams + 1, alloc); + { + UInt64 sum = 0; + UInt32 i; + UInt32 numPackStreams = p->NumPackStreams; + for (i = 0; i < numPackStreams; i++) + { + UInt64 packSize; + p->PackPositions[i] = sum; + RINOK(ReadNumber(sd, &packSize)); + sum += packSize; + if (sum < packSize) + return SZ_ERROR_ARCHIVE; + } + p->PackPositions[i] = sum; + } + + for (;;) + { + UInt64 type; + RINOK(ReadID(sd, &type)); + if (type == k7zIdEnd) + return SZ_OK; + if (type == k7zIdCRC) + { + /* CRC of packed streams is unused now */ + RINOK(SkipBitUi32s(sd, p->NumPackStreams)); + continue; + } + RINOK(SkipData(sd)); + } +} + +/* +static SRes SzReadSwitch(CSzData *sd) +{ + Byte external; + RINOK(SzReadByte(sd, &external)); + return (external == 0) ? SZ_OK: SZ_ERROR_UNSUPPORTED; +} +*/ + +#define k_NumCodersStreams_in_Folder_MAX (SZ_NUM_BONDS_IN_FOLDER_MAX + SZ_NUM_PACK_STREAMS_IN_FOLDER_MAX) + +SRes SzGetNextFolderItem(CSzFolder *f, CSzData *sd) +{ + UInt32 numCoders, i; + UInt32 numInStreams = 0; + const Byte *dataStart = sd->Data; + + f->NumCoders = 0; + f->NumBonds = 0; + f->NumPackStreams = 0; + f->UnpackStream = 0; + + RINOK(SzReadNumber32(sd, &numCoders)); + if (numCoders == 0 || numCoders > SZ_NUM_CODERS_IN_FOLDER_MAX) + return SZ_ERROR_UNSUPPORTED; + + for (i = 0; i < numCoders; i++) + { + Byte mainByte; + CSzCoderInfo *coder = f->Coders + i; + unsigned idSize, j; + UInt64 id; + + SZ_READ_BYTE(mainByte); + if ((mainByte & 0xC0) != 0) + return SZ_ERROR_UNSUPPORTED; + + idSize = (unsigned)(mainByte & 0xF); + if (idSize > sizeof(id)) + return SZ_ERROR_UNSUPPORTED; + if (idSize > sd->Size) + return SZ_ERROR_ARCHIVE; + id = 0; + for (j = 0; j < idSize; j++) + { + id = ((id << 8) | *sd->Data); + sd->Data++; + sd->Size--; + } + if (id > (UInt32)0xFFFFFFFF) + return SZ_ERROR_UNSUPPORTED; + coder->MethodID = (UInt32)id; + + coder->NumStreams = 1; + coder->PropsOffset = 0; + coder->PropsSize = 0; + + if ((mainByte & 0x10) != 0) + { + UInt32 numStreams; + + RINOK(SzReadNumber32(sd, &numStreams)); + if (numStreams > k_NumCodersStreams_in_Folder_MAX) + return SZ_ERROR_UNSUPPORTED; + coder->NumStreams = (Byte)numStreams; + + RINOK(SzReadNumber32(sd, &numStreams)); + if (numStreams != 1) + return SZ_ERROR_UNSUPPORTED; + } + + numInStreams += coder->NumStreams; + + if (numInStreams > k_NumCodersStreams_in_Folder_MAX) + return SZ_ERROR_UNSUPPORTED; + + if ((mainByte & 0x20) != 0) + { + UInt32 propsSize = 0; + RINOK(SzReadNumber32(sd, &propsSize)); + if (propsSize > sd->Size) + return SZ_ERROR_ARCHIVE; + if (propsSize >= 0x80) + return SZ_ERROR_UNSUPPORTED; + coder->PropsOffset = sd->Data - dataStart; + coder->PropsSize = (Byte)propsSize; + sd->Data += (size_t)propsSize; + sd->Size -= (size_t)propsSize; + } + } + + /* + if (numInStreams == 1 && numCoders == 1) + { + f->NumPackStreams = 1; + f->PackStreams[0] = 0; + } + else + */ + { + Byte streamUsed[k_NumCodersStreams_in_Folder_MAX]; + UInt32 numBonds, numPackStreams; + + numBonds = numCoders - 1; + if (numInStreams < numBonds) + return SZ_ERROR_ARCHIVE; + if (numBonds > SZ_NUM_BONDS_IN_FOLDER_MAX) + return SZ_ERROR_UNSUPPORTED; + f->NumBonds = numBonds; + + numPackStreams = numInStreams - numBonds; + if (numPackStreams > SZ_NUM_PACK_STREAMS_IN_FOLDER_MAX) + return SZ_ERROR_UNSUPPORTED; + f->NumPackStreams = numPackStreams; + + for (i = 0; i < numInStreams; i++) + streamUsed[i] = False; + + if (numBonds != 0) + { + Byte coderUsed[SZ_NUM_CODERS_IN_FOLDER_MAX]; + + for (i = 0; i < numCoders; i++) + coderUsed[i] = False; + + for (i = 0; i < numBonds; i++) + { + CSzBond *bp = f->Bonds + i; + + RINOK(SzReadNumber32(sd, &bp->InIndex)); + if (bp->InIndex >= numInStreams || streamUsed[bp->InIndex]) + return SZ_ERROR_ARCHIVE; + streamUsed[bp->InIndex] = True; + + RINOK(SzReadNumber32(sd, &bp->OutIndex)); + if (bp->OutIndex >= numCoders || coderUsed[bp->OutIndex]) + return SZ_ERROR_ARCHIVE; + coderUsed[bp->OutIndex] = True; + } + + for (i = 0; i < numCoders; i++) + if (!coderUsed[i]) + { + f->UnpackStream = i; + break; + } + + if (i == numCoders) + return SZ_ERROR_ARCHIVE; + } + + if (numPackStreams == 1) + { + for (i = 0; i < numInStreams; i++) + if (!streamUsed[i]) + break; + if (i == numInStreams) + return SZ_ERROR_ARCHIVE; + f->PackStreams[0] = i; + } + else + for (i = 0; i < numPackStreams; i++) + { + UInt32 index; + RINOK(SzReadNumber32(sd, &index)); + if (index >= numInStreams || streamUsed[index]) + return SZ_ERROR_ARCHIVE; + streamUsed[index] = True; + f->PackStreams[i] = index; + } + } + + f->NumCoders = numCoders; + + return SZ_OK; +} + + +static MY_NO_INLINE SRes SkipNumbers(CSzData *sd2, UInt32 num) +{ + CSzData sd; + sd = *sd2; + for (; num != 0; num--) + { + Byte firstByte, mask; + unsigned i; + SZ_READ_BYTE_2(firstByte); + if ((firstByte & 0x80) == 0) + continue; + if ((firstByte & 0x40) == 0) + { + if (sd.Size == 0) + return SZ_ERROR_ARCHIVE; + sd.Size--; + sd.Data++; + continue; + } + mask = 0x20; + for (i = 2; i < 8 && (firstByte & mask) != 0; i++) + mask >>= 1; + if (i > sd.Size) + return SZ_ERROR_ARCHIVE; + SKIP_DATA2(sd, i); + } + *sd2 = sd; + return SZ_OK; +} + + +#define k_Scan_NumCoders_MAX 64 +#define k_Scan_NumCodersStreams_in_Folder_MAX 64 + + +static SRes ReadUnpackInfo(CSzAr *p, + CSzData *sd2, + UInt32 numFoldersMax, + const CBuf *tempBufs, UInt32 numTempBufs, + ISzAllocPtr alloc) +{ + CSzData sd; + + UInt32 fo, numFolders, numCodersOutStreams, packStreamIndex; + const Byte *startBufPtr; + Byte external; + + RINOK(WaitId(sd2, k7zIdFolder)); + + RINOK(SzReadNumber32(sd2, &numFolders)); + if (numFolders > numFoldersMax) + return SZ_ERROR_UNSUPPORTED; + p->NumFolders = numFolders; + + SZ_READ_BYTE_SD(sd2, external); + if (external == 0) + sd = *sd2; + else + { + UInt32 index; + RINOK(SzReadNumber32(sd2, &index)); + if (index >= numTempBufs) + return SZ_ERROR_ARCHIVE; + sd.Data = tempBufs[index].data; + sd.Size = tempBufs[index].size; + } + + MY_ALLOC(size_t, p->FoCodersOffsets, (size_t)numFolders + 1, alloc); + MY_ALLOC(UInt32, p->FoStartPackStreamIndex, (size_t)numFolders + 1, alloc); + MY_ALLOC(UInt32, p->FoToCoderUnpackSizes, (size_t)numFolders + 1, alloc); + MY_ALLOC_ZE(Byte, p->FoToMainUnpackSizeIndex, (size_t)numFolders, alloc); + + startBufPtr = sd.Data; + + packStreamIndex = 0; + numCodersOutStreams = 0; + + for (fo = 0; fo < numFolders; fo++) + { + UInt32 numCoders, ci, numInStreams = 0; + + p->FoCodersOffsets[fo] = sd.Data - startBufPtr; + + RINOK(SzReadNumber32(&sd, &numCoders)); + if (numCoders == 0 || numCoders > k_Scan_NumCoders_MAX) + return SZ_ERROR_UNSUPPORTED; + + for (ci = 0; ci < numCoders; ci++) + { + Byte mainByte; + unsigned idSize; + UInt32 coderInStreams; + + SZ_READ_BYTE_2(mainByte); + if ((mainByte & 0xC0) != 0) + return SZ_ERROR_UNSUPPORTED; + idSize = (mainByte & 0xF); + if (idSize > 8) + return SZ_ERROR_UNSUPPORTED; + if (idSize > sd.Size) + return SZ_ERROR_ARCHIVE; + SKIP_DATA2(sd, idSize); + + coderInStreams = 1; + + if ((mainByte & 0x10) != 0) + { + UInt32 coderOutStreams; + RINOK(SzReadNumber32(&sd, &coderInStreams)); + RINOK(SzReadNumber32(&sd, &coderOutStreams)); + if (coderInStreams > k_Scan_NumCodersStreams_in_Folder_MAX || coderOutStreams != 1) + return SZ_ERROR_UNSUPPORTED; + } + + numInStreams += coderInStreams; + + if ((mainByte & 0x20) != 0) + { + UInt32 propsSize; + RINOK(SzReadNumber32(&sd, &propsSize)); + if (propsSize > sd.Size) + return SZ_ERROR_ARCHIVE; + SKIP_DATA2(sd, propsSize); + } + } + + { + UInt32 indexOfMainStream = 0; + UInt32 numPackStreams = 1; + + if (numCoders != 1 || numInStreams != 1) + { + Byte streamUsed[k_Scan_NumCodersStreams_in_Folder_MAX]; + Byte coderUsed[k_Scan_NumCoders_MAX]; + + UInt32 i; + UInt32 numBonds = numCoders - 1; + if (numInStreams < numBonds) + return SZ_ERROR_ARCHIVE; + + if (numInStreams > k_Scan_NumCodersStreams_in_Folder_MAX) + return SZ_ERROR_UNSUPPORTED; + + for (i = 0; i < numInStreams; i++) + streamUsed[i] = False; + for (i = 0; i < numCoders; i++) + coderUsed[i] = False; + + for (i = 0; i < numBonds; i++) + { + UInt32 index; + + RINOK(SzReadNumber32(&sd, &index)); + if (index >= numInStreams || streamUsed[index]) + return SZ_ERROR_ARCHIVE; + streamUsed[index] = True; + + RINOK(SzReadNumber32(&sd, &index)); + if (index >= numCoders || coderUsed[index]) + return SZ_ERROR_ARCHIVE; + coderUsed[index] = True; + } + + numPackStreams = numInStreams - numBonds; + + if (numPackStreams != 1) + for (i = 0; i < numPackStreams; i++) + { + UInt32 index; + RINOK(SzReadNumber32(&sd, &index)); + if (index >= numInStreams || streamUsed[index]) + return SZ_ERROR_ARCHIVE; + streamUsed[index] = True; + } + + for (i = 0; i < numCoders; i++) + if (!coderUsed[i]) + { + indexOfMainStream = i; + break; + } + + if (i == numCoders) + return SZ_ERROR_ARCHIVE; + } + + p->FoStartPackStreamIndex[fo] = packStreamIndex; + p->FoToCoderUnpackSizes[fo] = numCodersOutStreams; + p->FoToMainUnpackSizeIndex[fo] = (Byte)indexOfMainStream; + numCodersOutStreams += numCoders; + if (numCodersOutStreams < numCoders) + return SZ_ERROR_UNSUPPORTED; + if (numPackStreams > p->NumPackStreams - packStreamIndex) + return SZ_ERROR_ARCHIVE; + packStreamIndex += numPackStreams; + } + } + + p->FoToCoderUnpackSizes[fo] = numCodersOutStreams; + + { + size_t dataSize = sd.Data - startBufPtr; + p->FoStartPackStreamIndex[fo] = packStreamIndex; + p->FoCodersOffsets[fo] = dataSize; + MY_ALLOC_ZE_AND_CPY(p->CodersData, dataSize, startBufPtr, alloc); + } + + if (external != 0) + { + if (sd.Size != 0) + return SZ_ERROR_ARCHIVE; + sd = *sd2; + } + + RINOK(WaitId(&sd, k7zIdCodersUnpackSize)); + + MY_ALLOC_ZE(UInt64, p->CoderUnpackSizes, (size_t)numCodersOutStreams, alloc); + { + UInt32 i; + for (i = 0; i < numCodersOutStreams; i++) + { + RINOK(ReadNumber(&sd, p->CoderUnpackSizes + i)); + } + } + + for (;;) + { + UInt64 type; + RINOK(ReadID(&sd, &type)); + if (type == k7zIdEnd) + { + *sd2 = sd; + return SZ_OK; + } + if (type == k7zIdCRC) + { + RINOK(ReadBitUi32s(&sd, numFolders, &p->FolderCRCs, alloc)); + continue; + } + RINOK(SkipData(&sd)); + } +} + + +UInt64 SzAr_GetFolderUnpackSize(const CSzAr *p, UInt32 folderIndex) +{ + return p->CoderUnpackSizes[p->FoToCoderUnpackSizes[folderIndex] + p->FoToMainUnpackSizeIndex[folderIndex]]; +} + + +typedef struct +{ + UInt32 NumTotalSubStreams; + UInt32 NumSubDigests; + CSzData sdNumSubStreams; + CSzData sdSizes; + CSzData sdCRCs; +} CSubStreamInfo; + + +static SRes ReadSubStreamsInfo(CSzAr *p, CSzData *sd, CSubStreamInfo *ssi) +{ + UInt64 type = 0; + UInt32 numSubDigests = 0; + UInt32 numFolders = p->NumFolders; + UInt32 numUnpackStreams = numFolders; + UInt32 numUnpackSizesInData = 0; + + for (;;) + { + RINOK(ReadID(sd, &type)); + if (type == k7zIdNumUnpackStream) + { + UInt32 i; + ssi->sdNumSubStreams.Data = sd->Data; + numUnpackStreams = 0; + numSubDigests = 0; + for (i = 0; i < numFolders; i++) + { + UInt32 numStreams; + RINOK(SzReadNumber32(sd, &numStreams)); + if (numUnpackStreams > numUnpackStreams + numStreams) + return SZ_ERROR_UNSUPPORTED; + numUnpackStreams += numStreams; + if (numStreams != 0) + numUnpackSizesInData += (numStreams - 1); + if (numStreams != 1 || !SzBitWithVals_Check(&p->FolderCRCs, i)) + numSubDigests += numStreams; + } + ssi->sdNumSubStreams.Size = sd->Data - ssi->sdNumSubStreams.Data; + continue; + } + if (type == k7zIdCRC || type == k7zIdSize || type == k7zIdEnd) + break; + RINOK(SkipData(sd)); + } + + if (!ssi->sdNumSubStreams.Data) + { + numSubDigests = numFolders; + if (p->FolderCRCs.Defs) + numSubDigests = numFolders - CountDefinedBits(p->FolderCRCs.Defs, numFolders); + } + + ssi->NumTotalSubStreams = numUnpackStreams; + ssi->NumSubDigests = numSubDigests; + + if (type == k7zIdSize) + { + ssi->sdSizes.Data = sd->Data; + RINOK(SkipNumbers(sd, numUnpackSizesInData)); + ssi->sdSizes.Size = sd->Data - ssi->sdSizes.Data; + RINOK(ReadID(sd, &type)); + } + + for (;;) + { + if (type == k7zIdEnd) + return SZ_OK; + if (type == k7zIdCRC) + { + ssi->sdCRCs.Data = sd->Data; + RINOK(SkipBitUi32s(sd, numSubDigests)); + ssi->sdCRCs.Size = sd->Data - ssi->sdCRCs.Data; + } + else + { + RINOK(SkipData(sd)); + } + RINOK(ReadID(sd, &type)); + } +} + +static SRes SzReadStreamsInfo(CSzAr *p, + CSzData *sd, + UInt32 numFoldersMax, const CBuf *tempBufs, UInt32 numTempBufs, + UInt64 *dataOffset, + CSubStreamInfo *ssi, + ISzAllocPtr alloc) +{ + UInt64 type; + + SzData_Clear(&ssi->sdSizes); + SzData_Clear(&ssi->sdCRCs); + SzData_Clear(&ssi->sdNumSubStreams); + + *dataOffset = 0; + RINOK(ReadID(sd, &type)); + if (type == k7zIdPackInfo) + { + RINOK(ReadNumber(sd, dataOffset)); + RINOK(ReadPackInfo(p, sd, alloc)); + RINOK(ReadID(sd, &type)); + } + if (type == k7zIdUnpackInfo) + { + RINOK(ReadUnpackInfo(p, sd, numFoldersMax, tempBufs, numTempBufs, alloc)); + RINOK(ReadID(sd, &type)); + } + if (type == k7zIdSubStreamsInfo) + { + RINOK(ReadSubStreamsInfo(p, sd, ssi)); + RINOK(ReadID(sd, &type)); + } + else + { + ssi->NumTotalSubStreams = p->NumFolders; + // ssi->NumSubDigests = 0; + } + + return (type == k7zIdEnd ? SZ_OK : SZ_ERROR_UNSUPPORTED); +} + +static SRes SzReadAndDecodePackedStreams( + ILookInStream *inStream, + CSzData *sd, + CBuf *tempBufs, + UInt32 numFoldersMax, + UInt64 baseOffset, + CSzAr *p, + ISzAllocPtr allocTemp) +{ + UInt64 dataStartPos; + UInt32 fo; + CSubStreamInfo ssi; + + RINOK(SzReadStreamsInfo(p, sd, numFoldersMax, NULL, 0, &dataStartPos, &ssi, allocTemp)); + + dataStartPos += baseOffset; + if (p->NumFolders == 0) + return SZ_ERROR_ARCHIVE; + + for (fo = 0; fo < p->NumFolders; fo++) + Buf_Init(tempBufs + fo); + + for (fo = 0; fo < p->NumFolders; fo++) + { + CBuf *tempBuf = tempBufs + fo; + UInt64 unpackSize = SzAr_GetFolderUnpackSize(p, fo); + if ((size_t)unpackSize != unpackSize) + return SZ_ERROR_MEM; + if (!Buf_Create(tempBuf, (size_t)unpackSize, allocTemp)) + return SZ_ERROR_MEM; + } + + for (fo = 0; fo < p->NumFolders; fo++) + { + const CBuf *tempBuf = tempBufs + fo; + RINOK(LookInStream_SeekTo(inStream, dataStartPos)); + RINOK(SzAr_DecodeFolder(p, fo, inStream, dataStartPos, tempBuf->data, tempBuf->size, allocTemp)); + } + + return SZ_OK; +} + +static SRes SzReadFileNames(const Byte *data, size_t size, UInt32 numFiles, size_t *offsets) +{ + size_t pos = 0; + *offsets++ = 0; + if (numFiles == 0) + return (size == 0) ? SZ_OK : SZ_ERROR_ARCHIVE; + if (size < 2) + return SZ_ERROR_ARCHIVE; + if (data[size - 2] != 0 || data[size - 1] != 0) + return SZ_ERROR_ARCHIVE; + do + { + const Byte *p; + if (pos == size) + return SZ_ERROR_ARCHIVE; + for (p = data + pos; + #ifdef _WIN32 + *(const UInt16 *)p != 0 + #else + p[0] != 0 || p[1] != 0 + #endif + ; p += 2); + pos = p - data + 2; + *offsets++ = (pos >> 1); + } + while (--numFiles); + return (pos == size) ? SZ_OK : SZ_ERROR_ARCHIVE; +} + +static MY_NO_INLINE SRes ReadTime(CSzBitUi64s *p, UInt32 num, + CSzData *sd2, + const CBuf *tempBufs, UInt32 numTempBufs, + ISzAllocPtr alloc) +{ + CSzData sd; + UInt32 i; + CNtfsFileTime *vals; + Byte *defs; + Byte external; + + RINOK(ReadBitVector(sd2, num, &p->Defs, alloc)); + + SZ_READ_BYTE_SD(sd2, external); + if (external == 0) + sd = *sd2; + else + { + UInt32 index; + RINOK(SzReadNumber32(sd2, &index)); + if (index >= numTempBufs) + return SZ_ERROR_ARCHIVE; + sd.Data = tempBufs[index].data; + sd.Size = tempBufs[index].size; + } + + MY_ALLOC_ZE(CNtfsFileTime, p->Vals, num, alloc); + vals = p->Vals; + defs = p->Defs; + for (i = 0; i < num; i++) + if (SzBitArray_Check(defs, i)) + { + if (sd.Size < 8) + return SZ_ERROR_ARCHIVE; + vals[i].Low = GetUi32(sd.Data); + vals[i].High = GetUi32(sd.Data + 4); + SKIP_DATA2(sd, 8); + } + else + vals[i].High = vals[i].Low = 0; + + if (external == 0) + *sd2 = sd; + + return SZ_OK; +} + + +#define NUM_ADDITIONAL_STREAMS_MAX 8 + + +static SRes SzReadHeader2( + CSzArEx *p, /* allocMain */ + CSzData *sd, + ILookInStream *inStream, + CBuf *tempBufs, UInt32 *numTempBufs, + ISzAllocPtr allocMain, + ISzAllocPtr allocTemp + ) +{ + CSubStreamInfo ssi; + +{ + UInt64 type; + + SzData_Clear(&ssi.sdSizes); + SzData_Clear(&ssi.sdCRCs); + SzData_Clear(&ssi.sdNumSubStreams); + + ssi.NumSubDigests = 0; + ssi.NumTotalSubStreams = 0; + + RINOK(ReadID(sd, &type)); + + if (type == k7zIdArchiveProperties) + { + for (;;) + { + UInt64 type2; + RINOK(ReadID(sd, &type2)); + if (type2 == k7zIdEnd) + break; + RINOK(SkipData(sd)); + } + RINOK(ReadID(sd, &type)); + } + + if (type == k7zIdAdditionalStreamsInfo) + { + CSzAr tempAr; + SRes res; + + SzAr_Init(&tempAr); + res = SzReadAndDecodePackedStreams(inStream, sd, tempBufs, NUM_ADDITIONAL_STREAMS_MAX, + p->startPosAfterHeader, &tempAr, allocTemp); + *numTempBufs = tempAr.NumFolders; + SzAr_Free(&tempAr, allocTemp); + + if (res != SZ_OK) + return res; + RINOK(ReadID(sd, &type)); + } + + if (type == k7zIdMainStreamsInfo) + { + RINOK(SzReadStreamsInfo(&p->db, sd, (UInt32)1 << 30, tempBufs, *numTempBufs, + &p->dataPos, &ssi, allocMain)); + p->dataPos += p->startPosAfterHeader; + RINOK(ReadID(sd, &type)); + } + + if (type == k7zIdEnd) + { + return SZ_OK; + } + + if (type != k7zIdFilesInfo) + return SZ_ERROR_ARCHIVE; +} + +{ + UInt32 numFiles = 0; + UInt32 numEmptyStreams = 0; + const Byte *emptyStreams = NULL; + const Byte *emptyFiles = NULL; + + RINOK(SzReadNumber32(sd, &numFiles)); + p->NumFiles = numFiles; + + for (;;) + { + UInt64 type; + UInt64 size; + RINOK(ReadID(sd, &type)); + if (type == k7zIdEnd) + break; + RINOK(ReadNumber(sd, &size)); + if (size > sd->Size) + return SZ_ERROR_ARCHIVE; + + if (type >= ((UInt32)1 << 8)) + { + SKIP_DATA(sd, size); + } + else switch ((unsigned)type) + { + case k7zIdName: + { + size_t namesSize; + const Byte *namesData; + Byte external; + + SZ_READ_BYTE(external); + if (external == 0) + { + namesSize = (size_t)size - 1; + namesData = sd->Data; + } + else + { + UInt32 index; + RINOK(SzReadNumber32(sd, &index)); + if (index >= *numTempBufs) + return SZ_ERROR_ARCHIVE; + namesData = (tempBufs)[index].data; + namesSize = (tempBufs)[index].size; + } + + if ((namesSize & 1) != 0) + return SZ_ERROR_ARCHIVE; + MY_ALLOC(size_t, p->FileNameOffsets, numFiles + 1, allocMain); + MY_ALLOC_ZE_AND_CPY(p->FileNames, namesSize, namesData, allocMain); + RINOK(SzReadFileNames(p->FileNames, namesSize, numFiles, p->FileNameOffsets)) + if (external == 0) + { + SKIP_DATA(sd, namesSize); + } + break; + } + case k7zIdEmptyStream: + { + RINOK(RememberBitVector(sd, numFiles, &emptyStreams)); + numEmptyStreams = CountDefinedBits(emptyStreams, numFiles); + emptyFiles = NULL; + break; + } + case k7zIdEmptyFile: + { + RINOK(RememberBitVector(sd, numEmptyStreams, &emptyFiles)); + break; + } + case k7zIdWinAttrib: + { + Byte external; + CSzData sdSwitch; + CSzData *sdPtr; + SzBitUi32s_Free(&p->Attribs, allocMain); + RINOK(ReadBitVector(sd, numFiles, &p->Attribs.Defs, allocMain)); + + SZ_READ_BYTE(external); + if (external == 0) + sdPtr = sd; + else + { + UInt32 index; + RINOK(SzReadNumber32(sd, &index)); + if (index >= *numTempBufs) + return SZ_ERROR_ARCHIVE; + sdSwitch.Data = (tempBufs)[index].data; + sdSwitch.Size = (tempBufs)[index].size; + sdPtr = &sdSwitch; + } + RINOK(ReadUi32s(sdPtr, numFiles, &p->Attribs, allocMain)); + break; + } + /* + case k7zParent: + { + SzBitUi32s_Free(&p->Parents, allocMain); + RINOK(ReadBitVector(sd, numFiles, &p->Parents.Defs, allocMain)); + RINOK(SzReadSwitch(sd)); + RINOK(ReadUi32s(sd, numFiles, &p->Parents, allocMain)); + break; + } + */ + case k7zIdMTime: RINOK(ReadTime(&p->MTime, numFiles, sd, tempBufs, *numTempBufs, allocMain)); break; + case k7zIdCTime: RINOK(ReadTime(&p->CTime, numFiles, sd, tempBufs, *numTempBufs, allocMain)); break; + default: + { + SKIP_DATA(sd, size); + } + } + } + + if (numFiles - numEmptyStreams != ssi.NumTotalSubStreams) + return SZ_ERROR_ARCHIVE; + + for (;;) + { + UInt64 type; + RINOK(ReadID(sd, &type)); + if (type == k7zIdEnd) + break; + RINOK(SkipData(sd)); + } + + { + UInt32 i; + UInt32 emptyFileIndex = 0; + UInt32 folderIndex = 0; + UInt32 remSubStreams = 0; + UInt32 numSubStreams = 0; + UInt64 unpackPos = 0; + const Byte *digestsDefs = NULL; + const Byte *digestsVals = NULL; + UInt32 digestsValsIndex = 0; + UInt32 digestIndex; + Byte allDigestsDefined = 0; + Byte isDirMask = 0; + Byte crcMask = 0; + Byte mask = 0x80; + + MY_ALLOC(UInt32, p->FolderToFile, p->db.NumFolders + 1, allocMain); + MY_ALLOC_ZE(UInt32, p->FileToFolder, p->NumFiles, allocMain); + MY_ALLOC(UInt64, p->UnpackPositions, p->NumFiles + 1, allocMain); + MY_ALLOC_ZE(Byte, p->IsDirs, (p->NumFiles + 7) >> 3, allocMain); + + RINOK(SzBitUi32s_Alloc(&p->CRCs, p->NumFiles, allocMain)); + + if (ssi.sdCRCs.Size != 0) + { + SZ_READ_BYTE_SD(&ssi.sdCRCs, allDigestsDefined); + if (allDigestsDefined) + digestsVals = ssi.sdCRCs.Data; + else + { + size_t numBytes = (ssi.NumSubDigests + 7) >> 3; + digestsDefs = ssi.sdCRCs.Data; + digestsVals = digestsDefs + numBytes; + } + } + + digestIndex = 0; + + for (i = 0; i < numFiles; i++, mask >>= 1) + { + if (mask == 0) + { + UInt32 byteIndex = (i - 1) >> 3; + p->IsDirs[byteIndex] = isDirMask; + p->CRCs.Defs[byteIndex] = crcMask; + isDirMask = 0; + crcMask = 0; + mask = 0x80; + } + + p->UnpackPositions[i] = unpackPos; + p->CRCs.Vals[i] = 0; + + if (emptyStreams && SzBitArray_Check(emptyStreams, i)) + { + if (emptyFiles) + { + if (!SzBitArray_Check(emptyFiles, emptyFileIndex)) + isDirMask |= mask; + emptyFileIndex++; + } + else + isDirMask |= mask; + if (remSubStreams == 0) + { + p->FileToFolder[i] = (UInt32)-1; + continue; + } + } + + if (remSubStreams == 0) + { + for (;;) + { + if (folderIndex >= p->db.NumFolders) + return SZ_ERROR_ARCHIVE; + p->FolderToFile[folderIndex] = i; + numSubStreams = 1; + if (ssi.sdNumSubStreams.Data) + { + RINOK(SzReadNumber32(&ssi.sdNumSubStreams, &numSubStreams)); + } + remSubStreams = numSubStreams; + if (numSubStreams != 0) + break; + { + UInt64 folderUnpackSize = SzAr_GetFolderUnpackSize(&p->db, folderIndex); + unpackPos += folderUnpackSize; + if (unpackPos < folderUnpackSize) + return SZ_ERROR_ARCHIVE; + } + + folderIndex++; + } + } + + p->FileToFolder[i] = folderIndex; + + if (emptyStreams && SzBitArray_Check(emptyStreams, i)) + continue; + + if (--remSubStreams == 0) + { + UInt64 folderUnpackSize = SzAr_GetFolderUnpackSize(&p->db, folderIndex); + UInt64 startFolderUnpackPos = p->UnpackPositions[p->FolderToFile[folderIndex]]; + if (folderUnpackSize < unpackPos - startFolderUnpackPos) + return SZ_ERROR_ARCHIVE; + unpackPos = startFolderUnpackPos + folderUnpackSize; + if (unpackPos < folderUnpackSize) + return SZ_ERROR_ARCHIVE; + + if (numSubStreams == 1 && SzBitWithVals_Check(&p->db.FolderCRCs, i)) + { + p->CRCs.Vals[i] = p->db.FolderCRCs.Vals[folderIndex]; + crcMask |= mask; + } + else if (allDigestsDefined || (digestsDefs && SzBitArray_Check(digestsDefs, digestIndex))) + { + p->CRCs.Vals[i] = GetUi32(digestsVals + (size_t)digestsValsIndex * 4); + digestsValsIndex++; + crcMask |= mask; + } + + folderIndex++; + } + else + { + UInt64 v; + RINOK(ReadNumber(&ssi.sdSizes, &v)); + unpackPos += v; + if (unpackPos < v) + return SZ_ERROR_ARCHIVE; + if (allDigestsDefined || (digestsDefs && SzBitArray_Check(digestsDefs, digestIndex))) + { + p->CRCs.Vals[i] = GetUi32(digestsVals + (size_t)digestsValsIndex * 4); + digestsValsIndex++; + crcMask |= mask; + } + } + } + + if (mask != 0x80) + { + UInt32 byteIndex = (i - 1) >> 3; + p->IsDirs[byteIndex] = isDirMask; + p->CRCs.Defs[byteIndex] = crcMask; + } + + p->UnpackPositions[i] = unpackPos; + + if (remSubStreams != 0) + return SZ_ERROR_ARCHIVE; + + for (;;) + { + p->FolderToFile[folderIndex] = i; + if (folderIndex >= p->db.NumFolders) + break; + if (!ssi.sdNumSubStreams.Data) + return SZ_ERROR_ARCHIVE; + RINOK(SzReadNumber32(&ssi.sdNumSubStreams, &numSubStreams)); + if (numSubStreams != 0) + return SZ_ERROR_ARCHIVE; + /* + { + UInt64 folderUnpackSize = SzAr_GetFolderUnpackSize(&p->db, folderIndex); + unpackPos += folderUnpackSize; + if (unpackPos < folderUnpackSize) + return SZ_ERROR_ARCHIVE; + } + */ + folderIndex++; + } + + if (ssi.sdNumSubStreams.Data && ssi.sdNumSubStreams.Size != 0) + return SZ_ERROR_ARCHIVE; + } +} + return SZ_OK; +} + + +static SRes SzReadHeader( + CSzArEx *p, + CSzData *sd, + ILookInStream *inStream, + ISzAllocPtr allocMain, + ISzAllocPtr allocTemp) +{ + UInt32 i; + UInt32 numTempBufs = 0; + SRes res; + CBuf tempBufs[NUM_ADDITIONAL_STREAMS_MAX]; + + for (i = 0; i < NUM_ADDITIONAL_STREAMS_MAX; i++) + Buf_Init(tempBufs + i); + + res = SzReadHeader2(p, sd, inStream, + tempBufs, &numTempBufs, + allocMain, allocTemp); + + for (i = 0; i < NUM_ADDITIONAL_STREAMS_MAX; i++) + Buf_Free(tempBufs + i, allocTemp); + + RINOK(res); + + if (sd->Size != 0) + return SZ_ERROR_FAIL; + + return res; +} + +static SRes SzArEx_Open2( + CSzArEx *p, + ILookInStream *inStream, + ISzAllocPtr allocMain, + ISzAllocPtr allocTemp) +{ + Byte header[k7zStartHeaderSize]; + Int64 startArcPos; + UInt64 nextHeaderOffset, nextHeaderSize; + size_t nextHeaderSizeT; + UInt32 nextHeaderCRC; + CBuf buf; + SRes res; + + startArcPos = 0; + RINOK(ILookInStream_Seek(inStream, &startArcPos, SZ_SEEK_CUR)); + + RINOK(LookInStream_Read2(inStream, header, k7zStartHeaderSize, SZ_ERROR_NO_ARCHIVE)); + + if (!TestSignatureCandidate(header)) + return SZ_ERROR_NO_ARCHIVE; + if (header[6] != k7zMajorVersion) + return SZ_ERROR_UNSUPPORTED; + + nextHeaderOffset = GetUi64(header + 12); + nextHeaderSize = GetUi64(header + 20); + nextHeaderCRC = GetUi32(header + 28); + + p->startPosAfterHeader = startArcPos + k7zStartHeaderSize; + + if (CrcCalc(header + 12, 20) != GetUi32(header + 8)) + return SZ_ERROR_CRC; + + nextHeaderSizeT = (size_t)nextHeaderSize; + if (nextHeaderSizeT != nextHeaderSize) + return SZ_ERROR_MEM; + if (nextHeaderSizeT == 0) + return SZ_OK; + if (nextHeaderOffset > nextHeaderOffset + nextHeaderSize || + nextHeaderOffset > nextHeaderOffset + nextHeaderSize + k7zStartHeaderSize) + return SZ_ERROR_NO_ARCHIVE; + + { + Int64 pos = 0; + RINOK(ILookInStream_Seek(inStream, &pos, SZ_SEEK_END)); + if ((UInt64)pos < startArcPos + nextHeaderOffset || + (UInt64)pos < startArcPos + k7zStartHeaderSize + nextHeaderOffset || + (UInt64)pos < startArcPos + k7zStartHeaderSize + nextHeaderOffset + nextHeaderSize) + return SZ_ERROR_INPUT_EOF; + } + + RINOK(LookInStream_SeekTo(inStream, startArcPos + k7zStartHeaderSize + nextHeaderOffset)); + + if (!Buf_Create(&buf, nextHeaderSizeT, allocTemp)) + return SZ_ERROR_MEM; + + res = LookInStream_Read(inStream, buf.data, nextHeaderSizeT); + + if (res == SZ_OK) + { + res = SZ_ERROR_ARCHIVE; + if (CrcCalc(buf.data, nextHeaderSizeT) == nextHeaderCRC) + { + CSzData sd; + UInt64 type; + sd.Data = buf.data; + sd.Size = buf.size; + + res = ReadID(&sd, &type); + + if (res == SZ_OK && type == k7zIdEncodedHeader) + { + CSzAr tempAr; + CBuf tempBuf; + Buf_Init(&tempBuf); + + SzAr_Init(&tempAr); + res = SzReadAndDecodePackedStreams(inStream, &sd, &tempBuf, 1, p->startPosAfterHeader, &tempAr, allocTemp); + SzAr_Free(&tempAr, allocTemp); + + if (res != SZ_OK) + { + Buf_Free(&tempBuf, allocTemp); + } + else + { + Buf_Free(&buf, allocTemp); + buf.data = tempBuf.data; + buf.size = tempBuf.size; + sd.Data = buf.data; + sd.Size = buf.size; + res = ReadID(&sd, &type); + } + } + + if (res == SZ_OK) + { + if (type == k7zIdHeader) + { + /* + CSzData sd2; + unsigned ttt; + for (ttt = 0; ttt < 40000; ttt++) + { + SzArEx_Free(p, allocMain); + sd2 = sd; + res = SzReadHeader(p, &sd2, inStream, allocMain, allocTemp); + if (res != SZ_OK) + break; + } + */ + res = SzReadHeader(p, &sd, inStream, allocMain, allocTemp); + } + else + res = SZ_ERROR_UNSUPPORTED; + } + } + } + + Buf_Free(&buf, allocTemp); + return res; +} + + +SRes SzArEx_Open(CSzArEx *p, ILookInStream *inStream, + ISzAllocPtr allocMain, ISzAllocPtr allocTemp) +{ + SRes res = SzArEx_Open2(p, inStream, allocMain, allocTemp); + if (res != SZ_OK) + SzArEx_Free(p, allocMain); + return res; +} + + +SRes SzArEx_Extract( + const CSzArEx *p, + ILookInStream *inStream, + UInt32 fileIndex, + UInt32 *blockIndex, + Byte **tempBuf, + size_t *outBufferSize, + size_t *offset, + size_t *outSizeProcessed, + ISzAllocPtr allocMain, + ISzAllocPtr allocTemp) +{ + UInt32 folderIndex = p->FileToFolder[fileIndex]; + SRes res = SZ_OK; + + *offset = 0; + *outSizeProcessed = 0; + + if (folderIndex == (UInt32)-1) + { + ISzAlloc_Free(allocMain, *tempBuf); + *blockIndex = folderIndex; + *tempBuf = NULL; + *outBufferSize = 0; + return SZ_OK; + } + + if (*tempBuf == NULL || *blockIndex != folderIndex) + { + UInt64 unpackSizeSpec = SzAr_GetFolderUnpackSize(&p->db, folderIndex); + /* + UInt64 unpackSizeSpec = + p->UnpackPositions[p->FolderToFile[(size_t)folderIndex + 1]] - + p->UnpackPositions[p->FolderToFile[folderIndex]]; + */ + size_t unpackSize = (size_t)unpackSizeSpec; + + if (unpackSize != unpackSizeSpec) + return SZ_ERROR_MEM; + *blockIndex = folderIndex; + ISzAlloc_Free(allocMain, *tempBuf); + *tempBuf = NULL; + + if (res == SZ_OK) + { + *outBufferSize = unpackSize; + if (unpackSize != 0) + { + *tempBuf = (Byte *)ISzAlloc_Alloc(allocMain, unpackSize); + if (*tempBuf == NULL) + res = SZ_ERROR_MEM; + } + + if (res == SZ_OK) + { + res = SzAr_DecodeFolder(&p->db, folderIndex, + inStream, p->dataPos, *tempBuf, unpackSize, allocTemp); + } + } + } + + if (res == SZ_OK) + { + UInt64 unpackPos = p->UnpackPositions[fileIndex]; + *offset = (size_t)(unpackPos - p->UnpackPositions[p->FolderToFile[folderIndex]]); + *outSizeProcessed = (size_t)(p->UnpackPositions[(size_t)fileIndex + 1] - unpackPos); + if (*offset + *outSizeProcessed > *outBufferSize) + return SZ_ERROR_FAIL; + if (SzBitWithVals_Check(&p->CRCs, fileIndex)) + if (CrcCalc(*tempBuf + *offset, *outSizeProcessed) != p->CRCs.Vals[fileIndex]) + res = SZ_ERROR_CRC; + } + + return res; +} + + +size_t SzArEx_GetFileNameUtf16(const CSzArEx *p, size_t fileIndex, UInt16 *dest) +{ + size_t offs = p->FileNameOffsets[fileIndex]; + size_t len = p->FileNameOffsets[fileIndex + 1] - offs; + if (dest != 0) + { + size_t i; + const Byte *src = p->FileNames + offs * 2; + for (i = 0; i < len; i++) + dest[i] = GetUi16(src + i * 2); + } + return len; +} + +/* +size_t SzArEx_GetFullNameLen(const CSzArEx *p, size_t fileIndex) +{ + size_t len; + if (!p->FileNameOffsets) + return 1; + len = 0; + for (;;) + { + UInt32 parent = (UInt32)(Int32)-1; + len += p->FileNameOffsets[fileIndex + 1] - p->FileNameOffsets[fileIndex]; + if SzBitWithVals_Check(&p->Parents, fileIndex) + parent = p->Parents.Vals[fileIndex]; + if (parent == (UInt32)(Int32)-1) + return len; + fileIndex = parent; + } +} + +UInt16 *SzArEx_GetFullNameUtf16_Back(const CSzArEx *p, size_t fileIndex, UInt16 *dest) +{ + BoolInt needSlash; + if (!p->FileNameOffsets) + { + *(--dest) = 0; + return dest; + } + needSlash = False; + for (;;) + { + UInt32 parent = (UInt32)(Int32)-1; + size_t curLen = p->FileNameOffsets[fileIndex + 1] - p->FileNameOffsets[fileIndex]; + SzArEx_GetFileNameUtf16(p, fileIndex, dest - curLen); + if (needSlash) + *(dest - 1) = '/'; + needSlash = True; + dest -= curLen; + + if SzBitWithVals_Check(&p->Parents, fileIndex) + parent = p->Parents.Vals[fileIndex]; + if (parent == (UInt32)(Int32)-1) + return dest; + fileIndex = parent; + } +} +*/ diff --git a/code/nel/3rdparty/seven_zip/7zBuf.c b/code/nel/3rdparty/seven_zip/7zBuf.c new file mode 100644 index 000000000..8865c32a8 --- /dev/null +++ b/code/nel/3rdparty/seven_zip/7zBuf.c @@ -0,0 +1,36 @@ +/* 7zBuf.c -- Byte Buffer +2017-04-03 : Igor Pavlov : Public domain */ + +#include "Precomp.h" + +#include "7zBuf.h" + +void Buf_Init(CBuf *p) +{ + p->data = 0; + p->size = 0; +} + +int Buf_Create(CBuf *p, size_t size, ISzAllocPtr alloc) +{ + p->size = 0; + if (size == 0) + { + p->data = 0; + return 1; + } + p->data = (Byte *)ISzAlloc_Alloc(alloc, size); + if (p->data) + { + p->size = size; + return 1; + } + return 0; +} + +void Buf_Free(CBuf *p, ISzAllocPtr alloc) +{ + ISzAlloc_Free(alloc, p->data); + p->data = 0; + p->size = 0; +} diff --git a/code/nel/3rdparty/seven_zip/7zBuf.h b/code/nel/3rdparty/seven_zip/7zBuf.h new file mode 100644 index 000000000..81d1b5b64 --- /dev/null +++ b/code/nel/3rdparty/seven_zip/7zBuf.h @@ -0,0 +1,35 @@ +/* 7zBuf.h -- Byte Buffer +2017-04-03 : Igor Pavlov : Public domain */ + +#ifndef __7Z_BUF_H +#define __7Z_BUF_H + +#include "7zTypes.h" + +EXTERN_C_BEGIN + +typedef struct +{ + Byte *data; + size_t size; +} CBuf; + +void Buf_Init(CBuf *p); +int Buf_Create(CBuf *p, size_t size, ISzAllocPtr alloc); +void Buf_Free(CBuf *p, ISzAllocPtr alloc); + +typedef struct +{ + Byte *data; + size_t size; + size_t pos; +} CDynBuf; + +void DynBuf_Construct(CDynBuf *p); +void DynBuf_SeekToBeg(CDynBuf *p); +int DynBuf_Write(CDynBuf *p, const Byte *buf, size_t size, ISzAllocPtr alloc); +void DynBuf_Free(CDynBuf *p, ISzAllocPtr alloc); + +EXTERN_C_END + +#endif diff --git a/code/nel/3rdparty/seven_zip/7zBuf2.c b/code/nel/3rdparty/seven_zip/7zBuf2.c new file mode 100644 index 000000000..208347416 --- /dev/null +++ b/code/nel/3rdparty/seven_zip/7zBuf2.c @@ -0,0 +1,52 @@ +/* 7zBuf2.c -- Byte Buffer +2017-04-03 : Igor Pavlov : Public domain */ + +#include "Precomp.h" + +#include + +#include "7zBuf.h" + +void DynBuf_Construct(CDynBuf *p) +{ + p->data = 0; + p->size = 0; + p->pos = 0; +} + +void DynBuf_SeekToBeg(CDynBuf *p) +{ + p->pos = 0; +} + +int DynBuf_Write(CDynBuf *p, const Byte *buf, size_t size, ISzAllocPtr alloc) +{ + if (size > p->size - p->pos) + { + size_t newSize = p->pos + size; + Byte *data; + newSize += newSize / 4; + data = (Byte *)ISzAlloc_Alloc(alloc, newSize); + if (!data) + return 0; + p->size = newSize; + if (p->pos != 0) + memcpy(data, p->data, p->pos); + ISzAlloc_Free(alloc, p->data); + p->data = data; + } + if (size != 0) + { + memcpy(p->data + p->pos, buf, size); + p->pos += size; + } + return 1; +} + +void DynBuf_Free(CDynBuf *p, ISzAllocPtr alloc) +{ + ISzAlloc_Free(alloc, p->data); + p->data = 0; + p->size = 0; + p->pos = 0; +} diff --git a/code/nel/3rdparty/seven_zip/7zCrc.c b/code/nel/3rdparty/seven_zip/7zCrc.c new file mode 100644 index 000000000..b4d84f023 --- /dev/null +++ b/code/nel/3rdparty/seven_zip/7zCrc.c @@ -0,0 +1,128 @@ +/* 7zCrc.c -- CRC32 init +2017-06-06 : Igor Pavlov : Public domain */ + +#include "Precomp.h" + +#include "7zCrc.h" +#include "CpuArch.h" + +#define kCrcPoly 0xEDB88320 + +#ifdef MY_CPU_LE + #define CRC_NUM_TABLES 8 +#else + #define CRC_NUM_TABLES 9 + + #define CRC_UINT32_SWAP(v) ((v >> 24) | ((v >> 8) & 0xFF00) | ((v << 8) & 0xFF0000) | (v << 24)) + + UInt32 MY_FAST_CALL CrcUpdateT1_BeT4(UInt32 v, const void *data, size_t size, const UInt32 *table); + UInt32 MY_FAST_CALL CrcUpdateT1_BeT8(UInt32 v, const void *data, size_t size, const UInt32 *table); +#endif + +#ifndef MY_CPU_BE + UInt32 MY_FAST_CALL CrcUpdateT4(UInt32 v, const void *data, size_t size, const UInt32 *table); + UInt32 MY_FAST_CALL CrcUpdateT8(UInt32 v, const void *data, size_t size, const UInt32 *table); +#endif + +typedef UInt32 (MY_FAST_CALL *CRC_FUNC)(UInt32 v, const void *data, size_t size, const UInt32 *table); + +CRC_FUNC g_CrcUpdateT4; +CRC_FUNC g_CrcUpdateT8; +CRC_FUNC g_CrcUpdate; + +UInt32 g_CrcTable[256 * CRC_NUM_TABLES]; + +UInt32 MY_FAST_CALL CrcUpdate(UInt32 v, const void *data, size_t size) +{ + return g_CrcUpdate(v, data, size, g_CrcTable); +} + +UInt32 MY_FAST_CALL CrcCalc(const void *data, size_t size) +{ + return g_CrcUpdate(CRC_INIT_VAL, data, size, g_CrcTable) ^ CRC_INIT_VAL; +} + +#define CRC_UPDATE_BYTE_2(crc, b) (table[((crc) ^ (b)) & 0xFF] ^ ((crc) >> 8)) + +UInt32 MY_FAST_CALL CrcUpdateT1(UInt32 v, const void *data, size_t size, const UInt32 *table) +{ + const Byte *p = (const Byte *)data; + const Byte *pEnd = p + size; + for (; p != pEnd; p++) + v = CRC_UPDATE_BYTE_2(v, *p); + return v; +} + +void MY_FAST_CALL CrcGenerateTable() +{ + UInt32 i; + for (i = 0; i < 256; i++) + { + UInt32 r = i; + unsigned j; + for (j = 0; j < 8; j++) + r = (r >> 1) ^ (kCrcPoly & ((UInt32)0 - (r & 1))); + g_CrcTable[i] = r; + } + for (i = 256; i < 256 * CRC_NUM_TABLES; i++) + { + UInt32 r = g_CrcTable[(size_t)i - 256]; + g_CrcTable[i] = g_CrcTable[r & 0xFF] ^ (r >> 8); + } + + #if CRC_NUM_TABLES < 4 + + g_CrcUpdate = CrcUpdateT1; + + #else + + #ifdef MY_CPU_LE + + g_CrcUpdateT4 = CrcUpdateT4; + g_CrcUpdate = CrcUpdateT4; + + #if CRC_NUM_TABLES >= 8 + g_CrcUpdateT8 = CrcUpdateT8; + + #ifdef MY_CPU_X86_OR_AMD64 + if (!CPU_Is_InOrder()) + #endif + g_CrcUpdate = CrcUpdateT8; + #endif + + #else + { + #ifndef MY_CPU_BE + UInt32 k = 0x01020304; + const Byte *p = (const Byte *)&k; + if (p[0] == 4 && p[1] == 3) + { + g_CrcUpdateT4 = CrcUpdateT4; + g_CrcUpdate = CrcUpdateT4; + #if CRC_NUM_TABLES >= 8 + g_CrcUpdateT8 = CrcUpdateT8; + g_CrcUpdate = CrcUpdateT8; + #endif + } + else if (p[0] != 1 || p[1] != 2) + g_CrcUpdate = CrcUpdateT1; + else + #endif + { + for (i = 256 * CRC_NUM_TABLES - 1; i >= 256; i--) + { + UInt32 x = g_CrcTable[(size_t)i - 256]; + g_CrcTable[i] = CRC_UINT32_SWAP(x); + } + g_CrcUpdateT4 = CrcUpdateT1_BeT4; + g_CrcUpdate = CrcUpdateT1_BeT4; + #if CRC_NUM_TABLES >= 8 + g_CrcUpdateT8 = CrcUpdateT1_BeT8; + g_CrcUpdate = CrcUpdateT1_BeT8; + #endif + } + } + #endif + + #endif +} diff --git a/code/nel/3rdparty/seven_zip/7zCrcOpt.c b/code/nel/3rdparty/seven_zip/7zCrcOpt.c new file mode 100644 index 000000000..73beba298 --- /dev/null +++ b/code/nel/3rdparty/seven_zip/7zCrcOpt.c @@ -0,0 +1,115 @@ +/* 7zCrcOpt.c -- CRC32 calculation +2017-04-03 : Igor Pavlov : Public domain */ + +#include "Precomp.h" + +#include "CpuArch.h" + +#ifndef MY_CPU_BE + +#define CRC_UPDATE_BYTE_2(crc, b) (table[((crc) ^ (b)) & 0xFF] ^ ((crc) >> 8)) + +UInt32 MY_FAST_CALL CrcUpdateT4(UInt32 v, const void *data, size_t size, const UInt32 *table) +{ + const Byte *p = (const Byte *)data; + for (; size > 0 && ((unsigned)(ptrdiff_t)p & 3) != 0; size--, p++) + v = CRC_UPDATE_BYTE_2(v, *p); + for (; size >= 4; size -= 4, p += 4) + { + v ^= *(const UInt32 *)p; + v = + (table + 0x300)[((v ) & 0xFF)] + ^ (table + 0x200)[((v >> 8) & 0xFF)] + ^ (table + 0x100)[((v >> 16) & 0xFF)] + ^ (table + 0x000)[((v >> 24))]; + } + for (; size > 0; size--, p++) + v = CRC_UPDATE_BYTE_2(v, *p); + return v; +} + +UInt32 MY_FAST_CALL CrcUpdateT8(UInt32 v, const void *data, size_t size, const UInt32 *table) +{ + const Byte *p = (const Byte *)data; + for (; size > 0 && ((unsigned)(ptrdiff_t)p & 7) != 0; size--, p++) + v = CRC_UPDATE_BYTE_2(v, *p); + for (; size >= 8; size -= 8, p += 8) + { + UInt32 d; + v ^= *(const UInt32 *)p; + v = + (table + 0x700)[((v ) & 0xFF)] + ^ (table + 0x600)[((v >> 8) & 0xFF)] + ^ (table + 0x500)[((v >> 16) & 0xFF)] + ^ (table + 0x400)[((v >> 24))]; + d = *((const UInt32 *)p + 1); + v ^= + (table + 0x300)[((d ) & 0xFF)] + ^ (table + 0x200)[((d >> 8) & 0xFF)] + ^ (table + 0x100)[((d >> 16) & 0xFF)] + ^ (table + 0x000)[((d >> 24))]; + } + for (; size > 0; size--, p++) + v = CRC_UPDATE_BYTE_2(v, *p); + return v; +} + +#endif + + +#ifndef MY_CPU_LE + +#define CRC_UINT32_SWAP(v) ((v >> 24) | ((v >> 8) & 0xFF00) | ((v << 8) & 0xFF0000) | (v << 24)) + +#define CRC_UPDATE_BYTE_2_BE(crc, b) (table[(((crc) >> 24) ^ (b))] ^ ((crc) << 8)) + +UInt32 MY_FAST_CALL CrcUpdateT1_BeT4(UInt32 v, const void *data, size_t size, const UInt32 *table) +{ + const Byte *p = (const Byte *)data; + table += 0x100; + v = CRC_UINT32_SWAP(v); + for (; size > 0 && ((unsigned)(ptrdiff_t)p & 3) != 0; size--, p++) + v = CRC_UPDATE_BYTE_2_BE(v, *p); + for (; size >= 4; size -= 4, p += 4) + { + v ^= *(const UInt32 *)p; + v = + (table + 0x000)[((v ) & 0xFF)] + ^ (table + 0x100)[((v >> 8) & 0xFF)] + ^ (table + 0x200)[((v >> 16) & 0xFF)] + ^ (table + 0x300)[((v >> 24))]; + } + for (; size > 0; size--, p++) + v = CRC_UPDATE_BYTE_2_BE(v, *p); + return CRC_UINT32_SWAP(v); +} + +UInt32 MY_FAST_CALL CrcUpdateT1_BeT8(UInt32 v, const void *data, size_t size, const UInt32 *table) +{ + const Byte *p = (const Byte *)data; + table += 0x100; + v = CRC_UINT32_SWAP(v); + for (; size > 0 && ((unsigned)(ptrdiff_t)p & 7) != 0; size--, p++) + v = CRC_UPDATE_BYTE_2_BE(v, *p); + for (; size >= 8; size -= 8, p += 8) + { + UInt32 d; + v ^= *(const UInt32 *)p; + v = + (table + 0x400)[((v ) & 0xFF)] + ^ (table + 0x500)[((v >> 8) & 0xFF)] + ^ (table + 0x600)[((v >> 16) & 0xFF)] + ^ (table + 0x700)[((v >> 24))]; + d = *((const UInt32 *)p + 1); + v ^= + (table + 0x000)[((d ) & 0xFF)] + ^ (table + 0x100)[((d >> 8) & 0xFF)] + ^ (table + 0x200)[((d >> 16) & 0xFF)] + ^ (table + 0x300)[((d >> 24))]; + } + for (; size > 0; size--, p++) + v = CRC_UPDATE_BYTE_2_BE(v, *p); + return CRC_UINT32_SWAP(v); +} + +#endif diff --git a/code/nel/3rdparty/seven_zip/7zDec.c b/code/nel/3rdparty/seven_zip/7zDec.c new file mode 100644 index 000000000..7c4635211 --- /dev/null +++ b/code/nel/3rdparty/seven_zip/7zDec.c @@ -0,0 +1,591 @@ +/* 7zDec.c -- Decoding from 7z folder +2019-02-02 : Igor Pavlov : Public domain */ + +#include "Precomp.h" + +#include + +/* #define _7ZIP_PPMD_SUPPPORT */ + +#include "7z.h" +#include "7zCrc.h" + +#include "Bcj2.h" +#include "Bra.h" +#include "CpuArch.h" +#include "Delta.h" +#include "LzmaDec.h" +#include "Lzma2Dec.h" +#ifdef _7ZIP_PPMD_SUPPPORT +#include "Ppmd7.h" +#endif + +#define k_Copy 0 +#define k_Delta 3 +#define k_LZMA2 0x21 +#define k_LZMA 0x30101 +#define k_BCJ 0x3030103 +#define k_BCJ2 0x303011B +#define k_PPC 0x3030205 +#define k_IA64 0x3030401 +#define k_ARM 0x3030501 +#define k_ARMT 0x3030701 +#define k_SPARC 0x3030805 + + +#ifdef _7ZIP_PPMD_SUPPPORT + +#define k_PPMD 0x30401 + +typedef struct +{ + IByteIn vt; + const Byte *cur; + const Byte *end; + const Byte *begin; + UInt64 processed; + BoolInt extra; + SRes res; + const ILookInStream *inStream; +} CByteInToLook; + +static Byte ReadByte(const IByteIn *pp) +{ + CByteInToLook *p = CONTAINER_FROM_VTBL(pp, CByteInToLook, vt); + if (p->cur != p->end) + return *p->cur++; + if (p->res == SZ_OK) + { + size_t size = p->cur - p->begin; + p->processed += size; + p->res = ILookInStream_Skip(p->inStream, size); + size = (1 << 25); + p->res = ILookInStream_Look(p->inStream, (const void **)&p->begin, &size); + p->cur = p->begin; + p->end = p->begin + size; + if (size != 0) + return *p->cur++;; + } + p->extra = True; + return 0; +} + +static SRes SzDecodePpmd(const Byte *props, unsigned propsSize, UInt64 inSize, const ILookInStream *inStream, + Byte *outBuffer, SizeT outSize, ISzAllocPtr allocMain) +{ + CPpmd7 ppmd; + CByteInToLook s; + SRes res = SZ_OK; + + s.vt.Read = ReadByte; + s.inStream = inStream; + s.begin = s.end = s.cur = NULL; + s.extra = False; + s.res = SZ_OK; + s.processed = 0; + + if (propsSize != 5) + return SZ_ERROR_UNSUPPORTED; + + { + unsigned order = props[0]; + UInt32 memSize = GetUi32(props + 1); + if (order < PPMD7_MIN_ORDER || + order > PPMD7_MAX_ORDER || + memSize < PPMD7_MIN_MEM_SIZE || + memSize > PPMD7_MAX_MEM_SIZE) + return SZ_ERROR_UNSUPPORTED; + Ppmd7_Construct(&ppmd); + if (!Ppmd7_Alloc(&ppmd, memSize, allocMain)) + return SZ_ERROR_MEM; + Ppmd7_Init(&ppmd, order); + } + { + CPpmd7z_RangeDec rc; + Ppmd7z_RangeDec_CreateVTable(&rc); + rc.Stream = &s.vt; + if (!Ppmd7z_RangeDec_Init(&rc)) + res = SZ_ERROR_DATA; + else if (s.extra) + res = (s.res != SZ_OK ? s.res : SZ_ERROR_DATA); + else + { + SizeT i; + for (i = 0; i < outSize; i++) + { + int sym = Ppmd7_DecodeSymbol(&ppmd, &rc.vt); + if (s.extra || sym < 0) + break; + outBuffer[i] = (Byte)sym; + } + if (i != outSize) + res = (s.res != SZ_OK ? s.res : SZ_ERROR_DATA); + else if (s.processed + (s.cur - s.begin) != inSize || !Ppmd7z_RangeDec_IsFinishedOK(&rc)) + res = SZ_ERROR_DATA; + } + } + Ppmd7_Free(&ppmd, allocMain); + return res; +} + +#endif + + +static SRes SzDecodeLzma(const Byte *props, unsigned propsSize, UInt64 inSize, ILookInStream *inStream, + Byte *outBuffer, SizeT outSize, ISzAllocPtr allocMain) +{ + CLzmaDec state; + SRes res = SZ_OK; + + LzmaDec_Construct(&state); + RINOK(LzmaDec_AllocateProbs(&state, props, propsSize, allocMain)); + state.dic = outBuffer; + state.dicBufSize = outSize; + LzmaDec_Init(&state); + + for (;;) + { + const void *inBuf = NULL; + size_t lookahead = (1 << 18); + if (lookahead > inSize) + lookahead = (size_t)inSize; + res = ILookInStream_Look(inStream, &inBuf, &lookahead); + if (res != SZ_OK) + break; + + { + SizeT inProcessed = (SizeT)lookahead, dicPos = state.dicPos; + ELzmaStatus status; + res = LzmaDec_DecodeToDic(&state, outSize, (const Byte *)inBuf, &inProcessed, LZMA_FINISH_END, &status); + lookahead -= inProcessed; + inSize -= inProcessed; + if (res != SZ_OK) + break; + + if (status == LZMA_STATUS_FINISHED_WITH_MARK) + { + if (outSize != state.dicPos || inSize != 0) + res = SZ_ERROR_DATA; + break; + } + + if (outSize == state.dicPos && inSize == 0 && status == LZMA_STATUS_MAYBE_FINISHED_WITHOUT_MARK) + break; + + if (inProcessed == 0 && dicPos == state.dicPos) + { + res = SZ_ERROR_DATA; + break; + } + + res = ILookInStream_Skip(inStream, inProcessed); + if (res != SZ_OK) + break; + } + } + + LzmaDec_FreeProbs(&state, allocMain); + return res; +} + + +#ifndef _7Z_NO_METHOD_LZMA2 + +static SRes SzDecodeLzma2(const Byte *props, unsigned propsSize, UInt64 inSize, ILookInStream *inStream, + Byte *outBuffer, SizeT outSize, ISzAllocPtr allocMain) +{ + CLzma2Dec state; + SRes res = SZ_OK; + + Lzma2Dec_Construct(&state); + if (propsSize != 1) + return SZ_ERROR_DATA; + RINOK(Lzma2Dec_AllocateProbs(&state, props[0], allocMain)); + state.decoder.dic = outBuffer; + state.decoder.dicBufSize = outSize; + Lzma2Dec_Init(&state); + + for (;;) + { + const void *inBuf = NULL; + size_t lookahead = (1 << 18); + if (lookahead > inSize) + lookahead = (size_t)inSize; + res = ILookInStream_Look(inStream, &inBuf, &lookahead); + if (res != SZ_OK) + break; + + { + SizeT inProcessed = (SizeT)lookahead, dicPos = state.decoder.dicPos; + ELzmaStatus status; + res = Lzma2Dec_DecodeToDic(&state, outSize, (const Byte *)inBuf, &inProcessed, LZMA_FINISH_END, &status); + lookahead -= inProcessed; + inSize -= inProcessed; + if (res != SZ_OK) + break; + + if (status == LZMA_STATUS_FINISHED_WITH_MARK) + { + if (outSize != state.decoder.dicPos || inSize != 0) + res = SZ_ERROR_DATA; + break; + } + + if (inProcessed == 0 && dicPos == state.decoder.dicPos) + { + res = SZ_ERROR_DATA; + break; + } + + res = ILookInStream_Skip(inStream, inProcessed); + if (res != SZ_OK) + break; + } + } + + Lzma2Dec_FreeProbs(&state, allocMain); + return res; +} + +#endif + + +static SRes SzDecodeCopy(UInt64 inSize, ILookInStream *inStream, Byte *outBuffer) +{ + while (inSize > 0) + { + const void *inBuf; + size_t curSize = (1 << 18); + if (curSize > inSize) + curSize = (size_t)inSize; + RINOK(ILookInStream_Look(inStream, &inBuf, &curSize)); + if (curSize == 0) + return SZ_ERROR_INPUT_EOF; + memcpy(outBuffer, inBuf, curSize); + outBuffer += curSize; + inSize -= curSize; + RINOK(ILookInStream_Skip(inStream, curSize)); + } + return SZ_OK; +} + +static BoolInt IS_MAIN_METHOD(UInt32 m) +{ + switch (m) + { + case k_Copy: + case k_LZMA: + #ifndef _7Z_NO_METHOD_LZMA2 + case k_LZMA2: + #endif + #ifdef _7ZIP_PPMD_SUPPPORT + case k_PPMD: + #endif + return True; + } + return False; +} + +static BoolInt IS_SUPPORTED_CODER(const CSzCoderInfo *c) +{ + return + c->NumStreams == 1 + /* && c->MethodID <= (UInt32)0xFFFFFFFF */ + && IS_MAIN_METHOD((UInt32)c->MethodID); +} + +#define IS_BCJ2(c) ((c)->MethodID == k_BCJ2 && (c)->NumStreams == 4) + +static SRes CheckSupportedFolder(const CSzFolder *f) +{ + if (f->NumCoders < 1 || f->NumCoders > 4) + return SZ_ERROR_UNSUPPORTED; + if (!IS_SUPPORTED_CODER(&f->Coders[0])) + return SZ_ERROR_UNSUPPORTED; + if (f->NumCoders == 1) + { + if (f->NumPackStreams != 1 || f->PackStreams[0] != 0 || f->NumBonds != 0) + return SZ_ERROR_UNSUPPORTED; + return SZ_OK; + } + + + #ifndef _7Z_NO_METHODS_FILTERS + + if (f->NumCoders == 2) + { + const CSzCoderInfo *c = &f->Coders[1]; + if ( + /* c->MethodID > (UInt32)0xFFFFFFFF || */ + c->NumStreams != 1 + || f->NumPackStreams != 1 + || f->PackStreams[0] != 0 + || f->NumBonds != 1 + || f->Bonds[0].InIndex != 1 + || f->Bonds[0].OutIndex != 0) + return SZ_ERROR_UNSUPPORTED; + switch ((UInt32)c->MethodID) + { + case k_Delta: + case k_BCJ: + case k_PPC: + case k_IA64: + case k_SPARC: + case k_ARM: + case k_ARMT: + break; + default: + return SZ_ERROR_UNSUPPORTED; + } + return SZ_OK; + } + + #endif + + + if (f->NumCoders == 4) + { + if (!IS_SUPPORTED_CODER(&f->Coders[1]) + || !IS_SUPPORTED_CODER(&f->Coders[2]) + || !IS_BCJ2(&f->Coders[3])) + return SZ_ERROR_UNSUPPORTED; + if (f->NumPackStreams != 4 + || f->PackStreams[0] != 2 + || f->PackStreams[1] != 6 + || f->PackStreams[2] != 1 + || f->PackStreams[3] != 0 + || f->NumBonds != 3 + || f->Bonds[0].InIndex != 5 || f->Bonds[0].OutIndex != 0 + || f->Bonds[1].InIndex != 4 || f->Bonds[1].OutIndex != 1 + || f->Bonds[2].InIndex != 3 || f->Bonds[2].OutIndex != 2) + return SZ_ERROR_UNSUPPORTED; + return SZ_OK; + } + + return SZ_ERROR_UNSUPPORTED; +} + +#define CASE_BRA_CONV(isa) case k_ ## isa: isa ## _Convert(outBuffer, outSize, 0, 0); break; + +static SRes SzFolder_Decode2(const CSzFolder *folder, + const Byte *propsData, + const UInt64 *unpackSizes, + const UInt64 *packPositions, + ILookInStream *inStream, UInt64 startPos, + Byte *outBuffer, SizeT outSize, ISzAllocPtr allocMain, + Byte *tempBuf[]) +{ + UInt32 ci; + SizeT tempSizes[3] = { 0, 0, 0}; + SizeT tempSize3 = 0; + Byte *tempBuf3 = 0; + + RINOK(CheckSupportedFolder(folder)); + + for (ci = 0; ci < folder->NumCoders; ci++) + { + const CSzCoderInfo *coder = &folder->Coders[ci]; + + if (IS_MAIN_METHOD((UInt32)coder->MethodID)) + { + UInt32 si = 0; + UInt64 offset; + UInt64 inSize; + Byte *outBufCur = outBuffer; + SizeT outSizeCur = outSize; + if (folder->NumCoders == 4) + { + UInt32 indices[] = { 3, 2, 0 }; + UInt64 unpackSize = unpackSizes[ci]; + si = indices[ci]; + if (ci < 2) + { + Byte *temp; + outSizeCur = (SizeT)unpackSize; + if (outSizeCur != unpackSize) + return SZ_ERROR_MEM; + temp = (Byte *)ISzAlloc_Alloc(allocMain, outSizeCur); + if (!temp && outSizeCur != 0) + return SZ_ERROR_MEM; + outBufCur = tempBuf[1 - ci] = temp; + tempSizes[1 - ci] = outSizeCur; + } + else if (ci == 2) + { + if (unpackSize > outSize) /* check it */ + return SZ_ERROR_PARAM; + tempBuf3 = outBufCur = outBuffer + (outSize - (size_t)unpackSize); + tempSize3 = outSizeCur = (SizeT)unpackSize; + } + else + return SZ_ERROR_UNSUPPORTED; + } + offset = packPositions[si]; + inSize = packPositions[(size_t)si + 1] - offset; + RINOK(LookInStream_SeekTo(inStream, startPos + offset)); + + if (coder->MethodID == k_Copy) + { + if (inSize != outSizeCur) /* check it */ + return SZ_ERROR_DATA; + RINOK(SzDecodeCopy(inSize, inStream, outBufCur)); + } + else if (coder->MethodID == k_LZMA) + { + RINOK(SzDecodeLzma(propsData + coder->PropsOffset, coder->PropsSize, inSize, inStream, outBufCur, outSizeCur, allocMain)); + } + #ifndef _7Z_NO_METHOD_LZMA2 + else if (coder->MethodID == k_LZMA2) + { + RINOK(SzDecodeLzma2(propsData + coder->PropsOffset, coder->PropsSize, inSize, inStream, outBufCur, outSizeCur, allocMain)); + } + #endif + #ifdef _7ZIP_PPMD_SUPPPORT + else if (coder->MethodID == k_PPMD) + { + RINOK(SzDecodePpmd(propsData + coder->PropsOffset, coder->PropsSize, inSize, inStream, outBufCur, outSizeCur, allocMain)); + } + #endif + else + return SZ_ERROR_UNSUPPORTED; + } + else if (coder->MethodID == k_BCJ2) + { + UInt64 offset = packPositions[1]; + UInt64 s3Size = packPositions[2] - offset; + + if (ci != 3) + return SZ_ERROR_UNSUPPORTED; + + tempSizes[2] = (SizeT)s3Size; + if (tempSizes[2] != s3Size) + return SZ_ERROR_MEM; + tempBuf[2] = (Byte *)ISzAlloc_Alloc(allocMain, tempSizes[2]); + if (!tempBuf[2] && tempSizes[2] != 0) + return SZ_ERROR_MEM; + + RINOK(LookInStream_SeekTo(inStream, startPos + offset)); + RINOK(SzDecodeCopy(s3Size, inStream, tempBuf[2])); + + if ((tempSizes[0] & 3) != 0 || + (tempSizes[1] & 3) != 0 || + tempSize3 + tempSizes[0] + tempSizes[1] != outSize) + return SZ_ERROR_DATA; + + { + CBcj2Dec p; + + p.bufs[0] = tempBuf3; p.lims[0] = tempBuf3 + tempSize3; + p.bufs[1] = tempBuf[0]; p.lims[1] = tempBuf[0] + tempSizes[0]; + p.bufs[2] = tempBuf[1]; p.lims[2] = tempBuf[1] + tempSizes[1]; + p.bufs[3] = tempBuf[2]; p.lims[3] = tempBuf[2] + tempSizes[2]; + + p.dest = outBuffer; + p.destLim = outBuffer + outSize; + + Bcj2Dec_Init(&p); + RINOK(Bcj2Dec_Decode(&p)); + + { + unsigned i; + for (i = 0; i < 4; i++) + if (p.bufs[i] != p.lims[i]) + return SZ_ERROR_DATA; + + if (!Bcj2Dec_IsFinished(&p)) + return SZ_ERROR_DATA; + + if (p.dest != p.destLim + || p.state != BCJ2_STREAM_MAIN) + return SZ_ERROR_DATA; + } + } + } + #ifndef _7Z_NO_METHODS_FILTERS + else if (ci == 1) + { + if (coder->MethodID == k_Delta) + { + if (coder->PropsSize != 1) + return SZ_ERROR_UNSUPPORTED; + { + Byte state[DELTA_STATE_SIZE]; + Delta_Init(state); + Delta_Decode(state, (unsigned)(propsData[coder->PropsOffset]) + 1, outBuffer, outSize); + } + } + else + { + if (coder->PropsSize != 0) + return SZ_ERROR_UNSUPPORTED; + switch (coder->MethodID) + { + case k_BCJ: + { + UInt32 state; + x86_Convert_Init(state); + x86_Convert(outBuffer, outSize, 0, &state, 0); + break; + } + CASE_BRA_CONV(PPC) + CASE_BRA_CONV(IA64) + CASE_BRA_CONV(SPARC) + CASE_BRA_CONV(ARM) + CASE_BRA_CONV(ARMT) + default: + return SZ_ERROR_UNSUPPORTED; + } + } + } + #endif + else + return SZ_ERROR_UNSUPPORTED; + } + + return SZ_OK; +} + + +SRes SzAr_DecodeFolder(const CSzAr *p, UInt32 folderIndex, + ILookInStream *inStream, UInt64 startPos, + Byte *outBuffer, size_t outSize, + ISzAllocPtr allocMain) +{ + SRes res; + CSzFolder folder; + CSzData sd; + + const Byte *data = p->CodersData + p->FoCodersOffsets[folderIndex]; + sd.Data = data; + sd.Size = p->FoCodersOffsets[(size_t)folderIndex + 1] - p->FoCodersOffsets[folderIndex]; + + res = SzGetNextFolderItem(&folder, &sd); + + if (res != SZ_OK) + return res; + + if (sd.Size != 0 + || folder.UnpackStream != p->FoToMainUnpackSizeIndex[folderIndex] + || outSize != SzAr_GetFolderUnpackSize(p, folderIndex)) + return SZ_ERROR_FAIL; + { + unsigned i; + Byte *tempBuf[3] = { 0, 0, 0}; + + res = SzFolder_Decode2(&folder, data, + &p->CoderUnpackSizes[p->FoToCoderUnpackSizes[folderIndex]], + p->PackPositions + p->FoStartPackStreamIndex[folderIndex], + inStream, startPos, + outBuffer, (SizeT)outSize, allocMain, tempBuf); + + for (i = 0; i < 3; i++) + ISzAlloc_Free(allocMain, tempBuf[i]); + + if (res == SZ_OK) + if (SzBitWithVals_Check(&p->FolderCRCs, folderIndex)) + if (CrcCalc(outBuffer, outSize) != p->FolderCRCs.Vals[folderIndex]) + res = SZ_ERROR_CRC; + + return res; + } +} diff --git a/code/nel/3rdparty/seven_zip/7zFile.c b/code/nel/3rdparty/seven_zip/7zFile.c new file mode 100644 index 000000000..8992fb1c5 --- /dev/null +++ b/code/nel/3rdparty/seven_zip/7zFile.c @@ -0,0 +1,286 @@ +/* 7zFile.c -- File IO +2017-04-03 : Igor Pavlov : Public domain */ + +#include "Precomp.h" + +#include "7zFile.h" + +#ifndef USE_WINDOWS_FILE + +#ifndef UNDER_CE +#include +#endif + +#else + +/* + ReadFile and WriteFile functions in Windows have BUG: + If you Read or Write 64MB or more (probably min_failure_size = 64MB - 32KB + 1) + from/to Network file, it returns ERROR_NO_SYSTEM_RESOURCES + (Insufficient system resources exist to complete the requested service). + Probably in some version of Windows there are problems with other sizes: + for 32 MB (maybe also for 16 MB). + And message can be "Network connection was lost" +*/ + +#define kChunkSizeMax (1 << 22) + +#endif + +void File_Construct(CSzFile *p) +{ + #ifdef USE_WINDOWS_FILE + p->handle = INVALID_HANDLE_VALUE; + #else + p->file = NULL; + #endif +} + +#if !defined(UNDER_CE) || !defined(USE_WINDOWS_FILE) +static WRes File_Open(CSzFile *p, const char *name, int writeMode) +{ + #ifdef USE_WINDOWS_FILE + p->handle = CreateFileA(name, + writeMode ? GENERIC_WRITE : GENERIC_READ, + FILE_SHARE_READ, NULL, + writeMode ? CREATE_ALWAYS : OPEN_EXISTING, + FILE_ATTRIBUTE_NORMAL, NULL); + return (p->handle != INVALID_HANDLE_VALUE) ? 0 : GetLastError(); + #else + p->file = fopen(name, writeMode ? "wb+" : "rb"); + return (p->file != 0) ? 0 : + #ifdef UNDER_CE + 2; /* ENOENT */ + #else + errno; + #endif + #endif +} + +WRes InFile_Open(CSzFile *p, const char *name) { return File_Open(p, name, 0); } +WRes OutFile_Open(CSzFile *p, const char *name) { return File_Open(p, name, 1); } +#endif + +#ifdef USE_WINDOWS_FILE +static WRes File_OpenW(CSzFile *p, const WCHAR *name, int writeMode) +{ + p->handle = CreateFileW(name, + writeMode ? GENERIC_WRITE : GENERIC_READ, + FILE_SHARE_READ, NULL, + writeMode ? CREATE_ALWAYS : OPEN_EXISTING, + FILE_ATTRIBUTE_NORMAL, NULL); + return (p->handle != INVALID_HANDLE_VALUE) ? 0 : GetLastError(); +} +WRes InFile_OpenW(CSzFile *p, const WCHAR *name) { return File_OpenW(p, name, 0); } +WRes OutFile_OpenW(CSzFile *p, const WCHAR *name) { return File_OpenW(p, name, 1); } +#endif + +WRes File_Close(CSzFile *p) +{ + #ifdef USE_WINDOWS_FILE + if (p->handle != INVALID_HANDLE_VALUE) + { + if (!CloseHandle(p->handle)) + return GetLastError(); + p->handle = INVALID_HANDLE_VALUE; + } + #else + if (p->file != NULL) + { + int res = fclose(p->file); + if (res != 0) + return res; + p->file = NULL; + } + #endif + return 0; +} + +WRes File_Read(CSzFile *p, void *data, size_t *size) +{ + size_t originalSize = *size; + if (originalSize == 0) + return 0; + + #ifdef USE_WINDOWS_FILE + + *size = 0; + do + { + DWORD curSize = (originalSize > kChunkSizeMax) ? kChunkSizeMax : (DWORD)originalSize; + DWORD processed = 0; + BOOL res = ReadFile(p->handle, data, curSize, &processed, NULL); + data = (void *)((Byte *)data + processed); + originalSize -= processed; + *size += processed; + if (!res) + return GetLastError(); + if (processed == 0) + break; + } + while (originalSize > 0); + return 0; + + #else + + *size = fread(data, 1, originalSize, p->file); + if (*size == originalSize) + return 0; + return ferror(p->file); + + #endif +} + +WRes File_Write(CSzFile *p, const void *data, size_t *size) +{ + size_t originalSize = *size; + if (originalSize == 0) + return 0; + + #ifdef USE_WINDOWS_FILE + + *size = 0; + do + { + DWORD curSize = (originalSize > kChunkSizeMax) ? kChunkSizeMax : (DWORD)originalSize; + DWORD processed = 0; + BOOL res = WriteFile(p->handle, data, curSize, &processed, NULL); + data = (void *)((Byte *)data + processed); + originalSize -= processed; + *size += processed; + if (!res) + return GetLastError(); + if (processed == 0) + break; + } + while (originalSize > 0); + return 0; + + #else + + *size = fwrite(data, 1, originalSize, p->file); + if (*size == originalSize) + return 0; + return ferror(p->file); + + #endif +} + +WRes File_Seek(CSzFile *p, Int64 *pos, ESzSeek origin) +{ + #ifdef USE_WINDOWS_FILE + + LARGE_INTEGER value; + DWORD moveMethod; + value.LowPart = (DWORD)*pos; + value.HighPart = (LONG)((UInt64)*pos >> 16 >> 16); /* for case when UInt64 is 32-bit only */ + switch (origin) + { + case SZ_SEEK_SET: moveMethod = FILE_BEGIN; break; + case SZ_SEEK_CUR: moveMethod = FILE_CURRENT; break; + case SZ_SEEK_END: moveMethod = FILE_END; break; + default: return ERROR_INVALID_PARAMETER; + } + value.LowPart = SetFilePointer(p->handle, value.LowPart, &value.HighPart, moveMethod); + if (value.LowPart == 0xFFFFFFFF) + { + WRes res = GetLastError(); + if (res != NO_ERROR) + return res; + } + *pos = ((Int64)value.HighPart << 32) | value.LowPart; + return 0; + + #else + + int moveMethod; + int res; + switch (origin) + { + case SZ_SEEK_SET: moveMethod = SEEK_SET; break; + case SZ_SEEK_CUR: moveMethod = SEEK_CUR; break; + case SZ_SEEK_END: moveMethod = SEEK_END; break; + default: return 1; + } + res = fseek(p->file, (long)*pos, moveMethod); + *pos = ftell(p->file); + return res; + + #endif +} + +WRes File_GetLength(CSzFile *p, UInt64 *length) +{ + #ifdef USE_WINDOWS_FILE + + DWORD sizeHigh; + DWORD sizeLow = GetFileSize(p->handle, &sizeHigh); + if (sizeLow == 0xFFFFFFFF) + { + DWORD res = GetLastError(); + if (res != NO_ERROR) + return res; + } + *length = (((UInt64)sizeHigh) << 32) + sizeLow; + return 0; + + #else + + long pos = ftell(p->file); + int res = fseek(p->file, 0, SEEK_END); + *length = ftell(p->file); + fseek(p->file, pos, SEEK_SET); + return res; + + #endif +} + + +/* ---------- FileSeqInStream ---------- */ + +static SRes FileSeqInStream_Read(const ISeqInStream *pp, void *buf, size_t *size) +{ + CFileSeqInStream *p = CONTAINER_FROM_VTBL(pp, CFileSeqInStream, vt); + return File_Read(&p->file, buf, size) == 0 ? SZ_OK : SZ_ERROR_READ; +} + +void FileSeqInStream_CreateVTable(CFileSeqInStream *p) +{ + p->vt.Read = FileSeqInStream_Read; +} + + +/* ---------- FileInStream ---------- */ + +static SRes FileInStream_Read(const ISeekInStream *pp, void *buf, size_t *size) +{ + CFileInStream *p = CONTAINER_FROM_VTBL(pp, CFileInStream, vt); + return (File_Read(&p->file, buf, size) == 0) ? SZ_OK : SZ_ERROR_READ; +} + +static SRes FileInStream_Seek(const ISeekInStream *pp, Int64 *pos, ESzSeek origin) +{ + CFileInStream *p = CONTAINER_FROM_VTBL(pp, CFileInStream, vt); + return File_Seek(&p->file, pos, origin); +} + +void FileInStream_CreateVTable(CFileInStream *p) +{ + p->vt.Read = FileInStream_Read; + p->vt.Seek = FileInStream_Seek; +} + + +/* ---------- FileOutStream ---------- */ + +static size_t FileOutStream_Write(const ISeqOutStream *pp, const void *data, size_t size) +{ + CFileOutStream *p = CONTAINER_FROM_VTBL(pp, CFileOutStream, vt); + File_Write(&p->file, data, &size); + return size; +} + +void FileOutStream_CreateVTable(CFileOutStream *p) +{ + p->vt.Write = FileOutStream_Write; +} diff --git a/code/nel/3rdparty/seven_zip/7zFile.h b/code/nel/3rdparty/seven_zip/7zFile.h new file mode 100644 index 000000000..0e7925382 --- /dev/null +++ b/code/nel/3rdparty/seven_zip/7zFile.h @@ -0,0 +1,83 @@ +/* 7zFile.h -- File IO +2017-04-03 : Igor Pavlov : Public domain */ + +#ifndef __7Z_FILE_H +#define __7Z_FILE_H + +#ifdef _WIN32 +#define USE_WINDOWS_FILE +#endif + +#ifdef USE_WINDOWS_FILE +#include +#else +#include +#endif + +#include "7zTypes.h" + +EXTERN_C_BEGIN + +/* ---------- File ---------- */ + +typedef struct +{ + #ifdef USE_WINDOWS_FILE + HANDLE handle; + #else + FILE *file; + #endif +} CSzFile; + +void File_Construct(CSzFile *p); +#if !defined(UNDER_CE) || !defined(USE_WINDOWS_FILE) +WRes InFile_Open(CSzFile *p, const char *name); +WRes OutFile_Open(CSzFile *p, const char *name); +#endif +#ifdef USE_WINDOWS_FILE +WRes InFile_OpenW(CSzFile *p, const WCHAR *name); +WRes OutFile_OpenW(CSzFile *p, const WCHAR *name); +#endif +WRes File_Close(CSzFile *p); + +/* reads max(*size, remain file's size) bytes */ +WRes File_Read(CSzFile *p, void *data, size_t *size); + +/* writes *size bytes */ +WRes File_Write(CSzFile *p, const void *data, size_t *size); + +WRes File_Seek(CSzFile *p, Int64 *pos, ESzSeek origin); +WRes File_GetLength(CSzFile *p, UInt64 *length); + + +/* ---------- FileInStream ---------- */ + +typedef struct +{ + ISeqInStream vt; + CSzFile file; +} CFileSeqInStream; + +void FileSeqInStream_CreateVTable(CFileSeqInStream *p); + + +typedef struct +{ + ISeekInStream vt; + CSzFile file; +} CFileInStream; + +void FileInStream_CreateVTable(CFileInStream *p); + + +typedef struct +{ + ISeqOutStream vt; + CSzFile file; +} CFileOutStream; + +void FileOutStream_CreateVTable(CFileOutStream *p); + +EXTERN_C_END + +#endif diff --git a/code/nel/3rdparty/seven_zip/7zStream.c b/code/nel/3rdparty/seven_zip/7zStream.c new file mode 100644 index 000000000..6b5aa1621 --- /dev/null +++ b/code/nel/3rdparty/seven_zip/7zStream.c @@ -0,0 +1,176 @@ +/* 7zStream.c -- 7z Stream functions +2017-04-03 : Igor Pavlov : Public domain */ + +#include "Precomp.h" + +#include + +#include "7zTypes.h" + +SRes SeqInStream_Read2(const ISeqInStream *stream, void *buf, size_t size, SRes errorType) +{ + while (size != 0) + { + size_t processed = size; + RINOK(ISeqInStream_Read(stream, buf, &processed)); + if (processed == 0) + return errorType; + buf = (void *)((Byte *)buf + processed); + size -= processed; + } + return SZ_OK; +} + +SRes SeqInStream_Read(const ISeqInStream *stream, void *buf, size_t size) +{ + return SeqInStream_Read2(stream, buf, size, SZ_ERROR_INPUT_EOF); +} + +SRes SeqInStream_ReadByte(const ISeqInStream *stream, Byte *buf) +{ + size_t processed = 1; + RINOK(ISeqInStream_Read(stream, buf, &processed)); + return (processed == 1) ? SZ_OK : SZ_ERROR_INPUT_EOF; +} + + + +SRes LookInStream_SeekTo(const ILookInStream *stream, UInt64 offset) +{ + Int64 t = offset; + return ILookInStream_Seek(stream, &t, SZ_SEEK_SET); +} + +SRes LookInStream_LookRead(const ILookInStream *stream, void *buf, size_t *size) +{ + const void *lookBuf; + if (*size == 0) + return SZ_OK; + RINOK(ILookInStream_Look(stream, &lookBuf, size)); + memcpy(buf, lookBuf, *size); + return ILookInStream_Skip(stream, *size); +} + +SRes LookInStream_Read2(const ILookInStream *stream, void *buf, size_t size, SRes errorType) +{ + while (size != 0) + { + size_t processed = size; + RINOK(ILookInStream_Read(stream, buf, &processed)); + if (processed == 0) + return errorType; + buf = (void *)((Byte *)buf + processed); + size -= processed; + } + return SZ_OK; +} + +SRes LookInStream_Read(const ILookInStream *stream, void *buf, size_t size) +{ + return LookInStream_Read2(stream, buf, size, SZ_ERROR_INPUT_EOF); +} + + + +#define GET_LookToRead2 CLookToRead2 *p = CONTAINER_FROM_VTBL(pp, CLookToRead2, vt); + +static SRes LookToRead2_Look_Lookahead(const ILookInStream *pp, const void **buf, size_t *size) +{ + SRes res = SZ_OK; + GET_LookToRead2 + size_t size2 = p->size - p->pos; + if (size2 == 0 && *size != 0) + { + p->pos = 0; + p->size = 0; + size2 = p->bufSize; + res = ISeekInStream_Read(p->realStream, p->buf, &size2); + p->size = size2; + } + if (*size > size2) + *size = size2; + *buf = p->buf + p->pos; + return res; +} + +static SRes LookToRead2_Look_Exact(const ILookInStream *pp, const void **buf, size_t *size) +{ + SRes res = SZ_OK; + GET_LookToRead2 + size_t size2 = p->size - p->pos; + if (size2 == 0 && *size != 0) + { + p->pos = 0; + p->size = 0; + if (*size > p->bufSize) + *size = p->bufSize; + res = ISeekInStream_Read(p->realStream, p->buf, size); + size2 = p->size = *size; + } + if (*size > size2) + *size = size2; + *buf = p->buf + p->pos; + return res; +} + +static SRes LookToRead2_Skip(const ILookInStream *pp, size_t offset) +{ + GET_LookToRead2 + p->pos += offset; + return SZ_OK; +} + +static SRes LookToRead2_Read(const ILookInStream *pp, void *buf, size_t *size) +{ + GET_LookToRead2 + size_t rem = p->size - p->pos; + if (rem == 0) + return ISeekInStream_Read(p->realStream, buf, size); + if (rem > *size) + rem = *size; + memcpy(buf, p->buf + p->pos, rem); + p->pos += rem; + *size = rem; + return SZ_OK; +} + +static SRes LookToRead2_Seek(const ILookInStream *pp, Int64 *pos, ESzSeek origin) +{ + GET_LookToRead2 + p->pos = p->size = 0; + return ISeekInStream_Seek(p->realStream, pos, origin); +} + +void LookToRead2_CreateVTable(CLookToRead2 *p, int lookahead) +{ + p->vt.Look = lookahead ? + LookToRead2_Look_Lookahead : + LookToRead2_Look_Exact; + p->vt.Skip = LookToRead2_Skip; + p->vt.Read = LookToRead2_Read; + p->vt.Seek = LookToRead2_Seek; +} + + + +static SRes SecToLook_Read(const ISeqInStream *pp, void *buf, size_t *size) +{ + CSecToLook *p = CONTAINER_FROM_VTBL(pp, CSecToLook, vt); + return LookInStream_LookRead(p->realStream, buf, size); +} + +void SecToLook_CreateVTable(CSecToLook *p) +{ + p->vt.Read = SecToLook_Read; +} + +static SRes SecToRead_Read(const ISeqInStream *pp, void *buf, size_t *size) +{ + CSecToRead *p = CONTAINER_FROM_VTBL(pp, CSecToRead, vt); + return ILookInStream_Read(p->realStream, buf, size); +} + +void SecToRead_CreateVTable(CSecToRead *p) +{ + p->vt.Read = SecToRead_Read; +} diff --git a/code/nel/3rdparty/seven_zip/7zVersion.h b/code/nel/3rdparty/seven_zip/7zVersion.h new file mode 100644 index 000000000..c176823a4 --- /dev/null +++ b/code/nel/3rdparty/seven_zip/7zVersion.h @@ -0,0 +1,27 @@ +#define MY_VER_MAJOR 19 +#define MY_VER_MINOR 00 +#define MY_VER_BUILD 0 +#define MY_VERSION_NUMBERS "19.00" +#define MY_VERSION MY_VERSION_NUMBERS + +#ifdef MY_CPU_NAME + #define MY_VERSION_CPU MY_VERSION " (" MY_CPU_NAME ")" +#else + #define MY_VERSION_CPU MY_VERSION +#endif + +#define MY_DATE "2019-02-21" +#undef MY_COPYRIGHT +#undef MY_VERSION_COPYRIGHT_DATE +#define MY_AUTHOR_NAME "Igor Pavlov" +#define MY_COPYRIGHT_PD "Igor Pavlov : Public domain" +#define MY_COPYRIGHT_CR "Copyright (c) 1999-2018 Igor Pavlov" + +#ifdef USE_COPYRIGHT_CR + #define MY_COPYRIGHT MY_COPYRIGHT_CR +#else + #define MY_COPYRIGHT MY_COPYRIGHT_PD +#endif + +#define MY_COPYRIGHT_DATE MY_COPYRIGHT " : " MY_DATE +#define MY_VERSION_COPYRIGHT_DATE MY_VERSION_CPU " : " MY_COPYRIGHT " : " MY_DATE diff --git a/code/nel/3rdparty/seven_zip/7zVersion.rc b/code/nel/3rdparty/seven_zip/7zVersion.rc new file mode 100644 index 000000000..e520995dd --- /dev/null +++ b/code/nel/3rdparty/seven_zip/7zVersion.rc @@ -0,0 +1,55 @@ +#define MY_VS_FFI_FILEFLAGSMASK 0x0000003FL +#define MY_VOS_NT_WINDOWS32 0x00040004L +#define MY_VOS_CE_WINDOWS32 0x00050004L + +#define MY_VFT_APP 0x00000001L +#define MY_VFT_DLL 0x00000002L + +// #include + +#ifndef MY_VERSION +#include "7zVersion.h" +#endif + +#define MY_VER MY_VER_MAJOR,MY_VER_MINOR,MY_VER_BUILD,0 + +#ifdef DEBUG +#define DBG_FL VS_FF_DEBUG +#else +#define DBG_FL 0 +#endif + +#define MY_VERSION_INFO(fileType, descr, intName, origName) \ +LANGUAGE 9, 1 \ +1 VERSIONINFO \ + FILEVERSION MY_VER \ + PRODUCTVERSION MY_VER \ + FILEFLAGSMASK MY_VS_FFI_FILEFLAGSMASK \ + FILEFLAGS DBG_FL \ + FILEOS MY_VOS_NT_WINDOWS32 \ + FILETYPE fileType \ + FILESUBTYPE 0x0L \ +BEGIN \ + BLOCK "StringFileInfo" \ + BEGIN \ + BLOCK "040904b0" \ + BEGIN \ + VALUE "CompanyName", "Igor Pavlov" \ + VALUE "FileDescription", descr \ + VALUE "FileVersion", MY_VERSION \ + VALUE "InternalName", intName \ + VALUE "LegalCopyright", MY_COPYRIGHT \ + VALUE "OriginalFilename", origName \ + VALUE "ProductName", "7-Zip" \ + VALUE "ProductVersion", MY_VERSION \ + END \ + END \ + BLOCK "VarFileInfo" \ + BEGIN \ + VALUE "Translation", 0x409, 1200 \ + END \ +END + +#define MY_VERSION_INFO_APP(descr, intName) MY_VERSION_INFO(MY_VFT_APP, descr, intName, intName ".exe") + +#define MY_VERSION_INFO_DLL(descr, intName) MY_VERSION_INFO(MY_VFT_DLL, descr, intName, intName ".dll") diff --git a/code/nel/3rdparty/seven_zip/Aes.c b/code/nel/3rdparty/seven_zip/Aes.c new file mode 100644 index 000000000..1cdd0e787 --- /dev/null +++ b/code/nel/3rdparty/seven_zip/Aes.c @@ -0,0 +1,306 @@ +/* Aes.c -- AES encryption / decryption +2017-01-24 : Igor Pavlov : Public domain */ + +#include "Precomp.h" + +#include "Aes.h" +#include "CpuArch.h" + +static UInt32 T[256 * 4]; +static const Byte Sbox[256] = { + 0x63, 0x7c, 0x77, 0x7b, 0xf2, 0x6b, 0x6f, 0xc5, 0x30, 0x01, 0x67, 0x2b, 0xfe, 0xd7, 0xab, 0x76, + 0xca, 0x82, 0xc9, 0x7d, 0xfa, 0x59, 0x47, 0xf0, 0xad, 0xd4, 0xa2, 0xaf, 0x9c, 0xa4, 0x72, 0xc0, + 0xb7, 0xfd, 0x93, 0x26, 0x36, 0x3f, 0xf7, 0xcc, 0x34, 0xa5, 0xe5, 0xf1, 0x71, 0xd8, 0x31, 0x15, + 0x04, 0xc7, 0x23, 0xc3, 0x18, 0x96, 0x05, 0x9a, 0x07, 0x12, 0x80, 0xe2, 0xeb, 0x27, 0xb2, 0x75, + 0x09, 0x83, 0x2c, 0x1a, 0x1b, 0x6e, 0x5a, 0xa0, 0x52, 0x3b, 0xd6, 0xb3, 0x29, 0xe3, 0x2f, 0x84, + 0x53, 0xd1, 0x00, 0xed, 0x20, 0xfc, 0xb1, 0x5b, 0x6a, 0xcb, 0xbe, 0x39, 0x4a, 0x4c, 0x58, 0xcf, + 0xd0, 0xef, 0xaa, 0xfb, 0x43, 0x4d, 0x33, 0x85, 0x45, 0xf9, 0x02, 0x7f, 0x50, 0x3c, 0x9f, 0xa8, + 0x51, 0xa3, 0x40, 0x8f, 0x92, 0x9d, 0x38, 0xf5, 0xbc, 0xb6, 0xda, 0x21, 0x10, 0xff, 0xf3, 0xd2, + 0xcd, 0x0c, 0x13, 0xec, 0x5f, 0x97, 0x44, 0x17, 0xc4, 0xa7, 0x7e, 0x3d, 0x64, 0x5d, 0x19, 0x73, + 0x60, 0x81, 0x4f, 0xdc, 0x22, 0x2a, 0x90, 0x88, 0x46, 0xee, 0xb8, 0x14, 0xde, 0x5e, 0x0b, 0xdb, + 0xe0, 0x32, 0x3a, 0x0a, 0x49, 0x06, 0x24, 0x5c, 0xc2, 0xd3, 0xac, 0x62, 0x91, 0x95, 0xe4, 0x79, + 0xe7, 0xc8, 0x37, 0x6d, 0x8d, 0xd5, 0x4e, 0xa9, 0x6c, 0x56, 0xf4, 0xea, 0x65, 0x7a, 0xae, 0x08, + 0xba, 0x78, 0x25, 0x2e, 0x1c, 0xa6, 0xb4, 0xc6, 0xe8, 0xdd, 0x74, 0x1f, 0x4b, 0xbd, 0x8b, 0x8a, + 0x70, 0x3e, 0xb5, 0x66, 0x48, 0x03, 0xf6, 0x0e, 0x61, 0x35, 0x57, 0xb9, 0x86, 0xc1, 0x1d, 0x9e, + 0xe1, 0xf8, 0x98, 0x11, 0x69, 0xd9, 0x8e, 0x94, 0x9b, 0x1e, 0x87, 0xe9, 0xce, 0x55, 0x28, 0xdf, + 0x8c, 0xa1, 0x89, 0x0d, 0xbf, 0xe6, 0x42, 0x68, 0x41, 0x99, 0x2d, 0x0f, 0xb0, 0x54, 0xbb, 0x16}; + +void MY_FAST_CALL AesCbc_Encode(UInt32 *ivAes, Byte *data, size_t numBlocks); +void MY_FAST_CALL AesCbc_Decode(UInt32 *ivAes, Byte *data, size_t numBlocks); +void MY_FAST_CALL AesCtr_Code(UInt32 *ivAes, Byte *data, size_t numBlocks); + +void MY_FAST_CALL AesCbc_Encode_Intel(UInt32 *ivAes, Byte *data, size_t numBlocks); +void MY_FAST_CALL AesCbc_Decode_Intel(UInt32 *ivAes, Byte *data, size_t numBlocks); +void MY_FAST_CALL AesCtr_Code_Intel(UInt32 *ivAes, Byte *data, size_t numBlocks); + +AES_CODE_FUNC g_AesCbc_Encode; +AES_CODE_FUNC g_AesCbc_Decode; +AES_CODE_FUNC g_AesCtr_Code; + +static UInt32 D[256 * 4]; +static Byte InvS[256]; + +static const Byte Rcon[11] = { 0x00, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36 }; + +#define xtime(x) ((((x) << 1) ^ (((x) & 0x80) != 0 ? 0x1B : 0)) & 0xFF) + +#define Ui32(a0, a1, a2, a3) ((UInt32)(a0) | ((UInt32)(a1) << 8) | ((UInt32)(a2) << 16) | ((UInt32)(a3) << 24)) + +#define gb0(x) ( (x) & 0xFF) +#define gb1(x) (((x) >> ( 8)) & 0xFF) +#define gb2(x) (((x) >> (16)) & 0xFF) +#define gb3(x) (((x) >> (24))) + +#define gb(n, x) gb ## n(x) + +#define TT(x) (T + (x << 8)) +#define DD(x) (D + (x << 8)) + + +void AesGenTables(void) +{ + unsigned i; + for (i = 0; i < 256; i++) + InvS[Sbox[i]] = (Byte)i; + + for (i = 0; i < 256; i++) + { + { + UInt32 a1 = Sbox[i]; + UInt32 a2 = xtime(a1); + UInt32 a3 = a2 ^ a1; + TT(0)[i] = Ui32(a2, a1, a1, a3); + TT(1)[i] = Ui32(a3, a2, a1, a1); + TT(2)[i] = Ui32(a1, a3, a2, a1); + TT(3)[i] = Ui32(a1, a1, a3, a2); + } + { + UInt32 a1 = InvS[i]; + UInt32 a2 = xtime(a1); + UInt32 a4 = xtime(a2); + UInt32 a8 = xtime(a4); + UInt32 a9 = a8 ^ a1; + UInt32 aB = a8 ^ a2 ^ a1; + UInt32 aD = a8 ^ a4 ^ a1; + UInt32 aE = a8 ^ a4 ^ a2; + DD(0)[i] = Ui32(aE, a9, aD, aB); + DD(1)[i] = Ui32(aB, aE, a9, aD); + DD(2)[i] = Ui32(aD, aB, aE, a9); + DD(3)[i] = Ui32(a9, aD, aB, aE); + } + } + + g_AesCbc_Encode = AesCbc_Encode; + g_AesCbc_Decode = AesCbc_Decode; + g_AesCtr_Code = AesCtr_Code; + + #ifdef MY_CPU_X86_OR_AMD64 + if (CPU_Is_Aes_Supported()) + { + g_AesCbc_Encode = AesCbc_Encode_Intel; + g_AesCbc_Decode = AesCbc_Decode_Intel; + g_AesCtr_Code = AesCtr_Code_Intel; + } + #endif +} + + +#define HT(i, x, s) TT(x)[gb(x, s[(i + x) & 3])] + +#define HT4(m, i, s, p) m[i] = \ + HT(i, 0, s) ^ \ + HT(i, 1, s) ^ \ + HT(i, 2, s) ^ \ + HT(i, 3, s) ^ w[p + i] + +#define HT16(m, s, p) \ + HT4(m, 0, s, p); \ + HT4(m, 1, s, p); \ + HT4(m, 2, s, p); \ + HT4(m, 3, s, p); \ + +#define FT(i, x) Sbox[gb(x, m[(i + x) & 3])] +#define FT4(i) dest[i] = Ui32(FT(i, 0), FT(i, 1), FT(i, 2), FT(i, 3)) ^ w[i]; + + +#define HD(i, x, s) DD(x)[gb(x, s[(i - x) & 3])] + +#define HD4(m, i, s, p) m[i] = \ + HD(i, 0, s) ^ \ + HD(i, 1, s) ^ \ + HD(i, 2, s) ^ \ + HD(i, 3, s) ^ w[p + i]; + +#define HD16(m, s, p) \ + HD4(m, 0, s, p); \ + HD4(m, 1, s, p); \ + HD4(m, 2, s, p); \ + HD4(m, 3, s, p); \ + +#define FD(i, x) InvS[gb(x, m[(i - x) & 3])] +#define FD4(i) dest[i] = Ui32(FD(i, 0), FD(i, 1), FD(i, 2), FD(i, 3)) ^ w[i]; + +void MY_FAST_CALL Aes_SetKey_Enc(UInt32 *w, const Byte *key, unsigned keySize) +{ + unsigned i, wSize; + wSize = keySize + 28; + keySize /= 4; + w[0] = ((UInt32)keySize / 2) + 3; + w += 4; + + for (i = 0; i < keySize; i++, key += 4) + w[i] = GetUi32(key); + + for (; i < wSize; i++) + { + UInt32 t = w[(size_t)i - 1]; + unsigned rem = i % keySize; + if (rem == 0) + t = Ui32(Sbox[gb1(t)] ^ Rcon[i / keySize], Sbox[gb2(t)], Sbox[gb3(t)], Sbox[gb0(t)]); + else if (keySize > 6 && rem == 4) + t = Ui32(Sbox[gb0(t)], Sbox[gb1(t)], Sbox[gb2(t)], Sbox[gb3(t)]); + w[i] = w[i - keySize] ^ t; + } +} + +void MY_FAST_CALL Aes_SetKey_Dec(UInt32 *w, const Byte *key, unsigned keySize) +{ + unsigned i, num; + Aes_SetKey_Enc(w, key, keySize); + num = keySize + 20; + w += 8; + for (i = 0; i < num; i++) + { + UInt32 r = w[i]; + w[i] = + DD(0)[Sbox[gb0(r)]] ^ + DD(1)[Sbox[gb1(r)]] ^ + DD(2)[Sbox[gb2(r)]] ^ + DD(3)[Sbox[gb3(r)]]; + } +} + +/* Aes_Encode and Aes_Decode functions work with little-endian words. + src and dest are pointers to 4 UInt32 words. + src and dest can point to same block */ + +static void Aes_Encode(const UInt32 *w, UInt32 *dest, const UInt32 *src) +{ + UInt32 s[4]; + UInt32 m[4]; + UInt32 numRounds2 = w[0]; + w += 4; + s[0] = src[0] ^ w[0]; + s[1] = src[1] ^ w[1]; + s[2] = src[2] ^ w[2]; + s[3] = src[3] ^ w[3]; + w += 4; + for (;;) + { + HT16(m, s, 0); + if (--numRounds2 == 0) + break; + HT16(s, m, 4); + w += 8; + } + w += 4; + FT4(0); FT4(1); FT4(2); FT4(3); +} + +static void Aes_Decode(const UInt32 *w, UInt32 *dest, const UInt32 *src) +{ + UInt32 s[4]; + UInt32 m[4]; + UInt32 numRounds2 = w[0]; + w += 4 + numRounds2 * 8; + s[0] = src[0] ^ w[0]; + s[1] = src[1] ^ w[1]; + s[2] = src[2] ^ w[2]; + s[3] = src[3] ^ w[3]; + for (;;) + { + w -= 8; + HD16(m, s, 4); + if (--numRounds2 == 0) + break; + HD16(s, m, 0); + } + FD4(0); FD4(1); FD4(2); FD4(3); +} + +void AesCbc_Init(UInt32 *p, const Byte *iv) +{ + unsigned i; + for (i = 0; i < 4; i++) + p[i] = GetUi32(iv + i * 4); +} + +void MY_FAST_CALL AesCbc_Encode(UInt32 *p, Byte *data, size_t numBlocks) +{ + for (; numBlocks != 0; numBlocks--, data += AES_BLOCK_SIZE) + { + p[0] ^= GetUi32(data); + p[1] ^= GetUi32(data + 4); + p[2] ^= GetUi32(data + 8); + p[3] ^= GetUi32(data + 12); + + Aes_Encode(p + 4, p, p); + + SetUi32(data, p[0]); + SetUi32(data + 4, p[1]); + SetUi32(data + 8, p[2]); + SetUi32(data + 12, p[3]); + } +} + +void MY_FAST_CALL AesCbc_Decode(UInt32 *p, Byte *data, size_t numBlocks) +{ + UInt32 in[4], out[4]; + for (; numBlocks != 0; numBlocks--, data += AES_BLOCK_SIZE) + { + in[0] = GetUi32(data); + in[1] = GetUi32(data + 4); + in[2] = GetUi32(data + 8); + in[3] = GetUi32(data + 12); + + Aes_Decode(p + 4, out, in); + + SetUi32(data, p[0] ^ out[0]); + SetUi32(data + 4, p[1] ^ out[1]); + SetUi32(data + 8, p[2] ^ out[2]); + SetUi32(data + 12, p[3] ^ out[3]); + + p[0] = in[0]; + p[1] = in[1]; + p[2] = in[2]; + p[3] = in[3]; + } +} + +void MY_FAST_CALL AesCtr_Code(UInt32 *p, Byte *data, size_t numBlocks) +{ + for (; numBlocks != 0; numBlocks--) + { + UInt32 temp[4]; + unsigned i; + + if (++p[0] == 0) + p[1]++; + + Aes_Encode(p + 4, temp, p); + + for (i = 0; i < 4; i++, data += 4) + { + UInt32 t = temp[i]; + + #ifdef MY_CPU_LE_UNALIGN + *((UInt32 *)data) ^= t; + #else + data[0] ^= (t & 0xFF); + data[1] ^= ((t >> 8) & 0xFF); + data[2] ^= ((t >> 16) & 0xFF); + data[3] ^= ((t >> 24)); + #endif + } + } +} diff --git a/code/nel/3rdparty/seven_zip/Aes.h b/code/nel/3rdparty/seven_zip/Aes.h new file mode 100644 index 000000000..64979b5bc --- /dev/null +++ b/code/nel/3rdparty/seven_zip/Aes.h @@ -0,0 +1,38 @@ +/* Aes.h -- AES encryption / decryption +2013-01-18 : Igor Pavlov : Public domain */ + +#ifndef __AES_H +#define __AES_H + +#include "7zTypes.h" + +EXTERN_C_BEGIN + +#define AES_BLOCK_SIZE 16 + +/* Call AesGenTables one time before other AES functions */ +void AesGenTables(void); + +/* UInt32 pointers must be 16-byte aligned */ + +/* 16-byte (4 * 32-bit words) blocks: 1 (IV) + 1 (keyMode) + 15 (AES-256 roundKeys) */ +#define AES_NUM_IVMRK_WORDS ((1 + 1 + 15) * 4) + +/* aes - 16-byte aligned pointer to keyMode+roundKeys sequence */ +/* keySize = 16 or 24 or 32 (bytes) */ +typedef void (MY_FAST_CALL *AES_SET_KEY_FUNC)(UInt32 *aes, const Byte *key, unsigned keySize); +void MY_FAST_CALL Aes_SetKey_Enc(UInt32 *aes, const Byte *key, unsigned keySize); +void MY_FAST_CALL Aes_SetKey_Dec(UInt32 *aes, const Byte *key, unsigned keySize); + +/* ivAes - 16-byte aligned pointer to iv+keyMode+roundKeys sequence: UInt32[AES_NUM_IVMRK_WORDS] */ +void AesCbc_Init(UInt32 *ivAes, const Byte *iv); /* iv size is AES_BLOCK_SIZE */ +/* data - 16-byte aligned pointer to data */ +/* numBlocks - the number of 16-byte blocks in data array */ +typedef void (MY_FAST_CALL *AES_CODE_FUNC)(UInt32 *ivAes, Byte *data, size_t numBlocks); +extern AES_CODE_FUNC g_AesCbc_Encode; +extern AES_CODE_FUNC g_AesCbc_Decode; +extern AES_CODE_FUNC g_AesCtr_Code; + +EXTERN_C_END + +#endif diff --git a/code/nel/3rdparty/seven_zip/AesOpt.c b/code/nel/3rdparty/seven_zip/AesOpt.c new file mode 100644 index 000000000..9571c467f --- /dev/null +++ b/code/nel/3rdparty/seven_zip/AesOpt.c @@ -0,0 +1,184 @@ +/* AesOpt.c -- Intel's AES +2017-06-08 : Igor Pavlov : Public domain */ + +#include "Precomp.h" + +#include "CpuArch.h" + +#ifdef MY_CPU_X86_OR_AMD64 +#if (_MSC_VER > 1500) || (_MSC_FULL_VER >= 150030729) +#define USE_INTEL_AES +#endif +#endif + +#ifdef USE_INTEL_AES + +#include + +void MY_FAST_CALL AesCbc_Encode_Intel(__m128i *p, __m128i *data, size_t numBlocks) +{ + __m128i m = *p; + for (; numBlocks != 0; numBlocks--, data++) + { + UInt32 numRounds2 = *(const UInt32 *)(p + 1) - 1; + const __m128i *w = p + 3; + m = _mm_xor_si128(m, *data); + m = _mm_xor_si128(m, p[2]); + do + { + m = _mm_aesenc_si128(m, w[0]); + m = _mm_aesenc_si128(m, w[1]); + w += 2; + } + while (--numRounds2 != 0); + m = _mm_aesenc_si128(m, w[0]); + m = _mm_aesenclast_si128(m, w[1]); + *data = m; + } + *p = m; +} + +#define NUM_WAYS 3 + +#define AES_OP_W(op, n) { \ + const __m128i t = w[n]; \ + m0 = op(m0, t); \ + m1 = op(m1, t); \ + m2 = op(m2, t); \ + } + +#define AES_DEC(n) AES_OP_W(_mm_aesdec_si128, n) +#define AES_DEC_LAST(n) AES_OP_W(_mm_aesdeclast_si128, n) +#define AES_ENC(n) AES_OP_W(_mm_aesenc_si128, n) +#define AES_ENC_LAST(n) AES_OP_W(_mm_aesenclast_si128, n) + +void MY_FAST_CALL AesCbc_Decode_Intel(__m128i *p, __m128i *data, size_t numBlocks) +{ + __m128i iv = *p; + for (; numBlocks >= NUM_WAYS; numBlocks -= NUM_WAYS, data += NUM_WAYS) + { + UInt32 numRounds2 = *(const UInt32 *)(p + 1); + const __m128i *w = p + numRounds2 * 2; + __m128i m0, m1, m2; + { + const __m128i t = w[2]; + m0 = _mm_xor_si128(t, data[0]); + m1 = _mm_xor_si128(t, data[1]); + m2 = _mm_xor_si128(t, data[2]); + } + numRounds2--; + do + { + AES_DEC(1) + AES_DEC(0) + w -= 2; + } + while (--numRounds2 != 0); + AES_DEC(1) + AES_DEC_LAST(0) + + { + __m128i t; + t = _mm_xor_si128(m0, iv); iv = data[0]; data[0] = t; + t = _mm_xor_si128(m1, iv); iv = data[1]; data[1] = t; + t = _mm_xor_si128(m2, iv); iv = data[2]; data[2] = t; + } + } + for (; numBlocks != 0; numBlocks--, data++) + { + UInt32 numRounds2 = *(const UInt32 *)(p + 1); + const __m128i *w = p + numRounds2 * 2; + __m128i m = _mm_xor_si128(w[2], *data); + numRounds2--; + do + { + m = _mm_aesdec_si128(m, w[1]); + m = _mm_aesdec_si128(m, w[0]); + w -= 2; + } + while (--numRounds2 != 0); + m = _mm_aesdec_si128(m, w[1]); + m = _mm_aesdeclast_si128(m, w[0]); + + m = _mm_xor_si128(m, iv); + iv = *data; + *data = m; + } + *p = iv; +} + +void MY_FAST_CALL AesCtr_Code_Intel(__m128i *p, __m128i *data, size_t numBlocks) +{ + __m128i ctr = *p; + __m128i one; + one.m128i_u64[0] = 1; + one.m128i_u64[1] = 0; + for (; numBlocks >= NUM_WAYS; numBlocks -= NUM_WAYS, data += NUM_WAYS) + { + UInt32 numRounds2 = *(const UInt32 *)(p + 1) - 1; + const __m128i *w = p; + __m128i m0, m1, m2; + { + const __m128i t = w[2]; + ctr = _mm_add_epi64(ctr, one); m0 = _mm_xor_si128(ctr, t); + ctr = _mm_add_epi64(ctr, one); m1 = _mm_xor_si128(ctr, t); + ctr = _mm_add_epi64(ctr, one); m2 = _mm_xor_si128(ctr, t); + } + w += 3; + do + { + AES_ENC(0) + AES_ENC(1) + w += 2; + } + while (--numRounds2 != 0); + AES_ENC(0) + AES_ENC_LAST(1) + data[0] = _mm_xor_si128(data[0], m0); + data[1] = _mm_xor_si128(data[1], m1); + data[2] = _mm_xor_si128(data[2], m2); + } + for (; numBlocks != 0; numBlocks--, data++) + { + UInt32 numRounds2 = *(const UInt32 *)(p + 1) - 1; + const __m128i *w = p; + __m128i m; + ctr = _mm_add_epi64(ctr, one); + m = _mm_xor_si128(ctr, p[2]); + w += 3; + do + { + m = _mm_aesenc_si128(m, w[0]); + m = _mm_aesenc_si128(m, w[1]); + w += 2; + } + while (--numRounds2 != 0); + m = _mm_aesenc_si128(m, w[0]); + m = _mm_aesenclast_si128(m, w[1]); + *data = _mm_xor_si128(*data, m); + } + *p = ctr; +} + +#else + +void MY_FAST_CALL AesCbc_Encode(UInt32 *ivAes, Byte *data, size_t numBlocks); +void MY_FAST_CALL AesCbc_Decode(UInt32 *ivAes, Byte *data, size_t numBlocks); +void MY_FAST_CALL AesCtr_Code(UInt32 *ivAes, Byte *data, size_t numBlocks); + +void MY_FAST_CALL AesCbc_Encode_Intel(UInt32 *p, Byte *data, size_t numBlocks) +{ + AesCbc_Encode(p, data, numBlocks); +} + +void MY_FAST_CALL AesCbc_Decode_Intel(UInt32 *p, Byte *data, size_t numBlocks) +{ + AesCbc_Decode(p, data, numBlocks); +} + +void MY_FAST_CALL AesCtr_Code_Intel(UInt32 *p, Byte *data, size_t numBlocks) +{ + AesCtr_Code(p, data, numBlocks); +} + +#endif diff --git a/code/nel/3rdparty/seven_zip/Alloc.c b/code/nel/3rdparty/seven_zip/Alloc.c new file mode 100644 index 000000000..bcede4b85 --- /dev/null +++ b/code/nel/3rdparty/seven_zip/Alloc.c @@ -0,0 +1,455 @@ +/* Alloc.c -- Memory allocation functions +2018-04-27 : Igor Pavlov : Public domain */ + +#include "Precomp.h" + +#include + +#ifdef _WIN32 +#include +#endif +#include + +#include "Alloc.h" + +/* #define _SZ_ALLOC_DEBUG */ + +/* use _SZ_ALLOC_DEBUG to debug alloc/free operations */ +#ifdef _SZ_ALLOC_DEBUG + +#include +int g_allocCount = 0; +int g_allocCountMid = 0; +int g_allocCountBig = 0; + + +#define CONVERT_INT_TO_STR(charType, tempSize) \ + unsigned char temp[tempSize]; unsigned i = 0; \ + while (val >= 10) { temp[i++] = (unsigned char)('0' + (unsigned)(val % 10)); val /= 10; } \ + *s++ = (charType)('0' + (unsigned)val); \ + while (i != 0) { i--; *s++ = temp[i]; } \ + *s = 0; + +static void ConvertUInt64ToString(UInt64 val, char *s) +{ + CONVERT_INT_TO_STR(char, 24); +} + +#define GET_HEX_CHAR(t) ((char)(((t < 10) ? ('0' + t) : ('A' + (t - 10))))) + +static void ConvertUInt64ToHex(UInt64 val, char *s) +{ + UInt64 v = val; + unsigned i; + for (i = 1;; i++) + { + v >>= 4; + if (v == 0) + break; + } + s[i] = 0; + do + { + unsigned t = (unsigned)(val & 0xF); + val >>= 4; + s[--i] = GET_HEX_CHAR(t); + } + while (i); +} + +#define DEBUG_OUT_STREAM stderr + +static void Print(const char *s) +{ + fputs(s, DEBUG_OUT_STREAM); +} + +static void PrintAligned(const char *s, size_t align) +{ + size_t len = strlen(s); + for(;;) + { + fputc(' ', DEBUG_OUT_STREAM); + if (len >= align) + break; + ++len; + } + Print(s); +} + +static void PrintLn() +{ + Print("\n"); +} + +static void PrintHex(UInt64 v, size_t align) +{ + char s[32]; + ConvertUInt64ToHex(v, s); + PrintAligned(s, align); +} + +static void PrintDec(UInt64 v, size_t align) +{ + char s[32]; + ConvertUInt64ToString(v, s); + PrintAligned(s, align); +} + +static void PrintAddr(void *p) +{ + PrintHex((UInt64)(size_t)(ptrdiff_t)p, 12); +} + + +#define PRINT_ALLOC(name, cnt, size, ptr) \ + Print(name " "); \ + PrintDec(cnt++, 10); \ + PrintHex(size, 10); \ + PrintAddr(ptr); \ + PrintLn(); + +#define PRINT_FREE(name, cnt, ptr) if (ptr) { \ + Print(name " "); \ + PrintDec(--cnt, 10); \ + PrintAddr(ptr); \ + PrintLn(); } + +#else + +#define PRINT_ALLOC(name, cnt, size, ptr) +#define PRINT_FREE(name, cnt, ptr) +#define Print(s) +#define PrintLn() +#define PrintHex(v, align) +#define PrintDec(v, align) +#define PrintAddr(p) + +#endif + + + +void *MyAlloc(size_t size) +{ + if (size == 0) + return NULL; + #ifdef _SZ_ALLOC_DEBUG + { + void *p = malloc(size); + PRINT_ALLOC("Alloc ", g_allocCount, size, p); + return p; + } + #else + return malloc(size); + #endif +} + +void MyFree(void *address) +{ + PRINT_FREE("Free ", g_allocCount, address); + + free(address); +} + +#ifdef _WIN32 + +void *MidAlloc(size_t size) +{ + if (size == 0) + return NULL; + + PRINT_ALLOC("Alloc-Mid", g_allocCountMid, size, NULL); + + return VirtualAlloc(NULL, size, MEM_COMMIT, PAGE_READWRITE); +} + +void MidFree(void *address) +{ + PRINT_FREE("Free-Mid", g_allocCountMid, address); + + if (!address) + return; + VirtualFree(address, 0, MEM_RELEASE); +} + +#ifndef MEM_LARGE_PAGES +#undef _7ZIP_LARGE_PAGES +#endif + +#ifdef _7ZIP_LARGE_PAGES +SIZE_T g_LargePageSize = 0; +typedef SIZE_T (WINAPI *GetLargePageMinimumP)(); +#endif + +void SetLargePageSize() +{ + #ifdef _7ZIP_LARGE_PAGES + SIZE_T size; + GetLargePageMinimumP largePageMinimum = (GetLargePageMinimumP) + GetProcAddress(GetModuleHandle(TEXT("kernel32.dll")), "GetLargePageMinimum"); + if (!largePageMinimum) + return; + size = largePageMinimum(); + if (size == 0 || (size & (size - 1)) != 0) + return; + g_LargePageSize = size; + #endif +} + + +void *BigAlloc(size_t size) +{ + if (size == 0) + return NULL; + + PRINT_ALLOC("Alloc-Big", g_allocCountBig, size, NULL); + + #ifdef _7ZIP_LARGE_PAGES + { + SIZE_T ps = g_LargePageSize; + if (ps != 0 && ps <= (1 << 30) && size > (ps / 2)) + { + size_t size2; + ps--; + size2 = (size + ps) & ~ps; + if (size2 >= size) + { + void *res = VirtualAlloc(NULL, size2, MEM_COMMIT | MEM_LARGE_PAGES, PAGE_READWRITE); + if (res) + return res; + } + } + } + #endif + + return VirtualAlloc(NULL, size, MEM_COMMIT, PAGE_READWRITE); +} + +void BigFree(void *address) +{ + PRINT_FREE("Free-Big", g_allocCountBig, address); + + if (!address) + return; + VirtualFree(address, 0, MEM_RELEASE); +} + +#endif + + +static void *SzAlloc(ISzAllocPtr p, size_t size) { UNUSED_VAR(p); return MyAlloc(size); } +static void SzFree(ISzAllocPtr p, void *address) { UNUSED_VAR(p); MyFree(address); } +const ISzAlloc g_Alloc = { SzAlloc, SzFree }; + +static void *SzMidAlloc(ISzAllocPtr p, size_t size) { UNUSED_VAR(p); return MidAlloc(size); } +static void SzMidFree(ISzAllocPtr p, void *address) { UNUSED_VAR(p); MidFree(address); } +const ISzAlloc g_MidAlloc = { SzMidAlloc, SzMidFree }; + +static void *SzBigAlloc(ISzAllocPtr p, size_t size) { UNUSED_VAR(p); return BigAlloc(size); } +static void SzBigFree(ISzAllocPtr p, void *address) { UNUSED_VAR(p); BigFree(address); } +const ISzAlloc g_BigAlloc = { SzBigAlloc, SzBigFree }; + + +/* + uintptr_t : C99 (optional) + : unsupported in VS6 +*/ + +#ifdef _WIN32 + typedef UINT_PTR UIntPtr; +#else + /* + typedef uintptr_t UIntPtr; + */ + typedef ptrdiff_t UIntPtr; +#endif + + +#define ADJUST_ALLOC_SIZE 0 +/* +#define ADJUST_ALLOC_SIZE (sizeof(void *) - 1) +*/ +/* + Use (ADJUST_ALLOC_SIZE = (sizeof(void *) - 1)), if + MyAlloc() can return address that is NOT multiple of sizeof(void *). +*/ + + +/* +#define MY_ALIGN_PTR_DOWN(p, align) ((void *)((char *)(p) - ((size_t)(UIntPtr)(p) & ((align) - 1)))) +*/ +#define MY_ALIGN_PTR_DOWN(p, align) ((void *)((((UIntPtr)(p)) & ~((UIntPtr)(align) - 1)))) + +#define MY_ALIGN_PTR_UP_PLUS(p, align) MY_ALIGN_PTR_DOWN(((char *)(p) + (align) + ADJUST_ALLOC_SIZE), align) + + +#if (_POSIX_C_SOURCE >= 200112L) && !defined(_WIN32) + #define USE_posix_memalign +#endif + +/* + This posix_memalign() is for test purposes only. + We also need special Free() function instead of free(), + if this posix_memalign() is used. +*/ + +/* +static int posix_memalign(void **ptr, size_t align, size_t size) +{ + size_t newSize = size + align; + void *p; + void *pAligned; + *ptr = NULL; + if (newSize < size) + return 12; // ENOMEM + p = MyAlloc(newSize); + if (!p) + return 12; // ENOMEM + pAligned = MY_ALIGN_PTR_UP_PLUS(p, align); + ((void **)pAligned)[-1] = p; + *ptr = pAligned; + return 0; +} +*/ + +/* + ALLOC_ALIGN_SIZE >= sizeof(void *) + ALLOC_ALIGN_SIZE >= cache_line_size +*/ + +#define ALLOC_ALIGN_SIZE ((size_t)1 << 7) + +static void *SzAlignedAlloc(ISzAllocPtr pp, size_t size) +{ + #ifndef USE_posix_memalign + + void *p; + void *pAligned; + size_t newSize; + UNUSED_VAR(pp); + + /* also we can allocate additional dummy ALLOC_ALIGN_SIZE bytes after aligned + block to prevent cache line sharing with another allocated blocks */ + + newSize = size + ALLOC_ALIGN_SIZE * 1 + ADJUST_ALLOC_SIZE; + if (newSize < size) + return NULL; + + p = MyAlloc(newSize); + + if (!p) + return NULL; + pAligned = MY_ALIGN_PTR_UP_PLUS(p, ALLOC_ALIGN_SIZE); + + Print(" size="); PrintHex(size, 8); + Print(" a_size="); PrintHex(newSize, 8); + Print(" ptr="); PrintAddr(p); + Print(" a_ptr="); PrintAddr(pAligned); + PrintLn(); + + ((void **)pAligned)[-1] = p; + + return pAligned; + + #else + + void *p; + UNUSED_VAR(pp); + if (posix_memalign(&p, ALLOC_ALIGN_SIZE, size)) + return NULL; + + Print(" posix_memalign="); PrintAddr(p); + PrintLn(); + + return p; + + #endif +} + + +static void SzAlignedFree(ISzAllocPtr pp, void *address) +{ + UNUSED_VAR(pp); + #ifndef USE_posix_memalign + if (address) + MyFree(((void **)address)[-1]); + #else + free(address); + #endif +} + + +const ISzAlloc g_AlignedAlloc = { SzAlignedAlloc, SzAlignedFree }; + + + +#define MY_ALIGN_PTR_DOWN_1(p) MY_ALIGN_PTR_DOWN(p, sizeof(void *)) + +/* we align ptr to support cases where CAlignOffsetAlloc::offset is not multiply of sizeof(void *) */ +#define REAL_BLOCK_PTR_VAR(p) ((void **)MY_ALIGN_PTR_DOWN_1(p))[-1] +/* +#define REAL_BLOCK_PTR_VAR(p) ((void **)(p))[-1] +*/ + +static void *AlignOffsetAlloc_Alloc(ISzAllocPtr pp, size_t size) +{ + CAlignOffsetAlloc *p = CONTAINER_FROM_VTBL(pp, CAlignOffsetAlloc, vt); + void *adr; + void *pAligned; + size_t newSize; + size_t extra; + size_t alignSize = (size_t)1 << p->numAlignBits; + + if (alignSize < sizeof(void *)) + alignSize = sizeof(void *); + + if (p->offset >= alignSize) + return NULL; + + /* also we can allocate additional dummy ALLOC_ALIGN_SIZE bytes after aligned + block to prevent cache line sharing with another allocated blocks */ + extra = p->offset & (sizeof(void *) - 1); + newSize = size + alignSize + extra + ADJUST_ALLOC_SIZE; + if (newSize < size) + return NULL; + + adr = ISzAlloc_Alloc(p->baseAlloc, newSize); + + if (!adr) + return NULL; + + pAligned = (char *)MY_ALIGN_PTR_DOWN((char *)adr + + alignSize - p->offset + extra + ADJUST_ALLOC_SIZE, alignSize) + p->offset; + + PrintLn(); + Print("- Aligned: "); + Print(" size="); PrintHex(size, 8); + Print(" a_size="); PrintHex(newSize, 8); + Print(" ptr="); PrintAddr(adr); + Print(" a_ptr="); PrintAddr(pAligned); + PrintLn(); + + REAL_BLOCK_PTR_VAR(pAligned) = adr; + + return pAligned; +} + + +static void AlignOffsetAlloc_Free(ISzAllocPtr pp, void *address) +{ + if (address) + { + CAlignOffsetAlloc *p = CONTAINER_FROM_VTBL(pp, CAlignOffsetAlloc, vt); + PrintLn(); + Print("- Aligned Free: "); + PrintLn(); + ISzAlloc_Free(p->baseAlloc, REAL_BLOCK_PTR_VAR(address)); + } +} + + +void AlignOffsetAlloc_CreateVTable(CAlignOffsetAlloc *p) +{ + p->vt.Alloc = AlignOffsetAlloc_Alloc; + p->vt.Free = AlignOffsetAlloc_Free; +} diff --git a/code/nel/3rdparty/seven_zip/Alloc.h b/code/nel/3rdparty/seven_zip/Alloc.h new file mode 100644 index 000000000..648237646 --- /dev/null +++ b/code/nel/3rdparty/seven_zip/Alloc.h @@ -0,0 +1,51 @@ +/* Alloc.h -- Memory allocation functions +2018-02-19 : Igor Pavlov : Public domain */ + +#ifndef __COMMON_ALLOC_H +#define __COMMON_ALLOC_H + +#include "7zTypes.h" + +EXTERN_C_BEGIN + +void *MyAlloc(size_t size); +void MyFree(void *address); + +#ifdef _WIN32 + +void SetLargePageSize(); + +void *MidAlloc(size_t size); +void MidFree(void *address); +void *BigAlloc(size_t size); +void BigFree(void *address); + +#else + +#define MidAlloc(size) MyAlloc(size) +#define MidFree(address) MyFree(address) +#define BigAlloc(size) MyAlloc(size) +#define BigFree(address) MyFree(address) + +#endif + +extern const ISzAlloc g_Alloc; +extern const ISzAlloc g_BigAlloc; +extern const ISzAlloc g_MidAlloc; +extern const ISzAlloc g_AlignedAlloc; + + +typedef struct +{ + ISzAlloc vt; + ISzAllocPtr baseAlloc; + unsigned numAlignBits; /* ((1 << numAlignBits) >= sizeof(void *)) */ + size_t offset; /* (offset == (k * sizeof(void *)) && offset < (1 << numAlignBits) */ +} CAlignOffsetAlloc; + +void AlignOffsetAlloc_CreateVTable(CAlignOffsetAlloc *p); + + +EXTERN_C_END + +#endif diff --git a/code/nel/3rdparty/seven_zip/Bcj2.c b/code/nel/3rdparty/seven_zip/Bcj2.c new file mode 100644 index 000000000..9a0046a65 --- /dev/null +++ b/code/nel/3rdparty/seven_zip/Bcj2.c @@ -0,0 +1,257 @@ +/* Bcj2.c -- BCJ2 Decoder (Converter for x86 code) +2018-04-28 : Igor Pavlov : Public domain */ + +#include "Precomp.h" + +#include "Bcj2.h" +#include "CpuArch.h" + +#define CProb UInt16 + +#define kTopValue ((UInt32)1 << 24) +#define kNumModelBits 11 +#define kBitModelTotal (1 << kNumModelBits) +#define kNumMoveBits 5 + +#define _IF_BIT_0 ttt = *prob; bound = (p->range >> kNumModelBits) * ttt; if (p->code < bound) +#define _UPDATE_0 p->range = bound; *prob = (CProb)(ttt + ((kBitModelTotal - ttt) >> kNumMoveBits)); +#define _UPDATE_1 p->range -= bound; p->code -= bound; *prob = (CProb)(ttt - (ttt >> kNumMoveBits)); + +void Bcj2Dec_Init(CBcj2Dec *p) +{ + unsigned i; + + p->state = BCJ2_DEC_STATE_OK; + p->ip = 0; + p->temp[3] = 0; + p->range = 0; + p->code = 0; + for (i = 0; i < sizeof(p->probs) / sizeof(p->probs[0]); i++) + p->probs[i] = kBitModelTotal >> 1; +} + +SRes Bcj2Dec_Decode(CBcj2Dec *p) +{ + if (p->range <= 5) + { + p->state = BCJ2_DEC_STATE_OK; + for (; p->range != 5; p->range++) + { + if (p->range == 1 && p->code != 0) + return SZ_ERROR_DATA; + + if (p->bufs[BCJ2_STREAM_RC] == p->lims[BCJ2_STREAM_RC]) + { + p->state = BCJ2_STREAM_RC; + return SZ_OK; + } + + p->code = (p->code << 8) | *(p->bufs[BCJ2_STREAM_RC])++; + } + + if (p->code == 0xFFFFFFFF) + return SZ_ERROR_DATA; + + p->range = 0xFFFFFFFF; + } + else if (p->state >= BCJ2_DEC_STATE_ORIG_0) + { + while (p->state <= BCJ2_DEC_STATE_ORIG_3) + { + Byte *dest = p->dest; + if (dest == p->destLim) + return SZ_OK; + *dest = p->temp[(size_t)p->state - BCJ2_DEC_STATE_ORIG_0]; + p->state++; + p->dest = dest + 1; + } + } + + /* + if (BCJ2_IS_32BIT_STREAM(p->state)) + { + const Byte *cur = p->bufs[p->state]; + if (cur == p->lims[p->state]) + return SZ_OK; + p->bufs[p->state] = cur + 4; + + { + UInt32 val; + Byte *dest; + SizeT rem; + + p->ip += 4; + val = GetBe32(cur) - p->ip; + dest = p->dest; + rem = p->destLim - dest; + if (rem < 4) + { + SizeT i; + SetUi32(p->temp, val); + for (i = 0; i < rem; i++) + dest[i] = p->temp[i]; + p->dest = dest + rem; + p->state = BCJ2_DEC_STATE_ORIG_0 + (unsigned)rem; + return SZ_OK; + } + SetUi32(dest, val); + p->temp[3] = (Byte)(val >> 24); + p->dest = dest + 4; + p->state = BCJ2_DEC_STATE_OK; + } + } + */ + + for (;;) + { + if (BCJ2_IS_32BIT_STREAM(p->state)) + p->state = BCJ2_DEC_STATE_OK; + else + { + if (p->range < kTopValue) + { + if (p->bufs[BCJ2_STREAM_RC] == p->lims[BCJ2_STREAM_RC]) + { + p->state = BCJ2_STREAM_RC; + return SZ_OK; + } + p->range <<= 8; + p->code = (p->code << 8) | *(p->bufs[BCJ2_STREAM_RC])++; + } + + { + const Byte *src = p->bufs[BCJ2_STREAM_MAIN]; + const Byte *srcLim; + Byte *dest; + SizeT num = p->lims[BCJ2_STREAM_MAIN] - src; + + if (num == 0) + { + p->state = BCJ2_STREAM_MAIN; + return SZ_OK; + } + + dest = p->dest; + if (num > (SizeT)(p->destLim - dest)) + { + num = p->destLim - dest; + if (num == 0) + { + p->state = BCJ2_DEC_STATE_ORIG; + return SZ_OK; + } + } + + srcLim = src + num; + + if (p->temp[3] == 0x0F && (src[0] & 0xF0) == 0x80) + *dest = src[0]; + else for (;;) + { + Byte b = *src; + *dest = b; + if (b != 0x0F) + { + if ((b & 0xFE) == 0xE8) + break; + dest++; + if (++src != srcLim) + continue; + break; + } + dest++; + if (++src == srcLim) + break; + if ((*src & 0xF0) != 0x80) + continue; + *dest = *src; + break; + } + + num = src - p->bufs[BCJ2_STREAM_MAIN]; + + if (src == srcLim) + { + p->temp[3] = src[-1]; + p->bufs[BCJ2_STREAM_MAIN] = src; + p->ip += (UInt32)num; + p->dest += num; + p->state = + p->bufs[BCJ2_STREAM_MAIN] == + p->lims[BCJ2_STREAM_MAIN] ? + (unsigned)BCJ2_STREAM_MAIN : + (unsigned)BCJ2_DEC_STATE_ORIG; + return SZ_OK; + } + + { + UInt32 bound, ttt; + CProb *prob; + Byte b = src[0]; + Byte prev = (Byte)(num == 0 ? p->temp[3] : src[-1]); + + p->temp[3] = b; + p->bufs[BCJ2_STREAM_MAIN] = src + 1; + num++; + p->ip += (UInt32)num; + p->dest += num; + + prob = p->probs + (unsigned)(b == 0xE8 ? 2 + (unsigned)prev : (b == 0xE9 ? 1 : 0)); + + _IF_BIT_0 + { + _UPDATE_0 + continue; + } + _UPDATE_1 + + } + } + } + + { + UInt32 val; + unsigned cj = (p->temp[3] == 0xE8) ? BCJ2_STREAM_CALL : BCJ2_STREAM_JUMP; + const Byte *cur = p->bufs[cj]; + Byte *dest; + SizeT rem; + + if (cur == p->lims[cj]) + { + p->state = cj; + break; + } + + val = GetBe32(cur); + p->bufs[cj] = cur + 4; + + p->ip += 4; + val -= p->ip; + dest = p->dest; + rem = p->destLim - dest; + + if (rem < 4) + { + p->temp[0] = (Byte)val; if (rem > 0) dest[0] = (Byte)val; val >>= 8; + p->temp[1] = (Byte)val; if (rem > 1) dest[1] = (Byte)val; val >>= 8; + p->temp[2] = (Byte)val; if (rem > 2) dest[2] = (Byte)val; val >>= 8; + p->temp[3] = (Byte)val; + p->dest = dest + rem; + p->state = BCJ2_DEC_STATE_ORIG_0 + (unsigned)rem; + break; + } + + SetUi32(dest, val); + p->temp[3] = (Byte)(val >> 24); + p->dest = dest + 4; + } + } + + if (p->range < kTopValue && p->bufs[BCJ2_STREAM_RC] != p->lims[BCJ2_STREAM_RC]) + { + p->range <<= 8; + p->code = (p->code << 8) | *(p->bufs[BCJ2_STREAM_RC])++; + } + + return SZ_OK; +} diff --git a/code/nel/3rdparty/seven_zip/Bcj2.h b/code/nel/3rdparty/seven_zip/Bcj2.h new file mode 100644 index 000000000..8824080ac --- /dev/null +++ b/code/nel/3rdparty/seven_zip/Bcj2.h @@ -0,0 +1,146 @@ +/* Bcj2.h -- BCJ2 Converter for x86 code +2014-11-10 : Igor Pavlov : Public domain */ + +#ifndef __BCJ2_H +#define __BCJ2_H + +#include "7zTypes.h" + +EXTERN_C_BEGIN + +#define BCJ2_NUM_STREAMS 4 + +enum +{ + BCJ2_STREAM_MAIN, + BCJ2_STREAM_CALL, + BCJ2_STREAM_JUMP, + BCJ2_STREAM_RC +}; + +enum +{ + BCJ2_DEC_STATE_ORIG_0 = BCJ2_NUM_STREAMS, + BCJ2_DEC_STATE_ORIG_1, + BCJ2_DEC_STATE_ORIG_2, + BCJ2_DEC_STATE_ORIG_3, + + BCJ2_DEC_STATE_ORIG, + BCJ2_DEC_STATE_OK +}; + +enum +{ + BCJ2_ENC_STATE_ORIG = BCJ2_NUM_STREAMS, + BCJ2_ENC_STATE_OK +}; + + +#define BCJ2_IS_32BIT_STREAM(s) ((s) == BCJ2_STREAM_CALL || (s) == BCJ2_STREAM_JUMP) + +/* +CBcj2Dec / CBcj2Enc +bufs sizes: + BUF_SIZE(n) = lims[n] - bufs[n] +bufs sizes for BCJ2_STREAM_CALL and BCJ2_STREAM_JUMP must be mutliply of 4: + (BUF_SIZE(BCJ2_STREAM_CALL) & 3) == 0 + (BUF_SIZE(BCJ2_STREAM_JUMP) & 3) == 0 +*/ + +/* +CBcj2Dec: +dest is allowed to overlap with bufs[BCJ2_STREAM_MAIN], with the following conditions: + bufs[BCJ2_STREAM_MAIN] >= dest && + bufs[BCJ2_STREAM_MAIN] - dest >= tempReserv + + BUF_SIZE(BCJ2_STREAM_CALL) + + BUF_SIZE(BCJ2_STREAM_JUMP) + tempReserv = 0 : for first call of Bcj2Dec_Decode + tempReserv = 4 : for any other calls of Bcj2Dec_Decode + overlap with offset = 1 is not allowed +*/ + +typedef struct +{ + const Byte *bufs[BCJ2_NUM_STREAMS]; + const Byte *lims[BCJ2_NUM_STREAMS]; + Byte *dest; + const Byte *destLim; + + unsigned state; /* BCJ2_STREAM_MAIN has more priority than BCJ2_STATE_ORIG */ + + UInt32 ip; + Byte temp[4]; + UInt32 range; + UInt32 code; + UInt16 probs[2 + 256]; +} CBcj2Dec; + +void Bcj2Dec_Init(CBcj2Dec *p); + +/* Returns: SZ_OK or SZ_ERROR_DATA */ +SRes Bcj2Dec_Decode(CBcj2Dec *p); + +#define Bcj2Dec_IsFinished(_p_) ((_p_)->code == 0) + + + +typedef enum +{ + BCJ2_ENC_FINISH_MODE_CONTINUE, + BCJ2_ENC_FINISH_MODE_END_BLOCK, + BCJ2_ENC_FINISH_MODE_END_STREAM +} EBcj2Enc_FinishMode; + +typedef struct +{ + Byte *bufs[BCJ2_NUM_STREAMS]; + const Byte *lims[BCJ2_NUM_STREAMS]; + const Byte *src; + const Byte *srcLim; + + unsigned state; + EBcj2Enc_FinishMode finishMode; + + Byte prevByte; + + Byte cache; + UInt32 range; + UInt64 low; + UInt64 cacheSize; + + UInt32 ip; + + /* 32-bit ralative offset in JUMP/CALL commands is + - (mod 4 GB) in 32-bit mode + - signed Int32 in 64-bit mode + We use (mod 4 GB) check for fileSize. + Use fileSize up to 2 GB, if you want to support 32-bit and 64-bit code conversion. */ + UInt32 fileIp; + UInt32 fileSize; /* (fileSize <= ((UInt32)1 << 31)), 0 means no_limit */ + UInt32 relatLimit; /* (relatLimit <= ((UInt32)1 << 31)), 0 means desable_conversion */ + + UInt32 tempTarget; + unsigned tempPos; + Byte temp[4 * 2]; + + unsigned flushPos; + + UInt16 probs[2 + 256]; +} CBcj2Enc; + +void Bcj2Enc_Init(CBcj2Enc *p); +void Bcj2Enc_Encode(CBcj2Enc *p); + +#define Bcj2Enc_Get_InputData_Size(p) ((SizeT)((p)->srcLim - (p)->src) + (p)->tempPos) +#define Bcj2Enc_IsFinished(p) ((p)->flushPos == 5) + + +#define BCJ2_RELAT_LIMIT_NUM_BITS 26 +#define BCJ2_RELAT_LIMIT ((UInt32)1 << BCJ2_RELAT_LIMIT_NUM_BITS) + +/* limit for CBcj2Enc::fileSize variable */ +#define BCJ2_FileSize_MAX ((UInt32)1 << 31) + +EXTERN_C_END + +#endif diff --git a/code/nel/3rdparty/seven_zip/Bcj2Enc.c b/code/nel/3rdparty/seven_zip/Bcj2Enc.c new file mode 100644 index 000000000..bfbeb8e49 --- /dev/null +++ b/code/nel/3rdparty/seven_zip/Bcj2Enc.c @@ -0,0 +1,311 @@ +/* Bcj2Enc.c -- BCJ2 Encoder (Converter for x86 code) +2019-02-02 : Igor Pavlov : Public domain */ + +#include "Precomp.h" + +/* #define SHOW_STAT */ + +#ifdef SHOW_STAT +#include +#define PRF(x) x +#else +#define PRF(x) +#endif + +#include + +#include "Bcj2.h" +#include "CpuArch.h" + +#define CProb UInt16 + +#define kTopValue ((UInt32)1 << 24) +#define kNumModelBits 11 +#define kBitModelTotal (1 << kNumModelBits) +#define kNumMoveBits 5 + +void Bcj2Enc_Init(CBcj2Enc *p) +{ + unsigned i; + + p->state = BCJ2_ENC_STATE_OK; + p->finishMode = BCJ2_ENC_FINISH_MODE_CONTINUE; + + p->prevByte = 0; + + p->cache = 0; + p->range = 0xFFFFFFFF; + p->low = 0; + p->cacheSize = 1; + + p->ip = 0; + + p->fileIp = 0; + p->fileSize = 0; + p->relatLimit = BCJ2_RELAT_LIMIT; + + p->tempPos = 0; + + p->flushPos = 0; + + for (i = 0; i < sizeof(p->probs) / sizeof(p->probs[0]); i++) + p->probs[i] = kBitModelTotal >> 1; +} + +static BoolInt MY_FAST_CALL RangeEnc_ShiftLow(CBcj2Enc *p) +{ + if ((UInt32)p->low < (UInt32)0xFF000000 || (UInt32)(p->low >> 32) != 0) + { + Byte *buf = p->bufs[BCJ2_STREAM_RC]; + do + { + if (buf == p->lims[BCJ2_STREAM_RC]) + { + p->state = BCJ2_STREAM_RC; + p->bufs[BCJ2_STREAM_RC] = buf; + return True; + } + *buf++ = (Byte)(p->cache + (Byte)(p->low >> 32)); + p->cache = 0xFF; + } + while (--p->cacheSize); + p->bufs[BCJ2_STREAM_RC] = buf; + p->cache = (Byte)((UInt32)p->low >> 24); + } + p->cacheSize++; + p->low = (UInt32)p->low << 8; + return False; +} + +static void Bcj2Enc_Encode_2(CBcj2Enc *p) +{ + if (BCJ2_IS_32BIT_STREAM(p->state)) + { + Byte *cur = p->bufs[p->state]; + if (cur == p->lims[p->state]) + return; + SetBe32(cur, p->tempTarget); + p->bufs[p->state] = cur + 4; + } + + p->state = BCJ2_ENC_STATE_ORIG; + + for (;;) + { + if (p->range < kTopValue) + { + if (RangeEnc_ShiftLow(p)) + return; + p->range <<= 8; + } + + { + { + const Byte *src = p->src; + const Byte *srcLim; + Byte *dest; + SizeT num = p->srcLim - src; + + if (p->finishMode == BCJ2_ENC_FINISH_MODE_CONTINUE) + { + if (num <= 4) + return; + num -= 4; + } + else if (num == 0) + break; + + dest = p->bufs[BCJ2_STREAM_MAIN]; + if (num > (SizeT)(p->lims[BCJ2_STREAM_MAIN] - dest)) + { + num = p->lims[BCJ2_STREAM_MAIN] - dest; + if (num == 0) + { + p->state = BCJ2_STREAM_MAIN; + return; + } + } + + srcLim = src + num; + + if (p->prevByte == 0x0F && (src[0] & 0xF0) == 0x80) + *dest = src[0]; + else for (;;) + { + Byte b = *src; + *dest = b; + if (b != 0x0F) + { + if ((b & 0xFE) == 0xE8) + break; + dest++; + if (++src != srcLim) + continue; + break; + } + dest++; + if (++src == srcLim) + break; + if ((*src & 0xF0) != 0x80) + continue; + *dest = *src; + break; + } + + num = src - p->src; + + if (src == srcLim) + { + p->prevByte = src[-1]; + p->bufs[BCJ2_STREAM_MAIN] = dest; + p->src = src; + p->ip += (UInt32)num; + continue; + } + + { + Byte context = (Byte)(num == 0 ? p->prevByte : src[-1]); + BoolInt needConvert; + + p->bufs[BCJ2_STREAM_MAIN] = dest + 1; + p->ip += (UInt32)num + 1; + src++; + + needConvert = False; + + if ((SizeT)(p->srcLim - src) >= 4) + { + UInt32 relatVal = GetUi32(src); + if ((p->fileSize == 0 || (UInt32)(p->ip + 4 + relatVal - p->fileIp) < p->fileSize) + && ((relatVal + p->relatLimit) >> 1) < p->relatLimit) + needConvert = True; + } + + { + UInt32 bound; + unsigned ttt; + Byte b = src[-1]; + CProb *prob = p->probs + (unsigned)(b == 0xE8 ? 2 + (unsigned)context : (b == 0xE9 ? 1 : 0)); + + ttt = *prob; + bound = (p->range >> kNumModelBits) * ttt; + + if (!needConvert) + { + p->range = bound; + *prob = (CProb)(ttt + ((kBitModelTotal - ttt) >> kNumMoveBits)); + p->src = src; + p->prevByte = b; + continue; + } + + p->low += bound; + p->range -= bound; + *prob = (CProb)(ttt - (ttt >> kNumMoveBits)); + + { + UInt32 relatVal = GetUi32(src); + UInt32 absVal; + p->ip += 4; + absVal = p->ip + relatVal; + p->prevByte = src[3]; + src += 4; + p->src = src; + { + unsigned cj = (b == 0xE8) ? BCJ2_STREAM_CALL : BCJ2_STREAM_JUMP; + Byte *cur = p->bufs[cj]; + if (cur == p->lims[cj]) + { + p->state = cj; + p->tempTarget = absVal; + return; + } + SetBe32(cur, absVal); + p->bufs[cj] = cur + 4; + } + } + } + } + } + } + } + + if (p->finishMode != BCJ2_ENC_FINISH_MODE_END_STREAM) + return; + + for (; p->flushPos < 5; p->flushPos++) + if (RangeEnc_ShiftLow(p)) + return; + p->state = BCJ2_ENC_STATE_OK; +} + + +void Bcj2Enc_Encode(CBcj2Enc *p) +{ + PRF(printf("\n")); + PRF(printf("---- ip = %8d tempPos = %8d src = %8d\n", p->ip, p->tempPos, p->srcLim - p->src)); + + if (p->tempPos != 0) + { + unsigned extra = 0; + + for (;;) + { + const Byte *src = p->src; + const Byte *srcLim = p->srcLim; + EBcj2Enc_FinishMode finishMode = p->finishMode; + + p->src = p->temp; + p->srcLim = p->temp + p->tempPos; + if (src != srcLim) + p->finishMode = BCJ2_ENC_FINISH_MODE_CONTINUE; + + PRF(printf(" ip = %8d tempPos = %8d src = %8d\n", p->ip, p->tempPos, p->srcLim - p->src)); + + Bcj2Enc_Encode_2(p); + + { + unsigned num = (unsigned)(p->src - p->temp); + unsigned tempPos = p->tempPos - num; + unsigned i; + p->tempPos = tempPos; + for (i = 0; i < tempPos; i++) + p->temp[i] = p->temp[(size_t)i + num]; + + p->src = src; + p->srcLim = srcLim; + p->finishMode = finishMode; + + if (p->state != BCJ2_ENC_STATE_ORIG || src == srcLim) + return; + + if (extra >= tempPos) + { + p->src = src - tempPos; + p->tempPos = 0; + break; + } + + p->temp[tempPos] = src[0]; + p->tempPos = tempPos + 1; + p->src = src + 1; + extra++; + } + } + } + + PRF(printf("++++ ip = %8d tempPos = %8d src = %8d\n", p->ip, p->tempPos, p->srcLim - p->src)); + + Bcj2Enc_Encode_2(p); + + if (p->state == BCJ2_ENC_STATE_ORIG) + { + const Byte *src = p->src; + unsigned rem = (unsigned)(p->srcLim - src); + unsigned i; + for (i = 0; i < rem; i++) + p->temp[i] = src[i]; + p->tempPos = rem; + p->src = src + rem; + } +} diff --git a/code/nel/3rdparty/seven_zip/Bra.c b/code/nel/3rdparty/seven_zip/Bra.c new file mode 100644 index 000000000..aed17e330 --- /dev/null +++ b/code/nel/3rdparty/seven_zip/Bra.c @@ -0,0 +1,230 @@ +/* Bra.c -- Converters for RISC code +2017-04-04 : Igor Pavlov : Public domain */ + +#include "Precomp.h" + +#include "CpuArch.h" +#include "Bra.h" + +SizeT ARM_Convert(Byte *data, SizeT size, UInt32 ip, int encoding) +{ + Byte *p; + const Byte *lim; + size &= ~(size_t)3; + ip += 4; + p = data; + lim = data + size; + + if (encoding) + + for (;;) + { + for (;;) + { + if (p >= lim) + return p - data; + p += 4; + if (p[-1] == 0xEB) + break; + } + { + UInt32 v = GetUi32(p - 4); + v <<= 2; + v += ip + (UInt32)(p - data); + v >>= 2; + v &= 0x00FFFFFF; + v |= 0xEB000000; + SetUi32(p - 4, v); + } + } + + for (;;) + { + for (;;) + { + if (p >= lim) + return p - data; + p += 4; + if (p[-1] == 0xEB) + break; + } + { + UInt32 v = GetUi32(p - 4); + v <<= 2; + v -= ip + (UInt32)(p - data); + v >>= 2; + v &= 0x00FFFFFF; + v |= 0xEB000000; + SetUi32(p - 4, v); + } + } +} + + +SizeT ARMT_Convert(Byte *data, SizeT size, UInt32 ip, int encoding) +{ + Byte *p; + const Byte *lim; + size &= ~(size_t)1; + p = data; + lim = data + size - 4; + + if (encoding) + + for (;;) + { + UInt32 b1; + for (;;) + { + UInt32 b3; + if (p > lim) + return p - data; + b1 = p[1]; + b3 = p[3]; + p += 2; + b1 ^= 8; + if ((b3 & b1) >= 0xF8) + break; + } + { + UInt32 v = + ((UInt32)b1 << 19) + + (((UInt32)p[1] & 0x7) << 8) + + (((UInt32)p[-2] << 11)) + + (p[0]); + + p += 2; + { + UInt32 cur = (ip + (UInt32)(p - data)) >> 1; + v += cur; + } + + p[-4] = (Byte)(v >> 11); + p[-3] = (Byte)(0xF0 | ((v >> 19) & 0x7)); + p[-2] = (Byte)v; + p[-1] = (Byte)(0xF8 | (v >> 8)); + } + } + + for (;;) + { + UInt32 b1; + for (;;) + { + UInt32 b3; + if (p > lim) + return p - data; + b1 = p[1]; + b3 = p[3]; + p += 2; + b1 ^= 8; + if ((b3 & b1) >= 0xF8) + break; + } + { + UInt32 v = + ((UInt32)b1 << 19) + + (((UInt32)p[1] & 0x7) << 8) + + (((UInt32)p[-2] << 11)) + + (p[0]); + + p += 2; + { + UInt32 cur = (ip + (UInt32)(p - data)) >> 1; + v -= cur; + } + + /* + SetUi16(p - 4, (UInt16)(((v >> 11) & 0x7FF) | 0xF000)); + SetUi16(p - 2, (UInt16)(v | 0xF800)); + */ + + p[-4] = (Byte)(v >> 11); + p[-3] = (Byte)(0xF0 | ((v >> 19) & 0x7)); + p[-2] = (Byte)v; + p[-1] = (Byte)(0xF8 | (v >> 8)); + } + } +} + + +SizeT PPC_Convert(Byte *data, SizeT size, UInt32 ip, int encoding) +{ + Byte *p; + const Byte *lim; + size &= ~(size_t)3; + ip -= 4; + p = data; + lim = data + size; + + for (;;) + { + for (;;) + { + if (p >= lim) + return p - data; + p += 4; + /* if ((v & 0xFC000003) == 0x48000001) */ + if ((p[-4] & 0xFC) == 0x48 && (p[-1] & 3) == 1) + break; + } + { + UInt32 v = GetBe32(p - 4); + if (encoding) + v += ip + (UInt32)(p - data); + else + v -= ip + (UInt32)(p - data); + v &= 0x03FFFFFF; + v |= 0x48000000; + SetBe32(p - 4, v); + } + } +} + + +SizeT SPARC_Convert(Byte *data, SizeT size, UInt32 ip, int encoding) +{ + Byte *p; + const Byte *lim; + size &= ~(size_t)3; + ip -= 4; + p = data; + lim = data + size; + + for (;;) + { + for (;;) + { + if (p >= lim) + return p - data; + /* + v = GetBe32(p); + p += 4; + m = v + ((UInt32)5 << 29); + m ^= (UInt32)7 << 29; + m += (UInt32)1 << 22; + if ((m & ((UInt32)0x1FF << 23)) == 0) + break; + */ + p += 4; + if ((p[-4] == 0x40 && (p[-3] & 0xC0) == 0) || + (p[-4] == 0x7F && (p[-3] >= 0xC0))) + break; + } + { + UInt32 v = GetBe32(p - 4); + v <<= 2; + if (encoding) + v += ip + (UInt32)(p - data); + else + v -= ip + (UInt32)(p - data); + + v &= 0x01FFFFFF; + v -= (UInt32)1 << 24; + v ^= 0xFF000000; + v >>= 2; + v |= 0x40000000; + SetBe32(p - 4, v); + } + } +} diff --git a/code/nel/3rdparty/seven_zip/Bra.h b/code/nel/3rdparty/seven_zip/Bra.h new file mode 100644 index 000000000..855e37a6b --- /dev/null +++ b/code/nel/3rdparty/seven_zip/Bra.h @@ -0,0 +1,64 @@ +/* Bra.h -- Branch converters for executables +2013-01-18 : Igor Pavlov : Public domain */ + +#ifndef __BRA_H +#define __BRA_H + +#include "7zTypes.h" + +EXTERN_C_BEGIN + +/* +These functions convert relative addresses to absolute addresses +in CALL instructions to increase the compression ratio. + + In: + data - data buffer + size - size of data + ip - current virtual Instruction Pinter (IP) value + state - state variable for x86 converter + encoding - 0 (for decoding), 1 (for encoding) + + Out: + state - state variable for x86 converter + + Returns: + The number of processed bytes. If you call these functions with multiple calls, + you must start next call with first byte after block of processed bytes. + + Type Endian Alignment LookAhead + + x86 little 1 4 + ARMT little 2 2 + ARM little 4 0 + PPC big 4 0 + SPARC big 4 0 + IA64 little 16 0 + + size must be >= Alignment + LookAhead, if it's not last block. + If (size < Alignment + LookAhead), converter returns 0. + + Example: + + UInt32 ip = 0; + for () + { + ; size must be >= Alignment + LookAhead, if it's not last block + SizeT processed = Convert(data, size, ip, 1); + data += processed; + size -= processed; + ip += processed; + } +*/ + +#define x86_Convert_Init(state) { state = 0; } +SizeT x86_Convert(Byte *data, SizeT size, UInt32 ip, UInt32 *state, int encoding); +SizeT ARM_Convert(Byte *data, SizeT size, UInt32 ip, int encoding); +SizeT ARMT_Convert(Byte *data, SizeT size, UInt32 ip, int encoding); +SizeT PPC_Convert(Byte *data, SizeT size, UInt32 ip, int encoding); +SizeT SPARC_Convert(Byte *data, SizeT size, UInt32 ip, int encoding); +SizeT IA64_Convert(Byte *data, SizeT size, UInt32 ip, int encoding); + +EXTERN_C_END + +#endif diff --git a/code/nel/3rdparty/seven_zip/Bra86.c b/code/nel/3rdparty/seven_zip/Bra86.c new file mode 100644 index 000000000..93ed4d762 --- /dev/null +++ b/code/nel/3rdparty/seven_zip/Bra86.c @@ -0,0 +1,82 @@ +/* Bra86.c -- Converter for x86 code (BCJ) +2017-04-03 : Igor Pavlov : Public domain */ + +#include "Precomp.h" + +#include "Bra.h" + +#define Test86MSByte(b) ((((b) + 1) & 0xFE) == 0) + +SizeT x86_Convert(Byte *data, SizeT size, UInt32 ip, UInt32 *state, int encoding) +{ + SizeT pos = 0; + UInt32 mask = *state & 7; + if (size < 5) + return 0; + size -= 4; + ip += 5; + + for (;;) + { + Byte *p = data + pos; + const Byte *limit = data + size; + for (; p < limit; p++) + if ((*p & 0xFE) == 0xE8) + break; + + { + SizeT d = (SizeT)(p - data - pos); + pos = (SizeT)(p - data); + if (p >= limit) + { + *state = (d > 2 ? 0 : mask >> (unsigned)d); + return pos; + } + if (d > 2) + mask = 0; + else + { + mask >>= (unsigned)d; + if (mask != 0 && (mask > 4 || mask == 3 || Test86MSByte(p[(size_t)(mask >> 1) + 1]))) + { + mask = (mask >> 1) | 4; + pos++; + continue; + } + } + } + + if (Test86MSByte(p[4])) + { + UInt32 v = ((UInt32)p[4] << 24) | ((UInt32)p[3] << 16) | ((UInt32)p[2] << 8) | ((UInt32)p[1]); + UInt32 cur = ip + (UInt32)pos; + pos += 5; + if (encoding) + v += cur; + else + v -= cur; + if (mask != 0) + { + unsigned sh = (mask & 6) << 2; + if (Test86MSByte((Byte)(v >> sh))) + { + v ^= (((UInt32)0x100 << sh) - 1); + if (encoding) + v += cur; + else + v -= cur; + } + mask = 0; + } + p[1] = (Byte)v; + p[2] = (Byte)(v >> 8); + p[3] = (Byte)(v >> 16); + p[4] = (Byte)(0 - ((v >> 24) & 1)); + } + else + { + mask = (mask >> 1) | 4; + pos++; + } + } +} diff --git a/code/nel/3rdparty/seven_zip/BraIA64.c b/code/nel/3rdparty/seven_zip/BraIA64.c new file mode 100644 index 000000000..d1dbc62c5 --- /dev/null +++ b/code/nel/3rdparty/seven_zip/BraIA64.c @@ -0,0 +1,53 @@ +/* BraIA64.c -- Converter for IA-64 code +2017-01-26 : Igor Pavlov : Public domain */ + +#include "Precomp.h" + +#include "CpuArch.h" +#include "Bra.h" + +SizeT IA64_Convert(Byte *data, SizeT size, UInt32 ip, int encoding) +{ + SizeT i; + if (size < 16) + return 0; + size -= 16; + i = 0; + do + { + unsigned m = ((UInt32)0x334B0000 >> (data[i] & 0x1E)) & 3; + if (m) + { + m++; + do + { + Byte *p = data + (i + (size_t)m * 5 - 8); + if (((p[3] >> m) & 15) == 5 + && (((p[-1] | ((UInt32)p[0] << 8)) >> m) & 0x70) == 0) + { + unsigned raw = GetUi32(p); + unsigned v = raw >> m; + v = (v & 0xFFFFF) | ((v & (1 << 23)) >> 3); + + v <<= 4; + if (encoding) + v += ip + (UInt32)i; + else + v -= ip + (UInt32)i; + v >>= 4; + + v &= 0x1FFFFF; + v += 0x700000; + v &= 0x8FFFFF; + raw &= ~((UInt32)0x8FFFFF << m); + raw |= (v << m); + SetUi32(p, raw); + } + } + while (++m <= 4); + } + i += 16; + } + while (i <= size); + return i; +} diff --git a/code/nel/3rdparty/seven_zip/CMakeLists.txt b/code/nel/3rdparty/seven_zip/CMakeLists.txt index 95e93438d..dfbf00aa2 100644 --- a/code/nel/3rdparty/seven_zip/CMakeLists.txt +++ b/code/nel/3rdparty/seven_zip/CMakeLists.txt @@ -10,7 +10,7 @@ NL_DEFAULT_PROPS(nel_sevenzip "NeL, 3rd Party: Seven Zip") NL_ADD_RUNTIME_FLAGS(nel_sevenzip) NL_ADD_LIB_SUFFIX(nel_sevenzip) -ADD_DEFINITIONS(-D_SZ_ONE_DIRECTORY) +ADD_DEFINITIONS(-D_7ZIP_ST) IF((WITH_INSTALL_LIBRARIES AND WITH_STATIC) OR NOT WITH_STATIC) INSTALL(TARGETS nel_sevenzip LIBRARY DESTINATION ${NL_LIB_PREFIX} ARCHIVE DESTINATION ${NL_LIB_PREFIX} COMPONENT libraries) diff --git a/code/nel/3rdparty/seven_zip/Compiler.h b/code/nel/3rdparty/seven_zip/Compiler.h new file mode 100644 index 000000000..0cc409d8a --- /dev/null +++ b/code/nel/3rdparty/seven_zip/Compiler.h @@ -0,0 +1,33 @@ +/* Compiler.h +2017-04-03 : Igor Pavlov : Public domain */ + +#ifndef __7Z_COMPILER_H +#define __7Z_COMPILER_H + +#ifdef _MSC_VER + + #ifdef UNDER_CE + #define RPC_NO_WINDOWS_H + /* #pragma warning(disable : 4115) // '_RPC_ASYNC_STATE' : named type definition in parentheses */ + #pragma warning(disable : 4201) // nonstandard extension used : nameless struct/union + #pragma warning(disable : 4214) // nonstandard extension used : bit field types other than int + #endif + + #if _MSC_VER >= 1300 + #pragma warning(disable : 4996) // This function or variable may be unsafe + #else + #pragma warning(disable : 4511) // copy constructor could not be generated + #pragma warning(disable : 4512) // assignment operator could not be generated + #pragma warning(disable : 4514) // unreferenced inline function has been removed + #pragma warning(disable : 4702) // unreachable code + #pragma warning(disable : 4710) // not inlined + #pragma warning(disable : 4714) // function marked as __forceinline not inlined + #pragma warning(disable : 4786) // identifier was truncated to '255' characters in the debug information + #endif + +#endif + +#define UNUSED_VAR(x) (void)x; +/* #define UNUSED_VAR(x) x=x; */ + +#endif diff --git a/code/nel/3rdparty/seven_zip/CpuArch.c b/code/nel/3rdparty/seven_zip/CpuArch.c new file mode 100644 index 000000000..02e482e08 --- /dev/null +++ b/code/nel/3rdparty/seven_zip/CpuArch.c @@ -0,0 +1,218 @@ +/* CpuArch.c -- CPU specific code +2018-02-18: Igor Pavlov : Public domain */ + +#include "Precomp.h" + +#include "CpuArch.h" + +#ifdef MY_CPU_X86_OR_AMD64 + +#if (defined(_MSC_VER) && !defined(MY_CPU_AMD64)) || defined(__GNUC__) +#define USE_ASM +#endif + +#if !defined(USE_ASM) && _MSC_VER >= 1500 +#include +#endif + +#if defined(USE_ASM) && !defined(MY_CPU_AMD64) +static UInt32 CheckFlag(UInt32 flag) +{ + #ifdef _MSC_VER + __asm pushfd; + __asm pop EAX; + __asm mov EDX, EAX; + __asm xor EAX, flag; + __asm push EAX; + __asm popfd; + __asm pushfd; + __asm pop EAX; + __asm xor EAX, EDX; + __asm push EDX; + __asm popfd; + __asm and flag, EAX; + #else + __asm__ __volatile__ ( + "pushf\n\t" + "pop %%EAX\n\t" + "movl %%EAX,%%EDX\n\t" + "xorl %0,%%EAX\n\t" + "push %%EAX\n\t" + "popf\n\t" + "pushf\n\t" + "pop %%EAX\n\t" + "xorl %%EDX,%%EAX\n\t" + "push %%EDX\n\t" + "popf\n\t" + "andl %%EAX, %0\n\t": + "=c" (flag) : "c" (flag) : + "%eax", "%edx"); + #endif + return flag; +} +#define CHECK_CPUID_IS_SUPPORTED if (CheckFlag(1 << 18) == 0 || CheckFlag(1 << 21) == 0) return False; +#else +#define CHECK_CPUID_IS_SUPPORTED +#endif + +void MyCPUID(UInt32 function, UInt32 *a, UInt32 *b, UInt32 *c, UInt32 *d) +{ + #ifdef USE_ASM + + #ifdef _MSC_VER + + UInt32 a2, b2, c2, d2; + __asm xor EBX, EBX; + __asm xor ECX, ECX; + __asm xor EDX, EDX; + __asm mov EAX, function; + __asm cpuid; + __asm mov a2, EAX; + __asm mov b2, EBX; + __asm mov c2, ECX; + __asm mov d2, EDX; + + *a = a2; + *b = b2; + *c = c2; + *d = d2; + + #else + + __asm__ __volatile__ ( + #if defined(MY_CPU_AMD64) && defined(__PIC__) + "mov %%rbx, %%rdi;" + "cpuid;" + "xchg %%rbx, %%rdi;" + : "=a" (*a) , + "=D" (*b) , + #elif defined(MY_CPU_X86) && defined(__PIC__) + "mov %%ebx, %%edi;" + "cpuid;" + "xchgl %%ebx, %%edi;" + : "=a" (*a) , + "=D" (*b) , + #else + "cpuid" + : "=a" (*a) , + "=b" (*b) , + #endif + "=c" (*c) , + "=d" (*d) + : "0" (function)) ; + + #endif + + #else + + int CPUInfo[4]; + __cpuid(CPUInfo, function); + *a = CPUInfo[0]; + *b = CPUInfo[1]; + *c = CPUInfo[2]; + *d = CPUInfo[3]; + + #endif +} + +BoolInt x86cpuid_CheckAndRead(Cx86cpuid *p) +{ + CHECK_CPUID_IS_SUPPORTED + MyCPUID(0, &p->maxFunc, &p->vendor[0], &p->vendor[2], &p->vendor[1]); + MyCPUID(1, &p->ver, &p->b, &p->c, &p->d); + return True; +} + +static const UInt32 kVendors[][3] = +{ + { 0x756E6547, 0x49656E69, 0x6C65746E}, + { 0x68747541, 0x69746E65, 0x444D4163}, + { 0x746E6543, 0x48727561, 0x736C7561} +}; + +int x86cpuid_GetFirm(const Cx86cpuid *p) +{ + unsigned i; + for (i = 0; i < sizeof(kVendors) / sizeof(kVendors[i]); i++) + { + const UInt32 *v = kVendors[i]; + if (v[0] == p->vendor[0] && + v[1] == p->vendor[1] && + v[2] == p->vendor[2]) + return (int)i; + } + return -1; +} + +BoolInt CPU_Is_InOrder() +{ + Cx86cpuid p; + int firm; + UInt32 family, model; + if (!x86cpuid_CheckAndRead(&p)) + return True; + + family = x86cpuid_GetFamily(p.ver); + model = x86cpuid_GetModel(p.ver); + + firm = x86cpuid_GetFirm(&p); + + switch (firm) + { + case CPU_FIRM_INTEL: return (family < 6 || (family == 6 && ( + /* In-Order Atom CPU */ + model == 0x1C /* 45 nm, N4xx, D4xx, N5xx, D5xx, 230, 330 */ + || model == 0x26 /* 45 nm, Z6xx */ + || model == 0x27 /* 32 nm, Z2460 */ + || model == 0x35 /* 32 nm, Z2760 */ + || model == 0x36 /* 32 nm, N2xxx, D2xxx */ + ))); + case CPU_FIRM_AMD: return (family < 5 || (family == 5 && (model < 6 || model == 0xA))); + case CPU_FIRM_VIA: return (family < 6 || (family == 6 && model < 0xF)); + } + return True; +} + +#if !defined(MY_CPU_AMD64) && defined(_WIN32) +#include +static BoolInt CPU_Sys_Is_SSE_Supported() +{ + OSVERSIONINFO vi; + vi.dwOSVersionInfoSize = sizeof(vi); + if (!GetVersionEx(&vi)) + return False; + return (vi.dwMajorVersion >= 5); +} +#define CHECK_SYS_SSE_SUPPORT if (!CPU_Sys_Is_SSE_Supported()) return False; +#else +#define CHECK_SYS_SSE_SUPPORT +#endif + +BoolInt CPU_Is_Aes_Supported() +{ + Cx86cpuid p; + CHECK_SYS_SSE_SUPPORT + if (!x86cpuid_CheckAndRead(&p)) + return False; + return (p.c >> 25) & 1; +} + +BoolInt CPU_IsSupported_PageGB() +{ + Cx86cpuid cpuid; + if (!x86cpuid_CheckAndRead(&cpuid)) + return False; + { + UInt32 d[4] = { 0 }; + MyCPUID(0x80000000, &d[0], &d[1], &d[2], &d[3]); + if (d[0] < 0x80000001) + return False; + } + { + UInt32 d[4] = { 0 }; + MyCPUID(0x80000001, &d[0], &d[1], &d[2], &d[3]); + return (d[3] >> 26) & 1; + } +} + +#endif diff --git a/code/nel/3rdparty/seven_zip/CpuArch.h b/code/nel/3rdparty/seven_zip/CpuArch.h new file mode 100644 index 000000000..bd4293880 --- /dev/null +++ b/code/nel/3rdparty/seven_zip/CpuArch.h @@ -0,0 +1,336 @@ +/* CpuArch.h -- CPU specific code +2018-02-18 : Igor Pavlov : Public domain */ + +#ifndef __CPU_ARCH_H +#define __CPU_ARCH_H + +#include "7zTypes.h" + +EXTERN_C_BEGIN + +/* +MY_CPU_LE means that CPU is LITTLE ENDIAN. +MY_CPU_BE means that CPU is BIG ENDIAN. +If MY_CPU_LE and MY_CPU_BE are not defined, we don't know about ENDIANNESS of platform. + +MY_CPU_LE_UNALIGN means that CPU is LITTLE ENDIAN and CPU supports unaligned memory accesses. +*/ + +#if defined(_M_X64) \ + || defined(_M_AMD64) \ + || defined(__x86_64__) \ + || defined(__AMD64__) \ + || defined(__amd64__) + #define MY_CPU_AMD64 + #ifdef __ILP32__ + #define MY_CPU_NAME "x32" + #else + #define MY_CPU_NAME "x64" + #endif + #define MY_CPU_64BIT +#endif + + +#if defined(_M_IX86) \ + || defined(__i386__) + #define MY_CPU_X86 + #define MY_CPU_NAME "x86" + #define MY_CPU_32BIT +#endif + + +#if defined(_M_ARM64) \ + || defined(__AARCH64EL__) \ + || defined(__AARCH64EB__) \ + || defined(__aarch64__) + #define MY_CPU_ARM64 + #define MY_CPU_NAME "arm64" + #define MY_CPU_64BIT +#endif + + +#if defined(_M_ARM) \ + || defined(_M_ARM_NT) \ + || defined(_M_ARMT) \ + || defined(__arm__) \ + || defined(__thumb__) \ + || defined(__ARMEL__) \ + || defined(__ARMEB__) \ + || defined(__THUMBEL__) \ + || defined(__THUMBEB__) + #define MY_CPU_ARM + #define MY_CPU_NAME "arm" + #define MY_CPU_32BIT +#endif + + +#if defined(_M_IA64) \ + || defined(__ia64__) + #define MY_CPU_IA64 + #define MY_CPU_NAME "ia64" + #define MY_CPU_64BIT +#endif + + +#if defined(__mips64) \ + || defined(__mips64__) \ + || (defined(__mips) && (__mips == 64 || __mips == 4 || __mips == 3)) + #define MY_CPU_NAME "mips64" + #define MY_CPU_64BIT +#elif defined(__mips__) + #define MY_CPU_NAME "mips" + /* #define MY_CPU_32BIT */ +#endif + + +#if defined(__ppc64__) \ + || defined(__powerpc64__) + #ifdef __ILP32__ + #define MY_CPU_NAME "ppc64-32" + #else + #define MY_CPU_NAME "ppc64" + #endif + #define MY_CPU_64BIT +#elif defined(__ppc__) \ + || defined(__powerpc__) + #define MY_CPU_NAME "ppc" + #define MY_CPU_32BIT +#endif + + +#if defined(__sparc64__) + #define MY_CPU_NAME "sparc64" + #define MY_CPU_64BIT +#elif defined(__sparc__) + #define MY_CPU_NAME "sparc" + /* #define MY_CPU_32BIT */ +#endif + + +#if defined(MY_CPU_X86) || defined(MY_CPU_AMD64) +#define MY_CPU_X86_OR_AMD64 +#endif + + +#ifdef _WIN32 + + #ifdef MY_CPU_ARM + #define MY_CPU_ARM_LE + #endif + + #ifdef MY_CPU_ARM64 + #define MY_CPU_ARM64_LE + #endif + + #ifdef _M_IA64 + #define MY_CPU_IA64_LE + #endif + +#endif + + +#if defined(MY_CPU_X86_OR_AMD64) \ + || defined(MY_CPU_ARM_LE) \ + || defined(MY_CPU_ARM64_LE) \ + || defined(MY_CPU_IA64_LE) \ + || defined(__LITTLE_ENDIAN__) \ + || defined(__ARMEL__) \ + || defined(__THUMBEL__) \ + || defined(__AARCH64EL__) \ + || defined(__MIPSEL__) \ + || defined(__MIPSEL) \ + || defined(_MIPSEL) \ + || defined(__BFIN__) \ + || (defined(__BYTE_ORDER__) && (__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__)) + #define MY_CPU_LE +#endif + +#if defined(__BIG_ENDIAN__) \ + || defined(__ARMEB__) \ + || defined(__THUMBEB__) \ + || defined(__AARCH64EB__) \ + || defined(__MIPSEB__) \ + || defined(__MIPSEB) \ + || defined(_MIPSEB) \ + || defined(__m68k__) \ + || defined(__s390__) \ + || defined(__s390x__) \ + || defined(__zarch__) \ + || (defined(__BYTE_ORDER__) && (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__)) + #define MY_CPU_BE +#endif + + +#if defined(MY_CPU_LE) && defined(MY_CPU_BE) + #error Stop_Compiling_Bad_Endian +#endif + + +#if defined(MY_CPU_32BIT) && defined(MY_CPU_64BIT) + #error Stop_Compiling_Bad_32_64_BIT +#endif + + +#ifndef MY_CPU_NAME + #ifdef MY_CPU_LE + #define MY_CPU_NAME "LE" + #elif defined(MY_CPU_BE) + #define MY_CPU_NAME "BE" + #else + /* + #define MY_CPU_NAME "" + */ + #endif +#endif + + + + + +#ifdef MY_CPU_LE + #if defined(MY_CPU_X86_OR_AMD64) \ + || defined(MY_CPU_ARM64) \ + || defined(__ARM_FEATURE_UNALIGNED) + #define MY_CPU_LE_UNALIGN + #endif +#endif + + +#ifdef MY_CPU_LE_UNALIGN + +#define GetUi16(p) (*(const UInt16 *)(const void *)(p)) +#define GetUi32(p) (*(const UInt32 *)(const void *)(p)) +#define GetUi64(p) (*(const UInt64 *)(const void *)(p)) + +#define SetUi16(p, v) { *(UInt16 *)(p) = (v); } +#define SetUi32(p, v) { *(UInt32 *)(p) = (v); } +#define SetUi64(p, v) { *(UInt64 *)(p) = (v); } + +#else + +#define GetUi16(p) ( (UInt16) ( \ + ((const Byte *)(p))[0] | \ + ((UInt16)((const Byte *)(p))[1] << 8) )) + +#define GetUi32(p) ( \ + ((const Byte *)(p))[0] | \ + ((UInt32)((const Byte *)(p))[1] << 8) | \ + ((UInt32)((const Byte *)(p))[2] << 16) | \ + ((UInt32)((const Byte *)(p))[3] << 24)) + +#define GetUi64(p) (GetUi32(p) | ((UInt64)GetUi32(((const Byte *)(p)) + 4) << 32)) + +#define SetUi16(p, v) { Byte *_ppp_ = (Byte *)(p); UInt32 _vvv_ = (v); \ + _ppp_[0] = (Byte)_vvv_; \ + _ppp_[1] = (Byte)(_vvv_ >> 8); } + +#define SetUi32(p, v) { Byte *_ppp_ = (Byte *)(p); UInt32 _vvv_ = (v); \ + _ppp_[0] = (Byte)_vvv_; \ + _ppp_[1] = (Byte)(_vvv_ >> 8); \ + _ppp_[2] = (Byte)(_vvv_ >> 16); \ + _ppp_[3] = (Byte)(_vvv_ >> 24); } + +#define SetUi64(p, v) { Byte *_ppp2_ = (Byte *)(p); UInt64 _vvv2_ = (v); \ + SetUi32(_ppp2_ , (UInt32)_vvv2_); \ + SetUi32(_ppp2_ + 4, (UInt32)(_vvv2_ >> 32)); } + +#endif + +#ifdef __has_builtin + #define MY__has_builtin(x) __has_builtin(x) +#else + #define MY__has_builtin(x) 0 +#endif + +#if defined(MY_CPU_LE_UNALIGN) && /* defined(_WIN64) && */ (_MSC_VER >= 1300) + +/* Note: we use bswap instruction, that is unsupported in 386 cpu */ + +#include + +#pragma intrinsic(_byteswap_ushort) +#pragma intrinsic(_byteswap_ulong) +#pragma intrinsic(_byteswap_uint64) + +/* #define GetBe16(p) _byteswap_ushort(*(const UInt16 *)(const Byte *)(p)) */ +#define GetBe32(p) _byteswap_ulong(*(const UInt32 *)(const Byte *)(p)) +#define GetBe64(p) _byteswap_uint64(*(const UInt64 *)(const Byte *)(p)) + +#define SetBe32(p, v) (*(UInt32 *)(void *)(p)) = _byteswap_ulong(v) + +#elif defined(MY_CPU_LE_UNALIGN) && ( \ + (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))) \ + || (defined(__clang__) && MY__has_builtin(__builtin_bswap16)) ) + +/* #define GetBe16(p) __builtin_bswap16(*(const UInt16 *)(const Byte *)(p)) */ +#define GetBe32(p) __builtin_bswap32(*(const UInt32 *)(const Byte *)(p)) +#define GetBe64(p) __builtin_bswap64(*(const UInt64 *)(const Byte *)(p)) + +#define SetBe32(p, v) (*(UInt32 *)(void *)(p)) = __builtin_bswap32(v) + +#else + +#define GetBe32(p) ( \ + ((UInt32)((const Byte *)(p))[0] << 24) | \ + ((UInt32)((const Byte *)(p))[1] << 16) | \ + ((UInt32)((const Byte *)(p))[2] << 8) | \ + ((const Byte *)(p))[3] ) + +#define GetBe64(p) (((UInt64)GetBe32(p) << 32) | GetBe32(((const Byte *)(p)) + 4)) + +#define SetBe32(p, v) { Byte *_ppp_ = (Byte *)(p); UInt32 _vvv_ = (v); \ + _ppp_[0] = (Byte)(_vvv_ >> 24); \ + _ppp_[1] = (Byte)(_vvv_ >> 16); \ + _ppp_[2] = (Byte)(_vvv_ >> 8); \ + _ppp_[3] = (Byte)_vvv_; } + +#endif + + +#ifndef GetBe16 + +#define GetBe16(p) ( (UInt16) ( \ + ((UInt16)((const Byte *)(p))[0] << 8) | \ + ((const Byte *)(p))[1] )) + +#endif + + + +#ifdef MY_CPU_X86_OR_AMD64 + +typedef struct +{ + UInt32 maxFunc; + UInt32 vendor[3]; + UInt32 ver; + UInt32 b; + UInt32 c; + UInt32 d; +} Cx86cpuid; + +enum +{ + CPU_FIRM_INTEL, + CPU_FIRM_AMD, + CPU_FIRM_VIA +}; + +void MyCPUID(UInt32 function, UInt32 *a, UInt32 *b, UInt32 *c, UInt32 *d); + +BoolInt x86cpuid_CheckAndRead(Cx86cpuid *p); +int x86cpuid_GetFirm(const Cx86cpuid *p); + +#define x86cpuid_GetFamily(ver) (((ver >> 16) & 0xFF0) | ((ver >> 8) & 0xF)) +#define x86cpuid_GetModel(ver) (((ver >> 12) & 0xF0) | ((ver >> 4) & 0xF)) +#define x86cpuid_GetStepping(ver) (ver & 0xF) + +BoolInt CPU_Is_InOrder(); +BoolInt CPU_Is_Aes_Supported(); +BoolInt CPU_IsSupported_PageGB(); + +#endif + +EXTERN_C_END + +#endif diff --git a/code/nel/3rdparty/seven_zip/Delta.c b/code/nel/3rdparty/seven_zip/Delta.c new file mode 100644 index 000000000..e3edd21ed --- /dev/null +++ b/code/nel/3rdparty/seven_zip/Delta.c @@ -0,0 +1,64 @@ +/* Delta.c -- Delta converter +2009-05-26 : Igor Pavlov : Public domain */ + +#include "Precomp.h" + +#include "Delta.h" + +void Delta_Init(Byte *state) +{ + unsigned i; + for (i = 0; i < DELTA_STATE_SIZE; i++) + state[i] = 0; +} + +static void MyMemCpy(Byte *dest, const Byte *src, unsigned size) +{ + unsigned i; + for (i = 0; i < size; i++) + dest[i] = src[i]; +} + +void Delta_Encode(Byte *state, unsigned delta, Byte *data, SizeT size) +{ + Byte buf[DELTA_STATE_SIZE]; + unsigned j = 0; + MyMemCpy(buf, state, delta); + { + SizeT i; + for (i = 0; i < size;) + { + for (j = 0; j < delta && i < size; i++, j++) + { + Byte b = data[i]; + data[i] = (Byte)(b - buf[j]); + buf[j] = b; + } + } + } + if (j == delta) + j = 0; + MyMemCpy(state, buf + j, delta - j); + MyMemCpy(state + delta - j, buf, j); +} + +void Delta_Decode(Byte *state, unsigned delta, Byte *data, SizeT size) +{ + Byte buf[DELTA_STATE_SIZE]; + unsigned j = 0; + MyMemCpy(buf, state, delta); + { + SizeT i; + for (i = 0; i < size;) + { + for (j = 0; j < delta && i < size; i++, j++) + { + buf[j] = data[i] = (Byte)(buf[j] + data[i]); + } + } + } + if (j == delta) + j = 0; + MyMemCpy(state, buf + j, delta - j); + MyMemCpy(state + delta - j, buf, j); +} diff --git a/code/nel/3rdparty/seven_zip/Delta.h b/code/nel/3rdparty/seven_zip/Delta.h new file mode 100644 index 000000000..2fa54ad67 --- /dev/null +++ b/code/nel/3rdparty/seven_zip/Delta.h @@ -0,0 +1,19 @@ +/* Delta.h -- Delta converter +2013-01-18 : Igor Pavlov : Public domain */ + +#ifndef __DELTA_H +#define __DELTA_H + +#include "7zTypes.h" + +EXTERN_C_BEGIN + +#define DELTA_STATE_SIZE 256 + +void Delta_Init(Byte *state); +void Delta_Encode(Byte *state, unsigned delta, Byte *data, SizeT size); +void Delta_Decode(Byte *state, unsigned delta, Byte *data, SizeT size); + +EXTERN_C_END + +#endif diff --git a/code/nel/3rdparty/seven_zip/DllSecur.c b/code/nel/3rdparty/seven_zip/DllSecur.c new file mode 100644 index 000000000..5ea108ab8 --- /dev/null +++ b/code/nel/3rdparty/seven_zip/DllSecur.c @@ -0,0 +1,108 @@ +/* DllSecur.c -- DLL loading security +2018-02-21 : Igor Pavlov : Public domain */ + +#include "Precomp.h" + +#ifdef _WIN32 + +#include + +#include "DllSecur.h" + +#ifndef UNDER_CE + +typedef BOOL (WINAPI *Func_SetDefaultDllDirectories)(DWORD DirectoryFlags); + +#define MY_LOAD_LIBRARY_SEARCH_USER_DIRS 0x400 +#define MY_LOAD_LIBRARY_SEARCH_SYSTEM32 0x800 + +static const char * const g_Dlls = + #ifndef _CONSOLE + "UXTHEME\0" + #endif + "USERENV\0" + "SETUPAPI\0" + "APPHELP\0" + "PROPSYS\0" + "DWMAPI\0" + "CRYPTBASE\0" + "OLEACC\0" + "CLBCATQ\0" + "VERSION\0" + ; + +#endif + +void My_SetDefaultDllDirectories() +{ + #ifndef UNDER_CE + + OSVERSIONINFO vi; + vi.dwOSVersionInfoSize = sizeof(vi); + GetVersionEx(&vi); + if (!GetVersionEx(&vi) || vi.dwMajorVersion != 6 || vi.dwMinorVersion != 0) + { + Func_SetDefaultDllDirectories setDllDirs = (Func_SetDefaultDllDirectories) + GetProcAddress(GetModuleHandle(TEXT("kernel32.dll")), "SetDefaultDllDirectories"); + if (setDllDirs) + if (setDllDirs(MY_LOAD_LIBRARY_SEARCH_SYSTEM32 | MY_LOAD_LIBRARY_SEARCH_USER_DIRS)) + return; + } + + #endif +} + + +void LoadSecurityDlls() +{ + #ifndef UNDER_CE + + wchar_t buf[MAX_PATH + 100]; + + { + // at Vista (ver 6.0) : CoCreateInstance(CLSID_ShellLink, ...) doesn't work after SetDefaultDllDirectories() : Check it ??? + OSVERSIONINFO vi; + vi.dwOSVersionInfoSize = sizeof(vi); + if (!GetVersionEx(&vi) || vi.dwMajorVersion != 6 || vi.dwMinorVersion != 0) + { + Func_SetDefaultDllDirectories setDllDirs = (Func_SetDefaultDllDirectories) + GetProcAddress(GetModuleHandle(TEXT("kernel32.dll")), "SetDefaultDllDirectories"); + if (setDllDirs) + if (setDllDirs(MY_LOAD_LIBRARY_SEARCH_SYSTEM32 | MY_LOAD_LIBRARY_SEARCH_USER_DIRS)) + return; + } + } + + { + unsigned len = GetSystemDirectoryW(buf, MAX_PATH + 2); + if (len == 0 || len > MAX_PATH) + return; + } + { + const char *dll; + unsigned pos = (unsigned)lstrlenW(buf); + + if (buf[pos - 1] != '\\') + buf[pos++] = '\\'; + + for (dll = g_Dlls; dll[0] != 0;) + { + unsigned k = 0; + for (;;) + { + char c = *dll++; + buf[pos + k] = (Byte)c; + k++; + if (c == 0) + break; + } + + lstrcatW(buf, L".dll"); + LoadLibraryExW(buf, NULL, LOAD_WITH_ALTERED_SEARCH_PATH); + } + } + + #endif +} + +#endif diff --git a/code/nel/3rdparty/seven_zip/DllSecur.h b/code/nel/3rdparty/seven_zip/DllSecur.h new file mode 100644 index 000000000..e2a049ad2 --- /dev/null +++ b/code/nel/3rdparty/seven_zip/DllSecur.h @@ -0,0 +1,20 @@ +/* DllSecur.h -- DLL loading for security +2018-02-19 : Igor Pavlov : Public domain */ + +#ifndef __DLL_SECUR_H +#define __DLL_SECUR_H + +#include "7zTypes.h" + +EXTERN_C_BEGIN + +#ifdef _WIN32 + +void My_SetDefaultDllDirectories(); +void LoadSecurityDlls(); + +#endif + +EXTERN_C_END + +#endif diff --git a/code/nel/3rdparty/seven_zip/LzFind.c b/code/nel/3rdparty/seven_zip/LzFind.c new file mode 100644 index 000000000..df55e86c1 --- /dev/null +++ b/code/nel/3rdparty/seven_zip/LzFind.c @@ -0,0 +1,1127 @@ +/* LzFind.c -- Match finder for LZ algorithms +2018-07-08 : Igor Pavlov : Public domain */ + +#include "Precomp.h" + +#include + +#include "LzFind.h" +#include "LzHash.h" + +#define kEmptyHashValue 0 +#define kMaxValForNormalize ((UInt32)0xFFFFFFFF) +#define kNormalizeStepMin (1 << 10) /* it must be power of 2 */ +#define kNormalizeMask (~(UInt32)(kNormalizeStepMin - 1)) +#define kMaxHistorySize ((UInt32)7 << 29) + +#define kStartMaxLen 3 + +static void LzInWindow_Free(CMatchFinder *p, ISzAllocPtr alloc) +{ + if (!p->directInput) + { + ISzAlloc_Free(alloc, p->bufferBase); + p->bufferBase = NULL; + } +} + +/* keepSizeBefore + keepSizeAfter + keepSizeReserv must be < 4G) */ + +static int LzInWindow_Create(CMatchFinder *p, UInt32 keepSizeReserv, ISzAllocPtr alloc) +{ + UInt32 blockSize = p->keepSizeBefore + p->keepSizeAfter + keepSizeReserv; + if (p->directInput) + { + p->blockSize = blockSize; + return 1; + } + if (!p->bufferBase || p->blockSize != blockSize) + { + LzInWindow_Free(p, alloc); + p->blockSize = blockSize; + p->bufferBase = (Byte *)ISzAlloc_Alloc(alloc, (size_t)blockSize); + } + return (p->bufferBase != NULL); +} + +Byte *MatchFinder_GetPointerToCurrentPos(CMatchFinder *p) { return p->buffer; } + +UInt32 MatchFinder_GetNumAvailableBytes(CMatchFinder *p) { return p->streamPos - p->pos; } + +void MatchFinder_ReduceOffsets(CMatchFinder *p, UInt32 subValue) +{ + p->posLimit -= subValue; + p->pos -= subValue; + p->streamPos -= subValue; +} + +static void MatchFinder_ReadBlock(CMatchFinder *p) +{ + if (p->streamEndWasReached || p->result != SZ_OK) + return; + + /* We use (p->streamPos - p->pos) value. (p->streamPos < p->pos) is allowed. */ + + if (p->directInput) + { + UInt32 curSize = 0xFFFFFFFF - (p->streamPos - p->pos); + if (curSize > p->directInputRem) + curSize = (UInt32)p->directInputRem; + p->directInputRem -= curSize; + p->streamPos += curSize; + if (p->directInputRem == 0) + p->streamEndWasReached = 1; + return; + } + + for (;;) + { + Byte *dest = p->buffer + (p->streamPos - p->pos); + size_t size = (p->bufferBase + p->blockSize - dest); + if (size == 0) + return; + + p->result = ISeqInStream_Read(p->stream, dest, &size); + if (p->result != SZ_OK) + return; + if (size == 0) + { + p->streamEndWasReached = 1; + return; + } + p->streamPos += (UInt32)size; + if (p->streamPos - p->pos > p->keepSizeAfter) + return; + } +} + +void MatchFinder_MoveBlock(CMatchFinder *p) +{ + memmove(p->bufferBase, + p->buffer - p->keepSizeBefore, + (size_t)(p->streamPos - p->pos) + p->keepSizeBefore); + p->buffer = p->bufferBase + p->keepSizeBefore; +} + +int MatchFinder_NeedMove(CMatchFinder *p) +{ + if (p->directInput) + return 0; + /* if (p->streamEndWasReached) return 0; */ + return ((size_t)(p->bufferBase + p->blockSize - p->buffer) <= p->keepSizeAfter); +} + +void MatchFinder_ReadIfRequired(CMatchFinder *p) +{ + if (p->streamEndWasReached) + return; + if (p->keepSizeAfter >= p->streamPos - p->pos) + MatchFinder_ReadBlock(p); +} + +static void MatchFinder_CheckAndMoveAndRead(CMatchFinder *p) +{ + if (MatchFinder_NeedMove(p)) + MatchFinder_MoveBlock(p); + MatchFinder_ReadBlock(p); +} + +static void MatchFinder_SetDefaultSettings(CMatchFinder *p) +{ + p->cutValue = 32; + p->btMode = 1; + p->numHashBytes = 4; + p->bigHash = 0; +} + +#define kCrcPoly 0xEDB88320 + +void MatchFinder_Construct(CMatchFinder *p) +{ + unsigned i; + p->bufferBase = NULL; + p->directInput = 0; + p->hash = NULL; + p->expectedDataSize = (UInt64)(Int64)-1; + MatchFinder_SetDefaultSettings(p); + + for (i = 0; i < 256; i++) + { + UInt32 r = (UInt32)i; + unsigned j; + for (j = 0; j < 8; j++) + r = (r >> 1) ^ (kCrcPoly & ((UInt32)0 - (r & 1))); + p->crc[i] = r; + } +} + +static void MatchFinder_FreeThisClassMemory(CMatchFinder *p, ISzAllocPtr alloc) +{ + ISzAlloc_Free(alloc, p->hash); + p->hash = NULL; +} + +void MatchFinder_Free(CMatchFinder *p, ISzAllocPtr alloc) +{ + MatchFinder_FreeThisClassMemory(p, alloc); + LzInWindow_Free(p, alloc); +} + +static CLzRef* AllocRefs(size_t num, ISzAllocPtr alloc) +{ + size_t sizeInBytes = (size_t)num * sizeof(CLzRef); + if (sizeInBytes / sizeof(CLzRef) != num) + return NULL; + return (CLzRef *)ISzAlloc_Alloc(alloc, sizeInBytes); +} + +int MatchFinder_Create(CMatchFinder *p, UInt32 historySize, + UInt32 keepAddBufferBefore, UInt32 matchMaxLen, UInt32 keepAddBufferAfter, + ISzAllocPtr alloc) +{ + UInt32 sizeReserv; + + if (historySize > kMaxHistorySize) + { + MatchFinder_Free(p, alloc); + return 0; + } + + sizeReserv = historySize >> 1; + if (historySize >= ((UInt32)3 << 30)) sizeReserv = historySize >> 3; + else if (historySize >= ((UInt32)2 << 30)) sizeReserv = historySize >> 2; + + sizeReserv += (keepAddBufferBefore + matchMaxLen + keepAddBufferAfter) / 2 + (1 << 19); + + p->keepSizeBefore = historySize + keepAddBufferBefore + 1; + p->keepSizeAfter = matchMaxLen + keepAddBufferAfter; + + /* we need one additional byte, since we use MoveBlock after pos++ and before dictionary using */ + + if (LzInWindow_Create(p, sizeReserv, alloc)) + { + UInt32 newCyclicBufferSize = historySize + 1; + UInt32 hs; + p->matchMaxLen = matchMaxLen; + { + p->fixedHashSize = 0; + if (p->numHashBytes == 2) + hs = (1 << 16) - 1; + else + { + hs = historySize; + if (hs > p->expectedDataSize) + hs = (UInt32)p->expectedDataSize; + if (hs != 0) + hs--; + hs |= (hs >> 1); + hs |= (hs >> 2); + hs |= (hs >> 4); + hs |= (hs >> 8); + hs >>= 1; + hs |= 0xFFFF; /* don't change it! It's required for Deflate */ + if (hs > (1 << 24)) + { + if (p->numHashBytes == 3) + hs = (1 << 24) - 1; + else + hs >>= 1; + /* if (bigHash) mode, GetHeads4b() in LzFindMt.c needs (hs >= ((1 << 24) - 1))) */ + } + } + p->hashMask = hs; + hs++; + if (p->numHashBytes > 2) p->fixedHashSize += kHash2Size; + if (p->numHashBytes > 3) p->fixedHashSize += kHash3Size; + if (p->numHashBytes > 4) p->fixedHashSize += kHash4Size; + hs += p->fixedHashSize; + } + + { + size_t newSize; + size_t numSons; + p->historySize = historySize; + p->hashSizeSum = hs; + p->cyclicBufferSize = newCyclicBufferSize; + + numSons = newCyclicBufferSize; + if (p->btMode) + numSons <<= 1; + newSize = hs + numSons; + + if (p->hash && p->numRefs == newSize) + return 1; + + MatchFinder_FreeThisClassMemory(p, alloc); + p->numRefs = newSize; + p->hash = AllocRefs(newSize, alloc); + + if (p->hash) + { + p->son = p->hash + p->hashSizeSum; + return 1; + } + } + } + + MatchFinder_Free(p, alloc); + return 0; +} + +static void MatchFinder_SetLimits(CMatchFinder *p) +{ + UInt32 limit = kMaxValForNormalize - p->pos; + UInt32 limit2 = p->cyclicBufferSize - p->cyclicBufferPos; + + if (limit2 < limit) + limit = limit2; + limit2 = p->streamPos - p->pos; + + if (limit2 <= p->keepSizeAfter) + { + if (limit2 > 0) + limit2 = 1; + } + else + limit2 -= p->keepSizeAfter; + + if (limit2 < limit) + limit = limit2; + + { + UInt32 lenLimit = p->streamPos - p->pos; + if (lenLimit > p->matchMaxLen) + lenLimit = p->matchMaxLen; + p->lenLimit = lenLimit; + } + p->posLimit = p->pos + limit; +} + + +void MatchFinder_Init_LowHash(CMatchFinder *p) +{ + size_t i; + CLzRef *items = p->hash; + size_t numItems = p->fixedHashSize; + for (i = 0; i < numItems; i++) + items[i] = kEmptyHashValue; +} + + +void MatchFinder_Init_HighHash(CMatchFinder *p) +{ + size_t i; + CLzRef *items = p->hash + p->fixedHashSize; + size_t numItems = (size_t)p->hashMask + 1; + for (i = 0; i < numItems; i++) + items[i] = kEmptyHashValue; +} + + +void MatchFinder_Init_3(CMatchFinder *p, int readData) +{ + p->cyclicBufferPos = 0; + p->buffer = p->bufferBase; + p->pos = + p->streamPos = p->cyclicBufferSize; + p->result = SZ_OK; + p->streamEndWasReached = 0; + + if (readData) + MatchFinder_ReadBlock(p); + + MatchFinder_SetLimits(p); +} + + +void MatchFinder_Init(CMatchFinder *p) +{ + MatchFinder_Init_HighHash(p); + MatchFinder_Init_LowHash(p); + MatchFinder_Init_3(p, True); +} + + +static UInt32 MatchFinder_GetSubValue(CMatchFinder *p) +{ + return (p->pos - p->historySize - 1) & kNormalizeMask; +} + +void MatchFinder_Normalize3(UInt32 subValue, CLzRef *items, size_t numItems) +{ + size_t i; + for (i = 0; i < numItems; i++) + { + UInt32 value = items[i]; + if (value <= subValue) + value = kEmptyHashValue; + else + value -= subValue; + items[i] = value; + } +} + +static void MatchFinder_Normalize(CMatchFinder *p) +{ + UInt32 subValue = MatchFinder_GetSubValue(p); + MatchFinder_Normalize3(subValue, p->hash, p->numRefs); + MatchFinder_ReduceOffsets(p, subValue); +} + + +MY_NO_INLINE +static void MatchFinder_CheckLimits(CMatchFinder *p) +{ + if (p->pos == kMaxValForNormalize) + MatchFinder_Normalize(p); + if (!p->streamEndWasReached && p->keepSizeAfter == p->streamPos - p->pos) + MatchFinder_CheckAndMoveAndRead(p); + if (p->cyclicBufferPos == p->cyclicBufferSize) + p->cyclicBufferPos = 0; + MatchFinder_SetLimits(p); +} + + +/* + (lenLimit > maxLen) +*/ +MY_FORCE_INLINE +static UInt32 * Hc_GetMatchesSpec(unsigned lenLimit, UInt32 curMatch, UInt32 pos, const Byte *cur, CLzRef *son, + UInt32 _cyclicBufferPos, UInt32 _cyclicBufferSize, UInt32 cutValue, + UInt32 *distances, unsigned maxLen) +{ + /* + son[_cyclicBufferPos] = curMatch; + for (;;) + { + UInt32 delta = pos - curMatch; + if (cutValue-- == 0 || delta >= _cyclicBufferSize) + return distances; + { + const Byte *pb = cur - delta; + curMatch = son[_cyclicBufferPos - delta + ((delta > _cyclicBufferPos) ? _cyclicBufferSize : 0)]; + if (pb[maxLen] == cur[maxLen] && *pb == *cur) + { + UInt32 len = 0; + while (++len != lenLimit) + if (pb[len] != cur[len]) + break; + if (maxLen < len) + { + maxLen = len; + *distances++ = len; + *distances++ = delta - 1; + if (len == lenLimit) + return distances; + } + } + } + } + */ + + const Byte *lim = cur + lenLimit; + son[_cyclicBufferPos] = curMatch; + do + { + UInt32 delta = pos - curMatch; + if (delta >= _cyclicBufferSize) + break; + { + ptrdiff_t diff; + curMatch = son[_cyclicBufferPos - delta + ((delta > _cyclicBufferPos) ? _cyclicBufferSize : 0)]; + diff = (ptrdiff_t)0 - delta; + if (cur[maxLen] == cur[maxLen + diff]) + { + const Byte *c = cur; + while (*c == c[diff]) + { + if (++c == lim) + { + distances[0] = (UInt32)(lim - cur); + distances[1] = delta - 1; + return distances + 2; + } + } + { + unsigned len = (unsigned)(c - cur); + if (maxLen < len) + { + maxLen = len; + distances[0] = (UInt32)len; + distances[1] = delta - 1; + distances += 2; + } + } + } + } + } + while (--cutValue); + + return distances; +} + + +MY_FORCE_INLINE +UInt32 * GetMatchesSpec1(UInt32 lenLimit, UInt32 curMatch, UInt32 pos, const Byte *cur, CLzRef *son, + UInt32 _cyclicBufferPos, UInt32 _cyclicBufferSize, UInt32 cutValue, + UInt32 *distances, UInt32 maxLen) +{ + CLzRef *ptr0 = son + ((size_t)_cyclicBufferPos << 1) + 1; + CLzRef *ptr1 = son + ((size_t)_cyclicBufferPos << 1); + unsigned len0 = 0, len1 = 0; + for (;;) + { + UInt32 delta = pos - curMatch; + if (cutValue-- == 0 || delta >= _cyclicBufferSize) + { + *ptr0 = *ptr1 = kEmptyHashValue; + return distances; + } + { + CLzRef *pair = son + ((size_t)(_cyclicBufferPos - delta + ((delta > _cyclicBufferPos) ? _cyclicBufferSize : 0)) << 1); + const Byte *pb = cur - delta; + unsigned len = (len0 < len1 ? len0 : len1); + UInt32 pair0 = pair[0]; + if (pb[len] == cur[len]) + { + if (++len != lenLimit && pb[len] == cur[len]) + while (++len != lenLimit) + if (pb[len] != cur[len]) + break; + if (maxLen < len) + { + maxLen = (UInt32)len; + *distances++ = (UInt32)len; + *distances++ = delta - 1; + if (len == lenLimit) + { + *ptr1 = pair0; + *ptr0 = pair[1]; + return distances; + } + } + } + if (pb[len] < cur[len]) + { + *ptr1 = curMatch; + ptr1 = pair + 1; + curMatch = *ptr1; + len1 = len; + } + else + { + *ptr0 = curMatch; + ptr0 = pair; + curMatch = *ptr0; + len0 = len; + } + } + } +} + +static void SkipMatchesSpec(UInt32 lenLimit, UInt32 curMatch, UInt32 pos, const Byte *cur, CLzRef *son, + UInt32 _cyclicBufferPos, UInt32 _cyclicBufferSize, UInt32 cutValue) +{ + CLzRef *ptr0 = son + ((size_t)_cyclicBufferPos << 1) + 1; + CLzRef *ptr1 = son + ((size_t)_cyclicBufferPos << 1); + unsigned len0 = 0, len1 = 0; + for (;;) + { + UInt32 delta = pos - curMatch; + if (cutValue-- == 0 || delta >= _cyclicBufferSize) + { + *ptr0 = *ptr1 = kEmptyHashValue; + return; + } + { + CLzRef *pair = son + ((size_t)(_cyclicBufferPos - delta + ((delta > _cyclicBufferPos) ? _cyclicBufferSize : 0)) << 1); + const Byte *pb = cur - delta; + unsigned len = (len0 < len1 ? len0 : len1); + if (pb[len] == cur[len]) + { + while (++len != lenLimit) + if (pb[len] != cur[len]) + break; + { + if (len == lenLimit) + { + *ptr1 = pair[0]; + *ptr0 = pair[1]; + return; + } + } + } + if (pb[len] < cur[len]) + { + *ptr1 = curMatch; + ptr1 = pair + 1; + curMatch = *ptr1; + len1 = len; + } + else + { + *ptr0 = curMatch; + ptr0 = pair; + curMatch = *ptr0; + len0 = len; + } + } + } +} + +#define MOVE_POS \ + ++p->cyclicBufferPos; \ + p->buffer++; \ + if (++p->pos == p->posLimit) MatchFinder_CheckLimits(p); + +#define MOVE_POS_RET MOVE_POS return (UInt32)offset; + +static void MatchFinder_MovePos(CMatchFinder *p) { MOVE_POS; } + +#define GET_MATCHES_HEADER2(minLen, ret_op) \ + unsigned lenLimit; UInt32 hv; const Byte *cur; UInt32 curMatch; \ + lenLimit = (unsigned)p->lenLimit; { if (lenLimit < minLen) { MatchFinder_MovePos(p); ret_op; }} \ + cur = p->buffer; + +#define GET_MATCHES_HEADER(minLen) GET_MATCHES_HEADER2(minLen, return 0) +#define SKIP_HEADER(minLen) GET_MATCHES_HEADER2(minLen, continue) + +#define MF_PARAMS(p) p->pos, p->buffer, p->son, p->cyclicBufferPos, p->cyclicBufferSize, p->cutValue + +#define GET_MATCHES_FOOTER(offset, maxLen) \ + offset = (unsigned)(GetMatchesSpec1((UInt32)lenLimit, curMatch, MF_PARAMS(p), \ + distances + offset, (UInt32)maxLen) - distances); MOVE_POS_RET; + +#define SKIP_FOOTER \ + SkipMatchesSpec((UInt32)lenLimit, curMatch, MF_PARAMS(p)); MOVE_POS; + +#define UPDATE_maxLen { \ + ptrdiff_t diff = (ptrdiff_t)0 - d2; \ + const Byte *c = cur + maxLen; \ + const Byte *lim = cur + lenLimit; \ + for (; c != lim; c++) if (*(c + diff) != *c) break; \ + maxLen = (unsigned)(c - cur); } + +static UInt32 Bt2_MatchFinder_GetMatches(CMatchFinder *p, UInt32 *distances) +{ + unsigned offset; + GET_MATCHES_HEADER(2) + HASH2_CALC; + curMatch = p->hash[hv]; + p->hash[hv] = p->pos; + offset = 0; + GET_MATCHES_FOOTER(offset, 1) +} + +UInt32 Bt3Zip_MatchFinder_GetMatches(CMatchFinder *p, UInt32 *distances) +{ + unsigned offset; + GET_MATCHES_HEADER(3) + HASH_ZIP_CALC; + curMatch = p->hash[hv]; + p->hash[hv] = p->pos; + offset = 0; + GET_MATCHES_FOOTER(offset, 2) +} + +static UInt32 Bt3_MatchFinder_GetMatches(CMatchFinder *p, UInt32 *distances) +{ + UInt32 h2, d2, pos; + unsigned maxLen, offset; + UInt32 *hash; + GET_MATCHES_HEADER(3) + + HASH3_CALC; + + hash = p->hash; + pos = p->pos; + + d2 = pos - hash[h2]; + + curMatch = (hash + kFix3HashSize)[hv]; + + hash[h2] = pos; + (hash + kFix3HashSize)[hv] = pos; + + maxLen = 2; + offset = 0; + + if (d2 < p->cyclicBufferSize && *(cur - d2) == *cur) + { + UPDATE_maxLen + distances[0] = (UInt32)maxLen; + distances[1] = d2 - 1; + offset = 2; + if (maxLen == lenLimit) + { + SkipMatchesSpec((UInt32)lenLimit, curMatch, MF_PARAMS(p)); + MOVE_POS_RET; + } + } + + GET_MATCHES_FOOTER(offset, maxLen) +} + +static UInt32 Bt4_MatchFinder_GetMatches(CMatchFinder *p, UInt32 *distances) +{ + UInt32 h2, h3, d2, d3, pos; + unsigned maxLen, offset; + UInt32 *hash; + GET_MATCHES_HEADER(4) + + HASH4_CALC; + + hash = p->hash; + pos = p->pos; + + d2 = pos - hash [h2]; + d3 = pos - (hash + kFix3HashSize)[h3]; + + curMatch = (hash + kFix4HashSize)[hv]; + + hash [h2] = pos; + (hash + kFix3HashSize)[h3] = pos; + (hash + kFix4HashSize)[hv] = pos; + + maxLen = 0; + offset = 0; + + if (d2 < p->cyclicBufferSize && *(cur - d2) == *cur) + { + maxLen = 2; + distances[0] = 2; + distances[1] = d2 - 1; + offset = 2; + } + + if (d2 != d3 && d3 < p->cyclicBufferSize && *(cur - d3) == *cur) + { + maxLen = 3; + distances[(size_t)offset + 1] = d3 - 1; + offset += 2; + d2 = d3; + } + + if (offset != 0) + { + UPDATE_maxLen + distances[(size_t)offset - 2] = (UInt32)maxLen; + if (maxLen == lenLimit) + { + SkipMatchesSpec((UInt32)lenLimit, curMatch, MF_PARAMS(p)); + MOVE_POS_RET; + } + } + + if (maxLen < 3) + maxLen = 3; + + GET_MATCHES_FOOTER(offset, maxLen) +} + +/* +static UInt32 Bt5_MatchFinder_GetMatches(CMatchFinder *p, UInt32 *distances) +{ + UInt32 h2, h3, h4, d2, d3, d4, maxLen, offset, pos; + UInt32 *hash; + GET_MATCHES_HEADER(5) + + HASH5_CALC; + + hash = p->hash; + pos = p->pos; + + d2 = pos - hash [h2]; + d3 = pos - (hash + kFix3HashSize)[h3]; + d4 = pos - (hash + kFix4HashSize)[h4]; + + curMatch = (hash + kFix5HashSize)[hv]; + + hash [h2] = pos; + (hash + kFix3HashSize)[h3] = pos; + (hash + kFix4HashSize)[h4] = pos; + (hash + kFix5HashSize)[hv] = pos; + + maxLen = 0; + offset = 0; + + if (d2 < p->cyclicBufferSize && *(cur - d2) == *cur) + { + distances[0] = maxLen = 2; + distances[1] = d2 - 1; + offset = 2; + if (*(cur - d2 + 2) == cur[2]) + distances[0] = maxLen = 3; + else if (d3 < p->cyclicBufferSize && *(cur - d3) == *cur) + { + distances[2] = maxLen = 3; + distances[3] = d3 - 1; + offset = 4; + d2 = d3; + } + } + else if (d3 < p->cyclicBufferSize && *(cur - d3) == *cur) + { + distances[0] = maxLen = 3; + distances[1] = d3 - 1; + offset = 2; + d2 = d3; + } + + if (d2 != d4 && d4 < p->cyclicBufferSize + && *(cur - d4) == *cur + && *(cur - d4 + 3) == *(cur + 3)) + { + maxLen = 4; + distances[(size_t)offset + 1] = d4 - 1; + offset += 2; + d2 = d4; + } + + if (offset != 0) + { + UPDATE_maxLen + distances[(size_t)offset - 2] = maxLen; + if (maxLen == lenLimit) + { + SkipMatchesSpec(lenLimit, curMatch, MF_PARAMS(p)); + MOVE_POS_RET; + } + } + + if (maxLen < 4) + maxLen = 4; + + GET_MATCHES_FOOTER(offset, maxLen) +} +*/ + +static UInt32 Hc4_MatchFinder_GetMatches(CMatchFinder *p, UInt32 *distances) +{ + UInt32 h2, h3, d2, d3, pos; + unsigned maxLen, offset; + UInt32 *hash; + GET_MATCHES_HEADER(4) + + HASH4_CALC; + + hash = p->hash; + pos = p->pos; + + d2 = pos - hash [h2]; + d3 = pos - (hash + kFix3HashSize)[h3]; + curMatch = (hash + kFix4HashSize)[hv]; + + hash [h2] = pos; + (hash + kFix3HashSize)[h3] = pos; + (hash + kFix4HashSize)[hv] = pos; + + maxLen = 0; + offset = 0; + + if (d2 < p->cyclicBufferSize && *(cur - d2) == *cur) + { + maxLen = 2; + distances[0] = 2; + distances[1] = d2 - 1; + offset = 2; + } + + if (d2 != d3 && d3 < p->cyclicBufferSize && *(cur - d3) == *cur) + { + maxLen = 3; + distances[(size_t)offset + 1] = d3 - 1; + offset += 2; + d2 = d3; + } + + if (offset != 0) + { + UPDATE_maxLen + distances[(size_t)offset - 2] = (UInt32)maxLen; + if (maxLen == lenLimit) + { + p->son[p->cyclicBufferPos] = curMatch; + MOVE_POS_RET; + } + } + + if (maxLen < 3) + maxLen = 3; + + offset = (unsigned)(Hc_GetMatchesSpec(lenLimit, curMatch, MF_PARAMS(p), + distances + offset, maxLen) - (distances)); + MOVE_POS_RET +} + +/* +static UInt32 Hc5_MatchFinder_GetMatches(CMatchFinder *p, UInt32 *distances) +{ + UInt32 h2, h3, h4, d2, d3, d4, maxLen, offset, pos + UInt32 *hash; + GET_MATCHES_HEADER(5) + + HASH5_CALC; + + hash = p->hash; + pos = p->pos; + + d2 = pos - hash [h2]; + d3 = pos - (hash + kFix3HashSize)[h3]; + d4 = pos - (hash + kFix4HashSize)[h4]; + + curMatch = (hash + kFix5HashSize)[hv]; + + hash [h2] = pos; + (hash + kFix3HashSize)[h3] = pos; + (hash + kFix4HashSize)[h4] = pos; + (hash + kFix5HashSize)[hv] = pos; + + maxLen = 0; + offset = 0; + + if (d2 < p->cyclicBufferSize && *(cur - d2) == *cur) + { + distances[0] = maxLen = 2; + distances[1] = d2 - 1; + offset = 2; + if (*(cur - d2 + 2) == cur[2]) + distances[0] = maxLen = 3; + else if (d3 < p->cyclicBufferSize && *(cur - d3) == *cur) + { + distances[2] = maxLen = 3; + distances[3] = d3 - 1; + offset = 4; + d2 = d3; + } + } + else if (d3 < p->cyclicBufferSize && *(cur - d3) == *cur) + { + distances[0] = maxLen = 3; + distances[1] = d3 - 1; + offset = 2; + d2 = d3; + } + + if (d2 != d4 && d4 < p->cyclicBufferSize + && *(cur - d4) == *cur + && *(cur - d4 + 3) == *(cur + 3)) + { + maxLen = 4; + distances[(size_t)offset + 1] = d4 - 1; + offset += 2; + d2 = d4; + } + + if (offset != 0) + { + UPDATE_maxLen + distances[(size_t)offset - 2] = maxLen; + if (maxLen == lenLimit) + { + p->son[p->cyclicBufferPos] = curMatch; + MOVE_POS_RET; + } + } + + if (maxLen < 4) + maxLen = 4; + + offset = (UInt32)(Hc_GetMatchesSpec(lenLimit, curMatch, MF_PARAMS(p), + distances + offset, maxLen) - (distances)); + MOVE_POS_RET +} +*/ + +UInt32 Hc3Zip_MatchFinder_GetMatches(CMatchFinder *p, UInt32 *distances) +{ + unsigned offset; + GET_MATCHES_HEADER(3) + HASH_ZIP_CALC; + curMatch = p->hash[hv]; + p->hash[hv] = p->pos; + offset = (unsigned)(Hc_GetMatchesSpec(lenLimit, curMatch, MF_PARAMS(p), + distances, 2) - (distances)); + MOVE_POS_RET +} + +static void Bt2_MatchFinder_Skip(CMatchFinder *p, UInt32 num) +{ + do + { + SKIP_HEADER(2) + HASH2_CALC; + curMatch = p->hash[hv]; + p->hash[hv] = p->pos; + SKIP_FOOTER + } + while (--num != 0); +} + +void Bt3Zip_MatchFinder_Skip(CMatchFinder *p, UInt32 num) +{ + do + { + SKIP_HEADER(3) + HASH_ZIP_CALC; + curMatch = p->hash[hv]; + p->hash[hv] = p->pos; + SKIP_FOOTER + } + while (--num != 0); +} + +static void Bt3_MatchFinder_Skip(CMatchFinder *p, UInt32 num) +{ + do + { + UInt32 h2; + UInt32 *hash; + SKIP_HEADER(3) + HASH3_CALC; + hash = p->hash; + curMatch = (hash + kFix3HashSize)[hv]; + hash[h2] = + (hash + kFix3HashSize)[hv] = p->pos; + SKIP_FOOTER + } + while (--num != 0); +} + +static void Bt4_MatchFinder_Skip(CMatchFinder *p, UInt32 num) +{ + do + { + UInt32 h2, h3; + UInt32 *hash; + SKIP_HEADER(4) + HASH4_CALC; + hash = p->hash; + curMatch = (hash + kFix4HashSize)[hv]; + hash [h2] = + (hash + kFix3HashSize)[h3] = + (hash + kFix4HashSize)[hv] = p->pos; + SKIP_FOOTER + } + while (--num != 0); +} + +/* +static void Bt5_MatchFinder_Skip(CMatchFinder *p, UInt32 num) +{ + do + { + UInt32 h2, h3, h4; + UInt32 *hash; + SKIP_HEADER(5) + HASH5_CALC; + hash = p->hash; + curMatch = (hash + kFix5HashSize)[hv]; + hash [h2] = + (hash + kFix3HashSize)[h3] = + (hash + kFix4HashSize)[h4] = + (hash + kFix5HashSize)[hv] = p->pos; + SKIP_FOOTER + } + while (--num != 0); +} +*/ + +static void Hc4_MatchFinder_Skip(CMatchFinder *p, UInt32 num) +{ + do + { + UInt32 h2, h3; + UInt32 *hash; + SKIP_HEADER(4) + HASH4_CALC; + hash = p->hash; + curMatch = (hash + kFix4HashSize)[hv]; + hash [h2] = + (hash + kFix3HashSize)[h3] = + (hash + kFix4HashSize)[hv] = p->pos; + p->son[p->cyclicBufferPos] = curMatch; + MOVE_POS + } + while (--num != 0); +} + +/* +static void Hc5_MatchFinder_Skip(CMatchFinder *p, UInt32 num) +{ + do + { + UInt32 h2, h3, h4; + UInt32 *hash; + SKIP_HEADER(5) + HASH5_CALC; + hash = p->hash; + curMatch = hash + kFix5HashSize)[hv]; + hash [h2] = + (hash + kFix3HashSize)[h3] = + (hash + kFix4HashSize)[h4] = + (hash + kFix5HashSize)[hv] = p->pos; + p->son[p->cyclicBufferPos] = curMatch; + MOVE_POS + } + while (--num != 0); +} +*/ + +void Hc3Zip_MatchFinder_Skip(CMatchFinder *p, UInt32 num) +{ + do + { + SKIP_HEADER(3) + HASH_ZIP_CALC; + curMatch = p->hash[hv]; + p->hash[hv] = p->pos; + p->son[p->cyclicBufferPos] = curMatch; + MOVE_POS + } + while (--num != 0); +} + +void MatchFinder_CreateVTable(CMatchFinder *p, IMatchFinder *vTable) +{ + vTable->Init = (Mf_Init_Func)MatchFinder_Init; + vTable->GetNumAvailableBytes = (Mf_GetNumAvailableBytes_Func)MatchFinder_GetNumAvailableBytes; + vTable->GetPointerToCurrentPos = (Mf_GetPointerToCurrentPos_Func)MatchFinder_GetPointerToCurrentPos; + if (!p->btMode) + { + /* if (p->numHashBytes <= 4) */ + { + vTable->GetMatches = (Mf_GetMatches_Func)Hc4_MatchFinder_GetMatches; + vTable->Skip = (Mf_Skip_Func)Hc4_MatchFinder_Skip; + } + /* + else + { + vTable->GetMatches = (Mf_GetMatches_Func)Hc5_MatchFinder_GetMatches; + vTable->Skip = (Mf_Skip_Func)Hc5_MatchFinder_Skip; + } + */ + } + else if (p->numHashBytes == 2) + { + vTable->GetMatches = (Mf_GetMatches_Func)Bt2_MatchFinder_GetMatches; + vTable->Skip = (Mf_Skip_Func)Bt2_MatchFinder_Skip; + } + else if (p->numHashBytes == 3) + { + vTable->GetMatches = (Mf_GetMatches_Func)Bt3_MatchFinder_GetMatches; + vTable->Skip = (Mf_Skip_Func)Bt3_MatchFinder_Skip; + } + else /* if (p->numHashBytes == 4) */ + { + vTable->GetMatches = (Mf_GetMatches_Func)Bt4_MatchFinder_GetMatches; + vTable->Skip = (Mf_Skip_Func)Bt4_MatchFinder_Skip; + } + /* + else + { + vTable->GetMatches = (Mf_GetMatches_Func)Bt5_MatchFinder_GetMatches; + vTable->Skip = (Mf_Skip_Func)Bt5_MatchFinder_Skip; + } + */ +} diff --git a/code/nel/3rdparty/seven_zip/LzFind.h b/code/nel/3rdparty/seven_zip/LzFind.h new file mode 100644 index 000000000..42c13be15 --- /dev/null +++ b/code/nel/3rdparty/seven_zip/LzFind.h @@ -0,0 +1,121 @@ +/* LzFind.h -- Match finder for LZ algorithms +2017-06-10 : Igor Pavlov : Public domain */ + +#ifndef __LZ_FIND_H +#define __LZ_FIND_H + +#include "7zTypes.h" + +EXTERN_C_BEGIN + +typedef UInt32 CLzRef; + +typedef struct _CMatchFinder +{ + Byte *buffer; + UInt32 pos; + UInt32 posLimit; + UInt32 streamPos; + UInt32 lenLimit; + + UInt32 cyclicBufferPos; + UInt32 cyclicBufferSize; /* it must be = (historySize + 1) */ + + Byte streamEndWasReached; + Byte btMode; + Byte bigHash; + Byte directInput; + + UInt32 matchMaxLen; + CLzRef *hash; + CLzRef *son; + UInt32 hashMask; + UInt32 cutValue; + + Byte *bufferBase; + ISeqInStream *stream; + + UInt32 blockSize; + UInt32 keepSizeBefore; + UInt32 keepSizeAfter; + + UInt32 numHashBytes; + size_t directInputRem; + UInt32 historySize; + UInt32 fixedHashSize; + UInt32 hashSizeSum; + SRes result; + UInt32 crc[256]; + size_t numRefs; + + UInt64 expectedDataSize; +} CMatchFinder; + +#define Inline_MatchFinder_GetPointerToCurrentPos(p) ((p)->buffer) + +#define Inline_MatchFinder_GetNumAvailableBytes(p) ((p)->streamPos - (p)->pos) + +#define Inline_MatchFinder_IsFinishedOK(p) \ + ((p)->streamEndWasReached \ + && (p)->streamPos == (p)->pos \ + && (!(p)->directInput || (p)->directInputRem == 0)) + +int MatchFinder_NeedMove(CMatchFinder *p); +Byte *MatchFinder_GetPointerToCurrentPos(CMatchFinder *p); +void MatchFinder_MoveBlock(CMatchFinder *p); +void MatchFinder_ReadIfRequired(CMatchFinder *p); + +void MatchFinder_Construct(CMatchFinder *p); + +/* Conditions: + historySize <= 3 GB + keepAddBufferBefore + matchMaxLen + keepAddBufferAfter < 511MB +*/ +int MatchFinder_Create(CMatchFinder *p, UInt32 historySize, + UInt32 keepAddBufferBefore, UInt32 matchMaxLen, UInt32 keepAddBufferAfter, + ISzAllocPtr alloc); +void MatchFinder_Free(CMatchFinder *p, ISzAllocPtr alloc); +void MatchFinder_Normalize3(UInt32 subValue, CLzRef *items, size_t numItems); +void MatchFinder_ReduceOffsets(CMatchFinder *p, UInt32 subValue); + +UInt32 * GetMatchesSpec1(UInt32 lenLimit, UInt32 curMatch, UInt32 pos, const Byte *buffer, CLzRef *son, + UInt32 _cyclicBufferPos, UInt32 _cyclicBufferSize, UInt32 _cutValue, + UInt32 *distances, UInt32 maxLen); + +/* +Conditions: + Mf_GetNumAvailableBytes_Func must be called before each Mf_GetMatchLen_Func. + Mf_GetPointerToCurrentPos_Func's result must be used only before any other function +*/ + +typedef void (*Mf_Init_Func)(void *object); +typedef UInt32 (*Mf_GetNumAvailableBytes_Func)(void *object); +typedef const Byte * (*Mf_GetPointerToCurrentPos_Func)(void *object); +typedef UInt32 (*Mf_GetMatches_Func)(void *object, UInt32 *distances); +typedef void (*Mf_Skip_Func)(void *object, UInt32); + +typedef struct _IMatchFinder +{ + Mf_Init_Func Init; + Mf_GetNumAvailableBytes_Func GetNumAvailableBytes; + Mf_GetPointerToCurrentPos_Func GetPointerToCurrentPos; + Mf_GetMatches_Func GetMatches; + Mf_Skip_Func Skip; +} IMatchFinder; + +void MatchFinder_CreateVTable(CMatchFinder *p, IMatchFinder *vTable); + +void MatchFinder_Init_LowHash(CMatchFinder *p); +void MatchFinder_Init_HighHash(CMatchFinder *p); +void MatchFinder_Init_3(CMatchFinder *p, int readData); +void MatchFinder_Init(CMatchFinder *p); + +UInt32 Bt3Zip_MatchFinder_GetMatches(CMatchFinder *p, UInt32 *distances); +UInt32 Hc3Zip_MatchFinder_GetMatches(CMatchFinder *p, UInt32 *distances); + +void Bt3Zip_MatchFinder_Skip(CMatchFinder *p, UInt32 num); +void Hc3Zip_MatchFinder_Skip(CMatchFinder *p, UInt32 num); + +EXTERN_C_END + +#endif diff --git a/code/nel/3rdparty/seven_zip/LzHash.h b/code/nel/3rdparty/seven_zip/LzHash.h new file mode 100644 index 000000000..e7c942303 --- /dev/null +++ b/code/nel/3rdparty/seven_zip/LzHash.h @@ -0,0 +1,57 @@ +/* LzHash.h -- HASH functions for LZ algorithms +2015-04-12 : Igor Pavlov : Public domain */ + +#ifndef __LZ_HASH_H +#define __LZ_HASH_H + +#define kHash2Size (1 << 10) +#define kHash3Size (1 << 16) +#define kHash4Size (1 << 20) + +#define kFix3HashSize (kHash2Size) +#define kFix4HashSize (kHash2Size + kHash3Size) +#define kFix5HashSize (kHash2Size + kHash3Size + kHash4Size) + +#define HASH2_CALC hv = cur[0] | ((UInt32)cur[1] << 8); + +#define HASH3_CALC { \ + UInt32 temp = p->crc[cur[0]] ^ cur[1]; \ + h2 = temp & (kHash2Size - 1); \ + hv = (temp ^ ((UInt32)cur[2] << 8)) & p->hashMask; } + +#define HASH4_CALC { \ + UInt32 temp = p->crc[cur[0]] ^ cur[1]; \ + h2 = temp & (kHash2Size - 1); \ + temp ^= ((UInt32)cur[2] << 8); \ + h3 = temp & (kHash3Size - 1); \ + hv = (temp ^ (p->crc[cur[3]] << 5)) & p->hashMask; } + +#define HASH5_CALC { \ + UInt32 temp = p->crc[cur[0]] ^ cur[1]; \ + h2 = temp & (kHash2Size - 1); \ + temp ^= ((UInt32)cur[2] << 8); \ + h3 = temp & (kHash3Size - 1); \ + temp ^= (p->crc[cur[3]] << 5); \ + h4 = temp & (kHash4Size - 1); \ + hv = (temp ^ (p->crc[cur[4]] << 3)) & p->hashMask; } + +/* #define HASH_ZIP_CALC hv = ((cur[0] | ((UInt32)cur[1] << 8)) ^ p->crc[cur[2]]) & 0xFFFF; */ +#define HASH_ZIP_CALC hv = ((cur[2] | ((UInt32)cur[0] << 8)) ^ p->crc[cur[1]]) & 0xFFFF; + + +#define MT_HASH2_CALC \ + h2 = (p->crc[cur[0]] ^ cur[1]) & (kHash2Size - 1); + +#define MT_HASH3_CALC { \ + UInt32 temp = p->crc[cur[0]] ^ cur[1]; \ + h2 = temp & (kHash2Size - 1); \ + h3 = (temp ^ ((UInt32)cur[2] << 8)) & (kHash3Size - 1); } + +#define MT_HASH4_CALC { \ + UInt32 temp = p->crc[cur[0]] ^ cur[1]; \ + h2 = temp & (kHash2Size - 1); \ + temp ^= ((UInt32)cur[2] << 8); \ + h3 = temp & (kHash3Size - 1); \ + h4 = (temp ^ (p->crc[cur[3]] << 5)) & (kHash4Size - 1); } + +#endif diff --git a/code/nel/3rdparty/seven_zip/Lzma2Dec.c b/code/nel/3rdparty/seven_zip/Lzma2Dec.c new file mode 100644 index 000000000..4e138a4ae --- /dev/null +++ b/code/nel/3rdparty/seven_zip/Lzma2Dec.c @@ -0,0 +1,488 @@ +/* Lzma2Dec.c -- LZMA2 Decoder +2019-02-02 : Igor Pavlov : Public domain */ + +/* #define SHOW_DEBUG_INFO */ + +#include "Precomp.h" + +#ifdef SHOW_DEBUG_INFO +#include +#endif + +#include + +#include "Lzma2Dec.h" + +/* +00000000 - End of data +00000001 U U - Uncompressed, reset dic, need reset state and set new prop +00000010 U U - Uncompressed, no reset +100uuuuu U U P P - LZMA, no reset +101uuuuu U U P P - LZMA, reset state +110uuuuu U U P P S - LZMA, reset state + set new prop +111uuuuu U U P P S - LZMA, reset state + set new prop, reset dic + + u, U - Unpack Size + P - Pack Size + S - Props +*/ + +#define LZMA2_CONTROL_COPY_RESET_DIC 1 + +#define LZMA2_IS_UNCOMPRESSED_STATE(p) (((p)->control & (1 << 7)) == 0) + +#define LZMA2_LCLP_MAX 4 +#define LZMA2_DIC_SIZE_FROM_PROP(p) (((UInt32)2 | ((p) & 1)) << ((p) / 2 + 11)) + +#ifdef SHOW_DEBUG_INFO +#define PRF(x) x +#else +#define PRF(x) +#endif + +typedef enum +{ + LZMA2_STATE_CONTROL, + LZMA2_STATE_UNPACK0, + LZMA2_STATE_UNPACK1, + LZMA2_STATE_PACK0, + LZMA2_STATE_PACK1, + LZMA2_STATE_PROP, + LZMA2_STATE_DATA, + LZMA2_STATE_DATA_CONT, + LZMA2_STATE_FINISHED, + LZMA2_STATE_ERROR +} ELzma2State; + +static SRes Lzma2Dec_GetOldProps(Byte prop, Byte *props) +{ + UInt32 dicSize; + if (prop > 40) + return SZ_ERROR_UNSUPPORTED; + dicSize = (prop == 40) ? 0xFFFFFFFF : LZMA2_DIC_SIZE_FROM_PROP(prop); + props[0] = (Byte)LZMA2_LCLP_MAX; + props[1] = (Byte)(dicSize); + props[2] = (Byte)(dicSize >> 8); + props[3] = (Byte)(dicSize >> 16); + props[4] = (Byte)(dicSize >> 24); + return SZ_OK; +} + +SRes Lzma2Dec_AllocateProbs(CLzma2Dec *p, Byte prop, ISzAllocPtr alloc) +{ + Byte props[LZMA_PROPS_SIZE]; + RINOK(Lzma2Dec_GetOldProps(prop, props)); + return LzmaDec_AllocateProbs(&p->decoder, props, LZMA_PROPS_SIZE, alloc); +} + +SRes Lzma2Dec_Allocate(CLzma2Dec *p, Byte prop, ISzAllocPtr alloc) +{ + Byte props[LZMA_PROPS_SIZE]; + RINOK(Lzma2Dec_GetOldProps(prop, props)); + return LzmaDec_Allocate(&p->decoder, props, LZMA_PROPS_SIZE, alloc); +} + +void Lzma2Dec_Init(CLzma2Dec *p) +{ + p->state = LZMA2_STATE_CONTROL; + p->needInitLevel = 0xE0; + p->isExtraMode = False; + p->unpackSize = 0; + + // p->decoder.dicPos = 0; // we can use it instead of full init + LzmaDec_Init(&p->decoder); +} + +static ELzma2State Lzma2Dec_UpdateState(CLzma2Dec *p, Byte b) +{ + switch (p->state) + { + case LZMA2_STATE_CONTROL: + p->isExtraMode = False; + p->control = b; + PRF(printf("\n %8X", (unsigned)p->decoder.dicPos)); + PRF(printf(" %02X", (unsigned)b)); + if (b == 0) + return LZMA2_STATE_FINISHED; + if (LZMA2_IS_UNCOMPRESSED_STATE(p)) + { + if (b == LZMA2_CONTROL_COPY_RESET_DIC) + p->needInitLevel = 0xC0; + else if (b > 2 || p->needInitLevel == 0xE0) + return LZMA2_STATE_ERROR; + } + else + { + if (b < p->needInitLevel) + return LZMA2_STATE_ERROR; + p->needInitLevel = 0; + p->unpackSize = (UInt32)(b & 0x1F) << 16; + } + return LZMA2_STATE_UNPACK0; + + case LZMA2_STATE_UNPACK0: + p->unpackSize |= (UInt32)b << 8; + return LZMA2_STATE_UNPACK1; + + case LZMA2_STATE_UNPACK1: + p->unpackSize |= (UInt32)b; + p->unpackSize++; + PRF(printf(" %7u", (unsigned)p->unpackSize)); + return LZMA2_IS_UNCOMPRESSED_STATE(p) ? LZMA2_STATE_DATA : LZMA2_STATE_PACK0; + + case LZMA2_STATE_PACK0: + p->packSize = (UInt32)b << 8; + return LZMA2_STATE_PACK1; + + case LZMA2_STATE_PACK1: + p->packSize |= (UInt32)b; + p->packSize++; + // if (p->packSize < 5) return LZMA2_STATE_ERROR; + PRF(printf(" %5u", (unsigned)p->packSize)); + return (p->control & 0x40) ? LZMA2_STATE_PROP : LZMA2_STATE_DATA; + + case LZMA2_STATE_PROP: + { + unsigned lc, lp; + if (b >= (9 * 5 * 5)) + return LZMA2_STATE_ERROR; + lc = b % 9; + b /= 9; + p->decoder.prop.pb = (Byte)(b / 5); + lp = b % 5; + if (lc + lp > LZMA2_LCLP_MAX) + return LZMA2_STATE_ERROR; + p->decoder.prop.lc = (Byte)lc; + p->decoder.prop.lp = (Byte)lp; + return LZMA2_STATE_DATA; + } + } + return LZMA2_STATE_ERROR; +} + +static void LzmaDec_UpdateWithUncompressed(CLzmaDec *p, const Byte *src, SizeT size) +{ + memcpy(p->dic + p->dicPos, src, size); + p->dicPos += size; + if (p->checkDicSize == 0 && p->prop.dicSize - p->processedPos <= size) + p->checkDicSize = p->prop.dicSize; + p->processedPos += (UInt32)size; +} + +void LzmaDec_InitDicAndState(CLzmaDec *p, BoolInt initDic, BoolInt initState); + + +SRes Lzma2Dec_DecodeToDic(CLzma2Dec *p, SizeT dicLimit, + const Byte *src, SizeT *srcLen, ELzmaFinishMode finishMode, ELzmaStatus *status) +{ + SizeT inSize = *srcLen; + *srcLen = 0; + *status = LZMA_STATUS_NOT_SPECIFIED; + + while (p->state != LZMA2_STATE_ERROR) + { + SizeT dicPos; + + if (p->state == LZMA2_STATE_FINISHED) + { + *status = LZMA_STATUS_FINISHED_WITH_MARK; + return SZ_OK; + } + + dicPos = p->decoder.dicPos; + + if (dicPos == dicLimit && finishMode == LZMA_FINISH_ANY) + { + *status = LZMA_STATUS_NOT_FINISHED; + return SZ_OK; + } + + if (p->state != LZMA2_STATE_DATA && p->state != LZMA2_STATE_DATA_CONT) + { + if (*srcLen == inSize) + { + *status = LZMA_STATUS_NEEDS_MORE_INPUT; + return SZ_OK; + } + (*srcLen)++; + p->state = Lzma2Dec_UpdateState(p, *src++); + if (dicPos == dicLimit && p->state != LZMA2_STATE_FINISHED) + break; + continue; + } + + { + SizeT inCur = inSize - *srcLen; + SizeT outCur = dicLimit - dicPos; + ELzmaFinishMode curFinishMode = LZMA_FINISH_ANY; + + if (outCur >= p->unpackSize) + { + outCur = (SizeT)p->unpackSize; + curFinishMode = LZMA_FINISH_END; + } + + if (LZMA2_IS_UNCOMPRESSED_STATE(p)) + { + if (inCur == 0) + { + *status = LZMA_STATUS_NEEDS_MORE_INPUT; + return SZ_OK; + } + + if (p->state == LZMA2_STATE_DATA) + { + BoolInt initDic = (p->control == LZMA2_CONTROL_COPY_RESET_DIC); + LzmaDec_InitDicAndState(&p->decoder, initDic, False); + } + + if (inCur > outCur) + inCur = outCur; + if (inCur == 0) + break; + + LzmaDec_UpdateWithUncompressed(&p->decoder, src, inCur); + + src += inCur; + *srcLen += inCur; + p->unpackSize -= (UInt32)inCur; + p->state = (p->unpackSize == 0) ? LZMA2_STATE_CONTROL : LZMA2_STATE_DATA_CONT; + } + else + { + SRes res; + + if (p->state == LZMA2_STATE_DATA) + { + BoolInt initDic = (p->control >= 0xE0); + BoolInt initState = (p->control >= 0xA0); + LzmaDec_InitDicAndState(&p->decoder, initDic, initState); + p->state = LZMA2_STATE_DATA_CONT; + } + + if (inCur > p->packSize) + inCur = (SizeT)p->packSize; + + res = LzmaDec_DecodeToDic(&p->decoder, dicPos + outCur, src, &inCur, curFinishMode, status); + + src += inCur; + *srcLen += inCur; + p->packSize -= (UInt32)inCur; + outCur = p->decoder.dicPos - dicPos; + p->unpackSize -= (UInt32)outCur; + + if (res != 0) + break; + + if (*status == LZMA_STATUS_NEEDS_MORE_INPUT) + { + if (p->packSize == 0) + break; + return SZ_OK; + } + + if (inCur == 0 && outCur == 0) + { + if (*status != LZMA_STATUS_MAYBE_FINISHED_WITHOUT_MARK + || p->unpackSize != 0 + || p->packSize != 0) + break; + p->state = LZMA2_STATE_CONTROL; + } + + *status = LZMA_STATUS_NOT_SPECIFIED; + } + } + } + + *status = LZMA_STATUS_NOT_SPECIFIED; + p->state = LZMA2_STATE_ERROR; + return SZ_ERROR_DATA; +} + + + + +ELzma2ParseStatus Lzma2Dec_Parse(CLzma2Dec *p, + SizeT outSize, + const Byte *src, SizeT *srcLen, + int checkFinishBlock) +{ + SizeT inSize = *srcLen; + *srcLen = 0; + + while (p->state != LZMA2_STATE_ERROR) + { + if (p->state == LZMA2_STATE_FINISHED) + return (ELzma2ParseStatus)LZMA_STATUS_FINISHED_WITH_MARK; + + if (outSize == 0 && !checkFinishBlock) + return (ELzma2ParseStatus)LZMA_STATUS_NOT_FINISHED; + + if (p->state != LZMA2_STATE_DATA && p->state != LZMA2_STATE_DATA_CONT) + { + if (*srcLen == inSize) + return (ELzma2ParseStatus)LZMA_STATUS_NEEDS_MORE_INPUT; + (*srcLen)++; + + p->state = Lzma2Dec_UpdateState(p, *src++); + + if (p->state == LZMA2_STATE_UNPACK0) + { + // if (p->decoder.dicPos != 0) + if (p->control == LZMA2_CONTROL_COPY_RESET_DIC || p->control >= 0xE0) + return LZMA2_PARSE_STATUS_NEW_BLOCK; + // if (outSize == 0) return LZMA_STATUS_NOT_FINISHED; + } + + // The following code can be commented. + // It's not big problem, if we read additional input bytes. + // It will be stopped later in LZMA2_STATE_DATA / LZMA2_STATE_DATA_CONT state. + + if (outSize == 0 && p->state != LZMA2_STATE_FINISHED) + { + // checkFinishBlock is true. So we expect that block must be finished, + // We can return LZMA_STATUS_NOT_SPECIFIED or LZMA_STATUS_NOT_FINISHED here + // break; + return (ELzma2ParseStatus)LZMA_STATUS_NOT_FINISHED; + } + + if (p->state == LZMA2_STATE_DATA) + return LZMA2_PARSE_STATUS_NEW_CHUNK; + + continue; + } + + if (outSize == 0) + return (ELzma2ParseStatus)LZMA_STATUS_NOT_FINISHED; + + { + SizeT inCur = inSize - *srcLen; + + if (LZMA2_IS_UNCOMPRESSED_STATE(p)) + { + if (inCur == 0) + return (ELzma2ParseStatus)LZMA_STATUS_NEEDS_MORE_INPUT; + if (inCur > p->unpackSize) + inCur = p->unpackSize; + if (inCur > outSize) + inCur = outSize; + p->decoder.dicPos += inCur; + src += inCur; + *srcLen += inCur; + outSize -= inCur; + p->unpackSize -= (UInt32)inCur; + p->state = (p->unpackSize == 0) ? LZMA2_STATE_CONTROL : LZMA2_STATE_DATA_CONT; + } + else + { + p->isExtraMode = True; + + if (inCur == 0) + { + if (p->packSize != 0) + return (ELzma2ParseStatus)LZMA_STATUS_NEEDS_MORE_INPUT; + } + else if (p->state == LZMA2_STATE_DATA) + { + p->state = LZMA2_STATE_DATA_CONT; + if (*src != 0) + { + // first byte of lzma chunk must be Zero + *srcLen += 1; + p->packSize--; + break; + } + } + + if (inCur > p->packSize) + inCur = (SizeT)p->packSize; + + src += inCur; + *srcLen += inCur; + p->packSize -= (UInt32)inCur; + + if (p->packSize == 0) + { + SizeT rem = outSize; + if (rem > p->unpackSize) + rem = p->unpackSize; + p->decoder.dicPos += rem; + p->unpackSize -= (UInt32)rem; + outSize -= rem; + if (p->unpackSize == 0) + p->state = LZMA2_STATE_CONTROL; + } + } + } + } + + p->state = LZMA2_STATE_ERROR; + return (ELzma2ParseStatus)LZMA_STATUS_NOT_SPECIFIED; +} + + + + +SRes Lzma2Dec_DecodeToBuf(CLzma2Dec *p, Byte *dest, SizeT *destLen, const Byte *src, SizeT *srcLen, ELzmaFinishMode finishMode, ELzmaStatus *status) +{ + SizeT outSize = *destLen, inSize = *srcLen; + *srcLen = *destLen = 0; + + for (;;) + { + SizeT inCur = inSize, outCur, dicPos; + ELzmaFinishMode curFinishMode; + SRes res; + + if (p->decoder.dicPos == p->decoder.dicBufSize) + p->decoder.dicPos = 0; + dicPos = p->decoder.dicPos; + curFinishMode = LZMA_FINISH_ANY; + outCur = p->decoder.dicBufSize - dicPos; + + if (outCur >= outSize) + { + outCur = outSize; + curFinishMode = finishMode; + } + + res = Lzma2Dec_DecodeToDic(p, dicPos + outCur, src, &inCur, curFinishMode, status); + + src += inCur; + inSize -= inCur; + *srcLen += inCur; + outCur = p->decoder.dicPos - dicPos; + memcpy(dest, p->decoder.dic + dicPos, outCur); + dest += outCur; + outSize -= outCur; + *destLen += outCur; + if (res != 0) + return res; + if (outCur == 0 || outSize == 0) + return SZ_OK; + } +} + + +SRes Lzma2Decode(Byte *dest, SizeT *destLen, const Byte *src, SizeT *srcLen, + Byte prop, ELzmaFinishMode finishMode, ELzmaStatus *status, ISzAllocPtr alloc) +{ + CLzma2Dec p; + SRes res; + SizeT outSize = *destLen, inSize = *srcLen; + *destLen = *srcLen = 0; + *status = LZMA_STATUS_NOT_SPECIFIED; + Lzma2Dec_Construct(&p); + RINOK(Lzma2Dec_AllocateProbs(&p, prop, alloc)); + p.decoder.dic = dest; + p.decoder.dicBufSize = outSize; + Lzma2Dec_Init(&p); + *srcLen = inSize; + res = Lzma2Dec_DecodeToDic(&p, outSize, src, srcLen, finishMode, status); + *destLen = p.decoder.dicPos; + if (res == SZ_OK && *status == LZMA_STATUS_NEEDS_MORE_INPUT) + res = SZ_ERROR_INPUT_EOF; + Lzma2Dec_FreeProbs(&p, alloc); + return res; +} diff --git a/code/nel/3rdparty/seven_zip/Lzma2Dec.h b/code/nel/3rdparty/seven_zip/Lzma2Dec.h new file mode 100644 index 000000000..b8ddeac89 --- /dev/null +++ b/code/nel/3rdparty/seven_zip/Lzma2Dec.h @@ -0,0 +1,120 @@ +/* Lzma2Dec.h -- LZMA2 Decoder +2018-02-19 : Igor Pavlov : Public domain */ + +#ifndef __LZMA2_DEC_H +#define __LZMA2_DEC_H + +#include "LzmaDec.h" + +EXTERN_C_BEGIN + +/* ---------- State Interface ---------- */ + +typedef struct +{ + unsigned state; + Byte control; + Byte needInitLevel; + Byte isExtraMode; + Byte _pad_; + UInt32 packSize; + UInt32 unpackSize; + CLzmaDec decoder; +} CLzma2Dec; + +#define Lzma2Dec_Construct(p) LzmaDec_Construct(&(p)->decoder) +#define Lzma2Dec_FreeProbs(p, alloc) LzmaDec_FreeProbs(&(p)->decoder, alloc) +#define Lzma2Dec_Free(p, alloc) LzmaDec_Free(&(p)->decoder, alloc) + +SRes Lzma2Dec_AllocateProbs(CLzma2Dec *p, Byte prop, ISzAllocPtr alloc); +SRes Lzma2Dec_Allocate(CLzma2Dec *p, Byte prop, ISzAllocPtr alloc); +void Lzma2Dec_Init(CLzma2Dec *p); + +/* +finishMode: + It has meaning only if the decoding reaches output limit (*destLen or dicLimit). + LZMA_FINISH_ANY - use smallest number of input bytes + LZMA_FINISH_END - read EndOfStream marker after decoding + +Returns: + SZ_OK + status: + LZMA_STATUS_FINISHED_WITH_MARK + LZMA_STATUS_NOT_FINISHED + LZMA_STATUS_NEEDS_MORE_INPUT + SZ_ERROR_DATA - Data error +*/ + +SRes Lzma2Dec_DecodeToDic(CLzma2Dec *p, SizeT dicLimit, + const Byte *src, SizeT *srcLen, ELzmaFinishMode finishMode, ELzmaStatus *status); + +SRes Lzma2Dec_DecodeToBuf(CLzma2Dec *p, Byte *dest, SizeT *destLen, + const Byte *src, SizeT *srcLen, ELzmaFinishMode finishMode, ELzmaStatus *status); + + +/* ---------- LZMA2 block and chunk parsing ---------- */ + +/* +Lzma2Dec_Parse() parses compressed data stream up to next independent block or next chunk data. +It can return LZMA_STATUS_* code or LZMA2_PARSE_STATUS_* code: + - LZMA2_PARSE_STATUS_NEW_BLOCK - there is new block, and 1 additional byte (control byte of next block header) was read from input. + - LZMA2_PARSE_STATUS_NEW_CHUNK - there is new chunk, and only lzma2 header of new chunk was read. + CLzma2Dec::unpackSize contains unpack size of that chunk +*/ + +typedef enum +{ +/* + LZMA_STATUS_NOT_SPECIFIED // data error + LZMA_STATUS_FINISHED_WITH_MARK + LZMA_STATUS_NOT_FINISHED // + LZMA_STATUS_NEEDS_MORE_INPUT + LZMA_STATUS_MAYBE_FINISHED_WITHOUT_MARK // unused +*/ + LZMA2_PARSE_STATUS_NEW_BLOCK = LZMA_STATUS_MAYBE_FINISHED_WITHOUT_MARK + 1, + LZMA2_PARSE_STATUS_NEW_CHUNK +} ELzma2ParseStatus; + +ELzma2ParseStatus Lzma2Dec_Parse(CLzma2Dec *p, + SizeT outSize, // output size + const Byte *src, SizeT *srcLen, + int checkFinishBlock // set (checkFinishBlock = 1), if it must read full input data, if decoder.dicPos reaches blockMax position. + ); + +/* +LZMA2 parser doesn't decode LZMA chunks, so we must read + full input LZMA chunk to decode some part of LZMA chunk. + +Lzma2Dec_GetUnpackExtra() returns the value that shows + max possible number of output bytes that can be output by decoder + at current input positon. +*/ + +#define Lzma2Dec_GetUnpackExtra(p) ((p)->isExtraMode ? (p)->unpackSize : 0); + + +/* ---------- One Call Interface ---------- */ + +/* +finishMode: + It has meaning only if the decoding reaches output limit (*destLen). + LZMA_FINISH_ANY - use smallest number of input bytes + LZMA_FINISH_END - read EndOfStream marker after decoding + +Returns: + SZ_OK + status: + LZMA_STATUS_FINISHED_WITH_MARK + LZMA_STATUS_NOT_FINISHED + SZ_ERROR_DATA - Data error + SZ_ERROR_MEM - Memory allocation error + SZ_ERROR_UNSUPPORTED - Unsupported properties + SZ_ERROR_INPUT_EOF - It needs more bytes in input buffer (src). +*/ + +SRes Lzma2Decode(Byte *dest, SizeT *destLen, const Byte *src, SizeT *srcLen, + Byte prop, ELzmaFinishMode finishMode, ELzmaStatus *status, ISzAllocPtr alloc); + +EXTERN_C_END + +#endif diff --git a/code/nel/3rdparty/seven_zip/Lzma2DecMt.c b/code/nel/3rdparty/seven_zip/Lzma2DecMt.c new file mode 100644 index 000000000..988643d95 --- /dev/null +++ b/code/nel/3rdparty/seven_zip/Lzma2DecMt.c @@ -0,0 +1,1082 @@ +/* Lzma2DecMt.c -- LZMA2 Decoder Multi-thread +2019-02-02 : Igor Pavlov : Public domain */ + +#include "Precomp.h" + +// #define SHOW_DEBUG_INFO + +#ifdef SHOW_DEBUG_INFO +#include +#endif + +#ifdef SHOW_DEBUG_INFO +#define PRF(x) x +#else +#define PRF(x) +#endif + +#define PRF_STR(s) PRF(printf("\n" s "\n")) +#define PRF_STR_INT(s, d) PRF(printf("\n" s " %d\n", (unsigned)d)) +#define PRF_STR_INT_2(s, d1, d2) PRF(printf("\n" s " %d %d\n", (unsigned)d1, (unsigned)d2)) + +// #define _7ZIP_ST + +#include "Alloc.h" + +#include "Lzma2Dec.h" +#include "Lzma2DecMt.h" + +#ifndef _7ZIP_ST +#include "MtDec.h" +#endif + + +#define LZMA2DECMT_OUT_BLOCK_MAX_DEFAULT (1 << 28) + +void Lzma2DecMtProps_Init(CLzma2DecMtProps *p) +{ + p->inBufSize_ST = 1 << 20; + p->outStep_ST = 1 << 20; + + #ifndef _7ZIP_ST + p->numThreads = 1; + p->inBufSize_MT = 1 << 18; + p->outBlockMax = LZMA2DECMT_OUT_BLOCK_MAX_DEFAULT; + p->inBlockMax = p->outBlockMax + p->outBlockMax / 16; + #endif +} + + + +#ifndef _7ZIP_ST + +/* ---------- CLzma2DecMtThread ---------- */ + +typedef struct +{ + CLzma2Dec dec; + Byte dec_created; + Byte needInit; + + Byte *outBuf; + size_t outBufSize; + + EMtDecParseState state; + ELzma2ParseStatus parseStatus; + + size_t inPreSize; + size_t outPreSize; + + size_t inCodeSize; + size_t outCodeSize; + SRes codeRes; + + CAlignOffsetAlloc alloc; + + Byte mtPad[1 << 7]; +} CLzma2DecMtThread; + +#endif + + +/* ---------- CLzma2DecMt ---------- */ + +typedef struct +{ + // ISzAllocPtr alloc; + ISzAllocPtr allocMid; + + CAlignOffsetAlloc alignOffsetAlloc; + CLzma2DecMtProps props; + Byte prop; + + ISeqInStream *inStream; + ISeqOutStream *outStream; + ICompressProgress *progress; + + BoolInt finishMode; + BoolInt outSize_Defined; + UInt64 outSize; + + UInt64 outProcessed; + UInt64 inProcessed; + BoolInt readWasFinished; + SRes readRes; + + Byte *inBuf; + size_t inBufSize; + Byte dec_created; + CLzma2Dec dec; + + size_t inPos; + size_t inLim; + + #ifndef _7ZIP_ST + UInt64 outProcessed_Parse; + BoolInt mtc_WasConstructed; + CMtDec mtc; + CLzma2DecMtThread coders[MTDEC__THREADS_MAX]; + #endif + +} CLzma2DecMt; + + + +CLzma2DecMtHandle Lzma2DecMt_Create(ISzAllocPtr alloc, ISzAllocPtr allocMid) +{ + CLzma2DecMt *p = (CLzma2DecMt *)ISzAlloc_Alloc(alloc, sizeof(CLzma2DecMt)); + if (!p) + return NULL; + + // p->alloc = alloc; + p->allocMid = allocMid; + + AlignOffsetAlloc_CreateVTable(&p->alignOffsetAlloc); + p->alignOffsetAlloc.numAlignBits = 7; + p->alignOffsetAlloc.offset = 0; + p->alignOffsetAlloc.baseAlloc = alloc; + + p->inBuf = NULL; + p->inBufSize = 0; + p->dec_created = False; + + // Lzma2DecMtProps_Init(&p->props); + + #ifndef _7ZIP_ST + p->mtc_WasConstructed = False; + { + unsigned i; + for (i = 0; i < MTDEC__THREADS_MAX; i++) + { + CLzma2DecMtThread *t = &p->coders[i]; + t->dec_created = False; + t->outBuf = NULL; + t->outBufSize = 0; + } + } + #endif + + return p; +} + + +#ifndef _7ZIP_ST + +static void Lzma2DecMt_FreeOutBufs(CLzma2DecMt *p) +{ + unsigned i; + for (i = 0; i < MTDEC__THREADS_MAX; i++) + { + CLzma2DecMtThread *t = &p->coders[i]; + if (t->outBuf) + { + ISzAlloc_Free(p->allocMid, t->outBuf); + t->outBuf = NULL; + t->outBufSize = 0; + } + } +} + +#endif + + +static void Lzma2DecMt_FreeSt(CLzma2DecMt *p) +{ + if (p->dec_created) + { + Lzma2Dec_Free(&p->dec, &p->alignOffsetAlloc.vt); + p->dec_created = False; + } + if (p->inBuf) + { + ISzAlloc_Free(p->allocMid, p->inBuf); + p->inBuf = NULL; + } + p->inBufSize = 0; +} + + +void Lzma2DecMt_Destroy(CLzma2DecMtHandle pp) +{ + CLzma2DecMt *p = (CLzma2DecMt *)pp; + + Lzma2DecMt_FreeSt(p); + + #ifndef _7ZIP_ST + + if (p->mtc_WasConstructed) + { + MtDec_Destruct(&p->mtc); + p->mtc_WasConstructed = False; + } + { + unsigned i; + for (i = 0; i < MTDEC__THREADS_MAX; i++) + { + CLzma2DecMtThread *t = &p->coders[i]; + if (t->dec_created) + { + // we don't need to free dict here + Lzma2Dec_FreeProbs(&t->dec, &t->alloc.vt); // p->alloc !!! + t->dec_created = False; + } + } + } + Lzma2DecMt_FreeOutBufs(p); + + #endif + + ISzAlloc_Free(p->alignOffsetAlloc.baseAlloc, pp); +} + + + +#ifndef _7ZIP_ST + +static void Lzma2DecMt_MtCallback_Parse(void *obj, unsigned coderIndex, CMtDecCallbackInfo *cc) +{ + CLzma2DecMt *me = (CLzma2DecMt *)obj; + CLzma2DecMtThread *t = &me->coders[coderIndex]; + + PRF_STR_INT_2("Parse", coderIndex, cc->srcSize); + + cc->state = MTDEC_PARSE_CONTINUE; + + if (cc->startCall) + { + if (!t->dec_created) + { + Lzma2Dec_Construct(&t->dec); + t->dec_created = True; + AlignOffsetAlloc_CreateVTable(&t->alloc); + { + /* (1 << 12) is expected size of one way in data cache. + We optimize alignment for cache line size of 128 bytes and smaller */ + const unsigned kNumAlignBits = 12; + const unsigned kNumCacheLineBits = 7; /* <= kNumAlignBits */ + t->alloc.numAlignBits = kNumAlignBits; + t->alloc.offset = ((UInt32)coderIndex * ((1 << 11) + (1 << 8) + (1 << 6))) & ((1 << kNumAlignBits) - (1 << kNumCacheLineBits)); + t->alloc.baseAlloc = me->alignOffsetAlloc.baseAlloc; + } + } + Lzma2Dec_Init(&t->dec); + + t->inPreSize = 0; + t->outPreSize = 0; + // t->blockWasFinished = False; + // t->finishedWithMark = False; + t->parseStatus = (ELzma2ParseStatus)LZMA_STATUS_NOT_SPECIFIED; + t->state = MTDEC_PARSE_CONTINUE; + + t->inCodeSize = 0; + t->outCodeSize = 0; + t->codeRes = SZ_OK; + + // (cc->srcSize == 0) is allowed + } + + { + ELzma2ParseStatus status; + BoolInt overflow; + UInt32 unpackRem = 0; + + int checkFinishBlock = True; + size_t limit = me->props.outBlockMax; + if (me->outSize_Defined) + { + UInt64 rem = me->outSize - me->outProcessed_Parse; + if (limit >= rem) + { + limit = (size_t)rem; + if (!me->finishMode) + checkFinishBlock = False; + } + } + + // checkFinishBlock = False, if we want to decode partial data + // that must be finished at position <= outBlockMax. + + { + const SizeT srcOrig = cc->srcSize; + SizeT srcSize_Point = 0; + SizeT dicPos_Point = 0; + + cc->srcSize = 0; + overflow = False; + + for (;;) + { + SizeT srcCur = srcOrig - cc->srcSize; + + status = Lzma2Dec_Parse(&t->dec, + limit - t->dec.decoder.dicPos, + cc->src + cc->srcSize, &srcCur, + checkFinishBlock); + + cc->srcSize += srcCur; + + if (status == LZMA2_PARSE_STATUS_NEW_CHUNK) + { + if (t->dec.unpackSize > me->props.outBlockMax - t->dec.decoder.dicPos) + { + overflow = True; + break; + } + continue; + } + + if (status == LZMA2_PARSE_STATUS_NEW_BLOCK) + { + if (t->dec.decoder.dicPos == 0) + continue; + // we decode small blocks in one thread + if (t->dec.decoder.dicPos >= (1 << 14)) + break; + dicPos_Point = t->dec.decoder.dicPos; + srcSize_Point = cc->srcSize; + continue; + } + + if ((int)status == LZMA_STATUS_NOT_FINISHED && checkFinishBlock + // && limit == t->dec.decoder.dicPos + // && limit == me->props.outBlockMax + ) + { + overflow = True; + break; + } + + unpackRem = Lzma2Dec_GetUnpackExtra(&t->dec); + break; + } + + if (dicPos_Point != 0 + && (int)status != LZMA2_PARSE_STATUS_NEW_BLOCK + && (int)status != LZMA_STATUS_FINISHED_WITH_MARK + && (int)status != LZMA_STATUS_NOT_SPECIFIED) + { + // we revert to latest newBlock state + status = LZMA2_PARSE_STATUS_NEW_BLOCK; + unpackRem = 0; + t->dec.decoder.dicPos = dicPos_Point; + cc->srcSize = srcSize_Point; + overflow = False; + } + } + + t->inPreSize += cc->srcSize; + t->parseStatus = status; + + if (overflow) + cc->state = MTDEC_PARSE_OVERFLOW; + else + { + size_t dicPos = t->dec.decoder.dicPos; + + if ((int)status != LZMA_STATUS_NEEDS_MORE_INPUT) + { + if (status == LZMA2_PARSE_STATUS_NEW_BLOCK) + { + cc->state = MTDEC_PARSE_NEW; + cc->srcSize--; // we don't need control byte of next block + t->inPreSize--; + } + else + { + cc->state = MTDEC_PARSE_END; + if ((int)status != LZMA_STATUS_FINISHED_WITH_MARK) + { + // (status == LZMA_STATUS_NOT_SPECIFIED) + // (status == LZMA_STATUS_NOT_FINISHED) + if (unpackRem != 0) + { + /* we also reserve space for max possible number of output bytes of current LZMA chunk */ + SizeT rem = limit - dicPos; + if (rem > unpackRem) + rem = unpackRem; + dicPos += rem; + } + } + } + + me->outProcessed_Parse += dicPos; + } + + cc->outPos = dicPos; + t->outPreSize = (size_t)dicPos; + } + + t->state = cc->state; + return; + } +} + + +static SRes Lzma2DecMt_MtCallback_PreCode(void *pp, unsigned coderIndex) +{ + CLzma2DecMt *me = (CLzma2DecMt *)pp; + CLzma2DecMtThread *t = &me->coders[coderIndex]; + Byte *dest = t->outBuf; + + if (t->inPreSize == 0) + { + t->codeRes = SZ_ERROR_DATA; + return t->codeRes; + } + + if (!dest || t->outBufSize < t->outPreSize) + { + if (dest) + { + ISzAlloc_Free(me->allocMid, dest); + t->outBuf = NULL; + t->outBufSize = 0; + } + + dest = (Byte *)ISzAlloc_Alloc(me->allocMid, t->outPreSize + // + (1 << 28) + ); + // Sleep(200); + if (!dest) + return SZ_ERROR_MEM; + t->outBuf = dest; + t->outBufSize = t->outPreSize; + } + + t->dec.decoder.dic = dest; + t->dec.decoder.dicBufSize = t->outPreSize; + + t->needInit = True; + + return Lzma2Dec_AllocateProbs(&t->dec, me->prop, &t->alloc.vt); // alloc.vt +} + + +static SRes Lzma2DecMt_MtCallback_Code(void *pp, unsigned coderIndex, + const Byte *src, size_t srcSize, int srcFinished, + // int finished, int blockFinished, + UInt64 *inCodePos, UInt64 *outCodePos, int *stop) +{ + CLzma2DecMt *me = (CLzma2DecMt *)pp; + CLzma2DecMtThread *t = &me->coders[coderIndex]; + + UNUSED_VAR(srcFinished) + + PRF_STR_INT_2("Code", coderIndex, srcSize); + + *inCodePos = t->inCodeSize; + *outCodePos = 0; + *stop = True; + + if (t->needInit) + { + Lzma2Dec_Init(&t->dec); + t->needInit = False; + } + + { + ELzmaStatus status; + size_t srcProcessed = srcSize; + BoolInt blockWasFinished = + ((int)t->parseStatus == LZMA_STATUS_FINISHED_WITH_MARK + || t->parseStatus == LZMA2_PARSE_STATUS_NEW_BLOCK); + + SRes res = Lzma2Dec_DecodeToDic(&t->dec, + t->outPreSize, + src, &srcProcessed, + blockWasFinished ? LZMA_FINISH_END : LZMA_FINISH_ANY, + &status); + + t->codeRes = res; + + t->inCodeSize += srcProcessed; + *inCodePos = t->inCodeSize; + t->outCodeSize = t->dec.decoder.dicPos; + *outCodePos = t->dec.decoder.dicPos; + + if (res != SZ_OK) + return res; + + if (srcProcessed == srcSize) + *stop = False; + + if (blockWasFinished) + { + if (srcSize != srcProcessed) + return SZ_ERROR_FAIL; + + if (t->inPreSize == t->inCodeSize) + { + if (t->outPreSize != t->outCodeSize) + return SZ_ERROR_FAIL; + *stop = True; + } + } + else + { + if (t->outPreSize == t->outCodeSize) + *stop = True; + } + + return SZ_OK; + } +} + + +#define LZMA2DECMT_STREAM_WRITE_STEP (1 << 24) + +static SRes Lzma2DecMt_MtCallback_Write(void *pp, unsigned coderIndex, + BoolInt needWriteToStream, + const Byte *src, size_t srcSize, + BoolInt *needContinue, BoolInt *canRecode) +{ + CLzma2DecMt *me = (CLzma2DecMt *)pp; + const CLzma2DecMtThread *t = &me->coders[coderIndex]; + size_t size = t->outCodeSize; + const Byte *data = t->outBuf; + BoolInt needContinue2 = True; + + PRF_STR_INT_2("Write", coderIndex, srcSize); + + *needContinue = False; + *canRecode = True; + UNUSED_VAR(src) + UNUSED_VAR(srcSize) + + if ( + // t->parseStatus == LZMA_STATUS_FINISHED_WITH_MARK + t->state == MTDEC_PARSE_OVERFLOW + || t->state == MTDEC_PARSE_END) + needContinue2 = False; + + + if (!needWriteToStream) + return SZ_OK; + + me->mtc.inProcessed += t->inCodeSize; + + if (t->codeRes == SZ_OK) + if ((int)t->parseStatus == LZMA_STATUS_FINISHED_WITH_MARK + || t->parseStatus == LZMA2_PARSE_STATUS_NEW_BLOCK) + if (t->outPreSize != t->outCodeSize + || t->inPreSize != t->inCodeSize) + return SZ_ERROR_FAIL; + + *canRecode = False; + + if (me->outStream) + { + for (;;) + { + size_t cur = size; + size_t written; + if (cur > LZMA2DECMT_STREAM_WRITE_STEP) + cur = LZMA2DECMT_STREAM_WRITE_STEP; + + written = ISeqOutStream_Write(me->outStream, data, cur); + + me->outProcessed += written; + // me->mtc.writtenTotal += written; + if (written != cur) + return SZ_ERROR_WRITE; + data += cur; + size -= cur; + if (size == 0) + { + *needContinue = needContinue2; + return SZ_OK; + } + RINOK(MtProgress_ProgressAdd(&me->mtc.mtProgress, 0, 0)); + } + } + + return SZ_ERROR_FAIL; + /* + if (size > me->outBufSize) + return SZ_ERROR_OUTPUT_EOF; + memcpy(me->outBuf, data, size); + me->outBufSize -= size; + me->outBuf += size; + *needContinue = needContinue2; + return SZ_OK; + */ +} + +#endif + + +static SRes Lzma2Dec_Prepare_ST(CLzma2DecMt *p) +{ + if (!p->dec_created) + { + Lzma2Dec_Construct(&p->dec); + p->dec_created = True; + } + + RINOK(Lzma2Dec_Allocate(&p->dec, p->prop, &p->alignOffsetAlloc.vt)); + + if (!p->inBuf || p->inBufSize != p->props.inBufSize_ST) + { + ISzAlloc_Free(p->allocMid, p->inBuf); + p->inBufSize = 0; + p->inBuf = (Byte *)ISzAlloc_Alloc(p->allocMid, p->props.inBufSize_ST); + if (!p->inBuf) + return SZ_ERROR_MEM; + p->inBufSize = p->props.inBufSize_ST; + } + + Lzma2Dec_Init(&p->dec); + + return SZ_OK; +} + + +static SRes Lzma2Dec_Decode_ST(CLzma2DecMt *p + #ifndef _7ZIP_ST + , BoolInt tMode + #endif + ) +{ + SizeT wrPos; + size_t inPos, inLim; + const Byte *inData; + UInt64 inPrev, outPrev; + + CLzma2Dec *dec; + + #ifndef _7ZIP_ST + if (tMode) + { + Lzma2DecMt_FreeOutBufs(p); + tMode = MtDec_PrepareRead(&p->mtc); + } + #endif + + RINOK(Lzma2Dec_Prepare_ST(p)); + + dec = &p->dec; + + inPrev = p->inProcessed; + outPrev = p->outProcessed; + + inPos = 0; + inLim = 0; + inData = NULL; + wrPos = dec->decoder.dicPos; + + for (;;) + { + SizeT dicPos; + SizeT size; + ELzmaFinishMode finishMode; + SizeT inProcessed; + ELzmaStatus status; + SRes res; + + SizeT outProcessed; + BoolInt outFinished; + BoolInt needStop; + + if (inPos == inLim) + { + #ifndef _7ZIP_ST + if (tMode) + { + inData = MtDec_Read(&p->mtc, &inLim); + inPos = 0; + if (inData) + continue; + tMode = False; + inLim = 0; + } + #endif + + if (!p->readWasFinished) + { + inPos = 0; + inLim = p->inBufSize; + inData = p->inBuf; + p->readRes = ISeqInStream_Read(p->inStream, (void *)inData, &inLim); + // p->readProcessed += inLim; + // inLim -= 5; p->readWasFinished = True; // for test + if (inLim == 0 || p->readRes != SZ_OK) + p->readWasFinished = True; + } + } + + dicPos = dec->decoder.dicPos; + { + SizeT next = dec->decoder.dicBufSize; + if (next - wrPos > p->props.outStep_ST) + next = wrPos + p->props.outStep_ST; + size = next - dicPos; + } + + finishMode = LZMA_FINISH_ANY; + if (p->outSize_Defined) + { + const UInt64 rem = p->outSize - p->outProcessed; + if (size >= rem) + { + size = (SizeT)rem; + if (p->finishMode) + finishMode = LZMA_FINISH_END; + } + } + + inProcessed = inLim - inPos; + + res = Lzma2Dec_DecodeToDic(dec, dicPos + size, inData + inPos, &inProcessed, finishMode, &status); + + inPos += inProcessed; + p->inProcessed += inProcessed; + outProcessed = dec->decoder.dicPos - dicPos; + p->outProcessed += outProcessed; + + outFinished = (p->outSize_Defined && p->outSize <= p->outProcessed); + + needStop = (res != SZ_OK + || (inProcessed == 0 && outProcessed == 0) + || status == LZMA_STATUS_FINISHED_WITH_MARK + || (!p->finishMode && outFinished)); + + if (needStop || outProcessed >= size) + { + SRes res2; + { + size_t writeSize = dec->decoder.dicPos - wrPos; + size_t written = ISeqOutStream_Write(p->outStream, dec->decoder.dic + wrPos, writeSize); + res2 = (written == writeSize) ? SZ_OK : SZ_ERROR_WRITE; + } + + if (dec->decoder.dicPos == dec->decoder.dicBufSize) + dec->decoder.dicPos = 0; + wrPos = dec->decoder.dicPos; + + RINOK(res2); + + if (needStop) + { + if (res != SZ_OK) + return res; + + if (status == LZMA_STATUS_FINISHED_WITH_MARK) + { + if (p->finishMode) + { + if (p->outSize_Defined && p->outSize != p->outProcessed) + return SZ_ERROR_DATA; + } + return SZ_OK; + } + + if (!p->finishMode && outFinished) + return SZ_OK; + + if (status == LZMA_STATUS_NEEDS_MORE_INPUT) + return SZ_ERROR_INPUT_EOF; + + return SZ_ERROR_DATA; + } + } + + if (p->progress) + { + UInt64 inDelta = p->inProcessed - inPrev; + UInt64 outDelta = p->outProcessed - outPrev; + if (inDelta >= (1 << 22) || outDelta >= (1 << 22)) + { + RINOK(ICompressProgress_Progress(p->progress, p->inProcessed, p->outProcessed)); + inPrev = p->inProcessed; + outPrev = p->outProcessed; + } + } + } +} + + + +SRes Lzma2DecMt_Decode(CLzma2DecMtHandle pp, + Byte prop, + const CLzma2DecMtProps *props, + ISeqOutStream *outStream, const UInt64 *outDataSize, int finishMode, + // Byte *outBuf, size_t *outBufSize, + ISeqInStream *inStream, + // const Byte *inData, size_t inDataSize, + UInt64 *inProcessed, + // UInt64 *outProcessed, + int *isMT, + ICompressProgress *progress) +{ + CLzma2DecMt *p = (CLzma2DecMt *)pp; + #ifndef _7ZIP_ST + BoolInt tMode; + #endif + + *inProcessed = 0; + + if (prop > 40) + return SZ_ERROR_UNSUPPORTED; + + p->prop = prop; + p->props = *props; + + p->inStream = inStream; + p->outStream = outStream; + p->progress = progress; + + p->outSize = 0; + p->outSize_Defined = False; + if (outDataSize) + { + p->outSize_Defined = True; + p->outSize = *outDataSize; + } + p->finishMode = finishMode; + + p->outProcessed = 0; + p->inProcessed = 0; + + p->readWasFinished = False; + + *isMT = False; + + + #ifndef _7ZIP_ST + + tMode = False; + + // p->mtc.parseRes = SZ_OK; + + // p->mtc.numFilledThreads = 0; + // p->mtc.crossStart = 0; + // p->mtc.crossEnd = 0; + // p->mtc.allocError_for_Read_BlockIndex = 0; + // p->mtc.isAllocError = False; + + if (p->props.numThreads > 1) + { + IMtDecCallback vt; + + Lzma2DecMt_FreeSt(p); + + p->outProcessed_Parse = 0; + + if (!p->mtc_WasConstructed) + { + p->mtc_WasConstructed = True; + MtDec_Construct(&p->mtc); + } + + p->mtc.progress = progress; + p->mtc.inStream = inStream; + + // p->outBuf = NULL; + // p->outBufSize = 0; + /* + if (!outStream) + { + // p->outBuf = outBuf; + // p->outBufSize = *outBufSize; + // *outBufSize = 0; + return SZ_ERROR_PARAM; + } + */ + + // p->mtc.inBlockMax = p->props.inBlockMax; + p->mtc.alloc = &p->alignOffsetAlloc.vt; + // p->alignOffsetAlloc.baseAlloc; + // p->mtc.inData = inData; + // p->mtc.inDataSize = inDataSize; + p->mtc.mtCallback = &vt; + p->mtc.mtCallbackObject = p; + + p->mtc.inBufSize = p->props.inBufSize_MT; + + p->mtc.numThreadsMax = p->props.numThreads; + + *isMT = True; + + vt.Parse = Lzma2DecMt_MtCallback_Parse; + vt.PreCode = Lzma2DecMt_MtCallback_PreCode; + vt.Code = Lzma2DecMt_MtCallback_Code; + vt.Write = Lzma2DecMt_MtCallback_Write; + + { + BoolInt needContinue = False; + + SRes res = MtDec_Code(&p->mtc); + + /* + if (!outStream) + *outBufSize = p->outBuf - outBuf; + */ + + *inProcessed = p->mtc.inProcessed; + + needContinue = False; + + if (res == SZ_OK) + { + if (p->mtc.mtProgress.res != SZ_OK) + res = p->mtc.mtProgress.res; + else + needContinue = p->mtc.needContinue; + } + + if (!needContinue) + { + if (res == SZ_OK) + return p->mtc.readRes; + return res; + } + + tMode = True; + p->readRes = p->mtc.readRes; + p->readWasFinished = p->mtc.readWasFinished; + p->inProcessed = p->mtc.inProcessed; + + PRF_STR("----- decoding ST -----"); + } + } + + #endif + + + *isMT = False; + + { + SRes res = Lzma2Dec_Decode_ST(p + #ifndef _7ZIP_ST + , tMode + #endif + ); + + *inProcessed = p->inProcessed; + + // res = SZ_OK; // for test + if (res == SZ_OK && p->readRes != SZ_OK) + res = p->readRes; + + /* + #ifndef _7ZIP_ST + if (res == SZ_OK && tMode && p->mtc.parseRes != SZ_OK) + res = p->mtc.parseRes; + #endif + */ + + return res; + } +} + + +/* ---------- Read from CLzma2DecMtHandle Interface ---------- */ + +SRes Lzma2DecMt_Init(CLzma2DecMtHandle pp, + Byte prop, + const CLzma2DecMtProps *props, + const UInt64 *outDataSize, int finishMode, + ISeqInStream *inStream) +{ + CLzma2DecMt *p = (CLzma2DecMt *)pp; + + if (prop > 40) + return SZ_ERROR_UNSUPPORTED; + + p->prop = prop; + p->props = *props; + + p->inStream = inStream; + + p->outSize = 0; + p->outSize_Defined = False; + if (outDataSize) + { + p->outSize_Defined = True; + p->outSize = *outDataSize; + } + p->finishMode = finishMode; + + p->outProcessed = 0; + p->inProcessed = 0; + + p->inPos = 0; + p->inLim = 0; + + return Lzma2Dec_Prepare_ST(p); +} + + +SRes Lzma2DecMt_Read(CLzma2DecMtHandle pp, + Byte *data, size_t *outSize, + UInt64 *inStreamProcessed) +{ + CLzma2DecMt *p = (CLzma2DecMt *)pp; + ELzmaFinishMode finishMode; + SRes readRes; + size_t size = *outSize; + + *outSize = 0; + *inStreamProcessed = 0; + + finishMode = LZMA_FINISH_ANY; + if (p->outSize_Defined) + { + const UInt64 rem = p->outSize - p->outProcessed; + if (size >= rem) + { + size = (size_t)rem; + if (p->finishMode) + finishMode = LZMA_FINISH_END; + } + } + + readRes = SZ_OK; + + for (;;) + { + SizeT inCur; + SizeT outCur; + ELzmaStatus status; + SRes res; + + if (p->inPos == p->inLim && readRes == SZ_OK) + { + p->inPos = 0; + p->inLim = p->props.inBufSize_ST; + readRes = ISeqInStream_Read(p->inStream, p->inBuf, &p->inLim); + } + + inCur = p->inLim - p->inPos; + outCur = size; + + res = Lzma2Dec_DecodeToBuf(&p->dec, data, &outCur, + p->inBuf + p->inPos, &inCur, finishMode, &status); + + p->inPos += inCur; + p->inProcessed += inCur; + *inStreamProcessed += inCur; + p->outProcessed += outCur; + *outSize += outCur; + size -= outCur; + data += outCur; + + if (res != 0) + return res; + + /* + if (status == LZMA_STATUS_FINISHED_WITH_MARK) + return readRes; + + if (size == 0 && status != LZMA_STATUS_NEEDS_MORE_INPUT) + { + if (p->finishMode && p->outSize_Defined && p->outProcessed >= p->outSize) + return SZ_ERROR_DATA; + return readRes; + } + */ + + if (inCur == 0 && outCur == 0) + return readRes; + } +} diff --git a/code/nel/3rdparty/seven_zip/Lzma2DecMt.h b/code/nel/3rdparty/seven_zip/Lzma2DecMt.h new file mode 100644 index 000000000..7791c310b --- /dev/null +++ b/code/nel/3rdparty/seven_zip/Lzma2DecMt.h @@ -0,0 +1,79 @@ +/* Lzma2DecMt.h -- LZMA2 Decoder Multi-thread +2018-02-17 : Igor Pavlov : Public domain */ + +#ifndef __LZMA2_DEC_MT_H +#define __LZMA2_DEC_MT_H + +#include "7zTypes.h" + +EXTERN_C_BEGIN + +typedef struct +{ + size_t inBufSize_ST; + size_t outStep_ST; + + #ifndef _7ZIP_ST + unsigned numThreads; + size_t inBufSize_MT; + size_t outBlockMax; + size_t inBlockMax; + #endif +} CLzma2DecMtProps; + +/* init to single-thread mode */ +void Lzma2DecMtProps_Init(CLzma2DecMtProps *p); + + +/* ---------- CLzma2DecMtHandle Interface ---------- */ + +/* Lzma2DecMt_ * functions can return the following exit codes: +SRes: + SZ_OK - OK + SZ_ERROR_MEM - Memory allocation error + SZ_ERROR_PARAM - Incorrect paramater in props + SZ_ERROR_WRITE - ISeqOutStream write callback error + // SZ_ERROR_OUTPUT_EOF - output buffer overflow - version with (Byte *) output + SZ_ERROR_PROGRESS - some break from progress callback + SZ_ERROR_THREAD - error in multithreading functions (only for Mt version) +*/ + +typedef void * CLzma2DecMtHandle; + +CLzma2DecMtHandle Lzma2DecMt_Create(ISzAllocPtr alloc, ISzAllocPtr allocMid); +void Lzma2DecMt_Destroy(CLzma2DecMtHandle p); + +SRes Lzma2DecMt_Decode(CLzma2DecMtHandle p, + Byte prop, + const CLzma2DecMtProps *props, + ISeqOutStream *outStream, + const UInt64 *outDataSize, // NULL means undefined + int finishMode, // 0 - partial unpacking is allowed, 1 - if lzma2 stream must be finished + // Byte *outBuf, size_t *outBufSize, + ISeqInStream *inStream, + // const Byte *inData, size_t inDataSize, + + // out variables: + UInt64 *inProcessed, + int *isMT, /* out: (*isMT == 0), if single thread decoding was used */ + + // UInt64 *outProcessed, + ICompressProgress *progress); + + +/* ---------- Read from CLzma2DecMtHandle Interface ---------- */ + +SRes Lzma2DecMt_Init(CLzma2DecMtHandle pp, + Byte prop, + const CLzma2DecMtProps *props, + const UInt64 *outDataSize, int finishMode, + ISeqInStream *inStream); + +SRes Lzma2DecMt_Read(CLzma2DecMtHandle pp, + Byte *data, size_t *outSize, + UInt64 *inStreamProcessed); + + +EXTERN_C_END + +#endif diff --git a/code/nel/3rdparty/seven_zip/Lzma2Enc.c b/code/nel/3rdparty/seven_zip/Lzma2Enc.c new file mode 100644 index 000000000..5c1ad4931 --- /dev/null +++ b/code/nel/3rdparty/seven_zip/Lzma2Enc.c @@ -0,0 +1,803 @@ +/* Lzma2Enc.c -- LZMA2 Encoder +2018-07-04 : Igor Pavlov : Public domain */ + +#include "Precomp.h" + +#include + +/* #define _7ZIP_ST */ + +#include "Lzma2Enc.h" + +#ifndef _7ZIP_ST +#include "MtCoder.h" +#else +#define MTCODER__THREADS_MAX 1 +#endif + +#define LZMA2_CONTROL_LZMA (1 << 7) +#define LZMA2_CONTROL_COPY_NO_RESET 2 +#define LZMA2_CONTROL_COPY_RESET_DIC 1 +#define LZMA2_CONTROL_EOF 0 + +#define LZMA2_LCLP_MAX 4 + +#define LZMA2_DIC_SIZE_FROM_PROP(p) (((UInt32)2 | ((p) & 1)) << ((p) / 2 + 11)) + +#define LZMA2_PACK_SIZE_MAX (1 << 16) +#define LZMA2_COPY_CHUNK_SIZE LZMA2_PACK_SIZE_MAX +#define LZMA2_UNPACK_SIZE_MAX (1 << 21) +#define LZMA2_KEEP_WINDOW_SIZE LZMA2_UNPACK_SIZE_MAX + +#define LZMA2_CHUNK_SIZE_COMPRESSED_MAX ((1 << 16) + 16) + + +#define PRF(x) /* x */ + + +/* ---------- CLimitedSeqInStream ---------- */ + +typedef struct +{ + ISeqInStream vt; + ISeqInStream *realStream; + UInt64 limit; + UInt64 processed; + int finished; +} CLimitedSeqInStream; + +static void LimitedSeqInStream_Init(CLimitedSeqInStream *p) +{ + p->limit = (UInt64)(Int64)-1; + p->processed = 0; + p->finished = 0; +} + +static SRes LimitedSeqInStream_Read(const ISeqInStream *pp, void *data, size_t *size) +{ + CLimitedSeqInStream *p = CONTAINER_FROM_VTBL(pp, CLimitedSeqInStream, vt); + size_t size2 = *size; + SRes res = SZ_OK; + + if (p->limit != (UInt64)(Int64)-1) + { + UInt64 rem = p->limit - p->processed; + if (size2 > rem) + size2 = (size_t)rem; + } + if (size2 != 0) + { + res = ISeqInStream_Read(p->realStream, data, &size2); + p->finished = (size2 == 0 ? 1 : 0); + p->processed += size2; + } + *size = size2; + return res; +} + + +/* ---------- CLzma2EncInt ---------- */ + +typedef struct +{ + CLzmaEncHandle enc; + Byte propsAreSet; + Byte propsByte; + Byte needInitState; + Byte needInitProp; + UInt64 srcPos; +} CLzma2EncInt; + + +static SRes Lzma2EncInt_InitStream(CLzma2EncInt *p, const CLzma2EncProps *props) +{ + if (!p->propsAreSet) + { + SizeT propsSize = LZMA_PROPS_SIZE; + Byte propsEncoded[LZMA_PROPS_SIZE]; + RINOK(LzmaEnc_SetProps(p->enc, &props->lzmaProps)); + RINOK(LzmaEnc_WriteProperties(p->enc, propsEncoded, &propsSize)); + p->propsByte = propsEncoded[0]; + p->propsAreSet = True; + } + return SZ_OK; +} + +static void Lzma2EncInt_InitBlock(CLzma2EncInt *p) +{ + p->srcPos = 0; + p->needInitState = True; + p->needInitProp = True; +} + + +SRes LzmaEnc_PrepareForLzma2(CLzmaEncHandle pp, ISeqInStream *inStream, UInt32 keepWindowSize, + ISzAllocPtr alloc, ISzAllocPtr allocBig); +SRes LzmaEnc_MemPrepare(CLzmaEncHandle pp, const Byte *src, SizeT srcLen, + UInt32 keepWindowSize, ISzAllocPtr alloc, ISzAllocPtr allocBig); +SRes LzmaEnc_CodeOneMemBlock(CLzmaEncHandle pp, BoolInt reInit, + Byte *dest, size_t *destLen, UInt32 desiredPackSize, UInt32 *unpackSize); +const Byte *LzmaEnc_GetCurBuf(CLzmaEncHandle pp); +void LzmaEnc_Finish(CLzmaEncHandle pp); +void LzmaEnc_SaveState(CLzmaEncHandle pp); +void LzmaEnc_RestoreState(CLzmaEncHandle pp); + +/* +UInt32 LzmaEnc_GetNumAvailableBytes(CLzmaEncHandle pp); +*/ + +static SRes Lzma2EncInt_EncodeSubblock(CLzma2EncInt *p, Byte *outBuf, + size_t *packSizeRes, ISeqOutStream *outStream) +{ + size_t packSizeLimit = *packSizeRes; + size_t packSize = packSizeLimit; + UInt32 unpackSize = LZMA2_UNPACK_SIZE_MAX; + unsigned lzHeaderSize = 5 + (p->needInitProp ? 1 : 0); + BoolInt useCopyBlock; + SRes res; + + *packSizeRes = 0; + if (packSize < lzHeaderSize) + return SZ_ERROR_OUTPUT_EOF; + packSize -= lzHeaderSize; + + LzmaEnc_SaveState(p->enc); + res = LzmaEnc_CodeOneMemBlock(p->enc, p->needInitState, + outBuf + lzHeaderSize, &packSize, LZMA2_PACK_SIZE_MAX, &unpackSize); + + PRF(printf("\npackSize = %7d unpackSize = %7d ", packSize, unpackSize)); + + if (unpackSize == 0) + return res; + + if (res == SZ_OK) + useCopyBlock = (packSize + 2 >= unpackSize || packSize > (1 << 16)); + else + { + if (res != SZ_ERROR_OUTPUT_EOF) + return res; + res = SZ_OK; + useCopyBlock = True; + } + + if (useCopyBlock) + { + size_t destPos = 0; + PRF(printf("################# COPY ")); + + while (unpackSize > 0) + { + UInt32 u = (unpackSize < LZMA2_COPY_CHUNK_SIZE) ? unpackSize : LZMA2_COPY_CHUNK_SIZE; + if (packSizeLimit - destPos < u + 3) + return SZ_ERROR_OUTPUT_EOF; + outBuf[destPos++] = (Byte)(p->srcPos == 0 ? LZMA2_CONTROL_COPY_RESET_DIC : LZMA2_CONTROL_COPY_NO_RESET); + outBuf[destPos++] = (Byte)((u - 1) >> 8); + outBuf[destPos++] = (Byte)(u - 1); + memcpy(outBuf + destPos, LzmaEnc_GetCurBuf(p->enc) - unpackSize, u); + unpackSize -= u; + destPos += u; + p->srcPos += u; + + if (outStream) + { + *packSizeRes += destPos; + if (ISeqOutStream_Write(outStream, outBuf, destPos) != destPos) + return SZ_ERROR_WRITE; + destPos = 0; + } + else + *packSizeRes = destPos; + /* needInitState = True; */ + } + + LzmaEnc_RestoreState(p->enc); + return SZ_OK; + } + + { + size_t destPos = 0; + UInt32 u = unpackSize - 1; + UInt32 pm = (UInt32)(packSize - 1); + unsigned mode = (p->srcPos == 0) ? 3 : (p->needInitState ? (p->needInitProp ? 2 : 1) : 0); + + PRF(printf(" ")); + + outBuf[destPos++] = (Byte)(LZMA2_CONTROL_LZMA | (mode << 5) | ((u >> 16) & 0x1F)); + outBuf[destPos++] = (Byte)(u >> 8); + outBuf[destPos++] = (Byte)u; + outBuf[destPos++] = (Byte)(pm >> 8); + outBuf[destPos++] = (Byte)pm; + + if (p->needInitProp) + outBuf[destPos++] = p->propsByte; + + p->needInitProp = False; + p->needInitState = False; + destPos += packSize; + p->srcPos += unpackSize; + + if (outStream) + if (ISeqOutStream_Write(outStream, outBuf, destPos) != destPos) + return SZ_ERROR_WRITE; + + *packSizeRes = destPos; + return SZ_OK; + } +} + + +/* ---------- Lzma2 Props ---------- */ + +void Lzma2EncProps_Init(CLzma2EncProps *p) +{ + LzmaEncProps_Init(&p->lzmaProps); + p->blockSize = LZMA2_ENC_PROPS__BLOCK_SIZE__AUTO; + p->numBlockThreads_Reduced = -1; + p->numBlockThreads_Max = -1; + p->numTotalThreads = -1; +} + +void Lzma2EncProps_Normalize(CLzma2EncProps *p) +{ + UInt64 fileSize; + int t1, t1n, t2, t2r, t3; + { + CLzmaEncProps lzmaProps = p->lzmaProps; + LzmaEncProps_Normalize(&lzmaProps); + t1n = lzmaProps.numThreads; + } + + t1 = p->lzmaProps.numThreads; + t2 = p->numBlockThreads_Max; + t3 = p->numTotalThreads; + + if (t2 > MTCODER__THREADS_MAX) + t2 = MTCODER__THREADS_MAX; + + if (t3 <= 0) + { + if (t2 <= 0) + t2 = 1; + t3 = t1n * t2; + } + else if (t2 <= 0) + { + t2 = t3 / t1n; + if (t2 == 0) + { + t1 = 1; + t2 = t3; + } + if (t2 > MTCODER__THREADS_MAX) + t2 = MTCODER__THREADS_MAX; + } + else if (t1 <= 0) + { + t1 = t3 / t2; + if (t1 == 0) + t1 = 1; + } + else + t3 = t1n * t2; + + p->lzmaProps.numThreads = t1; + + t2r = t2; + + fileSize = p->lzmaProps.reduceSize; + + if ( p->blockSize != LZMA2_ENC_PROPS__BLOCK_SIZE__SOLID + && p->blockSize != LZMA2_ENC_PROPS__BLOCK_SIZE__AUTO + && (p->blockSize < fileSize || fileSize == (UInt64)(Int64)-1)) + p->lzmaProps.reduceSize = p->blockSize; + + LzmaEncProps_Normalize(&p->lzmaProps); + + p->lzmaProps.reduceSize = fileSize; + + t1 = p->lzmaProps.numThreads; + + if (p->blockSize == LZMA2_ENC_PROPS__BLOCK_SIZE__SOLID) + { + t2r = t2 = 1; + t3 = t1; + } + else if (p->blockSize == LZMA2_ENC_PROPS__BLOCK_SIZE__AUTO && t2 <= 1) + { + /* if there is no block multi-threading, we use SOLID block */ + p->blockSize = LZMA2_ENC_PROPS__BLOCK_SIZE__SOLID; + } + else + { + if (p->blockSize == LZMA2_ENC_PROPS__BLOCK_SIZE__AUTO) + { + const UInt32 kMinSize = (UInt32)1 << 20; + const UInt32 kMaxSize = (UInt32)1 << 28; + const UInt32 dictSize = p->lzmaProps.dictSize; + UInt64 blockSize = (UInt64)dictSize << 2; + if (blockSize < kMinSize) blockSize = kMinSize; + if (blockSize > kMaxSize) blockSize = kMaxSize; + if (blockSize < dictSize) blockSize = dictSize; + blockSize += (kMinSize - 1); + blockSize &= ~(UInt64)(kMinSize - 1); + p->blockSize = blockSize; + } + + if (t2 > 1 && fileSize != (UInt64)(Int64)-1) + { + UInt64 numBlocks = fileSize / p->blockSize; + if (numBlocks * p->blockSize != fileSize) + numBlocks++; + if (numBlocks < (unsigned)t2) + { + t2r = (unsigned)numBlocks; + if (t2r == 0) + t2r = 1; + t3 = t1 * t2r; + } + } + } + + p->numBlockThreads_Max = t2; + p->numBlockThreads_Reduced = t2r; + p->numTotalThreads = t3; +} + + +static SRes Progress(ICompressProgress *p, UInt64 inSize, UInt64 outSize) +{ + return (p && ICompressProgress_Progress(p, inSize, outSize) != SZ_OK) ? SZ_ERROR_PROGRESS : SZ_OK; +} + + +/* ---------- Lzma2 ---------- */ + +typedef struct +{ + Byte propEncoded; + CLzma2EncProps props; + UInt64 expectedDataSize; + + Byte *tempBufLzma; + + ISzAllocPtr alloc; + ISzAllocPtr allocBig; + + CLzma2EncInt coders[MTCODER__THREADS_MAX]; + + #ifndef _7ZIP_ST + + ISeqOutStream *outStream; + Byte *outBuf; + size_t outBuf_Rem; /* remainder in outBuf */ + + size_t outBufSize; /* size of allocated outBufs[i] */ + size_t outBufsDataSizes[MTCODER__BLOCKS_MAX]; + BoolInt mtCoder_WasConstructed; + CMtCoder mtCoder; + Byte *outBufs[MTCODER__BLOCKS_MAX]; + + #endif + +} CLzma2Enc; + + + +CLzma2EncHandle Lzma2Enc_Create(ISzAllocPtr alloc, ISzAllocPtr allocBig) +{ + CLzma2Enc *p = (CLzma2Enc *)ISzAlloc_Alloc(alloc, sizeof(CLzma2Enc)); + if (!p) + return NULL; + Lzma2EncProps_Init(&p->props); + Lzma2EncProps_Normalize(&p->props); + p->expectedDataSize = (UInt64)(Int64)-1; + p->tempBufLzma = NULL; + p->alloc = alloc; + p->allocBig = allocBig; + { + unsigned i; + for (i = 0; i < MTCODER__THREADS_MAX; i++) + p->coders[i].enc = NULL; + } + + #ifndef _7ZIP_ST + p->mtCoder_WasConstructed = False; + { + unsigned i; + for (i = 0; i < MTCODER__BLOCKS_MAX; i++) + p->outBufs[i] = NULL; + p->outBufSize = 0; + } + #endif + + return p; +} + + +#ifndef _7ZIP_ST + +static void Lzma2Enc_FreeOutBufs(CLzma2Enc *p) +{ + unsigned i; + for (i = 0; i < MTCODER__BLOCKS_MAX; i++) + if (p->outBufs[i]) + { + ISzAlloc_Free(p->alloc, p->outBufs[i]); + p->outBufs[i] = NULL; + } + p->outBufSize = 0; +} + +#endif + + +void Lzma2Enc_Destroy(CLzma2EncHandle pp) +{ + CLzma2Enc *p = (CLzma2Enc *)pp; + unsigned i; + for (i = 0; i < MTCODER__THREADS_MAX; i++) + { + CLzma2EncInt *t = &p->coders[i]; + if (t->enc) + { + LzmaEnc_Destroy(t->enc, p->alloc, p->allocBig); + t->enc = NULL; + } + } + + + #ifndef _7ZIP_ST + if (p->mtCoder_WasConstructed) + { + MtCoder_Destruct(&p->mtCoder); + p->mtCoder_WasConstructed = False; + } + Lzma2Enc_FreeOutBufs(p); + #endif + + ISzAlloc_Free(p->alloc, p->tempBufLzma); + p->tempBufLzma = NULL; + + ISzAlloc_Free(p->alloc, pp); +} + + +SRes Lzma2Enc_SetProps(CLzma2EncHandle pp, const CLzma2EncProps *props) +{ + CLzma2Enc *p = (CLzma2Enc *)pp; + CLzmaEncProps lzmaProps = props->lzmaProps; + LzmaEncProps_Normalize(&lzmaProps); + if (lzmaProps.lc + lzmaProps.lp > LZMA2_LCLP_MAX) + return SZ_ERROR_PARAM; + p->props = *props; + Lzma2EncProps_Normalize(&p->props); + return SZ_OK; +} + + +void Lzma2Enc_SetDataSize(CLzmaEncHandle pp, UInt64 expectedDataSiize) +{ + CLzma2Enc *p = (CLzma2Enc *)pp; + p->expectedDataSize = expectedDataSiize; +} + + +Byte Lzma2Enc_WriteProperties(CLzma2EncHandle pp) +{ + CLzma2Enc *p = (CLzma2Enc *)pp; + unsigned i; + UInt32 dicSize = LzmaEncProps_GetDictSize(&p->props.lzmaProps); + for (i = 0; i < 40; i++) + if (dicSize <= LZMA2_DIC_SIZE_FROM_PROP(i)) + break; + return (Byte)i; +} + + +static SRes Lzma2Enc_EncodeMt1( + CLzma2Enc *me, + CLzma2EncInt *p, + ISeqOutStream *outStream, + Byte *outBuf, size_t *outBufSize, + ISeqInStream *inStream, + const Byte *inData, size_t inDataSize, + int finished, + ICompressProgress *progress) +{ + UInt64 unpackTotal = 0; + UInt64 packTotal = 0; + size_t outLim = 0; + CLimitedSeqInStream limitedInStream; + + if (outBuf) + { + outLim = *outBufSize; + *outBufSize = 0; + } + + if (!p->enc) + { + p->propsAreSet = False; + p->enc = LzmaEnc_Create(me->alloc); + if (!p->enc) + return SZ_ERROR_MEM; + } + + limitedInStream.realStream = inStream; + if (inStream) + { + limitedInStream.vt.Read = LimitedSeqInStream_Read; + } + + if (!outBuf) + { + // outStream version works only in one thread. So we use CLzma2Enc::tempBufLzma + if (!me->tempBufLzma) + { + me->tempBufLzma = (Byte *)ISzAlloc_Alloc(me->alloc, LZMA2_CHUNK_SIZE_COMPRESSED_MAX); + if (!me->tempBufLzma) + return SZ_ERROR_MEM; + } + } + + RINOK(Lzma2EncInt_InitStream(p, &me->props)); + + for (;;) + { + SRes res = SZ_OK; + size_t inSizeCur = 0; + + Lzma2EncInt_InitBlock(p); + + LimitedSeqInStream_Init(&limitedInStream); + limitedInStream.limit = me->props.blockSize; + + if (inStream) + { + UInt64 expected = (UInt64)(Int64)-1; + // inStream version works only in one thread. So we use CLzma2Enc::expectedDataSize + if (me->expectedDataSize != (UInt64)(Int64)-1 + && me->expectedDataSize >= unpackTotal) + expected = me->expectedDataSize - unpackTotal; + if (me->props.blockSize != LZMA2_ENC_PROPS__BLOCK_SIZE__SOLID + && expected > me->props.blockSize) + expected = (size_t)me->props.blockSize; + + LzmaEnc_SetDataSize(p->enc, expected); + + RINOK(LzmaEnc_PrepareForLzma2(p->enc, + &limitedInStream.vt, + LZMA2_KEEP_WINDOW_SIZE, + me->alloc, + me->allocBig)); + } + else + { + inSizeCur = inDataSize - (size_t)unpackTotal; + if (me->props.blockSize != LZMA2_ENC_PROPS__BLOCK_SIZE__SOLID + && inSizeCur > me->props.blockSize) + inSizeCur = (size_t)me->props.blockSize; + + // LzmaEnc_SetDataSize(p->enc, inSizeCur); + + RINOK(LzmaEnc_MemPrepare(p->enc, + inData + (size_t)unpackTotal, inSizeCur, + LZMA2_KEEP_WINDOW_SIZE, + me->alloc, + me->allocBig)); + } + + for (;;) + { + size_t packSize = LZMA2_CHUNK_SIZE_COMPRESSED_MAX; + if (outBuf) + packSize = outLim - (size_t)packTotal; + + res = Lzma2EncInt_EncodeSubblock(p, + outBuf ? outBuf + (size_t)packTotal : me->tempBufLzma, &packSize, + outBuf ? NULL : outStream); + + if (res != SZ_OK) + break; + + packTotal += packSize; + if (outBuf) + *outBufSize = (size_t)packTotal; + + res = Progress(progress, unpackTotal + p->srcPos, packTotal); + if (res != SZ_OK) + break; + + /* + if (LzmaEnc_GetNumAvailableBytes(p->enc) == 0) + break; + */ + + if (packSize == 0) + break; + } + + LzmaEnc_Finish(p->enc); + + unpackTotal += p->srcPos; + + RINOK(res); + + if (p->srcPos != (inStream ? limitedInStream.processed : inSizeCur)) + return SZ_ERROR_FAIL; + + if (inStream ? limitedInStream.finished : (unpackTotal == inDataSize)) + { + if (finished) + { + if (outBuf) + { + size_t destPos = *outBufSize; + if (destPos >= outLim) + return SZ_ERROR_OUTPUT_EOF; + outBuf[destPos] = 0; + *outBufSize = destPos + 1; + } + else + { + Byte b = 0; + if (ISeqOutStream_Write(outStream, &b, 1) != 1) + return SZ_ERROR_WRITE; + } + } + return SZ_OK; + } + } +} + + + +#ifndef _7ZIP_ST + +static SRes Lzma2Enc_MtCallback_Code(void *pp, unsigned coderIndex, unsigned outBufIndex, + const Byte *src, size_t srcSize, int finished) +{ + CLzma2Enc *me = (CLzma2Enc *)pp; + size_t destSize = me->outBufSize; + SRes res; + CMtProgressThunk progressThunk; + + Byte *dest = me->outBufs[outBufIndex]; + + me->outBufsDataSizes[outBufIndex] = 0; + + if (!dest) + { + dest = (Byte *)ISzAlloc_Alloc(me->alloc, me->outBufSize); + if (!dest) + return SZ_ERROR_MEM; + me->outBufs[outBufIndex] = dest; + } + + MtProgressThunk_CreateVTable(&progressThunk); + progressThunk.mtProgress = &me->mtCoder.mtProgress; + progressThunk.inSize = 0; + progressThunk.outSize = 0; + + res = Lzma2Enc_EncodeMt1(me, + &me->coders[coderIndex], + NULL, dest, &destSize, + NULL, src, srcSize, + finished, + &progressThunk.vt); + + me->outBufsDataSizes[outBufIndex] = destSize; + + return res; +} + + +static SRes Lzma2Enc_MtCallback_Write(void *pp, unsigned outBufIndex) +{ + CLzma2Enc *me = (CLzma2Enc *)pp; + size_t size = me->outBufsDataSizes[outBufIndex]; + const Byte *data = me->outBufs[outBufIndex]; + + if (me->outStream) + return ISeqOutStream_Write(me->outStream, data, size) == size ? SZ_OK : SZ_ERROR_WRITE; + + if (size > me->outBuf_Rem) + return SZ_ERROR_OUTPUT_EOF; + memcpy(me->outBuf, data, size); + me->outBuf_Rem -= size; + me->outBuf += size; + return SZ_OK; +} + +#endif + + + +SRes Lzma2Enc_Encode2(CLzma2EncHandle pp, + ISeqOutStream *outStream, + Byte *outBuf, size_t *outBufSize, + ISeqInStream *inStream, + const Byte *inData, size_t inDataSize, + ICompressProgress *progress) +{ + CLzma2Enc *p = (CLzma2Enc *)pp; + + if (inStream && inData) + return SZ_ERROR_PARAM; + + if (outStream && outBuf) + return SZ_ERROR_PARAM; + + { + unsigned i; + for (i = 0; i < MTCODER__THREADS_MAX; i++) + p->coders[i].propsAreSet = False; + } + + #ifndef _7ZIP_ST + + if (p->props.numBlockThreads_Reduced > 1) + { + IMtCoderCallback2 vt; + + if (!p->mtCoder_WasConstructed) + { + p->mtCoder_WasConstructed = True; + MtCoder_Construct(&p->mtCoder); + } + + vt.Code = Lzma2Enc_MtCallback_Code; + vt.Write = Lzma2Enc_MtCallback_Write; + + p->outStream = outStream; + p->outBuf = NULL; + p->outBuf_Rem = 0; + if (!outStream) + { + p->outBuf = outBuf; + p->outBuf_Rem = *outBufSize; + *outBufSize = 0; + } + + p->mtCoder.allocBig = p->allocBig; + p->mtCoder.progress = progress; + p->mtCoder.inStream = inStream; + p->mtCoder.inData = inData; + p->mtCoder.inDataSize = inDataSize; + p->mtCoder.mtCallback = &vt; + p->mtCoder.mtCallbackObject = p; + + p->mtCoder.blockSize = (size_t)p->props.blockSize; + if (p->mtCoder.blockSize != p->props.blockSize) + return SZ_ERROR_PARAM; /* SZ_ERROR_MEM */ + + { + size_t destBlockSize = p->mtCoder.blockSize + (p->mtCoder.blockSize >> 10) + 16; + if (destBlockSize < p->mtCoder.blockSize) + return SZ_ERROR_PARAM; + if (p->outBufSize != destBlockSize) + Lzma2Enc_FreeOutBufs(p); + p->outBufSize = destBlockSize; + } + + p->mtCoder.numThreadsMax = p->props.numBlockThreads_Max; + p->mtCoder.expectedDataSize = p->expectedDataSize; + + { + SRes res = MtCoder_Code(&p->mtCoder); + if (!outStream) + *outBufSize = p->outBuf - outBuf; + return res; + } + } + + #endif + + + return Lzma2Enc_EncodeMt1(p, + &p->coders[0], + outStream, outBuf, outBufSize, + inStream, inData, inDataSize, + True, /* finished */ + progress); +} diff --git a/code/nel/3rdparty/seven_zip/Lzma2Enc.h b/code/nel/3rdparty/seven_zip/Lzma2Enc.h new file mode 100644 index 000000000..6a6110ff7 --- /dev/null +++ b/code/nel/3rdparty/seven_zip/Lzma2Enc.h @@ -0,0 +1,55 @@ +/* Lzma2Enc.h -- LZMA2 Encoder +2017-07-27 : Igor Pavlov : Public domain */ + +#ifndef __LZMA2_ENC_H +#define __LZMA2_ENC_H + +#include "LzmaEnc.h" + +EXTERN_C_BEGIN + +#define LZMA2_ENC_PROPS__BLOCK_SIZE__AUTO 0 +#define LZMA2_ENC_PROPS__BLOCK_SIZE__SOLID ((UInt64)(Int64)-1) + +typedef struct +{ + CLzmaEncProps lzmaProps; + UInt64 blockSize; + int numBlockThreads_Reduced; + int numBlockThreads_Max; + int numTotalThreads; +} CLzma2EncProps; + +void Lzma2EncProps_Init(CLzma2EncProps *p); +void Lzma2EncProps_Normalize(CLzma2EncProps *p); + +/* ---------- CLzmaEnc2Handle Interface ---------- */ + +/* Lzma2Enc_* functions can return the following exit codes: +SRes: + SZ_OK - OK + SZ_ERROR_MEM - Memory allocation error + SZ_ERROR_PARAM - Incorrect paramater in props + SZ_ERROR_WRITE - ISeqOutStream write callback error + SZ_ERROR_OUTPUT_EOF - output buffer overflow - version with (Byte *) output + SZ_ERROR_PROGRESS - some break from progress callback + SZ_ERROR_THREAD - error in multithreading functions (only for Mt version) +*/ + +typedef void * CLzma2EncHandle; + +CLzma2EncHandle Lzma2Enc_Create(ISzAllocPtr alloc, ISzAllocPtr allocBig); +void Lzma2Enc_Destroy(CLzma2EncHandle p); +SRes Lzma2Enc_SetProps(CLzma2EncHandle p, const CLzma2EncProps *props); +void Lzma2Enc_SetDataSize(CLzma2EncHandle p, UInt64 expectedDataSiize); +Byte Lzma2Enc_WriteProperties(CLzma2EncHandle p); +SRes Lzma2Enc_Encode2(CLzma2EncHandle p, + ISeqOutStream *outStream, + Byte *outBuf, size_t *outBufSize, + ISeqInStream *inStream, + const Byte *inData, size_t inDataSize, + ICompressProgress *progress); + +EXTERN_C_END + +#endif diff --git a/code/nel/3rdparty/seven_zip/Lzma86.h b/code/nel/3rdparty/seven_zip/Lzma86.h new file mode 100644 index 000000000..bebed5cb7 --- /dev/null +++ b/code/nel/3rdparty/seven_zip/Lzma86.h @@ -0,0 +1,111 @@ +/* Lzma86.h -- LZMA + x86 (BCJ) Filter +2013-01-18 : Igor Pavlov : Public domain */ + +#ifndef __LZMA86_H +#define __LZMA86_H + +#include "7zTypes.h" + +EXTERN_C_BEGIN + +#define LZMA86_SIZE_OFFSET (1 + 5) +#define LZMA86_HEADER_SIZE (LZMA86_SIZE_OFFSET + 8) + +/* +It's an example for LZMA + x86 Filter use. +You can use .lzma86 extension, if you write that stream to file. +.lzma86 header adds one additional byte to standard .lzma header. +.lzma86 header (14 bytes): + Offset Size Description + 0 1 = 0 - no filter, pure LZMA + = 1 - x86 filter + LZMA + 1 1 lc, lp and pb in encoded form + 2 4 dictSize (little endian) + 6 8 uncompressed size (little endian) + + +Lzma86_Encode +------------- +level - compression level: 0 <= level <= 9, the default value for "level" is 5. + +dictSize - The dictionary size in bytes. The maximum value is + 128 MB = (1 << 27) bytes for 32-bit version + 1 GB = (1 << 30) bytes for 64-bit version + The default value is 16 MB = (1 << 24) bytes, for level = 5. + It's recommended to use the dictionary that is larger than 4 KB and + that can be calculated as (1 << N) or (3 << N) sizes. + For better compression ratio dictSize must be >= inSize. + +filterMode: + SZ_FILTER_NO - no Filter + SZ_FILTER_YES - x86 Filter + SZ_FILTER_AUTO - it tries both alternatives to select best. + Encoder will use 2 or 3 passes: + 2 passes when FILTER_NO provides better compression. + 3 passes when FILTER_YES provides better compression. + +Lzma86Encode allocates Data with MyAlloc functions. +RAM Requirements for compressing: + RamSize = dictionarySize * 11.5 + 6MB + FilterBlockSize + filterMode FilterBlockSize + SZ_FILTER_NO 0 + SZ_FILTER_YES inSize + SZ_FILTER_AUTO inSize + + +Return code: + SZ_OK - OK + SZ_ERROR_MEM - Memory allocation error + SZ_ERROR_PARAM - Incorrect paramater + SZ_ERROR_OUTPUT_EOF - output buffer overflow + SZ_ERROR_THREAD - errors in multithreading functions (only for Mt version) +*/ + +enum ESzFilterMode +{ + SZ_FILTER_NO, + SZ_FILTER_YES, + SZ_FILTER_AUTO +}; + +SRes Lzma86_Encode(Byte *dest, size_t *destLen, const Byte *src, size_t srcLen, + int level, UInt32 dictSize, int filterMode); + + +/* +Lzma86_GetUnpackSize: + In: + src - input data + srcLen - input data size + Out: + unpackSize - size of uncompressed stream + Return code: + SZ_OK - OK + SZ_ERROR_INPUT_EOF - Error in headers +*/ + +SRes Lzma86_GetUnpackSize(const Byte *src, SizeT srcLen, UInt64 *unpackSize); + +/* +Lzma86_Decode: + In: + dest - output data + destLen - output data size + src - input data + srcLen - input data size + Out: + destLen - processed output size + srcLen - processed input size + Return code: + SZ_OK - OK + SZ_ERROR_DATA - Data error + SZ_ERROR_MEM - Memory allocation error + SZ_ERROR_UNSUPPORTED - unsupported file + SZ_ERROR_INPUT_EOF - it needs more bytes in input buffer +*/ + +SRes Lzma86_Decode(Byte *dest, SizeT *destLen, const Byte *src, SizeT *srcLen); + +EXTERN_C_END + +#endif diff --git a/code/nel/3rdparty/seven_zip/Lzma86Dec.c b/code/nel/3rdparty/seven_zip/Lzma86Dec.c new file mode 100644 index 000000000..21031745c --- /dev/null +++ b/code/nel/3rdparty/seven_zip/Lzma86Dec.c @@ -0,0 +1,54 @@ +/* Lzma86Dec.c -- LZMA + x86 (BCJ) Filter Decoder +2016-05-16 : Igor Pavlov : Public domain */ + +#include "Precomp.h" + +#include "Lzma86.h" + +#include "Alloc.h" +#include "Bra.h" +#include "LzmaDec.h" + +SRes Lzma86_GetUnpackSize(const Byte *src, SizeT srcLen, UInt64 *unpackSize) +{ + unsigned i; + if (srcLen < LZMA86_HEADER_SIZE) + return SZ_ERROR_INPUT_EOF; + *unpackSize = 0; + for (i = 0; i < sizeof(UInt64); i++) + *unpackSize += ((UInt64)src[LZMA86_SIZE_OFFSET + i]) << (8 * i); + return SZ_OK; +} + +SRes Lzma86_Decode(Byte *dest, SizeT *destLen, const Byte *src, SizeT *srcLen) +{ + SRes res; + int useFilter; + SizeT inSizePure; + ELzmaStatus status; + + if (*srcLen < LZMA86_HEADER_SIZE) + return SZ_ERROR_INPUT_EOF; + + useFilter = src[0]; + + if (useFilter > 1) + { + *destLen = 0; + return SZ_ERROR_UNSUPPORTED; + } + + inSizePure = *srcLen - LZMA86_HEADER_SIZE; + res = LzmaDecode(dest, destLen, src + LZMA86_HEADER_SIZE, &inSizePure, + src + 1, LZMA_PROPS_SIZE, LZMA_FINISH_ANY, &status, &g_Alloc); + *srcLen = inSizePure + LZMA86_HEADER_SIZE; + if (res != SZ_OK) + return res; + if (useFilter == 1) + { + UInt32 x86State; + x86_Convert_Init(x86State); + x86_Convert(dest, *destLen, 0, &x86State, 0); + } + return SZ_OK; +} diff --git a/code/nel/3rdparty/seven_zip/Lzma86Enc.c b/code/nel/3rdparty/seven_zip/Lzma86Enc.c new file mode 100644 index 000000000..2617bab8e --- /dev/null +++ b/code/nel/3rdparty/seven_zip/Lzma86Enc.c @@ -0,0 +1,106 @@ +/* Lzma86Enc.c -- LZMA + x86 (BCJ) Filter Encoder +2018-07-04 : Igor Pavlov : Public domain */ + +#include "Precomp.h" + +#include + +#include "Lzma86.h" + +#include "Alloc.h" +#include "Bra.h" +#include "LzmaEnc.h" + +#define SZE_OUT_OVERFLOW SZE_DATA_ERROR + +int Lzma86_Encode(Byte *dest, size_t *destLen, const Byte *src, size_t srcLen, + int level, UInt32 dictSize, int filterMode) +{ + size_t outSize2 = *destLen; + Byte *filteredStream; + BoolInt useFilter; + int mainResult = SZ_ERROR_OUTPUT_EOF; + CLzmaEncProps props; + LzmaEncProps_Init(&props); + props.level = level; + props.dictSize = dictSize; + + *destLen = 0; + if (outSize2 < LZMA86_HEADER_SIZE) + return SZ_ERROR_OUTPUT_EOF; + + { + int i; + UInt64 t = srcLen; + for (i = 0; i < 8; i++, t >>= 8) + dest[LZMA86_SIZE_OFFSET + i] = (Byte)t; + } + + filteredStream = 0; + useFilter = (filterMode != SZ_FILTER_NO); + if (useFilter) + { + if (srcLen != 0) + { + filteredStream = (Byte *)MyAlloc(srcLen); + if (filteredStream == 0) + return SZ_ERROR_MEM; + memcpy(filteredStream, src, srcLen); + } + { + UInt32 x86State; + x86_Convert_Init(x86State); + x86_Convert(filteredStream, srcLen, 0, &x86State, 1); + } + } + + { + size_t minSize = 0; + BoolInt bestIsFiltered = False; + + /* passes for SZ_FILTER_AUTO: + 0 - BCJ + LZMA + 1 - LZMA + 2 - BCJ + LZMA agaian, if pass 0 (BCJ + LZMA) is better. + */ + int numPasses = (filterMode == SZ_FILTER_AUTO) ? 3 : 1; + + int i; + for (i = 0; i < numPasses; i++) + { + size_t outSizeProcessed = outSize2 - LZMA86_HEADER_SIZE; + size_t outPropsSize = 5; + SRes curRes; + BoolInt curModeIsFiltered = (numPasses > 1 && i == numPasses - 1); + if (curModeIsFiltered && !bestIsFiltered) + break; + if (useFilter && i == 0) + curModeIsFiltered = True; + + curRes = LzmaEncode(dest + LZMA86_HEADER_SIZE, &outSizeProcessed, + curModeIsFiltered ? filteredStream : src, srcLen, + &props, dest + 1, &outPropsSize, 0, + NULL, &g_Alloc, &g_Alloc); + + if (curRes != SZ_ERROR_OUTPUT_EOF) + { + if (curRes != SZ_OK) + { + mainResult = curRes; + break; + } + if (outSizeProcessed <= minSize || mainResult != SZ_OK) + { + minSize = outSizeProcessed; + bestIsFiltered = curModeIsFiltered; + mainResult = SZ_OK; + } + } + } + dest[0] = (Byte)(bestIsFiltered ? 1 : 0); + *destLen = LZMA86_HEADER_SIZE + minSize; + } + if (useFilter) + MyFree(filteredStream); + return mainResult; +} diff --git a/code/nel/3rdparty/seven_zip/LzmaDec.c b/code/nel/3rdparty/seven_zip/LzmaDec.c new file mode 100644 index 000000000..ba3e1dd50 --- /dev/null +++ b/code/nel/3rdparty/seven_zip/LzmaDec.c @@ -0,0 +1,1185 @@ +/* LzmaDec.c -- LZMA Decoder +2018-07-04 : Igor Pavlov : Public domain */ + +#include "Precomp.h" + +#include + +/* #include "CpuArch.h" */ +#include "LzmaDec.h" + +#define kNumTopBits 24 +#define kTopValue ((UInt32)1 << kNumTopBits) + +#define kNumBitModelTotalBits 11 +#define kBitModelTotal (1 << kNumBitModelTotalBits) +#define kNumMoveBits 5 + +#define RC_INIT_SIZE 5 + +#define NORMALIZE if (range < kTopValue) { range <<= 8; code = (code << 8) | (*buf++); } + +#define IF_BIT_0(p) ttt = *(p); NORMALIZE; bound = (range >> kNumBitModelTotalBits) * (UInt32)ttt; if (code < bound) +#define UPDATE_0(p) range = bound; *(p) = (CLzmaProb)(ttt + ((kBitModelTotal - ttt) >> kNumMoveBits)); +#define UPDATE_1(p) range -= bound; code -= bound; *(p) = (CLzmaProb)(ttt - (ttt >> kNumMoveBits)); +#define GET_BIT2(p, i, A0, A1) IF_BIT_0(p) \ + { UPDATE_0(p); i = (i + i); A0; } else \ + { UPDATE_1(p); i = (i + i) + 1; A1; } + +#define TREE_GET_BIT(probs, i) { GET_BIT2(probs + i, i, ;, ;); } + +#define REV_BIT(p, i, A0, A1) IF_BIT_0(p + i) \ + { UPDATE_0(p + i); A0; } else \ + { UPDATE_1(p + i); A1; } +#define REV_BIT_VAR( p, i, m) REV_BIT(p, i, i += m; m += m, m += m; i += m; ) +#define REV_BIT_CONST(p, i, m) REV_BIT(p, i, i += m; , i += m * 2; ) +#define REV_BIT_LAST( p, i, m) REV_BIT(p, i, i -= m , ; ) + +#define TREE_DECODE(probs, limit, i) \ + { i = 1; do { TREE_GET_BIT(probs, i); } while (i < limit); i -= limit; } + +/* #define _LZMA_SIZE_OPT */ + +#ifdef _LZMA_SIZE_OPT +#define TREE_6_DECODE(probs, i) TREE_DECODE(probs, (1 << 6), i) +#else +#define TREE_6_DECODE(probs, i) \ + { i = 1; \ + TREE_GET_BIT(probs, i); \ + TREE_GET_BIT(probs, i); \ + TREE_GET_BIT(probs, i); \ + TREE_GET_BIT(probs, i); \ + TREE_GET_BIT(probs, i); \ + TREE_GET_BIT(probs, i); \ + i -= 0x40; } +#endif + +#define NORMAL_LITER_DEC TREE_GET_BIT(prob, symbol) +#define MATCHED_LITER_DEC \ + matchByte += matchByte; \ + bit = offs; \ + offs &= matchByte; \ + probLit = prob + (offs + bit + symbol); \ + GET_BIT2(probLit, symbol, offs ^= bit; , ;) + + + +#define NORMALIZE_CHECK if (range < kTopValue) { if (buf >= bufLimit) return DUMMY_ERROR; range <<= 8; code = (code << 8) | (*buf++); } + +#define IF_BIT_0_CHECK(p) ttt = *(p); NORMALIZE_CHECK; bound = (range >> kNumBitModelTotalBits) * (UInt32)ttt; if (code < bound) +#define UPDATE_0_CHECK range = bound; +#define UPDATE_1_CHECK range -= bound; code -= bound; +#define GET_BIT2_CHECK(p, i, A0, A1) IF_BIT_0_CHECK(p) \ + { UPDATE_0_CHECK; i = (i + i); A0; } else \ + { UPDATE_1_CHECK; i = (i + i) + 1; A1; } +#define GET_BIT_CHECK(p, i) GET_BIT2_CHECK(p, i, ; , ;) +#define TREE_DECODE_CHECK(probs, limit, i) \ + { i = 1; do { GET_BIT_CHECK(probs + i, i) } while (i < limit); i -= limit; } + + +#define REV_BIT_CHECK(p, i, m) IF_BIT_0_CHECK(p + i) \ + { UPDATE_0_CHECK; i += m; m += m; } else \ + { UPDATE_1_CHECK; m += m; i += m; } + + +#define kNumPosBitsMax 4 +#define kNumPosStatesMax (1 << kNumPosBitsMax) + +#define kLenNumLowBits 3 +#define kLenNumLowSymbols (1 << kLenNumLowBits) +#define kLenNumHighBits 8 +#define kLenNumHighSymbols (1 << kLenNumHighBits) + +#define LenLow 0 +#define LenHigh (LenLow + 2 * (kNumPosStatesMax << kLenNumLowBits)) +#define kNumLenProbs (LenHigh + kLenNumHighSymbols) + +#define LenChoice LenLow +#define LenChoice2 (LenLow + (1 << kLenNumLowBits)) + +#define kNumStates 12 +#define kNumStates2 16 +#define kNumLitStates 7 + +#define kStartPosModelIndex 4 +#define kEndPosModelIndex 14 +#define kNumFullDistances (1 << (kEndPosModelIndex >> 1)) + +#define kNumPosSlotBits 6 +#define kNumLenToPosStates 4 + +#define kNumAlignBits 4 +#define kAlignTableSize (1 << kNumAlignBits) + +#define kMatchMinLen 2 +#define kMatchSpecLenStart (kMatchMinLen + kLenNumLowSymbols * 2 + kLenNumHighSymbols) + +/* External ASM code needs same CLzmaProb array layout. So don't change it. */ + +/* (probs_1664) is faster and better for code size at some platforms */ +/* +#ifdef MY_CPU_X86_OR_AMD64 +*/ +#define kStartOffset 1664 +#define GET_PROBS p->probs_1664 +/* +#define GET_PROBS p->probs + kStartOffset +#else +#define kStartOffset 0 +#define GET_PROBS p->probs +#endif +*/ + +#define SpecPos (-kStartOffset) +#define IsRep0Long (SpecPos + kNumFullDistances) +#define RepLenCoder (IsRep0Long + (kNumStates2 << kNumPosBitsMax)) +#define LenCoder (RepLenCoder + kNumLenProbs) +#define IsMatch (LenCoder + kNumLenProbs) +#define Align (IsMatch + (kNumStates2 << kNumPosBitsMax)) +#define IsRep (Align + kAlignTableSize) +#define IsRepG0 (IsRep + kNumStates) +#define IsRepG1 (IsRepG0 + kNumStates) +#define IsRepG2 (IsRepG1 + kNumStates) +#define PosSlot (IsRepG2 + kNumStates) +#define Literal (PosSlot + (kNumLenToPosStates << kNumPosSlotBits)) +#define NUM_BASE_PROBS (Literal + kStartOffset) + +#if Align != 0 && kStartOffset != 0 + #error Stop_Compiling_Bad_LZMA_kAlign +#endif + +#if NUM_BASE_PROBS != 1984 + #error Stop_Compiling_Bad_LZMA_PROBS +#endif + + +#define LZMA_LIT_SIZE 0x300 + +#define LzmaProps_GetNumProbs(p) (NUM_BASE_PROBS + ((UInt32)LZMA_LIT_SIZE << ((p)->lc + (p)->lp))) + + +#define CALC_POS_STATE(processedPos, pbMask) (((processedPos) & (pbMask)) << 4) +#define COMBINED_PS_STATE (posState + state) +#define GET_LEN_STATE (posState) + +#define LZMA_DIC_MIN (1 << 12) + +/* +p->remainLen : shows status of LZMA decoder: + < kMatchSpecLenStart : normal remain + = kMatchSpecLenStart : finished + = kMatchSpecLenStart + 1 : need init range coder + = kMatchSpecLenStart + 2 : need init range coder and state +*/ + +/* ---------- LZMA_DECODE_REAL ---------- */ +/* +LzmaDec_DecodeReal_3() can be implemented in external ASM file. +3 - is the code compatibility version of that function for check at link time. +*/ + +#define LZMA_DECODE_REAL LzmaDec_DecodeReal_3 + +/* +LZMA_DECODE_REAL() +In: + RangeCoder is normalized + if (p->dicPos == limit) + { + LzmaDec_TryDummy() was called before to exclude LITERAL and MATCH-REP cases. + So first symbol can be only MATCH-NON-REP. And if that MATCH-NON-REP symbol + is not END_OF_PAYALOAD_MARKER, then function returns error code. + } + +Processing: + first LZMA symbol will be decoded in any case + All checks for limits are at the end of main loop, + It will decode new LZMA-symbols while (p->buf < bufLimit && dicPos < limit), + RangeCoder is still without last normalization when (p->buf < bufLimit) is being checked. + +Out: + RangeCoder is normalized + Result: + SZ_OK - OK + SZ_ERROR_DATA - Error + p->remainLen: + < kMatchSpecLenStart : normal remain + = kMatchSpecLenStart : finished +*/ + + +#ifdef _LZMA_DEC_OPT + +int MY_FAST_CALL LZMA_DECODE_REAL(CLzmaDec *p, SizeT limit, const Byte *bufLimit); + +#else + +static +int MY_FAST_CALL LZMA_DECODE_REAL(CLzmaDec *p, SizeT limit, const Byte *bufLimit) +{ + CLzmaProb *probs = GET_PROBS; + unsigned state = (unsigned)p->state; + UInt32 rep0 = p->reps[0], rep1 = p->reps[1], rep2 = p->reps[2], rep3 = p->reps[3]; + unsigned pbMask = ((unsigned)1 << (p->prop.pb)) - 1; + unsigned lc = p->prop.lc; + unsigned lpMask = ((unsigned)0x100 << p->prop.lp) - ((unsigned)0x100 >> lc); + + Byte *dic = p->dic; + SizeT dicBufSize = p->dicBufSize; + SizeT dicPos = p->dicPos; + + UInt32 processedPos = p->processedPos; + UInt32 checkDicSize = p->checkDicSize; + unsigned len = 0; + + const Byte *buf = p->buf; + UInt32 range = p->range; + UInt32 code = p->code; + + do + { + CLzmaProb *prob; + UInt32 bound; + unsigned ttt; + unsigned posState = CALC_POS_STATE(processedPos, pbMask); + + prob = probs + IsMatch + COMBINED_PS_STATE; + IF_BIT_0(prob) + { + unsigned symbol; + UPDATE_0(prob); + prob = probs + Literal; + if (processedPos != 0 || checkDicSize != 0) + prob += (UInt32)3 * ((((processedPos << 8) + dic[(dicPos == 0 ? dicBufSize : dicPos) - 1]) & lpMask) << lc); + processedPos++; + + if (state < kNumLitStates) + { + state -= (state < 4) ? state : 3; + symbol = 1; + #ifdef _LZMA_SIZE_OPT + do { NORMAL_LITER_DEC } while (symbol < 0x100); + #else + NORMAL_LITER_DEC + NORMAL_LITER_DEC + NORMAL_LITER_DEC + NORMAL_LITER_DEC + NORMAL_LITER_DEC + NORMAL_LITER_DEC + NORMAL_LITER_DEC + NORMAL_LITER_DEC + #endif + } + else + { + unsigned matchByte = dic[dicPos - rep0 + (dicPos < rep0 ? dicBufSize : 0)]; + unsigned offs = 0x100; + state -= (state < 10) ? 3 : 6; + symbol = 1; + #ifdef _LZMA_SIZE_OPT + do + { + unsigned bit; + CLzmaProb *probLit; + MATCHED_LITER_DEC + } + while (symbol < 0x100); + #else + { + unsigned bit; + CLzmaProb *probLit; + MATCHED_LITER_DEC + MATCHED_LITER_DEC + MATCHED_LITER_DEC + MATCHED_LITER_DEC + MATCHED_LITER_DEC + MATCHED_LITER_DEC + MATCHED_LITER_DEC + MATCHED_LITER_DEC + } + #endif + } + + dic[dicPos++] = (Byte)symbol; + continue; + } + + { + UPDATE_1(prob); + prob = probs + IsRep + state; + IF_BIT_0(prob) + { + UPDATE_0(prob); + state += kNumStates; + prob = probs + LenCoder; + } + else + { + UPDATE_1(prob); + /* + // that case was checked before with kBadRepCode + if (checkDicSize == 0 && processedPos == 0) + return SZ_ERROR_DATA; + */ + prob = probs + IsRepG0 + state; + IF_BIT_0(prob) + { + UPDATE_0(prob); + prob = probs + IsRep0Long + COMBINED_PS_STATE; + IF_BIT_0(prob) + { + UPDATE_0(prob); + dic[dicPos] = dic[dicPos - rep0 + (dicPos < rep0 ? dicBufSize : 0)]; + dicPos++; + processedPos++; + state = state < kNumLitStates ? 9 : 11; + continue; + } + UPDATE_1(prob); + } + else + { + UInt32 distance; + UPDATE_1(prob); + prob = probs + IsRepG1 + state; + IF_BIT_0(prob) + { + UPDATE_0(prob); + distance = rep1; + } + else + { + UPDATE_1(prob); + prob = probs + IsRepG2 + state; + IF_BIT_0(prob) + { + UPDATE_0(prob); + distance = rep2; + } + else + { + UPDATE_1(prob); + distance = rep3; + rep3 = rep2; + } + rep2 = rep1; + } + rep1 = rep0; + rep0 = distance; + } + state = state < kNumLitStates ? 8 : 11; + prob = probs + RepLenCoder; + } + + #ifdef _LZMA_SIZE_OPT + { + unsigned lim, offset; + CLzmaProb *probLen = prob + LenChoice; + IF_BIT_0(probLen) + { + UPDATE_0(probLen); + probLen = prob + LenLow + GET_LEN_STATE; + offset = 0; + lim = (1 << kLenNumLowBits); + } + else + { + UPDATE_1(probLen); + probLen = prob + LenChoice2; + IF_BIT_0(probLen) + { + UPDATE_0(probLen); + probLen = prob + LenLow + GET_LEN_STATE + (1 << kLenNumLowBits); + offset = kLenNumLowSymbols; + lim = (1 << kLenNumLowBits); + } + else + { + UPDATE_1(probLen); + probLen = prob + LenHigh; + offset = kLenNumLowSymbols * 2; + lim = (1 << kLenNumHighBits); + } + } + TREE_DECODE(probLen, lim, len); + len += offset; + } + #else + { + CLzmaProb *probLen = prob + LenChoice; + IF_BIT_0(probLen) + { + UPDATE_0(probLen); + probLen = prob + LenLow + GET_LEN_STATE; + len = 1; + TREE_GET_BIT(probLen, len); + TREE_GET_BIT(probLen, len); + TREE_GET_BIT(probLen, len); + len -= 8; + } + else + { + UPDATE_1(probLen); + probLen = prob + LenChoice2; + IF_BIT_0(probLen) + { + UPDATE_0(probLen); + probLen = prob + LenLow + GET_LEN_STATE + (1 << kLenNumLowBits); + len = 1; + TREE_GET_BIT(probLen, len); + TREE_GET_BIT(probLen, len); + TREE_GET_BIT(probLen, len); + } + else + { + UPDATE_1(probLen); + probLen = prob + LenHigh; + TREE_DECODE(probLen, (1 << kLenNumHighBits), len); + len += kLenNumLowSymbols * 2; + } + } + } + #endif + + if (state >= kNumStates) + { + UInt32 distance; + prob = probs + PosSlot + + ((len < kNumLenToPosStates ? len : kNumLenToPosStates - 1) << kNumPosSlotBits); + TREE_6_DECODE(prob, distance); + if (distance >= kStartPosModelIndex) + { + unsigned posSlot = (unsigned)distance; + unsigned numDirectBits = (unsigned)(((distance >> 1) - 1)); + distance = (2 | (distance & 1)); + if (posSlot < kEndPosModelIndex) + { + distance <<= numDirectBits; + prob = probs + SpecPos; + { + UInt32 m = 1; + distance++; + do + { + REV_BIT_VAR(prob, distance, m); + } + while (--numDirectBits); + distance -= m; + } + } + else + { + numDirectBits -= kNumAlignBits; + do + { + NORMALIZE + range >>= 1; + + { + UInt32 t; + code -= range; + t = (0 - ((UInt32)code >> 31)); /* (UInt32)((Int32)code >> 31) */ + distance = (distance << 1) + (t + 1); + code += range & t; + } + /* + distance <<= 1; + if (code >= range) + { + code -= range; + distance |= 1; + } + */ + } + while (--numDirectBits); + prob = probs + Align; + distance <<= kNumAlignBits; + { + unsigned i = 1; + REV_BIT_CONST(prob, i, 1); + REV_BIT_CONST(prob, i, 2); + REV_BIT_CONST(prob, i, 4); + REV_BIT_LAST (prob, i, 8); + distance |= i; + } + if (distance == (UInt32)0xFFFFFFFF) + { + len = kMatchSpecLenStart; + state -= kNumStates; + break; + } + } + } + + rep3 = rep2; + rep2 = rep1; + rep1 = rep0; + rep0 = distance + 1; + state = (state < kNumStates + kNumLitStates) ? kNumLitStates : kNumLitStates + 3; + if (distance >= (checkDicSize == 0 ? processedPos: checkDicSize)) + { + p->dicPos = dicPos; + return SZ_ERROR_DATA; + } + } + + len += kMatchMinLen; + + { + SizeT rem; + unsigned curLen; + SizeT pos; + + if ((rem = limit - dicPos) == 0) + { + p->dicPos = dicPos; + return SZ_ERROR_DATA; + } + + curLen = ((rem < len) ? (unsigned)rem : len); + pos = dicPos - rep0 + (dicPos < rep0 ? dicBufSize : 0); + + processedPos += (UInt32)curLen; + + len -= curLen; + if (curLen <= dicBufSize - pos) + { + Byte *dest = dic + dicPos; + ptrdiff_t src = (ptrdiff_t)pos - (ptrdiff_t)dicPos; + const Byte *lim = dest + curLen; + dicPos += (SizeT)curLen; + do + *(dest) = (Byte)*(dest + src); + while (++dest != lim); + } + else + { + do + { + dic[dicPos++] = dic[pos]; + if (++pos == dicBufSize) + pos = 0; + } + while (--curLen != 0); + } + } + } + } + while (dicPos < limit && buf < bufLimit); + + NORMALIZE; + + p->buf = buf; + p->range = range; + p->code = code; + p->remainLen = (UInt32)len; + p->dicPos = dicPos; + p->processedPos = processedPos; + p->reps[0] = rep0; + p->reps[1] = rep1; + p->reps[2] = rep2; + p->reps[3] = rep3; + p->state = (UInt32)state; + + return SZ_OK; +} +#endif + +static void MY_FAST_CALL LzmaDec_WriteRem(CLzmaDec *p, SizeT limit) +{ + if (p->remainLen != 0 && p->remainLen < kMatchSpecLenStart) + { + Byte *dic = p->dic; + SizeT dicPos = p->dicPos; + SizeT dicBufSize = p->dicBufSize; + unsigned len = (unsigned)p->remainLen; + SizeT rep0 = p->reps[0]; /* we use SizeT to avoid the BUG of VC14 for AMD64 */ + SizeT rem = limit - dicPos; + if (rem < len) + len = (unsigned)(rem); + + if (p->checkDicSize == 0 && p->prop.dicSize - p->processedPos <= len) + p->checkDicSize = p->prop.dicSize; + + p->processedPos += (UInt32)len; + p->remainLen -= (UInt32)len; + while (len != 0) + { + len--; + dic[dicPos] = dic[dicPos - rep0 + (dicPos < rep0 ? dicBufSize : 0)]; + dicPos++; + } + p->dicPos = dicPos; + } +} + + +#define kRange0 0xFFFFFFFF +#define kBound0 ((kRange0 >> kNumBitModelTotalBits) << (kNumBitModelTotalBits - 1)) +#define kBadRepCode (kBound0 + (((kRange0 - kBound0) >> kNumBitModelTotalBits) << (kNumBitModelTotalBits - 1))) +#if kBadRepCode != (0xC0000000 - 0x400) + #error Stop_Compiling_Bad_LZMA_Check +#endif + +static int MY_FAST_CALL LzmaDec_DecodeReal2(CLzmaDec *p, SizeT limit, const Byte *bufLimit) +{ + do + { + SizeT limit2 = limit; + if (p->checkDicSize == 0) + { + UInt32 rem = p->prop.dicSize - p->processedPos; + if (limit - p->dicPos > rem) + limit2 = p->dicPos + rem; + + if (p->processedPos == 0) + if (p->code >= kBadRepCode) + return SZ_ERROR_DATA; + } + + RINOK(LZMA_DECODE_REAL(p, limit2, bufLimit)); + + if (p->checkDicSize == 0 && p->processedPos >= p->prop.dicSize) + p->checkDicSize = p->prop.dicSize; + + LzmaDec_WriteRem(p, limit); + } + while (p->dicPos < limit && p->buf < bufLimit && p->remainLen < kMatchSpecLenStart); + + return 0; +} + +typedef enum +{ + DUMMY_ERROR, /* unexpected end of input stream */ + DUMMY_LIT, + DUMMY_MATCH, + DUMMY_REP +} ELzmaDummy; + +static ELzmaDummy LzmaDec_TryDummy(const CLzmaDec *p, const Byte *buf, SizeT inSize) +{ + UInt32 range = p->range; + UInt32 code = p->code; + const Byte *bufLimit = buf + inSize; + const CLzmaProb *probs = GET_PROBS; + unsigned state = (unsigned)p->state; + ELzmaDummy res; + + { + const CLzmaProb *prob; + UInt32 bound; + unsigned ttt; + unsigned posState = CALC_POS_STATE(p->processedPos, (1 << p->prop.pb) - 1); + + prob = probs + IsMatch + COMBINED_PS_STATE; + IF_BIT_0_CHECK(prob) + { + UPDATE_0_CHECK + + /* if (bufLimit - buf >= 7) return DUMMY_LIT; */ + + prob = probs + Literal; + if (p->checkDicSize != 0 || p->processedPos != 0) + prob += ((UInt32)LZMA_LIT_SIZE * + ((((p->processedPos) & ((1 << (p->prop.lp)) - 1)) << p->prop.lc) + + (p->dic[(p->dicPos == 0 ? p->dicBufSize : p->dicPos) - 1] >> (8 - p->prop.lc)))); + + if (state < kNumLitStates) + { + unsigned symbol = 1; + do { GET_BIT_CHECK(prob + symbol, symbol) } while (symbol < 0x100); + } + else + { + unsigned matchByte = p->dic[p->dicPos - p->reps[0] + + (p->dicPos < p->reps[0] ? p->dicBufSize : 0)]; + unsigned offs = 0x100; + unsigned symbol = 1; + do + { + unsigned bit; + const CLzmaProb *probLit; + matchByte += matchByte; + bit = offs; + offs &= matchByte; + probLit = prob + (offs + bit + symbol); + GET_BIT2_CHECK(probLit, symbol, offs ^= bit; , ; ) + } + while (symbol < 0x100); + } + res = DUMMY_LIT; + } + else + { + unsigned len; + UPDATE_1_CHECK; + + prob = probs + IsRep + state; + IF_BIT_0_CHECK(prob) + { + UPDATE_0_CHECK; + state = 0; + prob = probs + LenCoder; + res = DUMMY_MATCH; + } + else + { + UPDATE_1_CHECK; + res = DUMMY_REP; + prob = probs + IsRepG0 + state; + IF_BIT_0_CHECK(prob) + { + UPDATE_0_CHECK; + prob = probs + IsRep0Long + COMBINED_PS_STATE; + IF_BIT_0_CHECK(prob) + { + UPDATE_0_CHECK; + NORMALIZE_CHECK; + return DUMMY_REP; + } + else + { + UPDATE_1_CHECK; + } + } + else + { + UPDATE_1_CHECK; + prob = probs + IsRepG1 + state; + IF_BIT_0_CHECK(prob) + { + UPDATE_0_CHECK; + } + else + { + UPDATE_1_CHECK; + prob = probs + IsRepG2 + state; + IF_BIT_0_CHECK(prob) + { + UPDATE_0_CHECK; + } + else + { + UPDATE_1_CHECK; + } + } + } + state = kNumStates; + prob = probs + RepLenCoder; + } + { + unsigned limit, offset; + const CLzmaProb *probLen = prob + LenChoice; + IF_BIT_0_CHECK(probLen) + { + UPDATE_0_CHECK; + probLen = prob + LenLow + GET_LEN_STATE; + offset = 0; + limit = 1 << kLenNumLowBits; + } + else + { + UPDATE_1_CHECK; + probLen = prob + LenChoice2; + IF_BIT_0_CHECK(probLen) + { + UPDATE_0_CHECK; + probLen = prob + LenLow + GET_LEN_STATE + (1 << kLenNumLowBits); + offset = kLenNumLowSymbols; + limit = 1 << kLenNumLowBits; + } + else + { + UPDATE_1_CHECK; + probLen = prob + LenHigh; + offset = kLenNumLowSymbols * 2; + limit = 1 << kLenNumHighBits; + } + } + TREE_DECODE_CHECK(probLen, limit, len); + len += offset; + } + + if (state < 4) + { + unsigned posSlot; + prob = probs + PosSlot + + ((len < kNumLenToPosStates - 1 ? len : kNumLenToPosStates - 1) << + kNumPosSlotBits); + TREE_DECODE_CHECK(prob, 1 << kNumPosSlotBits, posSlot); + if (posSlot >= kStartPosModelIndex) + { + unsigned numDirectBits = ((posSlot >> 1) - 1); + + /* if (bufLimit - buf >= 8) return DUMMY_MATCH; */ + + if (posSlot < kEndPosModelIndex) + { + prob = probs + SpecPos + ((2 | (posSlot & 1)) << numDirectBits); + } + else + { + numDirectBits -= kNumAlignBits; + do + { + NORMALIZE_CHECK + range >>= 1; + code -= range & (((code - range) >> 31) - 1); + /* if (code >= range) code -= range; */ + } + while (--numDirectBits); + prob = probs + Align; + numDirectBits = kNumAlignBits; + } + { + unsigned i = 1; + unsigned m = 1; + do + { + REV_BIT_CHECK(prob, i, m); + } + while (--numDirectBits); + } + } + } + } + } + NORMALIZE_CHECK; + return res; +} + + +void LzmaDec_InitDicAndState(CLzmaDec *p, BoolInt initDic, BoolInt initState) +{ + p->remainLen = kMatchSpecLenStart + 1; + p->tempBufSize = 0; + + if (initDic) + { + p->processedPos = 0; + p->checkDicSize = 0; + p->remainLen = kMatchSpecLenStart + 2; + } + if (initState) + p->remainLen = kMatchSpecLenStart + 2; +} + +void LzmaDec_Init(CLzmaDec *p) +{ + p->dicPos = 0; + LzmaDec_InitDicAndState(p, True, True); +} + + +SRes LzmaDec_DecodeToDic(CLzmaDec *p, SizeT dicLimit, const Byte *src, SizeT *srcLen, + ELzmaFinishMode finishMode, ELzmaStatus *status) +{ + SizeT inSize = *srcLen; + (*srcLen) = 0; + + *status = LZMA_STATUS_NOT_SPECIFIED; + + if (p->remainLen > kMatchSpecLenStart) + { + for (; inSize > 0 && p->tempBufSize < RC_INIT_SIZE; (*srcLen)++, inSize--) + p->tempBuf[p->tempBufSize++] = *src++; + if (p->tempBufSize != 0 && p->tempBuf[0] != 0) + return SZ_ERROR_DATA; + if (p->tempBufSize < RC_INIT_SIZE) + { + *status = LZMA_STATUS_NEEDS_MORE_INPUT; + return SZ_OK; + } + p->code = + ((UInt32)p->tempBuf[1] << 24) + | ((UInt32)p->tempBuf[2] << 16) + | ((UInt32)p->tempBuf[3] << 8) + | ((UInt32)p->tempBuf[4]); + p->range = 0xFFFFFFFF; + p->tempBufSize = 0; + + if (p->remainLen > kMatchSpecLenStart + 1) + { + SizeT numProbs = LzmaProps_GetNumProbs(&p->prop); + SizeT i; + CLzmaProb *probs = p->probs; + for (i = 0; i < numProbs; i++) + probs[i] = kBitModelTotal >> 1; + p->reps[0] = p->reps[1] = p->reps[2] = p->reps[3] = 1; + p->state = 0; + } + + p->remainLen = 0; + } + + LzmaDec_WriteRem(p, dicLimit); + + while (p->remainLen != kMatchSpecLenStart) + { + int checkEndMarkNow = 0; + + if (p->dicPos >= dicLimit) + { + if (p->remainLen == 0 && p->code == 0) + { + *status = LZMA_STATUS_MAYBE_FINISHED_WITHOUT_MARK; + return SZ_OK; + } + if (finishMode == LZMA_FINISH_ANY) + { + *status = LZMA_STATUS_NOT_FINISHED; + return SZ_OK; + } + if (p->remainLen != 0) + { + *status = LZMA_STATUS_NOT_FINISHED; + return SZ_ERROR_DATA; + } + checkEndMarkNow = 1; + } + + if (p->tempBufSize == 0) + { + SizeT processed; + const Byte *bufLimit; + if (inSize < LZMA_REQUIRED_INPUT_MAX || checkEndMarkNow) + { + int dummyRes = LzmaDec_TryDummy(p, src, inSize); + if (dummyRes == DUMMY_ERROR) + { + memcpy(p->tempBuf, src, inSize); + p->tempBufSize = (unsigned)inSize; + (*srcLen) += inSize; + *status = LZMA_STATUS_NEEDS_MORE_INPUT; + return SZ_OK; + } + if (checkEndMarkNow && dummyRes != DUMMY_MATCH) + { + *status = LZMA_STATUS_NOT_FINISHED; + return SZ_ERROR_DATA; + } + bufLimit = src; + } + else + bufLimit = src + inSize - LZMA_REQUIRED_INPUT_MAX; + p->buf = src; + if (LzmaDec_DecodeReal2(p, dicLimit, bufLimit) != 0) + return SZ_ERROR_DATA; + processed = (SizeT)(p->buf - src); + (*srcLen) += processed; + src += processed; + inSize -= processed; + } + else + { + unsigned rem = p->tempBufSize, lookAhead = 0; + while (rem < LZMA_REQUIRED_INPUT_MAX && lookAhead < inSize) + p->tempBuf[rem++] = src[lookAhead++]; + p->tempBufSize = rem; + if (rem < LZMA_REQUIRED_INPUT_MAX || checkEndMarkNow) + { + int dummyRes = LzmaDec_TryDummy(p, p->tempBuf, (SizeT)rem); + if (dummyRes == DUMMY_ERROR) + { + (*srcLen) += (SizeT)lookAhead; + *status = LZMA_STATUS_NEEDS_MORE_INPUT; + return SZ_OK; + } + if (checkEndMarkNow && dummyRes != DUMMY_MATCH) + { + *status = LZMA_STATUS_NOT_FINISHED; + return SZ_ERROR_DATA; + } + } + p->buf = p->tempBuf; + if (LzmaDec_DecodeReal2(p, dicLimit, p->buf) != 0) + return SZ_ERROR_DATA; + + { + unsigned kkk = (unsigned)(p->buf - p->tempBuf); + if (rem < kkk) + return SZ_ERROR_FAIL; /* some internal error */ + rem -= kkk; + if (lookAhead < rem) + return SZ_ERROR_FAIL; /* some internal error */ + lookAhead -= rem; + } + (*srcLen) += (SizeT)lookAhead; + src += lookAhead; + inSize -= (SizeT)lookAhead; + p->tempBufSize = 0; + } + } + + if (p->code != 0) + return SZ_ERROR_DATA; + *status = LZMA_STATUS_FINISHED_WITH_MARK; + return SZ_OK; +} + + +SRes LzmaDec_DecodeToBuf(CLzmaDec *p, Byte *dest, SizeT *destLen, const Byte *src, SizeT *srcLen, ELzmaFinishMode finishMode, ELzmaStatus *status) +{ + SizeT outSize = *destLen; + SizeT inSize = *srcLen; + *srcLen = *destLen = 0; + for (;;) + { + SizeT inSizeCur = inSize, outSizeCur, dicPos; + ELzmaFinishMode curFinishMode; + SRes res; + if (p->dicPos == p->dicBufSize) + p->dicPos = 0; + dicPos = p->dicPos; + if (outSize > p->dicBufSize - dicPos) + { + outSizeCur = p->dicBufSize; + curFinishMode = LZMA_FINISH_ANY; + } + else + { + outSizeCur = dicPos + outSize; + curFinishMode = finishMode; + } + + res = LzmaDec_DecodeToDic(p, outSizeCur, src, &inSizeCur, curFinishMode, status); + src += inSizeCur; + inSize -= inSizeCur; + *srcLen += inSizeCur; + outSizeCur = p->dicPos - dicPos; + memcpy(dest, p->dic + dicPos, outSizeCur); + dest += outSizeCur; + outSize -= outSizeCur; + *destLen += outSizeCur; + if (res != 0) + return res; + if (outSizeCur == 0 || outSize == 0) + return SZ_OK; + } +} + +void LzmaDec_FreeProbs(CLzmaDec *p, ISzAllocPtr alloc) +{ + ISzAlloc_Free(alloc, p->probs); + p->probs = NULL; +} + +static void LzmaDec_FreeDict(CLzmaDec *p, ISzAllocPtr alloc) +{ + ISzAlloc_Free(alloc, p->dic); + p->dic = NULL; +} + +void LzmaDec_Free(CLzmaDec *p, ISzAllocPtr alloc) +{ + LzmaDec_FreeProbs(p, alloc); + LzmaDec_FreeDict(p, alloc); +} + +SRes LzmaProps_Decode(CLzmaProps *p, const Byte *data, unsigned size) +{ + UInt32 dicSize; + Byte d; + + if (size < LZMA_PROPS_SIZE) + return SZ_ERROR_UNSUPPORTED; + else + dicSize = data[1] | ((UInt32)data[2] << 8) | ((UInt32)data[3] << 16) | ((UInt32)data[4] << 24); + + if (dicSize < LZMA_DIC_MIN) + dicSize = LZMA_DIC_MIN; + p->dicSize = dicSize; + + d = data[0]; + if (d >= (9 * 5 * 5)) + return SZ_ERROR_UNSUPPORTED; + + p->lc = (Byte)(d % 9); + d /= 9; + p->pb = (Byte)(d / 5); + p->lp = (Byte)(d % 5); + + return SZ_OK; +} + +static SRes LzmaDec_AllocateProbs2(CLzmaDec *p, const CLzmaProps *propNew, ISzAllocPtr alloc) +{ + UInt32 numProbs = LzmaProps_GetNumProbs(propNew); + if (!p->probs || numProbs != p->numProbs) + { + LzmaDec_FreeProbs(p, alloc); + p->probs = (CLzmaProb *)ISzAlloc_Alloc(alloc, numProbs * sizeof(CLzmaProb)); + if (!p->probs) + return SZ_ERROR_MEM; + p->probs_1664 = p->probs + 1664; + p->numProbs = numProbs; + } + return SZ_OK; +} + +SRes LzmaDec_AllocateProbs(CLzmaDec *p, const Byte *props, unsigned propsSize, ISzAllocPtr alloc) +{ + CLzmaProps propNew; + RINOK(LzmaProps_Decode(&propNew, props, propsSize)); + RINOK(LzmaDec_AllocateProbs2(p, &propNew, alloc)); + p->prop = propNew; + return SZ_OK; +} + +SRes LzmaDec_Allocate(CLzmaDec *p, const Byte *props, unsigned propsSize, ISzAllocPtr alloc) +{ + CLzmaProps propNew; + SizeT dicBufSize; + RINOK(LzmaProps_Decode(&propNew, props, propsSize)); + RINOK(LzmaDec_AllocateProbs2(p, &propNew, alloc)); + + { + UInt32 dictSize = propNew.dicSize; + SizeT mask = ((UInt32)1 << 12) - 1; + if (dictSize >= ((UInt32)1 << 30)) mask = ((UInt32)1 << 22) - 1; + else if (dictSize >= ((UInt32)1 << 22)) mask = ((UInt32)1 << 20) - 1;; + dicBufSize = ((SizeT)dictSize + mask) & ~mask; + if (dicBufSize < dictSize) + dicBufSize = dictSize; + } + + if (!p->dic || dicBufSize != p->dicBufSize) + { + LzmaDec_FreeDict(p, alloc); + p->dic = (Byte *)ISzAlloc_Alloc(alloc, dicBufSize); + if (!p->dic) + { + LzmaDec_FreeProbs(p, alloc); + return SZ_ERROR_MEM; + } + } + p->dicBufSize = dicBufSize; + p->prop = propNew; + return SZ_OK; +} + +SRes LzmaDecode(Byte *dest, SizeT *destLen, const Byte *src, SizeT *srcLen, + const Byte *propData, unsigned propSize, ELzmaFinishMode finishMode, + ELzmaStatus *status, ISzAllocPtr alloc) +{ + CLzmaDec p; + SRes res; + SizeT outSize = *destLen, inSize = *srcLen; + *destLen = *srcLen = 0; + *status = LZMA_STATUS_NOT_SPECIFIED; + if (inSize < RC_INIT_SIZE) + return SZ_ERROR_INPUT_EOF; + LzmaDec_Construct(&p); + RINOK(LzmaDec_AllocateProbs(&p, propData, propSize, alloc)); + p.dic = dest; + p.dicBufSize = outSize; + LzmaDec_Init(&p); + *srcLen = inSize; + res = LzmaDec_DecodeToDic(&p, outSize, src, srcLen, finishMode, status); + *destLen = p.dicPos; + if (res == SZ_OK && *status == LZMA_STATUS_NEEDS_MORE_INPUT) + res = SZ_ERROR_INPUT_EOF; + LzmaDec_FreeProbs(&p, alloc); + return res; +} diff --git a/code/nel/3rdparty/seven_zip/LzmaDec.h b/code/nel/3rdparty/seven_zip/LzmaDec.h new file mode 100644 index 000000000..1f0927ab1 --- /dev/null +++ b/code/nel/3rdparty/seven_zip/LzmaDec.h @@ -0,0 +1,234 @@ +/* LzmaDec.h -- LZMA Decoder +2018-04-21 : Igor Pavlov : Public domain */ + +#ifndef __LZMA_DEC_H +#define __LZMA_DEC_H + +#include "7zTypes.h" + +EXTERN_C_BEGIN + +/* #define _LZMA_PROB32 */ +/* _LZMA_PROB32 can increase the speed on some CPUs, + but memory usage for CLzmaDec::probs will be doubled in that case */ + +typedef +#ifdef _LZMA_PROB32 + UInt32 +#else + UInt16 +#endif + CLzmaProb; + + +/* ---------- LZMA Properties ---------- */ + +#define LZMA_PROPS_SIZE 5 + +typedef struct _CLzmaProps +{ + Byte lc; + Byte lp; + Byte pb; + Byte _pad_; + UInt32 dicSize; +} CLzmaProps; + +/* LzmaProps_Decode - decodes properties +Returns: + SZ_OK + SZ_ERROR_UNSUPPORTED - Unsupported properties +*/ + +SRes LzmaProps_Decode(CLzmaProps *p, const Byte *data, unsigned size); + + +/* ---------- LZMA Decoder state ---------- */ + +/* LZMA_REQUIRED_INPUT_MAX = number of required input bytes for worst case. + Num bits = log2((2^11 / 31) ^ 22) + 26 < 134 + 26 = 160; */ + +#define LZMA_REQUIRED_INPUT_MAX 20 + +typedef struct +{ + /* Don't change this structure. ASM code can use it. */ + CLzmaProps prop; + CLzmaProb *probs; + CLzmaProb *probs_1664; + Byte *dic; + SizeT dicBufSize; + SizeT dicPos; + const Byte *buf; + UInt32 range; + UInt32 code; + UInt32 processedPos; + UInt32 checkDicSize; + UInt32 reps[4]; + UInt32 state; + UInt32 remainLen; + + UInt32 numProbs; + unsigned tempBufSize; + Byte tempBuf[LZMA_REQUIRED_INPUT_MAX]; +} CLzmaDec; + +#define LzmaDec_Construct(p) { (p)->dic = NULL; (p)->probs = NULL; } + +void LzmaDec_Init(CLzmaDec *p); + +/* There are two types of LZMA streams: + - Stream with end mark. That end mark adds about 6 bytes to compressed size. + - Stream without end mark. You must know exact uncompressed size to decompress such stream. */ + +typedef enum +{ + LZMA_FINISH_ANY, /* finish at any point */ + LZMA_FINISH_END /* block must be finished at the end */ +} ELzmaFinishMode; + +/* ELzmaFinishMode has meaning only if the decoding reaches output limit !!! + + You must use LZMA_FINISH_END, when you know that current output buffer + covers last bytes of block. In other cases you must use LZMA_FINISH_ANY. + + If LZMA decoder sees end marker before reaching output limit, it returns SZ_OK, + and output value of destLen will be less than output buffer size limit. + You can check status result also. + + You can use multiple checks to test data integrity after full decompression: + 1) Check Result and "status" variable. + 2) Check that output(destLen) = uncompressedSize, if you know real uncompressedSize. + 3) Check that output(srcLen) = compressedSize, if you know real compressedSize. + You must use correct finish mode in that case. */ + +typedef enum +{ + LZMA_STATUS_NOT_SPECIFIED, /* use main error code instead */ + LZMA_STATUS_FINISHED_WITH_MARK, /* stream was finished with end mark. */ + LZMA_STATUS_NOT_FINISHED, /* stream was not finished */ + LZMA_STATUS_NEEDS_MORE_INPUT, /* you must provide more input bytes */ + LZMA_STATUS_MAYBE_FINISHED_WITHOUT_MARK /* there is probability that stream was finished without end mark */ +} ELzmaStatus; + +/* ELzmaStatus is used only as output value for function call */ + + +/* ---------- Interfaces ---------- */ + +/* There are 3 levels of interfaces: + 1) Dictionary Interface + 2) Buffer Interface + 3) One Call Interface + You can select any of these interfaces, but don't mix functions from different + groups for same object. */ + + +/* There are two variants to allocate state for Dictionary Interface: + 1) LzmaDec_Allocate / LzmaDec_Free + 2) LzmaDec_AllocateProbs / LzmaDec_FreeProbs + You can use variant 2, if you set dictionary buffer manually. + For Buffer Interface you must always use variant 1. + +LzmaDec_Allocate* can return: + SZ_OK + SZ_ERROR_MEM - Memory allocation error + SZ_ERROR_UNSUPPORTED - Unsupported properties +*/ + +SRes LzmaDec_AllocateProbs(CLzmaDec *p, const Byte *props, unsigned propsSize, ISzAllocPtr alloc); +void LzmaDec_FreeProbs(CLzmaDec *p, ISzAllocPtr alloc); + +SRes LzmaDec_Allocate(CLzmaDec *p, const Byte *props, unsigned propsSize, ISzAllocPtr alloc); +void LzmaDec_Free(CLzmaDec *p, ISzAllocPtr alloc); + +/* ---------- Dictionary Interface ---------- */ + +/* You can use it, if you want to eliminate the overhead for data copying from + dictionary to some other external buffer. + You must work with CLzmaDec variables directly in this interface. + + STEPS: + LzmaDec_Construct() + LzmaDec_Allocate() + for (each new stream) + { + LzmaDec_Init() + while (it needs more decompression) + { + LzmaDec_DecodeToDic() + use data from CLzmaDec::dic and update CLzmaDec::dicPos + } + } + LzmaDec_Free() +*/ + +/* LzmaDec_DecodeToDic + + The decoding to internal dictionary buffer (CLzmaDec::dic). + You must manually update CLzmaDec::dicPos, if it reaches CLzmaDec::dicBufSize !!! + +finishMode: + It has meaning only if the decoding reaches output limit (dicLimit). + LZMA_FINISH_ANY - Decode just dicLimit bytes. + LZMA_FINISH_END - Stream must be finished after dicLimit. + +Returns: + SZ_OK + status: + LZMA_STATUS_FINISHED_WITH_MARK + LZMA_STATUS_NOT_FINISHED + LZMA_STATUS_NEEDS_MORE_INPUT + LZMA_STATUS_MAYBE_FINISHED_WITHOUT_MARK + SZ_ERROR_DATA - Data error +*/ + +SRes LzmaDec_DecodeToDic(CLzmaDec *p, SizeT dicLimit, + const Byte *src, SizeT *srcLen, ELzmaFinishMode finishMode, ELzmaStatus *status); + + +/* ---------- Buffer Interface ---------- */ + +/* It's zlib-like interface. + See LzmaDec_DecodeToDic description for information about STEPS and return results, + but you must use LzmaDec_DecodeToBuf instead of LzmaDec_DecodeToDic and you don't need + to work with CLzmaDec variables manually. + +finishMode: + It has meaning only if the decoding reaches output limit (*destLen). + LZMA_FINISH_ANY - Decode just destLen bytes. + LZMA_FINISH_END - Stream must be finished after (*destLen). +*/ + +SRes LzmaDec_DecodeToBuf(CLzmaDec *p, Byte *dest, SizeT *destLen, + const Byte *src, SizeT *srcLen, ELzmaFinishMode finishMode, ELzmaStatus *status); + + +/* ---------- One Call Interface ---------- */ + +/* LzmaDecode + +finishMode: + It has meaning only if the decoding reaches output limit (*destLen). + LZMA_FINISH_ANY - Decode just destLen bytes. + LZMA_FINISH_END - Stream must be finished after (*destLen). + +Returns: + SZ_OK + status: + LZMA_STATUS_FINISHED_WITH_MARK + LZMA_STATUS_NOT_FINISHED + LZMA_STATUS_MAYBE_FINISHED_WITHOUT_MARK + SZ_ERROR_DATA - Data error + SZ_ERROR_MEM - Memory allocation error + SZ_ERROR_UNSUPPORTED - Unsupported properties + SZ_ERROR_INPUT_EOF - It needs more bytes in input buffer (src). +*/ + +SRes LzmaDecode(Byte *dest, SizeT *destLen, const Byte *src, SizeT *srcLen, + const Byte *propData, unsigned propSize, ELzmaFinishMode finishMode, + ELzmaStatus *status, ISzAllocPtr alloc); + +EXTERN_C_END + +#endif diff --git a/code/nel/3rdparty/seven_zip/LzmaEnc.c b/code/nel/3rdparty/seven_zip/LzmaEnc.c new file mode 100644 index 000000000..46a0db000 --- /dev/null +++ b/code/nel/3rdparty/seven_zip/LzmaEnc.c @@ -0,0 +1,2976 @@ +/* LzmaEnc.c -- LZMA Encoder +2019-01-10: Igor Pavlov : Public domain */ + +#include "Precomp.h" + +#include + +/* #define SHOW_STAT */ +/* #define SHOW_STAT2 */ + +#if defined(SHOW_STAT) || defined(SHOW_STAT2) +#include +#endif + +#include "LzmaEnc.h" + +#include "LzFind.h" +#ifndef _7ZIP_ST +#include "LzFindMt.h" +#endif + +#ifdef SHOW_STAT +static unsigned g_STAT_OFFSET = 0; +#endif + +#define kLzmaMaxHistorySize ((UInt32)3 << 29) +/* #define kLzmaMaxHistorySize ((UInt32)7 << 29) */ + +#define kNumTopBits 24 +#define kTopValue ((UInt32)1 << kNumTopBits) + +#define kNumBitModelTotalBits 11 +#define kBitModelTotal (1 << kNumBitModelTotalBits) +#define kNumMoveBits 5 +#define kProbInitValue (kBitModelTotal >> 1) + +#define kNumMoveReducingBits 4 +#define kNumBitPriceShiftBits 4 +#define kBitPrice (1 << kNumBitPriceShiftBits) + +#define REP_LEN_COUNT 64 + +void LzmaEncProps_Init(CLzmaEncProps *p) +{ + p->level = 5; + p->dictSize = p->mc = 0; + p->reduceSize = (UInt64)(Int64)-1; + p->lc = p->lp = p->pb = p->algo = p->fb = p->btMode = p->numHashBytes = p->numThreads = -1; + p->writeEndMark = 0; +} + +void LzmaEncProps_Normalize(CLzmaEncProps *p) +{ + int level = p->level; + if (level < 0) level = 5; + p->level = level; + + if (p->dictSize == 0) p->dictSize = (level <= 5 ? (1 << (level * 2 + 14)) : (level <= 7 ? (1 << 25) : (1 << 26))); + if (p->dictSize > p->reduceSize) + { + unsigned i; + UInt32 reduceSize = (UInt32)p->reduceSize; + for (i = 11; i <= 30; i++) + { + if (reduceSize <= ((UInt32)2 << i)) { p->dictSize = ((UInt32)2 << i); break; } + if (reduceSize <= ((UInt32)3 << i)) { p->dictSize = ((UInt32)3 << i); break; } + } + } + + if (p->lc < 0) p->lc = 3; + if (p->lp < 0) p->lp = 0; + if (p->pb < 0) p->pb = 2; + + if (p->algo < 0) p->algo = (level < 5 ? 0 : 1); + if (p->fb < 0) p->fb = (level < 7 ? 32 : 64); + if (p->btMode < 0) p->btMode = (p->algo == 0 ? 0 : 1); + if (p->numHashBytes < 0) p->numHashBytes = 4; + if (p->mc == 0) p->mc = (16 + (p->fb >> 1)) >> (p->btMode ? 0 : 1); + + if (p->numThreads < 0) + p->numThreads = + #ifndef _7ZIP_ST + ((p->btMode && p->algo) ? 2 : 1); + #else + 1; + #endif +} + +UInt32 LzmaEncProps_GetDictSize(const CLzmaEncProps *props2) +{ + CLzmaEncProps props = *props2; + LzmaEncProps_Normalize(&props); + return props.dictSize; +} + +#if (_MSC_VER >= 1400) +/* BSR code is fast for some new CPUs */ +/* #define LZMA_LOG_BSR */ +#endif + +#ifdef LZMA_LOG_BSR + +#define kDicLogSizeMaxCompress 32 + +#define BSR2_RET(pos, res) { unsigned long zz; _BitScanReverse(&zz, (pos)); res = (zz + zz) + ((pos >> (zz - 1)) & 1); } + +static unsigned GetPosSlot1(UInt32 pos) +{ + unsigned res; + BSR2_RET(pos, res); + return res; +} +#define GetPosSlot2(pos, res) { BSR2_RET(pos, res); } +#define GetPosSlot(pos, res) { if (pos < 2) res = pos; else BSR2_RET(pos, res); } + +#else + +#define kNumLogBits (9 + sizeof(size_t) / 2) +/* #define kNumLogBits (11 + sizeof(size_t) / 8 * 3) */ + +#define kDicLogSizeMaxCompress ((kNumLogBits - 1) * 2 + 7) + +static void LzmaEnc_FastPosInit(Byte *g_FastPos) +{ + unsigned slot; + g_FastPos[0] = 0; + g_FastPos[1] = 1; + g_FastPos += 2; + + for (slot = 2; slot < kNumLogBits * 2; slot++) + { + size_t k = ((size_t)1 << ((slot >> 1) - 1)); + size_t j; + for (j = 0; j < k; j++) + g_FastPos[j] = (Byte)slot; + g_FastPos += k; + } +} + +/* we can use ((limit - pos) >> 31) only if (pos < ((UInt32)1 << 31)) */ +/* +#define BSR2_RET(pos, res) { unsigned zz = 6 + ((kNumLogBits - 1) & \ + (0 - (((((UInt32)1 << (kNumLogBits + 6)) - 1) - pos) >> 31))); \ + res = p->g_FastPos[pos >> zz] + (zz * 2); } +*/ + +/* +#define BSR2_RET(pos, res) { unsigned zz = 6 + ((kNumLogBits - 1) & \ + (0 - (((((UInt32)1 << (kNumLogBits)) - 1) - (pos >> 6)) >> 31))); \ + res = p->g_FastPos[pos >> zz] + (zz * 2); } +*/ + +#define BSR2_RET(pos, res) { unsigned zz = (pos < (1 << (kNumLogBits + 6))) ? 6 : 6 + kNumLogBits - 1; \ + res = p->g_FastPos[pos >> zz] + (zz * 2); } + +/* +#define BSR2_RET(pos, res) { res = (pos < (1 << (kNumLogBits + 6))) ? \ + p->g_FastPos[pos >> 6] + 12 : \ + p->g_FastPos[pos >> (6 + kNumLogBits - 1)] + (6 + (kNumLogBits - 1)) * 2; } +*/ + +#define GetPosSlot1(pos) p->g_FastPos[pos] +#define GetPosSlot2(pos, res) { BSR2_RET(pos, res); } +#define GetPosSlot(pos, res) { if (pos < kNumFullDistances) res = p->g_FastPos[pos & (kNumFullDistances - 1)]; else BSR2_RET(pos, res); } + +#endif + + +#define LZMA_NUM_REPS 4 + +typedef UInt16 CState; +typedef UInt16 CExtra; + +typedef struct +{ + UInt32 price; + CState state; + CExtra extra; + // 0 : normal + // 1 : LIT : MATCH + // > 1 : MATCH (extra-1) : LIT : REP0 (len) + UInt32 len; + UInt32 dist; + UInt32 reps[LZMA_NUM_REPS]; +} COptimal; + + +// 18.06 +#define kNumOpts (1 << 11) +#define kPackReserve (kNumOpts * 8) +// #define kNumOpts (1 << 12) +// #define kPackReserve (1 + kNumOpts * 2) + +#define kNumLenToPosStates 4 +#define kNumPosSlotBits 6 +#define kDicLogSizeMin 0 +#define kDicLogSizeMax 32 +#define kDistTableSizeMax (kDicLogSizeMax * 2) + +#define kNumAlignBits 4 +#define kAlignTableSize (1 << kNumAlignBits) +#define kAlignMask (kAlignTableSize - 1) + +#define kStartPosModelIndex 4 +#define kEndPosModelIndex 14 +#define kNumFullDistances (1 << (kEndPosModelIndex >> 1)) + +typedef +#ifdef _LZMA_PROB32 + UInt32 +#else + UInt16 +#endif + CLzmaProb; + +#define LZMA_PB_MAX 4 +#define LZMA_LC_MAX 8 +#define LZMA_LP_MAX 4 + +#define LZMA_NUM_PB_STATES_MAX (1 << LZMA_PB_MAX) + +#define kLenNumLowBits 3 +#define kLenNumLowSymbols (1 << kLenNumLowBits) +#define kLenNumHighBits 8 +#define kLenNumHighSymbols (1 << kLenNumHighBits) +#define kLenNumSymbolsTotal (kLenNumLowSymbols * 2 + kLenNumHighSymbols) + +#define LZMA_MATCH_LEN_MIN 2 +#define LZMA_MATCH_LEN_MAX (LZMA_MATCH_LEN_MIN + kLenNumSymbolsTotal - 1) + +#define kNumStates 12 + + +typedef struct +{ + CLzmaProb low[LZMA_NUM_PB_STATES_MAX << (kLenNumLowBits + 1)]; + CLzmaProb high[kLenNumHighSymbols]; +} CLenEnc; + + +typedef struct +{ + unsigned tableSize; + UInt32 prices[LZMA_NUM_PB_STATES_MAX][kLenNumSymbolsTotal]; + // UInt32 prices1[LZMA_NUM_PB_STATES_MAX][kLenNumLowSymbols * 2]; + // UInt32 prices2[kLenNumSymbolsTotal]; +} CLenPriceEnc; + +#define GET_PRICE_LEN(p, posState, len) \ + ((p)->prices[posState][(size_t)(len) - LZMA_MATCH_LEN_MIN]) + +/* +#define GET_PRICE_LEN(p, posState, len) \ + ((p)->prices2[(size_t)(len) - 2] + ((p)->prices1[posState][((len) - 2) & (kLenNumLowSymbols * 2 - 1)] & (((len) - 2 - kLenNumLowSymbols * 2) >> 9))) +*/ + +typedef struct +{ + UInt32 range; + unsigned cache; + UInt64 low; + UInt64 cacheSize; + Byte *buf; + Byte *bufLim; + Byte *bufBase; + ISeqOutStream *outStream; + UInt64 processed; + SRes res; +} CRangeEnc; + + +typedef struct +{ + CLzmaProb *litProbs; + + unsigned state; + UInt32 reps[LZMA_NUM_REPS]; + + CLzmaProb posAlignEncoder[1 << kNumAlignBits]; + CLzmaProb isRep[kNumStates]; + CLzmaProb isRepG0[kNumStates]; + CLzmaProb isRepG1[kNumStates]; + CLzmaProb isRepG2[kNumStates]; + CLzmaProb isMatch[kNumStates][LZMA_NUM_PB_STATES_MAX]; + CLzmaProb isRep0Long[kNumStates][LZMA_NUM_PB_STATES_MAX]; + + CLzmaProb posSlotEncoder[kNumLenToPosStates][1 << kNumPosSlotBits]; + CLzmaProb posEncoders[kNumFullDistances]; + + CLenEnc lenProbs; + CLenEnc repLenProbs; + +} CSaveState; + + +typedef UInt32 CProbPrice; + + +typedef struct +{ + void *matchFinderObj; + IMatchFinder matchFinder; + + unsigned optCur; + unsigned optEnd; + + unsigned longestMatchLen; + unsigned numPairs; + UInt32 numAvail; + + unsigned state; + unsigned numFastBytes; + unsigned additionalOffset; + UInt32 reps[LZMA_NUM_REPS]; + unsigned lpMask, pbMask; + CLzmaProb *litProbs; + CRangeEnc rc; + + UInt32 backRes; + + unsigned lc, lp, pb; + unsigned lclp; + + BoolInt fastMode; + BoolInt writeEndMark; + BoolInt finished; + BoolInt multiThread; + BoolInt needInit; + // BoolInt _maxMode; + + UInt64 nowPos64; + + unsigned matchPriceCount; + // unsigned alignPriceCount; + int repLenEncCounter; + + unsigned distTableSize; + + UInt32 dictSize; + SRes result; + + #ifndef _7ZIP_ST + BoolInt mtMode; + // begin of CMatchFinderMt is used in LZ thread + CMatchFinderMt matchFinderMt; + // end of CMatchFinderMt is used in BT and HASH threads + #endif + + CMatchFinder matchFinderBase; + + #ifndef _7ZIP_ST + Byte pad[128]; + #endif + + // LZ thread + CProbPrice ProbPrices[kBitModelTotal >> kNumMoveReducingBits]; + + UInt32 matches[LZMA_MATCH_LEN_MAX * 2 + 2 + 1]; + + UInt32 alignPrices[kAlignTableSize]; + UInt32 posSlotPrices[kNumLenToPosStates][kDistTableSizeMax]; + UInt32 distancesPrices[kNumLenToPosStates][kNumFullDistances]; + + CLzmaProb posAlignEncoder[1 << kNumAlignBits]; + CLzmaProb isRep[kNumStates]; + CLzmaProb isRepG0[kNumStates]; + CLzmaProb isRepG1[kNumStates]; + CLzmaProb isRepG2[kNumStates]; + CLzmaProb isMatch[kNumStates][LZMA_NUM_PB_STATES_MAX]; + CLzmaProb isRep0Long[kNumStates][LZMA_NUM_PB_STATES_MAX]; + CLzmaProb posSlotEncoder[kNumLenToPosStates][1 << kNumPosSlotBits]; + CLzmaProb posEncoders[kNumFullDistances]; + + CLenEnc lenProbs; + CLenEnc repLenProbs; + + #ifndef LZMA_LOG_BSR + Byte g_FastPos[1 << kNumLogBits]; + #endif + + CLenPriceEnc lenEnc; + CLenPriceEnc repLenEnc; + + COptimal opt[kNumOpts]; + + CSaveState saveState; + + #ifndef _7ZIP_ST + Byte pad2[128]; + #endif +} CLzmaEnc; + + + +#define COPY_ARR(dest, src, arr) memcpy(dest->arr, src->arr, sizeof(src->arr)); + +void LzmaEnc_SaveState(CLzmaEncHandle pp) +{ + CLzmaEnc *p = (CLzmaEnc *)pp; + CSaveState *dest = &p->saveState; + + dest->state = p->state; + + dest->lenProbs = p->lenProbs; + dest->repLenProbs = p->repLenProbs; + + COPY_ARR(dest, p, reps); + + COPY_ARR(dest, p, posAlignEncoder); + COPY_ARR(dest, p, isRep); + COPY_ARR(dest, p, isRepG0); + COPY_ARR(dest, p, isRepG1); + COPY_ARR(dest, p, isRepG2); + COPY_ARR(dest, p, isMatch); + COPY_ARR(dest, p, isRep0Long); + COPY_ARR(dest, p, posSlotEncoder); + COPY_ARR(dest, p, posEncoders); + + memcpy(dest->litProbs, p->litProbs, ((UInt32)0x300 << p->lclp) * sizeof(CLzmaProb)); +} + + +void LzmaEnc_RestoreState(CLzmaEncHandle pp) +{ + CLzmaEnc *dest = (CLzmaEnc *)pp; + const CSaveState *p = &dest->saveState; + + dest->state = p->state; + + dest->lenProbs = p->lenProbs; + dest->repLenProbs = p->repLenProbs; + + COPY_ARR(dest, p, reps); + + COPY_ARR(dest, p, posAlignEncoder); + COPY_ARR(dest, p, isRep); + COPY_ARR(dest, p, isRepG0); + COPY_ARR(dest, p, isRepG1); + COPY_ARR(dest, p, isRepG2); + COPY_ARR(dest, p, isMatch); + COPY_ARR(dest, p, isRep0Long); + COPY_ARR(dest, p, posSlotEncoder); + COPY_ARR(dest, p, posEncoders); + + memcpy(dest->litProbs, p->litProbs, ((UInt32)0x300 << dest->lclp) * sizeof(CLzmaProb)); +} + + + +SRes LzmaEnc_SetProps(CLzmaEncHandle pp, const CLzmaEncProps *props2) +{ + CLzmaEnc *p = (CLzmaEnc *)pp; + CLzmaEncProps props = *props2; + LzmaEncProps_Normalize(&props); + + if (props.lc > LZMA_LC_MAX + || props.lp > LZMA_LP_MAX + || props.pb > LZMA_PB_MAX + || props.dictSize > ((UInt64)1 << kDicLogSizeMaxCompress) + || props.dictSize > kLzmaMaxHistorySize) + return SZ_ERROR_PARAM; + + p->dictSize = props.dictSize; + { + unsigned fb = props.fb; + if (fb < 5) + fb = 5; + if (fb > LZMA_MATCH_LEN_MAX) + fb = LZMA_MATCH_LEN_MAX; + p->numFastBytes = fb; + } + p->lc = props.lc; + p->lp = props.lp; + p->pb = props.pb; + p->fastMode = (props.algo == 0); + // p->_maxMode = True; + p->matchFinderBase.btMode = (Byte)(props.btMode ? 1 : 0); + { + unsigned numHashBytes = 4; + if (props.btMode) + { + if (props.numHashBytes < 2) + numHashBytes = 2; + else if (props.numHashBytes < 4) + numHashBytes = props.numHashBytes; + } + p->matchFinderBase.numHashBytes = numHashBytes; + } + + p->matchFinderBase.cutValue = props.mc; + + p->writeEndMark = props.writeEndMark; + + #ifndef _7ZIP_ST + /* + if (newMultiThread != _multiThread) + { + ReleaseMatchFinder(); + _multiThread = newMultiThread; + } + */ + p->multiThread = (props.numThreads > 1); + #endif + + return SZ_OK; +} + + +void LzmaEnc_SetDataSize(CLzmaEncHandle pp, UInt64 expectedDataSiize) +{ + CLzmaEnc *p = (CLzmaEnc *)pp; + p->matchFinderBase.expectedDataSize = expectedDataSiize; +} + + +#define kState_Start 0 +#define kState_LitAfterMatch 4 +#define kState_LitAfterRep 5 +#define kState_MatchAfterLit 7 +#define kState_RepAfterLit 8 + +static const Byte kLiteralNextStates[kNumStates] = {0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 4, 5}; +static const Byte kMatchNextStates[kNumStates] = {7, 7, 7, 7, 7, 7, 7, 10, 10, 10, 10, 10}; +static const Byte kRepNextStates[kNumStates] = {8, 8, 8, 8, 8, 8, 8, 11, 11, 11, 11, 11}; +static const Byte kShortRepNextStates[kNumStates]= {9, 9, 9, 9, 9, 9, 9, 11, 11, 11, 11, 11}; + +#define IsLitState(s) ((s) < 7) +#define GetLenToPosState2(len) (((len) < kNumLenToPosStates - 1) ? (len) : kNumLenToPosStates - 1) +#define GetLenToPosState(len) (((len) < kNumLenToPosStates + 1) ? (len) - 2 : kNumLenToPosStates - 1) + +#define kInfinityPrice (1 << 30) + +static void RangeEnc_Construct(CRangeEnc *p) +{ + p->outStream = NULL; + p->bufBase = NULL; +} + +#define RangeEnc_GetProcessed(p) ((p)->processed + ((p)->buf - (p)->bufBase) + (p)->cacheSize) +#define RangeEnc_GetProcessed_sizet(p) ((size_t)(p)->processed + ((p)->buf - (p)->bufBase) + (size_t)(p)->cacheSize) + +#define RC_BUF_SIZE (1 << 16) + +static int RangeEnc_Alloc(CRangeEnc *p, ISzAllocPtr alloc) +{ + if (!p->bufBase) + { + p->bufBase = (Byte *)ISzAlloc_Alloc(alloc, RC_BUF_SIZE); + if (!p->bufBase) + return 0; + p->bufLim = p->bufBase + RC_BUF_SIZE; + } + return 1; +} + +static void RangeEnc_Free(CRangeEnc *p, ISzAllocPtr alloc) +{ + ISzAlloc_Free(alloc, p->bufBase); + p->bufBase = 0; +} + +static void RangeEnc_Init(CRangeEnc *p) +{ + /* Stream.Init(); */ + p->range = 0xFFFFFFFF; + p->cache = 0; + p->low = 0; + p->cacheSize = 0; + + p->buf = p->bufBase; + + p->processed = 0; + p->res = SZ_OK; +} + +MY_NO_INLINE static void RangeEnc_FlushStream(CRangeEnc *p) +{ + size_t num; + if (p->res != SZ_OK) + return; + num = p->buf - p->bufBase; + if (num != ISeqOutStream_Write(p->outStream, p->bufBase, num)) + p->res = SZ_ERROR_WRITE; + p->processed += num; + p->buf = p->bufBase; +} + +MY_NO_INLINE static void MY_FAST_CALL RangeEnc_ShiftLow(CRangeEnc *p) +{ + UInt32 low = (UInt32)p->low; + unsigned high = (unsigned)(p->low >> 32); + p->low = (UInt32)(low << 8); + if (low < (UInt32)0xFF000000 || high != 0) + { + { + Byte *buf = p->buf; + *buf++ = (Byte)(p->cache + high); + p->cache = (unsigned)(low >> 24); + p->buf = buf; + if (buf == p->bufLim) + RangeEnc_FlushStream(p); + if (p->cacheSize == 0) + return; + } + high += 0xFF; + for (;;) + { + Byte *buf = p->buf; + *buf++ = (Byte)(high); + p->buf = buf; + if (buf == p->bufLim) + RangeEnc_FlushStream(p); + if (--p->cacheSize == 0) + return; + } + } + p->cacheSize++; +} + +static void RangeEnc_FlushData(CRangeEnc *p) +{ + int i; + for (i = 0; i < 5; i++) + RangeEnc_ShiftLow(p); +} + +#define RC_NORM(p) if (range < kTopValue) { range <<= 8; RangeEnc_ShiftLow(p); } + +#define RC_BIT_PRE(p, prob) \ + ttt = *(prob); \ + newBound = (range >> kNumBitModelTotalBits) * ttt; + +// #define _LZMA_ENC_USE_BRANCH + +#ifdef _LZMA_ENC_USE_BRANCH + +#define RC_BIT(p, prob, bit) { \ + RC_BIT_PRE(p, prob) \ + if (bit == 0) { range = newBound; ttt += (kBitModelTotal - ttt) >> kNumMoveBits; } \ + else { (p)->low += newBound; range -= newBound; ttt -= ttt >> kNumMoveBits; } \ + *(prob) = (CLzmaProb)ttt; \ + RC_NORM(p) \ + } + +#else + +#define RC_BIT(p, prob, bit) { \ + UInt32 mask; \ + RC_BIT_PRE(p, prob) \ + mask = 0 - (UInt32)bit; \ + range &= mask; \ + mask &= newBound; \ + range -= mask; \ + (p)->low += mask; \ + mask = (UInt32)bit - 1; \ + range += newBound & mask; \ + mask &= (kBitModelTotal - ((1 << kNumMoveBits) - 1)); \ + mask += ((1 << kNumMoveBits) - 1); \ + ttt += (Int32)(mask - ttt) >> kNumMoveBits; \ + *(prob) = (CLzmaProb)ttt; \ + RC_NORM(p) \ + } + +#endif + + + + +#define RC_BIT_0_BASE(p, prob) \ + range = newBound; *(prob) = (CLzmaProb)(ttt + ((kBitModelTotal - ttt) >> kNumMoveBits)); + +#define RC_BIT_1_BASE(p, prob) \ + range -= newBound; (p)->low += newBound; *(prob) = (CLzmaProb)(ttt - (ttt >> kNumMoveBits)); \ + +#define RC_BIT_0(p, prob) \ + RC_BIT_0_BASE(p, prob) \ + RC_NORM(p) + +#define RC_BIT_1(p, prob) \ + RC_BIT_1_BASE(p, prob) \ + RC_NORM(p) + +static void RangeEnc_EncodeBit_0(CRangeEnc *p, CLzmaProb *prob) +{ + UInt32 range, ttt, newBound; + range = p->range; + RC_BIT_PRE(p, prob) + RC_BIT_0(p, prob) + p->range = range; +} + +static void LitEnc_Encode(CRangeEnc *p, CLzmaProb *probs, UInt32 sym) +{ + UInt32 range = p->range; + sym |= 0x100; + do + { + UInt32 ttt, newBound; + // RangeEnc_EncodeBit(p, probs + (sym >> 8), (sym >> 7) & 1); + CLzmaProb *prob = probs + (sym >> 8); + UInt32 bit = (sym >> 7) & 1; + sym <<= 1; + RC_BIT(p, prob, bit); + } + while (sym < 0x10000); + p->range = range; +} + +static void LitEnc_EncodeMatched(CRangeEnc *p, CLzmaProb *probs, UInt32 sym, UInt32 matchByte) +{ + UInt32 range = p->range; + UInt32 offs = 0x100; + sym |= 0x100; + do + { + UInt32 ttt, newBound; + CLzmaProb *prob; + UInt32 bit; + matchByte <<= 1; + // RangeEnc_EncodeBit(p, probs + (offs + (matchByte & offs) + (sym >> 8)), (sym >> 7) & 1); + prob = probs + (offs + (matchByte & offs) + (sym >> 8)); + bit = (sym >> 7) & 1; + sym <<= 1; + offs &= ~(matchByte ^ sym); + RC_BIT(p, prob, bit); + } + while (sym < 0x10000); + p->range = range; +} + + + +static void LzmaEnc_InitPriceTables(CProbPrice *ProbPrices) +{ + UInt32 i; + for (i = 0; i < (kBitModelTotal >> kNumMoveReducingBits); i++) + { + const unsigned kCyclesBits = kNumBitPriceShiftBits; + UInt32 w = (i << kNumMoveReducingBits) + (1 << (kNumMoveReducingBits - 1)); + unsigned bitCount = 0; + unsigned j; + for (j = 0; j < kCyclesBits; j++) + { + w = w * w; + bitCount <<= 1; + while (w >= ((UInt32)1 << 16)) + { + w >>= 1; + bitCount++; + } + } + ProbPrices[i] = (CProbPrice)((kNumBitModelTotalBits << kCyclesBits) - 15 - bitCount); + // printf("\n%3d: %5d", i, ProbPrices[i]); + } +} + + +#define GET_PRICE(prob, bit) \ + p->ProbPrices[((prob) ^ (unsigned)(((-(int)(bit))) & (kBitModelTotal - 1))) >> kNumMoveReducingBits]; + +#define GET_PRICEa(prob, bit) \ + ProbPrices[((prob) ^ (unsigned)((-((int)(bit))) & (kBitModelTotal - 1))) >> kNumMoveReducingBits]; + +#define GET_PRICE_0(prob) p->ProbPrices[(prob) >> kNumMoveReducingBits] +#define GET_PRICE_1(prob) p->ProbPrices[((prob) ^ (kBitModelTotal - 1)) >> kNumMoveReducingBits] + +#define GET_PRICEa_0(prob) ProbPrices[(prob) >> kNumMoveReducingBits] +#define GET_PRICEa_1(prob) ProbPrices[((prob) ^ (kBitModelTotal - 1)) >> kNumMoveReducingBits] + + +static UInt32 LitEnc_GetPrice(const CLzmaProb *probs, UInt32 sym, const CProbPrice *ProbPrices) +{ + UInt32 price = 0; + sym |= 0x100; + do + { + unsigned bit = sym & 1; + sym >>= 1; + price += GET_PRICEa(probs[sym], bit); + } + while (sym >= 2); + return price; +} + + +static UInt32 LitEnc_Matched_GetPrice(const CLzmaProb *probs, UInt32 sym, UInt32 matchByte, const CProbPrice *ProbPrices) +{ + UInt32 price = 0; + UInt32 offs = 0x100; + sym |= 0x100; + do + { + matchByte <<= 1; + price += GET_PRICEa(probs[offs + (matchByte & offs) + (sym >> 8)], (sym >> 7) & 1); + sym <<= 1; + offs &= ~(matchByte ^ sym); + } + while (sym < 0x10000); + return price; +} + + +static void RcTree_ReverseEncode(CRangeEnc *rc, CLzmaProb *probs, unsigned numBits, unsigned sym) +{ + UInt32 range = rc->range; + unsigned m = 1; + do + { + UInt32 ttt, newBound; + unsigned bit = sym & 1; + // RangeEnc_EncodeBit(rc, probs + m, bit); + sym >>= 1; + RC_BIT(rc, probs + m, bit); + m = (m << 1) | bit; + } + while (--numBits); + rc->range = range; +} + + + +static void LenEnc_Init(CLenEnc *p) +{ + unsigned i; + for (i = 0; i < (LZMA_NUM_PB_STATES_MAX << (kLenNumLowBits + 1)); i++) + p->low[i] = kProbInitValue; + for (i = 0; i < kLenNumHighSymbols; i++) + p->high[i] = kProbInitValue; +} + +static void LenEnc_Encode(CLenEnc *p, CRangeEnc *rc, unsigned sym, unsigned posState) +{ + UInt32 range, ttt, newBound; + CLzmaProb *probs = p->low; + range = rc->range; + RC_BIT_PRE(rc, probs); + if (sym >= kLenNumLowSymbols) + { + RC_BIT_1(rc, probs); + probs += kLenNumLowSymbols; + RC_BIT_PRE(rc, probs); + if (sym >= kLenNumLowSymbols * 2) + { + RC_BIT_1(rc, probs); + rc->range = range; + // RcTree_Encode(rc, p->high, kLenNumHighBits, sym - kLenNumLowSymbols * 2); + LitEnc_Encode(rc, p->high, sym - kLenNumLowSymbols * 2); + return; + } + sym -= kLenNumLowSymbols; + } + + // RcTree_Encode(rc, probs + (posState << kLenNumLowBits), kLenNumLowBits, sym); + { + unsigned m; + unsigned bit; + RC_BIT_0(rc, probs); + probs += (posState << (1 + kLenNumLowBits)); + bit = (sym >> 2) ; RC_BIT(rc, probs + 1, bit); m = (1 << 1) + bit; + bit = (sym >> 1) & 1; RC_BIT(rc, probs + m, bit); m = (m << 1) + bit; + bit = sym & 1; RC_BIT(rc, probs + m, bit); + rc->range = range; + } +} + +static void SetPrices_3(const CLzmaProb *probs, UInt32 startPrice, UInt32 *prices, const CProbPrice *ProbPrices) +{ + unsigned i; + for (i = 0; i < 8; i += 2) + { + UInt32 price = startPrice; + UInt32 prob; + price += GET_PRICEa(probs[1 ], (i >> 2)); + price += GET_PRICEa(probs[2 + (i >> 2)], (i >> 1) & 1); + prob = probs[4 + (i >> 1)]; + prices[i ] = price + GET_PRICEa_0(prob); + prices[i + 1] = price + GET_PRICEa_1(prob); + } +} + + +MY_NO_INLINE static void MY_FAST_CALL LenPriceEnc_UpdateTables( + CLenPriceEnc *p, + unsigned numPosStates, + const CLenEnc *enc, + const CProbPrice *ProbPrices) +{ + UInt32 b; + + { + unsigned prob = enc->low[0]; + UInt32 a, c; + unsigned posState; + b = GET_PRICEa_1(prob); + a = GET_PRICEa_0(prob); + c = b + GET_PRICEa_0(enc->low[kLenNumLowSymbols]); + for (posState = 0; posState < numPosStates; posState++) + { + UInt32 *prices = p->prices[posState]; + const CLzmaProb *probs = enc->low + (posState << (1 + kLenNumLowBits)); + SetPrices_3(probs, a, prices, ProbPrices); + SetPrices_3(probs + kLenNumLowSymbols, c, prices + kLenNumLowSymbols, ProbPrices); + } + } + + /* + { + unsigned i; + UInt32 b; + a = GET_PRICEa_0(enc->low[0]); + for (i = 0; i < kLenNumLowSymbols; i++) + p->prices2[i] = a; + a = GET_PRICEa_1(enc->low[0]); + b = a + GET_PRICEa_0(enc->low[kLenNumLowSymbols]); + for (i = kLenNumLowSymbols; i < kLenNumLowSymbols * 2; i++) + p->prices2[i] = b; + a += GET_PRICEa_1(enc->low[kLenNumLowSymbols]); + } + */ + + // p->counter = numSymbols; + // p->counter = 64; + + { + unsigned i = p->tableSize; + + if (i > kLenNumLowSymbols * 2) + { + const CLzmaProb *probs = enc->high; + UInt32 *prices = p->prices[0] + kLenNumLowSymbols * 2; + i -= kLenNumLowSymbols * 2 - 1; + i >>= 1; + b += GET_PRICEa_1(enc->low[kLenNumLowSymbols]); + do + { + /* + p->prices2[i] = a + + // RcTree_GetPrice(enc->high, kLenNumHighBits, i - kLenNumLowSymbols * 2, ProbPrices); + LitEnc_GetPrice(probs, i - kLenNumLowSymbols * 2, ProbPrices); + */ + // UInt32 price = a + RcTree_GetPrice(probs, kLenNumHighBits - 1, sym, ProbPrices); + unsigned sym = --i + (1 << (kLenNumHighBits - 1)); + UInt32 price = b; + do + { + unsigned bit = sym & 1; + sym >>= 1; + price += GET_PRICEa(probs[sym], bit); + } + while (sym >= 2); + + { + unsigned prob = probs[(size_t)i + (1 << (kLenNumHighBits - 1))]; + prices[(size_t)i * 2 ] = price + GET_PRICEa_0(prob); + prices[(size_t)i * 2 + 1] = price + GET_PRICEa_1(prob); + } + } + while (i); + + { + unsigned posState; + size_t num = (p->tableSize - kLenNumLowSymbols * 2) * sizeof(p->prices[0][0]); + for (posState = 1; posState < numPosStates; posState++) + memcpy(p->prices[posState] + kLenNumLowSymbols * 2, p->prices[0] + kLenNumLowSymbols * 2, num); + } + } + } +} + +/* + #ifdef SHOW_STAT + g_STAT_OFFSET += num; + printf("\n MovePos %u", num); + #endif +*/ + +#define MOVE_POS(p, num) { \ + p->additionalOffset += (num); \ + p->matchFinder.Skip(p->matchFinderObj, (UInt32)(num)); } + + +static unsigned ReadMatchDistances(CLzmaEnc *p, unsigned *numPairsRes) +{ + unsigned numPairs; + + p->additionalOffset++; + p->numAvail = p->matchFinder.GetNumAvailableBytes(p->matchFinderObj); + numPairs = p->matchFinder.GetMatches(p->matchFinderObj, p->matches); + *numPairsRes = numPairs; + + #ifdef SHOW_STAT + printf("\n i = %u numPairs = %u ", g_STAT_OFFSET, numPairs / 2); + g_STAT_OFFSET++; + { + unsigned i; + for (i = 0; i < numPairs; i += 2) + printf("%2u %6u | ", p->matches[i], p->matches[i + 1]); + } + #endif + + if (numPairs == 0) + return 0; + { + unsigned len = p->matches[(size_t)numPairs - 2]; + if (len != p->numFastBytes) + return len; + { + UInt32 numAvail = p->numAvail; + if (numAvail > LZMA_MATCH_LEN_MAX) + numAvail = LZMA_MATCH_LEN_MAX; + { + const Byte *p1 = p->matchFinder.GetPointerToCurrentPos(p->matchFinderObj) - 1; + const Byte *p2 = p1 + len; + ptrdiff_t dif = (ptrdiff_t)-1 - p->matches[(size_t)numPairs - 1]; + const Byte *lim = p1 + numAvail; + for (; p2 != lim && *p2 == p2[dif]; p2++) + {} + return (unsigned)(p2 - p1); + } + } + } +} + +#define MARK_LIT ((UInt32)(Int32)-1) + +#define MakeAs_Lit(p) { (p)->dist = MARK_LIT; (p)->extra = 0; } +#define MakeAs_ShortRep(p) { (p)->dist = 0; (p)->extra = 0; } +#define IsShortRep(p) ((p)->dist == 0) + + +#define GetPrice_ShortRep(p, state, posState) \ + ( GET_PRICE_0(p->isRepG0[state]) + GET_PRICE_0(p->isRep0Long[state][posState])) + +#define GetPrice_Rep_0(p, state, posState) ( \ + GET_PRICE_1(p->isMatch[state][posState]) \ + + GET_PRICE_1(p->isRep0Long[state][posState])) \ + + GET_PRICE_1(p->isRep[state]) \ + + GET_PRICE_0(p->isRepG0[state]) + +MY_FORCE_INLINE +static UInt32 GetPrice_PureRep(const CLzmaEnc *p, unsigned repIndex, size_t state, size_t posState) +{ + UInt32 price; + UInt32 prob = p->isRepG0[state]; + if (repIndex == 0) + { + price = GET_PRICE_0(prob); + price += GET_PRICE_1(p->isRep0Long[state][posState]); + } + else + { + price = GET_PRICE_1(prob); + prob = p->isRepG1[state]; + if (repIndex == 1) + price += GET_PRICE_0(prob); + else + { + price += GET_PRICE_1(prob); + price += GET_PRICE(p->isRepG2[state], repIndex - 2); + } + } + return price; +} + + +static unsigned Backward(CLzmaEnc *p, unsigned cur) +{ + unsigned wr = cur + 1; + p->optEnd = wr; + + for (;;) + { + UInt32 dist = p->opt[cur].dist; + unsigned len = (unsigned)p->opt[cur].len; + unsigned extra = (unsigned)p->opt[cur].extra; + cur -= len; + + if (extra) + { + wr--; + p->opt[wr].len = (UInt32)len; + cur -= extra; + len = extra; + if (extra == 1) + { + p->opt[wr].dist = dist; + dist = MARK_LIT; + } + else + { + p->opt[wr].dist = 0; + len--; + wr--; + p->opt[wr].dist = MARK_LIT; + p->opt[wr].len = 1; + } + } + + if (cur == 0) + { + p->backRes = dist; + p->optCur = wr; + return len; + } + + wr--; + p->opt[wr].dist = dist; + p->opt[wr].len = (UInt32)len; + } +} + + + +#define LIT_PROBS(pos, prevByte) \ + (p->litProbs + (UInt32)3 * (((((pos) << 8) + (prevByte)) & p->lpMask) << p->lc)) + + +static unsigned GetOptimum(CLzmaEnc *p, UInt32 position) +{ + unsigned last, cur; + UInt32 reps[LZMA_NUM_REPS]; + unsigned repLens[LZMA_NUM_REPS]; + UInt32 *matches; + + { + UInt32 numAvail; + unsigned numPairs, mainLen, repMaxIndex, i, posState; + UInt32 matchPrice, repMatchPrice; + const Byte *data; + Byte curByte, matchByte; + + p->optCur = p->optEnd = 0; + + if (p->additionalOffset == 0) + mainLen = ReadMatchDistances(p, &numPairs); + else + { + mainLen = p->longestMatchLen; + numPairs = p->numPairs; + } + + numAvail = p->numAvail; + if (numAvail < 2) + { + p->backRes = MARK_LIT; + return 1; + } + if (numAvail > LZMA_MATCH_LEN_MAX) + numAvail = LZMA_MATCH_LEN_MAX; + + data = p->matchFinder.GetPointerToCurrentPos(p->matchFinderObj) - 1; + repMaxIndex = 0; + + for (i = 0; i < LZMA_NUM_REPS; i++) + { + unsigned len; + const Byte *data2; + reps[i] = p->reps[i]; + data2 = data - reps[i]; + if (data[0] != data2[0] || data[1] != data2[1]) + { + repLens[i] = 0; + continue; + } + for (len = 2; len < numAvail && data[len] == data2[len]; len++) + {} + repLens[i] = len; + if (len > repLens[repMaxIndex]) + repMaxIndex = i; + } + + if (repLens[repMaxIndex] >= p->numFastBytes) + { + unsigned len; + p->backRes = (UInt32)repMaxIndex; + len = repLens[repMaxIndex]; + MOVE_POS(p, len - 1) + return len; + } + + matches = p->matches; + + if (mainLen >= p->numFastBytes) + { + p->backRes = matches[(size_t)numPairs - 1] + LZMA_NUM_REPS; + MOVE_POS(p, mainLen - 1) + return mainLen; + } + + curByte = *data; + matchByte = *(data - reps[0]); + + last = repLens[repMaxIndex]; + if (last <= mainLen) + last = mainLen; + + if (last < 2 && curByte != matchByte) + { + p->backRes = MARK_LIT; + return 1; + } + + p->opt[0].state = (CState)p->state; + + posState = (position & p->pbMask); + + { + const CLzmaProb *probs = LIT_PROBS(position, *(data - 1)); + p->opt[1].price = GET_PRICE_0(p->isMatch[p->state][posState]) + + (!IsLitState(p->state) ? + LitEnc_Matched_GetPrice(probs, curByte, matchByte, p->ProbPrices) : + LitEnc_GetPrice(probs, curByte, p->ProbPrices)); + } + + MakeAs_Lit(&p->opt[1]); + + matchPrice = GET_PRICE_1(p->isMatch[p->state][posState]); + repMatchPrice = matchPrice + GET_PRICE_1(p->isRep[p->state]); + + // 18.06 + if (matchByte == curByte && repLens[0] == 0) + { + UInt32 shortRepPrice = repMatchPrice + GetPrice_ShortRep(p, p->state, posState); + if (shortRepPrice < p->opt[1].price) + { + p->opt[1].price = shortRepPrice; + MakeAs_ShortRep(&p->opt[1]); + } + if (last < 2) + { + p->backRes = p->opt[1].dist; + return 1; + } + } + + p->opt[1].len = 1; + + p->opt[0].reps[0] = reps[0]; + p->opt[0].reps[1] = reps[1]; + p->opt[0].reps[2] = reps[2]; + p->opt[0].reps[3] = reps[3]; + + // ---------- REP ---------- + + for (i = 0; i < LZMA_NUM_REPS; i++) + { + unsigned repLen = repLens[i]; + UInt32 price; + if (repLen < 2) + continue; + price = repMatchPrice + GetPrice_PureRep(p, i, p->state, posState); + do + { + UInt32 price2 = price + GET_PRICE_LEN(&p->repLenEnc, posState, repLen); + COptimal *opt = &p->opt[repLen]; + if (price2 < opt->price) + { + opt->price = price2; + opt->len = (UInt32)repLen; + opt->dist = (UInt32)i; + opt->extra = 0; + } + } + while (--repLen >= 2); + } + + + // ---------- MATCH ---------- + { + unsigned len = repLens[0] + 1; + if (len <= mainLen) + { + unsigned offs = 0; + UInt32 normalMatchPrice = matchPrice + GET_PRICE_0(p->isRep[p->state]); + + if (len < 2) + len = 2; + else + while (len > matches[offs]) + offs += 2; + + for (; ; len++) + { + COptimal *opt; + UInt32 dist = matches[(size_t)offs + 1]; + UInt32 price = normalMatchPrice + GET_PRICE_LEN(&p->lenEnc, posState, len); + unsigned lenToPosState = GetLenToPosState(len); + + if (dist < kNumFullDistances) + price += p->distancesPrices[lenToPosState][dist & (kNumFullDistances - 1)]; + else + { + unsigned slot; + GetPosSlot2(dist, slot); + price += p->alignPrices[dist & kAlignMask]; + price += p->posSlotPrices[lenToPosState][slot]; + } + + opt = &p->opt[len]; + + if (price < opt->price) + { + opt->price = price; + opt->len = (UInt32)len; + opt->dist = dist + LZMA_NUM_REPS; + opt->extra = 0; + } + + if (len == matches[offs]) + { + offs += 2; + if (offs == numPairs) + break; + } + } + } + } + + + cur = 0; + + #ifdef SHOW_STAT2 + /* if (position >= 0) */ + { + unsigned i; + printf("\n pos = %4X", position); + for (i = cur; i <= last; i++) + printf("\nprice[%4X] = %u", position - cur + i, p->opt[i].price); + } + #endif + } + + + + // ---------- Optimal Parsing ---------- + + for (;;) + { + unsigned numAvail; + UInt32 numAvailFull; + unsigned newLen, numPairs, prev, state, posState, startLen; + UInt32 litPrice, matchPrice, repMatchPrice; + BoolInt nextIsLit; + Byte curByte, matchByte; + const Byte *data; + COptimal *curOpt, *nextOpt; + + if (++cur == last) + break; + + // 18.06 + if (cur >= kNumOpts - 64) + { + unsigned j, best; + UInt32 price = p->opt[cur].price; + best = cur; + for (j = cur + 1; j <= last; j++) + { + UInt32 price2 = p->opt[j].price; + if (price >= price2) + { + price = price2; + best = j; + } + } + { + unsigned delta = best - cur; + if (delta != 0) + { + MOVE_POS(p, delta); + } + } + cur = best; + break; + } + + newLen = ReadMatchDistances(p, &numPairs); + + if (newLen >= p->numFastBytes) + { + p->numPairs = numPairs; + p->longestMatchLen = newLen; + break; + } + + curOpt = &p->opt[cur]; + + position++; + + // we need that check here, if skip_items in p->opt are possible + /* + if (curOpt->price >= kInfinityPrice) + continue; + */ + + prev = cur - curOpt->len; + + if (curOpt->len == 1) + { + state = (unsigned)p->opt[prev].state; + if (IsShortRep(curOpt)) + state = kShortRepNextStates[state]; + else + state = kLiteralNextStates[state]; + } + else + { + const COptimal *prevOpt; + UInt32 b0; + UInt32 dist = curOpt->dist; + + if (curOpt->extra) + { + prev -= (unsigned)curOpt->extra; + state = kState_RepAfterLit; + if (curOpt->extra == 1) + state = (dist < LZMA_NUM_REPS ? kState_RepAfterLit : kState_MatchAfterLit); + } + else + { + state = (unsigned)p->opt[prev].state; + if (dist < LZMA_NUM_REPS) + state = kRepNextStates[state]; + else + state = kMatchNextStates[state]; + } + + prevOpt = &p->opt[prev]; + b0 = prevOpt->reps[0]; + + if (dist < LZMA_NUM_REPS) + { + if (dist == 0) + { + reps[0] = b0; + reps[1] = prevOpt->reps[1]; + reps[2] = prevOpt->reps[2]; + reps[3] = prevOpt->reps[3]; + } + else + { + reps[1] = b0; + b0 = prevOpt->reps[1]; + if (dist == 1) + { + reps[0] = b0; + reps[2] = prevOpt->reps[2]; + reps[3] = prevOpt->reps[3]; + } + else + { + reps[2] = b0; + reps[0] = prevOpt->reps[dist]; + reps[3] = prevOpt->reps[dist ^ 1]; + } + } + } + else + { + reps[0] = (dist - LZMA_NUM_REPS + 1); + reps[1] = b0; + reps[2] = prevOpt->reps[1]; + reps[3] = prevOpt->reps[2]; + } + } + + curOpt->state = (CState)state; + curOpt->reps[0] = reps[0]; + curOpt->reps[1] = reps[1]; + curOpt->reps[2] = reps[2]; + curOpt->reps[3] = reps[3]; + + data = p->matchFinder.GetPointerToCurrentPos(p->matchFinderObj) - 1; + curByte = *data; + matchByte = *(data - reps[0]); + + posState = (position & p->pbMask); + + /* + The order of Price checks: + < LIT + <= SHORT_REP + < LIT : REP_0 + < REP [ : LIT : REP_0 ] + < MATCH [ : LIT : REP_0 ] + */ + + { + UInt32 curPrice = curOpt->price; + unsigned prob = p->isMatch[state][posState]; + matchPrice = curPrice + GET_PRICE_1(prob); + litPrice = curPrice + GET_PRICE_0(prob); + } + + nextOpt = &p->opt[(size_t)cur + 1]; + nextIsLit = False; + + // here we can allow skip_items in p->opt, if we don't check (nextOpt->price < kInfinityPrice) + // 18.new.06 + if ((nextOpt->price < kInfinityPrice + // && !IsLitState(state) + && matchByte == curByte) + || litPrice > nextOpt->price + ) + litPrice = 0; + else + { + const CLzmaProb *probs = LIT_PROBS(position, *(data - 1)); + litPrice += (!IsLitState(state) ? + LitEnc_Matched_GetPrice(probs, curByte, matchByte, p->ProbPrices) : + LitEnc_GetPrice(probs, curByte, p->ProbPrices)); + + if (litPrice < nextOpt->price) + { + nextOpt->price = litPrice; + nextOpt->len = 1; + MakeAs_Lit(nextOpt); + nextIsLit = True; + } + } + + repMatchPrice = matchPrice + GET_PRICE_1(p->isRep[state]); + + numAvailFull = p->numAvail; + { + unsigned temp = kNumOpts - 1 - cur; + if (numAvailFull > temp) + numAvailFull = (UInt32)temp; + } + + // 18.06 + // ---------- SHORT_REP ---------- + if (IsLitState(state)) // 18.new + if (matchByte == curByte) + if (repMatchPrice < nextOpt->price) // 18.new + // if (numAvailFull < 2 || data[1] != *(data - reps[0] + 1)) + if ( + // nextOpt->price >= kInfinityPrice || + nextOpt->len < 2 // we can check nextOpt->len, if skip items are not allowed in p->opt + || (nextOpt->dist != 0 + // && nextOpt->extra <= 1 // 17.old + ) + ) + { + UInt32 shortRepPrice = repMatchPrice + GetPrice_ShortRep(p, state, posState); + // if (shortRepPrice <= nextOpt->price) // 17.old + if (shortRepPrice < nextOpt->price) // 18.new + { + nextOpt->price = shortRepPrice; + nextOpt->len = 1; + MakeAs_ShortRep(nextOpt); + nextIsLit = False; + } + } + + if (numAvailFull < 2) + continue; + numAvail = (numAvailFull <= p->numFastBytes ? numAvailFull : p->numFastBytes); + + // numAvail <= p->numFastBytes + + // ---------- LIT : REP_0 ---------- + + if (!nextIsLit + && litPrice != 0 // 18.new + && matchByte != curByte + && numAvailFull > 2) + { + const Byte *data2 = data - reps[0]; + if (data[1] == data2[1] && data[2] == data2[2]) + { + unsigned len; + unsigned limit = p->numFastBytes + 1; + if (limit > numAvailFull) + limit = numAvailFull; + for (len = 3; len < limit && data[len] == data2[len]; len++) + {} + + { + unsigned state2 = kLiteralNextStates[state]; + unsigned posState2 = (position + 1) & p->pbMask; + UInt32 price = litPrice + GetPrice_Rep_0(p, state2, posState2); + { + unsigned offset = cur + len; + + if (last < offset) + last = offset; + + // do + { + UInt32 price2; + COptimal *opt; + len--; + // price2 = price + GetPrice_Len_Rep_0(p, len, state2, posState2); + price2 = price + GET_PRICE_LEN(&p->repLenEnc, posState2, len); + + opt = &p->opt[offset]; + // offset--; + if (price2 < opt->price) + { + opt->price = price2; + opt->len = (UInt32)len; + opt->dist = 0; + opt->extra = 1; + } + } + // while (len >= 3); + } + } + } + } + + startLen = 2; /* speed optimization */ + + { + // ---------- REP ---------- + unsigned repIndex = 0; // 17.old + // unsigned repIndex = IsLitState(state) ? 0 : 1; // 18.notused + for (; repIndex < LZMA_NUM_REPS; repIndex++) + { + unsigned len; + UInt32 price; + const Byte *data2 = data - reps[repIndex]; + if (data[0] != data2[0] || data[1] != data2[1]) + continue; + + for (len = 2; len < numAvail && data[len] == data2[len]; len++) + {} + + // if (len < startLen) continue; // 18.new: speed optimization + + { + unsigned offset = cur + len; + if (last < offset) + last = offset; + } + { + unsigned len2 = len; + price = repMatchPrice + GetPrice_PureRep(p, repIndex, state, posState); + do + { + UInt32 price2 = price + GET_PRICE_LEN(&p->repLenEnc, posState, len2); + COptimal *opt = &p->opt[cur + len2]; + if (price2 < opt->price) + { + opt->price = price2; + opt->len = (UInt32)len2; + opt->dist = (UInt32)repIndex; + opt->extra = 0; + } + } + while (--len2 >= 2); + } + + if (repIndex == 0) startLen = len + 1; // 17.old + // startLen = len + 1; // 18.new + + /* if (_maxMode) */ + { + // ---------- REP : LIT : REP_0 ---------- + // numFastBytes + 1 + numFastBytes + + unsigned len2 = len + 1; + unsigned limit = len2 + p->numFastBytes; + if (limit > numAvailFull) + limit = numAvailFull; + + len2 += 2; + if (len2 <= limit) + if (data[len2 - 2] == data2[len2 - 2]) + if (data[len2 - 1] == data2[len2 - 1]) + { + unsigned state2 = kRepNextStates[state]; + unsigned posState2 = (position + len) & p->pbMask; + price += GET_PRICE_LEN(&p->repLenEnc, posState, len) + + GET_PRICE_0(p->isMatch[state2][posState2]) + + LitEnc_Matched_GetPrice(LIT_PROBS(position + len, data[(size_t)len - 1]), + data[len], data2[len], p->ProbPrices); + + // state2 = kLiteralNextStates[state2]; + state2 = kState_LitAfterRep; + posState2 = (posState2 + 1) & p->pbMask; + + + price += GetPrice_Rep_0(p, state2, posState2); + + for (; len2 < limit && data[len2] == data2[len2]; len2++) + {} + + len2 -= len; + // if (len2 >= 3) + { + { + unsigned offset = cur + len + len2; + + if (last < offset) + last = offset; + // do + { + UInt32 price2; + COptimal *opt; + len2--; + // price2 = price + GetPrice_Len_Rep_0(p, len2, state2, posState2); + price2 = price + GET_PRICE_LEN(&p->repLenEnc, posState2, len2); + + opt = &p->opt[offset]; + // offset--; + if (price2 < opt->price) + { + opt->price = price2; + opt->len = (UInt32)len2; + opt->extra = (CExtra)(len + 1); + opt->dist = (UInt32)repIndex; + } + } + // while (len2 >= 3); + } + } + } + } + } + } + + + // ---------- MATCH ---------- + /* for (unsigned len = 2; len <= newLen; len++) */ + if (newLen > numAvail) + { + newLen = numAvail; + for (numPairs = 0; newLen > matches[numPairs]; numPairs += 2); + matches[numPairs] = (UInt32)newLen; + numPairs += 2; + } + + // startLen = 2; /* speed optimization */ + + if (newLen >= startLen) + { + UInt32 normalMatchPrice = matchPrice + GET_PRICE_0(p->isRep[state]); + UInt32 dist; + unsigned offs, posSlot, len; + + { + unsigned offset = cur + newLen; + if (last < offset) + last = offset; + } + + offs = 0; + while (startLen > matches[offs]) + offs += 2; + dist = matches[(size_t)offs + 1]; + + // if (dist >= kNumFullDistances) + GetPosSlot2(dist, posSlot); + + for (len = /*2*/ startLen; ; len++) + { + UInt32 price = normalMatchPrice + GET_PRICE_LEN(&p->lenEnc, posState, len); + { + COptimal *opt; + unsigned lenNorm = len - 2; + lenNorm = GetLenToPosState2(lenNorm); + if (dist < kNumFullDistances) + price += p->distancesPrices[lenNorm][dist & (kNumFullDistances - 1)]; + else + price += p->posSlotPrices[lenNorm][posSlot] + p->alignPrices[dist & kAlignMask]; + + opt = &p->opt[cur + len]; + if (price < opt->price) + { + opt->price = price; + opt->len = (UInt32)len; + opt->dist = dist + LZMA_NUM_REPS; + opt->extra = 0; + } + } + + if (len == matches[offs]) + { + // if (p->_maxMode) { + // MATCH : LIT : REP_0 + + const Byte *data2 = data - dist - 1; + unsigned len2 = len + 1; + unsigned limit = len2 + p->numFastBytes; + if (limit > numAvailFull) + limit = numAvailFull; + + len2 += 2; + if (len2 <= limit) + if (data[len2 - 2] == data2[len2 - 2]) + if (data[len2 - 1] == data2[len2 - 1]) + { + for (; len2 < limit && data[len2] == data2[len2]; len2++) + {} + + len2 -= len; + + // if (len2 >= 3) + { + unsigned state2 = kMatchNextStates[state]; + unsigned posState2 = (position + len) & p->pbMask; + unsigned offset; + price += GET_PRICE_0(p->isMatch[state2][posState2]); + price += LitEnc_Matched_GetPrice(LIT_PROBS(position + len, data[(size_t)len - 1]), + data[len], data2[len], p->ProbPrices); + + // state2 = kLiteralNextStates[state2]; + state2 = kState_LitAfterMatch; + + posState2 = (posState2 + 1) & p->pbMask; + price += GetPrice_Rep_0(p, state2, posState2); + + offset = cur + len + len2; + + if (last < offset) + last = offset; + // do + { + UInt32 price2; + COptimal *opt; + len2--; + // price2 = price + GetPrice_Len_Rep_0(p, len2, state2, posState2); + price2 = price + GET_PRICE_LEN(&p->repLenEnc, posState2, len2); + opt = &p->opt[offset]; + // offset--; + if (price2 < opt->price) + { + opt->price = price2; + opt->len = (UInt32)len2; + opt->extra = (CExtra)(len + 1); + opt->dist = dist + LZMA_NUM_REPS; + } + } + // while (len2 >= 3); + } + + } + + offs += 2; + if (offs == numPairs) + break; + dist = matches[(size_t)offs + 1]; + // if (dist >= kNumFullDistances) + GetPosSlot2(dist, posSlot); + } + } + } + } + + do + p->opt[last].price = kInfinityPrice; + while (--last); + + return Backward(p, cur); +} + + + +#define ChangePair(smallDist, bigDist) (((bigDist) >> 7) > (smallDist)) + + + +static unsigned GetOptimumFast(CLzmaEnc *p) +{ + UInt32 numAvail, mainDist; + unsigned mainLen, numPairs, repIndex, repLen, i; + const Byte *data; + + if (p->additionalOffset == 0) + mainLen = ReadMatchDistances(p, &numPairs); + else + { + mainLen = p->longestMatchLen; + numPairs = p->numPairs; + } + + numAvail = p->numAvail; + p->backRes = MARK_LIT; + if (numAvail < 2) + return 1; + // if (mainLen < 2 && p->state == 0) return 1; // 18.06.notused + if (numAvail > LZMA_MATCH_LEN_MAX) + numAvail = LZMA_MATCH_LEN_MAX; + data = p->matchFinder.GetPointerToCurrentPos(p->matchFinderObj) - 1; + repLen = repIndex = 0; + + for (i = 0; i < LZMA_NUM_REPS; i++) + { + unsigned len; + const Byte *data2 = data - p->reps[i]; + if (data[0] != data2[0] || data[1] != data2[1]) + continue; + for (len = 2; len < numAvail && data[len] == data2[len]; len++) + {} + if (len >= p->numFastBytes) + { + p->backRes = (UInt32)i; + MOVE_POS(p, len - 1) + return len; + } + if (len > repLen) + { + repIndex = i; + repLen = len; + } + } + + if (mainLen >= p->numFastBytes) + { + p->backRes = p->matches[(size_t)numPairs - 1] + LZMA_NUM_REPS; + MOVE_POS(p, mainLen - 1) + return mainLen; + } + + mainDist = 0; /* for GCC */ + + if (mainLen >= 2) + { + mainDist = p->matches[(size_t)numPairs - 1]; + while (numPairs > 2) + { + UInt32 dist2; + if (mainLen != p->matches[(size_t)numPairs - 4] + 1) + break; + dist2 = p->matches[(size_t)numPairs - 3]; + if (!ChangePair(dist2, mainDist)) + break; + numPairs -= 2; + mainLen--; + mainDist = dist2; + } + if (mainLen == 2 && mainDist >= 0x80) + mainLen = 1; + } + + if (repLen >= 2) + if ( repLen + 1 >= mainLen + || (repLen + 2 >= mainLen && mainDist >= (1 << 9)) + || (repLen + 3 >= mainLen && mainDist >= (1 << 15))) + { + p->backRes = (UInt32)repIndex; + MOVE_POS(p, repLen - 1) + return repLen; + } + + if (mainLen < 2 || numAvail <= 2) + return 1; + + { + unsigned len1 = ReadMatchDistances(p, &p->numPairs); + p->longestMatchLen = len1; + + if (len1 >= 2) + { + UInt32 newDist = p->matches[(size_t)p->numPairs - 1]; + if ( (len1 >= mainLen && newDist < mainDist) + || (len1 == mainLen + 1 && !ChangePair(mainDist, newDist)) + || (len1 > mainLen + 1) + || (len1 + 1 >= mainLen && mainLen >= 3 && ChangePair(newDist, mainDist))) + return 1; + } + } + + data = p->matchFinder.GetPointerToCurrentPos(p->matchFinderObj) - 1; + + for (i = 0; i < LZMA_NUM_REPS; i++) + { + unsigned len, limit; + const Byte *data2 = data - p->reps[i]; + if (data[0] != data2[0] || data[1] != data2[1]) + continue; + limit = mainLen - 1; + for (len = 2;; len++) + { + if (len >= limit) + return 1; + if (data[len] != data2[len]) + break; + } + } + + p->backRes = mainDist + LZMA_NUM_REPS; + if (mainLen != 2) + { + MOVE_POS(p, mainLen - 2) + } + return mainLen; +} + + + + +static void WriteEndMarker(CLzmaEnc *p, unsigned posState) +{ + UInt32 range; + range = p->rc.range; + { + UInt32 ttt, newBound; + CLzmaProb *prob = &p->isMatch[p->state][posState]; + RC_BIT_PRE(&p->rc, prob) + RC_BIT_1(&p->rc, prob) + prob = &p->isRep[p->state]; + RC_BIT_PRE(&p->rc, prob) + RC_BIT_0(&p->rc, prob) + } + p->state = kMatchNextStates[p->state]; + + p->rc.range = range; + LenEnc_Encode(&p->lenProbs, &p->rc, 0, posState); + range = p->rc.range; + + { + // RcTree_Encode_PosSlot(&p->rc, p->posSlotEncoder[0], (1 << kNumPosSlotBits) - 1); + CLzmaProb *probs = p->posSlotEncoder[0]; + unsigned m = 1; + do + { + UInt32 ttt, newBound; + RC_BIT_PRE(p, probs + m) + RC_BIT_1(&p->rc, probs + m); + m = (m << 1) + 1; + } + while (m < (1 << kNumPosSlotBits)); + } + { + // RangeEnc_EncodeDirectBits(&p->rc, ((UInt32)1 << (30 - kNumAlignBits)) - 1, 30 - kNumAlignBits); UInt32 range = p->range; + unsigned numBits = 30 - kNumAlignBits; + do + { + range >>= 1; + p->rc.low += range; + RC_NORM(&p->rc) + } + while (--numBits); + } + + { + // RcTree_ReverseEncode(&p->rc, p->posAlignEncoder, kNumAlignBits, kAlignMask); + CLzmaProb *probs = p->posAlignEncoder; + unsigned m = 1; + do + { + UInt32 ttt, newBound; + RC_BIT_PRE(p, probs + m) + RC_BIT_1(&p->rc, probs + m); + m = (m << 1) + 1; + } + while (m < kAlignTableSize); + } + p->rc.range = range; +} + + +static SRes CheckErrors(CLzmaEnc *p) +{ + if (p->result != SZ_OK) + return p->result; + if (p->rc.res != SZ_OK) + p->result = SZ_ERROR_WRITE; + if (p->matchFinderBase.result != SZ_OK) + p->result = SZ_ERROR_READ; + if (p->result != SZ_OK) + p->finished = True; + return p->result; +} + + +MY_NO_INLINE static SRes Flush(CLzmaEnc *p, UInt32 nowPos) +{ + /* ReleaseMFStream(); */ + p->finished = True; + if (p->writeEndMark) + WriteEndMarker(p, nowPos & p->pbMask); + RangeEnc_FlushData(&p->rc); + RangeEnc_FlushStream(&p->rc); + return CheckErrors(p); +} + + +MY_NO_INLINE static void FillAlignPrices(CLzmaEnc *p) +{ + unsigned i; + const CProbPrice *ProbPrices = p->ProbPrices; + const CLzmaProb *probs = p->posAlignEncoder; + // p->alignPriceCount = 0; + for (i = 0; i < kAlignTableSize / 2; i++) + { + UInt32 price = 0; + unsigned sym = i; + unsigned m = 1; + unsigned bit; + UInt32 prob; + bit = sym & 1; sym >>= 1; price += GET_PRICEa(probs[m], bit); m = (m << 1) + bit; + bit = sym & 1; sym >>= 1; price += GET_PRICEa(probs[m], bit); m = (m << 1) + bit; + bit = sym & 1; sym >>= 1; price += GET_PRICEa(probs[m], bit); m = (m << 1) + bit; + prob = probs[m]; + p->alignPrices[i ] = price + GET_PRICEa_0(prob); + p->alignPrices[i + 8] = price + GET_PRICEa_1(prob); + // p->alignPrices[i] = RcTree_ReverseGetPrice(p->posAlignEncoder, kNumAlignBits, i, p->ProbPrices); + } +} + + +MY_NO_INLINE static void FillDistancesPrices(CLzmaEnc *p) +{ + // int y; for (y = 0; y < 100; y++) { + + UInt32 tempPrices[kNumFullDistances]; + unsigned i, lps; + + const CProbPrice *ProbPrices = p->ProbPrices; + p->matchPriceCount = 0; + + for (i = kStartPosModelIndex / 2; i < kNumFullDistances / 2; i++) + { + unsigned posSlot = GetPosSlot1(i); + unsigned footerBits = (posSlot >> 1) - 1; + unsigned base = ((2 | (posSlot & 1)) << footerBits); + const CLzmaProb *probs = p->posEncoders + (size_t)base * 2; + // tempPrices[i] = RcTree_ReverseGetPrice(p->posEncoders + base, footerBits, i - base, p->ProbPrices); + UInt32 price = 0; + unsigned m = 1; + unsigned sym = i; + unsigned offset = (unsigned)1 << footerBits; + base += i; + + if (footerBits) + do + { + unsigned bit = sym & 1; + sym >>= 1; + price += GET_PRICEa(probs[m], bit); + m = (m << 1) + bit; + } + while (--footerBits); + + { + unsigned prob = probs[m]; + tempPrices[base ] = price + GET_PRICEa_0(prob); + tempPrices[base + offset] = price + GET_PRICEa_1(prob); + } + } + + for (lps = 0; lps < kNumLenToPosStates; lps++) + { + unsigned slot; + unsigned distTableSize2 = (p->distTableSize + 1) >> 1; + UInt32 *posSlotPrices = p->posSlotPrices[lps]; + const CLzmaProb *probs = p->posSlotEncoder[lps]; + + for (slot = 0; slot < distTableSize2; slot++) + { + // posSlotPrices[slot] = RcTree_GetPrice(encoder, kNumPosSlotBits, slot, p->ProbPrices); + UInt32 price; + unsigned bit; + unsigned sym = slot + (1 << (kNumPosSlotBits - 1)); + unsigned prob; + bit = sym & 1; sym >>= 1; price = GET_PRICEa(probs[sym], bit); + bit = sym & 1; sym >>= 1; price += GET_PRICEa(probs[sym], bit); + bit = sym & 1; sym >>= 1; price += GET_PRICEa(probs[sym], bit); + bit = sym & 1; sym >>= 1; price += GET_PRICEa(probs[sym], bit); + bit = sym & 1; sym >>= 1; price += GET_PRICEa(probs[sym], bit); + prob = probs[(size_t)slot + (1 << (kNumPosSlotBits - 1))]; + posSlotPrices[(size_t)slot * 2 ] = price + GET_PRICEa_0(prob); + posSlotPrices[(size_t)slot * 2 + 1] = price + GET_PRICEa_1(prob); + } + + { + UInt32 delta = ((UInt32)((kEndPosModelIndex / 2 - 1) - kNumAlignBits) << kNumBitPriceShiftBits); + for (slot = kEndPosModelIndex / 2; slot < distTableSize2; slot++) + { + posSlotPrices[(size_t)slot * 2 ] += delta; + posSlotPrices[(size_t)slot * 2 + 1] += delta; + delta += ((UInt32)1 << kNumBitPriceShiftBits); + } + } + + { + UInt32 *dp = p->distancesPrices[lps]; + + dp[0] = posSlotPrices[0]; + dp[1] = posSlotPrices[1]; + dp[2] = posSlotPrices[2]; + dp[3] = posSlotPrices[3]; + + for (i = 4; i < kNumFullDistances; i += 2) + { + UInt32 slotPrice = posSlotPrices[GetPosSlot1(i)]; + dp[i ] = slotPrice + tempPrices[i]; + dp[i + 1] = slotPrice + tempPrices[i + 1]; + } + } + } + // } +} + + + +void LzmaEnc_Construct(CLzmaEnc *p) +{ + RangeEnc_Construct(&p->rc); + MatchFinder_Construct(&p->matchFinderBase); + + #ifndef _7ZIP_ST + MatchFinderMt_Construct(&p->matchFinderMt); + p->matchFinderMt.MatchFinder = &p->matchFinderBase; + #endif + + { + CLzmaEncProps props; + LzmaEncProps_Init(&props); + LzmaEnc_SetProps(p, &props); + } + + #ifndef LZMA_LOG_BSR + LzmaEnc_FastPosInit(p->g_FastPos); + #endif + + LzmaEnc_InitPriceTables(p->ProbPrices); + p->litProbs = NULL; + p->saveState.litProbs = NULL; + +} + +CLzmaEncHandle LzmaEnc_Create(ISzAllocPtr alloc) +{ + void *p; + p = ISzAlloc_Alloc(alloc, sizeof(CLzmaEnc)); + if (p) + LzmaEnc_Construct((CLzmaEnc *)p); + return p; +} + +void LzmaEnc_FreeLits(CLzmaEnc *p, ISzAllocPtr alloc) +{ + ISzAlloc_Free(alloc, p->litProbs); + ISzAlloc_Free(alloc, p->saveState.litProbs); + p->litProbs = NULL; + p->saveState.litProbs = NULL; +} + +void LzmaEnc_Destruct(CLzmaEnc *p, ISzAllocPtr alloc, ISzAllocPtr allocBig) +{ + #ifndef _7ZIP_ST + MatchFinderMt_Destruct(&p->matchFinderMt, allocBig); + #endif + + MatchFinder_Free(&p->matchFinderBase, allocBig); + LzmaEnc_FreeLits(p, alloc); + RangeEnc_Free(&p->rc, alloc); +} + +void LzmaEnc_Destroy(CLzmaEncHandle p, ISzAllocPtr alloc, ISzAllocPtr allocBig) +{ + LzmaEnc_Destruct((CLzmaEnc *)p, alloc, allocBig); + ISzAlloc_Free(alloc, p); +} + + +static SRes LzmaEnc_CodeOneBlock(CLzmaEnc *p, UInt32 maxPackSize, UInt32 maxUnpackSize) +{ + UInt32 nowPos32, startPos32; + if (p->needInit) + { + p->matchFinder.Init(p->matchFinderObj); + p->needInit = 0; + } + + if (p->finished) + return p->result; + RINOK(CheckErrors(p)); + + nowPos32 = (UInt32)p->nowPos64; + startPos32 = nowPos32; + + if (p->nowPos64 == 0) + { + unsigned numPairs; + Byte curByte; + if (p->matchFinder.GetNumAvailableBytes(p->matchFinderObj) == 0) + return Flush(p, nowPos32); + ReadMatchDistances(p, &numPairs); + RangeEnc_EncodeBit_0(&p->rc, &p->isMatch[kState_Start][0]); + // p->state = kLiteralNextStates[p->state]; + curByte = *(p->matchFinder.GetPointerToCurrentPos(p->matchFinderObj) - p->additionalOffset); + LitEnc_Encode(&p->rc, p->litProbs, curByte); + p->additionalOffset--; + nowPos32++; + } + + if (p->matchFinder.GetNumAvailableBytes(p->matchFinderObj) != 0) + + for (;;) + { + UInt32 dist; + unsigned len, posState; + UInt32 range, ttt, newBound; + CLzmaProb *probs; + + if (p->fastMode) + len = GetOptimumFast(p); + else + { + unsigned oci = p->optCur; + if (p->optEnd == oci) + len = GetOptimum(p, nowPos32); + else + { + const COptimal *opt = &p->opt[oci]; + len = opt->len; + p->backRes = opt->dist; + p->optCur = oci + 1; + } + } + + posState = (unsigned)nowPos32 & p->pbMask; + range = p->rc.range; + probs = &p->isMatch[p->state][posState]; + + RC_BIT_PRE(&p->rc, probs) + + dist = p->backRes; + + #ifdef SHOW_STAT2 + printf("\n pos = %6X, len = %3u pos = %6u", nowPos32, len, dist); + #endif + + if (dist == MARK_LIT) + { + Byte curByte; + const Byte *data; + unsigned state; + + RC_BIT_0(&p->rc, probs); + p->rc.range = range; + data = p->matchFinder.GetPointerToCurrentPos(p->matchFinderObj) - p->additionalOffset; + probs = LIT_PROBS(nowPos32, *(data - 1)); + curByte = *data; + state = p->state; + p->state = kLiteralNextStates[state]; + if (IsLitState(state)) + LitEnc_Encode(&p->rc, probs, curByte); + else + LitEnc_EncodeMatched(&p->rc, probs, curByte, *(data - p->reps[0])); + } + else + { + RC_BIT_1(&p->rc, probs); + probs = &p->isRep[p->state]; + RC_BIT_PRE(&p->rc, probs) + + if (dist < LZMA_NUM_REPS) + { + RC_BIT_1(&p->rc, probs); + probs = &p->isRepG0[p->state]; + RC_BIT_PRE(&p->rc, probs) + if (dist == 0) + { + RC_BIT_0(&p->rc, probs); + probs = &p->isRep0Long[p->state][posState]; + RC_BIT_PRE(&p->rc, probs) + if (len != 1) + { + RC_BIT_1_BASE(&p->rc, probs); + } + else + { + RC_BIT_0_BASE(&p->rc, probs); + p->state = kShortRepNextStates[p->state]; + } + } + else + { + RC_BIT_1(&p->rc, probs); + probs = &p->isRepG1[p->state]; + RC_BIT_PRE(&p->rc, probs) + if (dist == 1) + { + RC_BIT_0_BASE(&p->rc, probs); + dist = p->reps[1]; + } + else + { + RC_BIT_1(&p->rc, probs); + probs = &p->isRepG2[p->state]; + RC_BIT_PRE(&p->rc, probs) + if (dist == 2) + { + RC_BIT_0_BASE(&p->rc, probs); + dist = p->reps[2]; + } + else + { + RC_BIT_1_BASE(&p->rc, probs); + dist = p->reps[3]; + p->reps[3] = p->reps[2]; + } + p->reps[2] = p->reps[1]; + } + p->reps[1] = p->reps[0]; + p->reps[0] = dist; + } + + RC_NORM(&p->rc) + + p->rc.range = range; + + if (len != 1) + { + LenEnc_Encode(&p->repLenProbs, &p->rc, len - LZMA_MATCH_LEN_MIN, posState); + --p->repLenEncCounter; + p->state = kRepNextStates[p->state]; + } + } + else + { + unsigned posSlot; + RC_BIT_0(&p->rc, probs); + p->rc.range = range; + p->state = kMatchNextStates[p->state]; + + LenEnc_Encode(&p->lenProbs, &p->rc, len - LZMA_MATCH_LEN_MIN, posState); + // --p->lenEnc.counter; + + dist -= LZMA_NUM_REPS; + p->reps[3] = p->reps[2]; + p->reps[2] = p->reps[1]; + p->reps[1] = p->reps[0]; + p->reps[0] = dist + 1; + + p->matchPriceCount++; + GetPosSlot(dist, posSlot); + // RcTree_Encode_PosSlot(&p->rc, p->posSlotEncoder[GetLenToPosState(len)], posSlot); + { + UInt32 sym = (UInt32)posSlot + (1 << kNumPosSlotBits); + range = p->rc.range; + probs = p->posSlotEncoder[GetLenToPosState(len)]; + do + { + CLzmaProb *prob = probs + (sym >> kNumPosSlotBits); + UInt32 bit = (sym >> (kNumPosSlotBits - 1)) & 1; + sym <<= 1; + RC_BIT(&p->rc, prob, bit); + } + while (sym < (1 << kNumPosSlotBits * 2)); + p->rc.range = range; + } + + if (dist >= kStartPosModelIndex) + { + unsigned footerBits = ((posSlot >> 1) - 1); + + if (dist < kNumFullDistances) + { + unsigned base = ((2 | (posSlot & 1)) << footerBits); + RcTree_ReverseEncode(&p->rc, p->posEncoders + base, footerBits, (unsigned)(dist /* - base */)); + } + else + { + UInt32 pos2 = (dist | 0xF) << (32 - footerBits); + range = p->rc.range; + // RangeEnc_EncodeDirectBits(&p->rc, posReduced >> kNumAlignBits, footerBits - kNumAlignBits); + /* + do + { + range >>= 1; + p->rc.low += range & (0 - ((dist >> --footerBits) & 1)); + RC_NORM(&p->rc) + } + while (footerBits > kNumAlignBits); + */ + do + { + range >>= 1; + p->rc.low += range & (0 - (pos2 >> 31)); + pos2 += pos2; + RC_NORM(&p->rc) + } + while (pos2 != 0xF0000000); + + + // RcTree_ReverseEncode(&p->rc, p->posAlignEncoder, kNumAlignBits, posReduced & kAlignMask); + + { + unsigned m = 1; + unsigned bit; + bit = dist & 1; dist >>= 1; RC_BIT(&p->rc, p->posAlignEncoder + m, bit); m = (m << 1) + bit; + bit = dist & 1; dist >>= 1; RC_BIT(&p->rc, p->posAlignEncoder + m, bit); m = (m << 1) + bit; + bit = dist & 1; dist >>= 1; RC_BIT(&p->rc, p->posAlignEncoder + m, bit); m = (m << 1) + bit; + bit = dist & 1; RC_BIT(&p->rc, p->posAlignEncoder + m, bit); + p->rc.range = range; + // p->alignPriceCount++; + } + } + } + } + } + + nowPos32 += (UInt32)len; + p->additionalOffset -= len; + + if (p->additionalOffset == 0) + { + UInt32 processed; + + if (!p->fastMode) + { + /* + if (p->alignPriceCount >= 16) // kAlignTableSize + FillAlignPrices(p); + if (p->matchPriceCount >= 128) + FillDistancesPrices(p); + if (p->lenEnc.counter <= 0) + LenPriceEnc_UpdateTables(&p->lenEnc, 1 << p->pb, &p->lenProbs, p->ProbPrices); + */ + if (p->matchPriceCount >= 64) + { + FillAlignPrices(p); + // { int y; for (y = 0; y < 100; y++) { + FillDistancesPrices(p); + // }} + LenPriceEnc_UpdateTables(&p->lenEnc, 1 << p->pb, &p->lenProbs, p->ProbPrices); + } + if (p->repLenEncCounter <= 0) + { + p->repLenEncCounter = REP_LEN_COUNT; + LenPriceEnc_UpdateTables(&p->repLenEnc, 1 << p->pb, &p->repLenProbs, p->ProbPrices); + } + } + + if (p->matchFinder.GetNumAvailableBytes(p->matchFinderObj) == 0) + break; + processed = nowPos32 - startPos32; + + if (maxPackSize) + { + if (processed + kNumOpts + 300 >= maxUnpackSize + || RangeEnc_GetProcessed_sizet(&p->rc) + kPackReserve >= maxPackSize) + break; + } + else if (processed >= (1 << 17)) + { + p->nowPos64 += nowPos32 - startPos32; + return CheckErrors(p); + } + } + } + + p->nowPos64 += nowPos32 - startPos32; + return Flush(p, nowPos32); +} + + + +#define kBigHashDicLimit ((UInt32)1 << 24) + +static SRes LzmaEnc_Alloc(CLzmaEnc *p, UInt32 keepWindowSize, ISzAllocPtr alloc, ISzAllocPtr allocBig) +{ + UInt32 beforeSize = kNumOpts; + if (!RangeEnc_Alloc(&p->rc, alloc)) + return SZ_ERROR_MEM; + + #ifndef _7ZIP_ST + p->mtMode = (p->multiThread && !p->fastMode && (p->matchFinderBase.btMode != 0)); + #endif + + { + unsigned lclp = p->lc + p->lp; + if (!p->litProbs || !p->saveState.litProbs || p->lclp != lclp) + { + LzmaEnc_FreeLits(p, alloc); + p->litProbs = (CLzmaProb *)ISzAlloc_Alloc(alloc, ((UInt32)0x300 << lclp) * sizeof(CLzmaProb)); + p->saveState.litProbs = (CLzmaProb *)ISzAlloc_Alloc(alloc, ((UInt32)0x300 << lclp) * sizeof(CLzmaProb)); + if (!p->litProbs || !p->saveState.litProbs) + { + LzmaEnc_FreeLits(p, alloc); + return SZ_ERROR_MEM; + } + p->lclp = lclp; + } + } + + p->matchFinderBase.bigHash = (Byte)(p->dictSize > kBigHashDicLimit ? 1 : 0); + + if (beforeSize + p->dictSize < keepWindowSize) + beforeSize = keepWindowSize - p->dictSize; + + #ifndef _7ZIP_ST + if (p->mtMode) + { + RINOK(MatchFinderMt_Create(&p->matchFinderMt, p->dictSize, beforeSize, p->numFastBytes, + LZMA_MATCH_LEN_MAX + + 1 /* 18.04 */ + , allocBig)); + p->matchFinderObj = &p->matchFinderMt; + p->matchFinderBase.bigHash = (Byte)( + (p->dictSize > kBigHashDicLimit && p->matchFinderBase.hashMask >= 0xFFFFFF) ? 1 : 0); + MatchFinderMt_CreateVTable(&p->matchFinderMt, &p->matchFinder); + } + else + #endif + { + if (!MatchFinder_Create(&p->matchFinderBase, p->dictSize, beforeSize, p->numFastBytes, LZMA_MATCH_LEN_MAX, allocBig)) + return SZ_ERROR_MEM; + p->matchFinderObj = &p->matchFinderBase; + MatchFinder_CreateVTable(&p->matchFinderBase, &p->matchFinder); + } + + return SZ_OK; +} + +void LzmaEnc_Init(CLzmaEnc *p) +{ + unsigned i; + p->state = 0; + p->reps[0] = + p->reps[1] = + p->reps[2] = + p->reps[3] = 1; + + RangeEnc_Init(&p->rc); + + for (i = 0; i < (1 << kNumAlignBits); i++) + p->posAlignEncoder[i] = kProbInitValue; + + for (i = 0; i < kNumStates; i++) + { + unsigned j; + for (j = 0; j < LZMA_NUM_PB_STATES_MAX; j++) + { + p->isMatch[i][j] = kProbInitValue; + p->isRep0Long[i][j] = kProbInitValue; + } + p->isRep[i] = kProbInitValue; + p->isRepG0[i] = kProbInitValue; + p->isRepG1[i] = kProbInitValue; + p->isRepG2[i] = kProbInitValue; + } + + { + for (i = 0; i < kNumLenToPosStates; i++) + { + CLzmaProb *probs = p->posSlotEncoder[i]; + unsigned j; + for (j = 0; j < (1 << kNumPosSlotBits); j++) + probs[j] = kProbInitValue; + } + } + { + for (i = 0; i < kNumFullDistances; i++) + p->posEncoders[i] = kProbInitValue; + } + + { + UInt32 num = (UInt32)0x300 << (p->lp + p->lc); + UInt32 k; + CLzmaProb *probs = p->litProbs; + for (k = 0; k < num; k++) + probs[k] = kProbInitValue; + } + + + LenEnc_Init(&p->lenProbs); + LenEnc_Init(&p->repLenProbs); + + p->optEnd = 0; + p->optCur = 0; + + { + for (i = 0; i < kNumOpts; i++) + p->opt[i].price = kInfinityPrice; + } + + p->additionalOffset = 0; + + p->pbMask = (1 << p->pb) - 1; + p->lpMask = ((UInt32)0x100 << p->lp) - ((unsigned)0x100 >> p->lc); +} + + +void LzmaEnc_InitPrices(CLzmaEnc *p) +{ + if (!p->fastMode) + { + FillDistancesPrices(p); + FillAlignPrices(p); + } + + p->lenEnc.tableSize = + p->repLenEnc.tableSize = + p->numFastBytes + 1 - LZMA_MATCH_LEN_MIN; + + p->repLenEncCounter = REP_LEN_COUNT; + + LenPriceEnc_UpdateTables(&p->lenEnc, 1 << p->pb, &p->lenProbs, p->ProbPrices); + LenPriceEnc_UpdateTables(&p->repLenEnc, 1 << p->pb, &p->repLenProbs, p->ProbPrices); +} + +static SRes LzmaEnc_AllocAndInit(CLzmaEnc *p, UInt32 keepWindowSize, ISzAllocPtr alloc, ISzAllocPtr allocBig) +{ + unsigned i; + for (i = kEndPosModelIndex / 2; i < kDicLogSizeMax; i++) + if (p->dictSize <= ((UInt32)1 << i)) + break; + p->distTableSize = i * 2; + + p->finished = False; + p->result = SZ_OK; + RINOK(LzmaEnc_Alloc(p, keepWindowSize, alloc, allocBig)); + LzmaEnc_Init(p); + LzmaEnc_InitPrices(p); + p->nowPos64 = 0; + return SZ_OK; +} + +static SRes LzmaEnc_Prepare(CLzmaEncHandle pp, ISeqOutStream *outStream, ISeqInStream *inStream, + ISzAllocPtr alloc, ISzAllocPtr allocBig) +{ + CLzmaEnc *p = (CLzmaEnc *)pp; + p->matchFinderBase.stream = inStream; + p->needInit = 1; + p->rc.outStream = outStream; + return LzmaEnc_AllocAndInit(p, 0, alloc, allocBig); +} + +SRes LzmaEnc_PrepareForLzma2(CLzmaEncHandle pp, + ISeqInStream *inStream, UInt32 keepWindowSize, + ISzAllocPtr alloc, ISzAllocPtr allocBig) +{ + CLzmaEnc *p = (CLzmaEnc *)pp; + p->matchFinderBase.stream = inStream; + p->needInit = 1; + return LzmaEnc_AllocAndInit(p, keepWindowSize, alloc, allocBig); +} + +static void LzmaEnc_SetInputBuf(CLzmaEnc *p, const Byte *src, SizeT srcLen) +{ + p->matchFinderBase.directInput = 1; + p->matchFinderBase.bufferBase = (Byte *)src; + p->matchFinderBase.directInputRem = srcLen; +} + +SRes LzmaEnc_MemPrepare(CLzmaEncHandle pp, const Byte *src, SizeT srcLen, + UInt32 keepWindowSize, ISzAllocPtr alloc, ISzAllocPtr allocBig) +{ + CLzmaEnc *p = (CLzmaEnc *)pp; + LzmaEnc_SetInputBuf(p, src, srcLen); + p->needInit = 1; + + LzmaEnc_SetDataSize(pp, srcLen); + return LzmaEnc_AllocAndInit(p, keepWindowSize, alloc, allocBig); +} + +void LzmaEnc_Finish(CLzmaEncHandle pp) +{ + #ifndef _7ZIP_ST + CLzmaEnc *p = (CLzmaEnc *)pp; + if (p->mtMode) + MatchFinderMt_ReleaseStream(&p->matchFinderMt); + #else + UNUSED_VAR(pp); + #endif +} + + +typedef struct +{ + ISeqOutStream vt; + Byte *data; + SizeT rem; + BoolInt overflow; +} CLzmaEnc_SeqOutStreamBuf; + +static size_t SeqOutStreamBuf_Write(const ISeqOutStream *pp, const void *data, size_t size) +{ + CLzmaEnc_SeqOutStreamBuf *p = CONTAINER_FROM_VTBL(pp, CLzmaEnc_SeqOutStreamBuf, vt); + if (p->rem < size) + { + size = p->rem; + p->overflow = True; + } + memcpy(p->data, data, size); + p->rem -= size; + p->data += size; + return size; +} + + +UInt32 LzmaEnc_GetNumAvailableBytes(CLzmaEncHandle pp) +{ + const CLzmaEnc *p = (CLzmaEnc *)pp; + return p->matchFinder.GetNumAvailableBytes(p->matchFinderObj); +} + + +const Byte *LzmaEnc_GetCurBuf(CLzmaEncHandle pp) +{ + const CLzmaEnc *p = (CLzmaEnc *)pp; + return p->matchFinder.GetPointerToCurrentPos(p->matchFinderObj) - p->additionalOffset; +} + + +SRes LzmaEnc_CodeOneMemBlock(CLzmaEncHandle pp, BoolInt reInit, + Byte *dest, size_t *destLen, UInt32 desiredPackSize, UInt32 *unpackSize) +{ + CLzmaEnc *p = (CLzmaEnc *)pp; + UInt64 nowPos64; + SRes res; + CLzmaEnc_SeqOutStreamBuf outStream; + + outStream.vt.Write = SeqOutStreamBuf_Write; + outStream.data = dest; + outStream.rem = *destLen; + outStream.overflow = False; + + p->writeEndMark = False; + p->finished = False; + p->result = SZ_OK; + + if (reInit) + LzmaEnc_Init(p); + LzmaEnc_InitPrices(p); + + nowPos64 = p->nowPos64; + RangeEnc_Init(&p->rc); + p->rc.outStream = &outStream.vt; + + if (desiredPackSize == 0) + return SZ_ERROR_OUTPUT_EOF; + + res = LzmaEnc_CodeOneBlock(p, desiredPackSize, *unpackSize); + + *unpackSize = (UInt32)(p->nowPos64 - nowPos64); + *destLen -= outStream.rem; + if (outStream.overflow) + return SZ_ERROR_OUTPUT_EOF; + + return res; +} + + +static SRes LzmaEnc_Encode2(CLzmaEnc *p, ICompressProgress *progress) +{ + SRes res = SZ_OK; + + #ifndef _7ZIP_ST + Byte allocaDummy[0x300]; + allocaDummy[0] = 0; + allocaDummy[1] = allocaDummy[0]; + #endif + + for (;;) + { + res = LzmaEnc_CodeOneBlock(p, 0, 0); + if (res != SZ_OK || p->finished) + break; + if (progress) + { + res = ICompressProgress_Progress(progress, p->nowPos64, RangeEnc_GetProcessed(&p->rc)); + if (res != SZ_OK) + { + res = SZ_ERROR_PROGRESS; + break; + } + } + } + + LzmaEnc_Finish(p); + + /* + if (res == SZ_OK && !Inline_MatchFinder_IsFinishedOK(&p->matchFinderBase)) + res = SZ_ERROR_FAIL; + } + */ + + return res; +} + + +SRes LzmaEnc_Encode(CLzmaEncHandle pp, ISeqOutStream *outStream, ISeqInStream *inStream, ICompressProgress *progress, + ISzAllocPtr alloc, ISzAllocPtr allocBig) +{ + RINOK(LzmaEnc_Prepare(pp, outStream, inStream, alloc, allocBig)); + return LzmaEnc_Encode2((CLzmaEnc *)pp, progress); +} + + +SRes LzmaEnc_WriteProperties(CLzmaEncHandle pp, Byte *props, SizeT *size) +{ + CLzmaEnc *p = (CLzmaEnc *)pp; + unsigned i; + UInt32 dictSize = p->dictSize; + if (*size < LZMA_PROPS_SIZE) + return SZ_ERROR_PARAM; + *size = LZMA_PROPS_SIZE; + props[0] = (Byte)((p->pb * 5 + p->lp) * 9 + p->lc); + + if (dictSize >= ((UInt32)1 << 22)) + { + UInt32 kDictMask = ((UInt32)1 << 20) - 1; + if (dictSize < (UInt32)0xFFFFFFFF - kDictMask) + dictSize = (dictSize + kDictMask) & ~kDictMask; + } + else for (i = 11; i <= 30; i++) + { + if (dictSize <= ((UInt32)2 << i)) { dictSize = (2 << i); break; } + if (dictSize <= ((UInt32)3 << i)) { dictSize = (3 << i); break; } + } + + for (i = 0; i < 4; i++) + props[1 + i] = (Byte)(dictSize >> (8 * i)); + return SZ_OK; +} + + +unsigned LzmaEnc_IsWriteEndMark(CLzmaEncHandle pp) +{ + return ((CLzmaEnc *)pp)->writeEndMark; +} + + +SRes LzmaEnc_MemEncode(CLzmaEncHandle pp, Byte *dest, SizeT *destLen, const Byte *src, SizeT srcLen, + int writeEndMark, ICompressProgress *progress, ISzAllocPtr alloc, ISzAllocPtr allocBig) +{ + SRes res; + CLzmaEnc *p = (CLzmaEnc *)pp; + + CLzmaEnc_SeqOutStreamBuf outStream; + + outStream.vt.Write = SeqOutStreamBuf_Write; + outStream.data = dest; + outStream.rem = *destLen; + outStream.overflow = False; + + p->writeEndMark = writeEndMark; + p->rc.outStream = &outStream.vt; + + res = LzmaEnc_MemPrepare(pp, src, srcLen, 0, alloc, allocBig); + + if (res == SZ_OK) + { + res = LzmaEnc_Encode2(p, progress); + if (res == SZ_OK && p->nowPos64 != srcLen) + res = SZ_ERROR_FAIL; + } + + *destLen -= outStream.rem; + if (outStream.overflow) + return SZ_ERROR_OUTPUT_EOF; + return res; +} + + +SRes LzmaEncode(Byte *dest, SizeT *destLen, const Byte *src, SizeT srcLen, + const CLzmaEncProps *props, Byte *propsEncoded, SizeT *propsSize, int writeEndMark, + ICompressProgress *progress, ISzAllocPtr alloc, ISzAllocPtr allocBig) +{ + CLzmaEnc *p = (CLzmaEnc *)LzmaEnc_Create(alloc); + SRes res; + if (!p) + return SZ_ERROR_MEM; + + res = LzmaEnc_SetProps(p, props); + if (res == SZ_OK) + { + res = LzmaEnc_WriteProperties(p, propsEncoded, propsSize); + if (res == SZ_OK) + res = LzmaEnc_MemEncode(p, dest, destLen, src, srcLen, + writeEndMark, progress, alloc, allocBig); + } + + LzmaEnc_Destroy(p, alloc, allocBig); + return res; +} diff --git a/code/nel/3rdparty/seven_zip/LzmaEnc.h b/code/nel/3rdparty/seven_zip/LzmaEnc.h new file mode 100644 index 000000000..9194ee576 --- /dev/null +++ b/code/nel/3rdparty/seven_zip/LzmaEnc.h @@ -0,0 +1,76 @@ +/* LzmaEnc.h -- LZMA Encoder +2017-07-27 : Igor Pavlov : Public domain */ + +#ifndef __LZMA_ENC_H +#define __LZMA_ENC_H + +#include "7zTypes.h" + +EXTERN_C_BEGIN + +#define LZMA_PROPS_SIZE 5 + +typedef struct _CLzmaEncProps +{ + int level; /* 0 <= level <= 9 */ + UInt32 dictSize; /* (1 << 12) <= dictSize <= (1 << 27) for 32-bit version + (1 << 12) <= dictSize <= (3 << 29) for 64-bit version + default = (1 << 24) */ + int lc; /* 0 <= lc <= 8, default = 3 */ + int lp; /* 0 <= lp <= 4, default = 0 */ + int pb; /* 0 <= pb <= 4, default = 2 */ + int algo; /* 0 - fast, 1 - normal, default = 1 */ + int fb; /* 5 <= fb <= 273, default = 32 */ + int btMode; /* 0 - hashChain Mode, 1 - binTree mode - normal, default = 1 */ + int numHashBytes; /* 2, 3 or 4, default = 4 */ + UInt32 mc; /* 1 <= mc <= (1 << 30), default = 32 */ + unsigned writeEndMark; /* 0 - do not write EOPM, 1 - write EOPM, default = 0 */ + int numThreads; /* 1 or 2, default = 2 */ + + UInt64 reduceSize; /* estimated size of data that will be compressed. default = (UInt64)(Int64)-1. + Encoder uses this value to reduce dictionary size */ +} CLzmaEncProps; + +void LzmaEncProps_Init(CLzmaEncProps *p); +void LzmaEncProps_Normalize(CLzmaEncProps *p); +UInt32 LzmaEncProps_GetDictSize(const CLzmaEncProps *props2); + + +/* ---------- CLzmaEncHandle Interface ---------- */ + +/* LzmaEnc* functions can return the following exit codes: +SRes: + SZ_OK - OK + SZ_ERROR_MEM - Memory allocation error + SZ_ERROR_PARAM - Incorrect paramater in props + SZ_ERROR_WRITE - ISeqOutStream write callback error + SZ_ERROR_OUTPUT_EOF - output buffer overflow - version with (Byte *) output + SZ_ERROR_PROGRESS - some break from progress callback + SZ_ERROR_THREAD - error in multithreading functions (only for Mt version) +*/ + +typedef void * CLzmaEncHandle; + +CLzmaEncHandle LzmaEnc_Create(ISzAllocPtr alloc); +void LzmaEnc_Destroy(CLzmaEncHandle p, ISzAllocPtr alloc, ISzAllocPtr allocBig); + +SRes LzmaEnc_SetProps(CLzmaEncHandle p, const CLzmaEncProps *props); +void LzmaEnc_SetDataSize(CLzmaEncHandle p, UInt64 expectedDataSiize); +SRes LzmaEnc_WriteProperties(CLzmaEncHandle p, Byte *properties, SizeT *size); +unsigned LzmaEnc_IsWriteEndMark(CLzmaEncHandle p); + +SRes LzmaEnc_Encode(CLzmaEncHandle p, ISeqOutStream *outStream, ISeqInStream *inStream, + ICompressProgress *progress, ISzAllocPtr alloc, ISzAllocPtr allocBig); +SRes LzmaEnc_MemEncode(CLzmaEncHandle p, Byte *dest, SizeT *destLen, const Byte *src, SizeT srcLen, + int writeEndMark, ICompressProgress *progress, ISzAllocPtr alloc, ISzAllocPtr allocBig); + + +/* ---------- One Call Interface ---------- */ + +SRes LzmaEncode(Byte *dest, SizeT *destLen, const Byte *src, SizeT srcLen, + const CLzmaEncProps *props, Byte *propsEncoded, SizeT *propsSize, int writeEndMark, + ICompressProgress *progress, ISzAllocPtr alloc, ISzAllocPtr allocBig); + +EXTERN_C_END + +#endif diff --git a/code/nel/3rdparty/seven_zip/LzmaLib.c b/code/nel/3rdparty/seven_zip/LzmaLib.c new file mode 100644 index 000000000..706e9e58c --- /dev/null +++ b/code/nel/3rdparty/seven_zip/LzmaLib.c @@ -0,0 +1,40 @@ +/* LzmaLib.c -- LZMA library wrapper +2015-06-13 : Igor Pavlov : Public domain */ + +#include "Alloc.h" +#include "LzmaDec.h" +#include "LzmaEnc.h" +#include "LzmaLib.h" + +MY_STDAPI LzmaCompress(unsigned char *dest, size_t *destLen, const unsigned char *src, size_t srcLen, + unsigned char *outProps, size_t *outPropsSize, + int level, /* 0 <= level <= 9, default = 5 */ + unsigned dictSize, /* use (1 << N) or (3 << N). 4 KB < dictSize <= 128 MB */ + int lc, /* 0 <= lc <= 8, default = 3 */ + int lp, /* 0 <= lp <= 4, default = 0 */ + int pb, /* 0 <= pb <= 4, default = 2 */ + int fb, /* 5 <= fb <= 273, default = 32 */ + int numThreads /* 1 or 2, default = 2 */ +) +{ + CLzmaEncProps props; + LzmaEncProps_Init(&props); + props.level = level; + props.dictSize = dictSize; + props.lc = lc; + props.lp = lp; + props.pb = pb; + props.fb = fb; + props.numThreads = numThreads; + + return LzmaEncode(dest, destLen, src, srcLen, &props, outProps, outPropsSize, 0, + NULL, &g_Alloc, &g_Alloc); +} + + +MY_STDAPI LzmaUncompress(unsigned char *dest, size_t *destLen, const unsigned char *src, size_t *srcLen, + const unsigned char *props, size_t propsSize) +{ + ELzmaStatus status; + return LzmaDecode(dest, destLen, src, srcLen, props, (unsigned)propsSize, LZMA_FINISH_ANY, &status, &g_Alloc); +} diff --git a/code/nel/3rdparty/seven_zip/LzmaLib.h b/code/nel/3rdparty/seven_zip/LzmaLib.h new file mode 100644 index 000000000..88fa87d35 --- /dev/null +++ b/code/nel/3rdparty/seven_zip/LzmaLib.h @@ -0,0 +1,131 @@ +/* LzmaLib.h -- LZMA library interface +2013-01-18 : Igor Pavlov : Public domain */ + +#ifndef __LZMA_LIB_H +#define __LZMA_LIB_H + +#include "7zTypes.h" + +EXTERN_C_BEGIN + +#define MY_STDAPI int MY_STD_CALL + +#define LZMA_PROPS_SIZE 5 + +/* +RAM requirements for LZMA: + for compression: (dictSize * 11.5 + 6 MB) + state_size + for decompression: dictSize + state_size + state_size = (4 + (1.5 << (lc + lp))) KB + by default (lc=3, lp=0), state_size = 16 KB. + +LZMA properties (5 bytes) format + Offset Size Description + 0 1 lc, lp and pb in encoded form. + 1 4 dictSize (little endian). +*/ + +/* +LzmaCompress +------------ + +outPropsSize - + In: the pointer to the size of outProps buffer; *outPropsSize = LZMA_PROPS_SIZE = 5. + Out: the pointer to the size of written properties in outProps buffer; *outPropsSize = LZMA_PROPS_SIZE = 5. + + LZMA Encoder will use defult values for any parameter, if it is + -1 for any from: level, loc, lp, pb, fb, numThreads + 0 for dictSize + +level - compression level: 0 <= level <= 9; + + level dictSize algo fb + 0: 16 KB 0 32 + 1: 64 KB 0 32 + 2: 256 KB 0 32 + 3: 1 MB 0 32 + 4: 4 MB 0 32 + 5: 16 MB 1 32 + 6: 32 MB 1 32 + 7+: 64 MB 1 64 + + The default value for "level" is 5. + + algo = 0 means fast method + algo = 1 means normal method + +dictSize - The dictionary size in bytes. The maximum value is + 128 MB = (1 << 27) bytes for 32-bit version + 1 GB = (1 << 30) bytes for 64-bit version + The default value is 16 MB = (1 << 24) bytes. + It's recommended to use the dictionary that is larger than 4 KB and + that can be calculated as (1 << N) or (3 << N) sizes. + +lc - The number of literal context bits (high bits of previous literal). + It can be in the range from 0 to 8. The default value is 3. + Sometimes lc=4 gives the gain for big files. + +lp - The number of literal pos bits (low bits of current position for literals). + It can be in the range from 0 to 4. The default value is 0. + The lp switch is intended for periodical data when the period is equal to 2^lp. + For example, for 32-bit (4 bytes) periodical data you can use lp=2. Often it's + better to set lc=0, if you change lp switch. + +pb - The number of pos bits (low bits of current position). + It can be in the range from 0 to 4. The default value is 2. + The pb switch is intended for periodical data when the period is equal 2^pb. + +fb - Word size (the number of fast bytes). + It can be in the range from 5 to 273. The default value is 32. + Usually, a big number gives a little bit better compression ratio and + slower compression process. + +numThreads - The number of thereads. 1 or 2. The default value is 2. + Fast mode (algo = 0) can use only 1 thread. + +Out: + destLen - processed output size +Returns: + SZ_OK - OK + SZ_ERROR_MEM - Memory allocation error + SZ_ERROR_PARAM - Incorrect paramater + SZ_ERROR_OUTPUT_EOF - output buffer overflow + SZ_ERROR_THREAD - errors in multithreading functions (only for Mt version) +*/ + +MY_STDAPI LzmaCompress(unsigned char *dest, size_t *destLen, const unsigned char *src, size_t srcLen, + unsigned char *outProps, size_t *outPropsSize, /* *outPropsSize must be = 5 */ + int level, /* 0 <= level <= 9, default = 5 */ + unsigned dictSize, /* default = (1 << 24) */ + int lc, /* 0 <= lc <= 8, default = 3 */ + int lp, /* 0 <= lp <= 4, default = 0 */ + int pb, /* 0 <= pb <= 4, default = 2 */ + int fb, /* 5 <= fb <= 273, default = 32 */ + int numThreads /* 1 or 2, default = 2 */ + ); + +/* +LzmaUncompress +-------------- +In: + dest - output data + destLen - output data size + src - input data + srcLen - input data size +Out: + destLen - processed output size + srcLen - processed input size +Returns: + SZ_OK - OK + SZ_ERROR_DATA - Data error + SZ_ERROR_MEM - Memory allocation arror + SZ_ERROR_UNSUPPORTED - Unsupported properties + SZ_ERROR_INPUT_EOF - it needs more bytes in input buffer (src) +*/ + +MY_STDAPI LzmaUncompress(unsigned char *dest, size_t *destLen, const unsigned char *src, SizeT *srcLen, + const unsigned char *props, size_t propsSize); + +EXTERN_C_END + +#endif diff --git a/code/nel/3rdparty/seven_zip/LzmaUtil.c b/code/nel/3rdparty/seven_zip/LzmaUtil.c new file mode 100644 index 000000000..6bdb2ad6c --- /dev/null +++ b/code/nel/3rdparty/seven_zip/LzmaUtil.c @@ -0,0 +1,258 @@ +/* LzmaUtil.c -- Test application for LZMA compression +2018-07-04 : Igor Pavlov : Public domain */ + +#include "Precomp.h" + +#include +#include +#include + +#include "CpuArch.h" + +#include "Alloc.h" +#include "7zFile.h" +#include "7zVersion.h" +#include "LzmaDec.h" +#include "LzmaEnc.h" + +static const char * const kCantReadMessage = "Can not read input file"; +static const char * const kCantWriteMessage = "Can not write output file"; +static const char * const kCantAllocateMessage = "Can not allocate memory"; +static const char * const kDataErrorMessage = "Data error"; + +static void PrintHelp(char *buffer) +{ + strcat(buffer, + "\nLZMA-C " MY_VERSION_CPU " : " MY_COPYRIGHT_DATE "\n\n" + "Usage: lzma inputFile outputFile\n" + " e: encode file\n" + " d: decode file\n"); +} + +static int PrintError(char *buffer, const char *message) +{ + strcat(buffer, "\nError: "); + strcat(buffer, message); + strcat(buffer, "\n"); + return 1; +} + +static int PrintErrorNumber(char *buffer, SRes val) +{ + sprintf(buffer + strlen(buffer), "\nError code: %x\n", (unsigned)val); + return 1; +} + +static int PrintUserError(char *buffer) +{ + return PrintError(buffer, "Incorrect command"); +} + + +#define IN_BUF_SIZE (1 << 16) +#define OUT_BUF_SIZE (1 << 16) + + +static SRes Decode2(CLzmaDec *state, ISeqOutStream *outStream, ISeqInStream *inStream, + UInt64 unpackSize) +{ + int thereIsSize = (unpackSize != (UInt64)(Int64)-1); + Byte inBuf[IN_BUF_SIZE]; + Byte outBuf[OUT_BUF_SIZE]; + size_t inPos = 0, inSize = 0, outPos = 0; + LzmaDec_Init(state); + for (;;) + { + if (inPos == inSize) + { + inSize = IN_BUF_SIZE; + RINOK(inStream->Read(inStream, inBuf, &inSize)); + inPos = 0; + } + { + SRes res; + SizeT inProcessed = inSize - inPos; + SizeT outProcessed = OUT_BUF_SIZE - outPos; + ELzmaFinishMode finishMode = LZMA_FINISH_ANY; + ELzmaStatus status; + if (thereIsSize && outProcessed > unpackSize) + { + outProcessed = (SizeT)unpackSize; + finishMode = LZMA_FINISH_END; + } + + res = LzmaDec_DecodeToBuf(state, outBuf + outPos, &outProcessed, + inBuf + inPos, &inProcessed, finishMode, &status); + inPos += inProcessed; + outPos += outProcessed; + unpackSize -= outProcessed; + + if (outStream) + if (outStream->Write(outStream, outBuf, outPos) != outPos) + return SZ_ERROR_WRITE; + + outPos = 0; + + if (res != SZ_OK || (thereIsSize && unpackSize == 0)) + return res; + + if (inProcessed == 0 && outProcessed == 0) + { + if (thereIsSize || status != LZMA_STATUS_FINISHED_WITH_MARK) + return SZ_ERROR_DATA; + return res; + } + } + } +} + + +static SRes Decode(ISeqOutStream *outStream, ISeqInStream *inStream) +{ + UInt64 unpackSize; + int i; + SRes res = 0; + + CLzmaDec state; + + /* header: 5 bytes of LZMA properties and 8 bytes of uncompressed size */ + unsigned char header[LZMA_PROPS_SIZE + 8]; + + /* Read and parse header */ + + RINOK(SeqInStream_Read(inStream, header, sizeof(header))); + + unpackSize = 0; + for (i = 0; i < 8; i++) + unpackSize += (UInt64)header[LZMA_PROPS_SIZE + i] << (i * 8); + + LzmaDec_Construct(&state); + RINOK(LzmaDec_Allocate(&state, header, LZMA_PROPS_SIZE, &g_Alloc)); + res = Decode2(&state, outStream, inStream, unpackSize); + LzmaDec_Free(&state, &g_Alloc); + return res; +} + +static SRes Encode(ISeqOutStream *outStream, ISeqInStream *inStream, UInt64 fileSize, char *rs) +{ + CLzmaEncHandle enc; + SRes res; + CLzmaEncProps props; + + UNUSED_VAR(rs); + + enc = LzmaEnc_Create(&g_Alloc); + if (enc == 0) + return SZ_ERROR_MEM; + + LzmaEncProps_Init(&props); + res = LzmaEnc_SetProps(enc, &props); + + if (res == SZ_OK) + { + Byte header[LZMA_PROPS_SIZE + 8]; + size_t headerSize = LZMA_PROPS_SIZE; + int i; + + res = LzmaEnc_WriteProperties(enc, header, &headerSize); + for (i = 0; i < 8; i++) + header[headerSize++] = (Byte)(fileSize >> (8 * i)); + if (outStream->Write(outStream, header, headerSize) != headerSize) + res = SZ_ERROR_WRITE; + else + { + if (res == SZ_OK) + res = LzmaEnc_Encode(enc, outStream, inStream, NULL, &g_Alloc, &g_Alloc); + } + } + LzmaEnc_Destroy(enc, &g_Alloc, &g_Alloc); + return res; +} + + +static int main2(int numArgs, const char *args[], char *rs) +{ + CFileSeqInStream inStream; + CFileOutStream outStream; + char c; + int res; + int encodeMode; + BoolInt useOutFile = False; + + FileSeqInStream_CreateVTable(&inStream); + File_Construct(&inStream.file); + + FileOutStream_CreateVTable(&outStream); + File_Construct(&outStream.file); + + if (numArgs == 1) + { + PrintHelp(rs); + return 0; + } + + if (numArgs < 3 || numArgs > 4 || strlen(args[1]) != 1) + return PrintUserError(rs); + + c = args[1][0]; + encodeMode = (c == 'e' || c == 'E'); + if (!encodeMode && c != 'd' && c != 'D') + return PrintUserError(rs); + + { + size_t t4 = sizeof(UInt32); + size_t t8 = sizeof(UInt64); + if (t4 != 4 || t8 != 8) + return PrintError(rs, "Incorrect UInt32 or UInt64"); + } + + if (InFile_Open(&inStream.file, args[2]) != 0) + return PrintError(rs, "Can not open input file"); + + if (numArgs > 3) + { + useOutFile = True; + if (OutFile_Open(&outStream.file, args[3]) != 0) + return PrintError(rs, "Can not open output file"); + } + else if (encodeMode) + PrintUserError(rs); + + if (encodeMode) + { + UInt64 fileSize; + File_GetLength(&inStream.file, &fileSize); + res = Encode(&outStream.vt, &inStream.vt, fileSize, rs); + } + else + { + res = Decode(&outStream.vt, useOutFile ? &inStream.vt : NULL); + } + + if (useOutFile) + File_Close(&outStream.file); + File_Close(&inStream.file); + + if (res != SZ_OK) + { + if (res == SZ_ERROR_MEM) + return PrintError(rs, kCantAllocateMessage); + else if (res == SZ_ERROR_DATA) + return PrintError(rs, kDataErrorMessage); + else if (res == SZ_ERROR_WRITE) + return PrintError(rs, kCantWriteMessage); + else if (res == SZ_ERROR_READ) + return PrintError(rs, kCantReadMessage); + return PrintErrorNumber(rs, res); + } + return 0; +} + + +int MY_CDECL main(int numArgs, const char *args[]) +{ + char rs[800] = { 0 }; + int res = main2(numArgs, args, rs); + fputs(rs, stdout); + return res; +} diff --git a/code/nel/3rdparty/seven_zip/Ppmd.h b/code/nel/3rdparty/seven_zip/Ppmd.h new file mode 100644 index 000000000..a5c1e3ef2 --- /dev/null +++ b/code/nel/3rdparty/seven_zip/Ppmd.h @@ -0,0 +1,85 @@ +/* Ppmd.h -- PPMD codec common code +2017-04-03 : Igor Pavlov : Public domain +This code is based on PPMd var.H (2001): Dmitry Shkarin : Public domain */ + +#ifndef __PPMD_H +#define __PPMD_H + +#include "CpuArch.h" + +EXTERN_C_BEGIN + +#ifdef MY_CPU_32BIT + #define PPMD_32BIT +#endif + +#define PPMD_INT_BITS 7 +#define PPMD_PERIOD_BITS 7 +#define PPMD_BIN_SCALE (1 << (PPMD_INT_BITS + PPMD_PERIOD_BITS)) + +#define PPMD_GET_MEAN_SPEC(summ, shift, round) (((summ) + (1 << ((shift) - (round)))) >> (shift)) +#define PPMD_GET_MEAN(summ) PPMD_GET_MEAN_SPEC((summ), PPMD_PERIOD_BITS, 2) +#define PPMD_UPDATE_PROB_0(prob) ((prob) + (1 << PPMD_INT_BITS) - PPMD_GET_MEAN(prob)) +#define PPMD_UPDATE_PROB_1(prob) ((prob) - PPMD_GET_MEAN(prob)) + +#define PPMD_N1 4 +#define PPMD_N2 4 +#define PPMD_N3 4 +#define PPMD_N4 ((128 + 3 - 1 * PPMD_N1 - 2 * PPMD_N2 - 3 * PPMD_N3) / 4) +#define PPMD_NUM_INDEXES (PPMD_N1 + PPMD_N2 + PPMD_N3 + PPMD_N4) + +#pragma pack(push, 1) +/* Most compilers works OK here even without #pragma pack(push, 1), but some GCC compilers need it. */ + +/* SEE-contexts for PPM-contexts with masked symbols */ +typedef struct +{ + UInt16 Summ; /* Freq */ + Byte Shift; /* Speed of Freq change; low Shift is for fast change */ + Byte Count; /* Count to next change of Shift */ +} CPpmd_See; + +#define Ppmd_See_Update(p) if ((p)->Shift < PPMD_PERIOD_BITS && --(p)->Count == 0) \ + { (p)->Summ <<= 1; (p)->Count = (Byte)(3 << (p)->Shift++); } + +typedef struct +{ + Byte Symbol; + Byte Freq; + UInt16 SuccessorLow; + UInt16 SuccessorHigh; +} CPpmd_State; + +#pragma pack(pop) + +typedef + #ifdef PPMD_32BIT + CPpmd_State * + #else + UInt32 + #endif + CPpmd_State_Ref; + +typedef + #ifdef PPMD_32BIT + void * + #else + UInt32 + #endif + CPpmd_Void_Ref; + +typedef + #ifdef PPMD_32BIT + Byte * + #else + UInt32 + #endif + CPpmd_Byte_Ref; + +#define PPMD_SetAllBitsIn256Bytes(p) \ + { size_t z; for (z = 0; z < 256 / sizeof(p[0]); z += 8) { \ + p[z+7] = p[z+6] = p[z+5] = p[z+4] = p[z+3] = p[z+2] = p[z+1] = p[z+0] = ~(size_t)0; }} + +EXTERN_C_END + +#endif diff --git a/code/nel/3rdparty/seven_zip/Ppmd7.c b/code/nel/3rdparty/seven_zip/Ppmd7.c new file mode 100644 index 000000000..470aadccf --- /dev/null +++ b/code/nel/3rdparty/seven_zip/Ppmd7.c @@ -0,0 +1,712 @@ +/* Ppmd7.c -- PPMdH codec +2018-07-04 : Igor Pavlov : Public domain +This code is based on PPMd var.H (2001): Dmitry Shkarin : Public domain */ + +#include "Precomp.h" + +#include + +#include "Ppmd7.h" + +const Byte PPMD7_kExpEscape[16] = { 25, 14, 9, 7, 5, 5, 4, 4, 4, 3, 3, 3, 2, 2, 2, 2 }; +static const UInt16 kInitBinEsc[] = { 0x3CDD, 0x1F3F, 0x59BF, 0x48F3, 0x64A1, 0x5ABC, 0x6632, 0x6051}; + +#define MAX_FREQ 124 +#define UNIT_SIZE 12 + +#define U2B(nu) ((UInt32)(nu) * UNIT_SIZE) +#define U2I(nu) (p->Units2Indx[(size_t)(nu) - 1]) +#define I2U(indx) (p->Indx2Units[indx]) + +#ifdef PPMD_32BIT + #define REF(ptr) (ptr) +#else + #define REF(ptr) ((UInt32)((Byte *)(ptr) - (p)->Base)) +#endif + +#define STATS_REF(ptr) ((CPpmd_State_Ref)REF(ptr)) + +#define CTX(ref) ((CPpmd7_Context *)Ppmd7_GetContext(p, ref)) +#define STATS(ctx) Ppmd7_GetStats(p, ctx) +#define ONE_STATE(ctx) Ppmd7Context_OneState(ctx) +#define SUFFIX(ctx) CTX((ctx)->Suffix) + +typedef CPpmd7_Context * CTX_PTR; + +struct CPpmd7_Node_; + +typedef + #ifdef PPMD_32BIT + struct CPpmd7_Node_ * + #else + UInt32 + #endif + CPpmd7_Node_Ref; + +typedef struct CPpmd7_Node_ +{ + UInt16 Stamp; /* must be at offset 0 as CPpmd7_Context::NumStats. Stamp=0 means free */ + UInt16 NU; + CPpmd7_Node_Ref Next; /* must be at offset >= 4 */ + CPpmd7_Node_Ref Prev; +} CPpmd7_Node; + +#ifdef PPMD_32BIT + #define NODE(ptr) (ptr) +#else + #define NODE(offs) ((CPpmd7_Node *)(p->Base + (offs))) +#endif + +void Ppmd7_Construct(CPpmd7 *p) +{ + unsigned i, k, m; + + p->Base = 0; + + for (i = 0, k = 0; i < PPMD_NUM_INDEXES; i++) + { + unsigned step = (i >= 12 ? 4 : (i >> 2) + 1); + do { p->Units2Indx[k++] = (Byte)i; } while (--step); + p->Indx2Units[i] = (Byte)k; + } + + p->NS2BSIndx[0] = (0 << 1); + p->NS2BSIndx[1] = (1 << 1); + memset(p->NS2BSIndx + 2, (2 << 1), 9); + memset(p->NS2BSIndx + 11, (3 << 1), 256 - 11); + + for (i = 0; i < 3; i++) + p->NS2Indx[i] = (Byte)i; + for (m = i, k = 1; i < 256; i++) + { + p->NS2Indx[i] = (Byte)m; + if (--k == 0) + k = (++m) - 2; + } + + memset(p->HB2Flag, 0, 0x40); + memset(p->HB2Flag + 0x40, 8, 0x100 - 0x40); +} + +void Ppmd7_Free(CPpmd7 *p, ISzAllocPtr alloc) +{ + ISzAlloc_Free(alloc, p->Base); + p->Size = 0; + p->Base = 0; +} + +BoolInt Ppmd7_Alloc(CPpmd7 *p, UInt32 size, ISzAllocPtr alloc) +{ + if (!p->Base || p->Size != size) + { + size_t size2; + Ppmd7_Free(p, alloc); + size2 = 0 + #ifndef PPMD_32BIT + + UNIT_SIZE + #endif + ; + p->AlignOffset = + #ifdef PPMD_32BIT + (4 - size) & 3; + #else + 4 - (size & 3); + #endif + if ((p->Base = (Byte *)ISzAlloc_Alloc(alloc, p->AlignOffset + size + size2)) == 0) + return False; + p->Size = size; + } + return True; +} + +static void InsertNode(CPpmd7 *p, void *node, unsigned indx) +{ + *((CPpmd_Void_Ref *)node) = p->FreeList[indx]; + p->FreeList[indx] = REF(node); +} + +static void *RemoveNode(CPpmd7 *p, unsigned indx) +{ + CPpmd_Void_Ref *node = (CPpmd_Void_Ref *)Ppmd7_GetPtr(p, p->FreeList[indx]); + p->FreeList[indx] = *node; + return node; +} + +static void SplitBlock(CPpmd7 *p, void *ptr, unsigned oldIndx, unsigned newIndx) +{ + unsigned i, nu = I2U(oldIndx) - I2U(newIndx); + ptr = (Byte *)ptr + U2B(I2U(newIndx)); + if (I2U(i = U2I(nu)) != nu) + { + unsigned k = I2U(--i); + InsertNode(p, ((Byte *)ptr) + U2B(k), nu - k - 1); + } + InsertNode(p, ptr, i); +} + +static void GlueFreeBlocks(CPpmd7 *p) +{ + #ifdef PPMD_32BIT + CPpmd7_Node headItem; + CPpmd7_Node_Ref head = &headItem; + #else + CPpmd7_Node_Ref head = p->AlignOffset + p->Size; + #endif + + CPpmd7_Node_Ref n = head; + unsigned i; + + p->GlueCount = 255; + + /* create doubly-linked list of free blocks */ + for (i = 0; i < PPMD_NUM_INDEXES; i++) + { + UInt16 nu = I2U(i); + CPpmd7_Node_Ref next = (CPpmd7_Node_Ref)p->FreeList[i]; + p->FreeList[i] = 0; + while (next != 0) + { + CPpmd7_Node *node = NODE(next); + node->Next = n; + n = NODE(n)->Prev = next; + next = *(const CPpmd7_Node_Ref *)node; + node->Stamp = 0; + node->NU = (UInt16)nu; + } + } + NODE(head)->Stamp = 1; + NODE(head)->Next = n; + NODE(n)->Prev = head; + if (p->LoUnit != p->HiUnit) + ((CPpmd7_Node *)p->LoUnit)->Stamp = 1; + + /* Glue free blocks */ + while (n != head) + { + CPpmd7_Node *node = NODE(n); + UInt32 nu = (UInt32)node->NU; + for (;;) + { + CPpmd7_Node *node2 = NODE(n) + nu; + nu += node2->NU; + if (node2->Stamp != 0 || nu >= 0x10000) + break; + NODE(node2->Prev)->Next = node2->Next; + NODE(node2->Next)->Prev = node2->Prev; + node->NU = (UInt16)nu; + } + n = node->Next; + } + + /* Fill lists of free blocks */ + for (n = NODE(head)->Next; n != head;) + { + CPpmd7_Node *node = NODE(n); + unsigned nu; + CPpmd7_Node_Ref next = node->Next; + for (nu = node->NU; nu > 128; nu -= 128, node += 128) + InsertNode(p, node, PPMD_NUM_INDEXES - 1); + if (I2U(i = U2I(nu)) != nu) + { + unsigned k = I2U(--i); + InsertNode(p, node + k, nu - k - 1); + } + InsertNode(p, node, i); + n = next; + } +} + +static void *AllocUnitsRare(CPpmd7 *p, unsigned indx) +{ + unsigned i; + void *retVal; + if (p->GlueCount == 0) + { + GlueFreeBlocks(p); + if (p->FreeList[indx] != 0) + return RemoveNode(p, indx); + } + i = indx; + do + { + if (++i == PPMD_NUM_INDEXES) + { + UInt32 numBytes = U2B(I2U(indx)); + p->GlueCount--; + return ((UInt32)(p->UnitsStart - p->Text) > numBytes) ? (p->UnitsStart -= numBytes) : (NULL); + } + } + while (p->FreeList[i] == 0); + retVal = RemoveNode(p, i); + SplitBlock(p, retVal, i, indx); + return retVal; +} + +static void *AllocUnits(CPpmd7 *p, unsigned indx) +{ + UInt32 numBytes; + if (p->FreeList[indx] != 0) + return RemoveNode(p, indx); + numBytes = U2B(I2U(indx)); + if (numBytes <= (UInt32)(p->HiUnit - p->LoUnit)) + { + void *retVal = p->LoUnit; + p->LoUnit += numBytes; + return retVal; + } + return AllocUnitsRare(p, indx); +} + +#define MyMem12Cpy(dest, src, num) \ + { UInt32 *d = (UInt32 *)dest; const UInt32 *s = (const UInt32 *)src; UInt32 n = num; \ + do { d[0] = s[0]; d[1] = s[1]; d[2] = s[2]; s += 3; d += 3; } while (--n); } + +static void *ShrinkUnits(CPpmd7 *p, void *oldPtr, unsigned oldNU, unsigned newNU) +{ + unsigned i0 = U2I(oldNU); + unsigned i1 = U2I(newNU); + if (i0 == i1) + return oldPtr; + if (p->FreeList[i1] != 0) + { + void *ptr = RemoveNode(p, i1); + MyMem12Cpy(ptr, oldPtr, newNU); + InsertNode(p, oldPtr, i0); + return ptr; + } + SplitBlock(p, oldPtr, i0, i1); + return oldPtr; +} + +#define SUCCESSOR(p) ((CPpmd_Void_Ref)((p)->SuccessorLow | ((UInt32)(p)->SuccessorHigh << 16))) + +static void SetSuccessor(CPpmd_State *p, CPpmd_Void_Ref v) +{ + (p)->SuccessorLow = (UInt16)((UInt32)(v) & 0xFFFF); + (p)->SuccessorHigh = (UInt16)(((UInt32)(v) >> 16) & 0xFFFF); +} + +static void RestartModel(CPpmd7 *p) +{ + unsigned i, k, m; + + memset(p->FreeList, 0, sizeof(p->FreeList)); + p->Text = p->Base + p->AlignOffset; + p->HiUnit = p->Text + p->Size; + p->LoUnit = p->UnitsStart = p->HiUnit - p->Size / 8 / UNIT_SIZE * 7 * UNIT_SIZE; + p->GlueCount = 0; + + p->OrderFall = p->MaxOrder; + p->RunLength = p->InitRL = -(Int32)((p->MaxOrder < 12) ? p->MaxOrder : 12) - 1; + p->PrevSuccess = 0; + + p->MinContext = p->MaxContext = (CTX_PTR)(p->HiUnit -= UNIT_SIZE); /* AllocContext(p); */ + p->MinContext->Suffix = 0; + p->MinContext->NumStats = 256; + p->MinContext->SummFreq = 256 + 1; + p->FoundState = (CPpmd_State *)p->LoUnit; /* AllocUnits(p, PPMD_NUM_INDEXES - 1); */ + p->LoUnit += U2B(256 / 2); + p->MinContext->Stats = REF(p->FoundState); + for (i = 0; i < 256; i++) + { + CPpmd_State *s = &p->FoundState[i]; + s->Symbol = (Byte)i; + s->Freq = 1; + SetSuccessor(s, 0); + } + + for (i = 0; i < 128; i++) + for (k = 0; k < 8; k++) + { + UInt16 *dest = p->BinSumm[i] + k; + UInt16 val = (UInt16)(PPMD_BIN_SCALE - kInitBinEsc[k] / (i + 2)); + for (m = 0; m < 64; m += 8) + dest[m] = val; + } + + for (i = 0; i < 25; i++) + for (k = 0; k < 16; k++) + { + CPpmd_See *s = &p->See[i][k]; + s->Summ = (UInt16)((5 * i + 10) << (s->Shift = PPMD_PERIOD_BITS - 4)); + s->Count = 4; + } +} + +void Ppmd7_Init(CPpmd7 *p, unsigned maxOrder) +{ + p->MaxOrder = maxOrder; + RestartModel(p); + p->DummySee.Shift = PPMD_PERIOD_BITS; + p->DummySee.Summ = 0; /* unused */ + p->DummySee.Count = 64; /* unused */ +} + +static CTX_PTR CreateSuccessors(CPpmd7 *p, BoolInt skip) +{ + CPpmd_State upState; + CTX_PTR c = p->MinContext; + CPpmd_Byte_Ref upBranch = (CPpmd_Byte_Ref)SUCCESSOR(p->FoundState); + CPpmd_State *ps[PPMD7_MAX_ORDER]; + unsigned numPs = 0; + + if (!skip) + ps[numPs++] = p->FoundState; + + while (c->Suffix) + { + CPpmd_Void_Ref successor; + CPpmd_State *s; + c = SUFFIX(c); + if (c->NumStats != 1) + { + for (s = STATS(c); s->Symbol != p->FoundState->Symbol; s++); + } + else + s = ONE_STATE(c); + successor = SUCCESSOR(s); + if (successor != upBranch) + { + c = CTX(successor); + if (numPs == 0) + return c; + break; + } + ps[numPs++] = s; + } + + upState.Symbol = *(const Byte *)Ppmd7_GetPtr(p, upBranch); + SetSuccessor(&upState, upBranch + 1); + + if (c->NumStats == 1) + upState.Freq = ONE_STATE(c)->Freq; + else + { + UInt32 cf, s0; + CPpmd_State *s; + for (s = STATS(c); s->Symbol != upState.Symbol; s++); + cf = s->Freq - 1; + s0 = c->SummFreq - c->NumStats - cf; + upState.Freq = (Byte)(1 + ((2 * cf <= s0) ? (5 * cf > s0) : ((2 * cf + 3 * s0 - 1) / (2 * s0)))); + } + + do + { + /* Create Child */ + CTX_PTR c1; /* = AllocContext(p); */ + if (p->HiUnit != p->LoUnit) + c1 = (CTX_PTR)(p->HiUnit -= UNIT_SIZE); + else if (p->FreeList[0] != 0) + c1 = (CTX_PTR)RemoveNode(p, 0); + else + { + c1 = (CTX_PTR)AllocUnitsRare(p, 0); + if (!c1) + return NULL; + } + c1->NumStats = 1; + *ONE_STATE(c1) = upState; + c1->Suffix = REF(c); + SetSuccessor(ps[--numPs], REF(c1)); + c = c1; + } + while (numPs != 0); + + return c; +} + +static void SwapStates(CPpmd_State *t1, CPpmd_State *t2) +{ + CPpmd_State tmp = *t1; + *t1 = *t2; + *t2 = tmp; +} + +static void UpdateModel(CPpmd7 *p) +{ + CPpmd_Void_Ref successor, fSuccessor = SUCCESSOR(p->FoundState); + CTX_PTR c; + unsigned s0, ns; + + if (p->FoundState->Freq < MAX_FREQ / 4 && p->MinContext->Suffix != 0) + { + c = SUFFIX(p->MinContext); + + if (c->NumStats == 1) + { + CPpmd_State *s = ONE_STATE(c); + if (s->Freq < 32) + s->Freq++; + } + else + { + CPpmd_State *s = STATS(c); + if (s->Symbol != p->FoundState->Symbol) + { + do { s++; } while (s->Symbol != p->FoundState->Symbol); + if (s[0].Freq >= s[-1].Freq) + { + SwapStates(&s[0], &s[-1]); + s--; + } + } + if (s->Freq < MAX_FREQ - 9) + { + s->Freq += 2; + c->SummFreq += 2; + } + } + } + + if (p->OrderFall == 0) + { + p->MinContext = p->MaxContext = CreateSuccessors(p, True); + if (p->MinContext == 0) + { + RestartModel(p); + return; + } + SetSuccessor(p->FoundState, REF(p->MinContext)); + return; + } + + *p->Text++ = p->FoundState->Symbol; + successor = REF(p->Text); + if (p->Text >= p->UnitsStart) + { + RestartModel(p); + return; + } + + if (fSuccessor) + { + if (fSuccessor <= successor) + { + CTX_PTR cs = CreateSuccessors(p, False); + if (cs == NULL) + { + RestartModel(p); + return; + } + fSuccessor = REF(cs); + } + if (--p->OrderFall == 0) + { + successor = fSuccessor; + p->Text -= (p->MaxContext != p->MinContext); + } + } + else + { + SetSuccessor(p->FoundState, successor); + fSuccessor = REF(p->MinContext); + } + + s0 = p->MinContext->SummFreq - (ns = p->MinContext->NumStats) - (p->FoundState->Freq - 1); + + for (c = p->MaxContext; c != p->MinContext; c = SUFFIX(c)) + { + unsigned ns1; + UInt32 cf, sf; + if ((ns1 = c->NumStats) != 1) + { + if ((ns1 & 1) == 0) + { + /* Expand for one UNIT */ + unsigned oldNU = ns1 >> 1; + unsigned i = U2I(oldNU); + if (i != U2I((size_t)oldNU + 1)) + { + void *ptr = AllocUnits(p, i + 1); + void *oldPtr; + if (!ptr) + { + RestartModel(p); + return; + } + oldPtr = STATS(c); + MyMem12Cpy(ptr, oldPtr, oldNU); + InsertNode(p, oldPtr, i); + c->Stats = STATS_REF(ptr); + } + } + c->SummFreq = (UInt16)(c->SummFreq + (2 * ns1 < ns) + 2 * ((4 * ns1 <= ns) & (c->SummFreq <= 8 * ns1))); + } + else + { + CPpmd_State *s = (CPpmd_State*)AllocUnits(p, 0); + if (!s) + { + RestartModel(p); + return; + } + *s = *ONE_STATE(c); + c->Stats = REF(s); + if (s->Freq < MAX_FREQ / 4 - 1) + s->Freq <<= 1; + else + s->Freq = MAX_FREQ - 4; + c->SummFreq = (UInt16)(s->Freq + p->InitEsc + (ns > 3)); + } + cf = 2 * (UInt32)p->FoundState->Freq * (c->SummFreq + 6); + sf = (UInt32)s0 + c->SummFreq; + if (cf < 6 * sf) + { + cf = 1 + (cf > sf) + (cf >= 4 * sf); + c->SummFreq += 3; + } + else + { + cf = 4 + (cf >= 9 * sf) + (cf >= 12 * sf) + (cf >= 15 * sf); + c->SummFreq = (UInt16)(c->SummFreq + cf); + } + { + CPpmd_State *s = STATS(c) + ns1; + SetSuccessor(s, successor); + s->Symbol = p->FoundState->Symbol; + s->Freq = (Byte)cf; + c->NumStats = (UInt16)(ns1 + 1); + } + } + p->MaxContext = p->MinContext = CTX(fSuccessor); +} + +static void Rescale(CPpmd7 *p) +{ + unsigned i, adder, sumFreq, escFreq; + CPpmd_State *stats = STATS(p->MinContext); + CPpmd_State *s = p->FoundState; + { + CPpmd_State tmp = *s; + for (; s != stats; s--) + s[0] = s[-1]; + *s = tmp; + } + escFreq = p->MinContext->SummFreq - s->Freq; + s->Freq += 4; + adder = (p->OrderFall != 0); + s->Freq = (Byte)((s->Freq + adder) >> 1); + sumFreq = s->Freq; + + i = p->MinContext->NumStats - 1; + do + { + escFreq -= (++s)->Freq; + s->Freq = (Byte)((s->Freq + adder) >> 1); + sumFreq += s->Freq; + if (s[0].Freq > s[-1].Freq) + { + CPpmd_State *s1 = s; + CPpmd_State tmp = *s1; + do + s1[0] = s1[-1]; + while (--s1 != stats && tmp.Freq > s1[-1].Freq); + *s1 = tmp; + } + } + while (--i); + + if (s->Freq == 0) + { + unsigned numStats = p->MinContext->NumStats; + unsigned n0, n1; + do { i++; } while ((--s)->Freq == 0); + escFreq += i; + p->MinContext->NumStats = (UInt16)(p->MinContext->NumStats - i); + if (p->MinContext->NumStats == 1) + { + CPpmd_State tmp = *stats; + do + { + tmp.Freq = (Byte)(tmp.Freq - (tmp.Freq >> 1)); + escFreq >>= 1; + } + while (escFreq > 1); + InsertNode(p, stats, U2I(((numStats + 1) >> 1))); + *(p->FoundState = ONE_STATE(p->MinContext)) = tmp; + return; + } + n0 = (numStats + 1) >> 1; + n1 = (p->MinContext->NumStats + 1) >> 1; + if (n0 != n1) + p->MinContext->Stats = STATS_REF(ShrinkUnits(p, stats, n0, n1)); + } + p->MinContext->SummFreq = (UInt16)(sumFreq + escFreq - (escFreq >> 1)); + p->FoundState = STATS(p->MinContext); +} + +CPpmd_See *Ppmd7_MakeEscFreq(CPpmd7 *p, unsigned numMasked, UInt32 *escFreq) +{ + CPpmd_See *see; + unsigned nonMasked = p->MinContext->NumStats - numMasked; + if (p->MinContext->NumStats != 256) + { + see = p->See[(unsigned)p->NS2Indx[(size_t)nonMasked - 1]] + + (nonMasked < (unsigned)SUFFIX(p->MinContext)->NumStats - p->MinContext->NumStats) + + 2 * (unsigned)(p->MinContext->SummFreq < 11 * p->MinContext->NumStats) + + 4 * (unsigned)(numMasked > nonMasked) + + p->HiBitsFlag; + { + unsigned r = (see->Summ >> see->Shift); + see->Summ = (UInt16)(see->Summ - r); + *escFreq = r + (r == 0); + } + } + else + { + see = &p->DummySee; + *escFreq = 1; + } + return see; +} + +static void NextContext(CPpmd7 *p) +{ + CTX_PTR c = CTX(SUCCESSOR(p->FoundState)); + if (p->OrderFall == 0 && (Byte *)c > p->Text) + p->MinContext = p->MaxContext = c; + else + UpdateModel(p); +} + +void Ppmd7_Update1(CPpmd7 *p) +{ + CPpmd_State *s = p->FoundState; + s->Freq += 4; + p->MinContext->SummFreq += 4; + if (s[0].Freq > s[-1].Freq) + { + SwapStates(&s[0], &s[-1]); + p->FoundState = --s; + if (s->Freq > MAX_FREQ) + Rescale(p); + } + NextContext(p); +} + +void Ppmd7_Update1_0(CPpmd7 *p) +{ + p->PrevSuccess = (2 * p->FoundState->Freq > p->MinContext->SummFreq); + p->RunLength += p->PrevSuccess; + p->MinContext->SummFreq += 4; + if ((p->FoundState->Freq += 4) > MAX_FREQ) + Rescale(p); + NextContext(p); +} + +void Ppmd7_UpdateBin(CPpmd7 *p) +{ + p->FoundState->Freq = (Byte)(p->FoundState->Freq + (p->FoundState->Freq < 128 ? 1: 0)); + p->PrevSuccess = 1; + p->RunLength++; + NextContext(p); +} + +void Ppmd7_Update2(CPpmd7 *p) +{ + p->MinContext->SummFreq += 4; + if ((p->FoundState->Freq += 4) > MAX_FREQ) + Rescale(p); + p->RunLength = p->InitRL; + UpdateModel(p); +} diff --git a/code/nel/3rdparty/seven_zip/Ppmd7.h b/code/nel/3rdparty/seven_zip/Ppmd7.h new file mode 100644 index 000000000..610539a04 --- /dev/null +++ b/code/nel/3rdparty/seven_zip/Ppmd7.h @@ -0,0 +1,142 @@ +/* Ppmd7.h -- PPMdH compression codec +2018-07-04 : Igor Pavlov : Public domain +This code is based on PPMd var.H (2001): Dmitry Shkarin : Public domain */ + +/* This code supports virtual RangeDecoder and includes the implementation +of RangeCoder from 7z, instead of RangeCoder from original PPMd var.H. +If you need the compatibility with original PPMd var.H, you can use external RangeDecoder */ + +#ifndef __PPMD7_H +#define __PPMD7_H + +#include "Ppmd.h" + +EXTERN_C_BEGIN + +#define PPMD7_MIN_ORDER 2 +#define PPMD7_MAX_ORDER 64 + +#define PPMD7_MIN_MEM_SIZE (1 << 11) +#define PPMD7_MAX_MEM_SIZE (0xFFFFFFFF - 12 * 3) + +struct CPpmd7_Context_; + +typedef + #ifdef PPMD_32BIT + struct CPpmd7_Context_ * + #else + UInt32 + #endif + CPpmd7_Context_Ref; + +typedef struct CPpmd7_Context_ +{ + UInt16 NumStats; + UInt16 SummFreq; + CPpmd_State_Ref Stats; + CPpmd7_Context_Ref Suffix; +} CPpmd7_Context; + +#define Ppmd7Context_OneState(p) ((CPpmd_State *)&(p)->SummFreq) + +typedef struct +{ + CPpmd7_Context *MinContext, *MaxContext; + CPpmd_State *FoundState; + unsigned OrderFall, InitEsc, PrevSuccess, MaxOrder, HiBitsFlag; + Int32 RunLength, InitRL; /* must be 32-bit at least */ + + UInt32 Size; + UInt32 GlueCount; + Byte *Base, *LoUnit, *HiUnit, *Text, *UnitsStart; + UInt32 AlignOffset; + + Byte Indx2Units[PPMD_NUM_INDEXES]; + Byte Units2Indx[128]; + CPpmd_Void_Ref FreeList[PPMD_NUM_INDEXES]; + Byte NS2Indx[256], NS2BSIndx[256], HB2Flag[256]; + CPpmd_See DummySee, See[25][16]; + UInt16 BinSumm[128][64]; +} CPpmd7; + +void Ppmd7_Construct(CPpmd7 *p); +BoolInt Ppmd7_Alloc(CPpmd7 *p, UInt32 size, ISzAllocPtr alloc); +void Ppmd7_Free(CPpmd7 *p, ISzAllocPtr alloc); +void Ppmd7_Init(CPpmd7 *p, unsigned maxOrder); +#define Ppmd7_WasAllocated(p) ((p)->Base != NULL) + + +/* ---------- Internal Functions ---------- */ + +extern const Byte PPMD7_kExpEscape[16]; + +#ifdef PPMD_32BIT + #define Ppmd7_GetPtr(p, ptr) (ptr) + #define Ppmd7_GetContext(p, ptr) (ptr) + #define Ppmd7_GetStats(p, ctx) ((ctx)->Stats) +#else + #define Ppmd7_GetPtr(p, offs) ((void *)((p)->Base + (offs))) + #define Ppmd7_GetContext(p, offs) ((CPpmd7_Context *)Ppmd7_GetPtr((p), (offs))) + #define Ppmd7_GetStats(p, ctx) ((CPpmd_State *)Ppmd7_GetPtr((p), ((ctx)->Stats))) +#endif + +void Ppmd7_Update1(CPpmd7 *p); +void Ppmd7_Update1_0(CPpmd7 *p); +void Ppmd7_Update2(CPpmd7 *p); +void Ppmd7_UpdateBin(CPpmd7 *p); + +#define Ppmd7_GetBinSumm(p) \ + &p->BinSumm[(size_t)(unsigned)Ppmd7Context_OneState(p->MinContext)->Freq - 1][p->PrevSuccess + \ + p->NS2BSIndx[(size_t)Ppmd7_GetContext(p, p->MinContext->Suffix)->NumStats - 1] + \ + (p->HiBitsFlag = p->HB2Flag[p->FoundState->Symbol]) + \ + 2 * p->HB2Flag[(unsigned)Ppmd7Context_OneState(p->MinContext)->Symbol] + \ + ((p->RunLength >> 26) & 0x20)] + +CPpmd_See *Ppmd7_MakeEscFreq(CPpmd7 *p, unsigned numMasked, UInt32 *scale); + + +/* ---------- Decode ---------- */ + +typedef struct IPpmd7_RangeDec IPpmd7_RangeDec; + +struct IPpmd7_RangeDec +{ + UInt32 (*GetThreshold)(const IPpmd7_RangeDec *p, UInt32 total); + void (*Decode)(const IPpmd7_RangeDec *p, UInt32 start, UInt32 size); + UInt32 (*DecodeBit)(const IPpmd7_RangeDec *p, UInt32 size0); +}; + +typedef struct +{ + IPpmd7_RangeDec vt; + UInt32 Range; + UInt32 Code; + IByteIn *Stream; +} CPpmd7z_RangeDec; + +void Ppmd7z_RangeDec_CreateVTable(CPpmd7z_RangeDec *p); +BoolInt Ppmd7z_RangeDec_Init(CPpmd7z_RangeDec *p); +#define Ppmd7z_RangeDec_IsFinishedOK(p) ((p)->Code == 0) + +int Ppmd7_DecodeSymbol(CPpmd7 *p, const IPpmd7_RangeDec *rc); + + +/* ---------- Encode ---------- */ + +typedef struct +{ + UInt64 Low; + UInt32 Range; + Byte Cache; + UInt64 CacheSize; + IByteOut *Stream; +} CPpmd7z_RangeEnc; + +void Ppmd7z_RangeEnc_Init(CPpmd7z_RangeEnc *p); +void Ppmd7z_RangeEnc_FlushData(CPpmd7z_RangeEnc *p); + +void Ppmd7_EncodeSymbol(CPpmd7 *p, CPpmd7z_RangeEnc *rc, int symbol); + +EXTERN_C_END + +#endif diff --git a/code/nel/3rdparty/seven_zip/Ppmd7Dec.c b/code/nel/3rdparty/seven_zip/Ppmd7Dec.c new file mode 100644 index 000000000..311e9f9dd --- /dev/null +++ b/code/nel/3rdparty/seven_zip/Ppmd7Dec.c @@ -0,0 +1,191 @@ +/* Ppmd7Dec.c -- PPMdH Decoder +2018-07-04 : Igor Pavlov : Public domain +This code is based on PPMd var.H (2001): Dmitry Shkarin : Public domain */ + +#include "Precomp.h" + +#include "Ppmd7.h" + +#define kTopValue (1 << 24) + +BoolInt Ppmd7z_RangeDec_Init(CPpmd7z_RangeDec *p) +{ + unsigned i; + p->Code = 0; + p->Range = 0xFFFFFFFF; + if (IByteIn_Read(p->Stream) != 0) + return False; + for (i = 0; i < 4; i++) + p->Code = (p->Code << 8) | IByteIn_Read(p->Stream); + return (p->Code < 0xFFFFFFFF); +} + +#define GET_Ppmd7z_RangeDec CPpmd7z_RangeDec *p = CONTAINER_FROM_VTBL(pp, CPpmd7z_RangeDec, vt); + +static UInt32 Range_GetThreshold(const IPpmd7_RangeDec *pp, UInt32 total) +{ + GET_Ppmd7z_RangeDec + return p->Code / (p->Range /= total); +} + +static void Range_Normalize(CPpmd7z_RangeDec *p) +{ + if (p->Range < kTopValue) + { + p->Code = (p->Code << 8) | IByteIn_Read(p->Stream); + p->Range <<= 8; + if (p->Range < kTopValue) + { + p->Code = (p->Code << 8) | IByteIn_Read(p->Stream); + p->Range <<= 8; + } + } +} + +static void Range_Decode(const IPpmd7_RangeDec *pp, UInt32 start, UInt32 size) +{ + GET_Ppmd7z_RangeDec + p->Code -= start * p->Range; + p->Range *= size; + Range_Normalize(p); +} + +static UInt32 Range_DecodeBit(const IPpmd7_RangeDec *pp, UInt32 size0) +{ + GET_Ppmd7z_RangeDec + UInt32 newBound = (p->Range >> 14) * size0; + UInt32 symbol; + if (p->Code < newBound) + { + symbol = 0; + p->Range = newBound; + } + else + { + symbol = 1; + p->Code -= newBound; + p->Range -= newBound; + } + Range_Normalize(p); + return symbol; +} + +void Ppmd7z_RangeDec_CreateVTable(CPpmd7z_RangeDec *p) +{ + p->vt.GetThreshold = Range_GetThreshold; + p->vt.Decode = Range_Decode; + p->vt.DecodeBit = Range_DecodeBit; +} + + +#define MASK(sym) ((signed char *)charMask)[sym] + +int Ppmd7_DecodeSymbol(CPpmd7 *p, const IPpmd7_RangeDec *rc) +{ + size_t charMask[256 / sizeof(size_t)]; + if (p->MinContext->NumStats != 1) + { + CPpmd_State *s = Ppmd7_GetStats(p, p->MinContext); + unsigned i; + UInt32 count, hiCnt; + if ((count = rc->GetThreshold(rc, p->MinContext->SummFreq)) < (hiCnt = s->Freq)) + { + Byte symbol; + rc->Decode(rc, 0, s->Freq); + p->FoundState = s; + symbol = s->Symbol; + Ppmd7_Update1_0(p); + return symbol; + } + p->PrevSuccess = 0; + i = p->MinContext->NumStats - 1; + do + { + if ((hiCnt += (++s)->Freq) > count) + { + Byte symbol; + rc->Decode(rc, hiCnt - s->Freq, s->Freq); + p->FoundState = s; + symbol = s->Symbol; + Ppmd7_Update1(p); + return symbol; + } + } + while (--i); + if (count >= p->MinContext->SummFreq) + return -2; + p->HiBitsFlag = p->HB2Flag[p->FoundState->Symbol]; + rc->Decode(rc, hiCnt, p->MinContext->SummFreq - hiCnt); + PPMD_SetAllBitsIn256Bytes(charMask); + MASK(s->Symbol) = 0; + i = p->MinContext->NumStats - 1; + do { MASK((--s)->Symbol) = 0; } while (--i); + } + else + { + UInt16 *prob = Ppmd7_GetBinSumm(p); + if (rc->DecodeBit(rc, *prob) == 0) + { + Byte symbol; + *prob = (UInt16)PPMD_UPDATE_PROB_0(*prob); + symbol = (p->FoundState = Ppmd7Context_OneState(p->MinContext))->Symbol; + Ppmd7_UpdateBin(p); + return symbol; + } + *prob = (UInt16)PPMD_UPDATE_PROB_1(*prob); + p->InitEsc = PPMD7_kExpEscape[*prob >> 10]; + PPMD_SetAllBitsIn256Bytes(charMask); + MASK(Ppmd7Context_OneState(p->MinContext)->Symbol) = 0; + p->PrevSuccess = 0; + } + for (;;) + { + CPpmd_State *ps[256], *s; + UInt32 freqSum, count, hiCnt; + CPpmd_See *see; + unsigned i, num, numMasked = p->MinContext->NumStats; + do + { + p->OrderFall++; + if (!p->MinContext->Suffix) + return -1; + p->MinContext = Ppmd7_GetContext(p, p->MinContext->Suffix); + } + while (p->MinContext->NumStats == numMasked); + hiCnt = 0; + s = Ppmd7_GetStats(p, p->MinContext); + i = 0; + num = p->MinContext->NumStats - numMasked; + do + { + int k = (int)(MASK(s->Symbol)); + hiCnt += (s->Freq & k); + ps[i] = s++; + i -= k; + } + while (i != num); + + see = Ppmd7_MakeEscFreq(p, numMasked, &freqSum); + freqSum += hiCnt; + count = rc->GetThreshold(rc, freqSum); + + if (count < hiCnt) + { + Byte symbol; + CPpmd_State **pps = ps; + for (hiCnt = 0; (hiCnt += (*pps)->Freq) <= count; pps++); + s = *pps; + rc->Decode(rc, hiCnt - s->Freq, s->Freq); + Ppmd_See_Update(see); + p->FoundState = s; + symbol = s->Symbol; + Ppmd7_Update2(p); + return symbol; + } + if (count >= freqSum) + return -2; + rc->Decode(rc, hiCnt, freqSum - hiCnt); + see->Summ = (UInt16)(see->Summ + freqSum); + do { MASK(ps[--i]->Symbol) = 0; } while (i != 0); + } +} diff --git a/code/nel/3rdparty/seven_zip/Ppmd7Enc.c b/code/nel/3rdparty/seven_zip/Ppmd7Enc.c new file mode 100644 index 000000000..286b8712c --- /dev/null +++ b/code/nel/3rdparty/seven_zip/Ppmd7Enc.c @@ -0,0 +1,187 @@ +/* Ppmd7Enc.c -- PPMdH Encoder +2017-04-03 : Igor Pavlov : Public domain +This code is based on PPMd var.H (2001): Dmitry Shkarin : Public domain */ + +#include "Precomp.h" + +#include "Ppmd7.h" + +#define kTopValue (1 << 24) + +void Ppmd7z_RangeEnc_Init(CPpmd7z_RangeEnc *p) +{ + p->Low = 0; + p->Range = 0xFFFFFFFF; + p->Cache = 0; + p->CacheSize = 1; +} + +static void RangeEnc_ShiftLow(CPpmd7z_RangeEnc *p) +{ + if ((UInt32)p->Low < (UInt32)0xFF000000 || (unsigned)(p->Low >> 32) != 0) + { + Byte temp = p->Cache; + do + { + IByteOut_Write(p->Stream, (Byte)(temp + (Byte)(p->Low >> 32))); + temp = 0xFF; + } + while (--p->CacheSize != 0); + p->Cache = (Byte)((UInt32)p->Low >> 24); + } + p->CacheSize++; + p->Low = (UInt32)p->Low << 8; +} + +static void RangeEnc_Encode(CPpmd7z_RangeEnc *p, UInt32 start, UInt32 size, UInt32 total) +{ + p->Low += start * (p->Range /= total); + p->Range *= size; + while (p->Range < kTopValue) + { + p->Range <<= 8; + RangeEnc_ShiftLow(p); + } +} + +static void RangeEnc_EncodeBit_0(CPpmd7z_RangeEnc *p, UInt32 size0) +{ + p->Range = (p->Range >> 14) * size0; + while (p->Range < kTopValue) + { + p->Range <<= 8; + RangeEnc_ShiftLow(p); + } +} + +static void RangeEnc_EncodeBit_1(CPpmd7z_RangeEnc *p, UInt32 size0) +{ + UInt32 newBound = (p->Range >> 14) * size0; + p->Low += newBound; + p->Range -= newBound; + while (p->Range < kTopValue) + { + p->Range <<= 8; + RangeEnc_ShiftLow(p); + } +} + +void Ppmd7z_RangeEnc_FlushData(CPpmd7z_RangeEnc *p) +{ + unsigned i; + for (i = 0; i < 5; i++) + RangeEnc_ShiftLow(p); +} + + +#define MASK(sym) ((signed char *)charMask)[sym] + +void Ppmd7_EncodeSymbol(CPpmd7 *p, CPpmd7z_RangeEnc *rc, int symbol) +{ + size_t charMask[256 / sizeof(size_t)]; + if (p->MinContext->NumStats != 1) + { + CPpmd_State *s = Ppmd7_GetStats(p, p->MinContext); + UInt32 sum; + unsigned i; + if (s->Symbol == symbol) + { + RangeEnc_Encode(rc, 0, s->Freq, p->MinContext->SummFreq); + p->FoundState = s; + Ppmd7_Update1_0(p); + return; + } + p->PrevSuccess = 0; + sum = s->Freq; + i = p->MinContext->NumStats - 1; + do + { + if ((++s)->Symbol == symbol) + { + RangeEnc_Encode(rc, sum, s->Freq, p->MinContext->SummFreq); + p->FoundState = s; + Ppmd7_Update1(p); + return; + } + sum += s->Freq; + } + while (--i); + + p->HiBitsFlag = p->HB2Flag[p->FoundState->Symbol]; + PPMD_SetAllBitsIn256Bytes(charMask); + MASK(s->Symbol) = 0; + i = p->MinContext->NumStats - 1; + do { MASK((--s)->Symbol) = 0; } while (--i); + RangeEnc_Encode(rc, sum, p->MinContext->SummFreq - sum, p->MinContext->SummFreq); + } + else + { + UInt16 *prob = Ppmd7_GetBinSumm(p); + CPpmd_State *s = Ppmd7Context_OneState(p->MinContext); + if (s->Symbol == symbol) + { + RangeEnc_EncodeBit_0(rc, *prob); + *prob = (UInt16)PPMD_UPDATE_PROB_0(*prob); + p->FoundState = s; + Ppmd7_UpdateBin(p); + return; + } + else + { + RangeEnc_EncodeBit_1(rc, *prob); + *prob = (UInt16)PPMD_UPDATE_PROB_1(*prob); + p->InitEsc = PPMD7_kExpEscape[*prob >> 10]; + PPMD_SetAllBitsIn256Bytes(charMask); + MASK(s->Symbol) = 0; + p->PrevSuccess = 0; + } + } + for (;;) + { + UInt32 escFreq; + CPpmd_See *see; + CPpmd_State *s; + UInt32 sum; + unsigned i, numMasked = p->MinContext->NumStats; + do + { + p->OrderFall++; + if (!p->MinContext->Suffix) + return; /* EndMarker (symbol = -1) */ + p->MinContext = Ppmd7_GetContext(p, p->MinContext->Suffix); + } + while (p->MinContext->NumStats == numMasked); + + see = Ppmd7_MakeEscFreq(p, numMasked, &escFreq); + s = Ppmd7_GetStats(p, p->MinContext); + sum = 0; + i = p->MinContext->NumStats; + do + { + int cur = s->Symbol; + if (cur == symbol) + { + UInt32 low = sum; + CPpmd_State *s1 = s; + do + { + sum += (s->Freq & (int)(MASK(s->Symbol))); + s++; + } + while (--i); + RangeEnc_Encode(rc, low, s1->Freq, sum + escFreq); + Ppmd_See_Update(see); + p->FoundState = s1; + Ppmd7_Update2(p); + return; + } + sum += (s->Freq & (int)(MASK(cur))); + MASK(cur) = 0; + s++; + } + while (--i); + + RangeEnc_Encode(rc, sum, escFreq, sum + escFreq); + see->Summ = (UInt16)(see->Summ + sum + escFreq); + } +} diff --git a/code/nel/3rdparty/seven_zip/Precomp.h b/code/nel/3rdparty/seven_zip/Precomp.h new file mode 100644 index 000000000..e8ff8b40e --- /dev/null +++ b/code/nel/3rdparty/seven_zip/Precomp.h @@ -0,0 +1,10 @@ +/* Precomp.h -- StdAfx +2013-11-12 : Igor Pavlov : Public domain */ + +#ifndef __7Z_PRECOMP_H +#define __7Z_PRECOMP_H + +#include "Compiler.h" +/* #include "7zTypes.h" */ + +#endif diff --git a/code/nel/3rdparty/seven_zip/RotateDefs.h b/code/nel/3rdparty/seven_zip/RotateDefs.h new file mode 100644 index 000000000..8f01d1a6c --- /dev/null +++ b/code/nel/3rdparty/seven_zip/RotateDefs.h @@ -0,0 +1,30 @@ +/* RotateDefs.h -- Rotate functions +2015-03-25 : Igor Pavlov : Public domain */ + +#ifndef __ROTATE_DEFS_H +#define __ROTATE_DEFS_H + +#ifdef _MSC_VER + +#include + +/* don't use _rotl with MINGW. It can insert slow call to function. */ + +/* #if (_MSC_VER >= 1200) */ +#pragma intrinsic(_rotl) +#pragma intrinsic(_rotr) +/* #endif */ + +#define rotlFixed(x, n) _rotl((x), (n)) +#define rotrFixed(x, n) _rotr((x), (n)) + +#else + +/* new compilers can translate these macros to fast commands. */ + +#define rotlFixed(x, n) (((x) << (n)) | ((x) >> (32 - (n)))) +#define rotrFixed(x, n) (((x) >> (n)) | ((x) << (32 - (n)))) + +#endif + +#endif diff --git a/code/nel/3rdparty/seven_zip/Sha256.c b/code/nel/3rdparty/seven_zip/Sha256.c new file mode 100644 index 000000000..04b688c6b --- /dev/null +++ b/code/nel/3rdparty/seven_zip/Sha256.c @@ -0,0 +1,248 @@ +/* Crypto/Sha256.c -- SHA-256 Hash +2017-04-03 : Igor Pavlov : Public domain +This code is based on public domain code from Wei Dai's Crypto++ library. */ + +#include "Precomp.h" + +#include + +#include "CpuArch.h" +#include "RotateDefs.h" +#include "Sha256.h" + +/* define it for speed optimization */ +#ifndef _SFX +#define _SHA256_UNROLL +#define _SHA256_UNROLL2 +#endif + +/* #define _SHA256_UNROLL2 */ + +void Sha256_Init(CSha256 *p) +{ + p->state[0] = 0x6a09e667; + p->state[1] = 0xbb67ae85; + p->state[2] = 0x3c6ef372; + p->state[3] = 0xa54ff53a; + p->state[4] = 0x510e527f; + p->state[5] = 0x9b05688c; + p->state[6] = 0x1f83d9ab; + p->state[7] = 0x5be0cd19; + p->count = 0; +} + +#define S0(x) (rotrFixed(x, 2) ^ rotrFixed(x,13) ^ rotrFixed(x, 22)) +#define S1(x) (rotrFixed(x, 6) ^ rotrFixed(x,11) ^ rotrFixed(x, 25)) +#define s0(x) (rotrFixed(x, 7) ^ rotrFixed(x,18) ^ (x >> 3)) +#define s1(x) (rotrFixed(x,17) ^ rotrFixed(x,19) ^ (x >> 10)) + +#define blk0(i) (W[i]) +#define blk2(i) (W[i] += s1(W[((i)-2)&15]) + W[((i)-7)&15] + s0(W[((i)-15)&15])) + +#define Ch(x,y,z) (z^(x&(y^z))) +#define Maj(x,y,z) ((x&y)|(z&(x|y))) + +#ifdef _SHA256_UNROLL2 + +#define R(a,b,c,d,e,f,g,h, i) \ + h += S1(e) + Ch(e,f,g) + K[(i)+(size_t)(j)] + (j ? blk2(i) : blk0(i)); \ + d += h; \ + h += S0(a) + Maj(a, b, c) + +#define RX_8(i) \ + R(a,b,c,d,e,f,g,h, i); \ + R(h,a,b,c,d,e,f,g, i+1); \ + R(g,h,a,b,c,d,e,f, i+2); \ + R(f,g,h,a,b,c,d,e, i+3); \ + R(e,f,g,h,a,b,c,d, i+4); \ + R(d,e,f,g,h,a,b,c, i+5); \ + R(c,d,e,f,g,h,a,b, i+6); \ + R(b,c,d,e,f,g,h,a, i+7) + +#define RX_16 RX_8(0); RX_8(8); + +#else + +#define a(i) T[(0-(i))&7] +#define b(i) T[(1-(i))&7] +#define c(i) T[(2-(i))&7] +#define d(i) T[(3-(i))&7] +#define e(i) T[(4-(i))&7] +#define f(i) T[(5-(i))&7] +#define g(i) T[(6-(i))&7] +#define h(i) T[(7-(i))&7] + +#define R(i) \ + h(i) += S1(e(i)) + Ch(e(i),f(i),g(i)) + K[(i)+(size_t)(j)] + (j ? blk2(i) : blk0(i)); \ + d(i) += h(i); \ + h(i) += S0(a(i)) + Maj(a(i), b(i), c(i)) \ + +#ifdef _SHA256_UNROLL + +#define RX_8(i) R(i+0); R(i+1); R(i+2); R(i+3); R(i+4); R(i+5); R(i+6); R(i+7); +#define RX_16 RX_8(0); RX_8(8); + +#else + +#define RX_16 unsigned i; for (i = 0; i < 16; i++) { R(i); } + +#endif + +#endif + +static const UInt32 K[64] = { + 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, + 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5, + 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3, + 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174, + 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc, + 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da, + 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7, + 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967, + 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13, + 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85, + 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3, + 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070, + 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5, + 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3, + 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208, + 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2 +}; + +static void Sha256_WriteByteBlock(CSha256 *p) +{ + UInt32 W[16]; + unsigned j; + UInt32 *state; + + #ifdef _SHA256_UNROLL2 + UInt32 a,b,c,d,e,f,g,h; + #else + UInt32 T[8]; + #endif + + for (j = 0; j < 16; j += 4) + { + const Byte *ccc = p->buffer + j * 4; + W[j ] = GetBe32(ccc); + W[j + 1] = GetBe32(ccc + 4); + W[j + 2] = GetBe32(ccc + 8); + W[j + 3] = GetBe32(ccc + 12); + } + + state = p->state; + + #ifdef _SHA256_UNROLL2 + a = state[0]; + b = state[1]; + c = state[2]; + d = state[3]; + e = state[4]; + f = state[5]; + g = state[6]; + h = state[7]; + #else + for (j = 0; j < 8; j++) + T[j] = state[j]; + #endif + + for (j = 0; j < 64; j += 16) + { + RX_16 + } + + #ifdef _SHA256_UNROLL2 + state[0] += a; + state[1] += b; + state[2] += c; + state[3] += d; + state[4] += e; + state[5] += f; + state[6] += g; + state[7] += h; + #else + for (j = 0; j < 8; j++) + state[j] += T[j]; + #endif + + /* Wipe variables */ + /* memset(W, 0, sizeof(W)); */ + /* memset(T, 0, sizeof(T)); */ +} + +#undef S0 +#undef S1 +#undef s0 +#undef s1 + +void Sha256_Update(CSha256 *p, const Byte *data, size_t size) +{ + if (size == 0) + return; + + { + unsigned pos = (unsigned)p->count & 0x3F; + unsigned num; + + p->count += size; + + num = 64 - pos; + if (num > size) + { + memcpy(p->buffer + pos, data, size); + return; + } + + size -= num; + memcpy(p->buffer + pos, data, num); + data += num; + } + + for (;;) + { + Sha256_WriteByteBlock(p); + if (size < 64) + break; + size -= 64; + memcpy(p->buffer, data, 64); + data += 64; + } + + if (size != 0) + memcpy(p->buffer, data, size); +} + +void Sha256_Final(CSha256 *p, Byte *digest) +{ + unsigned pos = (unsigned)p->count & 0x3F; + unsigned i; + + p->buffer[pos++] = 0x80; + + while (pos != (64 - 8)) + { + pos &= 0x3F; + if (pos == 0) + Sha256_WriteByteBlock(p); + p->buffer[pos++] = 0; + } + + { + UInt64 numBits = (p->count << 3); + SetBe32(p->buffer + 64 - 8, (UInt32)(numBits >> 32)); + SetBe32(p->buffer + 64 - 4, (UInt32)(numBits)); + } + + Sha256_WriteByteBlock(p); + + for (i = 0; i < 8; i += 2) + { + UInt32 v0 = p->state[i]; + UInt32 v1 = p->state[i + 1]; + SetBe32(digest , v0); + SetBe32(digest + 4, v1); + digest += 8; + } + + Sha256_Init(p); +} diff --git a/code/nel/3rdparty/seven_zip/Sha256.h b/code/nel/3rdparty/seven_zip/Sha256.h new file mode 100644 index 000000000..3f455dbc0 --- /dev/null +++ b/code/nel/3rdparty/seven_zip/Sha256.h @@ -0,0 +1,26 @@ +/* Sha256.h -- SHA-256 Hash +2013-01-18 : Igor Pavlov : Public domain */ + +#ifndef __CRYPTO_SHA256_H +#define __CRYPTO_SHA256_H + +#include "7zTypes.h" + +EXTERN_C_BEGIN + +#define SHA256_DIGEST_SIZE 32 + +typedef struct +{ + UInt32 state[8]; + UInt64 count; + Byte buffer[64]; +} CSha256; + +void Sha256_Init(CSha256 *p); +void Sha256_Update(CSha256 *p, const Byte *data, size_t size); +void Sha256_Final(CSha256 *p, Byte *digest); + +EXTERN_C_END + +#endif diff --git a/code/nel/3rdparty/seven_zip/Sort.c b/code/nel/3rdparty/seven_zip/Sort.c new file mode 100644 index 000000000..e1097e380 --- /dev/null +++ b/code/nel/3rdparty/seven_zip/Sort.c @@ -0,0 +1,141 @@ +/* Sort.c -- Sort functions +2014-04-05 : Igor Pavlov : Public domain */ + +#include "Precomp.h" + +#include "Sort.h" + +#define HeapSortDown(p, k, size, temp) \ + { for (;;) { \ + size_t s = (k << 1); \ + if (s > size) break; \ + if (s < size && p[s + 1] > p[s]) s++; \ + if (temp >= p[s]) break; \ + p[k] = p[s]; k = s; \ + } p[k] = temp; } + +void HeapSort(UInt32 *p, size_t size) +{ + if (size <= 1) + return; + p--; + { + size_t i = size / 2; + do + { + UInt32 temp = p[i]; + size_t k = i; + HeapSortDown(p, k, size, temp) + } + while (--i != 0); + } + /* + do + { + size_t k = 1; + UInt32 temp = p[size]; + p[size--] = p[1]; + HeapSortDown(p, k, size, temp) + } + while (size > 1); + */ + while (size > 3) + { + UInt32 temp = p[size]; + size_t k = (p[3] > p[2]) ? 3 : 2; + p[size--] = p[1]; + p[1] = p[k]; + HeapSortDown(p, k, size, temp) + } + { + UInt32 temp = p[size]; + p[size] = p[1]; + if (size > 2 && p[2] < temp) + { + p[1] = p[2]; + p[2] = temp; + } + else + p[1] = temp; + } +} + +void HeapSort64(UInt64 *p, size_t size) +{ + if (size <= 1) + return; + p--; + { + size_t i = size / 2; + do + { + UInt64 temp = p[i]; + size_t k = i; + HeapSortDown(p, k, size, temp) + } + while (--i != 0); + } + /* + do + { + size_t k = 1; + UInt64 temp = p[size]; + p[size--] = p[1]; + HeapSortDown(p, k, size, temp) + } + while (size > 1); + */ + while (size > 3) + { + UInt64 temp = p[size]; + size_t k = (p[3] > p[2]) ? 3 : 2; + p[size--] = p[1]; + p[1] = p[k]; + HeapSortDown(p, k, size, temp) + } + { + UInt64 temp = p[size]; + p[size] = p[1]; + if (size > 2 && p[2] < temp) + { + p[1] = p[2]; + p[2] = temp; + } + else + p[1] = temp; + } +} + +/* +#define HeapSortRefDown(p, vals, n, size, temp) \ + { size_t k = n; UInt32 val = vals[temp]; for (;;) { \ + size_t s = (k << 1); \ + if (s > size) break; \ + if (s < size && vals[p[s + 1]] > vals[p[s]]) s++; \ + if (val >= vals[p[s]]) break; \ + p[k] = p[s]; k = s; \ + } p[k] = temp; } + +void HeapSortRef(UInt32 *p, UInt32 *vals, size_t size) +{ + if (size <= 1) + return; + p--; + { + size_t i = size / 2; + do + { + UInt32 temp = p[i]; + HeapSortRefDown(p, vals, i, size, temp); + } + while (--i != 0); + } + do + { + UInt32 temp = p[size]; + p[size--] = p[1]; + HeapSortRefDown(p, vals, 1, size, temp); + } + while (size > 1); +} +*/ diff --git a/code/nel/3rdparty/seven_zip/Sort.h b/code/nel/3rdparty/seven_zip/Sort.h new file mode 100644 index 000000000..2e2963a23 --- /dev/null +++ b/code/nel/3rdparty/seven_zip/Sort.h @@ -0,0 +1,18 @@ +/* Sort.h -- Sort functions +2014-04-05 : Igor Pavlov : Public domain */ + +#ifndef __7Z_SORT_H +#define __7Z_SORT_H + +#include "7zTypes.h" + +EXTERN_C_BEGIN + +void HeapSort(UInt32 *p, size_t size); +void HeapSort64(UInt64 *p, size_t size); + +/* void HeapSortRef(UInt32 *p, UInt32 *vals, size_t size); */ + +EXTERN_C_END + +#endif diff --git a/code/nel/3rdparty/seven_zip/Xz.c b/code/nel/3rdparty/seven_zip/Xz.c new file mode 100644 index 000000000..d9f83df16 --- /dev/null +++ b/code/nel/3rdparty/seven_zip/Xz.c @@ -0,0 +1,90 @@ +/* Xz.c - Xz +2017-05-12 : Igor Pavlov : Public domain */ + +#include "Precomp.h" + +#include "7zCrc.h" +#include "CpuArch.h" +#include "Xz.h" +#include "XzCrc64.h" + +const Byte XZ_SIG[XZ_SIG_SIZE] = { 0xFD, '7', 'z', 'X', 'Z', 0 }; +/* const Byte XZ_FOOTER_SIG[XZ_FOOTER_SIG_SIZE] = { 'Y', 'Z' }; */ + +unsigned Xz_WriteVarInt(Byte *buf, UInt64 v) +{ + unsigned i = 0; + do + { + buf[i++] = (Byte)((v & 0x7F) | 0x80); + v >>= 7; + } + while (v != 0); + buf[(size_t)i - 1] &= 0x7F; + return i; +} + +void Xz_Construct(CXzStream *p) +{ + p->numBlocks = 0; + p->blocks = NULL; + p->flags = 0; +} + +void Xz_Free(CXzStream *p, ISzAllocPtr alloc) +{ + ISzAlloc_Free(alloc, p->blocks); + p->numBlocks = 0; + p->blocks = NULL; +} + +unsigned XzFlags_GetCheckSize(CXzStreamFlags f) +{ + unsigned t = XzFlags_GetCheckType(f); + return (t == 0) ? 0 : (4 << ((t - 1) / 3)); +} + +void XzCheck_Init(CXzCheck *p, unsigned mode) +{ + p->mode = mode; + switch (mode) + { + case XZ_CHECK_CRC32: p->crc = CRC_INIT_VAL; break; + case XZ_CHECK_CRC64: p->crc64 = CRC64_INIT_VAL; break; + case XZ_CHECK_SHA256: Sha256_Init(&p->sha); break; + } +} + +void XzCheck_Update(CXzCheck *p, const void *data, size_t size) +{ + switch (p->mode) + { + case XZ_CHECK_CRC32: p->crc = CrcUpdate(p->crc, data, size); break; + case XZ_CHECK_CRC64: p->crc64 = Crc64Update(p->crc64, data, size); break; + case XZ_CHECK_SHA256: Sha256_Update(&p->sha, (const Byte *)data, size); break; + } +} + +int XzCheck_Final(CXzCheck *p, Byte *digest) +{ + switch (p->mode) + { + case XZ_CHECK_CRC32: + SetUi32(digest, CRC_GET_DIGEST(p->crc)); + break; + case XZ_CHECK_CRC64: + { + int i; + UInt64 v = CRC64_GET_DIGEST(p->crc64); + for (i = 0; i < 8; i++, v >>= 8) + digest[i] = (Byte)(v & 0xFF); + break; + } + case XZ_CHECK_SHA256: + Sha256_Final(&p->sha, digest); + break; + default: + return 0; + } + return 1; +} diff --git a/code/nel/3rdparty/seven_zip/Xz.h b/code/nel/3rdparty/seven_zip/Xz.h new file mode 100644 index 000000000..544ee18f2 --- /dev/null +++ b/code/nel/3rdparty/seven_zip/Xz.h @@ -0,0 +1,460 @@ +/* Xz.h - Xz interface +2018-07-04 : Igor Pavlov : Public domain */ + +#ifndef __XZ_H +#define __XZ_H + +#include "Sha256.h" + +EXTERN_C_BEGIN + +#define XZ_ID_Subblock 1 +#define XZ_ID_Delta 3 +#define XZ_ID_X86 4 +#define XZ_ID_PPC 5 +#define XZ_ID_IA64 6 +#define XZ_ID_ARM 7 +#define XZ_ID_ARMT 8 +#define XZ_ID_SPARC 9 +#define XZ_ID_LZMA2 0x21 + +unsigned Xz_ReadVarInt(const Byte *p, size_t maxSize, UInt64 *value); +unsigned Xz_WriteVarInt(Byte *buf, UInt64 v); + +/* ---------- xz block ---------- */ + +#define XZ_BLOCK_HEADER_SIZE_MAX 1024 + +#define XZ_NUM_FILTERS_MAX 4 +#define XZ_BF_NUM_FILTERS_MASK 3 +#define XZ_BF_PACK_SIZE (1 << 6) +#define XZ_BF_UNPACK_SIZE (1 << 7) + +#define XZ_FILTER_PROPS_SIZE_MAX 20 + +typedef struct +{ + UInt64 id; + UInt32 propsSize; + Byte props[XZ_FILTER_PROPS_SIZE_MAX]; +} CXzFilter; + +typedef struct +{ + UInt64 packSize; + UInt64 unpackSize; + Byte flags; + CXzFilter filters[XZ_NUM_FILTERS_MAX]; +} CXzBlock; + +#define XzBlock_GetNumFilters(p) (((p)->flags & XZ_BF_NUM_FILTERS_MASK) + 1) +#define XzBlock_HasPackSize(p) (((p)->flags & XZ_BF_PACK_SIZE) != 0) +#define XzBlock_HasUnpackSize(p) (((p)->flags & XZ_BF_UNPACK_SIZE) != 0) +#define XzBlock_HasUnsupportedFlags(p) (((p)->flags & ~(XZ_BF_NUM_FILTERS_MASK | XZ_BF_PACK_SIZE | XZ_BF_UNPACK_SIZE)) != 0) + +SRes XzBlock_Parse(CXzBlock *p, const Byte *header); +SRes XzBlock_ReadHeader(CXzBlock *p, ISeqInStream *inStream, BoolInt *isIndex, UInt32 *headerSizeRes); + +/* ---------- xz stream ---------- */ + +#define XZ_SIG_SIZE 6 +#define XZ_FOOTER_SIG_SIZE 2 + +extern const Byte XZ_SIG[XZ_SIG_SIZE]; + +/* +extern const Byte XZ_FOOTER_SIG[XZ_FOOTER_SIG_SIZE]; +*/ + +#define XZ_FOOTER_SIG_0 'Y' +#define XZ_FOOTER_SIG_1 'Z' + +#define XZ_STREAM_FLAGS_SIZE 2 +#define XZ_STREAM_CRC_SIZE 4 + +#define XZ_STREAM_HEADER_SIZE (XZ_SIG_SIZE + XZ_STREAM_FLAGS_SIZE + XZ_STREAM_CRC_SIZE) +#define XZ_STREAM_FOOTER_SIZE (XZ_FOOTER_SIG_SIZE + XZ_STREAM_FLAGS_SIZE + XZ_STREAM_CRC_SIZE + 4) + +#define XZ_CHECK_MASK 0xF +#define XZ_CHECK_NO 0 +#define XZ_CHECK_CRC32 1 +#define XZ_CHECK_CRC64 4 +#define XZ_CHECK_SHA256 10 + +typedef struct +{ + unsigned mode; + UInt32 crc; + UInt64 crc64; + CSha256 sha; +} CXzCheck; + +void XzCheck_Init(CXzCheck *p, unsigned mode); +void XzCheck_Update(CXzCheck *p, const void *data, size_t size); +int XzCheck_Final(CXzCheck *p, Byte *digest); + +typedef UInt16 CXzStreamFlags; + +#define XzFlags_IsSupported(f) ((f) <= XZ_CHECK_MASK) +#define XzFlags_GetCheckType(f) ((f) & XZ_CHECK_MASK) +#define XzFlags_HasDataCrc32(f) (Xz_GetCheckType(f) == XZ_CHECK_CRC32) +unsigned XzFlags_GetCheckSize(CXzStreamFlags f); + +SRes Xz_ParseHeader(CXzStreamFlags *p, const Byte *buf); +SRes Xz_ReadHeader(CXzStreamFlags *p, ISeqInStream *inStream); + +typedef struct +{ + UInt64 unpackSize; + UInt64 totalSize; +} CXzBlockSizes; + +typedef struct +{ + CXzStreamFlags flags; + size_t numBlocks; + CXzBlockSizes *blocks; + UInt64 startOffset; +} CXzStream; + +void Xz_Construct(CXzStream *p); +void Xz_Free(CXzStream *p, ISzAllocPtr alloc); + +#define XZ_SIZE_OVERFLOW ((UInt64)(Int64)-1) + +UInt64 Xz_GetUnpackSize(const CXzStream *p); +UInt64 Xz_GetPackSize(const CXzStream *p); + +typedef struct +{ + size_t num; + size_t numAllocated; + CXzStream *streams; +} CXzs; + +void Xzs_Construct(CXzs *p); +void Xzs_Free(CXzs *p, ISzAllocPtr alloc); +SRes Xzs_ReadBackward(CXzs *p, ILookInStream *inStream, Int64 *startOffset, ICompressProgress *progress, ISzAllocPtr alloc); + +UInt64 Xzs_GetNumBlocks(const CXzs *p); +UInt64 Xzs_GetUnpackSize(const CXzs *p); + + +// ECoderStatus values are identical to ELzmaStatus values of LZMA2 decoder + +typedef enum +{ + CODER_STATUS_NOT_SPECIFIED, /* use main error code instead */ + CODER_STATUS_FINISHED_WITH_MARK, /* stream was finished with end mark. */ + CODER_STATUS_NOT_FINISHED, /* stream was not finished */ + CODER_STATUS_NEEDS_MORE_INPUT /* you must provide more input bytes */ +} ECoderStatus; + + +// ECoderFinishMode values are identical to ELzmaFinishMode + +typedef enum +{ + CODER_FINISH_ANY, /* finish at any point */ + CODER_FINISH_END /* block must be finished at the end */ +} ECoderFinishMode; + + +typedef struct _IStateCoder +{ + void *p; + void (*Free)(void *p, ISzAllocPtr alloc); + SRes (*SetProps)(void *p, const Byte *props, size_t propSize, ISzAllocPtr alloc); + void (*Init)(void *p); + SRes (*Code2)(void *p, Byte *dest, SizeT *destLen, const Byte *src, SizeT *srcLen, + int srcWasFinished, ECoderFinishMode finishMode, + // int *wasFinished, + ECoderStatus *status); + SizeT (*Filter)(void *p, Byte *data, SizeT size); +} IStateCoder; + + + +#define MIXCODER_NUM_FILTERS_MAX 4 + +typedef struct +{ + ISzAllocPtr alloc; + Byte *buf; + unsigned numCoders; + + Byte *outBuf; + size_t outBufSize; + size_t outWritten; // is equal to lzmaDecoder.dicPos (in outBuf mode) + BoolInt wasFinished; + SRes res; + ECoderStatus status; + // BoolInt SingleBufMode; + + int finished[MIXCODER_NUM_FILTERS_MAX - 1]; + size_t pos[MIXCODER_NUM_FILTERS_MAX - 1]; + size_t size[MIXCODER_NUM_FILTERS_MAX - 1]; + UInt64 ids[MIXCODER_NUM_FILTERS_MAX]; + SRes results[MIXCODER_NUM_FILTERS_MAX]; + IStateCoder coders[MIXCODER_NUM_FILTERS_MAX]; +} CMixCoder; + + +typedef enum +{ + XZ_STATE_STREAM_HEADER, + XZ_STATE_STREAM_INDEX, + XZ_STATE_STREAM_INDEX_CRC, + XZ_STATE_STREAM_FOOTER, + XZ_STATE_STREAM_PADDING, + XZ_STATE_BLOCK_HEADER, + XZ_STATE_BLOCK, + XZ_STATE_BLOCK_FOOTER +} EXzState; + + +typedef struct +{ + EXzState state; + UInt32 pos; + unsigned alignPos; + unsigned indexPreSize; + + CXzStreamFlags streamFlags; + + UInt32 blockHeaderSize; + UInt64 packSize; + UInt64 unpackSize; + + UInt64 numBlocks; // number of finished blocks in current stream + UInt64 indexSize; + UInt64 indexPos; + UInt64 padSize; + + UInt64 numStartedStreams; + UInt64 numFinishedStreams; + UInt64 numTotalBlocks; + + UInt32 crc; + CMixCoder decoder; + CXzBlock block; + CXzCheck check; + CSha256 sha; + + BoolInt parseMode; + BoolInt headerParsedOk; + BoolInt decodeToStreamSignature; + unsigned decodeOnlyOneBlock; + + Byte *outBuf; + size_t outBufSize; + size_t outDataWritten; // the size of data in (outBuf) that were fully unpacked + + Byte shaDigest[SHA256_DIGEST_SIZE]; + Byte buf[XZ_BLOCK_HEADER_SIZE_MAX]; +} CXzUnpacker; + +/* alloc : aligned for cache line allocation is better */ +void XzUnpacker_Construct(CXzUnpacker *p, ISzAllocPtr alloc); +void XzUnpacker_Init(CXzUnpacker *p); +void XzUnpacker_SetOutBuf(CXzUnpacker *p, Byte *outBuf, size_t outBufSize); +void XzUnpacker_Free(CXzUnpacker *p); + +/* + XzUnpacker + The sequence for decoding functions: + { + XzUnpacker_Construct() + [Decoding_Calls] + XzUnpacker_Free() + } + + [Decoding_Calls] + + There are 3 types of interfaces for [Decoding_Calls] calls: + + Interface-1 : Partial output buffers: + { + XzUnpacker_Init() + for() + XzUnpacker_Code(); + } + + Interface-2 : Direct output buffer: + Use it, if you know exact size of decoded data, and you need + whole xz unpacked data in one output buffer. + xz unpacker doesn't allocate additional buffer for lzma2 dictionary in that mode. + { + XzUnpacker_Init() + XzUnpacker_SetOutBufMode(); // to set output buffer and size + for() + XzUnpacker_Code(); // (dest = NULL) in XzUnpacker_Code() + } + + Interface-3 : Direct output buffer : One call full decoding + It unpacks whole input buffer to output buffer in one call. + It uses Interface-2 internally. + { + XzUnpacker_CodeFull() + } +*/ + +/* +finishMode: + It has meaning only if the decoding reaches output limit (*destLen). + CODER_FINISH_ANY - use smallest number of input bytes + CODER_FINISH_END - read EndOfStream marker after decoding + +Returns: + SZ_OK + status: + CODER_STATUS_NOT_FINISHED, + CODER_STATUS_NEEDS_MORE_INPUT - maybe there are more xz streams, + call XzUnpacker_IsStreamWasFinished to check that current stream was finished + SZ_ERROR_MEM - Memory allocation error + SZ_ERROR_DATA - Data error + SZ_ERROR_UNSUPPORTED - Unsupported method or method properties + SZ_ERROR_CRC - CRC error + // SZ_ERROR_INPUT_EOF - It needs more bytes in input buffer (src). + + SZ_ERROR_NO_ARCHIVE - the error with xz Stream Header with one of the following reasons: + - xz Stream Signature failure + - CRC32 of xz Stream Header is failed + - The size of Stream padding is not multiple of four bytes. + It's possible to get that error, if xz stream was finished and the stream + contains some another data. In that case you can call XzUnpacker_GetExtraSize() + function to get real size of xz stream. +*/ + + +SRes XzUnpacker_Code(CXzUnpacker *p, Byte *dest, SizeT *destLen, + const Byte *src, SizeT *srcLen, int srcFinished, + ECoderFinishMode finishMode, ECoderStatus *status); + +SRes XzUnpacker_CodeFull(CXzUnpacker *p, Byte *dest, SizeT *destLen, + const Byte *src, SizeT *srcLen, + ECoderFinishMode finishMode, ECoderStatus *status); + +BoolInt XzUnpacker_IsStreamWasFinished(const CXzUnpacker *p); + +/* +XzUnpacker_GetExtraSize() returns then number of uncofirmed bytes, + if it's in (XZ_STATE_STREAM_HEADER) state or in (XZ_STATE_STREAM_PADDING) state. +These bytes can be some bytes after xz archive, or +it can be start of new xz stream. + +Call XzUnpacker_GetExtraSize() after XzUnpacker_Code() function to detect real size of +xz stream in two cases, if XzUnpacker_Code() returns: + res == SZ_OK && status == CODER_STATUS_NEEDS_MORE_INPUT + res == SZ_ERROR_NO_ARCHIVE +*/ + +UInt64 XzUnpacker_GetExtraSize(const CXzUnpacker *p); + + +/* + for random block decoding: + XzUnpacker_Init(); + set CXzUnpacker::streamFlags + XzUnpacker_PrepareToRandomBlockDecoding() + loop + { + XzUnpacker_Code() + XzUnpacker_IsBlockFinished() + } +*/ + +void XzUnpacker_PrepareToRandomBlockDecoding(CXzUnpacker *p); +BoolInt XzUnpacker_IsBlockFinished(const CXzUnpacker *p); + +#define XzUnpacker_GetPackSizeForIndex(p) ((p)->packSize + (p)->blockHeaderSize + XzFlags_GetCheckSize((p)->streamFlags)) + + + +/* ---------- Multi Threading Decoding ---------- */ + + +typedef struct +{ + size_t inBufSize_ST; + size_t outStep_ST; + BoolInt ignoreErrors; + + #ifndef _7ZIP_ST + unsigned numThreads; + size_t inBufSize_MT; + size_t memUseMax; + #endif +} CXzDecMtProps; + +void XzDecMtProps_Init(CXzDecMtProps *p); + + +typedef void * CXzDecMtHandle; + +/* + alloc : XzDecMt uses CAlignOffsetAlloc for addresses allocated by (alloc). + allocMid : for big allocations, aligned allocation is better +*/ + +CXzDecMtHandle XzDecMt_Create(ISzAllocPtr alloc, ISzAllocPtr allocMid); +void XzDecMt_Destroy(CXzDecMtHandle p); + + +typedef struct +{ + Byte UnpackSize_Defined; + Byte NumStreams_Defined; + Byte NumBlocks_Defined; + + Byte DataAfterEnd; + Byte DecodingTruncated; // Decoding was Truncated, we need only partial output data + + UInt64 InSize; // pack size processed + UInt64 OutSize; + + UInt64 NumStreams; + UInt64 NumBlocks; + + SRes DecodeRes; + SRes ReadRes; + SRes ProgressRes; + SRes CombinedRes; + SRes CombinedRes_Type; + +} CXzStatInfo; + +void XzStatInfo_Clear(CXzStatInfo *p); + +/* +XzDecMt_Decode() +SRes: + SZ_OK - OK + SZ_ERROR_MEM - Memory allocation error + SZ_ERROR_NO_ARCHIVE - is not xz archive + SZ_ERROR_ARCHIVE - Headers error + SZ_ERROR_DATA - Data Error + SZ_ERROR_CRC - CRC Error + SZ_ERROR_INPUT_EOF - it needs more input data + SZ_ERROR_WRITE - ISeqOutStream error + (SZ_ERROR_READ) - ISeqInStream errors + (SZ_ERROR_PROGRESS) - ICompressProgress errors + // SZ_ERROR_THREAD - error in multi-threading functions + MY_SRes_HRESULT_FROM_WRes(WRes_error) - error in multi-threading function +*/ + +SRes XzDecMt_Decode(CXzDecMtHandle p, + const CXzDecMtProps *props, + const UInt64 *outDataSize, // NULL means undefined + int finishMode, // 0 - partial unpacking is allowed, 1 - xz stream(s) must be finished + ISeqOutStream *outStream, + // Byte *outBuf, size_t *outBufSize, + ISeqInStream *inStream, + // const Byte *inData, size_t inDataSize, + CXzStatInfo *stat, + int *isMT, // 0 means that ST (Single-Thread) version was used + ICompressProgress *progress); + +EXTERN_C_END + +#endif diff --git a/code/nel/3rdparty/seven_zip/XzCrc64.c b/code/nel/3rdparty/seven_zip/XzCrc64.c new file mode 100644 index 000000000..b6d02cbeb --- /dev/null +++ b/code/nel/3rdparty/seven_zip/XzCrc64.c @@ -0,0 +1,86 @@ +/* XzCrc64.c -- CRC64 calculation +2017-05-23 : Igor Pavlov : Public domain */ + +#include "Precomp.h" + +#include "XzCrc64.h" +#include "CpuArch.h" + +#define kCrc64Poly UINT64_CONST(0xC96C5795D7870F42) + +#ifdef MY_CPU_LE + #define CRC64_NUM_TABLES 4 +#else + #define CRC64_NUM_TABLES 5 + #define CRC_UINT64_SWAP(v) \ + ((v >> 56) \ + | ((v >> 40) & ((UInt64)0xFF << 8)) \ + | ((v >> 24) & ((UInt64)0xFF << 16)) \ + | ((v >> 8) & ((UInt64)0xFF << 24)) \ + | ((v << 8) & ((UInt64)0xFF << 32)) \ + | ((v << 24) & ((UInt64)0xFF << 40)) \ + | ((v << 40) & ((UInt64)0xFF << 48)) \ + | ((v << 56))) + + UInt64 MY_FAST_CALL XzCrc64UpdateT1_BeT4(UInt64 v, const void *data, size_t size, const UInt64 *table); +#endif + +#ifndef MY_CPU_BE + UInt64 MY_FAST_CALL XzCrc64UpdateT4(UInt64 v, const void *data, size_t size, const UInt64 *table); +#endif + +typedef UInt64 (MY_FAST_CALL *CRC64_FUNC)(UInt64 v, const void *data, size_t size, const UInt64 *table); + +static CRC64_FUNC g_Crc64Update; +UInt64 g_Crc64Table[256 * CRC64_NUM_TABLES]; + +UInt64 MY_FAST_CALL Crc64Update(UInt64 v, const void *data, size_t size) +{ + return g_Crc64Update(v, data, size, g_Crc64Table); +} + +UInt64 MY_FAST_CALL Crc64Calc(const void *data, size_t size) +{ + return g_Crc64Update(CRC64_INIT_VAL, data, size, g_Crc64Table) ^ CRC64_INIT_VAL; +} + +void MY_FAST_CALL Crc64GenerateTable() +{ + UInt32 i; + for (i = 0; i < 256; i++) + { + UInt64 r = i; + unsigned j; + for (j = 0; j < 8; j++) + r = (r >> 1) ^ (kCrc64Poly & ((UInt64)0 - (r & 1))); + g_Crc64Table[i] = r; + } + for (i = 256; i < 256 * CRC64_NUM_TABLES; i++) + { + UInt64 r = g_Crc64Table[(size_t)i - 256]; + g_Crc64Table[i] = g_Crc64Table[r & 0xFF] ^ (r >> 8); + } + + #ifdef MY_CPU_LE + + g_Crc64Update = XzCrc64UpdateT4; + + #else + { + #ifndef MY_CPU_BE + UInt32 k = 1; + if (*(const Byte *)&k == 1) + g_Crc64Update = XzCrc64UpdateT4; + else + #endif + { + for (i = 256 * CRC64_NUM_TABLES - 1; i >= 256; i--) + { + UInt64 x = g_Crc64Table[(size_t)i - 256]; + g_Crc64Table[i] = CRC_UINT64_SWAP(x); + } + g_Crc64Update = XzCrc64UpdateT1_BeT4; + } + } + #endif +} diff --git a/code/nel/3rdparty/seven_zip/XzCrc64.h b/code/nel/3rdparty/seven_zip/XzCrc64.h new file mode 100644 index 000000000..08dbc330c --- /dev/null +++ b/code/nel/3rdparty/seven_zip/XzCrc64.h @@ -0,0 +1,26 @@ +/* XzCrc64.h -- CRC64 calculation +2013-01-18 : Igor Pavlov : Public domain */ + +#ifndef __XZ_CRC64_H +#define __XZ_CRC64_H + +#include + +#include "7zTypes.h" + +EXTERN_C_BEGIN + +extern UInt64 g_Crc64Table[]; + +void MY_FAST_CALL Crc64GenerateTable(void); + +#define CRC64_INIT_VAL UINT64_CONST(0xFFFFFFFFFFFFFFFF) +#define CRC64_GET_DIGEST(crc) ((crc) ^ CRC64_INIT_VAL) +#define CRC64_UPDATE_BYTE(crc, b) (g_Crc64Table[((crc) ^ (b)) & 0xFF] ^ ((crc) >> 8)) + +UInt64 MY_FAST_CALL Crc64Update(UInt64 crc, const void *data, size_t size); +UInt64 MY_FAST_CALL Crc64Calc(const void *data, size_t size); + +EXTERN_C_END + +#endif diff --git a/code/nel/3rdparty/seven_zip/XzCrc64Opt.c b/code/nel/3rdparty/seven_zip/XzCrc64Opt.c new file mode 100644 index 000000000..b2852de4d --- /dev/null +++ b/code/nel/3rdparty/seven_zip/XzCrc64Opt.c @@ -0,0 +1,69 @@ +/* XzCrc64Opt.c -- CRC64 calculation +2017-06-30 : Igor Pavlov : Public domain */ + +#include "Precomp.h" + +#include "CpuArch.h" + +#ifndef MY_CPU_BE + +#define CRC64_UPDATE_BYTE_2(crc, b) (table[((crc) ^ (b)) & 0xFF] ^ ((crc) >> 8)) + +UInt64 MY_FAST_CALL XzCrc64UpdateT4(UInt64 v, const void *data, size_t size, const UInt64 *table) +{ + const Byte *p = (const Byte *)data; + for (; size > 0 && ((unsigned)(ptrdiff_t)p & 3) != 0; size--, p++) + v = CRC64_UPDATE_BYTE_2(v, *p); + for (; size >= 4; size -= 4, p += 4) + { + UInt32 d = (UInt32)v ^ *(const UInt32 *)p; + v = (v >> 32) + ^ (table + 0x300)[((d ) & 0xFF)] + ^ (table + 0x200)[((d >> 8) & 0xFF)] + ^ (table + 0x100)[((d >> 16) & 0xFF)] + ^ (table + 0x000)[((d >> 24))]; + } + for (; size > 0; size--, p++) + v = CRC64_UPDATE_BYTE_2(v, *p); + return v; +} + +#endif + + +#ifndef MY_CPU_LE + +#define CRC_UINT64_SWAP(v) \ + ((v >> 56) \ + | ((v >> 40) & ((UInt64)0xFF << 8)) \ + | ((v >> 24) & ((UInt64)0xFF << 16)) \ + | ((v >> 8) & ((UInt64)0xFF << 24)) \ + | ((v << 8) & ((UInt64)0xFF << 32)) \ + | ((v << 24) & ((UInt64)0xFF << 40)) \ + | ((v << 40) & ((UInt64)0xFF << 48)) \ + | ((v << 56))) + +#define CRC64_UPDATE_BYTE_2_BE(crc, b) (table[(Byte)((crc) >> 56) ^ (b)] ^ ((crc) << 8)) + +UInt64 MY_FAST_CALL XzCrc64UpdateT1_BeT4(UInt64 v, const void *data, size_t size, const UInt64 *table) +{ + const Byte *p = (const Byte *)data; + table += 0x100; + v = CRC_UINT64_SWAP(v); + for (; size > 0 && ((unsigned)(ptrdiff_t)p & 3) != 0; size--, p++) + v = CRC64_UPDATE_BYTE_2_BE(v, *p); + for (; size >= 4; size -= 4, p += 4) + { + UInt32 d = (UInt32)(v >> 32) ^ *(const UInt32 *)p; + v = (v << 32) + ^ (table + 0x000)[((d ) & 0xFF)] + ^ (table + 0x100)[((d >> 8) & 0xFF)] + ^ (table + 0x200)[((d >> 16) & 0xFF)] + ^ (table + 0x300)[((d >> 24))]; + } + for (; size > 0; size--, p++) + v = CRC64_UPDATE_BYTE_2_BE(v, *p); + return CRC_UINT64_SWAP(v); +} + +#endif diff --git a/code/nel/3rdparty/seven_zip/XzDec.c b/code/nel/3rdparty/seven_zip/XzDec.c new file mode 100644 index 000000000..395e83f67 --- /dev/null +++ b/code/nel/3rdparty/seven_zip/XzDec.c @@ -0,0 +1,2766 @@ +/* XzDec.c -- Xz Decode +2019-02-02 : Igor Pavlov : Public domain */ + +#include "Precomp.h" + +// #include + +// #define XZ_DUMP + +/* #define XZ_DUMP */ + +#ifdef XZ_DUMP +#include +#endif + +// #define SHOW_DEBUG_INFO + +#ifdef SHOW_DEBUG_INFO +#include +#endif + +#ifdef SHOW_DEBUG_INFO +#define PRF(x) x +#else +#define PRF(x) +#endif + +#define PRF_STR(s) PRF(printf("\n" s "\n")) +#define PRF_STR_INT(s, d) PRF(printf("\n" s " %d\n", (unsigned)d)) + +#include +#include + +#include "7zCrc.h" +#include "Alloc.h" +#include "Bra.h" +#include "CpuArch.h" +#include "Delta.h" +#include "Lzma2Dec.h" + +// #define USE_SUBBLOCK + +#ifdef USE_SUBBLOCK +#include "Bcj3Dec.c" +#include "SbDec.h" +#endif + +#include "Xz.h" + +#define XZ_CHECK_SIZE_MAX 64 + +#define CODER_BUF_SIZE ((size_t)1 << 17) + +unsigned Xz_ReadVarInt(const Byte *p, size_t maxSize, UInt64 *value) +{ + unsigned i, limit; + *value = 0; + limit = (maxSize > 9) ? 9 : (unsigned)maxSize; + + for (i = 0; i < limit;) + { + Byte b = p[i]; + *value |= (UInt64)(b & 0x7F) << (7 * i++); + if ((b & 0x80) == 0) + return (b == 0 && i != 1) ? 0 : i; + } + return 0; +} + +/* ---------- BraState ---------- */ + +#define BRA_BUF_SIZE (1 << 14) + +typedef struct +{ + size_t bufPos; + size_t bufConv; + size_t bufTotal; + + int encodeMode; + + UInt32 methodId; + UInt32 delta; + UInt32 ip; + UInt32 x86State; + Byte deltaState[DELTA_STATE_SIZE]; + + Byte buf[BRA_BUF_SIZE]; +} CBraState; + +static void BraState_Free(void *pp, ISzAllocPtr alloc) +{ + ISzAlloc_Free(alloc, pp); +} + +static SRes BraState_SetProps(void *pp, const Byte *props, size_t propSize, ISzAllocPtr alloc) +{ + CBraState *p = ((CBraState *)pp); + UNUSED_VAR(alloc); + p->ip = 0; + if (p->methodId == XZ_ID_Delta) + { + if (propSize != 1) + return SZ_ERROR_UNSUPPORTED; + p->delta = (unsigned)props[0] + 1; + } + else + { + if (propSize == 4) + { + UInt32 v = GetUi32(props); + switch (p->methodId) + { + case XZ_ID_PPC: + case XZ_ID_ARM: + case XZ_ID_SPARC: + if ((v & 3) != 0) + return SZ_ERROR_UNSUPPORTED; + break; + case XZ_ID_ARMT: + if ((v & 1) != 0) + return SZ_ERROR_UNSUPPORTED; + break; + case XZ_ID_IA64: + if ((v & 0xF) != 0) + return SZ_ERROR_UNSUPPORTED; + break; + } + p->ip = v; + } + else if (propSize != 0) + return SZ_ERROR_UNSUPPORTED; + } + return SZ_OK; +} + +static void BraState_Init(void *pp) +{ + CBraState *p = ((CBraState *)pp); + p->bufPos = p->bufConv = p->bufTotal = 0; + x86_Convert_Init(p->x86State); + if (p->methodId == XZ_ID_Delta) + Delta_Init(p->deltaState); +} + + +#define CASE_BRA_CONV(isa) case XZ_ID_ ## isa: size = isa ## _Convert(data, size, p->ip, p->encodeMode); break; + +static SizeT BraState_Filter(void *pp, Byte *data, SizeT size) +{ + CBraState *p = ((CBraState *)pp); + switch (p->methodId) + { + case XZ_ID_Delta: + if (p->encodeMode) + Delta_Encode(p->deltaState, p->delta, data, size); + else + Delta_Decode(p->deltaState, p->delta, data, size); + break; + case XZ_ID_X86: + size = x86_Convert(data, size, p->ip, &p->x86State, p->encodeMode); + break; + CASE_BRA_CONV(PPC) + CASE_BRA_CONV(IA64) + CASE_BRA_CONV(ARM) + CASE_BRA_CONV(ARMT) + CASE_BRA_CONV(SPARC) + } + p->ip += (UInt32)size; + return size; +} + + +static SRes BraState_Code2(void *pp, + Byte *dest, SizeT *destLen, + const Byte *src, SizeT *srcLen, int srcWasFinished, + ECoderFinishMode finishMode, + // int *wasFinished + ECoderStatus *status) +{ + CBraState *p = ((CBraState *)pp); + SizeT destRem = *destLen; + SizeT srcRem = *srcLen; + UNUSED_VAR(finishMode); + + *destLen = 0; + *srcLen = 0; + // *wasFinished = False; + *status = CODER_STATUS_NOT_FINISHED; + + while (destRem > 0) + { + if (p->bufPos != p->bufConv) + { + size_t size = p->bufConv - p->bufPos; + if (size > destRem) + size = destRem; + memcpy(dest, p->buf + p->bufPos, size); + p->bufPos += size; + *destLen += size; + dest += size; + destRem -= size; + continue; + } + + p->bufTotal -= p->bufPos; + memmove(p->buf, p->buf + p->bufPos, p->bufTotal); + p->bufPos = 0; + p->bufConv = 0; + { + size_t size = BRA_BUF_SIZE - p->bufTotal; + if (size > srcRem) + size = srcRem; + memcpy(p->buf + p->bufTotal, src, size); + *srcLen += size; + src += size; + srcRem -= size; + p->bufTotal += size; + } + if (p->bufTotal == 0) + break; + + p->bufConv = BraState_Filter(pp, p->buf, p->bufTotal); + + if (p->bufConv == 0) + { + if (!srcWasFinished) + break; + p->bufConv = p->bufTotal; + } + } + + if (p->bufTotal == p->bufPos && srcRem == 0 && srcWasFinished) + { + *status = CODER_STATUS_FINISHED_WITH_MARK; + // *wasFinished = 1; + } + + return SZ_OK; +} + + +SRes BraState_SetFromMethod(IStateCoder *p, UInt64 id, int encodeMode, ISzAllocPtr alloc) +{ + CBraState *decoder; + if (id < XZ_ID_Delta || id > XZ_ID_SPARC) + return SZ_ERROR_UNSUPPORTED; + decoder = (CBraState *)p->p; + if (!decoder) + { + decoder = (CBraState *)ISzAlloc_Alloc(alloc, sizeof(CBraState)); + if (!decoder) + return SZ_ERROR_MEM; + p->p = decoder; + p->Free = BraState_Free; + p->SetProps = BraState_SetProps; + p->Init = BraState_Init; + p->Code2 = BraState_Code2; + p->Filter = BraState_Filter; + } + decoder->methodId = (UInt32)id; + decoder->encodeMode = encodeMode; + return SZ_OK; +} + + + +/* ---------- SbState ---------- */ + +#ifdef USE_SUBBLOCK + +static void SbState_Free(void *pp, ISzAllocPtr alloc) +{ + CSbDec *p = (CSbDec *)pp; + SbDec_Free(p); + ISzAlloc_Free(alloc, pp); +} + +static SRes SbState_SetProps(void *pp, const Byte *props, size_t propSize, ISzAllocPtr alloc) +{ + UNUSED_VAR(pp); + UNUSED_VAR(props); + UNUSED_VAR(alloc); + return (propSize == 0) ? SZ_OK : SZ_ERROR_UNSUPPORTED; +} + +static void SbState_Init(void *pp) +{ + SbDec_Init((CSbDec *)pp); +} + +static SRes SbState_Code2(void *pp, Byte *dest, SizeT *destLen, const Byte *src, SizeT *srcLen, + int srcWasFinished, ECoderFinishMode finishMode, + // int *wasFinished + ECoderStatus *status) +{ + CSbDec *p = (CSbDec *)pp; + SRes res; + UNUSED_VAR(srcWasFinished); + p->dest = dest; + p->destLen = *destLen; + p->src = src; + p->srcLen = *srcLen; + p->finish = finishMode; /* change it */ + res = SbDec_Decode((CSbDec *)pp); + *destLen -= p->destLen; + *srcLen -= p->srcLen; + // *wasFinished = (*destLen == 0 && *srcLen == 0); /* change it */ + *status = (*destLen == 0 && *srcLen == 0) ? + CODER_STATUS_FINISHED_WITH_MARK : + CODER_STATUS_NOT_FINISHED; + return res; +} + +static SRes SbState_SetFromMethod(IStateCoder *p, ISzAllocPtr alloc) +{ + CSbDec *decoder = (CSbDec *)p->p; + if (!decoder) + { + decoder = (CSbDec *)ISzAlloc_Alloc(alloc, sizeof(CSbDec)); + if (!decoder) + return SZ_ERROR_MEM; + p->p = decoder; + p->Free = SbState_Free; + p->SetProps = SbState_SetProps; + p->Init = SbState_Init; + p->Code2 = SbState_Code2; + p->Filter = NULL; + } + SbDec_Construct(decoder); + SbDec_SetAlloc(decoder, alloc); + return SZ_OK; +} + +#endif + + + +/* ---------- Lzma2 ---------- */ + +typedef struct +{ + CLzma2Dec decoder; + BoolInt outBufMode; +} CLzma2Dec_Spec; + + +static void Lzma2State_Free(void *pp, ISzAllocPtr alloc) +{ + CLzma2Dec_Spec *p = (CLzma2Dec_Spec *)pp; + if (p->outBufMode) + Lzma2Dec_FreeProbs(&p->decoder, alloc); + else + Lzma2Dec_Free(&p->decoder, alloc); + ISzAlloc_Free(alloc, pp); +} + +static SRes Lzma2State_SetProps(void *pp, const Byte *props, size_t propSize, ISzAllocPtr alloc) +{ + if (propSize != 1) + return SZ_ERROR_UNSUPPORTED; + { + CLzma2Dec_Spec *p = (CLzma2Dec_Spec *)pp; + if (p->outBufMode) + return Lzma2Dec_AllocateProbs(&p->decoder, props[0], alloc); + else + return Lzma2Dec_Allocate(&p->decoder, props[0], alloc); + } +} + +static void Lzma2State_Init(void *pp) +{ + Lzma2Dec_Init(&((CLzma2Dec_Spec *)pp)->decoder); +} + + +/* + if (outBufMode), then (dest) is not used. Use NULL. + Data is unpacked to (spec->decoder.decoder.dic) output buffer. +*/ + +static SRes Lzma2State_Code2(void *pp, Byte *dest, SizeT *destLen, const Byte *src, SizeT *srcLen, + int srcWasFinished, ECoderFinishMode finishMode, + // int *wasFinished, + ECoderStatus *status) +{ + CLzma2Dec_Spec *spec = (CLzma2Dec_Spec *)pp; + ELzmaStatus status2; + /* ELzmaFinishMode fm = (finishMode == LZMA_FINISH_ANY) ? LZMA_FINISH_ANY : LZMA_FINISH_END; */ + SRes res; + UNUSED_VAR(srcWasFinished); + if (spec->outBufMode) + { + SizeT dicPos = spec->decoder.decoder.dicPos; + SizeT dicLimit = dicPos + *destLen; + res = Lzma2Dec_DecodeToDic(&spec->decoder, dicLimit, src, srcLen, (ELzmaFinishMode)finishMode, &status2); + *destLen = spec->decoder.decoder.dicPos - dicPos; + } + else + res = Lzma2Dec_DecodeToBuf(&spec->decoder, dest, destLen, src, srcLen, (ELzmaFinishMode)finishMode, &status2); + // *wasFinished = (status2 == LZMA_STATUS_FINISHED_WITH_MARK); + // ECoderStatus values are identical to ELzmaStatus values of LZMA2 decoder + *status = (ECoderStatus)status2; + return res; +} + + +static SRes Lzma2State_SetFromMethod(IStateCoder *p, Byte *outBuf, size_t outBufSize, ISzAllocPtr alloc) +{ + CLzma2Dec_Spec *spec = (CLzma2Dec_Spec *)p->p; + if (!spec) + { + spec = (CLzma2Dec_Spec *)ISzAlloc_Alloc(alloc, sizeof(CLzma2Dec_Spec)); + if (!spec) + return SZ_ERROR_MEM; + p->p = spec; + p->Free = Lzma2State_Free; + p->SetProps = Lzma2State_SetProps; + p->Init = Lzma2State_Init; + p->Code2 = Lzma2State_Code2; + p->Filter = NULL; + Lzma2Dec_Construct(&spec->decoder); + } + spec->outBufMode = False; + if (outBuf) + { + spec->outBufMode = True; + spec->decoder.decoder.dic = outBuf; + spec->decoder.decoder.dicBufSize = outBufSize; + } + return SZ_OK; +} + + +static SRes Lzma2State_ResetOutBuf(IStateCoder *p, Byte *outBuf, size_t outBufSize) +{ + CLzma2Dec_Spec *spec = (CLzma2Dec_Spec *)p->p; + if ((spec->outBufMode && !outBuf) || (!spec->outBufMode && outBuf)) + return SZ_ERROR_FAIL; + if (outBuf) + { + spec->decoder.decoder.dic = outBuf; + spec->decoder.decoder.dicBufSize = outBufSize; + } + return SZ_OK; +} + + + +static void MixCoder_Construct(CMixCoder *p, ISzAllocPtr alloc) +{ + unsigned i; + p->alloc = alloc; + p->buf = NULL; + p->numCoders = 0; + + p->outBufSize = 0; + p->outBuf = NULL; + // p->SingleBufMode = False; + + for (i = 0; i < MIXCODER_NUM_FILTERS_MAX; i++) + p->coders[i].p = NULL; +} + + +static void MixCoder_Free(CMixCoder *p) +{ + unsigned i; + p->numCoders = 0; + for (i = 0; i < MIXCODER_NUM_FILTERS_MAX; i++) + { + IStateCoder *sc = &p->coders[i]; + if (sc->p) + { + sc->Free(sc->p, p->alloc); + sc->p = NULL; + } + } + if (p->buf) + { + ISzAlloc_Free(p->alloc, p->buf); + p->buf = NULL; /* 9.31: the BUG was fixed */ + } +} + +static void MixCoder_Init(CMixCoder *p) +{ + unsigned i; + for (i = 0; i < MIXCODER_NUM_FILTERS_MAX - 1; i++) + { + p->size[i] = 0; + p->pos[i] = 0; + p->finished[i] = 0; + } + for (i = 0; i < p->numCoders; i++) + { + IStateCoder *coder = &p->coders[i]; + coder->Init(coder->p); + p->results[i] = SZ_OK; + } + p->outWritten = 0; + p->wasFinished = False; + p->res = SZ_OK; + p->status = CODER_STATUS_NOT_SPECIFIED; +} + + +static SRes MixCoder_SetFromMethod(CMixCoder *p, unsigned coderIndex, UInt64 methodId, Byte *outBuf, size_t outBufSize) +{ + IStateCoder *sc = &p->coders[coderIndex]; + p->ids[coderIndex] = methodId; + switch (methodId) + { + case XZ_ID_LZMA2: return Lzma2State_SetFromMethod(sc, outBuf, outBufSize, p->alloc); + #ifdef USE_SUBBLOCK + case XZ_ID_Subblock: return SbState_SetFromMethod(sc, p->alloc); + #endif + } + if (coderIndex == 0) + return SZ_ERROR_UNSUPPORTED; + return BraState_SetFromMethod(sc, methodId, 0, p->alloc); +} + + +static SRes MixCoder_ResetFromMethod(CMixCoder *p, unsigned coderIndex, UInt64 methodId, Byte *outBuf, size_t outBufSize) +{ + IStateCoder *sc = &p->coders[coderIndex]; + switch (methodId) + { + case XZ_ID_LZMA2: return Lzma2State_ResetOutBuf(sc, outBuf, outBufSize); + } + return SZ_ERROR_UNSUPPORTED; +} + + + +/* + if (destFinish) - then unpack data block is finished at (*destLen) position, + and we can return data that were not processed by filter + +output (status) can be : + CODER_STATUS_NOT_FINISHED + CODER_STATUS_FINISHED_WITH_MARK + CODER_STATUS_NEEDS_MORE_INPUT - not implemented still +*/ + +static SRes MixCoder_Code(CMixCoder *p, + Byte *dest, SizeT *destLen, int destFinish, + const Byte *src, SizeT *srcLen, int srcWasFinished, + ECoderFinishMode finishMode) +{ + SizeT destLenOrig = *destLen; + SizeT srcLenOrig = *srcLen; + + *destLen = 0; + *srcLen = 0; + + if (p->wasFinished) + return p->res; + + p->status = CODER_STATUS_NOT_FINISHED; + + // if (p->SingleBufMode) + if (p->outBuf) + { + SRes res; + SizeT destLen2, srcLen2; + int wasFinished; + + PRF_STR("------- MixCoder Single ----------"); + + srcLen2 = srcLenOrig; + destLen2 = destLenOrig; + + { + IStateCoder *coder = &p->coders[0]; + res = coder->Code2(coder->p, NULL, &destLen2, src, &srcLen2, srcWasFinished, finishMode, + // &wasFinished, + &p->status); + wasFinished = (p->status == CODER_STATUS_FINISHED_WITH_MARK); + } + + p->res = res; + + /* + if (wasFinished) + p->status = CODER_STATUS_FINISHED_WITH_MARK; + else + { + if (res == SZ_OK) + if (destLen2 != destLenOrig) + p->status = CODER_STATUS_NEEDS_MORE_INPUT; + } + */ + + + *srcLen = srcLen2; + src += srcLen2; + p->outWritten += destLen2; + + if (res != SZ_OK || srcWasFinished || wasFinished) + p->wasFinished = True; + + if (p->numCoders == 1) + *destLen = destLen2; + else if (p->wasFinished) + { + unsigned i; + size_t processed = p->outWritten; + + for (i = 1; i < p->numCoders; i++) + { + IStateCoder *coder = &p->coders[i]; + processed = coder->Filter(coder->p, p->outBuf, processed); + if (wasFinished || (destFinish && p->outWritten == destLenOrig)) + processed = p->outWritten; + PRF_STR_INT("filter", i); + } + *destLen = processed; + } + return res; + } + + PRF_STR("standard mix"); + + if (p->numCoders != 1) + { + if (!p->buf) + { + p->buf = (Byte *)ISzAlloc_Alloc(p->alloc, CODER_BUF_SIZE * (MIXCODER_NUM_FILTERS_MAX - 1)); + if (!p->buf) + return SZ_ERROR_MEM; + } + + finishMode = CODER_FINISH_ANY; + } + + for (;;) + { + BoolInt processed = False; + BoolInt allFinished = True; + SRes resMain = SZ_OK; + unsigned i; + + p->status = CODER_STATUS_NOT_FINISHED; + /* + if (p->numCoders == 1 && *destLen == destLenOrig && finishMode == LZMA_FINISH_ANY) + break; + */ + + for (i = 0; i < p->numCoders; i++) + { + SRes res; + IStateCoder *coder = &p->coders[i]; + Byte *dest2; + SizeT destLen2, srcLen2; // destLen2_Orig; + const Byte *src2; + int srcFinished2; + int encodingWasFinished; + ECoderStatus status2; + + if (i == 0) + { + src2 = src; + srcLen2 = srcLenOrig - *srcLen; + srcFinished2 = srcWasFinished; + } + else + { + size_t k = i - 1; + src2 = p->buf + (CODER_BUF_SIZE * k) + p->pos[k]; + srcLen2 = p->size[k] - p->pos[k]; + srcFinished2 = p->finished[k]; + } + + if (i == p->numCoders - 1) + { + dest2 = dest; + destLen2 = destLenOrig - *destLen; + } + else + { + if (p->pos[i] != p->size[i]) + continue; + dest2 = p->buf + (CODER_BUF_SIZE * i); + destLen2 = CODER_BUF_SIZE; + } + + // destLen2_Orig = destLen2; + + if (p->results[i] != SZ_OK) + { + if (resMain == SZ_OK) + resMain = p->results[i]; + continue; + } + + res = coder->Code2(coder->p, + dest2, &destLen2, + src2, &srcLen2, srcFinished2, + finishMode, + // &encodingWasFinished, + &status2); + + if (res != SZ_OK) + { + p->results[i] = res; + if (resMain == SZ_OK) + resMain = res; + } + + encodingWasFinished = (status2 == CODER_STATUS_FINISHED_WITH_MARK); + + if (!encodingWasFinished) + { + allFinished = False; + if (p->numCoders == 1 && res == SZ_OK) + p->status = status2; + } + + if (i == 0) + { + *srcLen += srcLen2; + src += srcLen2; + } + else + p->pos[(size_t)i - 1] += srcLen2; + + if (i == p->numCoders - 1) + { + *destLen += destLen2; + dest += destLen2; + } + else + { + p->size[i] = destLen2; + p->pos[i] = 0; + p->finished[i] = encodingWasFinished; + } + + if (destLen2 != 0 || srcLen2 != 0) + processed = True; + } + + if (!processed) + { + if (allFinished) + p->status = CODER_STATUS_FINISHED_WITH_MARK; + return resMain; + } + } +} + + +SRes Xz_ParseHeader(CXzStreamFlags *p, const Byte *buf) +{ + *p = (CXzStreamFlags)GetBe16(buf + XZ_SIG_SIZE); + if (CrcCalc(buf + XZ_SIG_SIZE, XZ_STREAM_FLAGS_SIZE) != + GetUi32(buf + XZ_SIG_SIZE + XZ_STREAM_FLAGS_SIZE)) + return SZ_ERROR_NO_ARCHIVE; + return XzFlags_IsSupported(*p) ? SZ_OK : SZ_ERROR_UNSUPPORTED; +} + +static BoolInt Xz_CheckFooter(CXzStreamFlags flags, UInt64 indexSize, const Byte *buf) +{ + return indexSize == (((UInt64)GetUi32(buf + 4) + 1) << 2) + && GetUi32(buf) == CrcCalc(buf + 4, 6) + && flags == GetBe16(buf + 8) + && buf[10] == XZ_FOOTER_SIG_0 + && buf[11] == XZ_FOOTER_SIG_1; +} + +#define READ_VARINT_AND_CHECK(buf, pos, size, res) \ + { unsigned s = Xz_ReadVarInt(buf + pos, size - pos, res); \ + if (s == 0) return SZ_ERROR_ARCHIVE; pos += s; } + + +static BoolInt XzBlock_AreSupportedFilters(const CXzBlock *p) +{ + unsigned numFilters = XzBlock_GetNumFilters(p) - 1; + unsigned i; + { + const CXzFilter *f = &p->filters[numFilters]; + if (f->id != XZ_ID_LZMA2 || f->propsSize != 1 || f->props[0] > 40) + return False; + } + + for (i = 0; i < numFilters; i++) + { + const CXzFilter *f = &p->filters[i]; + if (f->id == XZ_ID_Delta) + { + if (f->propsSize != 1) + return False; + } + else if (f->id < XZ_ID_Delta + || f->id > XZ_ID_SPARC + || (f->propsSize != 0 && f->propsSize != 4)) + return False; + } + return True; +} + + +SRes XzBlock_Parse(CXzBlock *p, const Byte *header) +{ + unsigned pos; + unsigned numFilters, i; + unsigned headerSize = (unsigned)header[0] << 2; + + /* (headerSize != 0) : another code checks */ + + if (CrcCalc(header, headerSize) != GetUi32(header + headerSize)) + return SZ_ERROR_ARCHIVE; + + pos = 1; + p->flags = header[pos++]; + + p->packSize = (UInt64)(Int64)-1; + if (XzBlock_HasPackSize(p)) + { + READ_VARINT_AND_CHECK(header, pos, headerSize, &p->packSize); + if (p->packSize == 0 || p->packSize + headerSize >= (UInt64)1 << 63) + return SZ_ERROR_ARCHIVE; + } + + p->unpackSize = (UInt64)(Int64)-1; + if (XzBlock_HasUnpackSize(p)) + READ_VARINT_AND_CHECK(header, pos, headerSize, &p->unpackSize); + + numFilters = XzBlock_GetNumFilters(p); + for (i = 0; i < numFilters; i++) + { + CXzFilter *filter = p->filters + i; + UInt64 size; + READ_VARINT_AND_CHECK(header, pos, headerSize, &filter->id); + READ_VARINT_AND_CHECK(header, pos, headerSize, &size); + if (size > headerSize - pos || size > XZ_FILTER_PROPS_SIZE_MAX) + return SZ_ERROR_ARCHIVE; + filter->propsSize = (UInt32)size; + memcpy(filter->props, header + pos, (size_t)size); + pos += (unsigned)size; + + #ifdef XZ_DUMP + printf("\nf[%u] = %2X: ", i, (unsigned)filter->id); + { + unsigned i; + for (i = 0; i < size; i++) + printf(" %2X", filter->props[i]); + } + #endif + } + + if (XzBlock_HasUnsupportedFlags(p)) + return SZ_ERROR_UNSUPPORTED; + + while (pos < headerSize) + if (header[pos++] != 0) + return SZ_ERROR_ARCHIVE; + return SZ_OK; +} + + + + +static SRes XzDecMix_Init(CMixCoder *p, const CXzBlock *block, Byte *outBuf, size_t outBufSize) +{ + unsigned i; + BoolInt needReInit = True; + unsigned numFilters = XzBlock_GetNumFilters(block); + + if (numFilters == p->numCoders && ((p->outBuf && outBuf) || (!p->outBuf && !outBuf))) + { + needReInit = False; + for (i = 0; i < numFilters; i++) + if (p->ids[i] != block->filters[numFilters - 1 - i].id) + { + needReInit = True; + break; + } + } + + // p->SingleBufMode = (outBuf != NULL); + p->outBuf = outBuf; + p->outBufSize = outBufSize; + + // p->SingleBufMode = False; + // outBuf = NULL; + + if (needReInit) + { + MixCoder_Free(p); + for (i = 0; i < numFilters; i++) + { + RINOK(MixCoder_SetFromMethod(p, i, block->filters[numFilters - 1 - i].id, outBuf, outBufSize)); + } + p->numCoders = numFilters; + } + else + { + RINOK(MixCoder_ResetFromMethod(p, 0, block->filters[numFilters - 1].id, outBuf, outBufSize)); + } + + for (i = 0; i < numFilters; i++) + { + const CXzFilter *f = &block->filters[numFilters - 1 - i]; + IStateCoder *sc = &p->coders[i]; + RINOK(sc->SetProps(sc->p, f->props, f->propsSize, p->alloc)); + } + + MixCoder_Init(p); + return SZ_OK; +} + + + +void XzUnpacker_Init(CXzUnpacker *p) +{ + p->state = XZ_STATE_STREAM_HEADER; + p->pos = 0; + p->numStartedStreams = 0; + p->numFinishedStreams = 0; + p->numTotalBlocks = 0; + p->padSize = 0; + p->decodeOnlyOneBlock = 0; + + p->parseMode = False; + p->decodeToStreamSignature = False; + + // p->outBuf = NULL; + // p->outBufSize = 0; + p->outDataWritten = 0; +} + + +void XzUnpacker_SetOutBuf(CXzUnpacker *p, Byte *outBuf, size_t outBufSize) +{ + p->outBuf = outBuf; + p->outBufSize = outBufSize; +} + + +void XzUnpacker_Construct(CXzUnpacker *p, ISzAllocPtr alloc) +{ + MixCoder_Construct(&p->decoder, alloc); + p->outBuf = NULL; + p->outBufSize = 0; + XzUnpacker_Init(p); +} + + +void XzUnpacker_Free(CXzUnpacker *p) +{ + MixCoder_Free(&p->decoder); +} + + +void XzUnpacker_PrepareToRandomBlockDecoding(CXzUnpacker *p) +{ + p->indexSize = 0; + p->numBlocks = 0; + Sha256_Init(&p->sha); + p->state = XZ_STATE_BLOCK_HEADER; + p->pos = 0; + p->decodeOnlyOneBlock = 1; +} + + +static void XzUnpacker_UpdateIndex(CXzUnpacker *p, UInt64 packSize, UInt64 unpackSize) +{ + Byte temp[32]; + unsigned num = Xz_WriteVarInt(temp, packSize); + num += Xz_WriteVarInt(temp + num, unpackSize); + Sha256_Update(&p->sha, temp, num); + p->indexSize += num; + p->numBlocks++; +} + + + +SRes XzUnpacker_Code(CXzUnpacker *p, Byte *dest, SizeT *destLen, + const Byte *src, SizeT *srcLen, int srcFinished, + ECoderFinishMode finishMode, ECoderStatus *status) +{ + SizeT destLenOrig = *destLen; + SizeT srcLenOrig = *srcLen; + *destLen = 0; + *srcLen = 0; + *status = CODER_STATUS_NOT_SPECIFIED; + + for (;;) + { + SizeT srcRem; + + if (p->state == XZ_STATE_BLOCK) + { + SizeT destLen2 = destLenOrig - *destLen; + SizeT srcLen2 = srcLenOrig - *srcLen; + SRes res; + + ECoderFinishMode finishMode2 = finishMode; + BoolInt srcFinished2 = srcFinished; + BoolInt destFinish = False; + + if (p->block.packSize != (UInt64)(Int64)-1) + { + UInt64 rem = p->block.packSize - p->packSize; + if (srcLen2 >= rem) + { + srcFinished2 = True; + srcLen2 = (SizeT)rem; + } + if (rem == 0 && p->block.unpackSize == p->unpackSize) + return SZ_ERROR_DATA; + } + + if (p->block.unpackSize != (UInt64)(Int64)-1) + { + UInt64 rem = p->block.unpackSize - p->unpackSize; + if (destLen2 >= rem) + { + destFinish = True; + finishMode2 = CODER_FINISH_END; + destLen2 = (SizeT)rem; + } + } + + /* + if (srcLen2 == 0 && destLen2 == 0) + { + *status = CODER_STATUS_NOT_FINISHED; + return SZ_OK; + } + */ + + { + res = MixCoder_Code(&p->decoder, + (p->outBuf ? NULL : dest), &destLen2, destFinish, + src, &srcLen2, srcFinished2, + finishMode2); + + *status = p->decoder.status; + XzCheck_Update(&p->check, (p->outBuf ? p->outBuf + p->outDataWritten : dest), destLen2); + if (!p->outBuf) + dest += destLen2; + p->outDataWritten += destLen2; + } + + (*srcLen) += srcLen2; + src += srcLen2; + p->packSize += srcLen2; + (*destLen) += destLen2; + p->unpackSize += destLen2; + + RINOK(res); + + if (*status != CODER_STATUS_FINISHED_WITH_MARK) + { + if (p->block.packSize == p->packSize + && *status == CODER_STATUS_NEEDS_MORE_INPUT) + { + PRF_STR("CODER_STATUS_NEEDS_MORE_INPUT"); + *status = CODER_STATUS_NOT_SPECIFIED; + return SZ_ERROR_DATA; + } + + return SZ_OK; + } + { + XzUnpacker_UpdateIndex(p, XzUnpacker_GetPackSizeForIndex(p), p->unpackSize); + p->state = XZ_STATE_BLOCK_FOOTER; + p->pos = 0; + p->alignPos = 0; + *status = CODER_STATUS_NOT_SPECIFIED; + + if ((p->block.packSize != (UInt64)(Int64)-1 && p->block.packSize != p->packSize) + || (p->block.unpackSize != (UInt64)(Int64)-1 && p->block.unpackSize != p->unpackSize)) + { + PRF_STR("ERROR: block.size mismatch"); + return SZ_ERROR_DATA; + } + } + // continue; + } + + srcRem = srcLenOrig - *srcLen; + + // XZ_STATE_BLOCK_FOOTER can transit to XZ_STATE_BLOCK_HEADER without input bytes + if (srcRem == 0 && p->state != XZ_STATE_BLOCK_FOOTER) + { + *status = CODER_STATUS_NEEDS_MORE_INPUT; + return SZ_OK; + } + + switch (p->state) + { + case XZ_STATE_STREAM_HEADER: + { + if (p->pos < XZ_STREAM_HEADER_SIZE) + { + if (p->pos < XZ_SIG_SIZE && *src != XZ_SIG[p->pos]) + return SZ_ERROR_NO_ARCHIVE; + if (p->decodeToStreamSignature) + return SZ_OK; + p->buf[p->pos++] = *src++; + (*srcLen)++; + } + else + { + RINOK(Xz_ParseHeader(&p->streamFlags, p->buf)); + p->numStartedStreams++; + p->indexSize = 0; + p->numBlocks = 0; + Sha256_Init(&p->sha); + p->state = XZ_STATE_BLOCK_HEADER; + p->pos = 0; + } + break; + } + + case XZ_STATE_BLOCK_HEADER: + { + if (p->pos == 0) + { + p->buf[p->pos++] = *src++; + (*srcLen)++; + if (p->buf[0] == 0) + { + if (p->decodeOnlyOneBlock) + return SZ_ERROR_DATA; + p->indexPreSize = 1 + Xz_WriteVarInt(p->buf + 1, p->numBlocks); + p->indexPos = p->indexPreSize; + p->indexSize += p->indexPreSize; + Sha256_Final(&p->sha, p->shaDigest); + Sha256_Init(&p->sha); + p->crc = CrcUpdate(CRC_INIT_VAL, p->buf, p->indexPreSize); + p->state = XZ_STATE_STREAM_INDEX; + break; + } + p->blockHeaderSize = ((UInt32)p->buf[0] << 2) + 4; + break; + } + + if (p->pos != p->blockHeaderSize) + { + UInt32 cur = p->blockHeaderSize - p->pos; + if (cur > srcRem) + cur = (UInt32)srcRem; + memcpy(p->buf + p->pos, src, cur); + p->pos += cur; + (*srcLen) += cur; + src += cur; + } + else + { + RINOK(XzBlock_Parse(&p->block, p->buf)); + if (!XzBlock_AreSupportedFilters(&p->block)) + return SZ_ERROR_UNSUPPORTED; + p->numTotalBlocks++; + p->state = XZ_STATE_BLOCK; + p->packSize = 0; + p->unpackSize = 0; + XzCheck_Init(&p->check, XzFlags_GetCheckType(p->streamFlags)); + if (p->parseMode) + { + p->headerParsedOk = True; + return SZ_OK; + } + RINOK(XzDecMix_Init(&p->decoder, &p->block, p->outBuf, p->outBufSize)); + } + break; + } + + case XZ_STATE_BLOCK_FOOTER: + { + if ((((unsigned)p->packSize + p->alignPos) & 3) != 0) + { + if (srcRem == 0) + { + *status = CODER_STATUS_NEEDS_MORE_INPUT; + return SZ_OK; + } + (*srcLen)++; + p->alignPos++; + if (*src++ != 0) + return SZ_ERROR_CRC; + } + else + { + UInt32 checkSize = XzFlags_GetCheckSize(p->streamFlags); + UInt32 cur = checkSize - p->pos; + if (cur != 0) + { + if (srcRem == 0) + { + *status = CODER_STATUS_NEEDS_MORE_INPUT; + return SZ_OK; + } + if (cur > srcRem) + cur = (UInt32)srcRem; + memcpy(p->buf + p->pos, src, cur); + p->pos += cur; + (*srcLen) += cur; + src += cur; + if (checkSize != p->pos) + break; + } + { + Byte digest[XZ_CHECK_SIZE_MAX]; + p->state = XZ_STATE_BLOCK_HEADER; + p->pos = 0; + if (XzCheck_Final(&p->check, digest) && memcmp(digest, p->buf, checkSize) != 0) + return SZ_ERROR_CRC; + if (p->decodeOnlyOneBlock) + { + *status = CODER_STATUS_FINISHED_WITH_MARK; + return SZ_OK; + } + } + } + break; + } + + case XZ_STATE_STREAM_INDEX: + { + if (p->pos < p->indexPreSize) + { + (*srcLen)++; + if (*src++ != p->buf[p->pos++]) + return SZ_ERROR_CRC; + } + else + { + if (p->indexPos < p->indexSize) + { + UInt64 cur = p->indexSize - p->indexPos; + if (srcRem > cur) + srcRem = (SizeT)cur; + p->crc = CrcUpdate(p->crc, src, srcRem); + Sha256_Update(&p->sha, src, srcRem); + (*srcLen) += srcRem; + src += srcRem; + p->indexPos += srcRem; + } + else if ((p->indexPos & 3) != 0) + { + Byte b = *src++; + p->crc = CRC_UPDATE_BYTE(p->crc, b); + (*srcLen)++; + p->indexPos++; + p->indexSize++; + if (b != 0) + return SZ_ERROR_CRC; + } + else + { + Byte digest[SHA256_DIGEST_SIZE]; + p->state = XZ_STATE_STREAM_INDEX_CRC; + p->indexSize += 4; + p->pos = 0; + Sha256_Final(&p->sha, digest); + if (memcmp(digest, p->shaDigest, SHA256_DIGEST_SIZE) != 0) + return SZ_ERROR_CRC; + } + } + break; + } + + case XZ_STATE_STREAM_INDEX_CRC: + { + if (p->pos < 4) + { + (*srcLen)++; + p->buf[p->pos++] = *src++; + } + else + { + p->state = XZ_STATE_STREAM_FOOTER; + p->pos = 0; + if (CRC_GET_DIGEST(p->crc) != GetUi32(p->buf)) + return SZ_ERROR_CRC; + } + break; + } + + case XZ_STATE_STREAM_FOOTER: + { + UInt32 cur = XZ_STREAM_FOOTER_SIZE - p->pos; + if (cur > srcRem) + cur = (UInt32)srcRem; + memcpy(p->buf + p->pos, src, cur); + p->pos += cur; + (*srcLen) += cur; + src += cur; + if (p->pos == XZ_STREAM_FOOTER_SIZE) + { + p->state = XZ_STATE_STREAM_PADDING; + p->numFinishedStreams++; + p->padSize = 0; + if (!Xz_CheckFooter(p->streamFlags, p->indexSize, p->buf)) + return SZ_ERROR_CRC; + } + break; + } + + case XZ_STATE_STREAM_PADDING: + { + if (*src != 0) + { + if (((UInt32)p->padSize & 3) != 0) + return SZ_ERROR_NO_ARCHIVE; + p->pos = 0; + p->state = XZ_STATE_STREAM_HEADER; + } + else + { + (*srcLen)++; + src++; + p->padSize++; + } + break; + } + + case XZ_STATE_BLOCK: break; /* to disable GCC warning */ + } + } + /* + if (p->state == XZ_STATE_FINISHED) + *status = CODER_STATUS_FINISHED_WITH_MARK; + return SZ_OK; + */ +} + + +SRes XzUnpacker_CodeFull(CXzUnpacker *p, Byte *dest, SizeT *destLen, + const Byte *src, SizeT *srcLen, + ECoderFinishMode finishMode, ECoderStatus *status) +{ + XzUnpacker_Init(p); + XzUnpacker_SetOutBuf(p, dest, *destLen); + + return XzUnpacker_Code(p, + NULL, destLen, + src, srcLen, True, + finishMode, status); +} + + +BoolInt XzUnpacker_IsBlockFinished(const CXzUnpacker *p) +{ + return (p->state == XZ_STATE_BLOCK_HEADER) && (p->pos == 0); +} + +BoolInt XzUnpacker_IsStreamWasFinished(const CXzUnpacker *p) +{ + return (p->state == XZ_STATE_STREAM_PADDING) && (((UInt32)p->padSize & 3) == 0); +} + +UInt64 XzUnpacker_GetExtraSize(const CXzUnpacker *p) +{ + UInt64 num = 0; + if (p->state == XZ_STATE_STREAM_PADDING) + num = p->padSize; + else if (p->state == XZ_STATE_STREAM_HEADER) + num = p->padSize + p->pos; + return num; +} + + + + + + + + + + + + + + + + + + + + + +#ifndef _7ZIP_ST +#include "MtDec.h" +#endif + + +void XzDecMtProps_Init(CXzDecMtProps *p) +{ + p->inBufSize_ST = 1 << 18; + p->outStep_ST = 1 << 20; + p->ignoreErrors = False; + + #ifndef _7ZIP_ST + p->numThreads = 1; + p->inBufSize_MT = 1 << 18; + p->memUseMax = sizeof(size_t) << 28; + #endif +} + + + +#ifndef _7ZIP_ST + +/* ---------- CXzDecMtThread ---------- */ + +typedef struct +{ + Byte *outBuf; + size_t outBufSize; + size_t outPreSize; + size_t inPreSize; + size_t inPreHeaderSize; + size_t blockPackSize_for_Index; // including block header and checksum. + size_t blockPackTotal; // including stream header, block header and checksum. + size_t inCodeSize; + size_t outCodeSize; + ECoderStatus status; + SRes codeRes; + BoolInt skipMode; + // BoolInt finishedWithMark; + EMtDecParseState parseState; + BoolInt parsing_Truncated; + BoolInt atBlockHeader; + CXzStreamFlags streamFlags; + // UInt64 numFinishedStreams + UInt64 numStreams; + UInt64 numTotalBlocks; + UInt64 numBlocks; + + BoolInt dec_created; + CXzUnpacker dec; + + Byte mtPad[1 << 7]; +} CXzDecMtThread; + +#endif + + +/* ---------- CXzDecMt ---------- */ + +typedef struct +{ + CAlignOffsetAlloc alignOffsetAlloc; + ISzAllocPtr allocMid; + + CXzDecMtProps props; + size_t unpackBlockMaxSize; + + ISeqInStream *inStream; + ISeqOutStream *outStream; + ICompressProgress *progress; + // CXzStatInfo *stat; + + BoolInt finishMode; + BoolInt outSize_Defined; + UInt64 outSize; + + UInt64 outProcessed; + UInt64 inProcessed; + UInt64 readProcessed; + BoolInt readWasFinished; + SRes readRes; + SRes writeRes; + + Byte *outBuf; + size_t outBufSize; + Byte *inBuf; + size_t inBufSize; + + CXzUnpacker dec; + + ECoderStatus status; + SRes codeRes; + + #ifndef _7ZIP_ST + BoolInt mainDecoderWasCalled; + // int statErrorDefined; + int finishedDecoderIndex; + + // global values that are used in Parse stage + CXzStreamFlags streamFlags; + // UInt64 numFinishedStreams + UInt64 numStreams; + UInt64 numTotalBlocks; + UInt64 numBlocks; + + // UInt64 numBadBlocks; + SRes mainErrorCode; + + BoolInt isBlockHeaderState_Parse; + BoolInt isBlockHeaderState_Write; + UInt64 outProcessed_Parse; + BoolInt parsing_Truncated; + + BoolInt mtc_WasConstructed; + CMtDec mtc; + CXzDecMtThread coders[MTDEC__THREADS_MAX]; + #endif + +} CXzDecMt; + + + +CXzDecMtHandle XzDecMt_Create(ISzAllocPtr alloc, ISzAllocPtr allocMid) +{ + CXzDecMt *p = (CXzDecMt *)ISzAlloc_Alloc(alloc, sizeof(CXzDecMt)); + if (!p) + return NULL; + + AlignOffsetAlloc_CreateVTable(&p->alignOffsetAlloc); + p->alignOffsetAlloc.baseAlloc = alloc; + p->alignOffsetAlloc.numAlignBits = 7; + p->alignOffsetAlloc.offset = 0; + + p->allocMid = allocMid; + + p->outBuf = NULL; + p->outBufSize = 0; + p->inBuf = NULL; + p->inBufSize = 0; + + XzUnpacker_Construct(&p->dec, &p->alignOffsetAlloc.vt); + + p->unpackBlockMaxSize = 0; + + XzDecMtProps_Init(&p->props); + + #ifndef _7ZIP_ST + p->mtc_WasConstructed = False; + { + unsigned i; + for (i = 0; i < MTDEC__THREADS_MAX; i++) + { + CXzDecMtThread *coder = &p->coders[i]; + coder->dec_created = False; + coder->outBuf = NULL; + coder->outBufSize = 0; + } + } + #endif + + return p; +} + + +#ifndef _7ZIP_ST + +static void XzDecMt_FreeOutBufs(CXzDecMt *p) +{ + unsigned i; + for (i = 0; i < MTDEC__THREADS_MAX; i++) + { + CXzDecMtThread *coder = &p->coders[i]; + if (coder->outBuf) + { + ISzAlloc_Free(p->allocMid, coder->outBuf); + coder->outBuf = NULL; + coder->outBufSize = 0; + } + } + p->unpackBlockMaxSize = 0; +} + +#endif + + + +static void XzDecMt_FreeSt(CXzDecMt *p) +{ + XzUnpacker_Free(&p->dec); + + if (p->outBuf) + { + ISzAlloc_Free(p->allocMid, p->outBuf); + p->outBuf = NULL; + } + p->outBufSize = 0; + + if (p->inBuf) + { + ISzAlloc_Free(p->allocMid, p->inBuf); + p->inBuf = NULL; + } + p->inBufSize = 0; +} + + +void XzDecMt_Destroy(CXzDecMtHandle pp) +{ + CXzDecMt *p = (CXzDecMt *)pp; + + XzDecMt_FreeSt(p); + + #ifndef _7ZIP_ST + + if (p->mtc_WasConstructed) + { + MtDec_Destruct(&p->mtc); + p->mtc_WasConstructed = False; + } + { + unsigned i; + for (i = 0; i < MTDEC__THREADS_MAX; i++) + { + CXzDecMtThread *t = &p->coders[i]; + if (t->dec_created) + { + // we don't need to free dict here + XzUnpacker_Free(&t->dec); + t->dec_created = False; + } + } + } + XzDecMt_FreeOutBufs(p); + + #endif + + ISzAlloc_Free(p->alignOffsetAlloc.baseAlloc, pp); +} + + + +#ifndef _7ZIP_ST + +static void XzDecMt_Callback_Parse(void *obj, unsigned coderIndex, CMtDecCallbackInfo *cc) +{ + CXzDecMt *me = (CXzDecMt *)obj; + CXzDecMtThread *coder = &me->coders[coderIndex]; + size_t srcSize = cc->srcSize; + + cc->srcSize = 0; + cc->outPos = 0; + cc->state = MTDEC_PARSE_CONTINUE; + + cc->canCreateNewThread = True; + + if (cc->startCall) + { + coder->outPreSize = 0; + coder->inPreSize = 0; + coder->inPreHeaderSize = 0; + coder->parseState = MTDEC_PARSE_CONTINUE; + coder->parsing_Truncated = False; + coder->skipMode = False; + coder->codeRes = SZ_OK; + coder->status = CODER_STATUS_NOT_SPECIFIED; + coder->inCodeSize = 0; + coder->outCodeSize = 0; + + coder->numStreams = me->numStreams; + coder->numTotalBlocks = me->numTotalBlocks; + coder->numBlocks = me->numBlocks; + + if (!coder->dec_created) + { + XzUnpacker_Construct(&coder->dec, &me->alignOffsetAlloc.vt); + coder->dec_created = True; + } + + XzUnpacker_Init(&coder->dec); + + if (me->isBlockHeaderState_Parse) + { + coder->dec.streamFlags = me->streamFlags; + coder->atBlockHeader = True; + XzUnpacker_PrepareToRandomBlockDecoding(&coder->dec); + } + else + { + coder->atBlockHeader = False; + me->isBlockHeaderState_Parse = True; + } + + coder->dec.numStartedStreams = me->numStreams; + coder->dec.numTotalBlocks = me->numTotalBlocks; + coder->dec.numBlocks = me->numBlocks; + } + + while (!coder->skipMode) + { + ECoderStatus status; + SRes res; + size_t srcSize2 = srcSize; + size_t destSize = (size_t)0 - 1; + + coder->dec.parseMode = True; + coder->dec.headerParsedOk = False; + + PRF_STR_INT("Parse", srcSize2); + + res = XzUnpacker_Code(&coder->dec, + NULL, &destSize, + cc->src, &srcSize2, cc->srcFinished, + CODER_FINISH_END, &status); + + // PRF(printf(" res = %d, srcSize2 = %d", res, (unsigned)srcSize2)); + + coder->codeRes = res; + coder->status = status; + cc->srcSize += srcSize2; + srcSize -= srcSize2; + coder->inPreHeaderSize += srcSize2; + coder->inPreSize = coder->inPreHeaderSize; + + if (res != SZ_OK) + { + cc->state = + coder->parseState = MTDEC_PARSE_END; + /* + if (res == SZ_ERROR_MEM) + return res; + return SZ_OK; + */ + return; // res; + } + + if (coder->dec.headerParsedOk) + { + const CXzBlock *block = &coder->dec.block; + if (XzBlock_HasUnpackSize(block) + // && block->unpackSize <= me->props.outBlockMax + && XzBlock_HasPackSize(block)) + { + { + if (block->unpackSize * 2 * me->mtc.numStartedThreads > me->props.memUseMax) + { + cc->state = MTDEC_PARSE_OVERFLOW; + return; // SZ_OK; + } + } + { + UInt64 packSize = block->packSize; + UInt64 packSizeAligned = packSize + ((0 - (unsigned)packSize) & 3); + UInt32 checkSize = XzFlags_GetCheckSize(coder->dec.streamFlags); + UInt64 blockPackSum = coder->inPreSize + packSizeAligned + checkSize; + // if (blockPackSum <= me->props.inBlockMax) + // unpackBlockMaxSize + { + coder->blockPackSize_for_Index = (size_t)(coder->dec.blockHeaderSize + packSize + checkSize); + coder->blockPackTotal = (size_t)blockPackSum; + coder->outPreSize = (size_t)block->unpackSize; + coder->streamFlags = coder->dec.streamFlags; + me->streamFlags = coder->dec.streamFlags; + coder->skipMode = True; + break; + } + } + } + } + else + // if (coder->inPreSize <= me->props.inBlockMax) + { + if (!cc->srcFinished) + return; // SZ_OK; + cc->state = + coder->parseState = MTDEC_PARSE_END; + return; // SZ_OK; + } + cc->state = MTDEC_PARSE_OVERFLOW; + return; // SZ_OK; + } + + // ---------- skipMode ---------- + { + UInt64 rem = coder->blockPackTotal - coder->inPreSize; + size_t cur = srcSize; + if (cur > rem) + cur = (size_t)rem; + cc->srcSize += cur; + coder->inPreSize += cur; + srcSize -= cur; + + if (coder->inPreSize == coder->blockPackTotal) + { + if (srcSize == 0) + { + if (!cc->srcFinished) + return; // SZ_OK; + cc->state = MTDEC_PARSE_END; + } + else if ((cc->src)[cc->srcSize] == 0) // we check control byte of next block + cc->state = MTDEC_PARSE_END; + else + { + cc->state = MTDEC_PARSE_NEW; + + { + size_t blockMax = me->unpackBlockMaxSize; + if (blockMax < coder->outPreSize) + blockMax = coder->outPreSize; + { + UInt64 required = (UInt64)blockMax * (me->mtc.numStartedThreads + 1) * 2; + if (me->props.memUseMax < required) + cc->canCreateNewThread = False; + } + } + + if (me->outSize_Defined) + { + // next block can be zero size + const UInt64 rem2 = me->outSize - me->outProcessed_Parse; + if (rem2 < coder->outPreSize) + { + coder->parsing_Truncated = True; + cc->state = MTDEC_PARSE_END; + } + me->outProcessed_Parse += coder->outPreSize; + } + } + } + else if (cc->srcFinished) + cc->state = MTDEC_PARSE_END; + else + return; // SZ_OK; + + coder->parseState = cc->state; + cc->outPos = coder->outPreSize; + + me->numStreams = coder->dec.numStartedStreams; + me->numTotalBlocks = coder->dec.numTotalBlocks; + me->numBlocks = coder->dec.numBlocks + 1; + return; // SZ_OK; + } +} + + +static SRes XzDecMt_Callback_PreCode(void *pp, unsigned coderIndex) +{ + CXzDecMt *me = (CXzDecMt *)pp; + CXzDecMtThread *coder = &me->coders[coderIndex]; + Byte *dest; + + if (!coder->dec.headerParsedOk) + return SZ_OK; + + dest = coder->outBuf; + + if (!dest || coder->outBufSize < coder->outPreSize) + { + if (dest) + { + ISzAlloc_Free(me->allocMid, dest); + coder->outBuf = NULL; + coder->outBufSize = 0; + } + { + size_t outPreSize = coder->outPreSize; + if (outPreSize == 0) + outPreSize = 1; + dest = (Byte *)ISzAlloc_Alloc(me->allocMid, outPreSize); + } + if (!dest) + return SZ_ERROR_MEM; + coder->outBuf = dest; + coder->outBufSize = coder->outPreSize; + + if (coder->outBufSize > me->unpackBlockMaxSize) + me->unpackBlockMaxSize = coder->outBufSize; + } + + // return SZ_ERROR_MEM; + + XzUnpacker_SetOutBuf(&coder->dec, coder->outBuf, coder->outBufSize); + + { + SRes res = XzDecMix_Init(&coder->dec.decoder, &coder->dec.block, coder->outBuf, coder->outBufSize); + // res = SZ_ERROR_UNSUPPORTED; // to test + coder->codeRes = res; + if (res != SZ_OK) + { + // if (res == SZ_ERROR_MEM) return res; + if (me->props.ignoreErrors && res != SZ_ERROR_MEM) + return S_OK; + return res; + } + } + + return SZ_OK; +} + + +static SRes XzDecMt_Callback_Code(void *pp, unsigned coderIndex, + const Byte *src, size_t srcSize, int srcFinished, + // int finished, int blockFinished, + UInt64 *inCodePos, UInt64 *outCodePos, int *stop) +{ + CXzDecMt *me = (CXzDecMt *)pp; + CXzDecMtThread *coder = &me->coders[coderIndex]; + + *inCodePos = coder->inCodeSize; + *outCodePos = coder->outCodeSize; + *stop = True; + + if (coder->inCodeSize < coder->inPreHeaderSize) + { + UInt64 rem = coder->inPreHeaderSize - coder->inCodeSize; + size_t step = srcSize; + if (step > rem) + step = (size_t)rem; + src += step; + srcSize -= step; + coder->inCodeSize += step; + if (coder->inCodeSize < coder->inPreHeaderSize) + { + *stop = False; + return SZ_OK; + } + } + + if (!coder->dec.headerParsedOk) + return SZ_OK; + if (!coder->outBuf) + return SZ_OK; + + if (coder->codeRes == SZ_OK) + { + ECoderStatus status; + SRes res; + size_t srcProcessed = srcSize; + size_t outSizeCur = coder->outPreSize - coder->dec.outDataWritten; + + // PRF(printf("\nCallback_Code: Code %d %d\n", (unsigned)srcSize, (unsigned)outSizeCur)); + + res = XzUnpacker_Code(&coder->dec, + NULL, &outSizeCur, + src, &srcProcessed, srcFinished, + // coder->finishedWithMark ? CODER_FINISH_END : CODER_FINISH_ANY, + CODER_FINISH_END, + &status); + + // PRF(printf(" res = %d, srcSize2 = %d, outSizeCur = %d", res, (unsigned)srcProcessed, (unsigned)outSizeCur)); + + coder->codeRes = res; + coder->status = status; + coder->inCodeSize += srcProcessed; + coder->outCodeSize = coder->dec.outDataWritten; + *inCodePos = coder->inCodeSize; + *outCodePos = coder->outCodeSize; + + if (res == SZ_OK) + { + if (srcProcessed == srcSize) + *stop = False; + return SZ_OK; + } + } + + if (me->props.ignoreErrors && coder->codeRes != SZ_ERROR_MEM) + { + *inCodePos = coder->inPreSize; + *outCodePos = coder->outPreSize; + return S_OK; + } + return coder->codeRes; +} + + +#define XZDECMT_STREAM_WRITE_STEP (1 << 24) + +static SRes XzDecMt_Callback_Write(void *pp, unsigned coderIndex, + BoolInt needWriteToStream, + const Byte *src, size_t srcSize, + // int srcFinished, + BoolInt *needContinue, + BoolInt *canRecode) +{ + CXzDecMt *me = (CXzDecMt *)pp; + const CXzDecMtThread *coder = &me->coders[coderIndex]; + + // PRF(printf("\nWrite processed = %d srcSize = %d\n", (unsigned)me->mtc.inProcessed, (unsigned)srcSize)); + + *needContinue = False; + *canRecode = True; + + if (!needWriteToStream) + return SZ_OK; + + if (!coder->dec.headerParsedOk || !coder->outBuf) + { + if (me->finishedDecoderIndex < 0) + me->finishedDecoderIndex = coderIndex; + return SZ_OK; + } + + if (me->finishedDecoderIndex >= 0) + return SZ_OK; + + me->mtc.inProcessed += coder->inCodeSize; + + *canRecode = False; + + { + SRes res; + size_t size = coder->outCodeSize; + Byte *data = coder->outBuf; + + // we use in me->dec: sha, numBlocks, indexSize + + if (!me->isBlockHeaderState_Write) + { + XzUnpacker_PrepareToRandomBlockDecoding(&me->dec); + me->dec.decodeOnlyOneBlock = False; + me->dec.numStartedStreams = coder->dec.numStartedStreams; + me->dec.streamFlags = coder->streamFlags; + + me->isBlockHeaderState_Write = True; + } + + me->dec.numTotalBlocks = coder->dec.numTotalBlocks; + XzUnpacker_UpdateIndex(&me->dec, coder->blockPackSize_for_Index, coder->outPreSize); + + if (coder->outPreSize != size) + { + if (me->props.ignoreErrors) + { + memset(data + size, 0, coder->outPreSize - size); + size = coder->outPreSize; + } + // me->numBadBlocks++; + if (me->mainErrorCode == SZ_OK) + { + if ((int)coder->status == LZMA_STATUS_NEEDS_MORE_INPUT) + me->mainErrorCode = SZ_ERROR_INPUT_EOF; + else + me->mainErrorCode = SZ_ERROR_DATA; + } + } + + if (me->writeRes != SZ_OK) + return me->writeRes; + + res = SZ_OK; + { + if (me->outSize_Defined) + { + const UInt64 rem = me->outSize - me->outProcessed; + if (size > rem) + size = (SizeT)rem; + } + + for (;;) + { + size_t cur = size; + size_t written; + if (cur > XZDECMT_STREAM_WRITE_STEP) + cur = XZDECMT_STREAM_WRITE_STEP; + + written = ISeqOutStream_Write(me->outStream, data, cur); + + // PRF(printf("\nWritten ask = %d written = %d\n", (unsigned)cur, (unsigned)written)); + + me->outProcessed += written; + if (written != cur) + { + me->writeRes = SZ_ERROR_WRITE; + res = me->writeRes; + break; + } + data += cur; + size -= cur; + // PRF_STR_INT("Written size =", size); + if (size == 0) + break; + res = MtProgress_ProgressAdd(&me->mtc.mtProgress, 0, 0); + if (res != SZ_OK) + break; + } + } + + if (coder->codeRes != SZ_OK) + if (!me->props.ignoreErrors) + { + me->finishedDecoderIndex = coderIndex; + return res; + } + + RINOK(res); + + if (coder->inPreSize != coder->inCodeSize + || coder->blockPackTotal != coder->inCodeSize) + { + me->finishedDecoderIndex = coderIndex; + return SZ_OK; + } + + if (coder->parseState != MTDEC_PARSE_END) + { + *needContinue = True; + return SZ_OK; + } + } + + // (coder->state == MTDEC_PARSE_END) means that there are no other working threads + // so we can use mtc variables without lock + + PRF_STR_INT("Write MTDEC_PARSE_END", me->mtc.inProcessed); + + me->mtc.mtProgress.totalInSize = me->mtc.inProcessed; + { + CXzUnpacker *dec = &me->dec; + + PRF_STR_INT("PostSingle", srcSize); + + { + size_t srcProcessed = srcSize; + ECoderStatus status; + size_t outSizeCur = 0; + SRes res; + + // dec->decodeOnlyOneBlock = False; + dec->decodeToStreamSignature = True; + + me->mainDecoderWasCalled = True; + + if (coder->parsing_Truncated) + { + me->parsing_Truncated = True; + return SZ_OK; + } + + res = XzUnpacker_Code(dec, + NULL, &outSizeCur, + src, &srcProcessed, + me->mtc.readWasFinished, // srcFinished + CODER_FINISH_END, // CODER_FINISH_ANY, + &status); + + me->status = status; + me->codeRes = res; + + me->mtc.inProcessed += srcProcessed; + me->mtc.mtProgress.totalInSize = me->mtc.inProcessed; + + if (res != SZ_OK) + { + return S_OK; + // return res; + } + + if (dec->state == XZ_STATE_STREAM_HEADER) + { + *needContinue = True; + me->isBlockHeaderState_Parse = False; + me->isBlockHeaderState_Write = False; + { + Byte *crossBuf = MtDec_GetCrossBuff(&me->mtc); + if (!crossBuf) + return SZ_ERROR_MEM; + memcpy(crossBuf, src + srcProcessed, srcSize - srcProcessed); + } + me->mtc.crossStart = 0; + me->mtc.crossEnd = srcSize - srcProcessed; + return SZ_OK; + } + + if (status != CODER_STATUS_NEEDS_MORE_INPUT) + { + return E_FAIL; + } + + if (me->mtc.readWasFinished) + { + return SZ_OK; + } + } + + { + size_t inPos; + size_t inLim; + const Byte *inData; + UInt64 inProgressPrev = me->mtc.inProcessed; + + // XzDecMt_Prepare_InBuf_ST(p); + Byte *crossBuf = MtDec_GetCrossBuff(&me->mtc); + if (!crossBuf) + return SZ_ERROR_MEM; + + inPos = 0; + inLim = 0; + // outProcessed = 0; + + inData = crossBuf; + + for (;;) + { + SizeT inProcessed; + SizeT outProcessed; + ECoderStatus status; + SRes res; + + if (inPos == inLim) + { + if (!me->mtc.readWasFinished) + { + inPos = 0; + inLim = me->mtc.inBufSize; + me->mtc.readRes = ISeqInStream_Read(me->inStream, (void *)inData, &inLim); + me->mtc.readProcessed += inLim; + if (inLim == 0 || me->mtc.readRes != SZ_OK) + me->mtc.readWasFinished = True; + } + } + + inProcessed = inLim - inPos; + outProcessed = 0; + + res = XzUnpacker_Code(dec, + NULL, &outProcessed, + inData + inPos, &inProcessed, + (inProcessed == 0), // srcFinished + CODER_FINISH_END, &status); + + me->codeRes = res; + me->status = status; + inPos += inProcessed; + me->mtc.inProcessed += inProcessed; + me->mtc.mtProgress.totalInSize = me->mtc.inProcessed; + + if (res != SZ_OK) + { + return S_OK; + // return res; + } + + if (dec->state == XZ_STATE_STREAM_HEADER) + { + *needContinue = True; + me->mtc.crossStart = inPos; + me->mtc.crossEnd = inLim; + me->isBlockHeaderState_Parse = False; + me->isBlockHeaderState_Write = False; + return SZ_OK; + } + + if (status != CODER_STATUS_NEEDS_MORE_INPUT) + return E_FAIL; + + if (me->mtc.progress) + { + UInt64 inDelta = me->mtc.inProcessed - inProgressPrev; + if (inDelta >= (1 << 22)) + { + RINOK(MtProgress_Progress_ST(&me->mtc.mtProgress)); + inProgressPrev = me->mtc.inProcessed; + } + } + if (me->mtc.readWasFinished) + return SZ_OK; + } + } + } +} + + +#endif + + + +void XzStatInfo_Clear(CXzStatInfo *p) +{ + p->InSize = 0; + p->OutSize = 0; + + p->NumStreams = 0; + p->NumBlocks = 0; + + p->UnpackSize_Defined = False; + + p->NumStreams_Defined = False; + p->NumBlocks_Defined = False; + + // p->IsArc = False; + // p->UnexpectedEnd = False; + // p->Unsupported = False; + // p->HeadersError = False; + // p->DataError = False; + // p->CrcError = False; + + p->DataAfterEnd = False; + p->DecodingTruncated = False; + + p->DecodeRes = SZ_OK; + p->ReadRes = SZ_OK; + p->ProgressRes = SZ_OK; + + p->CombinedRes = SZ_OK; + p->CombinedRes_Type = SZ_OK; +} + + + + +static SRes XzDecMt_Decode_ST(CXzDecMt *p + #ifndef _7ZIP_ST + , BoolInt tMode + #endif + , CXzStatInfo *stat) +{ + size_t outPos; + size_t inPos, inLim; + const Byte *inData; + UInt64 inPrev, outPrev; + + CXzUnpacker *dec; + + #ifndef _7ZIP_ST + if (tMode) + { + XzDecMt_FreeOutBufs(p); + tMode = MtDec_PrepareRead(&p->mtc); + } + #endif + + if (!p->outBuf || p->outBufSize != p->props.outStep_ST) + { + ISzAlloc_Free(p->allocMid, p->outBuf); + p->outBufSize = 0; + p->outBuf = (Byte *)ISzAlloc_Alloc(p->allocMid, p->props.outStep_ST); + if (!p->outBuf) + return SZ_ERROR_MEM; + p->outBufSize = p->props.outStep_ST; + } + + if (!p->inBuf || p->inBufSize != p->props.inBufSize_ST) + { + ISzAlloc_Free(p->allocMid, p->inBuf); + p->inBufSize = 0; + p->inBuf = (Byte *)ISzAlloc_Alloc(p->allocMid, p->props.inBufSize_ST); + if (!p->inBuf) + return SZ_ERROR_MEM; + p->inBufSize = p->props.inBufSize_ST; + } + + dec = &p->dec; + dec->decodeToStreamSignature = False; + // dec->decodeOnlyOneBlock = False; + + XzUnpacker_SetOutBuf(dec, NULL, 0); + + inPrev = p->inProcessed; + outPrev = p->outProcessed; + + inPos = 0; + inLim = 0; + inData = NULL; + outPos = 0; + + for (;;) + { + SizeT outSize; + BoolInt finished; + ECoderFinishMode finishMode; + SizeT inProcessed; + ECoderStatus status; + SRes res; + + SizeT outProcessed; + + + + if (inPos == inLim) + { + #ifndef _7ZIP_ST + if (tMode) + { + inData = MtDec_Read(&p->mtc, &inLim); + inPos = 0; + if (inData) + continue; + tMode = False; + inLim = 0; + } + #endif + + if (!p->readWasFinished) + { + inPos = 0; + inLim = p->inBufSize; + inData = p->inBuf; + p->readRes = ISeqInStream_Read(p->inStream, (void *)inData, &inLim); + p->readProcessed += inLim; + if (inLim == 0 || p->readRes != SZ_OK) + p->readWasFinished = True; + } + } + + outSize = p->props.outStep_ST - outPos; + + finishMode = CODER_FINISH_ANY; + if (p->outSize_Defined) + { + const UInt64 rem = p->outSize - p->outProcessed; + if (outSize >= rem) + { + outSize = (SizeT)rem; + if (p->finishMode) + finishMode = CODER_FINISH_END; + } + } + + inProcessed = inLim - inPos; + outProcessed = outSize; + + res = XzUnpacker_Code(dec, p->outBuf + outPos, &outProcessed, + inData + inPos, &inProcessed, + (inPos == inLim), // srcFinished + finishMode, &status); + + p->codeRes = res; + p->status = status; + + inPos += inProcessed; + outPos += outProcessed; + p->inProcessed += inProcessed; + p->outProcessed += outProcessed; + + finished = ((inProcessed == 0 && outProcessed == 0) || res != SZ_OK); + + if (finished || outProcessed >= outSize) + if (outPos != 0) + { + size_t written = ISeqOutStream_Write(p->outStream, p->outBuf, outPos); + p->outProcessed += written; + if (written != outPos) + { + stat->CombinedRes_Type = SZ_ERROR_WRITE; + return SZ_ERROR_WRITE; + } + outPos = 0; + } + + if (p->progress && res == SZ_OK) + { + UInt64 inDelta = p->inProcessed - inPrev; + UInt64 outDelta = p->outProcessed - outPrev; + if (inDelta >= (1 << 22) || outDelta >= (1 << 22)) + { + res = ICompressProgress_Progress(p->progress, p->inProcessed, p->outProcessed); + if (res != SZ_OK) + { + stat->CombinedRes_Type = SZ_ERROR_PROGRESS; + stat->ProgressRes = res; + return res; + } + inPrev = p->inProcessed; + outPrev = p->outProcessed; + } + } + + if (finished) + return res; + } +} + +static SRes XzStatInfo_SetStat(const CXzUnpacker *dec, + int finishMode, + UInt64 readProcessed, UInt64 inProcessed, + SRes res, ECoderStatus status, + BoolInt decodingTruncated, + CXzStatInfo *stat) +{ + UInt64 extraSize; + + stat->DecodingTruncated = (Byte)(decodingTruncated ? 1 : 0); + stat->InSize = inProcessed; + stat->NumStreams = dec->numStartedStreams; + stat->NumBlocks = dec->numTotalBlocks; + + stat->UnpackSize_Defined = True; + stat->NumStreams_Defined = True; + stat->NumBlocks_Defined = True; + + extraSize = XzUnpacker_GetExtraSize(dec); + + if (res == SZ_OK) + { + if (status == CODER_STATUS_NEEDS_MORE_INPUT) + { + // CODER_STATUS_NEEDS_MORE_INPUT is expected status for correct xz streams + extraSize = 0; + if (!XzUnpacker_IsStreamWasFinished(dec)) + res = SZ_ERROR_INPUT_EOF; + } + else if (!decodingTruncated || finishMode) // (status == CODER_STATUS_NOT_FINISHED) + res = SZ_ERROR_DATA; + } + else if (res == SZ_ERROR_NO_ARCHIVE) + { + /* + SZ_ERROR_NO_ARCHIVE is possible for 2 states: + XZ_STATE_STREAM_HEADER - if bad signature or bad CRC + XZ_STATE_STREAM_PADDING - if non-zero padding data + extraSize / inProcessed don't include "bad" byte + */ + if (inProcessed != extraSize) // if good streams before error + if (extraSize != 0 || readProcessed != inProcessed) + { + stat->DataAfterEnd = True; + // there is some good xz stream before. So we set SZ_OK + res = SZ_OK; + } + } + + stat->DecodeRes = res; + + stat->InSize -= extraSize; + return res; +} + + +SRes XzDecMt_Decode(CXzDecMtHandle pp, + const CXzDecMtProps *props, + const UInt64 *outDataSize, int finishMode, + ISeqOutStream *outStream, + // Byte *outBuf, size_t *outBufSize, + ISeqInStream *inStream, + // const Byte *inData, size_t inDataSize, + CXzStatInfo *stat, + int *isMT, + ICompressProgress *progress) +{ + CXzDecMt *p = (CXzDecMt *)pp; + #ifndef _7ZIP_ST + BoolInt tMode; + #endif + + XzStatInfo_Clear(stat); + + p->props = *props; + + p->inStream = inStream; + p->outStream = outStream; + p->progress = progress; + // p->stat = stat; + + p->outSize = 0; + p->outSize_Defined = False; + if (outDataSize) + { + p->outSize_Defined = True; + p->outSize = *outDataSize; + } + + p->finishMode = finishMode; + + // p->outSize = 457; p->outSize_Defined = True; p->finishMode = False; // for test + + p->writeRes = SZ_OK; + p->outProcessed = 0; + p->inProcessed = 0; + p->readProcessed = 0; + p->readWasFinished = False; + + p->codeRes = 0; + p->status = CODER_STATUS_NOT_SPECIFIED; + + XzUnpacker_Init(&p->dec); + + *isMT = False; + + /* + p->outBuf = NULL; + p->outBufSize = 0; + if (!outStream) + { + p->outBuf = outBuf; + p->outBufSize = *outBufSize; + *outBufSize = 0; + } + */ + + + #ifndef _7ZIP_ST + + p->isBlockHeaderState_Parse = False; + p->isBlockHeaderState_Write = False; + // p->numBadBlocks = 0; + p->mainErrorCode = SZ_OK; + p->mainDecoderWasCalled = False; + + tMode = False; + + if (p->props.numThreads > 1) + { + IMtDecCallback vt; + + // we just free ST buffers here + // but we still keep state variables, that was set in XzUnpacker_Init() + XzDecMt_FreeSt(p); + + p->outProcessed_Parse = 0; + p->parsing_Truncated = False; + + p->numStreams = 0; + p->numTotalBlocks = 0; + p->numBlocks = 0; + p->finishedDecoderIndex = -1; + + if (!p->mtc_WasConstructed) + { + p->mtc_WasConstructed = True; + MtDec_Construct(&p->mtc); + } + + p->mtc.mtCallback = &vt; + p->mtc.mtCallbackObject = p; + + p->mtc.progress = progress; + p->mtc.inStream = inStream; + p->mtc.alloc = &p->alignOffsetAlloc.vt; + // p->mtc.inData = inData; + // p->mtc.inDataSize = inDataSize; + p->mtc.inBufSize = p->props.inBufSize_MT; + // p->mtc.inBlockMax = p->props.inBlockMax; + p->mtc.numThreadsMax = p->props.numThreads; + + *isMT = True; + + vt.Parse = XzDecMt_Callback_Parse; + vt.PreCode = XzDecMt_Callback_PreCode; + vt.Code = XzDecMt_Callback_Code; + vt.Write = XzDecMt_Callback_Write; + + { + BoolInt needContinue; + + SRes res = MtDec_Code(&p->mtc); + + stat->InSize = p->mtc.inProcessed; + + p->inProcessed = p->mtc.inProcessed; + p->readRes = p->mtc.readRes; + p->readWasFinished = p->mtc.readWasFinished; + p->readProcessed = p->mtc.readProcessed; + + tMode = True; + needContinue = False; + + if (res == SZ_OK) + { + if (p->mtc.mtProgress.res != SZ_OK) + { + res = p->mtc.mtProgress.res; + stat->ProgressRes = res; + stat->CombinedRes_Type = SZ_ERROR_PROGRESS; + } + else + needContinue = p->mtc.needContinue; + } + + if (!needContinue) + { + SRes codeRes; + BoolInt truncated = False; + ECoderStatus status; + CXzUnpacker *dec; + + stat->OutSize = p->outProcessed; + + if (p->finishedDecoderIndex >= 0) + { + CXzDecMtThread *coder = &p->coders[(unsigned)p->finishedDecoderIndex]; + codeRes = coder->codeRes; + dec = &coder->dec; + status = coder->status; + } + else if (p->mainDecoderWasCalled) + { + codeRes = p->codeRes; + dec = &p->dec; + status = p->status; + truncated = p->parsing_Truncated; + } + else + return E_FAIL; + + XzStatInfo_SetStat(dec, p->finishMode, + p->mtc.readProcessed, p->mtc.inProcessed, + codeRes, status, + truncated, + stat); + + if (res == SZ_OK) + { + if (p->writeRes != SZ_OK) + { + res = p->writeRes; + stat->CombinedRes_Type = SZ_ERROR_WRITE; + } + else if (p->mtc.readRes != SZ_OK && p->mtc.inProcessed == p->mtc.readProcessed) + { + res = p->mtc.readRes; + stat->ReadRes = res; + stat->CombinedRes_Type = SZ_ERROR_READ; + } + else if (p->mainErrorCode != SZ_OK) + { + res = p->mainErrorCode; + } + } + + stat->CombinedRes = res; + if (stat->CombinedRes_Type == SZ_OK) + stat->CombinedRes_Type = res; + return res; + } + + PRF_STR("----- decoding ST -----"); + } + } + + #endif + + + *isMT = False; + + { + SRes res = XzDecMt_Decode_ST(p + #ifndef _7ZIP_ST + , tMode + #endif + , stat + ); + + XzStatInfo_SetStat(&p->dec, + p->finishMode, + p->readProcessed, p->inProcessed, + p->codeRes, p->status, + False, // truncated + stat); + + if (res == SZ_OK) + { + /* + if (p->writeRes != SZ_OK) + { + res = p->writeRes; + stat->CombinedRes_Type = SZ_ERROR_WRITE; + } + else + */ + if (p->readRes != SZ_OK && p->inProcessed == p->readProcessed) + { + res = p->readRes; + stat->ReadRes = res; + stat->CombinedRes_Type = SZ_ERROR_READ; + } + #ifndef _7ZIP_ST + else if (p->mainErrorCode != SZ_OK) + res = p->mainErrorCode; + #endif + } + + stat->CombinedRes = res; + if (stat->CombinedRes_Type == SZ_OK) + stat->CombinedRes_Type = res; + return res; + } +} diff --git a/code/nel/3rdparty/seven_zip/XzEnc.c b/code/nel/3rdparty/seven_zip/XzEnc.c new file mode 100644 index 000000000..d0a8b4489 --- /dev/null +++ b/code/nel/3rdparty/seven_zip/XzEnc.c @@ -0,0 +1,1329 @@ +/* XzEnc.c -- Xz Encode +2019-02-02 : Igor Pavlov : Public domain */ + +#include "Precomp.h" + +#include +#include + +#include "7zCrc.h" +#include "Bra.h" +#include "CpuArch.h" + +#ifdef USE_SUBBLOCK +#include "Bcj3Enc.c" +#include "SbFind.c" +#include "SbEnc.c" +#endif + +#include "XzEnc.h" + +// #define _7ZIP_ST + +#ifndef _7ZIP_ST +#include "MtCoder.h" +#else +#define MTCODER__THREADS_MAX 1 +#define MTCODER__BLOCKS_MAX 1 +#endif + +#define XZ_GET_PAD_SIZE(dataSize) ((4 - ((unsigned)(dataSize) & 3)) & 3) + +/* max pack size for LZMA2 block + check-64bytrs: */ +#define XZ_GET_MAX_BLOCK_PACK_SIZE(unpackSize) ((unpackSize) + ((unpackSize) >> 10) + 16 + 64) + +#define XZ_GET_ESTIMATED_BLOCK_TOTAL_PACK_SIZE(unpackSize) (XZ_BLOCK_HEADER_SIZE_MAX + XZ_GET_MAX_BLOCK_PACK_SIZE(unpackSize)) + + +#define XzBlock_ClearFlags(p) (p)->flags = 0; +#define XzBlock_SetNumFilters(p, n) (p)->flags |= ((n) - 1); +#define XzBlock_SetHasPackSize(p) (p)->flags |= XZ_BF_PACK_SIZE; +#define XzBlock_SetHasUnpackSize(p) (p)->flags |= XZ_BF_UNPACK_SIZE; + + +static SRes WriteBytes(ISeqOutStream *s, const void *buf, size_t size) +{ + return (ISeqOutStream_Write(s, buf, size) == size) ? SZ_OK : SZ_ERROR_WRITE; +} + +static SRes WriteBytesUpdateCrc(ISeqOutStream *s, const void *buf, size_t size, UInt32 *crc) +{ + *crc = CrcUpdate(*crc, buf, size); + return WriteBytes(s, buf, size); +} + + +static SRes Xz_WriteHeader(CXzStreamFlags f, ISeqOutStream *s) +{ + UInt32 crc; + Byte header[XZ_STREAM_HEADER_SIZE]; + memcpy(header, XZ_SIG, XZ_SIG_SIZE); + header[XZ_SIG_SIZE] = (Byte)(f >> 8); + header[XZ_SIG_SIZE + 1] = (Byte)(f & 0xFF); + crc = CrcCalc(header + XZ_SIG_SIZE, XZ_STREAM_FLAGS_SIZE); + SetUi32(header + XZ_SIG_SIZE + XZ_STREAM_FLAGS_SIZE, crc); + return WriteBytes(s, header, XZ_STREAM_HEADER_SIZE); +} + + +static SRes XzBlock_WriteHeader(const CXzBlock *p, ISeqOutStream *s) +{ + Byte header[XZ_BLOCK_HEADER_SIZE_MAX]; + + unsigned pos = 1; + unsigned numFilters, i; + header[pos++] = p->flags; + + if (XzBlock_HasPackSize(p)) pos += Xz_WriteVarInt(header + pos, p->packSize); + if (XzBlock_HasUnpackSize(p)) pos += Xz_WriteVarInt(header + pos, p->unpackSize); + numFilters = XzBlock_GetNumFilters(p); + + for (i = 0; i < numFilters; i++) + { + const CXzFilter *f = &p->filters[i]; + pos += Xz_WriteVarInt(header + pos, f->id); + pos += Xz_WriteVarInt(header + pos, f->propsSize); + memcpy(header + pos, f->props, f->propsSize); + pos += f->propsSize; + } + + while ((pos & 3) != 0) + header[pos++] = 0; + + header[0] = (Byte)(pos >> 2); + SetUi32(header + pos, CrcCalc(header, pos)); + return WriteBytes(s, header, pos + 4); +} + + + + +typedef struct +{ + size_t numBlocks; + size_t size; + size_t allocated; + Byte *blocks; +} CXzEncIndex; + + +static void XzEncIndex_Construct(CXzEncIndex *p) +{ + p->numBlocks = 0; + p->size = 0; + p->allocated = 0; + p->blocks = NULL; +} + +static void XzEncIndex_Init(CXzEncIndex *p) +{ + p->numBlocks = 0; + p->size = 0; +} + +static void XzEncIndex_Free(CXzEncIndex *p, ISzAllocPtr alloc) +{ + if (p->blocks) + { + ISzAlloc_Free(alloc, p->blocks); + p->blocks = NULL; + } + p->numBlocks = 0; + p->size = 0; + p->allocated = 0; +} + + +static SRes XzEncIndex_ReAlloc(CXzEncIndex *p, size_t newSize, ISzAllocPtr alloc) +{ + Byte *blocks = (Byte *)ISzAlloc_Alloc(alloc, newSize); + if (!blocks) + return SZ_ERROR_MEM; + if (p->size != 0) + memcpy(blocks, p->blocks, p->size); + if (p->blocks) + ISzAlloc_Free(alloc, p->blocks); + p->blocks = blocks; + p->allocated = newSize; + return SZ_OK; +} + + +static SRes XzEncIndex_PreAlloc(CXzEncIndex *p, UInt64 numBlocks, UInt64 unpackSize, UInt64 totalSize, ISzAllocPtr alloc) +{ + UInt64 pos; + { + Byte buf[32]; + unsigned pos2 = Xz_WriteVarInt(buf, totalSize); + pos2 += Xz_WriteVarInt(buf + pos2, unpackSize); + pos = numBlocks * pos2; + } + + if (pos <= p->allocated - p->size) + return SZ_OK; + { + UInt64 newSize64 = p->size + pos; + size_t newSize = (size_t)newSize64; + if (newSize != newSize64) + return SZ_ERROR_MEM; + return XzEncIndex_ReAlloc(p, newSize, alloc); + } +} + + +static SRes XzEncIndex_AddIndexRecord(CXzEncIndex *p, UInt64 unpackSize, UInt64 totalSize, ISzAllocPtr alloc) +{ + Byte buf[32]; + unsigned pos = Xz_WriteVarInt(buf, totalSize); + pos += Xz_WriteVarInt(buf + pos, unpackSize); + + if (pos > p->allocated - p->size) + { + size_t newSize = p->allocated * 2 + 16 * 2; + if (newSize < p->size + pos) + return SZ_ERROR_MEM; + RINOK(XzEncIndex_ReAlloc(p, newSize, alloc)); + } + memcpy(p->blocks + p->size, buf, pos); + p->size += pos; + p->numBlocks++; + return SZ_OK; +} + + +static SRes XzEncIndex_WriteFooter(const CXzEncIndex *p, CXzStreamFlags flags, ISeqOutStream *s) +{ + Byte buf[32]; + UInt64 globalPos; + UInt32 crc = CRC_INIT_VAL; + unsigned pos = 1 + Xz_WriteVarInt(buf + 1, p->numBlocks); + + globalPos = pos; + buf[0] = 0; + RINOK(WriteBytesUpdateCrc(s, buf, pos, &crc)); + RINOK(WriteBytesUpdateCrc(s, p->blocks, p->size, &crc)); + globalPos += p->size; + + pos = XZ_GET_PAD_SIZE(globalPos); + buf[1] = 0; + buf[2] = 0; + buf[3] = 0; + globalPos += pos; + + crc = CrcUpdate(crc, buf + 4 - pos, pos); + SetUi32(buf + 4, CRC_GET_DIGEST(crc)); + + SetUi32(buf + 8 + 4, (UInt32)(globalPos >> 2)); + buf[8 + 8] = (Byte)(flags >> 8); + buf[8 + 9] = (Byte)(flags & 0xFF); + SetUi32(buf + 8, CrcCalc(buf + 8 + 4, 6)); + buf[8 + 10] = XZ_FOOTER_SIG_0; + buf[8 + 11] = XZ_FOOTER_SIG_1; + + return WriteBytes(s, buf + 4 - pos, pos + 4 + 12); +} + + + +/* ---------- CSeqCheckInStream ---------- */ + +typedef struct +{ + ISeqInStream vt; + ISeqInStream *realStream; + const Byte *data; + UInt64 limit; + UInt64 processed; + int realStreamFinished; + CXzCheck check; +} CSeqCheckInStream; + +static void SeqCheckInStream_Init(CSeqCheckInStream *p, unsigned checkMode) +{ + p->limit = (UInt64)(Int64)-1; + p->processed = 0; + p->realStreamFinished = 0; + XzCheck_Init(&p->check, checkMode); +} + +static void SeqCheckInStream_GetDigest(CSeqCheckInStream *p, Byte *digest) +{ + XzCheck_Final(&p->check, digest); +} + +static SRes SeqCheckInStream_Read(const ISeqInStream *pp, void *data, size_t *size) +{ + CSeqCheckInStream *p = CONTAINER_FROM_VTBL(pp, CSeqCheckInStream, vt); + size_t size2 = *size; + SRes res = SZ_OK; + + if (p->limit != (UInt64)(Int64)-1) + { + UInt64 rem = p->limit - p->processed; + if (size2 > rem) + size2 = (size_t)rem; + } + if (size2 != 0) + { + if (p->realStream) + { + res = ISeqInStream_Read(p->realStream, data, &size2); + p->realStreamFinished = (size2 == 0) ? 1 : 0; + } + else + memcpy(data, p->data + (size_t)p->processed, size2); + XzCheck_Update(&p->check, data, size2); + p->processed += size2; + } + *size = size2; + return res; +} + + +/* ---------- CSeqSizeOutStream ---------- */ + +typedef struct +{ + ISeqOutStream vt; + ISeqOutStream *realStream; + Byte *outBuf; + size_t outBufLimit; + UInt64 processed; +} CSeqSizeOutStream; + +static size_t SeqSizeOutStream_Write(const ISeqOutStream *pp, const void *data, size_t size) +{ + CSeqSizeOutStream *p = CONTAINER_FROM_VTBL(pp, CSeqSizeOutStream, vt); + if (p->realStream) + size = ISeqOutStream_Write(p->realStream, data, size); + else + { + if (size > p->outBufLimit - (size_t)p->processed) + return 0; + memcpy(p->outBuf + (size_t)p->processed, data, size); + } + p->processed += size; + return size; +} + + +/* ---------- CSeqInFilter ---------- */ + +#define FILTER_BUF_SIZE (1 << 20) + +typedef struct +{ + ISeqInStream p; + ISeqInStream *realStream; + IStateCoder StateCoder; + Byte *buf; + size_t curPos; + size_t endPos; + int srcWasFinished; +} CSeqInFilter; + + +SRes BraState_SetFromMethod(IStateCoder *p, UInt64 id, int encodeMode, ISzAllocPtr alloc); + +static SRes SeqInFilter_Init(CSeqInFilter *p, const CXzFilter *props, ISzAllocPtr alloc) +{ + if (!p->buf) + { + p->buf = (Byte *)ISzAlloc_Alloc(alloc, FILTER_BUF_SIZE); + if (!p->buf) + return SZ_ERROR_MEM; + } + p->curPos = p->endPos = 0; + p->srcWasFinished = 0; + RINOK(BraState_SetFromMethod(&p->StateCoder, props->id, 1, alloc)); + RINOK(p->StateCoder.SetProps(p->StateCoder.p, props->props, props->propsSize, alloc)); + p->StateCoder.Init(p->StateCoder.p); + return SZ_OK; +} + + +static SRes SeqInFilter_Read(const ISeqInStream *pp, void *data, size_t *size) +{ + CSeqInFilter *p = CONTAINER_FROM_VTBL(pp, CSeqInFilter, p); + size_t sizeOriginal = *size; + if (sizeOriginal == 0) + return SZ_OK; + *size = 0; + + for (;;) + { + if (!p->srcWasFinished && p->curPos == p->endPos) + { + p->curPos = 0; + p->endPos = FILTER_BUF_SIZE; + RINOK(ISeqInStream_Read(p->realStream, p->buf, &p->endPos)); + if (p->endPos == 0) + p->srcWasFinished = 1; + } + { + SizeT srcLen = p->endPos - p->curPos; + ECoderStatus status; + SRes res; + *size = sizeOriginal; + res = p->StateCoder.Code2(p->StateCoder.p, + (Byte *)data, size, + p->buf + p->curPos, &srcLen, + p->srcWasFinished, CODER_FINISH_ANY, + &status); + p->curPos += srcLen; + if (*size != 0 || srcLen == 0 || res != SZ_OK) + return res; + } + } +} + +static void SeqInFilter_Construct(CSeqInFilter *p) +{ + p->buf = NULL; + p->StateCoder.p = NULL; + p->p.Read = SeqInFilter_Read; +} + +static void SeqInFilter_Free(CSeqInFilter *p, ISzAllocPtr alloc) +{ + if (p->StateCoder.p) + { + p->StateCoder.Free(p->StateCoder.p, alloc); + p->StateCoder.p = NULL; + } + if (p->buf) + { + ISzAlloc_Free(alloc, p->buf); + p->buf = NULL; + } +} + + +/* ---------- CSbEncInStream ---------- */ + +#ifdef USE_SUBBLOCK + +typedef struct +{ + ISeqInStream vt; + ISeqInStream *inStream; + CSbEnc enc; +} CSbEncInStream; + +static SRes SbEncInStream_Read(const ISeqInStream *pp, void *data, size_t *size) +{ + CSbEncInStream *p = CONTAINER_FROM_VTBL(pp, CSbEncInStream, vt); + size_t sizeOriginal = *size; + if (sizeOriginal == 0) + return SZ_OK; + + for (;;) + { + if (p->enc.needRead && !p->enc.readWasFinished) + { + size_t processed = p->enc.needReadSizeMax; + RINOK(p->inStream->Read(p->inStream, p->enc.buf + p->enc.readPos, &processed)); + p->enc.readPos += processed; + if (processed == 0) + { + p->enc.readWasFinished = True; + p->enc.isFinalFinished = True; + } + p->enc.needRead = False; + } + + *size = sizeOriginal; + RINOK(SbEnc_Read(&p->enc, data, size)); + if (*size != 0 || !p->enc.needRead) + return SZ_OK; + } +} + +void SbEncInStream_Construct(CSbEncInStream *p, ISzAllocPtr alloc) +{ + SbEnc_Construct(&p->enc, alloc); + p->vt.Read = SbEncInStream_Read; +} + +SRes SbEncInStream_Init(CSbEncInStream *p) +{ + return SbEnc_Init(&p->enc); +} + +void SbEncInStream_Free(CSbEncInStream *p) +{ + SbEnc_Free(&p->enc); +} + +#endif + + + +/* ---------- CXzProps ---------- */ + + +void XzFilterProps_Init(CXzFilterProps *p) +{ + p->id = 0; + p->delta = 0; + p->ip = 0; + p->ipDefined = False; +} + +void XzProps_Init(CXzProps *p) +{ + p->checkId = XZ_CHECK_CRC32; + p->blockSize = XZ_PROPS__BLOCK_SIZE__AUTO; + p->numBlockThreads_Reduced = -1; + p->numBlockThreads_Max = -1; + p->numTotalThreads = -1; + p->reduceSize = (UInt64)(Int64)-1; + p->forceWriteSizesInHeader = 0; + // p->forceWriteSizesInHeader = 1; + + XzFilterProps_Init(&p->filterProps); + Lzma2EncProps_Init(&p->lzma2Props); +} + + +static void XzEncProps_Normalize_Fixed(CXzProps *p) +{ + UInt64 fileSize; + int t1, t1n, t2, t2r, t3; + { + CLzma2EncProps tp = p->lzma2Props; + if (tp.numTotalThreads <= 0) + tp.numTotalThreads = p->numTotalThreads; + Lzma2EncProps_Normalize(&tp); + t1n = tp.numTotalThreads; + } + + t1 = p->lzma2Props.numTotalThreads; + t2 = p->numBlockThreads_Max; + t3 = p->numTotalThreads; + + if (t2 > MTCODER__THREADS_MAX) + t2 = MTCODER__THREADS_MAX; + + if (t3 <= 0) + { + if (t2 <= 0) + t2 = 1; + t3 = t1n * t2; + } + else if (t2 <= 0) + { + t2 = t3 / t1n; + if (t2 == 0) + { + t1 = 1; + t2 = t3; + } + if (t2 > MTCODER__THREADS_MAX) + t2 = MTCODER__THREADS_MAX; + } + else if (t1 <= 0) + { + t1 = t3 / t2; + if (t1 == 0) + t1 = 1; + } + else + t3 = t1n * t2; + + p->lzma2Props.numTotalThreads = t1; + + t2r = t2; + + fileSize = p->reduceSize; + + if ((p->blockSize < fileSize || fileSize == (UInt64)(Int64)-1)) + p->lzma2Props.lzmaProps.reduceSize = p->blockSize; + + Lzma2EncProps_Normalize(&p->lzma2Props); + + t1 = p->lzma2Props.numTotalThreads; + + { + if (t2 > 1 && fileSize != (UInt64)(Int64)-1) + { + UInt64 numBlocks = fileSize / p->blockSize; + if (numBlocks * p->blockSize != fileSize) + numBlocks++; + if (numBlocks < (unsigned)t2) + { + t2r = (unsigned)numBlocks; + if (t2r == 0) + t2r = 1; + t3 = t1 * t2r; + } + } + } + + p->numBlockThreads_Max = t2; + p->numBlockThreads_Reduced = t2r; + p->numTotalThreads = t3; +} + + +static void XzProps_Normalize(CXzProps *p) +{ + /* we normalize xzProps properties, but we normalize only some of CXzProps::lzma2Props properties. + Lzma2Enc_SetProps() will normalize lzma2Props later. */ + + if (p->blockSize == XZ_PROPS__BLOCK_SIZE__SOLID) + { + p->lzma2Props.lzmaProps.reduceSize = p->reduceSize; + p->numBlockThreads_Reduced = 1; + p->numBlockThreads_Max = 1; + if (p->lzma2Props.numTotalThreads <= 0) + p->lzma2Props.numTotalThreads = p->numTotalThreads; + return; + } + else + { + CLzma2EncProps *lzma2 = &p->lzma2Props; + if (p->blockSize == LZMA2_ENC_PROPS__BLOCK_SIZE__AUTO) + { + // xz-auto + p->lzma2Props.lzmaProps.reduceSize = p->reduceSize; + + if (lzma2->blockSize == LZMA2_ENC_PROPS__BLOCK_SIZE__SOLID) + { + // if (xz-auto && lzma2-solid) - we use solid for both + p->blockSize = XZ_PROPS__BLOCK_SIZE__SOLID; + p->numBlockThreads_Reduced = 1; + p->numBlockThreads_Max = 1; + if (p->lzma2Props.numTotalThreads <= 0) + p->lzma2Props.numTotalThreads = p->numTotalThreads; + } + else + { + // if (xz-auto && (lzma2-auto || lzma2-fixed_) + // we calculate block size for lzma2 and use that block size for xz, lzma2 uses single-chunk per block + CLzma2EncProps tp = p->lzma2Props; + if (tp.numTotalThreads <= 0) + tp.numTotalThreads = p->numTotalThreads; + + Lzma2EncProps_Normalize(&tp); + + p->blockSize = tp.blockSize; // fixed or solid + p->numBlockThreads_Reduced = tp.numBlockThreads_Reduced; + p->numBlockThreads_Max = tp.numBlockThreads_Max; + if (lzma2->blockSize == LZMA2_ENC_PROPS__BLOCK_SIZE__AUTO) + lzma2->blockSize = tp.blockSize; // fixed or solid, LZMA2_ENC_PROPS__BLOCK_SIZE__SOLID + if (lzma2->lzmaProps.reduceSize > tp.blockSize && tp.blockSize != LZMA2_ENC_PROPS__BLOCK_SIZE__SOLID) + lzma2->lzmaProps.reduceSize = tp.blockSize; + lzma2->numBlockThreads_Reduced = 1; + lzma2->numBlockThreads_Max = 1; + return; + } + } + else + { + // xz-fixed + // we can use xz::reduceSize or xz::blockSize as base for lzmaProps::reduceSize + + p->lzma2Props.lzmaProps.reduceSize = p->reduceSize; + { + UInt64 r = p->reduceSize; + if (r > p->blockSize || r == (UInt64)(Int64)-1) + r = p->blockSize; + lzma2->lzmaProps.reduceSize = r; + } + if (lzma2->blockSize == LZMA2_ENC_PROPS__BLOCK_SIZE__AUTO) + lzma2->blockSize = LZMA2_ENC_PROPS__BLOCK_SIZE__SOLID; + else if (lzma2->blockSize > p->blockSize && lzma2->blockSize != LZMA2_ENC_PROPS__BLOCK_SIZE__SOLID) + lzma2->blockSize = p->blockSize; + + XzEncProps_Normalize_Fixed(p); + } + } +} + + +/* ---------- CLzma2WithFilters ---------- */ + +typedef struct +{ + CLzma2EncHandle lzma2; + CSeqInFilter filter; + + #ifdef USE_SUBBLOCK + CSbEncInStream sb; + #endif +} CLzma2WithFilters; + + +static void Lzma2WithFilters_Construct(CLzma2WithFilters *p) +{ + p->lzma2 = NULL; + SeqInFilter_Construct(&p->filter); + + #ifdef USE_SUBBLOCK + SbEncInStream_Construct(&p->sb, alloc); + #endif +} + + +static SRes Lzma2WithFilters_Create(CLzma2WithFilters *p, ISzAllocPtr alloc, ISzAllocPtr bigAlloc) +{ + if (!p->lzma2) + { + p->lzma2 = Lzma2Enc_Create(alloc, bigAlloc); + if (!p->lzma2) + return SZ_ERROR_MEM; + } + return SZ_OK; +} + + +static void Lzma2WithFilters_Free(CLzma2WithFilters *p, ISzAllocPtr alloc) +{ + #ifdef USE_SUBBLOCK + SbEncInStream_Free(&p->sb); + #endif + + SeqInFilter_Free(&p->filter, alloc); + if (p->lzma2) + { + Lzma2Enc_Destroy(p->lzma2); + p->lzma2 = NULL; + } +} + + +typedef struct +{ + UInt64 unpackSize; + UInt64 totalSize; + size_t headerSize; +} CXzEncBlockInfo; + + +static SRes Xz_CompressBlock( + CLzma2WithFilters *lzmaf, + + ISeqOutStream *outStream, + Byte *outBufHeader, + Byte *outBufData, size_t outBufDataLimit, + + ISeqInStream *inStream, + // UInt64 expectedSize, + const Byte *inBuf, // used if (!inStream) + size_t inBufSize, // used if (!inStream), it's block size, props->blockSize is ignored + + const CXzProps *props, + ICompressProgress *progress, + int *inStreamFinished, /* only for inStream version */ + CXzEncBlockInfo *blockSizes, + ISzAllocPtr alloc, + ISzAllocPtr allocBig) +{ + CSeqCheckInStream checkInStream; + CSeqSizeOutStream seqSizeOutStream; + CXzBlock block; + unsigned filterIndex = 0; + CXzFilter *filter = NULL; + const CXzFilterProps *fp = &props->filterProps; + if (fp->id == 0) + fp = NULL; + + *inStreamFinished = False; + + RINOK(Lzma2WithFilters_Create(lzmaf, alloc, allocBig)); + + RINOK(Lzma2Enc_SetProps(lzmaf->lzma2, &props->lzma2Props)); + + XzBlock_ClearFlags(&block); + XzBlock_SetNumFilters(&block, 1 + (fp ? 1 : 0)); + + if (fp) + { + filter = &block.filters[filterIndex++]; + filter->id = fp->id; + filter->propsSize = 0; + + if (fp->id == XZ_ID_Delta) + { + filter->props[0] = (Byte)(fp->delta - 1); + filter->propsSize = 1; + } + else if (fp->ipDefined) + { + SetUi32(filter->props, fp->ip); + filter->propsSize = 4; + } + } + + { + CXzFilter *f = &block.filters[filterIndex++]; + f->id = XZ_ID_LZMA2; + f->propsSize = 1; + f->props[0] = Lzma2Enc_WriteProperties(lzmaf->lzma2); + } + + seqSizeOutStream.vt.Write = SeqSizeOutStream_Write; + seqSizeOutStream.realStream = outStream; + seqSizeOutStream.outBuf = outBufData; + seqSizeOutStream.outBufLimit = outBufDataLimit; + seqSizeOutStream.processed = 0; + + /* + if (expectedSize != (UInt64)(Int64)-1) + { + block.unpackSize = expectedSize; + if (props->blockSize != (UInt64)(Int64)-1) + if (expectedSize > props->blockSize) + block.unpackSize = props->blockSize; + XzBlock_SetHasUnpackSize(&block); + } + */ + + if (outStream) + { + RINOK(XzBlock_WriteHeader(&block, &seqSizeOutStream.vt)); + } + + checkInStream.vt.Read = SeqCheckInStream_Read; + SeqCheckInStream_Init(&checkInStream, props->checkId); + + checkInStream.realStream = inStream; + checkInStream.data = inBuf; + checkInStream.limit = props->blockSize; + if (!inStream) + checkInStream.limit = inBufSize; + + if (fp) + { + #ifdef USE_SUBBLOCK + if (fp->id == XZ_ID_Subblock) + { + lzmaf->sb.inStream = &checkInStream.vt; + RINOK(SbEncInStream_Init(&lzmaf->sb)); + } + else + #endif + { + lzmaf->filter.realStream = &checkInStream.vt; + RINOK(SeqInFilter_Init(&lzmaf->filter, filter, alloc)); + } + } + + { + SRes res; + Byte *outBuf = NULL; + size_t outSize = 0; + BoolInt useStream = (fp || inStream); + // useStream = True; + + if (!useStream) + { + XzCheck_Update(&checkInStream.check, inBuf, inBufSize); + checkInStream.processed = inBufSize; + } + + if (!outStream) + { + outBuf = seqSizeOutStream.outBuf; // + (size_t)seqSizeOutStream.processed; + outSize = seqSizeOutStream.outBufLimit; // - (size_t)seqSizeOutStream.processed; + } + + res = Lzma2Enc_Encode2(lzmaf->lzma2, + outBuf ? NULL : &seqSizeOutStream.vt, + outBuf, + outBuf ? &outSize : NULL, + + useStream ? + (fp ? + ( + #ifdef USE_SUBBLOCK + (fp->id == XZ_ID_Subblock) ? &lzmaf->sb.vt: + #endif + &lzmaf->filter.p) : + &checkInStream.vt) : NULL, + + useStream ? NULL : inBuf, + useStream ? 0 : inBufSize, + + progress); + + if (outBuf) + seqSizeOutStream.processed += outSize; + + RINOK(res); + blockSizes->unpackSize = checkInStream.processed; + } + { + Byte buf[4 + 64]; + unsigned padSize = XZ_GET_PAD_SIZE(seqSizeOutStream.processed); + UInt64 packSize = seqSizeOutStream.processed; + + buf[0] = 0; + buf[1] = 0; + buf[2] = 0; + buf[3] = 0; + + SeqCheckInStream_GetDigest(&checkInStream, buf + 4); + RINOK(WriteBytes(&seqSizeOutStream.vt, buf + (4 - padSize), padSize + XzFlags_GetCheckSize((CXzStreamFlags)props->checkId))); + + blockSizes->totalSize = seqSizeOutStream.processed - padSize; + + if (!outStream) + { + seqSizeOutStream.outBuf = outBufHeader; + seqSizeOutStream.outBufLimit = XZ_BLOCK_HEADER_SIZE_MAX; + seqSizeOutStream.processed = 0; + + block.unpackSize = blockSizes->unpackSize; + XzBlock_SetHasUnpackSize(&block); + + block.packSize = packSize; + XzBlock_SetHasPackSize(&block); + + RINOK(XzBlock_WriteHeader(&block, &seqSizeOutStream.vt)); + + blockSizes->headerSize = (size_t)seqSizeOutStream.processed; + blockSizes->totalSize += seqSizeOutStream.processed; + } + } + + if (inStream) + *inStreamFinished = checkInStream.realStreamFinished; + else + { + *inStreamFinished = False; + if (checkInStream.processed != inBufSize) + return SZ_ERROR_FAIL; + } + + return SZ_OK; +} + + + +typedef struct +{ + ICompressProgress vt; + ICompressProgress *progress; + UInt64 inOffset; + UInt64 outOffset; +} CCompressProgress_XzEncOffset; + + +static SRes CompressProgress_XzEncOffset_Progress(const ICompressProgress *pp, UInt64 inSize, UInt64 outSize) +{ + const CCompressProgress_XzEncOffset *p = CONTAINER_FROM_VTBL(pp, CCompressProgress_XzEncOffset, vt); + inSize += p->inOffset; + outSize += p->outOffset; + return ICompressProgress_Progress(p->progress, inSize, outSize); +} + + + + +typedef struct +{ + ISzAllocPtr alloc; + ISzAllocPtr allocBig; + + CXzProps xzProps; + UInt64 expectedDataSize; + + CXzEncIndex xzIndex; + + CLzma2WithFilters lzmaf_Items[MTCODER__THREADS_MAX]; + + size_t outBufSize; /* size of allocated outBufs[i] */ + Byte *outBufs[MTCODER__BLOCKS_MAX]; + + #ifndef _7ZIP_ST + unsigned checkType; + ISeqOutStream *outStream; + BoolInt mtCoder_WasConstructed; + CMtCoder mtCoder; + CXzEncBlockInfo EncBlocks[MTCODER__BLOCKS_MAX]; + #endif + +} CXzEnc; + + +static void XzEnc_Construct(CXzEnc *p) +{ + unsigned i; + + XzEncIndex_Construct(&p->xzIndex); + + for (i = 0; i < MTCODER__THREADS_MAX; i++) + Lzma2WithFilters_Construct(&p->lzmaf_Items[i]); + + #ifndef _7ZIP_ST + p->mtCoder_WasConstructed = False; + { + for (i = 0; i < MTCODER__BLOCKS_MAX; i++) + p->outBufs[i] = NULL; + p->outBufSize = 0; + } + #endif +} + + +static void XzEnc_FreeOutBufs(CXzEnc *p) +{ + unsigned i; + for (i = 0; i < MTCODER__BLOCKS_MAX; i++) + if (p->outBufs[i]) + { + ISzAlloc_Free(p->alloc, p->outBufs[i]); + p->outBufs[i] = NULL; + } + p->outBufSize = 0; +} + + +static void XzEnc_Free(CXzEnc *p, ISzAllocPtr alloc) +{ + unsigned i; + + XzEncIndex_Free(&p->xzIndex, alloc); + + for (i = 0; i < MTCODER__THREADS_MAX; i++) + Lzma2WithFilters_Free(&p->lzmaf_Items[i], alloc); + + #ifndef _7ZIP_ST + if (p->mtCoder_WasConstructed) + { + MtCoder_Destruct(&p->mtCoder); + p->mtCoder_WasConstructed = False; + } + XzEnc_FreeOutBufs(p); + #endif +} + + +CXzEncHandle XzEnc_Create(ISzAllocPtr alloc, ISzAllocPtr allocBig) +{ + CXzEnc *p = (CXzEnc *)ISzAlloc_Alloc(alloc, sizeof(CXzEnc)); + if (!p) + return NULL; + XzEnc_Construct(p); + XzProps_Init(&p->xzProps); + XzProps_Normalize(&p->xzProps); + p->expectedDataSize = (UInt64)(Int64)-1; + p->alloc = alloc; + p->allocBig = allocBig; + return p; +} + + +void XzEnc_Destroy(CXzEncHandle pp) +{ + CXzEnc *p = (CXzEnc *)pp; + XzEnc_Free(p, p->alloc); + ISzAlloc_Free(p->alloc, p); +} + + +SRes XzEnc_SetProps(CXzEncHandle pp, const CXzProps *props) +{ + CXzEnc *p = (CXzEnc *)pp; + p->xzProps = *props; + XzProps_Normalize(&p->xzProps); + return SZ_OK; +} + + +void XzEnc_SetDataSize(CXzEncHandle pp, UInt64 expectedDataSiize) +{ + CXzEnc *p = (CXzEnc *)pp; + p->expectedDataSize = expectedDataSiize; +} + + + + +#ifndef _7ZIP_ST + +static SRes XzEnc_MtCallback_Code(void *pp, unsigned coderIndex, unsigned outBufIndex, + const Byte *src, size_t srcSize, int finished) +{ + CXzEnc *me = (CXzEnc *)pp; + SRes res; + CMtProgressThunk progressThunk; + + Byte *dest = me->outBufs[outBufIndex]; + + UNUSED_VAR(finished) + + { + CXzEncBlockInfo *bInfo = &me->EncBlocks[outBufIndex]; + bInfo->totalSize = 0; + bInfo->unpackSize = 0; + bInfo->headerSize = 0; + } + + if (!dest) + { + dest = (Byte *)ISzAlloc_Alloc(me->alloc, me->outBufSize); + if (!dest) + return SZ_ERROR_MEM; + me->outBufs[outBufIndex] = dest; + } + + MtProgressThunk_CreateVTable(&progressThunk); + progressThunk.mtProgress = &me->mtCoder.mtProgress; + MtProgressThunk_Init(&progressThunk); + + { + CXzEncBlockInfo blockSizes; + int inStreamFinished; + + res = Xz_CompressBlock( + &me->lzmaf_Items[coderIndex], + + NULL, + dest, + dest + XZ_BLOCK_HEADER_SIZE_MAX, me->outBufSize - XZ_BLOCK_HEADER_SIZE_MAX, + + NULL, + // srcSize, // expectedSize + src, srcSize, + + &me->xzProps, + &progressThunk.vt, + &inStreamFinished, + &blockSizes, + me->alloc, + me->allocBig); + + if (res == SZ_OK) + me->EncBlocks[outBufIndex] = blockSizes; + + return res; + } +} + + +static SRes XzEnc_MtCallback_Write(void *pp, unsigned outBufIndex) +{ + CXzEnc *me = (CXzEnc *)pp; + + const CXzEncBlockInfo *bInfo = &me->EncBlocks[outBufIndex]; + const Byte *data = me->outBufs[outBufIndex]; + + RINOK(WriteBytes(me->outStream, data, bInfo->headerSize)); + + { + UInt64 totalPackFull = bInfo->totalSize + XZ_GET_PAD_SIZE(bInfo->totalSize); + RINOK(WriteBytes(me->outStream, data + XZ_BLOCK_HEADER_SIZE_MAX, (size_t)totalPackFull - bInfo->headerSize)); + } + + return XzEncIndex_AddIndexRecord(&me->xzIndex, bInfo->unpackSize, bInfo->totalSize, me->alloc); +} + +#endif + + + +SRes XzEnc_Encode(CXzEncHandle pp, ISeqOutStream *outStream, ISeqInStream *inStream, ICompressProgress *progress) +{ + CXzEnc *p = (CXzEnc *)pp; + + const CXzProps *props = &p->xzProps; + + XzEncIndex_Init(&p->xzIndex); + { + UInt64 numBlocks = 1; + UInt64 blockSize = props->blockSize; + + if (blockSize != XZ_PROPS__BLOCK_SIZE__SOLID + && props->reduceSize != (UInt64)(Int64)-1) + { + numBlocks = props->reduceSize / blockSize; + if (numBlocks * blockSize != props->reduceSize) + numBlocks++; + } + else + blockSize = (UInt64)1 << 62; + + RINOK(XzEncIndex_PreAlloc(&p->xzIndex, numBlocks, blockSize, XZ_GET_ESTIMATED_BLOCK_TOTAL_PACK_SIZE(blockSize), p->alloc)); + } + + RINOK(Xz_WriteHeader((CXzStreamFlags)props->checkId, outStream)); + + + #ifndef _7ZIP_ST + if (props->numBlockThreads_Reduced > 1) + { + IMtCoderCallback2 vt; + + if (!p->mtCoder_WasConstructed) + { + p->mtCoder_WasConstructed = True; + MtCoder_Construct(&p->mtCoder); + } + + vt.Code = XzEnc_MtCallback_Code; + vt.Write = XzEnc_MtCallback_Write; + + p->checkType = props->checkId; + p->xzProps = *props; + + p->outStream = outStream; + + p->mtCoder.allocBig = p->allocBig; + p->mtCoder.progress = progress; + p->mtCoder.inStream = inStream; + p->mtCoder.inData = NULL; + p->mtCoder.inDataSize = 0; + p->mtCoder.mtCallback = &vt; + p->mtCoder.mtCallbackObject = p; + + if ( props->blockSize == XZ_PROPS__BLOCK_SIZE__SOLID + || props->blockSize == XZ_PROPS__BLOCK_SIZE__AUTO) + return SZ_ERROR_FAIL; + + p->mtCoder.blockSize = (size_t)props->blockSize; + if (p->mtCoder.blockSize != props->blockSize) + return SZ_ERROR_PARAM; /* SZ_ERROR_MEM */ + + { + size_t destBlockSize = XZ_BLOCK_HEADER_SIZE_MAX + XZ_GET_MAX_BLOCK_PACK_SIZE(p->mtCoder.blockSize); + if (destBlockSize < p->mtCoder.blockSize) + return SZ_ERROR_PARAM; + if (p->outBufSize != destBlockSize) + XzEnc_FreeOutBufs(p); + p->outBufSize = destBlockSize; + } + + p->mtCoder.numThreadsMax = props->numBlockThreads_Max; + p->mtCoder.expectedDataSize = p->expectedDataSize; + + RINOK(MtCoder_Code(&p->mtCoder)); + } + else + #endif + { + int writeStartSizes; + CCompressProgress_XzEncOffset progress2; + Byte *bufData = NULL; + size_t bufSize = 0; + + progress2.vt.Progress = CompressProgress_XzEncOffset_Progress; + progress2.inOffset = 0; + progress2.outOffset = 0; + progress2.progress = progress; + + writeStartSizes = 0; + + if (props->blockSize != XZ_PROPS__BLOCK_SIZE__SOLID) + { + writeStartSizes = (props->forceWriteSizesInHeader > 0); + + if (writeStartSizes) + { + size_t t2; + size_t t = (size_t)props->blockSize; + if (t != props->blockSize) + return SZ_ERROR_PARAM; + t = XZ_GET_MAX_BLOCK_PACK_SIZE(t); + if (t < props->blockSize) + return SZ_ERROR_PARAM; + t2 = XZ_BLOCK_HEADER_SIZE_MAX + t; + if (!p->outBufs[0] || t2 != p->outBufSize) + { + XzEnc_FreeOutBufs(p); + p->outBufs[0] = (Byte *)ISzAlloc_Alloc(p->alloc, t2); + if (!p->outBufs[0]) + return SZ_ERROR_MEM; + p->outBufSize = t2; + } + bufData = p->outBufs[0] + XZ_BLOCK_HEADER_SIZE_MAX; + bufSize = t; + } + } + + for (;;) + { + CXzEncBlockInfo blockSizes; + int inStreamFinished; + + /* + UInt64 rem = (UInt64)(Int64)-1; + if (props->reduceSize != (UInt64)(Int64)-1 + && props->reduceSize >= progress2.inOffset) + rem = props->reduceSize - progress2.inOffset; + */ + + blockSizes.headerSize = 0; // for GCC + + RINOK(Xz_CompressBlock( + &p->lzmaf_Items[0], + + writeStartSizes ? NULL : outStream, + writeStartSizes ? p->outBufs[0] : NULL, + bufData, bufSize, + + inStream, + // rem, + NULL, 0, + + props, + progress ? &progress2.vt : NULL, + &inStreamFinished, + &blockSizes, + p->alloc, + p->allocBig)); + + { + UInt64 totalPackFull = blockSizes.totalSize + XZ_GET_PAD_SIZE(blockSizes.totalSize); + + if (writeStartSizes) + { + RINOK(WriteBytes(outStream, p->outBufs[0], blockSizes.headerSize)); + RINOK(WriteBytes(outStream, bufData, (size_t)totalPackFull - blockSizes.headerSize)); + } + + RINOK(XzEncIndex_AddIndexRecord(&p->xzIndex, blockSizes.unpackSize, blockSizes.totalSize, p->alloc)); + + progress2.inOffset += blockSizes.unpackSize; + progress2.outOffset += totalPackFull; + } + + if (inStreamFinished) + break; + } + } + + return XzEncIndex_WriteFooter(&p->xzIndex, (CXzStreamFlags)props->checkId, outStream); +} + + +#include "Alloc.h" + +SRes Xz_Encode(ISeqOutStream *outStream, ISeqInStream *inStream, + const CXzProps *props, ICompressProgress *progress) +{ + SRes res; + CXzEncHandle xz = XzEnc_Create(&g_Alloc, &g_BigAlloc); + if (!xz) + return SZ_ERROR_MEM; + res = XzEnc_SetProps(xz, props); + if (res == SZ_OK) + res = XzEnc_Encode(xz, outStream, inStream, progress); + XzEnc_Destroy(xz); + return res; +} + + +SRes Xz_EncodeEmpty(ISeqOutStream *outStream) +{ + SRes res; + CXzEncIndex xzIndex; + XzEncIndex_Construct(&xzIndex); + res = Xz_WriteHeader((CXzStreamFlags)0, outStream); + if (res == SZ_OK) + res = XzEncIndex_WriteFooter(&xzIndex, (CXzStreamFlags)0, outStream); + XzEncIndex_Free(&xzIndex, NULL); // g_Alloc + return res; +} diff --git a/code/nel/3rdparty/seven_zip/XzEnc.h b/code/nel/3rdparty/seven_zip/XzEnc.h new file mode 100644 index 000000000..0c29e7e1e --- /dev/null +++ b/code/nel/3rdparty/seven_zip/XzEnc.h @@ -0,0 +1,60 @@ +/* XzEnc.h -- Xz Encode +2017-06-27 : Igor Pavlov : Public domain */ + +#ifndef __XZ_ENC_H +#define __XZ_ENC_H + +#include "Lzma2Enc.h" + +#include "Xz.h" + +EXTERN_C_BEGIN + + +#define XZ_PROPS__BLOCK_SIZE__AUTO LZMA2_ENC_PROPS__BLOCK_SIZE__AUTO +#define XZ_PROPS__BLOCK_SIZE__SOLID LZMA2_ENC_PROPS__BLOCK_SIZE__SOLID + + +typedef struct +{ + UInt32 id; + UInt32 delta; + UInt32 ip; + int ipDefined; +} CXzFilterProps; + +void XzFilterProps_Init(CXzFilterProps *p); + + +typedef struct +{ + CLzma2EncProps lzma2Props; + CXzFilterProps filterProps; + unsigned checkId; + UInt64 blockSize; + int numBlockThreads_Reduced; + int numBlockThreads_Max; + int numTotalThreads; + int forceWriteSizesInHeader; + UInt64 reduceSize; +} CXzProps; + +void XzProps_Init(CXzProps *p); + + +typedef void * CXzEncHandle; + +CXzEncHandle XzEnc_Create(ISzAllocPtr alloc, ISzAllocPtr allocBig); +void XzEnc_Destroy(CXzEncHandle p); +SRes XzEnc_SetProps(CXzEncHandle p, const CXzProps *props); +void XzEnc_SetDataSize(CXzEncHandle p, UInt64 expectedDataSiize); +SRes XzEnc_Encode(CXzEncHandle p, ISeqOutStream *outStream, ISeqInStream *inStream, ICompressProgress *progress); + +SRes Xz_Encode(ISeqOutStream *outStream, ISeqInStream *inStream, + const CXzProps *props, ICompressProgress *progress); + +SRes Xz_EncodeEmpty(ISeqOutStream *outStream); + +EXTERN_C_END + +#endif diff --git a/code/nel/3rdparty/seven_zip/XzIn.c b/code/nel/3rdparty/seven_zip/XzIn.c new file mode 100644 index 000000000..ff48e2dd4 --- /dev/null +++ b/code/nel/3rdparty/seven_zip/XzIn.c @@ -0,0 +1,319 @@ +/* XzIn.c - Xz input +2018-07-04 : Igor Pavlov : Public domain */ + +#include "Precomp.h" + +#include + +#include "7zCrc.h" +#include "CpuArch.h" +#include "Xz.h" + +/* +#define XZ_FOOTER_SIG_CHECK(p) (memcmp((p), XZ_FOOTER_SIG, XZ_FOOTER_SIG_SIZE) == 0) +*/ +#define XZ_FOOTER_SIG_CHECK(p) ((p)[0] == XZ_FOOTER_SIG_0 && (p)[1] == XZ_FOOTER_SIG_1) + + +SRes Xz_ReadHeader(CXzStreamFlags *p, ISeqInStream *inStream) +{ + Byte sig[XZ_STREAM_HEADER_SIZE]; + RINOK(SeqInStream_Read2(inStream, sig, XZ_STREAM_HEADER_SIZE, SZ_ERROR_NO_ARCHIVE)); + if (memcmp(sig, XZ_SIG, XZ_SIG_SIZE) != 0) + return SZ_ERROR_NO_ARCHIVE; + return Xz_ParseHeader(p, sig); +} + +#define READ_VARINT_AND_CHECK(buf, pos, size, res) \ + { unsigned s = Xz_ReadVarInt(buf + pos, size - pos, res); \ + if (s == 0) return SZ_ERROR_ARCHIVE; pos += s; } + +SRes XzBlock_ReadHeader(CXzBlock *p, ISeqInStream *inStream, BoolInt *isIndex, UInt32 *headerSizeRes) +{ + Byte header[XZ_BLOCK_HEADER_SIZE_MAX]; + unsigned headerSize; + *headerSizeRes = 0; + RINOK(SeqInStream_ReadByte(inStream, &header[0])); + headerSize = (unsigned)header[0]; + if (headerSize == 0) + { + *headerSizeRes = 1; + *isIndex = True; + return SZ_OK; + } + + *isIndex = False; + headerSize = (headerSize << 2) + 4; + *headerSizeRes = headerSize; + RINOK(SeqInStream_Read(inStream, header + 1, headerSize - 1)); + return XzBlock_Parse(p, header); +} + +#define ADD_SIZE_CHECK(size, val) \ + { UInt64 newSize = size + (val); if (newSize < size) return XZ_SIZE_OVERFLOW; size = newSize; } + +UInt64 Xz_GetUnpackSize(const CXzStream *p) +{ + UInt64 size = 0; + size_t i; + for (i = 0; i < p->numBlocks; i++) + ADD_SIZE_CHECK(size, p->blocks[i].unpackSize); + return size; +} + +UInt64 Xz_GetPackSize(const CXzStream *p) +{ + UInt64 size = 0; + size_t i; + for (i = 0; i < p->numBlocks; i++) + ADD_SIZE_CHECK(size, (p->blocks[i].totalSize + 3) & ~(UInt64)3); + return size; +} + +/* +SRes XzBlock_ReadFooter(CXzBlock *p, CXzStreamFlags f, ISeqInStream *inStream) +{ + return SeqInStream_Read(inStream, p->check, XzFlags_GetCheckSize(f)); +} +*/ + +static SRes Xz_ReadIndex2(CXzStream *p, const Byte *buf, size_t size, ISzAllocPtr alloc) +{ + size_t numBlocks, pos = 1; + UInt32 crc; + + if (size < 5 || buf[0] != 0) + return SZ_ERROR_ARCHIVE; + + size -= 4; + crc = CrcCalc(buf, size); + if (crc != GetUi32(buf + size)) + return SZ_ERROR_ARCHIVE; + + { + UInt64 numBlocks64; + READ_VARINT_AND_CHECK(buf, pos, size, &numBlocks64); + numBlocks = (size_t)numBlocks64; + if (numBlocks != numBlocks64 || numBlocks * 2 > size) + return SZ_ERROR_ARCHIVE; + } + + Xz_Free(p, alloc); + if (numBlocks != 0) + { + size_t i; + p->numBlocks = numBlocks; + p->blocks = (CXzBlockSizes *)ISzAlloc_Alloc(alloc, sizeof(CXzBlockSizes) * numBlocks); + if (!p->blocks) + return SZ_ERROR_MEM; + for (i = 0; i < numBlocks; i++) + { + CXzBlockSizes *block = &p->blocks[i]; + READ_VARINT_AND_CHECK(buf, pos, size, &block->totalSize); + READ_VARINT_AND_CHECK(buf, pos, size, &block->unpackSize); + if (block->totalSize == 0) + return SZ_ERROR_ARCHIVE; + } + } + while ((pos & 3) != 0) + if (buf[pos++] != 0) + return SZ_ERROR_ARCHIVE; + return (pos == size) ? SZ_OK : SZ_ERROR_ARCHIVE; +} + +static SRes Xz_ReadIndex(CXzStream *p, ILookInStream *stream, UInt64 indexSize, ISzAllocPtr alloc) +{ + SRes res; + size_t size; + Byte *buf; + if (indexSize > ((UInt32)1 << 31)) + return SZ_ERROR_UNSUPPORTED; + size = (size_t)indexSize; + if (size != indexSize) + return SZ_ERROR_UNSUPPORTED; + buf = (Byte *)ISzAlloc_Alloc(alloc, size); + if (!buf) + return SZ_ERROR_MEM; + res = LookInStream_Read2(stream, buf, size, SZ_ERROR_UNSUPPORTED); + if (res == SZ_OK) + res = Xz_ReadIndex2(p, buf, size, alloc); + ISzAlloc_Free(alloc, buf); + return res; +} + +static SRes LookInStream_SeekRead_ForArc(ILookInStream *stream, UInt64 offset, void *buf, size_t size) +{ + RINOK(LookInStream_SeekTo(stream, offset)); + return LookInStream_Read(stream, buf, size); + /* return LookInStream_Read2(stream, buf, size, SZ_ERROR_NO_ARCHIVE); */ +} + +static SRes Xz_ReadBackward(CXzStream *p, ILookInStream *stream, Int64 *startOffset, ISzAllocPtr alloc) +{ + UInt64 indexSize; + Byte buf[XZ_STREAM_FOOTER_SIZE]; + UInt64 pos = *startOffset; + + if ((pos & 3) != 0 || pos < XZ_STREAM_FOOTER_SIZE) + return SZ_ERROR_NO_ARCHIVE; + + pos -= XZ_STREAM_FOOTER_SIZE; + RINOK(LookInStream_SeekRead_ForArc(stream, pos, buf, XZ_STREAM_FOOTER_SIZE)); + + if (!XZ_FOOTER_SIG_CHECK(buf + 10)) + { + UInt32 total = 0; + pos += XZ_STREAM_FOOTER_SIZE; + + for (;;) + { + size_t i; + #define TEMP_BUF_SIZE (1 << 10) + Byte temp[TEMP_BUF_SIZE]; + + i = (pos > TEMP_BUF_SIZE) ? TEMP_BUF_SIZE : (size_t)pos; + pos -= i; + RINOK(LookInStream_SeekRead_ForArc(stream, pos, temp, i)); + total += (UInt32)i; + for (; i != 0; i--) + if (temp[i - 1] != 0) + break; + if (i != 0) + { + if ((i & 3) != 0) + return SZ_ERROR_NO_ARCHIVE; + pos += i; + break; + } + if (pos < XZ_STREAM_FOOTER_SIZE || total > (1 << 16)) + return SZ_ERROR_NO_ARCHIVE; + } + + if (pos < XZ_STREAM_FOOTER_SIZE) + return SZ_ERROR_NO_ARCHIVE; + pos -= XZ_STREAM_FOOTER_SIZE; + RINOK(LookInStream_SeekRead_ForArc(stream, pos, buf, XZ_STREAM_FOOTER_SIZE)); + if (!XZ_FOOTER_SIG_CHECK(buf + 10)) + return SZ_ERROR_NO_ARCHIVE; + } + + p->flags = (CXzStreamFlags)GetBe16(buf + 8); + + if (!XzFlags_IsSupported(p->flags)) + return SZ_ERROR_UNSUPPORTED; + + if (GetUi32(buf) != CrcCalc(buf + 4, 6)) + return SZ_ERROR_ARCHIVE; + + indexSize = ((UInt64)GetUi32(buf + 4) + 1) << 2; + + if (pos < indexSize) + return SZ_ERROR_ARCHIVE; + + pos -= indexSize; + RINOK(LookInStream_SeekTo(stream, pos)); + RINOK(Xz_ReadIndex(p, stream, indexSize, alloc)); + + { + UInt64 totalSize = Xz_GetPackSize(p); + if (totalSize == XZ_SIZE_OVERFLOW + || totalSize >= ((UInt64)1 << 63) + || pos < totalSize + XZ_STREAM_HEADER_SIZE) + return SZ_ERROR_ARCHIVE; + pos -= (totalSize + XZ_STREAM_HEADER_SIZE); + RINOK(LookInStream_SeekTo(stream, pos)); + *startOffset = pos; + } + { + CXzStreamFlags headerFlags; + CSecToRead secToRead; + SecToRead_CreateVTable(&secToRead); + secToRead.realStream = stream; + + RINOK(Xz_ReadHeader(&headerFlags, &secToRead.vt)); + return (p->flags == headerFlags) ? SZ_OK : SZ_ERROR_ARCHIVE; + } +} + + +/* ---------- Xz Streams ---------- */ + +void Xzs_Construct(CXzs *p) +{ + p->num = p->numAllocated = 0; + p->streams = 0; +} + +void Xzs_Free(CXzs *p, ISzAllocPtr alloc) +{ + size_t i; + for (i = 0; i < p->num; i++) + Xz_Free(&p->streams[i], alloc); + ISzAlloc_Free(alloc, p->streams); + p->num = p->numAllocated = 0; + p->streams = 0; +} + +UInt64 Xzs_GetNumBlocks(const CXzs *p) +{ + UInt64 num = 0; + size_t i; + for (i = 0; i < p->num; i++) + num += p->streams[i].numBlocks; + return num; +} + +UInt64 Xzs_GetUnpackSize(const CXzs *p) +{ + UInt64 size = 0; + size_t i; + for (i = 0; i < p->num; i++) + ADD_SIZE_CHECK(size, Xz_GetUnpackSize(&p->streams[i])); + return size; +} + +/* +UInt64 Xzs_GetPackSize(const CXzs *p) +{ + UInt64 size = 0; + size_t i; + for (i = 0; i < p->num; i++) + ADD_SIZE_CHECK(size, Xz_GetTotalSize(&p->streams[i])); + return size; +} +*/ + +SRes Xzs_ReadBackward(CXzs *p, ILookInStream *stream, Int64 *startOffset, ICompressProgress *progress, ISzAllocPtr alloc) +{ + Int64 endOffset = 0; + RINOK(ILookInStream_Seek(stream, &endOffset, SZ_SEEK_END)); + *startOffset = endOffset; + for (;;) + { + CXzStream st; + SRes res; + Xz_Construct(&st); + res = Xz_ReadBackward(&st, stream, startOffset, alloc); + st.startOffset = *startOffset; + RINOK(res); + if (p->num == p->numAllocated) + { + size_t newNum = p->num + p->num / 4 + 1; + Byte *data = (Byte *)ISzAlloc_Alloc(alloc, newNum * sizeof(CXzStream)); + if (!data) + return SZ_ERROR_MEM; + p->numAllocated = newNum; + if (p->num != 0) + memcpy(data, p->streams, p->num * sizeof(CXzStream)); + ISzAlloc_Free(alloc, p->streams); + p->streams = (CXzStream *)data; + } + p->streams[p->num++] = st; + if (*startOffset == 0) + break; + RINOK(LookInStream_SeekTo(stream, *startOffset)); + if (progress && ICompressProgress_Progress(progress, endOffset - *startOffset, (UInt64)(Int64)-1) != SZ_OK) + return SZ_ERROR_PROGRESS; + } + return SZ_OK; +} diff --git a/code/ryzom/tools/patch_gen/patch_gen_common.cpp b/code/ryzom/tools/patch_gen/patch_gen_common.cpp index 18d1e76ec..4ef82a350 100644 --- a/code/ryzom/tools/patch_gen/patch_gen_common.cpp +++ b/code/ryzom/tools/patch_gen/patch_gen_common.cpp @@ -26,8 +26,8 @@ #include "nel/misc/file.h" #include "nel/misc/command.h" #include "nel/misc/sstring.h" +#include "nel/misc/seven_zip.h" #include "game_share/singleton_registry.h" -#include "seven_zip.h" using namespace std; using namespace NLMISC; From af31769a634cf52b8c41b3844a7f0f4c3d65f17d Mon Sep 17 00:00:00 2001 From: Jan Boon Date: Thu, 14 Nov 2019 10:15:40 +0800 Subject: [PATCH 065/236] Add LICENSE copy to the repository root --- LICENSE | 661 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 661 insertions(+) create mode 100644 LICENSE diff --git a/LICENSE b/LICENSE new file mode 100644 index 000000000..0ad25db4b --- /dev/null +++ b/LICENSE @@ -0,0 +1,661 @@ + GNU AFFERO GENERAL PUBLIC LICENSE + Version 3, 19 November 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU Affero General Public License is a free, copyleft license for +software and other kinds of works, specifically designed to ensure +cooperation with the community in the case of network server software. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +our General Public Licenses are intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + Developers that use our General Public Licenses protect your rights +with two steps: (1) assert copyright on the software, and (2) offer +you this License which gives you legal permission to copy, distribute +and/or modify the software. + + A secondary benefit of defending all users' freedom is that +improvements made in alternate versions of the program, if they +receive widespread use, become available for other developers to +incorporate. Many developers of free software are heartened and +encouraged by the resulting cooperation. However, in the case of +software used on network servers, this result may fail to come about. +The GNU General Public License permits making a modified version and +letting the public access it on a server without ever releasing its +source code to the public. + + The GNU Affero General Public License is designed specifically to +ensure that, in such cases, the modified source code becomes available +to the community. It requires the operator of a network server to +provide the source code of the modified version running there to the +users of that server. Therefore, public use of a modified version, on +a publicly accessible server, gives the public access to the source +code of the modified version. + + An older license, called the Affero General Public License and +published by Affero, was designed to accomplish similar goals. This is +a different license, not a version of the Affero GPL, but Affero has +released a new version of the Affero GPL which permits relicensing under +this license. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU Affero General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Remote Network Interaction; Use with the GNU General Public License. + + Notwithstanding any other provision of this License, if you modify the +Program, your modified version must prominently offer all users +interacting with it remotely through a computer network (if your version +supports such interaction) an opportunity to receive the Corresponding +Source of your version by providing access to the Corresponding Source +from a network server at no charge, through some standard or customary +means of facilitating copying of software. This Corresponding Source +shall include the Corresponding Source for any work covered by version 3 +of the GNU General Public License that is incorporated pursuant to the +following paragraph. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the work with which it is combined will remain governed by version +3 of the GNU General Public License. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU Affero General Public License from time to time. Such new versions +will be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU Affero General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU Affero General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU Affero General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + 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 License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If your software can interact with users remotely through a computer +network, you should also make sure that it provides a way for users to +get its source. For example, if your program is a web application, its +interface could display a "Source" link that leads users to an archive +of the code. There are many ways you could offer source, and different +solutions will be better for different programs; see section 13 for the +specific requirements. + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU AGPL, see +. From ed8a5c14a788af04ad07a81bc1cccb45c7ab7a85 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Thu, 14 Nov 2019 16:37:09 +0800 Subject: [PATCH 066/236] Add sound sheet build process --- code/nel/tools/build_gamedata/0_setup.py | 14 ++-- .../processes/soundbank/0_setup.py | 65 +++++++++++++++++++ .../processes/soundbank/1_export.py | 49 ++++++++++++++ .../processes/soundbank/2_build.py | 64 ++++++++++++++++++ .../processes/soundbank/3_install.py | 55 ++++++++++++++++ 5 files changed, 237 insertions(+), 10 deletions(-) create mode 100644 code/nel/tools/build_gamedata/processes/soundbank/0_setup.py create mode 100644 code/nel/tools/build_gamedata/processes/soundbank/1_export.py create mode 100644 code/nel/tools/build_gamedata/processes/soundbank/2_build.py create mode 100644 code/nel/tools/build_gamedata/processes/soundbank/3_install.py diff --git a/code/nel/tools/build_gamedata/0_setup.py b/code/nel/tools/build_gamedata/0_setup.py index 479121428..42a9a409b 100755 --- a/code/nel/tools/build_gamedata/0_setup.py +++ b/code/nel/tools/build_gamedata/0_setup.py @@ -88,13 +88,9 @@ if not args.noconf: except NameError: SoundDirectory = "V:" try: - SoundSheetsDirectory + SoundDfnDirectory except NameError: - SoundSheetsDirectory = "V:" - try: - SoundSheetsDfnDirectory - except NameError: - SoundSheetsDfnDirectory = "V:/DFN" + SoundDfnDirectory = "V:/DFN" try: ExportBuildDirectory except NameError: @@ -231,8 +227,7 @@ if not args.noconf: WorkspaceDirectory = askVar(log, "[IN] Workspace Directory", WorkspaceDirectory).replace("\\", "/") DatabaseDirectory = askVar(log, "[IN] Database Directory", DatabaseDirectory).replace("\\", "/") SoundDirectory = askVar(log, "[IN] Sound Directory", SoundDirectory).replace("\\", "/") - SoundSheetsDirectory = askVar(log, "[IN] Sound Sheets Directory", SoundSheetsDirectory).replace("\\", "/") - SoundSheetsDfnDirectory = askVar(log, "[IN] Sound Sheets DFN Directory", SoundSheetsDfnDirectory).replace("\\", "/") + SoundDfnDirectory = askVar(log, "[IN] Sound DFN Directory", SoundDfnDirectory).replace("\\", "/") ExportBuildDirectory = askVar(log, "[OUT] Export Build Directory", ExportBuildDirectory).replace("\\", "/") InstallDirectory = askVar(log, "[OUT] Install Directory", InstallDirectory).replace("\\", "/") ClientDevDirectory = askVar(log, "[OUT] Client Dev Directory", ClientDevDirectory).replace("\\", "/") @@ -317,8 +312,7 @@ if not args.noconf: sf.write("# Data build directories\n") sf.write("DatabaseDirectory = \"" + str(DatabaseDirectory) + "\"\n") sf.write("SoundDirectory = \"" + str(SoundDirectory) + "\"\n") - sf.write("SoundSheetsDirectory = \"" + str(SoundSheetsDirectory) + "\"\n") - sf.write("SoundSheetsDfnDirectory = \"" + str(SoundSheetsDfnDirectory) + "\"\n") + sf.write("SoundDfnDirectory = \"" + str(SoundDfnDirectory) + "\"\n") sf.write("ExportBuildDirectory = \"" + str(ExportBuildDirectory) + "\"\n") sf.write("\n") sf.write("# Install directories\n") diff --git a/code/nel/tools/build_gamedata/processes/soundbank/0_setup.py b/code/nel/tools/build_gamedata/processes/soundbank/0_setup.py new file mode 100644 index 000000000..368011d1a --- /dev/null +++ b/code/nel/tools/build_gamedata/processes/soundbank/0_setup.py @@ -0,0 +1,65 @@ +#!/usr/bin/python +# +# \file 0_setup.py +# \brief Setup soundbank +# \date 2009-06-03 10:47GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Setup soundbank +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# 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 +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +import time, sys, os, shutil, subprocess, distutils.dir_util +sys.path.append("../../configuration") + +if os.path.isfile("log.log"): + os.remove("log.log") +log = open("log.log", "w") +from scripts import * +from buildsite import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Setup soundbank") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +# Setup source directories +printLog(log, ">>> Setup source directories <<<") +mkPath(log, SoundDirectory) +mkPath(log, SoundDfnDirectory) + +# Setup export directories +printLog(log, ">>> Setup export directories <<<") + +# Setup build directories +printLog(log, ">>> Setup build directories <<<") +mkPath(log, ExportBuildDirectory + "/" + SoundSheetsBuildDirectory) + +# Setup client directories +printLog(log, ">>> Setup client directories <<<") +mkPath(log, InstallDirectory + "/" + SoundInstallDirectory) + +log.close() + + +# end of file diff --git a/code/nel/tools/build_gamedata/processes/soundbank/1_export.py b/code/nel/tools/build_gamedata/processes/soundbank/1_export.py new file mode 100644 index 000000000..ffecbb4d3 --- /dev/null +++ b/code/nel/tools/build_gamedata/processes/soundbank/1_export.py @@ -0,0 +1,49 @@ +#!/usr/bin/python +# +# \file 1_export.py +# \brief Export soundbank +# \date 2009-06-03 10:47GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Export soundbank +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# 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 +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +import time, sys, os, shutil, subprocess, distutils.dir_util +sys.path.append("../../configuration") + +if os.path.isfile("log.log"): + os.remove("log.log") +log = open("log.log", "w") +from scripts import * +from buildsite import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Export soundbank") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +log.close() + + +# end of file diff --git a/code/nel/tools/build_gamedata/processes/soundbank/2_build.py b/code/nel/tools/build_gamedata/processes/soundbank/2_build.py new file mode 100644 index 000000000..03d2f6b07 --- /dev/null +++ b/code/nel/tools/build_gamedata/processes/soundbank/2_build.py @@ -0,0 +1,64 @@ +#!/usr/bin/python +# +# \file 2_build.py +# \brief Build soundbank +# \date 2009-06-03 10:47GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Build soundbank +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# 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 +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +import time, sys, os, shutil, subprocess, distutils.dir_util +sys.path.append("../../configuration") + +if os.path.isfile("log.log"): + os.remove("log.log") +log = open("log.log", "w") +from scripts import * +from buildsite import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Build soundbank") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +# Find tools +BuildSoundbank = findTool(log, ToolDirectories, BuildSoundbankTool, ToolSuffix) +printLog(log, "") + +# build_soundbank +printLog(log, ">>> Build soundbank <<<") +if BuildSoundbank == "": + toolLogFail(log, BuildSoundbankTool, ToolSuffix) +else: + mkPath(log, SoundDirectory) + mkPath(log, SoundDfnDirectory) + mkPath(log, ExportBuildDirectory + "/" + SoundSheetsBuildDirectory) + subprocess.call([ BuildSoundbank, SoundDirectory, SoundDfnDirectory, ExportBuildDirectory + "/" + SoundSheetsBuildDirectory ]) +printLog(log, "") + +log.close() + + +# end of file diff --git a/code/nel/tools/build_gamedata/processes/soundbank/3_install.py b/code/nel/tools/build_gamedata/processes/soundbank/3_install.py new file mode 100644 index 000000000..e8a2a6242 --- /dev/null +++ b/code/nel/tools/build_gamedata/processes/soundbank/3_install.py @@ -0,0 +1,55 @@ +#!/usr/bin/python +# +# \file 3_install.py +# \brief Install soundbank +# \date 2009-06-03 10:47GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Install soundbank +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# 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 +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +import time, sys, os, shutil, subprocess, distutils.dir_util +sys.path.append("../../configuration") + +if os.path.isfile("log.log"): + os.remove("log.log") +log = open("log.log", "w") +from scripts import * +from buildsite import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Install soundbank") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +printLog(log, ">>> Install soundbank packed_sheets <<<") +mkPath(log, ExportBuildDirectory + "/" + SoundSheetsBuildDirectory) +mkPath(log, InstallDirectory + "/" + SoundInstallDirectory) +copyFilesExtNoTreeIfNeeded(log, ExportBuildDirectory + "/" + SoundSheetsBuildDirectory, InstallDirectory + "/" + SoundInstallDirectory, ".packed_sheets") + +printLog(log, "") +log.close() + + +# end of file From 02305cdb33886784beeddcf0a74cf04b786b9a06 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Thu, 14 Nov 2019 16:38:47 +0800 Subject: [PATCH 067/236] Fix sound sheet build code that caused random and missing values --- code/nel/src/sound/complex_sound.cpp | 5 ++++- code/nel/src/sound/simple_sound.cpp | 1 + code/nel/src/sound/stream_file_sound.cpp | 2 +- code/nel/src/sound/stream_sound.cpp | 15 +++++++-------- 4 files changed, 13 insertions(+), 10 deletions(-) diff --git a/code/nel/src/sound/complex_sound.cpp b/code/nel/src/sound/complex_sound.cpp index 30b97347f..f33f4b2bf 100644 --- a/code/nel/src/sound/complex_sound.cpp +++ b/code/nel/src/sound/complex_sound.cpp @@ -171,6 +171,8 @@ CComplexSound::CComplexSound() : _PatternMode(CComplexSound::MODE_UNDEFINED), _TicksPerSeconds(1.0f), _XFadeLength(3000), // default to 3000 sec. + _DoFadeIn(true), + _DoFadeOut(true), _MaxDistValid(false), _Duration(0), _DurationValid(false) @@ -314,7 +316,8 @@ void CComplexSound::importForm(const std::string& filename, NLGEORGES::UFormElm& if (mode == "Chained" || mode == "Sparse") { // XFade length - formRoot.getValueByName(_XFadeLength, ".SoundType.XFadeLength"); + if (!formRoot.getValueByName(_XFadeLength, ".SoundType.XFadeLength")) + formRoot.getValueByName(_XFadeLength, ".SoundType.XFadeLenght"); // WORKAROUND: Typo in sound assets // Fade in/out flag. formRoot.getValueByName(_DoFadeIn, ".SoundType.DoFadeIn"); formRoot.getValueByName(_DoFadeOut, ".SoundType.DoFadeOut"); diff --git a/code/nel/src/sound/simple_sound.cpp b/code/nel/src/sound/simple_sound.cpp index 393c9daeb..c4c320ea4 100644 --- a/code/nel/src/sound/simple_sound.cpp +++ b/code/nel/src/sound/simple_sound.cpp @@ -38,6 +38,7 @@ CSimpleSound::CSimpleSound() : _Registered(false), _Buffer(NULL), // _Detailed(false), // not used? + _Alpha(1.0), _NeedContext(false) { // init with NULL in case of unexecpted access diff --git a/code/nel/src/sound/stream_file_sound.cpp b/code/nel/src/sound/stream_file_sound.cpp index 83641cdf7..1eb40f4bb 100644 --- a/code/nel/src/sound/stream_file_sound.cpp +++ b/code/nel/src/sound/stream_file_sound.cpp @@ -41,7 +41,7 @@ using namespace std; namespace NLSOUND { -CStreamFileSound::CStreamFileSound() +CStreamFileSound::CStreamFileSound() : m_Async(true) { } diff --git a/code/nel/src/sound/stream_sound.cpp b/code/nel/src/sound/stream_sound.cpp index 21b6de9d0..8933f8be7 100644 --- a/code/nel/src/sound/stream_sound.cpp +++ b/code/nel/src/sound/stream_sound.cpp @@ -18,19 +18,19 @@ #include "nel/sound/stream_sound.h" #if NLSOUND_SHEET_VERSION_BUILT < 2 -# include "nel/sound/group_controller_root.h" +#include "nel/sound/group_controller_root.h" #endif -namespace NLSOUND { +namespace NLSOUND +{ CStreamSound::CStreamSound() + : m_Alpha(1.0f) { - } CStreamSound::~CStreamSound() { - } void CStreamSound::importForm(const std::string &filename, NLGEORGES::UFormElm &root) @@ -49,7 +49,7 @@ void CStreamSound::importForm(const std::string &filename, NLGEORGES::UFormElm & CSound::importForm(filename, root); // MaxDistance - root.getValueByName(_MaxDist, ".SoundType.MaxDistance"); + root.getValueByName(_MaxDist, ".SoundType.MaxDistance"); // MinDistance root.getValueByName(_MinDist, ".SoundType.MinDistance"); @@ -60,7 +60,6 @@ void CStreamSound::importForm(const std::string &filename, NLGEORGES::UFormElm & #if NLSOUND_SHEET_VERSION_BUILT < 2 _GroupController = CGroupControllerRoot::getInstance()->getGroupController(NLSOUND_SHEET_V1_DEFAULT_SOUND_STREAM_GROUP_CONTROLLER); #endif - } void CStreamSound::serial(NLMISC::IStream &s) @@ -71,9 +70,9 @@ void CStreamSound::serial(NLMISC::IStream &s) s.serial(m_Alpha); #if NLSOUND_SHEET_VERSION_BUILT < 2 - if (s.isReading()) _GroupController = CGroupControllerRoot::getInstance()->getGroupController(NLSOUND_SHEET_V1_DEFAULT_SOUND_STREAM_GROUP_CONTROLLER); + if (s.isReading()) + _GroupController = CGroupControllerRoot::getInstance()->getGroupController(NLSOUND_SHEET_V1_DEFAULT_SOUND_STREAM_GROUP_CONTROLLER); #endif - } } /* namespace NLSOUND */ From 255c6956c754fda2b3f9fff824d209905c9e6cf7 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Thu, 14 Nov 2019 19:06:23 +0800 Subject: [PATCH 068/236] Skip git directory --- code/nel/src/misc/path.cpp | 4 ++-- code/ryzom/tools/leveldesign/georges_dll/file_tree_view.cpp | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/code/nel/src/misc/path.cpp b/code/nel/src/misc/path.cpp index 0c650918f..961a907b4 100644 --- a/code/nel/src/misc/path.cpp +++ b/code/nel/src/misc/path.cpp @@ -898,9 +898,9 @@ void CFileContainer::getPathContent (const string &path, bool recurse, bool want if (isdirectory(de)) { // skip CVS, .svn and .hg directory - if ((!showEverything) && (fn == "CVS" || fn == ".svn" || fn == ".hg")) + if ((!showEverything) && (fn == "CVS" || fn == ".svn" || fn == ".hg" || fn == ".git")) { - NL_DISPLAY_PATH("PATH: CPath::getPathContent(%s, %d, %d, %d): skip CVS, .svn and .hg directory", path.c_str(), recurse, wantDir, wantFile); + NL_DISPLAY_PATH("PATH: CPath::getPathContent(%s, %d, %d, %d): skip '%s' directory", path.c_str(), recurse, wantDir, wantFile, fn.c_str()); continue; } diff --git a/code/ryzom/tools/leveldesign/georges_dll/file_tree_view.cpp b/code/ryzom/tools/leveldesign/georges_dll/file_tree_view.cpp index d44e5a155..c0a74297b 100644 --- a/code/ryzom/tools/leveldesign/georges_dll/file_tree_view.cpp +++ b/code/ryzom/tools/leveldesign/georges_dll/file_tree_view.cpp @@ -457,7 +457,9 @@ bool CFileTreeCtrl::enumObjects(HTREEITEM hParentItem,IShellFolder* pParentFolde string ext5 = pItemInfo->displayName.substr(displayNameSize-5); bool cvs = ext3 == "CVS" || ext4 == "CVS\\" || ext4 == "CVS/" || - ext4 == ".svn" || ext5 == ".svn\\" || ext5 == ".svn/"; + ext4 == ".svn" || ext5 == ".svn\\" || ext5 == ".svn/" || + ext4 == ".hg" || ext5 == ".hg\\" || ext5 == ".hg/" || + ext4 == ".git" || ext5 == ".git\\" || ext5 == ".git/"; /* bool cvs = ( pItemInfo->displayName[displayNameSize-3] == 'C') && (pItemInfo->displayName[displayNameSize-2] == 'V') && From c15e75ecc8c68d3eca5aa3e3b4fefcbc6eaafa52 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Fri, 15 Nov 2019 11:02:20 +0800 Subject: [PATCH 069/236] Build rest of sound sheets --- code/nel/include/nel/sound/clustered_sound.h | 2 +- code/nel/include/nel/sound/u_audio_mixer.h | 4 ++++ code/nel/src/sound/audio_mixer_user.cpp | 17 +++++++++++++++++ code/nel/src/sound/clustered_sound.cpp | 16 +++++++++------- .../sound/build_soundbank/build_soundbank.cpp | 2 ++ 5 files changed, 33 insertions(+), 8 deletions(-) diff --git a/code/nel/include/nel/sound/clustered_sound.h b/code/nel/include/nel/sound/clustered_sound.h index 4b28a71ec..e37762b20 100644 --- a/code/nel/include/nel/sound/clustered_sound.h +++ b/code/nel/include/nel/sound/clustered_sound.h @@ -189,7 +189,7 @@ public: const std::vector > &getAudioPath() { return _AudioPath;} - + static void buildSheets(const std::string &packedSheetPath); private: diff --git a/code/nel/include/nel/sound/u_audio_mixer.h b/code/nel/include/nel/sound/u_audio_mixer.h index 089013797..a1fb2b3cc 100644 --- a/code/nel/include/nel/sound/u_audio_mixer.h +++ b/code/nel/include/nel/sound/u_audio_mixer.h @@ -169,6 +169,10 @@ public: static std::string buildSampleBank(const std::vector &sampleList, const std::string &bankDir, const std::string &bankName); /// Build the sound bank packed sheets file from georges sound sheet files with .sound extension in the search path, and return the path to the written file. static std::string buildSoundBank(const std::string &packedSheetDir); + /// Build the cluster sound_group sheets. + static std::string buildClusteredSoundGroupSheets(const std::string &packedSheetDir); + /// Build the user var binding sheets. + static std::string buildUserVarBindingSheets(const std::string &packedSheetDir); /** Set the global path to the sample banks * If you have specified some sample bank to load in the * mixer config file, you MUST set the sample path diff --git a/code/nel/src/sound/audio_mixer_user.cpp b/code/nel/src/sound/audio_mixer_user.cpp index fdc6f6e11..0f3ff1110 100644 --- a/code/nel/src/sound/audio_mixer_user.cpp +++ b/code/nel/src/sound/audio_mixer_user.cpp @@ -988,6 +988,23 @@ std::string UAudioMixer::buildSoundBank(const std::string &packedSheetDir) return dir + "sounds.packed_sheets"; } +/// Build the cluster sound_group sheets. +std::string UAudioMixer::buildClusteredSoundGroupSheets(const std::string &packedSheetDir) +{ + std::string dir = CPath::standardizePath(packedSheetDir, true); + CClusteredSound::buildSheets(dir); + return dir + "sound_groups.packed_sheets"; +} + +/// Build the user var binding sheets. +std::string UAudioMixer::buildUserVarBindingSheets(const std::string &packedSheetDir) +{ + std::string dir = CPath::standardizePath(packedSheetDir, true); + std::map container; + ::loadForm("user_var_binding", dir + "user_var_binding.packed_sheets", container, true, false); + return dir + "user_var_binding.packed_sheets"; +} + void CAudioMixerUser::setBackgroundFlagName(uint flagIndex, const std::string &flagName) { if (flagIndex < TBackgroundFlags::NB_BACKGROUND_FLAGS) diff --git a/code/nel/src/sound/clustered_sound.cpp b/code/nel/src/sound/clustered_sound.cpp index 6e62f3176..52a9848da 100644 --- a/code/nel/src/sound/clustered_sound.cpp +++ b/code/nel/src/sound/clustered_sound.cpp @@ -160,10 +160,6 @@ public: }; -// this structure is fill by the loadForm() function and will contain all you need -std::map Container; - - CClusteredSound::CClusteredSound() : _Scene(0), _RootCluster(0), @@ -173,21 +169,27 @@ CClusteredSound::CClusteredSound() } +void CClusteredSound::buildSheets(const std::string &packedSheetPath) +{ + std::map container; + ::loadForm("sound_group", packedSheetPath + "sound_groups.packed_sheets", container, true, false); +} void CClusteredSound::init(NL3D::CScene *scene, float portalInterpolate, float maxEarDist, float minGain) { // load the sound_group sheets - ::loadForm("sound_group", CAudioMixerUser::instance()->getPackedSheetPath()+"sound_groups.packed_sheets", Container, CAudioMixerUser::instance()->getPackedSheetUpdate(), false); + std::map container; + ::loadForm("sound_group", CAudioMixerUser::instance()->getPackedSheetPath()+"sound_groups.packed_sheets", container, CAudioMixerUser::instance()->getPackedSheetUpdate(), false); // copy the container data into internal structure - std::map::iterator first(Container.begin()), last(Container.end()); + std::map::iterator first(container.begin()), last(container.end()); for (; first != last; ++first) { _SoundGroupToSound.insert(first->second._SoundGroupAssoc.begin(), first->second._SoundGroupAssoc.end()); } // and clear the temporary Container - Container.clear(); + container.clear(); _Scene = scene; diff --git a/code/nel/tools/sound/build_soundbank/build_soundbank.cpp b/code/nel/tools/sound/build_soundbank/build_soundbank.cpp index 082b08e90..9829a1898 100644 --- a/code/nel/tools/sound/build_soundbank/build_soundbank.cpp +++ b/code/nel/tools/sound/build_soundbank/build_soundbank.cpp @@ -88,6 +88,8 @@ int main(int nNbArg, char **ppArgs) // build the sound bank UAudioMixer::buildSoundBank(exportDir); + UAudioMixer::buildClusteredSoundGroupSheets(exportDir); + UAudioMixer::buildUserVarBindingSheets(exportDir); // and that's all folks return EXIT_SUCCESS; From 22e9c17a72ef992ff36022cb2e9dfe7a0acfdb10 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Fri, 15 Nov 2019 11:52:18 +0800 Subject: [PATCH 070/236] Add sound copy process --- .../build_gamedata/processes/sound/0_setup.py | 65 +++++++++++++++++++ .../processes/sound/1_export.py | 65 +++++++++++++++++++ .../build_gamedata/processes/sound/2_build.py | 49 ++++++++++++++ .../processes/sound/3_install.py | 57 ++++++++++++++++ 4 files changed, 236 insertions(+) create mode 100644 code/nel/tools/build_gamedata/processes/sound/0_setup.py create mode 100644 code/nel/tools/build_gamedata/processes/sound/1_export.py create mode 100644 code/nel/tools/build_gamedata/processes/sound/2_build.py create mode 100644 code/nel/tools/build_gamedata/processes/sound/3_install.py diff --git a/code/nel/tools/build_gamedata/processes/sound/0_setup.py b/code/nel/tools/build_gamedata/processes/sound/0_setup.py new file mode 100644 index 000000000..7ce690d5d --- /dev/null +++ b/code/nel/tools/build_gamedata/processes/sound/0_setup.py @@ -0,0 +1,65 @@ +#!/usr/bin/python +# +# \file 0_setup.py +# \brief setup sound +# \date 2010-05-24 13:42GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Setup sound +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# 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 +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +import time, sys, os, shutil, subprocess, distutils.dir_util +sys.path.append("../../configuration") + +if os.path.isfile("log.log"): + os.remove("log.log") +log = open("log.log", "w") +from scripts import * +from buildsite import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Setup sound") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +# Setup source directories +printLog(log, ">>> Setup source directories <<<") +mkPath(log, SoundDirectory) +mkPath(log, SoundDfnDirectory) + +# Setup export directories +printLog(log, ">>> Setup export directories <<<") +mkPath(log, ExportBuildDirectory + "/" + SoundExportDirectory) + +# Setup build directories +printLog(log, ">>> Setup build directories <<<") + +# Setup client directories +printLog(log, ">>> Setup client directories <<<") +mkPath(log, InstallDirectory + "/" + SoundInstallDirectory) + +log.close() + + +# end of file diff --git a/code/nel/tools/build_gamedata/processes/sound/1_export.py b/code/nel/tools/build_gamedata/processes/sound/1_export.py new file mode 100644 index 000000000..066b2c256 --- /dev/null +++ b/code/nel/tools/build_gamedata/processes/sound/1_export.py @@ -0,0 +1,65 @@ +#!/usr/bin/python +# +# \file 1_export.py +# \brief Export sound +# \date 2010-05-24 13:42GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Export sound +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# 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 +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +import time, sys, os, shutil, subprocess, distutils.dir_util +sys.path.append("../../configuration") + +if os.path.isfile("log.log"): + os.remove("log.log") +log = open("log.log", "w") +from scripts import * +from buildsite import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Export sound") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +# For each sound directory +printLog(log, ">>> Export sound <<<") +mkPath(log, ExportBuildDirectory + "/" + SoundExportDirectory) +mkPath(log, SoundDirectory) +mkPath(log, SoundDfnDirectory) +copyFilesExtNoTreeIfNeeded(log, SoundDfnDirectory, ExportBuildDirectory + "/" + SoundExportDirectory, ".dfn") +copyFilesExtNoTreeIfNeeded(log, SoundDfnDirectory, ExportBuildDirectory + "/" + SoundExportDirectory, ".typ") +copyFilesExtNoTreeIfNeeded(log, SoundDirectory, ExportBuildDirectory + "/" + SoundExportDirectory, ".mixer_config") +copyFilesExtNoTreeIfNeeded(log, SoundDirectory, ExportBuildDirectory + "/" + SoundExportDirectory, ".mp3") +copyFilesExtNoTreeIfNeeded(log, SoundDirectory, ExportBuildDirectory + "/" + SoundExportDirectory, ".ogg") +copyFilesExtNoTreeIfNeeded(log, SoundDirectory, ExportBuildDirectory + "/" + SoundExportDirectory, ".flac") +copyFilesExtNoTreeIfNeeded(log, SoundDirectory, ExportBuildDirectory + "/" + SoundExportDirectory, ".primitive") +copyFilesExtNoTreeIfNeeded(log, SoundDirectory, ExportBuildDirectory + "/" + SoundExportDirectory, ".sound_anim") + +printLog(log, "") + +log.close() + + +# end of file diff --git a/code/nel/tools/build_gamedata/processes/sound/2_build.py b/code/nel/tools/build_gamedata/processes/sound/2_build.py new file mode 100644 index 000000000..048f8f456 --- /dev/null +++ b/code/nel/tools/build_gamedata/processes/sound/2_build.py @@ -0,0 +1,49 @@ +#!/usr/bin/python +# +# \file 2_build.py +# \brief Build sound +# \date 2010-05-24 13:42GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Build sound +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# 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 +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +import time, sys, os, shutil, subprocess, distutils.dir_util +sys.path.append("../../configuration") + +if os.path.isfile("log.log"): + os.remove("log.log") +log = open("log.log", "w") +from scripts import * +from buildsite import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Build sound") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +log.close() + + +# end of file diff --git a/code/nel/tools/build_gamedata/processes/sound/3_install.py b/code/nel/tools/build_gamedata/processes/sound/3_install.py new file mode 100644 index 000000000..b8078609f --- /dev/null +++ b/code/nel/tools/build_gamedata/processes/sound/3_install.py @@ -0,0 +1,57 @@ +#!/usr/bin/python +# +# \file 3_install.py +# \brief Install sound +# \date 2010-05-24 13:42GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Install sound +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# 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 +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +import time, sys, os, shutil, subprocess, distutils.dir_util +sys.path.append("../../configuration") + +if os.path.isfile("log.log"): + os.remove("log.log") +log = open("log.log", "w") +from scripts import * +from buildsite import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Install sound") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +printLog(log, ">>> Install sound <<<") +srcDir = ExportBuildDirectory + "/" + SoundExportDirectory +mkPath(log, srcDir) +destDir = InstallDirectory + "/" + SoundInstallDirectory +mkPath(log, destDir) +copyFilesNoTreeIfNeeded(log, srcDir, destDir) + +printLog(log, "") +log.close() + + +# end of file From 68d8e21629c57c953935f17f0ec5be2609f4b5b7 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Fri, 15 Nov 2019 13:32:53 +0800 Subject: [PATCH 071/236] Add signtool support --- code/nel/tools/build_gamedata/0_setup.py | 20 ++++++ .../build_gamedata/configuration/scripts.py | 16 +++-- .../tools/build_gamedata/executables_dev.bat | 6 ++ .../build_gamedata/processes/sign/0_setup.py | 64 +++++++++++++++++++ .../build_gamedata/processes/sign/1_export.py | 57 +++++++++++++++++ .../build_gamedata/processes/sign/2_build.py | 61 ++++++++++++++++++ .../processes/sign/3_install.py | 58 +++++++++++++++++ 7 files changed, 275 insertions(+), 7 deletions(-) create mode 100644 code/nel/tools/build_gamedata/processes/sign/0_setup.py create mode 100644 code/nel/tools/build_gamedata/processes/sign/1_export.py create mode 100644 code/nel/tools/build_gamedata/processes/sign/2_build.py create mode 100644 code/nel/tools/build_gamedata/processes/sign/3_install.py diff --git a/code/nel/tools/build_gamedata/0_setup.py b/code/nel/tools/build_gamedata/0_setup.py index 42a9a409b..69d825fed 100755 --- a/code/nel/tools/build_gamedata/0_setup.py +++ b/code/nel/tools/build_gamedata/0_setup.py @@ -187,6 +187,18 @@ if not args.noconf: PatchmanBridgeServerDirectory except NameError: PatchmanBridgeServerDirectory = "T:/bridge_server" + try: + SignToolExecutable + except NameError: + SignToolExecutable = "C:/Program Files/Microsoft SDKs/Windows/v6.0A/Bin/signtool.exe" + try: + SignToolSha1 + except NameError: + SignToolSha1 = "" + try: + SignToolTimestamp + except NameError: + SignToolTimestamp = "http://timestamp.comodoca.com/authenticode" try: MaxAvailable except NameError: @@ -258,6 +270,9 @@ if not args.noconf: PatchmanCfgAdminDirectory = askVar(log, "[IN] Patchman Cfg Admin Directory", PatchmanCfgAdminDirectory).replace("\\", "/") PatchmanCfgDefaultDirectory = askVar(log, "[IN] Patchman Cfg Default Directory", PatchmanCfgDefaultDirectory).replace("\\", "/") PatchmanBridgeServerDirectory = askVar(log, "[OUT] Patchman Bridge Server Patch Directory", PatchmanBridgeServerDirectory).replace("\\", "/") + SignToolExecutable = askVar(log, "Sign Tool Executable", SignToolExecutable).replace("\\", "/") + SignToolSha1 = askVar(log, "Sign Tool Signature SHA1", SignToolSha1) + SignToolTimestamp = askVar(log, "Sign Tool Timestamp Authority", SignToolTimestamp) MaxAvailable = int(askVar(log, "3dsMax Available", str(MaxAvailable))) if MaxAvailable: MaxDirectory = askVar(log, "3dsMax Directory", MaxDirectory).replace("\\", "/") @@ -346,6 +361,11 @@ if not args.noconf: sf.write("PatchmanCfgDefaultDirectory = \"" + str(PatchmanCfgDefaultDirectory) + "\"\n") sf.write("PatchmanBridgeServerDirectory = \"" + str(PatchmanBridgeServerDirectory) + "\"\n") sf.write("\n") + sf.write("# Sign tool\n") + sf.write("SignToolExecutable = \"" + str(SignToolExecutable) + "\"\n") + sf.write("SignToolSha1 = \"" + str(SignToolSha1) + "\"\n") + sf.write("SignToolTimestamp = \"" + str(SignToolTimestamp) + "\"\n") + sf.write("\n") sf.write("# 3dsMax directives\n") sf.write("MaxAvailable = " + str(MaxAvailable) + "\n") sf.write("MaxDirectory = \"" + str(MaxDirectory) + "\"\n") diff --git a/code/nel/tools/build_gamedata/configuration/scripts.py b/code/nel/tools/build_gamedata/configuration/scripts.py index 9a815a2b9..5bbed497f 100755 --- a/code/nel/tools/build_gamedata/configuration/scripts.py +++ b/code/nel/tools/build_gamedata/configuration/scripts.py @@ -541,9 +541,10 @@ def needUpdateDirNoSubdirLogExtMultidir(log, all_dir_base, all_dir_source, dir_s def findFileMultiDir(log, dirs_where, file_name): try: for dir in dirs_where: - file = findFile(log, dir, file_name) - if file != "": - return file + if dir != "": + file = findFile(log, dir, file_name) + if file != "": + return file except Exception, e: printLog(log, "EXCEPTION " + str(e)) printLog(log, "FILE NOT FOUND " + file_name) @@ -552,10 +553,11 @@ def findFileMultiDir(log, dirs_where, file_name): def findTool(log, dirs_where, file_name, suffix): try: for dir in dirs_where: - tool = findFile(log, dir, file_name + suffix) - if tool != "": - printLog(log, "TOOL " + tool) - return tool + if dir != "": + tool = findFile(log, dir, file_name + suffix) + if tool != "": + printLog(log, "TOOL " + tool) + return tool except Exception, e: printLog(log, "EXCEPTION " + str(e)) printLog(log, "TOOL NOT FOUND " + file_name + suffix) diff --git a/code/nel/tools/build_gamedata/executables_dev.bat b/code/nel/tools/build_gamedata/executables_dev.bat index 2007016c4..bbca70ab7 100644 --- a/code/nel/tools/build_gamedata/executables_dev.bat +++ b/code/nel/tools/build_gamedata/executables_dev.bat @@ -1,3 +1,9 @@ +title Ryzom Core: 0_setup.py (EXECUTABLES) +0_setup.py --noconf -ipj common/gamedev common/exedll common/cfg common/data_common +title Ryzom Core: 1_export.py (EXECUTABLES) +1_export.py -ipj common/gamedev common/exedll common/cfg common/data_common +title Ryzom Core: 2_build.py (EXECUTABLES) +2_build.py -ipj common/gamedev common/exedll common/cfg common/data_common title Ryzom Core: 3_install.py (EXECUTABLES) 3_install.py -ipj common/gamedev common/exedll common/cfg common/data_common title Ryzom Core: b1_client_dev.py diff --git a/code/nel/tools/build_gamedata/processes/sign/0_setup.py b/code/nel/tools/build_gamedata/processes/sign/0_setup.py new file mode 100644 index 000000000..418fcb15e --- /dev/null +++ b/code/nel/tools/build_gamedata/processes/sign/0_setup.py @@ -0,0 +1,64 @@ +#!/usr/bin/python +# +# \file 0_setup.py +# \brief setup sign +# \date 2010-05-24 13:42GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Setup sign +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# 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 +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +import time, sys, os, shutil, subprocess, distutils.dir_util +sys.path.append("../../configuration") + +if os.path.isfile("log.log"): + os.remove("log.log") +log = open("log.log", "w") +from scripts import * +from buildsite import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Setup sign") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +# Setup source directories +printLog(log, ">>> Setup source directories <<<") + +# Setup build directories +printLog(log, ">>> Setup export directories <<<") +mkPath(log, ExportBuildDirectory + "/" + UnsignedExeDllDirectory) + +# Setup build directories +printLog(log, ">>> Setup build directories <<<") +mkPath(log, ExportBuildDirectory + "/" + SignedExeDllDirectory) + +# Setup client directories +printLog(log, ">>> Setup client directories <<<") +mkPath(log, InstallDirectory + "/" + SignInstallDirectory) + +log.close() + + +# end of file diff --git a/code/nel/tools/build_gamedata/processes/sign/1_export.py b/code/nel/tools/build_gamedata/processes/sign/1_export.py new file mode 100644 index 000000000..352860bda --- /dev/null +++ b/code/nel/tools/build_gamedata/processes/sign/1_export.py @@ -0,0 +1,57 @@ +#!/usr/bin/python +# +# \file 1_export.py +# \brief Export sign +# \date 2010-05-24 13:42GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Export sign +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# 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 +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +import time, sys, os, shutil, subprocess, distutils.dir_util +sys.path.append("../../configuration") + +if os.path.isfile("log.log"): + os.remove("log.log") +log = open("log.log", "w") +from scripts import * +from buildsite import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Export sign") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +mkPath(log, ExportBuildDirectory + "/" + UnsignedExeDllDirectory) +for file in SignExeDllFiles: + printLog(log, str(WindowsExeDllCfgDirectories)) + printLog(log, file) + filePath = findFileMultiDir(log, WindowsExeDllCfgDirectories, file) + if (filePath != ""): + copyFileIfNeeded(log, filePath, ExportBuildDirectory + "/" + UnsignedExeDllDirectory + "/" + os.path.basename(file)) + +log.close() + + +# end of file diff --git a/code/nel/tools/build_gamedata/processes/sign/2_build.py b/code/nel/tools/build_gamedata/processes/sign/2_build.py new file mode 100644 index 000000000..c08049538 --- /dev/null +++ b/code/nel/tools/build_gamedata/processes/sign/2_build.py @@ -0,0 +1,61 @@ +#!/usr/bin/python +# +# \file 2_build.py +# \brief Build sign +# \date 2010-05-24 13:42GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Build sign +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# 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 +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +import time, sys, os, shutil, subprocess, distutils.dir_util +sys.path.append("../../configuration") + +if os.path.isfile("log.log"): + os.remove("log.log") +log = open("log.log", "w") +from scripts import * +from buildsite import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Build sign") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +if SignToolSha1 != "": + unsignedDirectory = ExportBuildDirectory + "/" + UnsignedExeDllDirectory + signedDirectory = ExportBuildDirectory + "/" + SignedExeDllDirectory + mkPath(log, unsignedDirectory) + mkPath(log, signedDirectory) + unsignedFiles = os.listdir(unsignedDirectory) + for fileName in unsignedFiles: + if (fileName != ".svn" and fileName != ".." and fileName != "." and fileName != "*.*"): + if needUpdateLogRemoveDest(log, unsignedDirectory + "/" + fileName, signedDirectory + "/" + fileName): + shutil.copy(unsignedDirectory + "/" + fileName, signedDirectory + "/" + fileName) + subprocess.call([ SignToolExecutable, "sign", "/sha1", SignToolSha1, "/t", SignToolTimestamp, signedDirectory + "/" + fileName ]) + +log.close() + + +# end of file diff --git a/code/nel/tools/build_gamedata/processes/sign/3_install.py b/code/nel/tools/build_gamedata/processes/sign/3_install.py new file mode 100644 index 000000000..b537da92d --- /dev/null +++ b/code/nel/tools/build_gamedata/processes/sign/3_install.py @@ -0,0 +1,58 @@ +#!/usr/bin/python +# +# \file 3_install.py +# \brief Install sign +# \date 2010-05-24 13:42GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Install sign +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# 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 +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +import time, sys, os, shutil, subprocess, distutils.dir_util +sys.path.append("../../configuration") + +if os.path.isfile("log.log"): + os.remove("log.log") +log = open("log.log", "w") +from scripts import * +from buildsite import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Install sign") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +srcDir = ExportBuildDirectory + "/" + SignedExeDllDirectory +if SignToolSha1 == "": + srcDir = ExportBuildDirectory + "/" + UnsignedExeDllDirectory +mkPath(log, srcDir) +destDir = InstallDirectory + "/" + SignInstallDirectory +mkPath(log, destDir) +copyFilesNoTreeIfNeeded(log, srcDir, destDir) + +printLog(log, "") +log.close() + + +# end of file From 3475b3046a245aa13193ab2eb924538718dc1cb6 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Fri, 15 Nov 2019 14:16:08 +0800 Subject: [PATCH 072/236] Fix dependency --- code/nel/src/sound/audio_mixer_user.cpp | 62 ++++++++++++------------- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/code/nel/src/sound/audio_mixer_user.cpp b/code/nel/src/sound/audio_mixer_user.cpp index 0f3ff1110..c7fd988bd 100644 --- a/code/nel/src/sound/audio_mixer_user.cpp +++ b/code/nel/src/sound/audio_mixer_user.cpp @@ -974,37 +974,6 @@ void CAudioMixerUser::buildSampleBankList() CPath::addSearchPath(sbp); } -/// Build the sound bank packed sheets file from georges sound sheet files with .sound extension in the search path, and return the path to the written file. -std::string UAudioMixer::buildSoundBank(const std::string &packedSheetDir) -{ - CGroupControllerRoot *tempRoot = NULL; - if (!CGroupControllerRoot::isInitialized()) - tempRoot = new CGroupControllerRoot(); - std::string dir = CPath::standardizePath(packedSheetDir, true); - CSoundBank *soundBank = new CSoundBank(); - soundBank->load(dir, true); - delete soundBank; - delete tempRoot; - return dir + "sounds.packed_sheets"; -} - -/// Build the cluster sound_group sheets. -std::string UAudioMixer::buildClusteredSoundGroupSheets(const std::string &packedSheetDir) -{ - std::string dir = CPath::standardizePath(packedSheetDir, true); - CClusteredSound::buildSheets(dir); - return dir + "sound_groups.packed_sheets"; -} - -/// Build the user var binding sheets. -std::string UAudioMixer::buildUserVarBindingSheets(const std::string &packedSheetDir) -{ - std::string dir = CPath::standardizePath(packedSheetDir, true); - std::map container; - ::loadForm("user_var_binding", dir + "user_var_binding.packed_sheets", container, true, false); - return dir + "user_var_binding.packed_sheets"; -} - void CAudioMixerUser::setBackgroundFlagName(uint flagIndex, const std::string &flagName) { if (flagIndex < TBackgroundFlags::NB_BACKGROUND_FLAGS) @@ -1144,6 +1113,37 @@ void CAudioMixerUser::initUserVar() } +/// Build the sound bank packed sheets file from georges sound sheet files with .sound extension in the search path, and return the path to the written file. +std::string UAudioMixer::buildSoundBank(const std::string &packedSheetDir) +{ + CGroupControllerRoot *tempRoot = NULL; + if (!CGroupControllerRoot::isInitialized()) + tempRoot = new CGroupControllerRoot(); + std::string dir = CPath::standardizePath(packedSheetDir, true); + CSoundBank *soundBank = new CSoundBank(); + soundBank->load(dir, true); + delete soundBank; + delete tempRoot; + return dir + "sounds.packed_sheets"; +} + +/// Build the cluster sound_group sheets. +std::string UAudioMixer::buildClusteredSoundGroupSheets(const std::string &packedSheetDir) +{ + std::string dir = CPath::standardizePath(packedSheetDir, true); + CClusteredSound::buildSheets(dir); + return dir + "sound_groups.packed_sheets"; +} + +/// Build the user var binding sheets. +std::string UAudioMixer::buildUserVarBindingSheets(const std::string &packedSheetDir) +{ + std::string dir = CPath::standardizePath(packedSheetDir, true); + std::map container; + ::loadForm("user_var_binding", dir + "user_var_binding.packed_sheets", container, true, false); + return dir + "user_var_binding.packed_sheets"; +} + // ****************************************************************** void CAudioMixerUser::CControledSources::serial(NLMISC::IStream &s) From bbee8579c7b8bac92c24bf743a3ce9ad6ed3ec53 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Sat, 16 Nov 2019 14:37:05 +0800 Subject: [PATCH 073/236] Login using https --- code/ryzom/client/client_default.cfg | 21 +-- code/ryzom/client/src/client.cpp | 4 + code/ryzom/client/src/client_cfg.cpp | 19 +-- code/ryzom/client/src/http_client_curl.cpp | 2 +- .../src/interface_v3/action_handler_ui.cpp | 2 +- .../src/interface_v3/group_html_webig.cpp | 2 +- code/ryzom/client/src/login.cpp | 127 +++++++++++++++++- code/ryzom/client/src/login.h | 4 +- code/ryzom/client/src/net_manager.cpp | 2 +- 9 files changed, 156 insertions(+), 27 deletions(-) diff --git a/code/ryzom/client/client_default.cfg b/code/ryzom/client/client_default.cfg index 7431807cf..b99c5d154 100644 --- a/code/ryzom/client/client_default.cfg +++ b/code/ryzom/client/client_default.cfg @@ -39,14 +39,15 @@ Gamma_max = 1.0; // NETWORK // ///////////// -Application = { "ryzom_live", "./client_ryzom_r.exe", "./" }; +Application = { "open", "./client_ryzom_r.exe", "./" }; BackgroundDownloader = 0; -StartupHost = "shard.ryzom.com:40916"; +StartupHost = "https://open.ryzom.dev"; StartupPage = "/login/r2_login.php"; +StartupVerify = 1; -ConditionsTermsURL = "http://app.ryzom.com/app_forum/index.php?page=topic/view/21885/1&post148782=en#1"; -LoginSupportURL = "http://app.ryzom.com/app_forum/index.php?page=topic/view/22047/1&post149889=en#1"; -NamingPolicyURL = "http://app.ryzom.com/app_forum/index.php?page=topic/view/21885/1&post148784=en#3"; +ConditionsTermsURL = "http://www.gnu.org/licenses/agpl-3.0.html"; +LoginSupportURL = "https://open.ryzom.dev/ams/"; +NamingPolicyURL = "https://open.ryzom.dev/ams/"; // Full path and filename where cURL can find certificate bundle file // cacert.pem file can be downloaded from https://curl.haxx.se/docs/caextract.html @@ -84,11 +85,15 @@ XMLOutGameInterfaceFiles = { "out_v2_keys.xml", }; +TexturesInterface = "texture_interfaces_v3"; +TexturesInterfaceDXTC = "texture_interfaces_dxtc"; + // The ligo primitive class file LigoPrimitiveClass = "world_editor_classes.xml"; VerboseLog = 1; + /////////// // MOUSE // /////////// @@ -604,11 +609,11 @@ ChannelIgnoreFilter = // interval in minutes for webig notify thread to run WebIgNotifInterval = 10; -WebIgMainDomain = "app.ryzom.com"; +WebIgMainDomain = "https://open.ryzom.dev"; WebIgTrustedDomains = { - "api.ryzom.com", "app.ryzom.com" + "open.ryzom.dev" }; -PatchletUrl = "http://app.ryzom.com/app_patchlet/index.php?patch=preload"; +PatchletUrl = "https://open.ryzom.dev/app_patchlet/index.php?patch=preload"; SelectedSlot = 0; diff --git a/code/ryzom/client/src/client.cpp b/code/ryzom/client/src/client.cpp index 37cb36279..69559e0e8 100644 --- a/code/ryzom/client/src/client.cpp +++ b/code/ryzom/client/src/client.cpp @@ -317,6 +317,10 @@ int main(int argc, char **argv) LoginCustomParameters = "&steam_auth_session_ticket=" + steamClient.getAuthSessionTicket(); #endif +#if !FINAL_VERSION + LoginCustomParameters += "&dbg=1"; +#endif + // initialize patch manager and set the ryzom full path, before it's used CPatchManager *pPM = CPatchManager::getInstance(); pPM->setRyzomFilename(Args.getProgramPath() + Args.getProgramName()); diff --git a/code/ryzom/client/src/client_cfg.cpp b/code/ryzom/client/src/client_cfg.cpp index 7f0222088..bfd6452ee 100644 --- a/code/ryzom/client/src/client_cfg.cpp +++ b/code/ryzom/client/src/client_cfg.cpp @@ -330,9 +330,9 @@ CClientConfig::CClientConfig() TexturesLoginInterface.push_back("texture_interfaces_v3_login"); DisplayAccountButtons = true; - CreateAccountURL = "https://account.ryzom.com/signup/from_client.php"; - EditAccountURL = "https://account.ryzom.com/payment_profile/index.php"; - ForgetPwdURL = "https://account.ryzom.com/payment_profile/lost_secure_password.php"; + CreateAccountURL = "https://open.ryzom.dev/ams/"; + EditAccountURL = "https://open.ryzom.dev/ams/"; + ForgetPwdURL = "https://open.ryzom.dev/ams/"; Position = CVector(0.f, 0.f, 0.f); // Default Position. Heading = CVector(0.f, 1.f, 0.f); // Default Heading. EyesHeight = 1.5f; // Default User Eyes Height. @@ -428,15 +428,15 @@ CClientConfig::CClientConfig() PatchletUrl.clear(); PatchVersion.clear(); - WebIgMainDomain = "atys.ryzom.com"; - WebIgTrustedDomains.push_back(WebIgMainDomain); + WebIgMainDomain = "https://open.ryzom.dev"; + WebIgTrustedDomains.push_back("open.ryzom.dev"); WebIgNotifInterval = 10; // time in minutes CurlMaxConnections = 5; CurlCABundle.clear(); - RingReleaseNotePath = "http://" + WebIgMainDomain + "/releasenotes_ring/index.php"; - ReleaseNotePath = "http://" + WebIgMainDomain + "/releasenotes/index.php"; + RingReleaseNotePath = WebIgMainDomain + "/releasenotes_ring/index.php"; + ReleaseNotePath = WebIgMainDomain + "/releasenotes/index.php"; /////////////// @@ -452,7 +452,7 @@ CClientConfig::CClientConfig() SoundOn = true; // Default is with sound. DriverSound = SoundDrvAuto; SoundForceSoftwareBuffer = true; - SoundOutGameMusic = "Main Menu Loop.ogg"; + SoundOutGameMusic = "main menu loop.ogg"; SoundSFXVolume = 1.f; SoundGameMusicVolume = 1.f; SoundTPFade = 500; @@ -1093,6 +1093,9 @@ void CClientConfig::setValues() /////////// // WEBIG // READ_STRING_FV(WebIgMainDomain); + if (ClientCfg.WebIgMainDomain.find("http://") == std::string::npos + || ClientCfg.WebIgMainDomain.find("https://") == std::string::npos) + ClientCfg.WebIgMainDomain = "http://" + ClientCfg.WebIgMainDomain; READ_STRINGVECTOR_FV(WebIgTrustedDomains); READ_INT_FV(WebIgNotifInterval); READ_INT_FV(CurlMaxConnections); diff --git a/code/ryzom/client/src/http_client_curl.cpp b/code/ryzom/client/src/http_client_curl.cpp index 16436516b..c27672489 100644 --- a/code/ryzom/client/src/http_client_curl.cpp +++ b/code/ryzom/client/src/http_client_curl.cpp @@ -63,7 +63,7 @@ bool CCurlHttpClient::authenticate(const std::string &user, const std::string &p return true; } -static const std::string CAFilename = "ssl_ca_cert.pem"; // this is the certificate "Thawte Server CA" +static const std::string CAFilename = "cacert.pem"; // https://curl.haxx.se/docs/caextract.html // *************************************************************************** bool CCurlHttpClient::verifyServer(bool verify) diff --git a/code/ryzom/client/src/interface_v3/action_handler_ui.cpp b/code/ryzom/client/src/interface_v3/action_handler_ui.cpp index 68b55076e..bf83ddce1 100644 --- a/code/ryzom/client/src/interface_v3/action_handler_ui.cpp +++ b/code/ryzom/client/src/interface_v3/action_handler_ui.cpp @@ -416,7 +416,7 @@ class CAHUIShowHide : public IActionHandler nlwarning("%s is not a group html", window.c_str()); return; } - pGH->setURL("http://"+ClientCfg.WebIgMainDomain+"/index.php?app="+webapp); + pGH->setURL(ClientCfg.WebIgMainDomain + "/index.php?app=" + webapp); } } else diff --git a/code/ryzom/client/src/interface_v3/group_html_webig.cpp b/code/ryzom/client/src/interface_v3/group_html_webig.cpp index 8f5c6da01..11fe6c6c5 100644 --- a/code/ryzom/client/src/interface_v3/group_html_webig.cpp +++ b/code/ryzom/client/src/interface_v3/group_html_webig.cpp @@ -267,7 +267,7 @@ public: uint c = 0; while (_Running) { - string url = "https://"+domain+"/index.php?app=notif&format=lua&rnd="+randomString(); + string url = domain + "/index.php?app=notif&format=lua&rnd=" + randomString(); addWebIGParams(url, true); get(url); diff --git a/code/ryzom/client/src/login.cpp b/code/ryzom/client/src/login.cpp index 1eb6ec867..79381d8f2 100644 --- a/code/ryzom/client/src/login.cpp +++ b/code/ryzom/client/src/login.cpp @@ -155,7 +155,8 @@ CLoginStateMachine LoginSM; bool CStartupHttpClient::connectToLogin() { - return connect(ClientCfg.ConfigFile.getVar("StartupHost").asString(0)); + return connect(ClientCfg.ConfigFile.getVar("StartupHost").asString(0)) + && verifyServer(ClientCfg.ConfigFile.getVar("StartupVerify").asBool(0)); } CStartupHttpClient HttpClient; @@ -2825,7 +2826,36 @@ string checkLogin(const string &login, const string &password, const string &cli if(res.empty()) return "Empty answer from server (error code 62)"; - if(res[0] == '0') + size_t first = res.find("\n\n"); + if (first == std::string::npos) + { + first = res.find("\r\r"); + if (first == std::string::npos) + { + first = res.find("\r\n\r\n"); + if (first != std::string::npos) + { + res = res.substr(first + 4); + } + } + else + { + res = res.substr(first + 2); + } + } + else + { + res = res.substr(first + 2); + } + + nldebug("res1: %s", res.c_str()); + + if (res[0] == 'H') + { + nlwarning("missing response body: %s", res.c_str()); + return "missing response body (error code 64)"; + } + else if(res[0] == '0') { // server returns an error nlwarning("server error: %s", res.substr(2).c_str()); @@ -2878,7 +2908,36 @@ string checkLogin(const string &login, const string &password, const string &cli if(res.empty()) return "Empty answer from server (error code 4)"; - if(res[0] == '0') + size_t first = res.find("\n\n"); + if (first == std::string::npos) + { + first = res.find("\r\r"); + if (first == std::string::npos) + { + first = res.find("\r\n\r\n"); + if (first != std::string::npos) + { + res = res.substr(first + 4); + } + } + else + { + res = res.substr(first + 2); + } + } + else + { + res = res.substr(first + 2); + } + + nldebug("res2: %s", res.c_str()); + + if (res[0] == 'H') + { + nlwarning("missing response body: %s", res.c_str()); + return "missing response body (error code 65)"; + } + else if(res[0] == '0') { // server returns an error nlwarning("server error: %s", res.substr(2).c_str()); @@ -2960,7 +3019,36 @@ string checkLogin(const string &login, const string &password, const string &cli if(res.empty()) return "Empty answer from server (error code 4)"; - if(res[0] == '0') + size_t first = res.find("\n\n"); + if (first == std::string::npos) + { + first = res.find("\r\r"); + if (first == std::string::npos) + { + first = res.find("\r\n\r\n"); + if (first != std::string::npos) + { + res = res.substr(first + 4); + } + } + else + { + res = res.substr(first + 2); + } + } + else + { + res = res.substr(first + 2); + } + + nldebug("res2: %s", res.c_str()); + + if (res[0] == 'H') + { + nlwarning("missing response body: %s", res.c_str()); + return "missing response body (error code 66)"; + } + else if(res[0] == '0') { // server returns an error nlwarning("server error: %s", res.substr(2).c_str()); @@ -3065,7 +3153,36 @@ string selectShard(uint32 shardId, string &cookie, string &addr) if(res.empty()) return "Empty result (error code 13)"; - if(res[0] == '0') + size_t first = res.find("\n\n"); + if (first == std::string::npos) + { + first = res.find("\r\r"); + if (first == std::string::npos) + { + first = res.find("\r\n\r\n"); + if (first != std::string::npos) + { + res = res.substr(first + 4); + } + } + else + { + res = res.substr(first + 2); + } + } + else + { + res = res.substr(first + 2); + } + + nldebug("res2: %s", res.c_str()); + + if (res[0] == 'H') + { + nlwarning("missing response body: %s", res.c_str()); + return "missing response body (error code 66)"; + } + else if(res[0] == '0') { // server returns an error nlwarning("server error: %s", res.substr(2).c_str()); diff --git a/code/ryzom/client/src/login.h b/code/ryzom/client/src/login.h index 2c6e8c960..fa4f041c1 100644 --- a/code/ryzom/client/src/login.h +++ b/code/ryzom/client/src/login.h @@ -19,7 +19,7 @@ #define CL_LOGIN_H #include "nel/misc/types_nl.h" -#include "game_share/http_client.h" +#include "http_client_curl.h" #include #include @@ -74,7 +74,7 @@ extern sint32 ShardSelected; /* * HTTP client preconfigured to connect to the startup login host */ -class CStartupHttpClient : public CHttpClient +class CStartupHttpClient : public CCurlHttpClient { public: diff --git a/code/ryzom/client/src/net_manager.cpp b/code/ryzom/client/src/net_manager.cpp index 7bdcfb5ed..d562e5ea4 100644 --- a/code/ryzom/client/src/net_manager.cpp +++ b/code/ryzom/client/src/net_manager.cpp @@ -3292,7 +3292,7 @@ private: if(i != digitMaxEnd) { ucstring web_app = contentStr.substr(digitStart, i-digitStart); - contentStr = ucstring("http://"+ClientCfg.WebIgMainDomain+"/")+web_app+ucstring("/index.php?")+contentStr.substr(i+1); + contentStr = ucstring(ClientCfg.WebIgMainDomain + "/") + web_app + ucstring("/index.php?") + contentStr.substr((size_t)i + 1); } else { From c330067f194b6ff2ed8dc4faff4bd2f651f67c23 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Sun, 17 Nov 2019 06:32:21 +0800 Subject: [PATCH 074/236] Set patch urls --- code/ryzom/client/client_default.cfg | 7 +++++-- code/ryzom/tools/client/client_patcher/main.cpp | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/code/ryzom/client/client_default.cfg b/code/ryzom/client/client_default.cfg index b99c5d154..501e0097d 100644 --- a/code/ryzom/client/client_default.cfg +++ b/code/ryzom/client/client_default.cfg @@ -46,8 +46,11 @@ StartupPage = "/login/r2_login.php"; StartupVerify = 1; ConditionsTermsURL = "http://www.gnu.org/licenses/agpl-3.0.html"; -LoginSupportURL = "https://open.ryzom.dev/ams/"; -NamingPolicyURL = "https://open.ryzom.dev/ams/"; +LoginSupportURL = "https://open.ryzom.dev/ams/"; +NamingPolicyURL = "https://open.ryzom.dev/ams/"; +ForgetPwdURL = "https://open.ryzom.dev/ams/"; +InstallWebPage = "https://open.ryzom.dev/ams/"; +StreamedPackageHosts = { "https://cdn.ryzom.dev/open/stream/" }; // Full path and filename where cURL can find certificate bundle file // cacert.pem file can be downloaded from https://curl.haxx.se/docs/caextract.html diff --git a/code/ryzom/tools/client/client_patcher/main.cpp b/code/ryzom/tools/client/client_patcher/main.cpp index fc440abf4..0c1a13832 100644 --- a/code/ryzom/tools/client/client_patcher/main.cpp +++ b/code/ryzom/tools/client/client_patcher/main.cpp @@ -191,7 +191,7 @@ struct CClientPatcherTranslations : public NLMISC::CI18N::ILoadProxy }; // hardcoded URL to not depend on external files -static const std::string PatchUrl = "http://dl.ryzom.com/patch_live"; +static const std::string PatchUrl = "https://cdn.ryzom.dev/open/patch"; int main(int argc, char *argv[]) { From 830803cfe9d83b3b1a86b640dda48925c7ffbe24 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Sun, 17 Nov 2019 16:36:42 +0800 Subject: [PATCH 075/236] Debug logs should not be disabled in DEV client... --- code/ryzom/client/src/client.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/ryzom/client/src/client.cpp b/code/ryzom/client/src/client.cpp index 69559e0e8..2dbdced45 100644 --- a/code/ryzom/client/src/client.cpp +++ b/code/ryzom/client/src/client.cpp @@ -158,8 +158,8 @@ int main(int argc, char **argv) // init the Nel context CApplicationContext *appContext = new CApplicationContext; - // disable nldebug messages in logs in Release -#ifdef NL_RELEASE + // disable nldebug messages in logs in FV +#if FINAL_VERSION && defined(NL_RELEASE) DisableNLDebug = true; #endif From 057b3ab11b8860a6b85a9e0e9c0815cb4278d298 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Mon, 18 Nov 2019 07:13:56 +0800 Subject: [PATCH 076/236] Enable callstack logging --- code/nel/src/misc/debug.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/nel/src/misc/debug.cpp b/code/nel/src/misc/debug.cpp index 260834200..71da430de 100644 --- a/code/nel/src/misc/debug.cpp +++ b/code/nel/src/misc/debug.cpp @@ -1048,9 +1048,9 @@ void getCallStack(std::string &result, sint skipNFirst) } -void getCallStackAndLog (string &result, sint /* skipNFirst */) +void getCallStackAndLog (string &result, sint skipNFirst) { - //getCallStack(result, skipNFirst); + getCallStack(result, skipNFirst); //#ifdef NL_OS_WINDOWS // try // { From 111562822d978568e794754db26aad4bc9c50a16 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Mon, 18 Nov 2019 09:31:46 +0800 Subject: [PATCH 077/236] Add handy startsWith string utility function --- code/nel/include/nel/misc/string_common.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/code/nel/include/nel/misc/string_common.h b/code/nel/include/nel/misc/string_common.h index bb972a4eb..7366a0693 100644 --- a/code/nel/include/nel/misc/string_common.h +++ b/code/nel/include/nel/misc/string_common.h @@ -257,6 +257,20 @@ inline bool fromString(const std::string &str, uint &val) { return sscanf(str.c_ inline bool fromString(const std::string &str, sint &val) { return sscanf(str.c_str(), "%d", &val) == 1; } #endif // NL_COMP_VC6 +inline bool startsWith(const char *str, const char *prefix) +{ + for (int i = 0;; ++i) + { + if (str[i] != prefix[i] || str[i] == '\0') + { + return prefix[i] == '\0'; + } + } +} + +inline bool startsWith(const std::string &str, const char *prefix) { return startsWith(str.c_str(), prefix); } +inline bool startsWith(const std::string &str, const std::string &prefix) { return startsWith(str.c_str(), prefix.c_str()); } + // Convert local codepage to UTF-8 // On Windows, the local codepage is undetermined // On Linux, the local codepage is always UTF-8 (no-op) From edb3ba6002330d8569d34fa3ec1e45771202a700 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Tue, 19 Nov 2019 12:45:34 +0800 Subject: [PATCH 078/236] Patch over https --- .../nel/{gui => misc}/curl_certificates.h | 4 +- .../include/nel/misc}/http_client_curl.h | 22 +++++--- code/nel/src/gui/group_html.cpp | 2 +- .../src/{gui => misc}/curl_certificates.cpp | 20 +++++-- .../src => nel/src/misc}/http_client_curl.cpp | 22 +++++--- code/ryzom/client/src/init_main_loop.cpp | 8 +++ .../src/interface_v3/group_html_webig.cpp | 4 +- .../src/interface_v3/interface_manager.cpp | 4 +- code/ryzom/client/src/login.cpp | 2 +- code/ryzom/client/src/login.h | 6 +- code/ryzom/client/src/login_patch.cpp | 55 +++++++++++-------- 11 files changed, 96 insertions(+), 53 deletions(-) rename code/nel/include/nel/{gui => misc}/curl_certificates.h (97%) rename code/{ryzom/client/src => nel/include/nel/misc}/http_client_curl.h (75%) rename code/nel/src/{gui => misc}/curl_certificates.cpp (97%) rename code/{ryzom/client/src => nel/src/misc}/http_client_curl.cpp (92%) diff --git a/code/nel/include/nel/gui/curl_certificates.h b/code/nel/include/nel/misc/curl_certificates.h similarity index 97% rename from code/nel/include/nel/gui/curl_certificates.h rename to code/nel/include/nel/misc/curl_certificates.h index 9d5ad4855..778074ca1 100644 --- a/code/nel/include/nel/gui/curl_certificates.h +++ b/code/nel/include/nel/misc/curl_certificates.h @@ -22,7 +22,7 @@ // forward declaration to avoid curl.h inclusion everywhere typedef void CURL; -namespace NLGUI +namespace NLMISC { class CCurlCertificates { @@ -36,3 +36,5 @@ namespace NLGUI } // namespace #endif + +/* end of file */ diff --git a/code/ryzom/client/src/http_client_curl.h b/code/nel/include/nel/misc/http_client_curl.h similarity index 75% rename from code/ryzom/client/src/http_client_curl.h rename to code/nel/include/nel/misc/http_client_curl.h index 2ba58746e..b282c2b70 100644 --- a/code/ryzom/client/src/http_client_curl.h +++ b/code/nel/include/nel/misc/http_client_curl.h @@ -20,10 +20,12 @@ #include "nel/misc/types_nl.h" #include +namespace NLMISC +{ /** - * HTTP client with SSL capabilities - */ + * HTTP client with SSL capabilities + */ class CCurlHttpClient { public: @@ -41,19 +43,19 @@ public: bool verifyServer(bool verify); /// Send a 'get' request - bool sendGet(const std::string &url, const std::string& params=std::string(), bool verbose=false); + bool sendGet(const std::string &url, const std::string ¶ms = std::string(), bool verbose = false); /// Send a 'get' request with a cookie - bool sendGetWithCookie(const std::string &url, const std::string &name, const std::string &value, const std::string& params=std::string(), bool verbose=false); + bool sendGetWithCookie(const std::string &url, const std::string &name, const std::string &value, const std::string ¶ms = std::string(), bool verbose = false); /// Send a 'post' request - bool sendPost(const std::string &url, const std::string& params=std::string(), bool verbose=false); + bool sendPost(const std::string &url, const std::string ¶ms = std::string(), bool verbose = false); /// Send a 'post' request with a cookie - bool sendPostWithCookie(const std::string &url, const std::string &name, const std::string &value, const std::string& params=std::string(), bool verbose=false); + bool sendPostWithCookie(const std::string &url, const std::string &name, const std::string &value, const std::string ¶ms = std::string(), bool verbose = false); /// Wait for a response - bool receive(std::string &res, bool verbose=false); + bool receive(std::string &res, bool verbose = false); /// Disconnect if connected (otherwise does nothing) void disconnect(); @@ -61,7 +63,7 @@ public: protected: /// Helper - bool sendRequest(const std::string& methodWB, const std::string &url, const std::string &cookieName, const std::string &cookieValue, const std::string& postParams, bool verbose); + bool sendRequest(const std::string &methodWB, const std::string &url, const std::string &cookieName, const std::string &cookieValue, const std::string &postParams, bool verbose); /// Helper void pushReceivedData(uint8 *buffer, uint size); @@ -69,7 +71,7 @@ protected: static size_t writeDataFromCurl(void *buffer, size_t size, size_t nmemb, void *pHttpClient); private: - void* _CurlStruct; // void* to prevent including curl.h in a header file + void *_CurlStruct; // void* to prevent including curl.h in a header file std::vector _ReceiveBuffer; std::string _Auth; // must be kept here because curl only stores the char pointer @@ -77,6 +79,8 @@ private: extern CCurlHttpClient CurlHttpClient; +} + #endif // NL_HTTP_CLIENT_H /* End of http_client_curl.h */ diff --git a/code/nel/src/gui/group_html.cpp b/code/nel/src/gui/group_html.cpp index 1f739cc5f..ce719f4b0 100644 --- a/code/nel/src/gui/group_html.cpp +++ b/code/nel/src/gui/group_html.cpp @@ -47,7 +47,7 @@ #include "nel/gui/url_parser.h" #include "nel/gui/http_cache.h" #include "nel/gui/http_hsts.h" -#include "nel/gui/curl_certificates.h" +#include "nel/misc/curl_certificates.h" #include "nel/gui/html_parser.h" #include "nel/gui/html_element.h" #include "nel/gui/css_style.h" diff --git a/code/nel/src/gui/curl_certificates.cpp b/code/nel/src/misc/curl_certificates.cpp similarity index 97% rename from code/nel/src/gui/curl_certificates.cpp rename to code/nel/src/misc/curl_certificates.cpp index dbd3005ad..9dcdc72db 100644 --- a/code/nel/src/gui/curl_certificates.cpp +++ b/code/nel/src/misc/curl_certificates.cpp @@ -14,10 +14,12 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -//#include - -#include "stdpch.h" -#include "nel/gui/curl_certificates.h" +#include "stdmisc.h" +#include +#include +#include +#include +#include #include #include @@ -25,6 +27,13 @@ #include +#ifdef NL_OS_WINDOWS +#include +#ifdef X509_NAME +#undef X509_NAME +#endif +#endif + // for compatibility with older versions #ifndef CURL_AT_LEAST_VERSION #define CURL_VERSION_BITS(x,y,z) ((x)<<16|(y)<<8|z) @@ -40,7 +49,7 @@ using namespace NLMISC; #define new DEBUG_NEW #endif -namespace NLGUI +namespace NLMISC { // // x509CertList lifetime manager @@ -385,3 +394,4 @@ namespace NLGUI }// namespace +/* end of file */ diff --git a/code/ryzom/client/src/http_client_curl.cpp b/code/nel/src/misc/http_client_curl.cpp similarity index 92% rename from code/ryzom/client/src/http_client_curl.cpp rename to code/nel/src/misc/http_client_curl.cpp index c27672489..d335716b0 100644 --- a/code/ryzom/client/src/http_client_curl.cpp +++ b/code/nel/src/misc/http_client_curl.cpp @@ -14,15 +14,15 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -#include "stdpch.h" -#include "http_client_curl.h" +#include "stdmisc.h" +#include +#include #include -#include "nel/gui/curl_certificates.h" +#include using namespace NLMISC; -using namespace NLNET; using namespace std; #ifdef DEBUG_NEW @@ -31,6 +31,8 @@ using namespace std; #define _Curl (CURL *)_CurlStruct +namespace NLMISC +{ // Ugly CURL callback size_t CCurlHttpClient::writeDataFromCurl(void *buffer, size_t size, size_t nmemb, void *pHttpClient) @@ -72,10 +74,10 @@ bool CCurlHttpClient::verifyServer(bool verify) curl_easy_setopt(_Curl, CURLOPT_SSL_VERIFYPEER, verify ? 1 : 0); // specify custom CA certs - NLGUI::CCurlCertificates::addCertificateFile(CAFilename); + CCurlCertificates::addCertificateFile(CAFilename); // if supported, use custom SSL context function to load certificates - NLGUI::CCurlCertificates::useCertificates(_Curl); + CCurlCertificates::useCertificates(_Curl); return true; } @@ -88,6 +90,11 @@ bool CCurlHttpClient::sendRequest(const std::string& methodWB, const std::string // Set URL curl_easy_setopt(_Curl, CURLOPT_URL, url.c_str()); + if (url.length() > 8 && (url[4] == 's' || url[4] == 'S')) // 01234 https + { + curl_easy_setopt(_Curl, CURLOPT_SSL_VERIFYPEER, 1L); + curl_easy_setopt(_Curl, CURLOPT_SSL_VERIFYHOST, 2L); + } // Authentication if (!_Auth.empty()) @@ -188,5 +195,6 @@ void CCurlHttpClient::disconnect() CCurlHttpClient CurlHttpClient; +} - +/* end of file */ diff --git a/code/ryzom/client/src/init_main_loop.cpp b/code/ryzom/client/src/init_main_loop.cpp index 0ecc1d095..47c11d899 100644 --- a/code/ryzom/client/src/init_main_loop.cpp +++ b/code/ryzom/client/src/init_main_loop.cpp @@ -28,6 +28,7 @@ #include "nel/misc/path.h" #include "nel/misc/sheet_id.h" #include "nel/misc/big_file.h" +#include "nel/misc/curl_certificates.h" // 3D Interface. #include "nel/3d/bloom_effect.h" #include "nel/3d/u_driver.h" @@ -187,6 +188,13 @@ struct CStatThread : public NLMISC::IRunnable curl_easy_setopt(curl, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.10) Gecko/2009042316 Firefox/3.0.10 (.NET CLR 3.5.30729)"); curl_easy_setopt(curl, CURLOPT_REFERER, string("http://www.ryzom.com/" + referer).c_str()); curl_easy_setopt(curl, CURLOPT_URL, url.c_str()); + if (url.length() > 8 && (url[4] == 's' || url[4] == 'S')) // 01234 https + { + NLMISC::CCurlCertificates::addCertificateFile("cacert.pem"); + NLMISC::CCurlCertificates::useCertificates(curl); + curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 1L); + curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 2L); + } CURLcode res = curl_easy_perform(curl); curl_easy_cleanup(curl); //curl_global_cleanup(); diff --git a/code/ryzom/client/src/interface_v3/group_html_webig.cpp b/code/ryzom/client/src/interface_v3/group_html_webig.cpp index 11fe6c6c5..5ec107bcb 100644 --- a/code/ryzom/client/src/interface_v3/group_html_webig.cpp +++ b/code/ryzom/client/src/interface_v3/group_html_webig.cpp @@ -30,7 +30,7 @@ #include "../connection.h" #include -#include "nel/gui/curl_certificates.h" +#include "nel/misc/curl_certificates.h" using namespace std; using namespace NLMISC; @@ -188,7 +188,7 @@ public: curl_easy_setopt(Curl, CURLOPT_FOLLOWLOCATION, 1); curl_easy_setopt(Curl, CURLOPT_WRITEFUNCTION, writeDataFromCurl); - NLGUI::CCurlCertificates::useCertificates(Curl); + NLMISC::CCurlCertificates::useCertificates(Curl); } ~CWebigNotificationThread() diff --git a/code/ryzom/client/src/interface_v3/interface_manager.cpp b/code/ryzom/client/src/interface_v3/interface_manager.cpp index 16377ac94..d01e89a24 100644 --- a/code/ryzom/client/src/interface_v3/interface_manager.cpp +++ b/code/ryzom/client/src/interface_v3/interface_manager.cpp @@ -113,7 +113,7 @@ #include "nel/gui/lua_helper.h" using namespace NLGUI; #include "nel/gui/lua_ihm.h" -#include "nel/gui/curl_certificates.h" +#include "nel/misc/curl_certificates.h" #include "lua_ihm_ryzom.h" @@ -480,7 +480,7 @@ CInterfaceManager::CInterfaceManager() if (!ClientCfg.CurlCABundle.empty()) { // specify custom CA certs, lookup will be made in this function - NLGUI::CCurlCertificates::addCertificateFile(ClientCfg.CurlCABundle); + NLMISC::CCurlCertificates::addCertificateFile(ClientCfg.CurlCABundle); } NLGUI::CDBManager::getInstance()->resizeBanks( NB_CDB_BANKS ); diff --git a/code/ryzom/client/src/login.cpp b/code/ryzom/client/src/login.cpp index 79381d8f2..eefe56188 100644 --- a/code/ryzom/client/src/login.cpp +++ b/code/ryzom/client/src/login.cpp @@ -50,7 +50,7 @@ #include "global.h" #include "input.h" #include "nel/gui/libwww.h" -#include "http_client_curl.h" +#include "nel/misc/http_client_curl.h" #include "login_progress_post_thread.h" #include "init.h" diff --git a/code/ryzom/client/src/login.h b/code/ryzom/client/src/login.h index fa4f041c1..d01f0ea8a 100644 --- a/code/ryzom/client/src/login.h +++ b/code/ryzom/client/src/login.h @@ -18,8 +18,8 @@ #ifndef CL_LOGIN_H #define CL_LOGIN_H -#include "nel/misc/types_nl.h" -#include "http_client_curl.h" +#include +#include #include #include @@ -74,7 +74,7 @@ extern sint32 ShardSelected; /* * HTTP client preconfigured to connect to the startup login host */ -class CStartupHttpClient : public CCurlHttpClient +class CStartupHttpClient : public NLMISC::CCurlHttpClient { public: diff --git a/code/ryzom/client/src/login_patch.cpp b/code/ryzom/client/src/login_patch.cpp index f4e7e237f..bde537f21 100644 --- a/code/ryzom/client/src/login_patch.cpp +++ b/code/ryzom/client/src/login_patch.cpp @@ -48,6 +48,7 @@ #include "nel/misc/big_file.h" #include "nel/misc/i18n.h" #include "nel/misc/cmd_args.h" +#include "nel/misc/curl_certificates.h" #include "game_share/bg_downloader_msg.h" @@ -239,12 +240,10 @@ void CPatchManager::init(const std::vector& patchURIs, const std::s cf = &ClientCfg.ConfigFile; #endif - std::string appName = "ryzom_live"; - - if (cf->getVarPtr("Application")) - { - appName = cf->getVar("Application").asString(0); - } + // App name matches Domain on the SQL server + std::string appName = cf->getVarPtr("Application") + ? cf->getVar("Application").asString(0) + : "default"; std::string versionFileName = appName + ".version"; getServerFile(versionFileName); @@ -252,7 +251,7 @@ void CPatchManager::init(const std::vector& patchURIs, const std::s // ok, we have the file, extract version number (aka build number) and the // version name if present - CIFile versionFile(ClientPatchPath+versionFileName); + CIFile versionFile(ClientPatchPath + versionFileName); char buffer[1024]; versionFile.getline(buffer, 1024); CSString line(buffer); @@ -266,8 +265,12 @@ void CPatchManager::init(const std::vector& patchURIs, const std::s } #endif - ServerVersion = line.firstWord(true); - VersionName = line.firstWord(true); + // Use the version specified in this file, if the file does not contain an asterisk + if (line[0] != '*') + { + ServerVersion = line.firstWord(true); + VersionName = line.firstWord(true); + } // force the R2ServerVersion R2ServerVersion = ServerVersion; @@ -1258,19 +1261,18 @@ void CPatchManager::readDescFile(sint32 nVersion) if (foundPlatformPatchCategory) { - std::vector forceRemovePatchCategories; + std::set forceRemovePatchCategories; // only download binaries for current platform - forceRemovePatchCategories.push_back("main_exedll"); - forceRemovePatchCategories.push_back("main_exedll_win32"); - forceRemovePatchCategories.push_back("main_exedll_win64"); - forceRemovePatchCategories.push_back("main_exedll_linux32"); - forceRemovePatchCategories.push_back("main_exedll_linux64"); - forceRemovePatchCategories.push_back("main_exedll_osx"); + forceRemovePatchCategories.insert("main_exedll"); + forceRemovePatchCategories.insert("main_exedll_win32"); + forceRemovePatchCategories.insert("main_exedll_win64"); + forceRemovePatchCategories.insert("main_exedll_linux32"); + forceRemovePatchCategories.insert("main_exedll_linux64"); + forceRemovePatchCategories.insert("main_exedll_osx"); // remove current platform category from remove list - forceRemovePatchCategories.erase(std::remove(forceRemovePatchCategories.begin(), - forceRemovePatchCategories.end(), platformPatchCategory), forceRemovePatchCategories.end()); + forceRemovePatchCategories.erase(platformPatchCategory); CBNPFileSet &bnpFS = const_cast(DescFile.getFiles()); @@ -1427,6 +1429,13 @@ void CPatchManager::downloadFileWithCurl (const string &source, const string &de curl_easy_setopt(curl, CURLOPT_PROGRESSFUNCTION, downloadProgressFunc); curl_easy_setopt(curl, CURLOPT_PROGRESSDATA, (void *) progress); curl_easy_setopt(curl, CURLOPT_URL, source.c_str()); + if (source.length() > 8 && (source[4] == 's' || source[4] == 'S')) // 01234 https + { + NLMISC::CCurlCertificates::addCertificateFile("cacert.pem"); + NLMISC::CCurlCertificates::useCertificates(curl); + curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 1L); + curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 2L); + } // create the local file if (NLMISC::CFile::fileExists(dest)) @@ -1525,12 +1534,14 @@ void CPatchManager::downloadFileWithCurl (const string &source, const string &de void CPatchManager::downloadFile (const string &source, const string &dest, NLMISC::IProgressCallback *progress) { // For the moment use only curl - const string sHeadHttp = toLower(source.substr(0,5)); - const string sHeadFtp = toLower(source.substr(0,4)); - const string sHeadFile = toLower(source.substr(0,5)); + const string sourceLower = toLower(source.substr(0, 6)); - if ((sHeadHttp == "http:") || (sHeadFtp == "ftp:") || (sHeadFile == "file:")) + if (startsWith(sourceLower, "http:") + || startsWith(sourceLower, "https:") + || startsWith(sourceLower, "ftp:") + || startsWith(sourceLower, "file:")) { + nldebug("Download patch file %s", source.c_str()); downloadFileWithCurl(source, dest, progress); } else From 0f59a026620482d2d569e51b946608a1e6225515 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Fri, 22 Nov 2019 21:22:45 +0800 Subject: [PATCH 079/236] Adjust continent sheet name --- .../nel/tools/build_gamedata/processes/properties/0_setup.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/code/nel/tools/build_gamedata/processes/properties/0_setup.py b/code/nel/tools/build_gamedata/processes/properties/0_setup.py index 1a0889caf..2634c4aca 100755 --- a/code/nel/tools/build_gamedata/processes/properties/0_setup.py +++ b/code/nel/tools/build_gamedata/processes/properties/0_setup.py @@ -81,6 +81,10 @@ for line in ps: ContinentPath except NameError: ContinentPath = "_invalid" + try: + ContinentSheet + except NameError: + ContinentSheet = "_invalid" try: BankTileBankName except NameError: @@ -113,6 +117,7 @@ for line in ps: newline = newline.replace("%ContinentPath%", ContinentPath) newline = newline.replace("%CommonName%", CommonName) newline = newline.replace("%CommonPath%", CommonPath) + newline = newline.replace("%ContinentSheet%", ContinentSheet) newline = newline.replace("%BankTileBankName%", BankTileBankName) newline = newline.replace("%IgLandBuildDirectory%", IgLandBuildDirectory) newline = newline.replace("%IgOtherBuildDirectory%", IgOtherBuildDirectory) From 20c339891d3581a28958afd294fd242d58b74654 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Sat, 23 Nov 2019 07:35:49 +0800 Subject: [PATCH 080/236] Continent sheet is name by default --- code/nel/tools/build_gamedata/processes/properties/0_setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/nel/tools/build_gamedata/processes/properties/0_setup.py b/code/nel/tools/build_gamedata/processes/properties/0_setup.py index 2634c4aca..b6114d5b2 100755 --- a/code/nel/tools/build_gamedata/processes/properties/0_setup.py +++ b/code/nel/tools/build_gamedata/processes/properties/0_setup.py @@ -84,7 +84,7 @@ for line in ps: try: ContinentSheet except NameError: - ContinentSheet = "_invalid" + ContinentSheet = ContinentName try: BankTileBankName except NameError: From a34541fe95484ae5c27e3d0439790c096b65cf8f Mon Sep 17 00:00:00 2001 From: kaetemi Date: Sat, 23 Nov 2019 17:54:52 +0800 Subject: [PATCH 081/236] Apply zone heightmap after weld to fix rbank build failure, ryzomclassic/#58 --- code/nel/tools/3d/CMakeLists.txt | 1 + code/nel/tools/3d/ig_elevation/CMakeLists.txt | 2 +- .../tools/3d/zone_elevation/CMakeLists.txt | 11 + .../nel/tools/3d/zone_elevation/blue_pill.ico | Bin 0 -> 3638 bytes code/nel/tools/3d/zone_elevation/main.rc | 42 ++ .../3d/zone_elevation/zone_elevation.cpp | 396 ++++++++++++++++++ code/nel/tools/build_gamedata/0_setup.py | 1 + .../build_gamedata/configuration/tools.py | 1 + .../build_gamedata/processes/zone/2_build.py | 46 +- .../nel/tools/pacs/build_rbank/build_surf.cpp | 1 + 10 files changed, 486 insertions(+), 15 deletions(-) create mode 100644 code/nel/tools/3d/zone_elevation/CMakeLists.txt create mode 100644 code/nel/tools/3d/zone_elevation/blue_pill.ico create mode 100644 code/nel/tools/3d/zone_elevation/main.rc create mode 100644 code/nel/tools/3d/zone_elevation/zone_elevation.cpp diff --git a/code/nel/tools/3d/CMakeLists.txt b/code/nel/tools/3d/CMakeLists.txt index 0b6f6540d..e6ba62e3b 100644 --- a/code/nel/tools/3d/CMakeLists.txt +++ b/code/nel/tools/3d/CMakeLists.txt @@ -32,6 +32,7 @@ IF(WITH_NEL_TOOLS) zone_ig_lighter zone_lighter zone_welder + zone_elevation shapes_exporter shape2obj zone_check_bind diff --git a/code/nel/tools/3d/ig_elevation/CMakeLists.txt b/code/nel/tools/3d/ig_elevation/CMakeLists.txt index 9c3e0fe26..6f330bc2e 100644 --- a/code/nel/tools/3d/ig_elevation/CMakeLists.txt +++ b/code/nel/tools/3d/ig_elevation/CMakeLists.txt @@ -5,7 +5,7 @@ SOURCE_GROUP("" FILES ${SRC}) ADD_EXECUTABLE(ig_elevation ${SRC}) TARGET_LINK_LIBRARIES(ig_elevation nelmisc nel3d nelligo) -NL_DEFAULT_PROPS(ig_elevation "NeL, Tools, 3D: ig_elevation") +NL_DEFAULT_PROPS(ig_elevation "NeL, Tools, 3D: IG Elevation") NL_ADD_RUNTIME_FLAGS(ig_elevation) INSTALL(TARGETS ig_elevation RUNTIME DESTINATION ${NL_BIN_PREFIX} COMPONENT tools3d) diff --git a/code/nel/tools/3d/zone_elevation/CMakeLists.txt b/code/nel/tools/3d/zone_elevation/CMakeLists.txt new file mode 100644 index 000000000..20d715e13 --- /dev/null +++ b/code/nel/tools/3d/zone_elevation/CMakeLists.txt @@ -0,0 +1,11 @@ +FILE(GLOB SRC *.cpp *.h *.rc) + +SOURCE_GROUP("" FILES ${SRC}) + +ADD_EXECUTABLE(zone_elevation ${SRC}) + +TARGET_LINK_LIBRARIES(zone_elevation nel3d nelmisc nelligo) +NL_DEFAULT_PROPS(zone_elevation "NeL, Tools, 3D: Zone Elevation") +NL_ADD_RUNTIME_FLAGS(zone_elevation) + +INSTALL(TARGETS zone_elevation RUNTIME DESTINATION ${NL_BIN_PREFIX} COMPONENT tools3d) diff --git a/code/nel/tools/3d/zone_elevation/blue_pill.ico b/code/nel/tools/3d/zone_elevation/blue_pill.ico new file mode 100644 index 0000000000000000000000000000000000000000..269907ec31f3583d18d593121b4728dae9ccc757 GIT binary patch literal 3638 zcmeH|KW`I35XIlz*|+!4@tuP&V32TSMHJ}}5<(;>N>9T#pol2k@BthN$t6vwT~I}I zY23!4jbsTaC50PYBD&BmGkbgXMJ5KNLg;?dYJEFzchegpmP6?(lMwARpH&Y;gfVLqQ@I-Nql zeuS%iU^E)x@+mMJ4ly2&ak6t`iYic5psK)sSpmu^{u^x?NEtv$4y7$7Ra9?m2-J+2 zSW)2CYIV<}*cTKzz7qstNRfQT3goyZZqH*kyPmJed&`;ajXiETCIjGzRu7XkiIuhT zTYR?5V~>aU@j8spvajm5yT(KH0eiQ2toW_~Tp8aLj}_1T_8i84 zzdp;o_xlSNAHH}3^!t5$evHbC*F8iPt13`c;NPo&wRSVD-j3+O67m*UCEYJWoy^kl zJW900%~uSXj5hzSCXa~$7!?1+$m^NE3_nu2&m>dN?MhLQt59(n4~R^ zyDISgAPBgRISeIvG#7B(3F1a$BQ|Z2WuVH6_hT z9Hg%0U+&NA!x>DgE$+W4uN-b!|2~DPntxLP?&*KzCkA>3Je&aP2ykV9-=#c?^$BZc Jtd%`~!!K}6&rARS literal 0 HcmV?d00001 diff --git a/code/nel/tools/3d/zone_elevation/main.rc b/code/nel/tools/3d/zone_elevation/main.rc new file mode 100644 index 000000000..05cf7c976 --- /dev/null +++ b/code/nel/tools/3d/zone_elevation/main.rc @@ -0,0 +1,42 @@ +#include +#include "config.h" + +IDI_MAIN_ICON ICON DISCARDABLE "blue_pill.ico" + +#ifdef _DEBUG +#define NL_FILEEXT "_d" +#else +#define NL_FILEEXT "" +#endif + +VS_VERSION_INFO VERSIONINFO + FILEVERSION NL_VERSION_RC + PRODUCTVERSION NL_VERSION_RC + FILEFLAGSMASK VS_FFI_FILEFLAGSMASK +#ifdef _DEBUG + FILEFLAGS VS_FF_DEBUG +#else + FILEFLAGS 0x0L +#endif + FILEOS VOS_NT_WINDOWS32 + FILETYPE VFT_APP + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "CompanyName", AUTHOR + VALUE "FileDescription", "NeL Zone Heightmap" + VALUE "FileVersion", NL_VERSION + VALUE "LegalCopyright", COPYRIGHT + VALUE "OriginalFilename", "zone_heightmap" NL_FILEEXT ".exe" + VALUE "ProductName", "NeL Tools" + VALUE "ProductVersion", NL_PRODUCT_VERSION + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x9, 1200 + END +END diff --git a/code/nel/tools/3d/zone_elevation/zone_elevation.cpp b/code/nel/tools/3d/zone_elevation/zone_elevation.cpp new file mode 100644 index 000000000..3287a68ea --- /dev/null +++ b/code/nel/tools/3d/zone_elevation/zone_elevation.cpp @@ -0,0 +1,396 @@ +// NeL - MMORPG Framework +// Copyright (C) 2010 Winch Gate Property Limited +// +// 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 +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +#include "../zone_lib/zone_utility.h" + +#include +#include +#include +#include +#include +#include +#include +//#include +#include +//#include +//#include +//#include +//#include +#include +#include +#include + +using namespace NL3D; +using namespace NLMISC; +using namespace NLLIGO; +using namespace std; + +namespace /* anonymous */ +{ + +sint32 s_ZoneMinX, s_ZoneMinY, s_ZoneMaxX, s_ZoneMaxY; +float s_CellSize = 160.0f; + +float s_ZFactor = 1.0f; +NLMISC::CBitmap *s_HeightMap; + +float s_ZFactor2 = 1.0f; +NLMISC::CBitmap *s_HeightMap2; + +std::string s_InputZone; // UTF-8 +std::string s_OutputZone; // UTF-8 + +CZoneRegion s_Land; + +bool loadLand(const string &filename) +{ + try + { + CIFile fileIn; + if (fileIn.open (filename)) + { + CIXml xml(true); + nlverify(xml.init(fileIn)); + s_Land.serial(xml); + } + else + { + nlwarning("Can't open the land file: %s", filename.c_str()); + return false; + } + } + catch (const Exception& e) + { + nlwarning("Error in land file: %s", e.what()); + return true; + } + return true; +} + +bool getXYFromZoneName(sint32 &x, sint32 &y, const string &zoneName) +{ + string xStr, yStr; + uint32 i = 0; + while (zoneName[i] != '_') + { + yStr += zoneName[i]; + ++i; + if (i == zoneName.size()) + goto Fail; + } + if (!NLMISC::fromString(yStr, y)) + goto Fail; + y = -y; + ++i; + while (i < zoneName.size()) + { + xStr += zoneName[i]; + ++i; + } + if (xStr.size() != 2) + goto Fail; + xStr = NLMISC::toUpper(xStr); + x = ((xStr[0] - 'A') * 26 + (xStr[1] - 'A')); + return true; +Fail: + x = -1; + y = -1; + return false; +} + +float getHeight(float x, float y) +{ + float deltaZ = 0.0f, deltaZ2 = 0.0f; + CRGBAF color; + sint32 sizeX = s_ZoneMaxX - s_ZoneMinX + 1; + sint32 sizeY = s_ZoneMaxY - s_ZoneMinY + 1; + + clamp(x, s_CellSize * s_ZoneMinX, s_CellSize * (s_ZoneMaxX + 1)); + clamp(y, s_CellSize * s_ZoneMinY, s_CellSize * (s_ZoneMaxY + 1)); + + if (s_HeightMap != NULL) + { + float xc = (x - s_CellSize * s_ZoneMinX) / (s_CellSize * sizeX); + float yc = 1.0f - ((y - s_CellSize * s_ZoneMinY) / (s_CellSize * sizeY)); + color = s_HeightMap->getColor(xc, yc); + color *= 255; + deltaZ = color.A; + deltaZ = deltaZ - 127.0f; // Median intensity is 127 + deltaZ *= s_ZFactor; + } + + if (s_HeightMap2 != NULL) + { + float xc = (x - s_CellSize * s_ZoneMinX) / (s_CellSize * sizeX); + float yc = 1.0f - ((y - s_CellSize * s_ZoneMinY) / (s_CellSize * sizeY)); + color = s_HeightMap2->getColor(xc, yc); + color *= 255; + deltaZ2 = color.A; + deltaZ2 = deltaZ2 - 127.0f; // Median intensity is 127 + deltaZ2 *= s_ZFactor2; + } + + return (deltaZ + deltaZ2); +} + +NLMISC::CVector getHeightNormal(float x, float y) +{ + sint32 SizeX = s_ZoneMaxX - s_ZoneMinX + 1; + sint32 SizeY = s_ZoneMaxY - s_ZoneMinY + 1; + sint32 bmpW, bmpH; + + // get width/height of the bitmap + if (s_HeightMap != NULL) + { + bmpW = s_HeightMap->getWidth(); + bmpH = s_HeightMap->getHeight(); + } + else if (s_HeightMap2 != NULL) + { + bmpW = s_HeightMap2->getWidth(); + bmpH = s_HeightMap2->getHeight(); + } + else + { + // no heightmap: unmodified normal + return CVector::K; + } + + // compute a good delta to compute tangents of the heightmap: 1/10 of a pixel, avoiding precision problem. + float dx = ((s_CellSize * SizeX) / bmpW) / 10; // eg: 160m/20pixels/10= 0.8 + float dy = ((s_CellSize * SizeY) / bmpH) / 10; + + // compute tangent around the position. + float hc = getHeight(x, y); + float hx = getHeight(x + dx, y); + float hy = getHeight(x, y + dy); + CVector ds(dx, 0, hx - hc); + CVector dt(0, dy, hy - hc); + + // compute the heightmap normal with the tangents + return (ds ^ dt).normed(); +} + +void applyZoneHeightmap() +{ + // Load zone + CIFile zoneFile(s_InputZone); + CZone zone; + zone.serial(zoneFile); + zoneFile.close(); + + // Retrieve patches and vertices + uint16 zoneId = zone.getZoneId(); + std::vector zonePatches; + std::vector zoneBorderVertices; + zone.retrieve(zonePatches, zoneBorderVertices); + + // Apply the Heighmap to all vertices/tangents/interiors (see Land Export tool.) + for (size_t i = 0; i < zonePatches.size(); ++i) + { + CPatchInfo &rPI = zonePatches[i]; + + // Elevate the vertices. + CVector verticesBeforeHeightMap[4]; + for (size_t j = 0; j < 4; ++j) + { + verticesBeforeHeightMap[j] = rPI.Patch.Vertices[j]; + float height = getHeight(rPI.Patch.Vertices[j].x, rPI.Patch.Vertices[j].y); + rPI.Patch.Vertices[j].z += height; + } + + // Interior and tangent are rotated to follow the heightmap normal, avoiding the "Stair Effect". + // Compute the matrix to apply to interiors and tangents. + CMatrix tgMatrix[4]; + for (size_t j = 0; j < 4; ++j) + { + // compute the normal of the heightmap. + CVector hmapNormal = getHeightNormal(rPI.Patch.Vertices[j].x, rPI.Patch.Vertices[j].y); + + // Compute the rotation which transforms the original normal: (0,0,1), to this normal. + CAngleAxis angleAxis; + angleAxis.Axis = CVector::K ^ hmapNormal; + angleAxis.Angle = (float)asin(angleAxis.Axis.norm()); + angleAxis.Axis.normalize(); + + // build the matrix which transform the old tgt/interior to his newValue: + // newVertexPos + rotate * (oldTgPos - oldVertexPos) + tgMatrix[j].identity(); + tgMatrix[j].translate(rPI.Patch.Vertices[j]); + tgMatrix[j].setRot(CQuat(angleAxis)); + tgMatrix[j].translate(-verticesBeforeHeightMap[j]); + } + + // For all interior. + for (size_t j = 0; j < 4; ++j) + rPI.Patch.Interiors[j] = tgMatrix[j] * rPI.Patch.Interiors[j]; + + // when j == 7 or 0 use vertex 0 for delta Z to ensure continuity of normals + // when j == 1 or 2 use vertex 1 + // when j == 3 or 4 use vertex 2 + // when j == 5 or 6 use vertex 3 + for (size_t j = 0; j < 8; ++j) + { + // get the correct vertex + uint vertexId = ((j + 1) / 2) % 4; + // apply the tgMatrix to the tangent + rPI.Patch.Tangents[j] = tgMatrix[vertexId] * rPI.Patch.Tangents[j]; + } + } + + // Save zone + zone.build(zoneId, zonePatches, zoneBorderVertices); + COFile centerSave(s_OutputZone); + nldebug("Writing file %s", s_OutputZone.c_str()); + zone.serial(centerSave); +} + +} /* anonymous namespace */ + +int main(int argc, char **argv) +{ + NLMISC::CApplicationContext myApplicationContext; + + NLMISC::CCmdArgs args; + + args.addAdditionalArg("zonenhw", "Input zone"); // .zonenhw + args.addAdditionalArg("zonew", "Output zone"); // .zonew + args.addArg("", "land", "land", "Ligo land file (either specify this or the boundaries)"); + args.addArg("", "zonemin", "zone", "Zone boundary"); + args.addArg("", "zonemax", "zone", "Zone boundary"); + args.addArg("", "cellsize", "meters", "Zone cell size"); + args.addArg("", "zfactor", "factor", "Factor for heightmap"); + args.addArg("", "heightmap", "bitmap", "Heightmap"); + args.addArg("", "zfactor2", "factor", "Factor for second heightmap"); + args.addArg("", "heightmap2", "bitmap", "Second heightmap"); + // TODO: args.addArg("", "batch", "", "Process all zones in input (specify input as C:/folder/.zonenhw)"); + + if (!args.parse(argc, argv)) + { + return EXIT_FAILURE; + } + + s_InputZone = args.getAdditionalArg("zonenhw")[0]; + s_OutputZone = args.getAdditionalArg("zonew")[0]; + + if (args.haveLongArg("zonemin") && args.haveLongArg("zonemax")) + { + sint32 zoneMinX, zoneMinY; + sint32 zoneMaxX, zoneMaxY; + if (!getXYFromZoneName(zoneMinX, zoneMinY, args.getLongArg("zonemin")[0]) + || !getXYFromZoneName(zoneMaxX, zoneMaxY, args.getLongArg("zonemax")[0])) + { + goto Fail; + } + s_ZoneMinX = min(zoneMinX, zoneMaxX); + s_ZoneMaxX = max(zoneMinX, zoneMaxX); + s_ZoneMinY = min(zoneMinY, zoneMaxY); + s_ZoneMaxY = max(zoneMinY, zoneMaxY); + } + else if (args.haveLongArg("land")) + { + if (!loadLand(args.getLongArg("land")[0])) + goto Fail; + s_ZoneMinX = s_Land.getMinX(); + s_ZoneMaxX = s_Land.getMaxX(); + s_ZoneMinY = s_Land.getMinY(); + s_ZoneMaxY = s_Land.getMaxY(); + } + else + { + nlwarning("Must have either both 'zonemin' and 'zonemax', or 'land' specified"); + goto Fail; + } + + if (args.haveLongArg("heightmap")) + { + nldebug("Loading height map"); + s_HeightMap = new CBitmap(); + try + { + CIFile inFile; + if (inFile.open(args.getLongArg("heightmap")[0])) + { + s_HeightMap->load(inFile); + } + else + { + nldebug("Cant load height map: %s", args.getLongArg("heightmap")[0].c_str()); + delete s_HeightMap; + s_HeightMap = NULL; + } + } + catch (const Exception &) + { + nldebug("Cant load height map: %s", args.getLongArg("heightmap")[0].c_str()); + delete s_HeightMap; + s_HeightMap = NULL; + } + } + + if (args.haveLongArg("heightmap2")) + { + nldebug("Loading height map"); + s_HeightMap2 = new CBitmap(); + try + { + CIFile inFile; + if (inFile.open(args.getLongArg("heightmap2")[0])) + { + s_HeightMap2->load(inFile); + } + else + { + nldebug("Cant load height map: %s", args.getLongArg("heightmap2")[0].c_str()); + delete s_HeightMap2; + s_HeightMap2 = NULL; + } + } + catch (const Exception &) + { + nldebug("Cant load height map: %s", args.getLongArg("heightmap2")[0].c_str()); + delete s_HeightMap2; + s_HeightMap2 = NULL; + } + } + + if (args.haveLongArg("zfactor")) + { + if (!NLMISC::fromString(args.getLongArg("zfactor")[0], s_ZFactor)) + goto Fail; + } + + if (args.haveLongArg("zfactor2")) + { + if (!NLMISC::fromString(args.getLongArg("zfactor2")[0], s_ZFactor2)) + goto Fail; + } + + if (args.haveLongArg("cellsize")) + { + if (!NLMISC::fromString(args.getLongArg("cellsize")[0], s_CellSize)) + goto Fail; + } + + applyZoneHeightmap(); + + return EXIT_SUCCESS; +Fail: + args.displayHelp(); + delete s_HeightMap; + delete s_HeightMap2; + return EXIT_FAILURE; +} diff --git a/code/nel/tools/build_gamedata/0_setup.py b/code/nel/tools/build_gamedata/0_setup.py index 69d825fed..00d19cbe6 100755 --- a/code/nel/tools/build_gamedata/0_setup.py +++ b/code/nel/tools/build_gamedata/0_setup.py @@ -434,6 +434,7 @@ if not args.noverify: findTool(log, ToolDirectories, BuildFarbankTool, ToolSuffix) findTool(log, ToolDirectories, ZoneDependenciesTool, ToolSuffix) findTool(log, ToolDirectories, ZoneWelderTool, ToolSuffix) + findTool(log, ToolDirectories, ZoneElevationTool, ToolSuffix) findTool(log, ToolDirectories, BuildRbankTool, ToolSuffix) findTool(log, ToolDirectories, BuildIndoorRbankTool, ToolSuffix) findTool(log, ToolDirectories, BuildIgBoxesTool, ToolSuffix) diff --git a/code/nel/tools/build_gamedata/configuration/tools.py b/code/nel/tools/build_gamedata/configuration/tools.py index 67cefdd5b..19cf5c9a5 100755 --- a/code/nel/tools/build_gamedata/configuration/tools.py +++ b/code/nel/tools/build_gamedata/configuration/tools.py @@ -60,6 +60,7 @@ BuildSmallbankTool = "build_smallbank" BuildFarbankTool = "build_far_bank" ZoneDependenciesTool = "zone_dependencies" ZoneWelderTool = "zone_welder" +ZoneElevationTool = "zone_elevation" BuildRbankTool = "build_rbank" BuildIndoorRbankTool = "build_indoor_rbank" BuildIgBoxesTool = "build_ig_boxes" diff --git a/code/nel/tools/build_gamedata/processes/zone/2_build.py b/code/nel/tools/build_gamedata/processes/zone/2_build.py index ad2f052fd..f9a31e3c4 100755 --- a/code/nel/tools/build_gamedata/processes/zone/2_build.py +++ b/code/nel/tools/build_gamedata/processes/zone/2_build.py @@ -46,6 +46,7 @@ printLog(log, "") # Find tools ZoneDependencies = findTool(log, ToolDirectories, ZoneDependenciesTool, ToolSuffix) ZoneWelder = findTool(log, ToolDirectories, ZoneWelderTool, ToolSuffix) +ZoneElevation = findTool(log, ToolDirectories, ZoneElevationTool, ToolSuffix) ExecTimeout = findTool(log, ToolDirectories, ExecTimeoutTool, ToolSuffix) printLog(log, "") @@ -99,7 +100,24 @@ if BuildQuality == 1: printLog(log, "") # For each zone directory -printLog(log, ">>> Build zone weld <<<") +#printLog(log, ">>> Build zone weld <<<") +#if ZoneWelder == "": +# toolLogFail(log, ZoneWelderTool, ToolSuffix) +#elif ExecTimeout == "": +# toolLogFail(log, ExecTimeoutTool, ToolSuffix) +#else: +# mkPath(log, ExportBuildDirectory + "/" + ZoneExportDirectory) +# mkPath(log, ExportBuildDirectory + "/" + ZoneWeldBuildDirectory) +# files = findFiles(log, ExportBuildDirectory + "/" + ZoneExportDirectory, "", ".zone") +# for file in files: +# sourceFile = ExportBuildDirectory + "/" + ZoneExportDirectory + "/" + file +# destFile = ExportBuildDirectory + "/" + ZoneWeldBuildDirectory + "/" + os.path.basename(file)[0:-len(".zone")] + ".zonew" +# if needUpdateLogRemoveDest(log, sourceFile, destFile): +# subprocess.call([ ExecTimeout, str(ZoneBuildWeldTimeout), ZoneWelder, sourceFile, destFile ]) +#printLog(log, "") + +# For each zone directory +printLog(log, ">>> Weld zone without heightmap <<<") if ZoneWelder == "": toolLogFail(log, ZoneWelderTool, ToolSuffix) elif ExecTimeout == "": @@ -107,29 +125,29 @@ elif ExecTimeout == "": else: mkPath(log, ExportBuildDirectory + "/" + ZoneExportDirectory) mkPath(log, ExportBuildDirectory + "/" + ZoneWeldBuildDirectory) - files = findFiles(log, ExportBuildDirectory + "/" + ZoneExportDirectory, "", ".zone") + files = findFiles(log, ExportBuildDirectory + "/" + ZoneExportDirectory, "", ".zonenh") for file in files: sourceFile = ExportBuildDirectory + "/" + ZoneExportDirectory + "/" + file - destFile = ExportBuildDirectory + "/" + ZoneWeldBuildDirectory + "/" + os.path.basename(file)[0:-len(".zone")] + ".zonew" + destFile = ExportBuildDirectory + "/" + ZoneWeldBuildDirectory + "/" + os.path.basename(file)[0:-len(".zonenh")] + ".zonenhw" if needUpdateLogRemoveDest(log, sourceFile, destFile): subprocess.call([ ExecTimeout, str(ZoneBuildWeldTimeout), ZoneWelder, sourceFile, destFile ]) printLog(log, "") -# For each zone directory -printLog(log, ">>> Build zone weld no heightmap <<<") -if ZoneWelder == "": - toolLogFail(log, ZoneWelderTool, ToolSuffix) -elif ExecTimeout == "": - toolLogFail(log, ExecTimeoutTool, ToolSuffix) +printLog(log, ">>> Apply zone heightmap to welded zone <<<") +if ZoneElevation == "": + toolLogFail(log, ZoneElevationTool, ToolSuffix) else: - mkPath(log, ExportBuildDirectory + "/" + ZoneExportDirectory) mkPath(log, ExportBuildDirectory + "/" + ZoneWeldBuildDirectory) - files = findFiles(log, ExportBuildDirectory + "/" + ZoneExportDirectory, "", ".zonenh") + mkPath(log, DatabaseDirectory + "/" + LigoBaseSourceDirectory); + land = DatabaseDirectory + "/" + LigoBaseSourceDirectory + "/" + LigoExportLand + heightMap1 = DatabaseDirectory + "/" + LigoBaseSourceDirectory + "/" + LigoExportHeightmap1 + heightMap2 = DatabaseDirectory + "/" + LigoBaseSourceDirectory + "/" + LigoExportHeightmap2 + files = findFiles(log, ExportBuildDirectory + "/" + ZoneWeldBuildDirectory, "", ".zonenhw") for file in files: - sourceFile = ExportBuildDirectory + "/" + ZoneExportDirectory + "/" + file - destFile = ExportBuildDirectory + "/" + ZoneWeldBuildDirectory + "/" + os.path.basename(file)[0:-len(".zonenh")] + ".zonenhw" + sourceFile = ExportBuildDirectory + "/" + ZoneWeldBuildDirectory + "/" + file + destFile = ExportBuildDirectory + "/" + ZoneWeldBuildDirectory + "/" + os.path.basename(file)[0:-len(".zonenhw")] + ".zonew" if needUpdateLogRemoveDest(log, sourceFile, destFile): - subprocess.call([ ExecTimeout, str(ZoneBuildWeldTimeout), ZoneWelder, sourceFile, destFile ]) + subprocess.call([ ZoneElevation, sourceFile, destFile, "--land", land, "--heightmap", heightMap1, "--zfactor", LigoExportZFactor1, "--heightmap2", heightMap2, "--zfactor2", LigoExportZFactor2 ]) printLog(log, "") log.close() diff --git a/code/nel/tools/pacs/build_rbank/build_surf.cpp b/code/nel/tools/pacs/build_rbank/build_surf.cpp index 465f5f94f..ba75234d1 100644 --- a/code/nel/tools/pacs/build_rbank/build_surf.cpp +++ b/code/nel/tools/pacs/build_rbank/build_surf.cpp @@ -880,6 +880,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 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: Use the 'zone_heightmap' tool to resolve this!"); nlwarning("More Details (information landscape / information landscape_with_No_Heightmap):"); for(uint j=0;j Date: Sun, 24 Nov 2019 10:19:49 +0800 Subject: [PATCH 082/236] Fix ig elevation paths --- code/nel/tools/3d/ig_elevation/main.cpp | 12 +++++++----- .../nel/tools/build_gamedata/processes/ig/2_build.py | 4 +++- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/code/nel/tools/3d/ig_elevation/main.cpp b/code/nel/tools/3d/ig_elevation/main.cpp index a3f7dba5f..122957eb0 100644 --- a/code/nel/tools/3d/ig_elevation/main.cpp +++ b/code/nel/tools/3d/ig_elevation/main.cpp @@ -259,13 +259,13 @@ int main(int nNbArg, char**ppArgs) printf ("ZFactor2 = 0.5;\n"); printf ("LandFile = \"w:/matis.land\";\n"); - return -1; + return EXIT_FAILURE; } SExportOptions options; if (!options.load(ppArgs[1])) { - return -1; + return EXIT_FAILURE; } // Get all ig files in the input directory and elevate to the z of the double heightmap @@ -358,7 +358,7 @@ int main(int nNbArg, char**ppArgs) for (uint32 i = 0; i < vAllFiles.size(); ++i) { - CInstanceGroup *pIG = LoadInstanceGroup (CPath::standardizePath(options.InputIGDir) + vAllFiles[i]); + CInstanceGroup *pIG = LoadInstanceGroup (vAllFiles[i]); if (pIG != NULL) { @@ -430,11 +430,13 @@ int main(int nNbArg, char**ppArgs) pIGout->build (vGlobalPos, IA, Clusters, Portals, PLN); pIGout->enableRealTimeSunContribution(realTimeSunContribution); - SaveInstanceGroup (CPath::standardizePath(options.OutputIGDir) + vAllFiles[i], pIGout); + std::string outFilePath = CPath::standardizePath(options.OutputIGDir, true) + CFile::getFilename(vAllFiles[i]); + nldebug("Writing %s...", outFilePath.c_str()); + SaveInstanceGroup(outFilePath, pIGout); delete pIG; } } - return 1; + return EXIT_SUCCESS; } diff --git a/code/nel/tools/build_gamedata/processes/ig/2_build.py b/code/nel/tools/build_gamedata/processes/ig/2_build.py index afb84c312..c2ab57059 100755 --- a/code/nel/tools/build_gamedata/processes/ig/2_build.py +++ b/code/nel/tools/build_gamedata/processes/ig/2_build.py @@ -54,6 +54,8 @@ mkPath(log, configDir) def igElevation(inputIgDir, outputIgDir): printLog(log, ">>> IG Elevation <<<") + mkPath(log, inputIgDir) + mkPath(log, outputIgDir) needUpdateIg = needUpdateDirByTagLog(log, inputIgDir, ".ig", outputIgDir, ".ig") if needUpdateIg: printLog(log, "DETECT UPDATE IG->Elevated") @@ -100,7 +102,7 @@ def igElevation(inputIgDir, outputIgDir): os.remove(configFile) # Copy remaining IG files - copyFilesLogless(log, inputIgDir, outputIgDir) + #BUG:copyFilesLogless(log, inputIgDir, outputIgDir) else: printLog(log, "DETECT DECIDE SKIP") printLog(log, "SKIP *") From 671035c9b1bae40b0144bab9f97ff1d163127c92 Mon Sep 17 00:00:00 2001 From: Jan Boon Date: Tue, 26 Nov 2019 08:40:33 +0800 Subject: [PATCH 083/236] Add source of old Qt based BNP make gui from sfb --- code/nel/tools/misc/bnp_make_qt/main.cpp | 11 + code/nel/tools/misc/bnp_make_qt/main.h | 8 + .../nel/tools/misc/bnp_make_qt/mainwindow.cpp | 253 ++++++++++++++ code/nel/tools/misc/bnp_make_qt/mainwindow.h | 61 ++++ code/nel/tools/misc/bnp_make_qt/mainwindow.ui | 322 ++++++++++++++++++ 5 files changed, 655 insertions(+) create mode 100644 code/nel/tools/misc/bnp_make_qt/main.cpp create mode 100644 code/nel/tools/misc/bnp_make_qt/main.h create mode 100644 code/nel/tools/misc/bnp_make_qt/mainwindow.cpp create mode 100644 code/nel/tools/misc/bnp_make_qt/mainwindow.h create mode 100644 code/nel/tools/misc/bnp_make_qt/mainwindow.ui diff --git a/code/nel/tools/misc/bnp_make_qt/main.cpp b/code/nel/tools/misc/bnp_make_qt/main.cpp new file mode 100644 index 000000000..4efc51df3 --- /dev/null +++ b/code/nel/tools/misc/bnp_make_qt/main.cpp @@ -0,0 +1,11 @@ +#include "main.h" + +int main(int argc, char * argv[]) +{ + QApplication application(argc, argv); + MainWindow window; + + window.show(); + + return application.exec(); +} diff --git a/code/nel/tools/misc/bnp_make_qt/main.h b/code/nel/tools/misc/bnp_make_qt/main.h new file mode 100644 index 000000000..a8a4b8652 --- /dev/null +++ b/code/nel/tools/misc/bnp_make_qt/main.h @@ -0,0 +1,8 @@ +#ifndef MAIN_H +#define MAIN_H + +#include + +#include "mainwindow.h" + +#endif // MAIN_H diff --git a/code/nel/tools/misc/bnp_make_qt/mainwindow.cpp b/code/nel/tools/misc/bnp_make_qt/mainwindow.cpp new file mode 100644 index 000000000..888330a80 --- /dev/null +++ b/code/nel/tools/misc/bnp_make_qt/mainwindow.cpp @@ -0,0 +1,253 @@ +#include "mainwindow.h" + +MainWindow::MainWindow(QWidget * parent) : + QMainWindow(parent), + uiMainWindow_(new Ui::MainWindow), + processList_(new QProcess(this)), + processSearch_(new QProcess(this)), + processPack_(new QProcess(this)), + processUnpack_(new QProcess(this)) +{ + uiMainWindow_->setupUi(this); + + settings_ = new QSettings("bnp_make_frontend.cfg", QSettings::IniFormat); + bnpMakeBinary_ = settings_->value("BnpMakeBinary").toString(); + dataPath_ = settings_->value("DataPath").toString(); + + uiMainWindow_->lineEditSearchPath->setText(dataPath_); + uiMainWindow_->lineEditBnpMake->setText(bnpMakeBinary_); + uiMainWindow_->lineEditDataPath->setText(dataPath_); + + connect(uiMainWindow_->pushButtonListBrowse, SIGNAL(clicked()), this, SLOT(onButtonListBrowseClicked())); + connect(uiMainWindow_->pushButtonList, SIGNAL(clicked()), this, SLOT(onButtonListClicked())); + connect(processList_, SIGNAL(finished(int)), this, SLOT(onProcessListComplete())); + + connect(uiMainWindow_->pushButtonSearchBrowse, SIGNAL(clicked()), this, SLOT(onButtonSearchBrowseClicked())); + connect(uiMainWindow_->pushButtonSearch, SIGNAL(clicked()), this, SLOT(onButtonSearchClicked())); + connect(processSearch_, SIGNAL(finished(int)), this, SLOT(onProcessSearchComplete())); + + connect(uiMainWindow_->pushButtonPackBrowse, SIGNAL(clicked()), this, SLOT(onButtonPackBrowseClicked())); + connect(uiMainWindow_->pushButtonPack, SIGNAL(clicked()), this, SLOT(onButtonPackClicked())); + connect(processPack_, SIGNAL(finished(int)), this, SLOT(onProcessPackComplete())); + + connect(uiMainWindow_->pushButtonUnpackBrowse, SIGNAL(clicked()), this, SLOT(onButtonUnpackBrowseClicked())); + connect(uiMainWindow_->pushButtonUnpack, SIGNAL(clicked()), this, SLOT(onButtonUnpackClicked())); + connect(processUnpack_, SIGNAL(finished(int)), this, SLOT(onProcessUnpackComplete())); + + connect(uiMainWindow_->pushButtonBnpMakeBrowse, SIGNAL(clicked()), this, SLOT(onButtonBnpMakeBrowseClicked())); + connect(uiMainWindow_->pushButtonDataPathBrowse, SIGNAL(clicked()), this, SLOT(onButtonDataPathBrowseClicked())); +} + +MainWindow::~MainWindow() +{ + delete uiMainWindow_; +} + +void MainWindow::onButtonListBrowseClicked() +{ + QString fileName; + + fileName = QFileDialog::getOpenFileName(this, "Choose a BNP file", dataPath_, "BNP file (*.bnp)"); + uiMainWindow_->lineEditList->setText(fileName); +} + +void MainWindow::onButtonListClicked() +{ + QStringList arguments; + + uiMainWindow_->textEditList->clear(); + + if (bnpMakeBinary_ != "") + if (uiMainWindow_->lineEditList->text() != "") + { + arguments << "/l" << uiMainWindow_->lineEditList->text(); + processList_->start(bnpMakeBinary_, arguments); + } + else + uiMainWindow_->textEditList->append("Choose a BNP file."); + else + uiMainWindow_->textEditList->append("Check bnp_make path."); +} + +void MainWindow::onProcessListComplete() +{ + QString output; + + output = processList_->readAllStandardOutput(); + uiMainWindow_->textEditList->append(output); + uiMainWindow_->textEditList->append("List complete."); +} + +void MainWindow::onButtonSearchBrowseClicked() +{ + QString directory; + + directory = QFileDialog::getExistingDirectory(this, tr("Choose a directory"), dataPath_, QFileDialog::ShowDirsOnly | QFileDialog::DontResolveSymlinks); + uiMainWindow_->lineEditSearchPath->setText(directory); +} + +void MainWindow::onButtonSearchClicked() +{ + QDir dir; + QStringList nameFilters; + + uiMainWindow_->textEditSearch->clear(); + + if (bnpMakeBinary_ != "") + if (uiMainWindow_->lineEditSearchPath->text() != "") + { + dir.cd(uiMainWindow_->lineEditSearchPath->text()); + + nameFilters << "*.bnp"; + dir.setNameFilters(nameFilters); + dir.setFilter(QDir::Files); + + fileInfoList_ = dir.entryInfoList(); + fileInfoListIndex_ = 0; + + onProcessSearchComplete(); + } + else + uiMainWindow_->textEditSearch->append("Choose a directory."); + else + uiMainWindow_->textEditSearch->append("Check bnp_make path."); +} + +void MainWindow::onProcessSearchComplete() +{ + QFileInfo fileInfo; + QStringList arguments; + QString output; + QStringList outputList; + QString line; + + if (fileInfoListIndex_ > 0) + { + output = processSearch_->readAllStandardOutput(); + + if (uiMainWindow_->lineEditSearchString->text() == "") + uiMainWindow_->textEditSearch->append(output); + else + { + outputList = output.split("\n"); + + foreach (line, outputList) + if (line.contains(uiMainWindow_->lineEditSearchString->text())) + uiMainWindow_->textEditSearch->append(line.trimmed()); + } + } + + if (fileInfoListIndex_ < fileInfoList_.count()) + { + fileInfo = fileInfoList_.at(fileInfoListIndex_++); + uiMainWindow_->textEditSearch->append("===> " + uiMainWindow_->lineEditSearchPath->text() + "/" + fileInfo.fileName() + ":"); + arguments << "/l" << uiMainWindow_->lineEditSearchPath->text() + "/" + fileInfo.fileName(); + processSearch_->start(bnpMakeBinary_, arguments); + } + else + { + uiMainWindow_->textEditSearch->append("Search complete."); + } +} + +void MainWindow::onButtonPackBrowseClicked() +{ + QString directory; + + directory = QFileDialog::getExistingDirectory(this, tr("Choose the source directory"), dataPath_, QFileDialog::ShowDirsOnly | QFileDialog::DontResolveSymlinks); + uiMainWindow_->lineEditPack->setText(directory); +} + +void MainWindow::onButtonPackClicked() +{ + QStringList arguments; + + uiMainWindow_->textEditPack->clear(); + + if (bnpMakeBinary_ != "") + if (uiMainWindow_->lineEditPack->text() != "") + { + uiMainWindow_->textEditPack->append("Pack in progress..."); + + arguments << "/p" << uiMainWindow_->lineEditPack->text(); + processPack_->start(bnpMakeBinary_, arguments); + } + else + uiMainWindow_->textEditPack->append("Choose the source directory."); + else + uiMainWindow_->textEditPack->append("Check bnp_make path."); +} + +void MainWindow::onProcessPackComplete() +{ + QString output; + + output = processPack_->readAllStandardOutput(); + uiMainWindow_->textEditPack->append(output); + uiMainWindow_->textEditPack->append("Pack complete."); +} + +void MainWindow::onButtonUnpackBrowseClicked() +{ + QString fileName; + + fileName = QFileDialog::getOpenFileName(this, "Choose a BNP file", dataPath_, "BNP file (*.bnp)"); + uiMainWindow_->lineEditUnpack->setText(fileName); +} + +void MainWindow::onButtonUnpackClicked() +{ + QStringList arguments; + + uiMainWindow_->textEditUnpack->clear(); + + if (bnpMakeBinary_ != "") + if (uiMainWindow_->lineEditUnpack->text() != "") + { + uiMainWindow_->textEditUnpack->append("Unpack in progress..."); + + arguments << "/u" << uiMainWindow_->lineEditUnpack->text(); + processUnpack_->start(bnpMakeBinary_, arguments); + } + else + uiMainWindow_->textEditUnpack->append("Choose a BNP file."); + else + uiMainWindow_->textEditUnpack->append("Check bnp_make path."); +} + +void MainWindow::onProcessUnpackComplete() +{ + uiMainWindow_->textEditUnpack->append("Unpack complete."); +} + +void MainWindow::onButtonBnpMakeBrowseClicked() +{ + QString fileName; + + fileName = QFileDialog::getOpenFileName(this, "Locate the bnp_make binary", dataPath_); + uiMainWindow_->lineEditBnpMake->setText(fileName); + + bnpMakeBinary_ = fileName; + settings_->setValue("BnpMakeBinary", fileName); + + uiMainWindow_->textEditSettings->clear(); + if (fileName != "") + uiMainWindow_->textEditSettings->append("bnp_make path changed."); + else + uiMainWindow_->textEditSettings->append("Locate the bnp_make binary."); +} + +void MainWindow::onButtonDataPathBrowseClicked() +{ + QString directory; + + directory = QFileDialog::getExistingDirectory(this, tr("Choose a directory"), dataPath_, QFileDialog::ShowDirsOnly | QFileDialog::DontResolveSymlinks); + uiMainWindow_->lineEditDataPath->setText(directory); + + dataPath_ = directory; + settings_->setValue("DataPath", directory); + uiMainWindow_->lineEditSearchPath->setText(directory); + + uiMainWindow_->textEditSettings->clear(); + uiMainWindow_->textEditSettings->append("Data path changed."); +} diff --git a/code/nel/tools/misc/bnp_make_qt/mainwindow.h b/code/nel/tools/misc/bnp_make_qt/mainwindow.h new file mode 100644 index 000000000..776b5fe01 --- /dev/null +++ b/code/nel/tools/misc/bnp_make_qt/mainwindow.h @@ -0,0 +1,61 @@ +#ifndef MAINWINDOW_H +#define MAINWINDOW_H + +#include +#include +#include +#include + +#include "ui_mainwindow.h" + +namespace Ui +{ + class MainWindow; +} + +class MainWindow : public QMainWindow +{ + Q_OBJECT + + public: + explicit MainWindow(QWidget * parent = 0); + ~MainWindow(); + + public slots: + void onButtonListBrowseClicked(); + void onButtonListClicked(); + void onProcessListComplete(); + + void onButtonSearchBrowseClicked(); + void onButtonSearchClicked(); + void onProcessSearchComplete(); + + void onButtonPackBrowseClicked(); + void onButtonPackClicked(); + void onProcessPackComplete(); + + void onButtonUnpackBrowseClicked(); + void onButtonUnpackClicked(); + void onProcessUnpackComplete(); + + void onButtonBnpMakeBrowseClicked(); + void onButtonDataPathBrowseClicked(); + + private: + Ui::MainWindow * uiMainWindow_; + QSettings * settings_; + QString bnpMakeBinary_; + QString dataPath_; + + QProcess * processList_; + + QProcess * processSearch_; + int fileInfoListIndex_; + QFileInfoList fileInfoList_; + + QProcess * processPack_; + + QProcess * processUnpack_; +}; + +#endif // MAINWINDOW_H diff --git a/code/nel/tools/misc/bnp_make_qt/mainwindow.ui b/code/nel/tools/misc/bnp_make_qt/mainwindow.ui new file mode 100644 index 000000000..37097744e --- /dev/null +++ b/code/nel/tools/misc/bnp_make_qt/mainwindow.ui @@ -0,0 +1,322 @@ + + + MainWindow + + + + 0 + 0 + 800 + 600 + + + + bnp-make-frontend + + + + :/images/bnp-make-frontend.ico:/images/bnp-make-frontend.ico + + + QTabWidget::Rounded + + + + + + + 0 + + + + List + + + + + + + + + + BNP file: + + + + + + + true + + + + + + + Browse + + + + + + + + + List + + + + + + + true + + + + + + + + + + Search + + + + + + + + + + Search path: + + + + + + + true + + + + + + + Browse + + + + + + + + + + + Search string: + + + + + + + + + + + + Search + + + + + + + true + + + + + + + + + + Pack + + + + + + + + + + Source path: + + + + + + + true + + + + + + + Browse + + + + + + + + + Pack + + + + + + + true + + + + + + + + + + Unpack + + + + + + + + + + BNP file: + + + + + + + true + + + + + + + Browse + + + + + + + + + Unpack + + + + + + + true + + + + + + + + + + Settings + + + + + + + + + + bnp_make path: + + + + + + + true + + + + + + + Browse + + + + + + + + + + + Data path: + + + + + + + true + + + + + + + Browse + + + + + + + + + true + + + + + + + + + + + + + + + + + + From df21e21085f278095662f3aa2672d9c41760505b Mon Sep 17 00:00:00 2001 From: Nimetu Date: Tue, 26 Nov 2019 11:43:23 +0200 Subject: [PATCH 084/236] Fixed: nelmisc linker error --HG-- branch : develop --- code/CMakeLists.txt | 3 ++- code/nel/src/gui/CMakeLists.txt | 4 ++-- code/nel/src/misc/CMakeLists.txt | 6 +++--- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/code/CMakeLists.txt b/code/CMakeLists.txt index 46900daa6..71910d8f7 100644 --- a/code/CMakeLists.txt +++ b/code/CMakeLists.txt @@ -220,6 +220,8 @@ IF(WITH_NEL) IF(WITH_GUI) FIND_PACKAGE(Luabind REQUIRED) + ENDIF() + FIND_PACKAGE(CURL REQUIRED) IF((WIN32 OR CURL_LIBRARIES MATCHES "\\.a") AND WITH_STATIC_CURL) @@ -269,7 +271,6 @@ IF(WITH_NEL) ENDIF() ENDIF() ENDIF() - ENDIF() INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/nel/include) ADD_SUBDIRECTORY(nel) diff --git a/code/nel/src/gui/CMakeLists.txt b/code/nel/src/gui/CMakeLists.txt index cb7bbe23a..19c0cfea8 100644 --- a/code/nel/src/gui/CMakeLists.txt +++ b/code/nel/src/gui/CMakeLists.txt @@ -6,9 +6,9 @@ SOURCE_GROUP("src" FILES ${SRC}) NL_TARGET_LIB(nelgui ${SRC} ${HEADERS}) -INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR} ${LUA_INCLUDE_DIR} ${LUABIND_INCLUDE_DIR} ${CURL_INCLUDE_DIRS} ${OPENSSL_INCLUDE_DIR}) +INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR} ${LUA_INCLUDE_DIR} ${LUABIND_INCLUDE_DIR} ${CURL_INCLUDE_DIRS}) -TARGET_LINK_LIBRARIES(nelgui nelmisc nel3d ${LUA_LIBRARIES} ${LUABIND_LIBRARIES} ${CURL_LIBRARIES} ${OPENSSL_LIBRARIES}) +TARGET_LINK_LIBRARIES(nelgui nelmisc nel3d ${LUA_LIBRARIES} ${LUABIND_LIBRARIES} ${CURL_LIBRARIES}) NL_DEFAULT_PROPS(nelgui "NeL, Library: NeL GUI") NL_ADD_RUNTIME_FLAGS(nelgui) diff --git a/code/nel/src/misc/CMakeLists.txt b/code/nel/src/misc/CMakeLists.txt index ec0dcd357..e8470983c 100644 --- a/code/nel/src/misc/CMakeLists.txt +++ b/code/nel/src/misc/CMakeLists.txt @@ -209,15 +209,15 @@ IF(UNIX) ENDIF() ENDIF() -INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR} ${PNG_INCLUDE_DIR} config_file) +INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR} ${PNG_INCLUDE_DIR} ${CURL_INCLUDE_DIRS} ${OPENSSL_INCLUDE_DIR} config_file) -TARGET_LINK_LIBRARIES(nelmisc ${CMAKE_THREAD_LIBS_INIT} ${LIBXML2_LIBRARIES} ${ZLIB_LIBRARY}) +TARGET_LINK_LIBRARIES(nelmisc ${CMAKE_THREAD_LIBS_INIT} ${LIBXML2_LIBRARIES} ${ZLIB_LIBRARY} ${CURL_LIBRARIES} ${OPENSSL_LIBRARIES}) NL_DEFAULT_PROPS(nelmisc "NeL, Library: NeL Misc") NL_ADD_RUNTIME_FLAGS(nelmisc) NL_ADD_LIB_SUFFIX(nelmisc) -ADD_DEFINITIONS(${LIBXML2_DEFINITIONS}) +ADD_DEFINITIONS(${LIBXML2_DEFINITIONS} ${CURL_DEFINITIONS} ) IF(WITH_PCH) ADD_NATIVE_PRECOMPILED_HEADER(nelmisc ${CMAKE_CURRENT_SOURCE_DIR}/stdmisc.h ${CMAKE_CURRENT_SOURCE_DIR}/stdmisc.cpp) From 02e7393c1414c225897e706255e63d7e30cffa53 Mon Sep 17 00:00:00 2001 From: Nimetu Date: Tue, 26 Nov 2019 11:43:26 +0200 Subject: [PATCH 085/236] Changed: Move hardcoded urls to cmake. --HG-- branch : develop --- code/CMakeLists.txt | 19 +++++++++++++++++++ code/CMakeModules/nel.cmake | 2 ++ code/config.h.cmake | 8 ++++++++ code/ryzom/client/src/client_cfg.cpp | 14 +++++++++----- .../tools/client/client_patcher/main.cpp | 2 +- 5 files changed, 39 insertions(+), 6 deletions(-) diff --git a/code/CMakeLists.txt b/code/CMakeLists.txt index 71910d8f7..67d516ba5 100644 --- a/code/CMakeLists.txt +++ b/code/CMakeLists.txt @@ -63,6 +63,25 @@ SET(RYZOM_VERSION_MAJOR 3) SET(RYZOM_VERSION_MINOR 5) SET(RYZOM_VERSION_PATCH 0) +SET(RYZOM_CLIENT_CREATE_ACCOUNT_URL "https://open.ryzom.dev/ams/" CACHE STRING "Ryzom Client Create Account URL") +SET(RYZOM_CLIENT_EDIT_ACCOUNT_URL "https://open.ryzom.dev/ams/" CACHE STRING "Ryzom Client Edit Account URL") +SET(RYZOM_CLIENT_FORGET_PASSWORD_URL "https://open.ryzom.dev/ams/" CACHE STRING "Ryzom Client Forget Password URL") +SET(RYZOM_CLIENT_PATCH_URL "https://cdn.ryzom.dev/open/patch/" CACHE STRING "Ryzom Client Patch URL") + +SET(RYZOM_WEBIG_MAIN_URL "https://open.ryzom.dev/" CACHE STRING "Ryzom Client WebIG Main URL") +SET(RYZOM_WEBIG_TRUSTED_DOMAIN "open.ryzom.dev" CACHE STRING "Ryzom Client WebIG Trusted Domain") + +# urls when compiling ryzom live client +IF(WITH_RYZOM_LIVE) + SET(RYZOM_CLIENT_CREATE_ACCOUNT_URL "https://account.ryzom.com/signup/from_client.php") + SET(RYZOM_CLIENT_EDIT_ACCOUNT_URL "https://account.ryzom.com/payment_profile/index.php") + SET(RYZOM_CLIENT_FORGET_PASSWORD_URL "https://account.ryzom.com/payment_profile/lost_secure_password.php") + SET(RYZOM_CLIENT_PATCH_URL "http://dl.ryzom.com/patch_live") + + SET(RYZOM_WEBIG_MAIN_URL "https://app.ryzom.com/") + SET(RYZOM_WEBIG_TRUSTED_DOMAIN "app.ryzom.com") +ENDIF() + #----------------------------------------------------------------------------- # Redirect output files SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) diff --git a/code/CMakeModules/nel.cmake b/code/CMakeModules/nel.cmake index bd70dd2ff..bac079fb6 100644 --- a/code/CMakeModules/nel.cmake +++ b/code/CMakeModules/nel.cmake @@ -281,6 +281,8 @@ MACRO(NL_SETUP_DEFAULT_OPTIONS) OPTION(WITH_RYZOM "Build Ryzom Core." ON ) OPTION(WITH_SNOWBALLS "Build Snowballs." OFF) OPTION(WITH_TOOLS "Build Tools" OFF) + + OPTION(WITH_RYZOM_LIVE "Use ryzom.com urls" OFF) ENDMACRO(NL_SETUP_DEFAULT_OPTIONS) MACRO(NL_SETUP_NEL_DEFAULT_OPTIONS) diff --git a/code/config.h.cmake b/code/config.h.cmake index 9d698ac08..fa4749cb2 100644 --- a/code/config.h.cmake +++ b/code/config.h.cmake @@ -33,6 +33,14 @@ #cmakedefine RYZOM_VERSION_RC ${RYZOM_VERSION_RC} #cmakedefine RYZOM_PRODUCT_VERSION "${RYZOM_PRODUCT_VERSION}" +#cmakedefine RYZOM_CLIENT_CREATE_ACCOUNT_URL "${RYZOM_CLIENT_CREATE_ACCOUNT_URL}" +#cmakedefine RYZOM_CLIENT_EDIT_ACCOUNT_URL "${RYZOM_CLIENT_EDIT_ACCOUNT_URL}" +#cmakedefine RYZOM_CLIENT_FORGET_PASSWORD_URL "${RYZOM_CLIENT_FORGET_PASSWORD_URL}" +#cmakedefine RYZOM_CLIENT_PATCH_URL "${RYZOM_CLIENT_PATCH_URL}" + +#cmakedefine RYZOM_WEBIG_MAIN_URL "${RYZOM_WEBIG_MAIN_URL}" +#cmakedefine RYZOM_WEBIG_TRUSTED_DOMAIN "${RYZOM_WEBIG_TRUSTED_DOMAIN}" + #cmakedefine AUTHOR "${AUTHOR}" #cmakedefine YEAR "${YEAR}" #cmakedefine COPYRIGHT "${COPYRIGHT}" diff --git a/code/ryzom/client/src/client_cfg.cpp b/code/ryzom/client/src/client_cfg.cpp index bfd6452ee..aac38c885 100644 --- a/code/ryzom/client/src/client_cfg.cpp +++ b/code/ryzom/client/src/client_cfg.cpp @@ -42,6 +42,10 @@ // Game Share. #include "game_share/time_weather_season/time_and_season.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #ifdef NL_OS_MAC #include "app_bundle_utils.h" #endif // NL_OS_MAC @@ -330,9 +334,9 @@ CClientConfig::CClientConfig() TexturesLoginInterface.push_back("texture_interfaces_v3_login"); DisplayAccountButtons = true; - CreateAccountURL = "https://open.ryzom.dev/ams/"; - EditAccountURL = "https://open.ryzom.dev/ams/"; - ForgetPwdURL = "https://open.ryzom.dev/ams/"; + CreateAccountURL = RYZOM_CLIENT_CREATE_ACCOUNT_URL; // "https://open.ryzom.dev/ams/"; + EditAccountURL = RYZOM_CLIENT_EDIT_ACCOUNT_URL; // "https://open.ryzom.dev/ams/"; + ForgetPwdURL = RYZOM_CLIENT_FORGET_PASSWORD_URL; // "https://open.ryzom.dev/ams/"; Position = CVector(0.f, 0.f, 0.f); // Default Position. Heading = CVector(0.f, 1.f, 0.f); // Default Heading. EyesHeight = 1.5f; // Default User Eyes Height. @@ -428,8 +432,8 @@ CClientConfig::CClientConfig() PatchletUrl.clear(); PatchVersion.clear(); - WebIgMainDomain = "https://open.ryzom.dev"; - WebIgTrustedDomains.push_back("open.ryzom.dev"); + WebIgMainDomain = RYZOM_WEBIG_MAIN_URL; // https://open.ryzom.dev/" + WebIgTrustedDomains.push_back(RYZOM_WEBIG_TRUSTED_DOMAIN); // open.ryzom.dev WebIgNotifInterval = 10; // time in minutes CurlMaxConnections = 5; diff --git a/code/ryzom/tools/client/client_patcher/main.cpp b/code/ryzom/tools/client/client_patcher/main.cpp index 0c1a13832..e7d57a335 100644 --- a/code/ryzom/tools/client/client_patcher/main.cpp +++ b/code/ryzom/tools/client/client_patcher/main.cpp @@ -191,7 +191,7 @@ struct CClientPatcherTranslations : public NLMISC::CI18N::ILoadProxy }; // hardcoded URL to not depend on external files -static const std::string PatchUrl = "https://cdn.ryzom.dev/open/patch"; +static const std::string PatchUrl = RYZOM_CLIENT_PATCH_URL; // "https://cdn.ryzom.dev/open/patch"; int main(int argc, char *argv[]) { From 03340ee875a349080f761a4ce2a7fb762b7d76eb Mon Sep 17 00:00:00 2001 From: Jan Boon Date: Wed, 27 Nov 2019 09:16:28 +0800 Subject: [PATCH 086/236] Tag cleanup --HG-- branch : develop --- .hgtags | 55 +++++++++++++++++++++++++++---------------------------- 1 file changed, 27 insertions(+), 28 deletions(-) diff --git a/.hgtags b/.hgtags index 6eeec5b9a..38ed6cd84 100644 --- a/.hgtags +++ b/.hgtags @@ -1,28 +1,27 @@ -4eddbaff0c5e5d685db96ee3e8427aa0fd96ac83 ryzomcore/v0.8.0 -00d9b6e29e95f56785fbf85abe60afd34674f402 ryzomcore/v0.9.0 -79776c337176dd5b02e1a74fe5dfb703b91747aa ryzomcore/v0.9.1 -fedf2aa443d09707beed814b0f499c6a5519cc84 ryzomcore/v0.10.0 -edaa3624a56420b02ccc64c26059801a389927ee ryzomcore/v0.11.0 -e3fe4855f22c3e75722e015dc33c091c340b3ad7 ryzomcore/v0.11.1 -9e583b717fd63be0be9fd60b99087abf1691ea49 ryzomcore/v0.11.2 -bfe5628e14a024ba7ea32e4b326ae433a07856b9 ryzomcore/v0.11.3 -9a6120735daa97c96ac5d85ca35c7f21f607bd87 ryzomcore/v0.12.0 -3e17907af67e8d66d80e6b714707bbf912607f2a ryzom-patch-3.0.0 -153e0b605c9e0c83ba05b6428c62838b49cc84b2 ryzom-patch-3.0.1 -9d41f2994d44b9aad92b83f945f114e4b6bed44a ryzom-patch-3.0.2 -4300cc14aad098b1f86ea4c55577b7fa4a4cb5d2 ryzom-patch-3.1.0 -d4060f217f4f834cc62a33f2f1ccdf3c28298066 ryzom-patch-3.1.0-hotfix -043aaeb3d8a2a54177581b57bda87a9deaad510e ryzom-patch-3.1.0-april_patch -4036ecf59e83960f03acebc2089eb2ff5eeaed0a ryzom-patch-3.2.0 -18403bb9485da3d9742c6f007a16d5619ebfb196 ryzom-patch-3.2.1 -822ff8f8917ad66e09e2c21c983282f6f693b9f6 ryzom-patch-3.3.0 -00dde390a394fce9da06c2f3264140282158d39f ryzom-patch-3.3.0 -0000000000000000000000000000000000000000 3.3.0 -dcd4c4d161ef775136e18c7e8f5072b75dede27e ryzom-patch-3.3.1 -fc4be8ebec5ca754ef4453bc6a9faef90837c674 ryzom-patch-3.4.0 -70eba02e8eab6920586dbabf74e9e8180c729980 ryzom-patch-3.4.0 Steam Fix -3941482843f9cd130cfc16634efc08d34a98ed35 ryzom-patch-3.4.0 Atysmas -ecae9feb4cceb78103e5d7236caccaf450796cdb ryzom-patch-3.5.0 -95783afa226f241062134eb62f4323295d29ac84 ryzom-patch-3.5.0.9637 -8eb94c3549be898fdc4a7c6d791d2477bdc11a18 ryzomcore/v1.0.1 -3e92c7104c20d6bc6c2147b4b5fc289e8621d322 ryzomcore/v1.0.0 +4eddbaff0c5e5d685db96ee3e8427aa0fd96ac83 v0.8.0 +00d9b6e29e95f56785fbf85abe60afd34674f402 v0.9.0 +79776c337176dd5b02e1a74fe5dfb703b91747aa v0.9.1 +fedf2aa443d09707beed814b0f499c6a5519cc84 v0.10.0 +edaa3624a56420b02ccc64c26059801a389927ee v0.11.0 +e3fe4855f22c3e75722e015dc33c091c340b3ad7 v0.11.1 +9e583b717fd63be0be9fd60b99087abf1691ea49 v0.11.2 +bfe5628e14a024ba7ea32e4b326ae433a07856b9 v0.11.3 +9a6120735daa97c96ac5d85ca35c7f21f607bd87 v0.12.0 +3e92c7104c20d6bc6c2147b4b5fc289e8621d322 v1.0.0 +8eb94c3549be898fdc4a7c6d791d2477bdc11a18 v1.0.1 +3e17907af67e8d66d80e6b714707bbf912607f2a ryzom/3.0.0 +153e0b605c9e0c83ba05b6428c62838b49cc84b2 ryzom/3.0.1 +9d41f2994d44b9aad92b83f945f114e4b6bed44a ryzom/3.0.2 +4300cc14aad098b1f86ea4c55577b7fa4a4cb5d2 ryzom/3.1.0 +d4060f217f4f834cc62a33f2f1ccdf3c28298066 ryzom/3.1.0-hotfix +043aaeb3d8a2a54177581b57bda87a9deaad510e ryzom/3.1.0-april_patch +4036ecf59e83960f03acebc2089eb2ff5eeaed0a ryzom/3.2.0 +18403bb9485da3d9742c6f007a16d5619ebfb196 ryzom/3.2.1 +822ff8f8917ad66e09e2c21c983282f6f693b9f6 ryzom/3.3.0 +00dde390a394fce9da06c2f3264140282158d39f ryzom/3.3.0 +dcd4c4d161ef775136e18c7e8f5072b75dede27e ryzom/3.3.1 +fc4be8ebec5ca754ef4453bc6a9faef90837c674 ryzom/3.4.0 +70eba02e8eab6920586dbabf74e9e8180c729980 ryzom/3.4.0-steam_fix +3941482843f9cd130cfc16634efc08d34a98ed35 ryzom/3.4.0-atysmas +ecae9feb4cceb78103e5d7236caccaf450796cdb ryzom/3.5.0 +95783afa226f241062134eb62f4323295d29ac84 ryzom/3.5.0.9637 From b32b1becec0f63e67e57eecb16076b249db33fff Mon Sep 17 00:00:00 2001 From: kaetemi Date: Wed, 27 Nov 2019 17:38:29 +0800 Subject: [PATCH 087/236] Decouple downloader from streamed package manager --- .../include/nel/misc/http_package_provider.h | 50 ++++++ .../nel/misc/i_streamed_package_provider.h | 44 ++++++ code/nel/include/nel/misc/streamed_package.h | 2 + .../nel/misc/streamed_package_manager.h | 15 +- code/nel/include/nel/misc/types_nl.h | 6 + code/nel/src/misc/http_package_provider.cpp | 145 ++++++++++++++++++ .../src/misc/i_streamed_package_provider.cpp | 37 +++++ .../nel/src/misc/streamed_package_manager.cpp | 102 +----------- code/ryzom/client/src/global.cpp | 3 + code/ryzom/client/src/global.h | 8 + code/ryzom/client/src/init.cpp | 10 +- code/ryzom/client/src/release.cpp | 2 + 12 files changed, 319 insertions(+), 105 deletions(-) create mode 100644 code/nel/include/nel/misc/http_package_provider.h create mode 100644 code/nel/include/nel/misc/i_streamed_package_provider.h create mode 100644 code/nel/src/misc/http_package_provider.cpp create mode 100644 code/nel/src/misc/i_streamed_package_provider.cpp diff --git a/code/nel/include/nel/misc/http_package_provider.h b/code/nel/include/nel/misc/http_package_provider.h new file mode 100644 index 000000000..b4b82d70a --- /dev/null +++ b/code/nel/include/nel/misc/http_package_provider.h @@ -0,0 +1,50 @@ +// NeL - MMORPG Framework +// Copyright (C) 2019 Jan BOON (jan.boon@kaetemi.be) +// +// 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 +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +#ifndef NLMISC_HTTP_PACKAGE_PROVIDER_H +#define NLMISC_HTTP_PACKAGE_PROVIDER_H + +#include +#include + +namespace NLMISC { + +class CHttpPackageProvider : public IStreamedPackageProvider +{ +public: + CHttpPackageProvider(); + virtual ~CHttpPackageProvider(); + + /// Download a file. This call is blocking + /// filePath: [out] ex. /games/nel/stream/00/00/000000000.. + /// hash: [in] + virtual bool getFile(std::string &filePath, const CHashKey &hash, const std::string &name) NL_OVERRIDE; + +public: + /// Set storage path (ex. stream/) + std::string Path; + + /// Loads a package into the package manager (ex. http://cdn.ryzom.dev/open/stream/) + typedef std::vector THosts; + THosts Hosts; + +}; /* class CHttpPackageProvider */ + +} /* namespace NLMISC */ + +#endif /* #ifndef NLMISC_STREAMED_PACKAGE_MANAGER_H */ + +/* end of file */ diff --git a/code/nel/include/nel/misc/i_streamed_package_provider.h b/code/nel/include/nel/misc/i_streamed_package_provider.h new file mode 100644 index 000000000..6e74d866d --- /dev/null +++ b/code/nel/include/nel/misc/i_streamed_package_provider.h @@ -0,0 +1,44 @@ +// NeL - MMORPG Framework +// Copyright (C) 2019 Jan BOON (jan.boon@kaetemi.be) +// +// 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 +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +#ifndef NLMISC_STREAMED_PACKAGE_PROVIDER_H +#define NLMISC_STREAMED_PACKAGE_PROVIDER_H + +#include +#include +#include + +namespace NLMISC { + +class IStreamedPackageProvider +{ +public: + IStreamedPackageProvider(); + virtual ~IStreamedPackageProvider(); + + /// Download a file. This call is blocking + /// filePath: [out] ex. /games/nel/stream/00/00/000000000.. + /// hash: [in] + /// name: [in] name for debugging + virtual bool getFile(std::string &filePath, const CHashKey &hash, const std::string &name = ""); + +}; /* class IStreamedPackageProvider */ + +} /* namespace NLMISC */ + +#endif /* #ifndef NLMISC_STREAMED_PACKAGE_PROVIDER_H */ + +/* end of file */ diff --git a/code/nel/include/nel/misc/streamed_package.h b/code/nel/include/nel/misc/streamed_package.h index c777d8a02..9040598d6 100644 --- a/code/nel/include/nel/misc/streamed_package.h +++ b/code/nel/include/nel/misc/streamed_package.h @@ -42,6 +42,8 @@ public: void serial(NLMISC::IStream &f) throw(NLMISC::EStream); + /// result: [out] ex. /00/00/000000000.. + /// hash: [in] static void makePath(std::string &result, const CHashKey &hash); public: diff --git a/code/nel/include/nel/misc/streamed_package_manager.h b/code/nel/include/nel/misc/streamed_package_manager.h index e23344a70..85d13db59 100644 --- a/code/nel/include/nel/misc/streamed_package_manager.h +++ b/code/nel/include/nel/misc/streamed_package_manager.h @@ -20,6 +20,7 @@ #include #include #include +#include namespace NLMISC { @@ -40,21 +41,19 @@ public: /// Unload all packages void unloadAll(); - /// Get an existing file or download if necessary + /// Get an existing file or download if necessary. This call is blocking /// filePath: [out] ex. /games/nel/stream/00/00/000000000.. - /// fileName: ex. fy_hof_underwear.dds + /// fileName: [in] ex. fy_hof_underwear.dds bool getFile(std::string &filePath, const std::string &fileName); /// Get file size + /// fileSize: [out] + /// fileName: [in] ex. fy_hof_underwear.dds bool getFileSize(uint32 &fileSize, const std::string &fileName); public: - /// Set storage path (ex. stream/) - std::string Path; - - /// Loads a package into the package manager (ex. http://patch.live.polyverse.org/stream/) - typedef std::vector THosts; - THosts Hosts; + /// Streamed package provider. This downloads the files + IStreamedPackageProvider *Provider; private: typedef std::map TPackages; diff --git a/code/nel/include/nel/misc/types_nl.h b/code/nel/include/nel/misc/types_nl.h index 353f50490..f42f410e6 100644 --- a/code/nel/include/nel/misc/types_nl.h +++ b/code/nel/include/nel/misc/types_nl.h @@ -479,6 +479,7 @@ extern void operator delete[](void *p) throw(); # define CHashMultiMap NL_ISO_STDTR1_NAMESPACE::unordered_multimap # define CUniquePtr ::std::auto_ptr # define CUniquePtrMove +# define NL_OVERRIDE #elif defined(NL_COMP_VC) && (NL_COMP_VC_VERSION >= 70 && NL_COMP_VC_VERSION <= 90) // VC7 through 9 # include # include @@ -487,6 +488,7 @@ extern void operator delete[](void *p) throw(); # define CHashMultiMap stdext::hash_multimap # define CUniquePtr ::std::auto_ptr # define CUniquePtrMove +# define NL_OVERRIDE #elif defined(NL_COMP_GCC) // GCC4 # include # include @@ -526,6 +528,10 @@ template<> struct hash */ typedef uint16 ucchar; +#ifndef NL_OVERRIDE +#define NL_OVERRIDE override +#endif + #if defined(NL_OS_WINDOWS) && (defined(UNICODE) || defined(_UNICODE)) #define nltmain wmain #define nltWinMain wWinMain diff --git a/code/nel/src/misc/http_package_provider.cpp b/code/nel/src/misc/http_package_provider.cpp new file mode 100644 index 000000000..035fa2a5d --- /dev/null +++ b/code/nel/src/misc/http_package_provider.cpp @@ -0,0 +1,145 @@ +// NeL - MMORPG Framework +// Copyright (C) 2019 Jan BOON (jan.boon@kaetemi.be) +// +// 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 +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +#include "stdmisc.h" + +// 3rd Party includes +#include + +// Project includes +#include +#include +#include +#include +#include +#include + +namespace NLMISC +{ + +CHttpPackageProvider::CHttpPackageProvider() +{ + // init +} + +CHttpPackageProvider::~CHttpPackageProvider() +{ + // release +} + +bool CHttpPackageProvider::getFile(std::string &filePath, const CHashKey &hash, const std::string &name) +{ + CStreamedPackage::makePath(filePath, hash); + std::string downloadUrlFile = filePath + ".lzma"; + filePath = Path + filePath; + std::string downloadPath = filePath + ".download." + toString(rand() * rand()); + + std::string storageDirectory = CFile::getPath(downloadPath); + CFile::createDirectoryTree(storageDirectory); + /*if (!CFile::isDirectory(storageDirectory) || !CFile::createDirectoryTree(storageDirectory)) + { + nldebug("Unable to create directory '%s'", storageDirectory.c_str()); + return false; + }*/ + + // download + for (;;) + { + if (CFile::fileExists(filePath)) + return true; + + std::string downloadUrl = Hosts[rand() % Hosts.size()] + downloadUrlFile; + nldebug("Download streamed package '%s' from '%s'", name.c_str(), downloadUrl.c_str()); + + FILE *fp = fopen(downloadPath.c_str(), "wb"); + if (fp == NULL) + { + nldebug("Unable to create file '%s' for '%s'", downloadPath.c_str(), name.c_str()); + return false; + } + + CURL *curl; + CURLcode res; + curl = curl_easy_init(); + if (curl) + { + curl_easy_setopt(curl, CURLOPT_URL, downloadUrl.c_str()); + curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L); + curl_easy_setopt(curl, CURLOPT_FILE, fp); + res = curl_easy_perform(curl); + long r; + curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &r); + curl_easy_cleanup(curl); + + bool diskFull = ferror(fp) && errno == 28 /*ENOSPC*/; + fclose(fp); + + if (diskFull) + { + CFile::deleteFile(downloadPath); + throw EDiskFullError(downloadPath); + } + + if (res != CURLE_OK || r < 200 || r >= 300) + { + CFile::deleteFile(downloadPath); + nldebug("Download failed '%s', retry in 1s", downloadUrl.c_str()); + nlSleep(1000); + continue; + } + } + else + { + nldebug("Curl initialize failed"); + fclose(fp); + CFile::deleteFile(downloadPath); + return false; + } + + // ok! + break; + } + + // extract into file + std::string unpackPath = filePath + ".extract." + toString(rand() * rand()); + + CHashKey outHash; + if (!unpackLZMA(downloadPath, unpackPath, outHash)) + { + return false; + } + + if (!(outHash == hash)) + { + std::string wantHashS = hash.toString(); + std::string outHashS = outHash.toString(); + nlwarning("Invalid SHA1 hash for file '%s', download has hash '%s'", wantHashS.c_str(), outHashS.c_str()); + return false; + } + + if (!CFile::moveFile(filePath.c_str(), unpackPath.c_str())) + { + nldebug("Failed moving '%s' to '%s'", unpackPath.c_str(), filePath.c_str()); + // in case downloaded from another thread + return CFile::fileExists(filePath); + } + + return true; +} + +} /* namespace NLMISC */ + +/* end of file */ diff --git a/code/nel/src/misc/i_streamed_package_provider.cpp b/code/nel/src/misc/i_streamed_package_provider.cpp new file mode 100644 index 000000000..12c873760 --- /dev/null +++ b/code/nel/src/misc/i_streamed_package_provider.cpp @@ -0,0 +1,37 @@ +// NeL - MMORPG Framework +// Copyright (C) 2019 Jan BOON (jan.boon@kaetemi.be) +// +// 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 +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +#include "stdmisc.h" + +// Project includes +#include + +namespace NLMISC +{ + +IStreamedPackageProvider::IStreamedPackageProvider() +{ + // init +} + +IStreamedPackageProvider::~IStreamedPackageProvider() +{ + // release +} + +} /* namespace NLMISC */ + +/* end of file */ diff --git a/code/nel/src/misc/streamed_package_manager.cpp b/code/nel/src/misc/streamed_package_manager.cpp index 483df6a52..ac605b049 100644 --- a/code/nel/src/misc/streamed_package_manager.cpp +++ b/code/nel/src/misc/streamed_package_manager.cpp @@ -16,14 +16,10 @@ #include "stdmisc.h" -// 3rd Party includes -#include - // Project includes #include #include #include -#include #include namespace NLMISC @@ -96,105 +92,21 @@ bool CStreamedPackageManager::getFile(std::string &filePath, const std::string & { // nldebug("Get file path for streamed file '%s'", fileName.c_str()); - TEntries::iterator it = m_Entries.find(fileName); - if (it == m_Entries.end()) - return false; - const CStreamedPackage::CEntry *entry = it->second; - - CStreamedPackage::makePath(filePath, entry->Hash); - std::string downloadUrlFile = filePath + ".lzma"; - filePath = Path + filePath; - std::string downloadPath = filePath + ".download." + toString(rand() * rand()); - - std::string storageDirectory = CFile::getPath(downloadPath); - CFile::createDirectoryTree(storageDirectory); - /*if (!CFile::isDirectory(storageDirectory) || !CFile::createDirectoryTree(storageDirectory)) + IStreamedPackageProvider *provider = Provider; + if (!provider) { - nldebug("Unable to create directory '%s'", storageDirectory.c_str()); + nlerrornoex("No streamed package provider was set"); return false; - }*/ - - // download - for (;;) - { - if (CFile::fileExists(filePath)) - return true; - - std::string downloadUrl = Hosts[rand() % Hosts.size()] + downloadUrlFile; - nldebug("Download streamed package '%s' from '%s'", fileName.c_str(), downloadUrl.c_str()); - - FILE *fp = fopen(downloadPath.c_str(), "wb"); - if (fp == NULL) - { - nldebug("Unable to create file '%s' for '%s'", downloadPath.c_str(), fileName.c_str()); - return false; - } - - CURL *curl; - CURLcode res; - curl = curl_easy_init(); - if (curl) - { - curl_easy_setopt(curl, CURLOPT_URL, downloadUrl.c_str()); - curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L); - curl_easy_setopt(curl, CURLOPT_FILE, fp); - res = curl_easy_perform(curl); - long r; - curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &r); - curl_easy_cleanup(curl); - - bool diskFull = ferror(fp) && errno == 28 /*ENOSPC*/; - fclose(fp); - - if (diskFull) - { - CFile::deleteFile(downloadPath); - throw EDiskFullError(downloadPath); - } - - if (res != CURLE_OK || r < 200 || r >= 300) - { - CFile::deleteFile(downloadPath); - nldebug("Download failed '%s', retry in 1s", downloadUrl.c_str()); - nlSleep(1000); - continue; - } - } - else - { - nldebug("Curl initialize failed"); - fclose(fp); - CFile::deleteFile(downloadPath); - return false; - } - - // ok! - break; } - // extract into file - std::string unpackPath = filePath + ".extract." + toString(rand() * rand()); - - CHashKey outHash; - if (!unpackLZMA(downloadPath, unpackPath, outHash)) - { - return false; - } - - if (!(outHash == entry->Hash)) + TEntries::iterator it = m_Entries.find(fileName); + if (it == m_Entries.end()) { - std::string wantHashS = entry->Hash.toString(); - std::string outHashS = outHash.toString(); - nlwarning("Invalid SHA1 hash for file '%s', download has hash '%s'", wantHashS.c_str(), outHashS.c_str()); return false; } + const CStreamedPackage::CEntry *entry = it->second; - if (!CFile::moveFile(filePath.c_str(), unpackPath.c_str())) - { - nldebug("Failed moving '%s' to '%s'", unpackPath.c_str(), filePath.c_str()); - // in case downloaded from another thread - return CFile::fileExists(filePath); - } + return provider->getFile(filePath, entry->Hash, fileName); return true; } diff --git a/code/ryzom/client/src/global.cpp b/code/ryzom/client/src/global.cpp index 4b8e1aad7..41d41160c 100644 --- a/code/ryzom/client/src/global.cpp +++ b/code/ryzom/client/src/global.cpp @@ -24,6 +24,9 @@ using namespace NLMISC; // *************************************************************************** +// Data +NLMISC::CHttpPackageProvider *HttpPackageProvider = NULL; + // Main System NL3D::UDriver *Driver = NULL; // The main 3D Driver NL3D::IStereoDisplay *StereoDisplay = NULL; // Stereo display diff --git a/code/ryzom/client/src/global.h b/code/ryzom/client/src/global.h index 78cebcec9..75ba2381d 100644 --- a/code/ryzom/client/src/global.h +++ b/code/ryzom/client/src/global.h @@ -28,6 +28,11 @@ // *************************************************************************** +namespace NLMISC +{ + class CHttpPackageProvider; +} + namespace NL3D { class UDriver; @@ -78,6 +83,9 @@ const float ExtraZoneLoadingVision = 100.f; // *************************************************************************** +// Data +extern NLMISC::CHttpPackageProvider *HttpPackageProvider; // Http provider from on-the-fly downloaded game data + // Main System extern NL3D::UDriver *Driver; // The main 3D Driver extern NL3D::IStereoDisplay *StereoDisplay; // Stereo display diff --git a/code/ryzom/client/src/init.cpp b/code/ryzom/client/src/init.cpp index 1f9c10b34..85eb50b51 100644 --- a/code/ryzom/client/src/init.cpp +++ b/code/ryzom/client/src/init.cpp @@ -35,6 +35,7 @@ #include "nel/misc/block_memory.h" #include "nel/misc/system_utils.h" #include "nel/misc/streamed_package_manager.h" +#include "nel/misc/http_package_provider.h" #include "nel/misc/cmd_args.h" // 3D Interface. #include "nel/3d/bloom_effect.h" @@ -740,9 +741,14 @@ static void addPaths(IProgressCallback &progress, const std::vector void initStreamedPackageManager(NLMISC::IProgressCallback &progress) { CStreamedPackageManager &spm = CStreamedPackageManager::getInstance(); - spm.Path = ClientCfg.StreamedPackagePath; + nlassert(!spm.Provider); // If this asserts, init was called twice without release + nlassert(!HttpPackageProvider); // Idem + CHttpPackageProvider *hpp = new CHttpPackageProvider(); + hpp->Path = ClientCfg.StreamedPackagePath; for (uint i = 0; i < ClientCfg.StreamedPackageHosts.size(); i++) - spm.Hosts.push_back(ClientCfg.StreamedPackageHosts[i]); + hpp->Hosts.push_back(ClientCfg.StreamedPackageHosts[i]); + spm.Provider = hpp; + HttpPackageProvider = hpp; } void addSearchPaths(IProgressCallback &progress) diff --git a/code/ryzom/client/src/release.cpp b/code/ryzom/client/src/release.cpp index be34d9ba8..6686fea5d 100644 --- a/code/ryzom/client/src/release.cpp +++ b/code/ryzom/client/src/release.cpp @@ -668,6 +668,8 @@ void release() NLMISC::CBigFile::getInstance().removeAll(); NLMISC::CBigFile::releaseInstance(); NLMISC::CStreamedPackageManager::releaseInstance(); + delete HttpPackageProvider; + HttpPackageProvider = NULL; NL3D::CFastHLSModifier::releaseInstance(); CLandscapePolyDrawer::releaseInstance(); NL3D::CParticleSystemShape::releaseInstance(); From 09e31cf75a2e883a2bcc1fb2db84fb9a531aacf3 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Wed, 27 Nov 2019 17:48:54 +0800 Subject: [PATCH 088/236] Fix --- code/nel/include/nel/misc/i_streamed_package_provider.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/nel/include/nel/misc/i_streamed_package_provider.h b/code/nel/include/nel/misc/i_streamed_package_provider.h index 6e74d866d..320e3cdfd 100644 --- a/code/nel/include/nel/misc/i_streamed_package_provider.h +++ b/code/nel/include/nel/misc/i_streamed_package_provider.h @@ -33,7 +33,7 @@ public: /// filePath: [out] ex. /games/nel/stream/00/00/000000000.. /// hash: [in] /// name: [in] name for debugging - virtual bool getFile(std::string &filePath, const CHashKey &hash, const std::string &name = ""); + virtual bool getFile(std::string &filePath, const CHashKey &hash, const std::string &name = "") = 0; }; /* class IStreamedPackageProvider */ From 1cf2a792aef1d3d7c4258ee6b19103494f51e1a1 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Wed, 27 Nov 2019 17:53:41 +0800 Subject: [PATCH 089/236] Reverse unneeded change from merge --- code/nel/include/nel/misc/path.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/nel/include/nel/misc/path.h b/code/nel/include/nel/misc/path.h index de46532b7..5a9c417a2 100644 --- a/code/nel/include/nel/misc/path.h +++ b/code/nel/include/nel/misc/path.h @@ -279,8 +279,8 @@ private: struct CMCFileEntry { char *Name; // Normal case (the search is done by using nlstricmp) - uint32 idPath : 20; // Path (not with file at the end) - look in the SSMpath (1048576 different path allowed) - uint32 idExt : 11; // real extension of the file if remapped - look in the SSMext (2048 different extension allowed) + uint32 idPath : 16; // Path (not with file at the end) - look in the SSMpath (65536 different path allowed) + uint32 idExt : 15; // real extension of the file if remapped - look in the SSMext (32768 different extension allowed) uint32 Remapped : 1; // true if the file is remapped }; From 76e0e9c105090b0d8de9f3dad2979fd32ad2aaf1 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Wed, 27 Nov 2019 18:40:31 +0800 Subject: [PATCH 090/236] Move HTTP related code into new NLWEB library --- code/CMakeModules/nel.cmake | 1 + code/nel/include/nel/CMakeLists.txt | 4 + code/nel/include/nel/web/CMakeLists.txt | 2 + .../nel/{misc => web}/curl_certificates.h | 2 +- .../nel/{misc => web}/http_client_curl.h | 2 +- .../nel/{misc => web}/http_package_provider.h | 12 +-- code/nel/src/CMakeLists.txt | 4 + code/nel/src/gui/CMakeLists.txt | 2 +- code/nel/src/gui/group_html.cpp | 6 +- code/nel/src/misc/CMakeLists.txt | 6 +- code/nel/src/web/CMakeLists.txt | 28 ++++++ .../src/{misc => web}/curl_certificates.cpp | 21 ++--- .../src/{misc => web}/http_client_curl.cpp | 15 ++-- .../{misc => web}/http_package_provider.cpp | 13 +-- code/nel/src/web/stdweb.cpp | 17 ++++ code/nel/src/web/stdweb.h | 85 +++++++++++++++++++ code/ryzom/client/src/global.cpp | 2 +- code/ryzom/client/src/global.h | 4 +- code/ryzom/client/src/init.cpp | 4 +- code/ryzom/client/src/init_main_loop.cpp | 6 +- .../src/interface_v3/group_html_webig.cpp | 4 +- .../src/interface_v3/interface_manager.cpp | 4 +- code/ryzom/client/src/login.cpp | 3 +- code/ryzom/client/src/login.h | 4 +- code/ryzom/client/src/login_patch.cpp | 6 +- .../client/client_patcher/CMakeLists.txt | 1 + 26 files changed, 195 insertions(+), 63 deletions(-) create mode 100644 code/nel/include/nel/web/CMakeLists.txt rename code/nel/include/nel/{misc => web}/curl_certificates.h (98%) rename code/nel/include/nel/{misc => web}/http_client_curl.h (99%) rename code/nel/include/nel/{misc => web}/http_package_provider.h (80%) create mode 100644 code/nel/src/web/CMakeLists.txt rename code/nel/src/{misc => web}/curl_certificates.cpp (97%) rename code/nel/src/{misc => web}/http_client_curl.cpp (97%) rename code/nel/src/{misc => web}/http_package_provider.cpp (96%) create mode 100644 code/nel/src/web/stdweb.cpp create mode 100644 code/nel/src/web/stdweb.h diff --git a/code/CMakeModules/nel.cmake b/code/CMakeModules/nel.cmake index bac079fb6..f8d01a0bc 100644 --- a/code/CMakeModules/nel.cmake +++ b/code/CMakeModules/nel.cmake @@ -291,6 +291,7 @@ MACRO(NL_SETUP_NEL_DEFAULT_OPTIONS) ### OPTION(WITH_NET "Build NLNET" ON ) OPTION(WITH_3D "Build NL3D" ON ) + OPTION(WITH_WEB "Build WEB" ON ) OPTION(WITH_GUI "Build GUI" ON ) OPTION(WITH_PACS "Build NLPACS" ON ) OPTION(WITH_GEORGES "Build NLGEORGES" ON ) diff --git a/code/nel/include/nel/CMakeLists.txt b/code/nel/include/nel/CMakeLists.txt index 4df9413b5..fda0ddbe9 100644 --- a/code/nel/include/nel/CMakeLists.txt +++ b/code/nel/include/nel/CMakeLists.txt @@ -4,6 +4,10 @@ IF(WITH_3D) SUBDIRS(3d) ENDIF() +IF(WITH_WEB OR WITH_GUI) + ADD_SUBDIRECTORY(web) +ENDIF() + IF(WITH_GUI) ADD_SUBDIRECTORY(gui) ENDIF() diff --git a/code/nel/include/nel/web/CMakeLists.txt b/code/nel/include/nel/web/CMakeLists.txt new file mode 100644 index 000000000..5e560aed8 --- /dev/null +++ b/code/nel/include/nel/web/CMakeLists.txt @@ -0,0 +1,2 @@ +FILE(GLOB HEADERS *.h) +INSTALL(FILES ${HEADERS} DESTINATION include/nel/web COMPONENT headers) diff --git a/code/nel/include/nel/misc/curl_certificates.h b/code/nel/include/nel/web/curl_certificates.h similarity index 98% rename from code/nel/include/nel/misc/curl_certificates.h rename to code/nel/include/nel/web/curl_certificates.h index 778074ca1..b2b031a1a 100644 --- a/code/nel/include/nel/misc/curl_certificates.h +++ b/code/nel/include/nel/web/curl_certificates.h @@ -22,7 +22,7 @@ // forward declaration to avoid curl.h inclusion everywhere typedef void CURL; -namespace NLMISC +namespace NLWEB { class CCurlCertificates { diff --git a/code/nel/include/nel/misc/http_client_curl.h b/code/nel/include/nel/web/http_client_curl.h similarity index 99% rename from code/nel/include/nel/misc/http_client_curl.h rename to code/nel/include/nel/web/http_client_curl.h index b282c2b70..ca005462c 100644 --- a/code/nel/include/nel/misc/http_client_curl.h +++ b/code/nel/include/nel/web/http_client_curl.h @@ -20,7 +20,7 @@ #include "nel/misc/types_nl.h" #include -namespace NLMISC +namespace NLWEB { /** diff --git a/code/nel/include/nel/misc/http_package_provider.h b/code/nel/include/nel/web/http_package_provider.h similarity index 80% rename from code/nel/include/nel/misc/http_package_provider.h rename to code/nel/include/nel/web/http_package_provider.h index b4b82d70a..99cb01b6e 100644 --- a/code/nel/include/nel/misc/http_package_provider.h +++ b/code/nel/include/nel/web/http_package_provider.h @@ -14,15 +14,15 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -#ifndef NLMISC_HTTP_PACKAGE_PROVIDER_H -#define NLMISC_HTTP_PACKAGE_PROVIDER_H +#ifndef NLWEB_HTTP_PACKAGE_PROVIDER_H +#define NLWEB_HTTP_PACKAGE_PROVIDER_H #include #include -namespace NLMISC { +namespace NLWEB { -class CHttpPackageProvider : public IStreamedPackageProvider +class CHttpPackageProvider : public NLMISC::IStreamedPackageProvider { public: CHttpPackageProvider(); @@ -31,7 +31,7 @@ public: /// Download a file. This call is blocking /// filePath: [out] ex. /games/nel/stream/00/00/000000000.. /// hash: [in] - virtual bool getFile(std::string &filePath, const CHashKey &hash, const std::string &name) NL_OVERRIDE; + virtual bool getFile(std::string &filePath, const NLMISC::CHashKey &hash, const std::string &name) NL_OVERRIDE; public: /// Set storage path (ex. stream/) @@ -45,6 +45,6 @@ public: } /* namespace NLMISC */ -#endif /* #ifndef NLMISC_STREAMED_PACKAGE_MANAGER_H */ +#endif /* #ifndef NLWEB_HTTP_PACKAGE_PROVIDER_H */ /* end of file */ diff --git a/code/nel/src/CMakeLists.txt b/code/nel/src/CMakeLists.txt index 2b140340a..6da34b0d0 100644 --- a/code/nel/src/CMakeLists.txt +++ b/code/nel/src/CMakeLists.txt @@ -4,6 +4,10 @@ IF(WITH_3D) ADD_SUBDIRECTORY(3d) ENDIF() +IF(WITH_WEB OR WITH_GUI) + ADD_SUBDIRECTORY(web) +ENDIF() + IF(WITH_GUI) ADD_SUBDIRECTORY(gui) ENDIF() diff --git a/code/nel/src/gui/CMakeLists.txt b/code/nel/src/gui/CMakeLists.txt index 19c0cfea8..bb5a0b7f2 100644 --- a/code/nel/src/gui/CMakeLists.txt +++ b/code/nel/src/gui/CMakeLists.txt @@ -8,7 +8,7 @@ NL_TARGET_LIB(nelgui ${SRC} ${HEADERS}) INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR} ${LUA_INCLUDE_DIR} ${LUABIND_INCLUDE_DIR} ${CURL_INCLUDE_DIRS}) -TARGET_LINK_LIBRARIES(nelgui nelmisc nel3d ${LUA_LIBRARIES} ${LUABIND_LIBRARIES} ${CURL_LIBRARIES}) +TARGET_LINK_LIBRARIES(nelgui nelmisc nelweb nel3d ${LUA_LIBRARIES} ${LUABIND_LIBRARIES} ${CURL_LIBRARIES}) NL_DEFAULT_PROPS(nelgui "NeL, Library: NeL GUI") NL_ADD_RUNTIME_FLAGS(nelgui) diff --git a/code/nel/src/gui/group_html.cpp b/code/nel/src/gui/group_html.cpp index ce719f4b0..8179a6af0 100644 --- a/code/nel/src/gui/group_html.cpp +++ b/code/nel/src/gui/group_html.cpp @@ -47,7 +47,7 @@ #include "nel/gui/url_parser.h" #include "nel/gui/http_cache.h" #include "nel/gui/http_hsts.h" -#include "nel/misc/curl_certificates.h" +#include "nel/web/curl_certificates.h" #include "nel/gui/html_parser.h" #include "nel/gui/html_element.h" #include "nel/gui/css_style.h" @@ -550,7 +550,7 @@ namespace NLGUI if (toLower(download.url.substr(0, 8)) == "https://") { // if supported, use custom SSL context function to load certificates - CCurlCertificates::useCertificates(curl); + NLWEB::CCurlCertificates::useCertificates(curl); } download.data = new CCurlWWWData(curl, download.url); @@ -3823,7 +3823,7 @@ namespace NLGUI if (toLower(url.substr(0, 8)) == "https://") { // if supported, use custom SSL context function to load certificates - CCurlCertificates::useCertificates(curl); + NLWEB::CCurlCertificates::useCertificates(curl); } // do not follow redirects, we have own handler diff --git a/code/nel/src/misc/CMakeLists.txt b/code/nel/src/misc/CMakeLists.txt index 091e181cc..e7b422592 100644 --- a/code/nel/src/misc/CMakeLists.txt +++ b/code/nel/src/misc/CMakeLists.txt @@ -212,16 +212,16 @@ IF(UNIX) ENDIF() INCLUDE_DIRECTORIES(../../3rdparty) -INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR} ${PNG_INCLUDE_DIR} ${CURL_INCLUDE_DIRS} ${OPENSSL_INCLUDE_DIR} config_file) +INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR} ${PNG_INCLUDE_DIR} config_file) -TARGET_LINK_LIBRARIES(nelmisc ${CMAKE_THREAD_LIBS_INIT} ${LIBXML2_LIBRARIES} ${ZLIB_LIBRARY} ${CURL_LIBRARIES} ${OPENSSL_LIBRARIES} nel_sevenzip) +TARGET_LINK_LIBRARIES(nelmisc ${CMAKE_THREAD_LIBS_INIT} ${LIBXML2_LIBRARIES} ${ZLIB_LIBRARY} nel_sevenzip) NL_DEFAULT_PROPS(nelmisc "NeL, Library: NeL Misc") NL_ADD_RUNTIME_FLAGS(nelmisc) NL_ADD_LIB_SUFFIX(nelmisc) -ADD_DEFINITIONS(${LIBXML2_DEFINITIONS} ${CURL_DEFINITIONS}) +ADD_DEFINITIONS(${LIBXML2_DEFINITIONS}) IF(WITH_PCH) ADD_NATIVE_PRECOMPILED_HEADER(nelmisc ${CMAKE_CURRENT_SOURCE_DIR}/stdmisc.h ${CMAKE_CURRENT_SOURCE_DIR}/stdmisc.cpp) diff --git a/code/nel/src/web/CMakeLists.txt b/code/nel/src/web/CMakeLists.txt new file mode 100644 index 000000000..042967fa2 --- /dev/null +++ b/code/nel/src/web/CMakeLists.txt @@ -0,0 +1,28 @@ +FILE(GLOB SRC *.cpp *.h) +FILE(GLOB HEADERS ../../include/nel/web/*.h) + +SOURCE_GROUP("" FILES ${SRC} ${HEADERS}) + +NL_TARGET_LIB(nelweb ${HEADERS} ${SRC}) + +INCLUDE_DIRECTORIES(../../3rdparty) +INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR} ${CURL_INCLUDE_DIRS} ${OPENSSL_INCLUDE_DIR}) + +TARGET_LINK_LIBRARIES(nelweb ${LIBXML2_LIBRARIES} ${CURL_LIBRARIES} ${OPENSSL_LIBRARIES} nelmisc nel_sevenzip) + +NL_DEFAULT_PROPS(nelweb "NeL, Library: NeL Web") +NL_ADD_RUNTIME_FLAGS(nelweb) + +NL_ADD_LIB_SUFFIX(nelweb) + +ADD_DEFINITIONS(${LIBXML2_DEFINITIONS} ${CURL_DEFINITIONS}) + +IF(WITH_PCH) + ADD_NATIVE_PRECOMPILED_HEADER(nelweb ${CMAKE_CURRENT_SOURCE_DIR}/stdweb.h ${CMAKE_CURRENT_SOURCE_DIR}/stdweb.cpp) +ENDIF() + +NL_GEN_PC(nel-web.pc) + +IF((WITH_INSTALL_LIBRARIES AND WITH_STATIC) OR NOT WITH_STATIC) + INSTALL(TARGETS nelweb LIBRARY DESTINATION ${NL_LIB_PREFIX} ARCHIVE DESTINATION ${NL_LIB_PREFIX} COMPONENT libraries) +ENDIF() diff --git a/code/nel/src/misc/curl_certificates.cpp b/code/nel/src/web/curl_certificates.cpp similarity index 97% rename from code/nel/src/misc/curl_certificates.cpp rename to code/nel/src/web/curl_certificates.cpp index 9dcdc72db..84b41e609 100644 --- a/code/nel/src/misc/curl_certificates.cpp +++ b/code/nel/src/web/curl_certificates.cpp @@ -14,26 +14,14 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -#include "stdmisc.h" -#include +#include "stdweb.h" +#include + #include #include #include #include -#include -#include -#include - -#include - -#ifdef NL_OS_WINDOWS -#include -#ifdef X509_NAME -#undef X509_NAME -#endif -#endif - // for compatibility with older versions #ifndef CURL_AT_LEAST_VERSION #define CURL_VERSION_BITS(x,y,z) ((x)<<16|(y)<<8|z) @@ -44,12 +32,13 @@ using namespace std; using namespace NLMISC; +using namespace NLWEB; #ifdef DEBUG_NEW #define new DEBUG_NEW #endif -namespace NLMISC +namespace NLWEB { // // x509CertList lifetime manager diff --git a/code/nel/src/misc/http_client_curl.cpp b/code/nel/src/web/http_client_curl.cpp similarity index 97% rename from code/nel/src/misc/http_client_curl.cpp rename to code/nel/src/web/http_client_curl.cpp index d335716b0..31d54767d 100644 --- a/code/nel/src/misc/http_client_curl.cpp +++ b/code/nel/src/web/http_client_curl.cpp @@ -14,16 +14,15 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -#include "stdmisc.h" -#include -#include - -#include +#include "stdweb.h" +#include -#include +#include +#include -using namespace NLMISC; using namespace std; +using namespace NLMISC; +using namespace NLWEB; #ifdef DEBUG_NEW #define new DEBUG_NEW @@ -31,7 +30,7 @@ using namespace std; #define _Curl (CURL *)_CurlStruct -namespace NLMISC +namespace NLWEB { // Ugly CURL callback diff --git a/code/nel/src/misc/http_package_provider.cpp b/code/nel/src/web/http_package_provider.cpp similarity index 96% rename from code/nel/src/misc/http_package_provider.cpp rename to code/nel/src/web/http_package_provider.cpp index 035fa2a5d..2ddc665b9 100644 --- a/code/nel/src/misc/http_package_provider.cpp +++ b/code/nel/src/web/http_package_provider.cpp @@ -14,20 +14,21 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -#include "stdmisc.h" - -// 3rd Party includes -#include +#include "stdweb.h" +#include // Project includes -#include #include #include #include #include #include -namespace NLMISC +using namespace std; +using namespace NLMISC; +using namespace NLWEB; + +namespace NLWEB { CHttpPackageProvider::CHttpPackageProvider() diff --git a/code/nel/src/web/stdweb.cpp b/code/nel/src/web/stdweb.cpp new file mode 100644 index 000000000..d85dbcdc5 --- /dev/null +++ b/code/nel/src/web/stdweb.cpp @@ -0,0 +1,17 @@ +// NeL - MMORPG Framework +// Copyright (C) 2010 Winch Gate Property Limited +// +// 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 +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +#include "stdweb.h" diff --git a/code/nel/src/web/stdweb.h b/code/nel/src/web/stdweb.h new file mode 100644 index 000000000..7234cd50d --- /dev/null +++ b/code/nel/src/web/stdweb.h @@ -0,0 +1,85 @@ +// NeL - MMORPG Framework +// Copyright (C) 2010 Winch Gate Property Limited +// +// 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 +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +#ifndef NL_STDWEB_H +#define NL_STDWEB_H + +#if defined(_MSC_VER) && defined(_DEBUG) + #define _CRTDBG_MAP_ALLOC + #include + #include + #include + #define DEBUG_NEW new(_NORMAL_BLOCK, __FILE__, __LINE__) +#elif defined(_MSC_VER) + #include +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#ifdef NL_OS_WINDOWS +# define WIN32_LEAN_AND_MEAN +# define _WIN32_WINDOWS 0x0500 +# ifndef _WIN32_WINNT +# define _WIN32_WINNT 0x0500 +# endif +# ifndef NL_COMP_MINGW +# define WINVER 0x0500 +# define NOMINMAX +# endif +# include +# include +# include +# ifdef X509_NAME +# undef X509_NAME +# endif +#endif + +#include + +#include +#include +#include + +#include + +#include + +#endif // NL_STDWEB_H diff --git a/code/ryzom/client/src/global.cpp b/code/ryzom/client/src/global.cpp index 41d41160c..9789b3b5b 100644 --- a/code/ryzom/client/src/global.cpp +++ b/code/ryzom/client/src/global.cpp @@ -25,7 +25,7 @@ using namespace NLMISC; // *************************************************************************** // Data -NLMISC::CHttpPackageProvider *HttpPackageProvider = NULL; +NLWEB::CHttpPackageProvider *HttpPackageProvider = NULL; // Main System NL3D::UDriver *Driver = NULL; // The main 3D Driver diff --git a/code/ryzom/client/src/global.h b/code/ryzom/client/src/global.h index 75ba2381d..8929f150c 100644 --- a/code/ryzom/client/src/global.h +++ b/code/ryzom/client/src/global.h @@ -28,7 +28,7 @@ // *************************************************************************** -namespace NLMISC +namespace NLWEB { class CHttpPackageProvider; } @@ -84,7 +84,7 @@ const float ExtraZoneLoadingVision = 100.f; // *************************************************************************** // Data -extern NLMISC::CHttpPackageProvider *HttpPackageProvider; // Http provider from on-the-fly downloaded game data +extern NLWEB::CHttpPackageProvider *HttpPackageProvider; // Http provider from on-the-fly downloaded game data // Main System extern NL3D::UDriver *Driver; // The main 3D Driver diff --git a/code/ryzom/client/src/init.cpp b/code/ryzom/client/src/init.cpp index 85eb50b51..b9287d884 100644 --- a/code/ryzom/client/src/init.cpp +++ b/code/ryzom/client/src/init.cpp @@ -35,7 +35,7 @@ #include "nel/misc/block_memory.h" #include "nel/misc/system_utils.h" #include "nel/misc/streamed_package_manager.h" -#include "nel/misc/http_package_provider.h" +#include "nel/web/http_package_provider.h" #include "nel/misc/cmd_args.h" // 3D Interface. #include "nel/3d/bloom_effect.h" @@ -743,7 +743,7 @@ void initStreamedPackageManager(NLMISC::IProgressCallback &progress) CStreamedPackageManager &spm = CStreamedPackageManager::getInstance(); nlassert(!spm.Provider); // If this asserts, init was called twice without release nlassert(!HttpPackageProvider); // Idem - CHttpPackageProvider *hpp = new CHttpPackageProvider(); + NLWEB::CHttpPackageProvider *hpp = new NLWEB::CHttpPackageProvider(); hpp->Path = ClientCfg.StreamedPackagePath; for (uint i = 0; i < ClientCfg.StreamedPackageHosts.size(); i++) hpp->Hosts.push_back(ClientCfg.StreamedPackageHosts[i]); diff --git a/code/ryzom/client/src/init_main_loop.cpp b/code/ryzom/client/src/init_main_loop.cpp index 47c11d899..e22aba478 100644 --- a/code/ryzom/client/src/init_main_loop.cpp +++ b/code/ryzom/client/src/init_main_loop.cpp @@ -28,7 +28,7 @@ #include "nel/misc/path.h" #include "nel/misc/sheet_id.h" #include "nel/misc/big_file.h" -#include "nel/misc/curl_certificates.h" +#include "nel/web/curl_certificates.h" // 3D Interface. #include "nel/3d/bloom_effect.h" #include "nel/3d/u_driver.h" @@ -190,8 +190,8 @@ struct CStatThread : public NLMISC::IRunnable curl_easy_setopt(curl, CURLOPT_URL, url.c_str()); if (url.length() > 8 && (url[4] == 's' || url[4] == 'S')) // 01234 https { - NLMISC::CCurlCertificates::addCertificateFile("cacert.pem"); - NLMISC::CCurlCertificates::useCertificates(curl); + NLWEB::CCurlCertificates::addCertificateFile("cacert.pem"); + NLWEB::CCurlCertificates::useCertificates(curl); curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 1L); curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 2L); } diff --git a/code/ryzom/client/src/interface_v3/group_html_webig.cpp b/code/ryzom/client/src/interface_v3/group_html_webig.cpp index 5ec107bcb..0cb00ded0 100644 --- a/code/ryzom/client/src/interface_v3/group_html_webig.cpp +++ b/code/ryzom/client/src/interface_v3/group_html_webig.cpp @@ -30,7 +30,7 @@ #include "../connection.h" #include -#include "nel/misc/curl_certificates.h" +#include "nel/web/curl_certificates.h" using namespace std; using namespace NLMISC; @@ -188,7 +188,7 @@ public: curl_easy_setopt(Curl, CURLOPT_FOLLOWLOCATION, 1); curl_easy_setopt(Curl, CURLOPT_WRITEFUNCTION, writeDataFromCurl); - NLMISC::CCurlCertificates::useCertificates(Curl); + NLWEB::CCurlCertificates::useCertificates(Curl); } ~CWebigNotificationThread() diff --git a/code/ryzom/client/src/interface_v3/interface_manager.cpp b/code/ryzom/client/src/interface_v3/interface_manager.cpp index d01e89a24..a1efa5d1a 100644 --- a/code/ryzom/client/src/interface_v3/interface_manager.cpp +++ b/code/ryzom/client/src/interface_v3/interface_manager.cpp @@ -113,7 +113,7 @@ #include "nel/gui/lua_helper.h" using namespace NLGUI; #include "nel/gui/lua_ihm.h" -#include "nel/misc/curl_certificates.h" +#include "nel/web/curl_certificates.h" #include "lua_ihm_ryzom.h" @@ -480,7 +480,7 @@ CInterfaceManager::CInterfaceManager() if (!ClientCfg.CurlCABundle.empty()) { // specify custom CA certs, lookup will be made in this function - NLMISC::CCurlCertificates::addCertificateFile(ClientCfg.CurlCABundle); + NLWEB::CCurlCertificates::addCertificateFile(ClientCfg.CurlCABundle); } NLGUI::CDBManager::getInstance()->resizeBanks( NB_CDB_BANKS ); diff --git a/code/ryzom/client/src/login.cpp b/code/ryzom/client/src/login.cpp index 4bc8c10be..7cc58dfd7 100644 --- a/code/ryzom/client/src/login.cpp +++ b/code/ryzom/client/src/login.cpp @@ -51,7 +51,7 @@ #include "global.h" #include "input.h" #include "nel/gui/libwww.h" -#include "nel/misc/http_client_curl.h" +#include "nel/web/http_client_curl.h" #include "login_progress_post_thread.h" #include "init.h" @@ -69,6 +69,7 @@ void ConnectToShard(); // *************************************************************************** using namespace NLMISC; +using namespace NLWEB; using namespace NLNET; using namespace NL3D; using namespace std; diff --git a/code/ryzom/client/src/login.h b/code/ryzom/client/src/login.h index d01f0ea8a..d3025837d 100644 --- a/code/ryzom/client/src/login.h +++ b/code/ryzom/client/src/login.h @@ -19,7 +19,7 @@ #define CL_LOGIN_H #include -#include +#include #include #include @@ -74,7 +74,7 @@ extern sint32 ShardSelected; /* * HTTP client preconfigured to connect to the startup login host */ -class CStartupHttpClient : public NLMISC::CCurlHttpClient +class CStartupHttpClient : public NLWEB::CCurlHttpClient { public: diff --git a/code/ryzom/client/src/login_patch.cpp b/code/ryzom/client/src/login_patch.cpp index ca91fcbfa..3814d3a46 100644 --- a/code/ryzom/client/src/login_patch.cpp +++ b/code/ryzom/client/src/login_patch.cpp @@ -49,7 +49,7 @@ #include "nel/misc/i18n.h" #include "nel/misc/cmd_args.h" #include "nel/misc/seven_zip.h" -#include "nel/misc/curl_certificates.h" +#include "nel/web/curl_certificates.h" #include "game_share/bg_downloader_msg.h" @@ -1431,8 +1431,8 @@ void CPatchManager::downloadFileWithCurl (const string &source, const string &de curl_easy_setopt(curl, CURLOPT_URL, source.c_str()); if (source.length() > 8 && (source[4] == 's' || source[4] == 'S')) // 01234 https { - NLMISC::CCurlCertificates::addCertificateFile("cacert.pem"); - NLMISC::CCurlCertificates::useCertificates(curl); + NLWEB::CCurlCertificates::addCertificateFile("cacert.pem"); + NLWEB::CCurlCertificates::useCertificates(curl); curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 1L); curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 2L); } diff --git a/code/ryzom/tools/client/client_patcher/CMakeLists.txt b/code/ryzom/tools/client/client_patcher/CMakeLists.txt index 810f4ccfd..fa6648c38 100644 --- a/code/ryzom/tools/client/client_patcher/CMakeLists.txt +++ b/code/ryzom/tools/client/client_patcher/CMakeLists.txt @@ -21,6 +21,7 @@ INCLUDE_DIRECTORIES( TARGET_LINK_LIBRARIES(ryzom_client_patcher nelmisc + nelweb nelnet ryzom_gameshare nel_sevenzip From ef058b10ffcdf8e09509f2c454e5594b28d853bc Mon Sep 17 00:00:00 2001 From: kaetemi Date: Wed, 27 Nov 2019 18:49:33 +0800 Subject: [PATCH 091/236] Add some documentation what this http provider is for --- .../include/nel/web/http_package_provider.h | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/code/nel/include/nel/web/http_package_provider.h b/code/nel/include/nel/web/http_package_provider.h index 99cb01b6e..fdda80937 100644 --- a/code/nel/include/nel/web/http_package_provider.h +++ b/code/nel/include/nel/web/http_package_provider.h @@ -20,6 +20,26 @@ #include #include +/// NeL Streamed Packages are like NeL Big Packages, but storing only +/// the file hash, allowing to load the file from a remote source instead. + +/// Technically, this works, because NeL 3D already loads resources +/// asynchronously. However, NeL 3D will not simultaneously load more +/// than one file, so on connections with high latency a backlog builds up. +/// It will need further changes in NeL 3D to be practical. + +/// Alternatively, it could be modified to plug in dynamic data packages +/// at runtime, for example to load in user models for Ring. It would +/// need an adjustment to download all files as soon as the package is +/// enabled. Advantage is that existing files are automatically matched +/// by their hash, so will only be downloaded once, and that files are +/// accessed in the same way as files inside bnp packages. + +/// The extension `.snp` is used for streamed packages. + +/// This class uses an HTTP server with LZMA compressed resources as +/// the package data source. + namespace NLWEB { class CHttpPackageProvider : public NLMISC::IStreamedPackageProvider From f66a8b8fdc4e9dafd40b1b1bc54ee3023979598e Mon Sep 17 00:00:00 2001 From: kaetemi Date: Wed, 27 Nov 2019 18:50:06 +0800 Subject: [PATCH 092/236] Document parameters --- code/nel/include/nel/misc/i_streamed_package_provider.h | 2 +- code/nel/include/nel/web/http_package_provider.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/code/nel/include/nel/misc/i_streamed_package_provider.h b/code/nel/include/nel/misc/i_streamed_package_provider.h index 320e3cdfd..da2618d85 100644 --- a/code/nel/include/nel/misc/i_streamed_package_provider.h +++ b/code/nel/include/nel/misc/i_streamed_package_provider.h @@ -32,7 +32,7 @@ public: /// Download a file. This call is blocking /// filePath: [out] ex. /games/nel/stream/00/00/000000000.. /// hash: [in] - /// name: [in] name for debugging + /// name: [in] name for debugging purposes virtual bool getFile(std::string &filePath, const CHashKey &hash, const std::string &name = "") = 0; }; /* class IStreamedPackageProvider */ diff --git a/code/nel/include/nel/web/http_package_provider.h b/code/nel/include/nel/web/http_package_provider.h index fdda80937..e1d1bb8a4 100644 --- a/code/nel/include/nel/web/http_package_provider.h +++ b/code/nel/include/nel/web/http_package_provider.h @@ -51,6 +51,7 @@ public: /// Download a file. This call is blocking /// filePath: [out] ex. /games/nel/stream/00/00/000000000.. /// hash: [in] + /// name: [in] name for debugging purposes virtual bool getFile(std::string &filePath, const NLMISC::CHashKey &hash, const std::string &name) NL_OVERRIDE; public: From b28c9ef8c4d35d2beb3d5b18353a94a0ef53ec9a Mon Sep 17 00:00:00 2001 From: kaetemi Date: Wed, 27 Nov 2019 18:56:34 +0800 Subject: [PATCH 093/236] Merge in https fix --- code/nel/src/web/http_package_provider.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/code/nel/src/web/http_package_provider.cpp b/code/nel/src/web/http_package_provider.cpp index 2ddc665b9..5d4b6004d 100644 --- a/code/nel/src/web/http_package_provider.cpp +++ b/code/nel/src/web/http_package_provider.cpp @@ -78,6 +78,12 @@ bool CHttpPackageProvider::getFile(std::string &filePath, const CHashKey &hash, if (curl) { curl_easy_setopt(curl, CURLOPT_URL, downloadUrl.c_str()); + if (downloadUrl.length() > 8 && (downloadUrl[4] == 's' || downloadUrl[4] == 'S')) // 01234 https + { + // Don't need to verify, since we check the hash + curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0L); + curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0L); + } curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L); curl_easy_setopt(curl, CURLOPT_FILE, fp); res = curl_easy_perform(curl); @@ -120,8 +126,10 @@ bool CHttpPackageProvider::getFile(std::string &filePath, const CHashKey &hash, CHashKey outHash; if (!unpackLZMA(downloadPath, unpackPath, outHash)) { + CFile::deleteFile(downloadPath); return false; } + CFile::deleteFile(downloadPath); if (!(outHash == hash)) { From 76c252b23c210e55752ec86d49d7ed5a2c56dd4f Mon Sep 17 00:00:00 2001 From: kaetemi Date: Wed, 27 Nov 2019 19:03:31 +0800 Subject: [PATCH 094/236] Build fix --- code/nel/src/web/nel-web.pc.in | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 code/nel/src/web/nel-web.pc.in diff --git a/code/nel/src/web/nel-web.pc.in b/code/nel/src/web/nel-web.pc.in new file mode 100644 index 000000000..3e784a156 --- /dev/null +++ b/code/nel/src/web/nel-web.pc.in @@ -0,0 +1,12 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@ + +Name: nel-web +Version: @NL_VERSION@ +Description: NeL @NL_VERSION@ +Requires: +Libs: -L${libdir} +Libs.private: @LIBS@ -lc -lpthread -lrt -ldl +Cflags: -I${includedir} -lc -lpthread -lrt -ldl From ff4a521b07a4983140d82f27fc2f0468a507d095 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Fri, 29 Nov 2019 17:19:37 +0800 Subject: [PATCH 095/236] Clean up some headers --- .../include/nel/pipeline/database_config.h | 5 +-- .../nel/include/nel/pipeline/project_config.h | 5 +-- code/nel/include/nel/pipeline/tool_logger.h | 33 +++++++++---------- .../include/nel/sound/music_channel_fader.h | 1 + .../nel/include/nel/sound/stream_file_sound.h | 33 +++++++++---------- .../include/nel/sound/stream_file_source.h | 33 +++++++++---------- code/nel/include/nel/sound/stream_sound.h | 4 +-- code/nel/include/nel/sound/stream_source.h | 4 +-- code/nel/include/nel/sound/u_stream_source.h | 4 +-- .../samples/sound/stream_file/stream_file.cpp | 4 +-- .../stream_ogg_vorbis/stream_ogg_vorbis.cpp | 4 +-- code/nel/src/pipeline/database_config.cpp | 5 +-- code/nel/src/pipeline/project_config.cpp | 5 +-- code/nel/src/pipeline/tool_logger.cpp | 33 +++++++++---------- code/nel/src/sound/music_channel_fader.cpp | 1 + code/nel/src/sound/stream_sound.cpp | 4 +-- code/nel/src/sound/stream_source.cpp | 4 +-- code/nel/tools/3d/mesh_export/main.cpp | 3 +- .../tools/3d/mesh_utils/assimp_material.cpp | 3 +- .../nel/tools/3d/mesh_utils/assimp_material.h | 3 +- code/nel/tools/3d/mesh_utils/assimp_shape.cpp | 3 +- code/nel/tools/3d/mesh_utils/assimp_shape.h | 3 +- code/nel/tools/3d/mesh_utils/mesh_utils.cpp | 3 +- code/nel/tools/3d/mesh_utils/mesh_utils.h | 3 +- .../nel/tools/3d/mesh_utils/scene_context.cpp | 3 +- code/nel/tools/3d/mesh_utils/scene_context.h | 3 +- code/nel/tools/3d/mesh_utils/scene_meta.cpp | 3 +- code/nel/tools/3d/mesh_utils/scene_meta.h | 3 +- 28 files changed, 110 insertions(+), 105 deletions(-) diff --git a/code/nel/include/nel/pipeline/database_config.h b/code/nel/include/nel/pipeline/database_config.h index ec9bb6ec6..d2a9288b9 100644 --- a/code/nel/include/nel/pipeline/database_config.h +++ b/code/nel/include/nel/pipeline/database_config.h @@ -1,6 +1,5 @@ -// NeL - MMORPG Framework +// NeL - MMORPG Framework // Copyright (C) 2015 Winch Gate Property Limited -// Author: Jan Boon // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as @@ -14,6 +13,8 @@ // // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . +// +// Author: Jan BOON (Kaetemi) #include diff --git a/code/nel/include/nel/pipeline/project_config.h b/code/nel/include/nel/pipeline/project_config.h index a63cbda20..fd5ba3cdf 100644 --- a/code/nel/include/nel/pipeline/project_config.h +++ b/code/nel/include/nel/pipeline/project_config.h @@ -1,6 +1,5 @@ -// NeL - MMORPG Framework +// NeL - MMORPG Framework // Copyright (C) 2015 Winch Gate Property Limited -// Author: Jan Boon // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as @@ -14,6 +13,8 @@ // // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . +// +// Author: Jan BOON (Kaetemi) #ifndef NLPIPELINE_PROJECT_CONFIG_H #define NLPIPELINE_PROJECT_CONFIG_H diff --git a/code/nel/include/nel/pipeline/tool_logger.h b/code/nel/include/nel/pipeline/tool_logger.h index 3abd72f47..794ffcfe0 100644 --- a/code/nel/include/nel/pipeline/tool_logger.h +++ b/code/nel/include/nel/pipeline/tool_logger.h @@ -8,24 +8,21 @@ * NOTE: Needs to be changed not to use time_nl and string_common. */ -/* - * Copyright (C) 2012 by authors - * - * This file is part of RYZOM CORE PIPELINE. - * RYZOM CORE PIPELINE is free software: you can redistribute it - * and/or modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation, either version 2 of - * the License, or (at your option) any later version. - * - * RYZOM CORE PIPELINE is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty - * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with RYZOM CORE PIPELINE; see the file COPYING. If not, see - * . - */ +// NeL - MMORPG Framework +// Copyright (C) 2012 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 +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . #ifndef NLPIPELINE_TOOL_LOGGER_H #define NLPIPELINE_TOOL_LOGGER_H diff --git a/code/nel/include/nel/sound/music_channel_fader.h b/code/nel/include/nel/sound/music_channel_fader.h index 9c2b2f379..f1ad7b20b 100644 --- a/code/nel/include/nel/sound/music_channel_fader.h +++ b/code/nel/include/nel/sound/music_channel_fader.h @@ -7,6 +7,7 @@ */ // NeL - MMORPG Framework +// Copyright (C) 2008 Jan BOON (Kaetemi) // Copyright (C) 2010 Winch Gate Property Limited // // This program is free software: you can redistribute it and/or modify diff --git a/code/nel/include/nel/sound/stream_file_sound.h b/code/nel/include/nel/sound/stream_file_sound.h index f1e85a0e4..e22cfd898 100644 --- a/code/nel/include/nel/sound/stream_file_sound.h +++ b/code/nel/include/nel/sound/stream_file_sound.h @@ -6,24 +6,21 @@ * CStreamFileSound */ -/* - * Copyright (C) 2012 by authors - * - * This file is part of RYZOM CORE. - * RYZOM CORE 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 - * License, or (at your option) any later version. - * - * RYZOM CORE is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public - * License along with RYZOM CORE. If not, see - * . - */ +// NeL - MMORPG Framework +// Copyright (C) 2012 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 +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . #ifndef NLSOUND_STREAM_FILE_SOUND_H #define NLSOUND_STREAM_FILE_SOUND_H diff --git a/code/nel/include/nel/sound/stream_file_source.h b/code/nel/include/nel/sound/stream_file_source.h index b7c48f96a..4069a2f58 100644 --- a/code/nel/include/nel/sound/stream_file_source.h +++ b/code/nel/include/nel/sound/stream_file_source.h @@ -6,24 +6,21 @@ * CStreamFileSource */ -/* - * Copyright (C) 2012 by authors - * - * This file is part of RYZOM CORE. - * RYZOM CORE 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 - * License, or (at your option) any later version. - * - * RYZOM CORE is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public - * License along with RYZOM CORE. If not, see - * . - */ +// NeL - MMORPG Framework +// Copyright (C) 2012 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 +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . #ifndef NLSOUND_STREAM_FILE_SOURCE_H #define NLSOUND_STREAM_FILE_SOURCE_H diff --git a/code/nel/include/nel/sound/stream_sound.h b/code/nel/include/nel/sound/stream_sound.h index 2a3d5293d..fa0700549 100644 --- a/code/nel/include/nel/sound/stream_sound.h +++ b/code/nel/include/nel/sound/stream_sound.h @@ -1,5 +1,5 @@ -// NeL - MMORPG Framework -// Copyright (C) 2010 Winch Gate Property Limited +// NeL - MMORPG Framework +// Copyright (C) 2010 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 diff --git a/code/nel/include/nel/sound/stream_source.h b/code/nel/include/nel/sound/stream_source.h index 62c7e2faf..ac29f7ed8 100644 --- a/code/nel/include/nel/sound/stream_source.h +++ b/code/nel/include/nel/sound/stream_source.h @@ -1,5 +1,5 @@ -// NeL - MMORPG Framework -// Copyright (C) 2010 Winch Gate Property Limited +// NeL - MMORPG Framework +// Copyright (C) 2010 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 diff --git a/code/nel/include/nel/sound/u_stream_source.h b/code/nel/include/nel/sound/u_stream_source.h index 6b0448afb..c0579cacb 100644 --- a/code/nel/include/nel/sound/u_stream_source.h +++ b/code/nel/include/nel/sound/u_stream_source.h @@ -6,8 +6,8 @@ * \author Jan Boon (Kaetemi) */ -// NeL - MMORPG Framework -// Copyright (C) 2010 by authors +// NeL - MMORPG Framework +// Copyright (C) 2010 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 diff --git a/code/nel/samples/sound/stream_file/stream_file.cpp b/code/nel/samples/sound/stream_file/stream_file.cpp index cd40d6b76..605c01580 100644 --- a/code/nel/samples/sound/stream_file/stream_file.cpp +++ b/code/nel/samples/sound/stream_file/stream_file.cpp @@ -1,5 +1,5 @@ -// NeL - MMORPG Framework -// Copyright (C) 2010 Winch Gate Property Limited +// NeL - MMORPG Framework +// Copyright (C) 2012 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 diff --git a/code/nel/samples/sound/stream_ogg_vorbis/stream_ogg_vorbis.cpp b/code/nel/samples/sound/stream_ogg_vorbis/stream_ogg_vorbis.cpp index 6f3f0d19c..a1d3b694e 100644 --- a/code/nel/samples/sound/stream_ogg_vorbis/stream_ogg_vorbis.cpp +++ b/code/nel/samples/sound/stream_ogg_vorbis/stream_ogg_vorbis.cpp @@ -1,5 +1,5 @@ -// NeL - MMORPG Framework -// Copyright (C) 2010 Winch Gate Property Limited +// NeL - MMORPG Framework +// Copyright (C) 2012 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 diff --git a/code/nel/src/pipeline/database_config.cpp b/code/nel/src/pipeline/database_config.cpp index 56369c902..9ee3eca54 100644 --- a/code/nel/src/pipeline/database_config.cpp +++ b/code/nel/src/pipeline/database_config.cpp @@ -1,6 +1,5 @@ -// NeL - MMORPG Framework +// NeL - MMORPG Framework // Copyright (C) 2015 Winch Gate Property Limited -// Author: Jan Boon // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as @@ -14,6 +13,8 @@ // // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . +// +// Author: Jan BOON (Kaetemi) #include #include "nel/pipeline/database_config.h" diff --git a/code/nel/src/pipeline/project_config.cpp b/code/nel/src/pipeline/project_config.cpp index b292f033c..31bd8a2dc 100644 --- a/code/nel/src/pipeline/project_config.cpp +++ b/code/nel/src/pipeline/project_config.cpp @@ -1,6 +1,5 @@ -// NeL - MMORPG Framework +// NeL - MMORPG Framework // Copyright (C) 2015 Winch Gate Property Limited -// Author: Jan Boon // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as @@ -14,6 +13,8 @@ // // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . +// +// Author: Jan BOON (Kaetemi) #include #include "nel/pipeline/project_config.h" diff --git a/code/nel/src/pipeline/tool_logger.cpp b/code/nel/src/pipeline/tool_logger.cpp index 064e25f77..ae12a9d07 100644 --- a/code/nel/src/pipeline/tool_logger.cpp +++ b/code/nel/src/pipeline/tool_logger.cpp @@ -6,24 +6,21 @@ * CToolLogger */ -/* - * Copyright (C) 2012 by authors - * - * This file is part of RYZOM CORE PIPELINE. - * RYZOM CORE PIPELINE is free software: you can redistribute it - * and/or modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation, either version 2 of - * the License, or (at your option) any later version. - * - * RYZOM CORE PIPELINE is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty - * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with RYZOM CORE PIPELINE; see the file COPYING. If not, see - * . - */ +// NeL - MMORPG Framework +// Copyright (C) 2012 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 +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . #include "nel/pipeline/tool_logger.h" diff --git a/code/nel/src/sound/music_channel_fader.cpp b/code/nel/src/sound/music_channel_fader.cpp index 67e39bcf8..a166c1e7e 100644 --- a/code/nel/src/sound/music_channel_fader.cpp +++ b/code/nel/src/sound/music_channel_fader.cpp @@ -1,4 +1,5 @@ // NeL - MMORPG Framework +// Copyright (C) 2008 Jan BOON (Kaetemi) // Copyright (C) 2010 Winch Gate Property Limited // // This program is free software: you can redistribute it and/or modify diff --git a/code/nel/src/sound/stream_sound.cpp b/code/nel/src/sound/stream_sound.cpp index 8933f8be7..80f9001d1 100644 --- a/code/nel/src/sound/stream_sound.cpp +++ b/code/nel/src/sound/stream_sound.cpp @@ -1,5 +1,5 @@ -// NeL - MMORPG Framework -// Copyright (C) 2010 Winch Gate Property Limited +// NeL - MMORPG Framework +// Copyright (C) 2010 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 diff --git a/code/nel/src/sound/stream_source.cpp b/code/nel/src/sound/stream_source.cpp index 537a4c24d..97e36e91e 100644 --- a/code/nel/src/sound/stream_source.cpp +++ b/code/nel/src/sound/stream_source.cpp @@ -1,5 +1,5 @@ -// NeL - MMORPG Framework -// Copyright (C) 2010 Winch Gate Property Limited +// NeL - MMORPG Framework +// Copyright (C) 2010 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 diff --git a/code/nel/tools/3d/mesh_export/main.cpp b/code/nel/tools/3d/mesh_export/main.cpp index f22e53f41..72e2b6e7e 100644 --- a/code/nel/tools/3d/mesh_export/main.cpp +++ b/code/nel/tools/3d/mesh_export/main.cpp @@ -1,6 +1,5 @@ // NeL - MMORPG Framework // Copyright (C) 2015 Winch Gate Property Limited -// Author: Jan Boon // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as @@ -14,6 +13,8 @@ // // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . +// +// Author: Jan BOON (Kaetemi) #include #include "../mesh_utils/mesh_utils.h" diff --git a/code/nel/tools/3d/mesh_utils/assimp_material.cpp b/code/nel/tools/3d/mesh_utils/assimp_material.cpp index 4830d1b33..ecb392bf1 100644 --- a/code/nel/tools/3d/mesh_utils/assimp_material.cpp +++ b/code/nel/tools/3d/mesh_utils/assimp_material.cpp @@ -1,6 +1,5 @@ // NeL - MMORPG Framework // Copyright (C) 2015 Winch Gate Property Limited -// Author: Jan Boon // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as @@ -14,6 +13,8 @@ // // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . +// +// Author: Jan BOON (Kaetemi) #include #include "assimp_shape.h" diff --git a/code/nel/tools/3d/mesh_utils/assimp_material.h b/code/nel/tools/3d/mesh_utils/assimp_material.h index 062ca95bb..74d11e638 100644 --- a/code/nel/tools/3d/mesh_utils/assimp_material.h +++ b/code/nel/tools/3d/mesh_utils/assimp_material.h @@ -1,6 +1,5 @@ // NeL - MMORPG Framework // Copyright (C) 2015 Winch Gate Property Limited -// Author: Jan Boon // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as @@ -14,6 +13,8 @@ // // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . +// +// Author: Jan BOON (Kaetemi) #include diff --git a/code/nel/tools/3d/mesh_utils/assimp_shape.cpp b/code/nel/tools/3d/mesh_utils/assimp_shape.cpp index 7ab0729ae..0f47cef19 100644 --- a/code/nel/tools/3d/mesh_utils/assimp_shape.cpp +++ b/code/nel/tools/3d/mesh_utils/assimp_shape.cpp @@ -1,6 +1,5 @@ // NeL - MMORPG Framework // Copyright (C) 2015 Winch Gate Property Limited -// Author: Jan Boon // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as @@ -14,6 +13,8 @@ // // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . +// +// Author: Jan BOON (Kaetemi) #include #include "assimp_shape.h" diff --git a/code/nel/tools/3d/mesh_utils/assimp_shape.h b/code/nel/tools/3d/mesh_utils/assimp_shape.h index b4bdc2490..ed568b946 100644 --- a/code/nel/tools/3d/mesh_utils/assimp_shape.h +++ b/code/nel/tools/3d/mesh_utils/assimp_shape.h @@ -1,6 +1,5 @@ // NeL - MMORPG Framework // Copyright (C) 2015 Winch Gate Property Limited -// Author: Jan Boon // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as @@ -14,6 +13,8 @@ // // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . +// +// Author: Jan BOON (Kaetemi) #include diff --git a/code/nel/tools/3d/mesh_utils/mesh_utils.cpp b/code/nel/tools/3d/mesh_utils/mesh_utils.cpp index 8765e3960..3674d56d8 100644 --- a/code/nel/tools/3d/mesh_utils/mesh_utils.cpp +++ b/code/nel/tools/3d/mesh_utils/mesh_utils.cpp @@ -1,6 +1,5 @@ // NeL - MMORPG Framework // Copyright (C) 2015 Winch Gate Property Limited -// Author: Jan Boon // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as @@ -14,6 +13,8 @@ // // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . +// +// Author: Jan BOON (Kaetemi) #include #include "mesh_utils.h" diff --git a/code/nel/tools/3d/mesh_utils/mesh_utils.h b/code/nel/tools/3d/mesh_utils/mesh_utils.h index 18be11e60..ae26000a4 100644 --- a/code/nel/tools/3d/mesh_utils/mesh_utils.h +++ b/code/nel/tools/3d/mesh_utils/mesh_utils.h @@ -1,6 +1,5 @@ // NeL - MMORPG Framework // Copyright (C) 2015 Winch Gate Property Limited -// Author: Jan Boon // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as @@ -14,6 +13,8 @@ // // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . +// +// Author: Jan BOON (Kaetemi) #ifndef NL_MESH_UTILS_H #define NL_MESH_UTILS_H diff --git a/code/nel/tools/3d/mesh_utils/scene_context.cpp b/code/nel/tools/3d/mesh_utils/scene_context.cpp index 243f13482..503505ca0 100644 --- a/code/nel/tools/3d/mesh_utils/scene_context.cpp +++ b/code/nel/tools/3d/mesh_utils/scene_context.cpp @@ -1,6 +1,5 @@ // NeL - MMORPG Framework // Copyright (C) 2015 Winch Gate Property Limited -// Author: Jan Boon // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as @@ -14,6 +13,8 @@ // // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . +// +// Author: Jan BOON (Kaetemi) #include #include "scene_context.h" diff --git a/code/nel/tools/3d/mesh_utils/scene_context.h b/code/nel/tools/3d/mesh_utils/scene_context.h index 10fa55e46..a526ffeb9 100644 --- a/code/nel/tools/3d/mesh_utils/scene_context.h +++ b/code/nel/tools/3d/mesh_utils/scene_context.h @@ -1,6 +1,5 @@ // NeL - MMORPG Framework // Copyright (C) 2015 Winch Gate Property Limited -// Author: Jan Boon // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as @@ -14,6 +13,8 @@ // // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . +// +// Author: Jan BOON (Kaetemi) #ifndef NL_SCENE_CONTEXT_H #define NL_SCENE_CONTEXT_H diff --git a/code/nel/tools/3d/mesh_utils/scene_meta.cpp b/code/nel/tools/3d/mesh_utils/scene_meta.cpp index dd7ea0686..f5e8adf99 100644 --- a/code/nel/tools/3d/mesh_utils/scene_meta.cpp +++ b/code/nel/tools/3d/mesh_utils/scene_meta.cpp @@ -1,6 +1,5 @@ // NeL - MMORPG Framework // Copyright (C) 2015 Winch Gate Property Limited -// Author: Jan Boon // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as @@ -14,6 +13,8 @@ // // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . +// +// Author: Jan BOON (Kaetemi) #include #include "scene_meta.h" diff --git a/code/nel/tools/3d/mesh_utils/scene_meta.h b/code/nel/tools/3d/mesh_utils/scene_meta.h index 5073e1f88..75506999b 100644 --- a/code/nel/tools/3d/mesh_utils/scene_meta.h +++ b/code/nel/tools/3d/mesh_utils/scene_meta.h @@ -1,6 +1,5 @@ // NeL - MMORPG Framework // Copyright (C) 2015 Winch Gate Property Limited -// Author: Jan Boon // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as @@ -14,6 +13,8 @@ // // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . +// +// Author: Jan BOON (Kaetemi) #ifndef NL_SCENE_META_H #define NL_SCENE_META_H From 43452ea27c6e92488d8bd1417b2aee60d75d8a68 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Fri, 29 Nov 2019 17:21:41 +0800 Subject: [PATCH 096/236] Fix some headers --- code/snowballs2/server/collision/src/collision_service.cpp | 2 +- code/snowballs2/server/collision/src/collision_service.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/code/snowballs2/server/collision/src/collision_service.cpp b/code/snowballs2/server/collision/src/collision_service.cpp index 83808f6c9..e42118601 100644 --- a/code/snowballs2/server/collision/src/collision_service.cpp +++ b/code/snowballs2/server/collision/src/collision_service.cpp @@ -1,5 +1,5 @@ // NeL - MMORPG Framework -// Copyright (C) 2010 Winch Gate Property Limited +// Copyright (C) 2008 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 diff --git a/code/snowballs2/server/collision/src/collision_service.h b/code/snowballs2/server/collision/src/collision_service.h index ac46479ba..b28673747 100644 --- a/code/snowballs2/server/collision/src/collision_service.h +++ b/code/snowballs2/server/collision/src/collision_service.h @@ -1,5 +1,5 @@ // NeL - MMORPG Framework -// Copyright (C) 2010 Winch Gate Property Limited +// Copyright (C) 2008 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 From 38d334497213ea68ec85198f337440c513226f99 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Fri, 29 Nov 2019 18:35:27 +0800 Subject: [PATCH 097/236] Add script to update headers --- code/tool/attribution/annotate.py | 1055 +++++++++++++++++++++++++++++ 1 file changed, 1055 insertions(+) create mode 100644 code/tool/attribution/annotate.py diff --git a/code/tool/attribution/annotate.py b/code/tool/attribution/annotate.py new file mode 100644 index 000000000..24318bc64 --- /dev/null +++ b/code/tool/attribution/annotate.py @@ -0,0 +1,1055 @@ +# +# Copyright (C) 2019 Jan BOON +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# +# * Redistributions of source code must retain the above copyright notice, this +# list of conditions and the following disclaimer. +# +# * Redistributions in binary form must reproduce the above copyright notice, +# this list of conditions and the following disclaimer in the documentation +# and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# + +# This script specifies by whom and when source files were modified +# from their original, in order to comply with the AGPLv3 requirements. + +# It will output a mapping of unidentified contributors, for matching +# names more appropriately. If you are being paid by Winch Gate, map +# your name to "winch_gate". + +# There's also a mapping of commits to ignore, they do not count towards +# contribution, as well as a mapping of commits for which to override +# the author. + +# set PATH=C:\Python38;%PATH% +# python -m pip install --upgrade pip +# python -m pip install gitpython +# python annotate.py + +import time +from datetime import datetime +from pathlib import Path + +from git import Repo +repo = Repo("../../..") + +# Mapping for author short name to full display name +authors = { } +authors["winch_gate"] = "Winch Gate Property Limited" +authors["sfb"] = "Matt RAYKOWSKI (sfb) " +authors["ace"] = "Vianney LECROART (ace) " +authors["rti"] = "Robert TIMM (rti) " +authors["botanic"] = "Matthew LAGOE (Botanic) " +authors["rtsan"] = "Henri KUUSTE " +authors["kaetemi"] = "Jan BOON (Kaetemi) " +authors["kervala"] = "Cédric OCHS (kervala) " +authors["glorf"] = "Guillaume DUPUY (glorf) " +authors["ulukyn"] = "Nuno GONCALVES (Ulukyn) " +authors["nimetu"] = "Meelis MAGI (Nimetu) " +authors["dfighter"] = "Laszlo KIS-ADAM (dfighter) " +authors["dnk-88"] = "Dzmitry KAMIAHIN (dnk-88) " +authors["fhenon"] = "Fabien HENON" +authors["inky"] = "Inky " +authors["riasan"] = "Riasan " +authors["karu"] = "karu" +authors["kishan"] = "Kishan GRIMOUT " +authors["vinicius"] = "Vinicius ARROYO" +authors["llapp"] = "llapp" +authors["depyraken"] = "depyraken" +authors["gary"] = "Gary PRESTON" +authors["tobiasp"] = "Tobias PETERS " +authors["rodolpheb"] = "Rodolphe BREARD " +authors["geelsd"] = "Dylan GEELS " +authors["shubham"] = "Shubham MEENA " +authors["liria"] = "liria " +authors["etrange"] = "StudioEtrange " +authors["sircotare"] = "SirCotare" +authors["rolandw"] = "Roland WINKLMEIER " +authors["adrianj"] = "Adrian JAEKEL " +authors["cemycc"] = "Emanuel COSTEA " + +# Mapping from git author name to short name, dash to ignore author +short_authors = { } +short_authors["sfb"] = "sfb" +short_authors["Matt Raykowski "] = "sfb" +short_authors["mattraykowski"] = "sfb" +short_authors["\"Matt Raykowski\" "] = "sfb" +short_authors["vl"] = "ace" +short_authors["acemtp@acemtp-desktop "] = "ace" +short_authors["acemtp@users.sourceforge.net "] = "ace" +short_authors["botanicvelious "] = "botanic" +short_authors["botanic"] = "botanic" +short_authors["Matthew Lagoe "] = "botanic" +short_authors["Botanic"] = "botanic" +short_authors["Matthew Lagoe@MatthewLagoe-PC "] = "botanic" +short_authors["Botanic "] = "botanic" +short_authors["kaetemi "] = "kaetemi" +short_authors["Jan Boon "] = "kaetemi" +short_authors["Jan Boon "] = "kaetemi" +short_authors["Jan Boon "] = "kaetemi" +short_authors["Jan BOON (jan.boon@kaetemi.be)"] = "kaetemi" +short_authors["kaetemi"] = "kaetemi" +short_authors["kaetemi@users.sourceforge.net "] = "kaetemi" +short_authors["kaetemi@kaevm.localdomain "] = "kaetemi" +short_authors["Jan Boon (Kaetemi)"] = "kaetemi" +short_authors["NO-BREAK SPACE OÜ "] = "-" # bot +short_authors["Ryzom Pipeline "] = "-" # bot +short_authors["Nimetu "] = "nimetu" +short_authors["nimetu@gmail.com "] = "nimetu" +short_authors["Meelis Mägi "] = "nimetu" +short_authors["nimetu "] = "nimetu" +short_authors["nimetu"] = "nimetu" +short_authors["kervala"] = "kervala" +short_authors["Cédric OCHS "] = "kervala" +short_authors["Nuno Gonçalves "] = "ulukyn" +short_authors["ulukyn"] = "ulukyn" +short_authors["Ulukyn "] = "ulukyn" +short_authors["ulukyn@gmail.com "] = "ulukyn" +short_authors["Ulu Kyn "] = "ulukyn" +short_authors["Inky "] = "inky" +short_authors["inky "] = "inky" +short_authors["Riasan "] = "riasan" +short_authors["Guillaume Dupuy "] = "glorf" +short_authors["karu"] = "karu" +short_authors["kishan_grimout"] = "kishan" +short_authors["KISHAN GRIMOUT "] = "kishan" +short_authors["Vinicius Arroyo "] = "vinicius" +short_authors["Llapp"] = "llapp" +short_authors["depyraken"] = "depyraken" +short_authors["Gary Preston "] = "gary" +short_authors["Tobias Peters "] = "tobiasp" +short_authors["dfighter1985"] = "dfighter" +short_authors["dfighter1985 "] = "dfighter" +short_authors["Laszlo Kis-Adam "] = "dfighter" +short_authors["Laszlo Kis-Adam"] = "dfighter" +short_authors["dfighter1985 "] = "dfighter" +short_authors["dfighter "] = "dfighter" +short_authors["timon "] = "dnk-88" +short_authors["dnk-88"] = "dnk-88" +short_authors["Dzmitry Kamiahin "] = "dnk-88" +short_authors["Dzmitry Kamiahin "] = "dnk-88" +short_authors["Fabien_HENON"] = "fhenon" +short_authors["Rodolphe Breard "] = "rodolpheb" +short_authors["Rodolphe Breard "] = "rodolpheb" +short_authors["Dylan Geels "] = "geelsd" +short_authors["shubham_meena "] = "shubham" +short_authors["shubham_meena"] = "shubham" +short_authors["liria "] = "liria" +short_authors["liria"] = "liria" +short_authors["StudioEtrange "] = "etrange" +short_authors["rti "] = "rti" +short_authors["rti"] = "rti" +short_authors["SirCotare"] = "sircotare" +short_authors["SirCotare@Medivh "] = "sircotare" +short_authors["Roland Winklmeier "] = "rolandw" +short_authors["Adrian Jaekel "] = "adrianj" +short_authors["Emanuel Costea "] = "cemycc" +short_authors["cemycc "] = "cemycc" +short_authors["cemycc"] = "cemycc" +# short_authors["\"picomancer ext:(%22) "] = "-" +# short_authors["Quitta"] = "-" +# short_authors["Krolock"] = "-" +# short_authors["aquiles"] = "-" +# short_authors["Piotr Kaczmarek "] = "-" +# short_authors["kerozcak"] = "-" +# short_authors["thorbjorn"] = "-" +# short_authors["Thibaut Girka "] = "-" +# short_authors["DJanssens "] = "-" +# short_authors["Michael Witrant "] = "-" + +generic_authors = [ ] +generic_authors += [ "Ryzom Core " ] +generic_authors += [ "by authors" ] + +# Reverse mapping for parsing original annotation +for short_author in authors: + short_authors[authors[short_author]] = short_author + +# Mapping to override author of a git commit, dash to ignore commit +# * invalid commit +# - no authorship or various authors +# / initial commit, we don't have history of 2008-2010 Ryzom SVN and older 2008 OpenNeL SVN +# ? copyright not identified +override_author = { } +override_author["af454dd1cf9306afe0f074ea2b348a0629112a9e"] = "*" # Fix EOL issues on Mercurial repository +override_author["e7e51f01e080bfacd87331d16e3e124ba90a04ac"] = "dfighter" # Merge GUI Editor branch +override_author["d5c601ffa5690b89f121561bac165b83f39a896f"] = "/" # Initial commit. +override_author["adb4963102e226ff8121caa45a802b7d31c25a81"] = "dnk-88" # Merge OVQT +override_author["02e8f6e95629ca88820a01e4f62f336b61001214"] = "-" # EOL +override_author["6b3b85962a898c718a16882574abbc167c087816"] = "-" # EOL +override_author["29b38937a58ffd06ba64829a49f060ff7c9a2d0a"] = "-" # Header +override_author["61eefa97c2ffbca94e123d766f518ce006fa3ed4"] = "-" # Header +override_author["a9250a74f1140c08655d31cbe185a5e543e1e942"] = "-" # Header +override_author["dd1043eaaec28399aa0013ddf5b5d7e0c32b1ce1"] = "-" # Header +override_author["ff4a521b07a4983140d82f27fc2f0468a507d095"] = "-" # Header +override_author["43452ea27c6e92488d8bd1417b2aee60d75d8a68"] = "-" # Header + +# Exclude some paths +exclude_paths = { } +exclude_paths["code/nel/3rdparty"] = True +exclude_paths["code/nel/src/3d/driver/opengl/GL"] = True +exclude_paths["code/studio/src/3rdparty"] = True + +# Programmatical remappings +def remap_author(blob, commit, author): + # Remap author to copyright owner + # You can map based on + # - blob.path + # - commit.committed_date + if override_author.get(commit.hexsha) != None: + return override_author[commit.hexsha] + authored_date = datetime.utcfromtimestamp(commit.authored_date) # time.gmtime(commit.authored_date) # datetime.date(2002, 12, 26) + authored_timestamp = commit.authored_date + short_author = short_authors.get(author) + if short_author == None: + short_author = "?" + # If you're paid by Winch Gate, or signed copyright transfer with + # them, remap here, limit by authored_date if needed. + if short_author == "ulukyn" or short_author == "ace": + short_author = "winch_gate" + if short_author == "riasan" or short_author == "sircotare": + short_author = "winch_gate" + if short_author == "inky": + short_author = "winch_gate" + if "feature-export-assimp" in commit.message and authored_date.year <= 2015: + # Project paid for by Winch Gate + short_author = "winch_gate" + if short_author == "kervala" or short_author == "nimetu": + # Don't know if they signed the copyright assignment agreement with Winch Gate or Ryzom Forge + short_author = "?" + if short_author == "karu" or short_author == "kishan" or short_author == "glorf": + short_author = "?" + if short_author == "llapp" or short_author == "vinicius" or short_author == "gary": + short_author = "?" + if short_author == "depyraken" or short_author == "tobiasp" or short_author == "rodolpheb": + short_author = "?" + if short_author == "geelsd" or short_author == "shubham" or short_author == "liria": + short_author = "?" + return short_author + +# Mapping for original author, which is not included in list of +# modification, but instead adjusts the original copyright date range. +# Author is based on first commit. +#def remap_original_author(blob, author): +# # Remap original file author to original copyright owner +# # Todo +# if blob.path.startswith("code/nel/3rdparty"): +# return "-" +# return "winch_gate" + +def stringify_author(author): + if author.email == "none@none" or author.email == "": + return author.name + return author.name + " <" + author.email + ">" + +def list_unknown_authors(): + print("-- List unknown authors --") + listed_authors = {} + for commit in repo.iter_commits(): + author = stringify_author(commit.author) + if short_authors.get(author) == None and listed_authors.get(author) == None: + listed_authors[author] = True + print(author) + +#def count_tree_size(tree): +# res = len(tree.blobs) +# for subtree in tree.trees: +# res = res + count_tree_size(subtree) +# return res +# +#def list_large_commits(): +# print("-- List large commits --") +# for commit in repo.iter_commits(): +# print(commit.hexsha + ": " + str(count_tree_size(commit.tree))) + +assert not repo.bare +assert not repo.is_dirty() + +# repo.untracked_files +# assert repo.head.ref == repo.heads.develop + +print(str(repo)) + +print(str(repo.index)) + +tree = repo.head.ref.commit.tree +assert repo.tree() == repo.head.commit.tree +assert repo.tree() == tree + +print(str(tree)) + +assert len(tree.trees) > 0 +assert len(tree.blobs) > 0 +assert len(tree.blobs) + len(tree.trees) == len(tree) + +# for entry in tree.trees: +# for entry2 in entry.trees: +# print(entry2.path) + +commit_counter = {} + +historic_commit = repo.commit("e9692f5fea4afb02cf27d8a33c40587007bb13c5"); +historic_paths = { } + +header_not_found = { } + +modified_blurb = "This source file has been modified by the following contributors:" +#modified_blurb = "This file contains modifications from the following contributors:" + +def make_copyright(oldest_year, newest_year, long_name): + if newest_year > oldest_year: + return "Copyright (C) " + str(oldest_year) + "-" + str(newest_year) + " " + long_name + else: + if newest_year != oldest_year: + raise str(oldest_year) + "-" + str(newest_year) + return "Copyright (C) " + str(newest_year) + " " + long_name + +def rewrite_cpp(path, copyright_oldest, copyright_newest, copyright_lines): + # Read all notices until "// This program is free software" + # Everything before the first "// Copyright" remains intact + # Parse existing notices, merge with lists, track which one is first + # Write out new copyright and modification notices + contents = Path("../../../" + path).read_text() + content_start = contents.find("// This program is free software") + if content_start < 0: + header_not_found[path] = True + print("Could not find \"// This program is free software\"") + return + copyright_start = contents.find("// Copyright", 0, content_start) + if copyright_start < 0: + header_not_found[path] = True + print("Could not find \"// Copyright\"") + return + copyright_block = contents[copyright_start:content_start].splitlines() + first_copyright = "?" + for statement in copyright_block: + if statement.startswith("// Copyright"): + # Parse this statement + # // Copyright (C) 2010 Winch Gate Property Limited + # // Copyright (C) 2010-2019 Winch Gate Property Limited + # // Copyright (C) 2010 - 2019 Winch Gate Property Limited + # // Copyright (C) 2010 Winch Gate Property Limited + copyright_end = statement.find(")") + 1 + if copyright_end < 0: + copyright_end = len("// Copyright") + year_start = statement.find("2", copyright_end) + year_end = statement.find("-", year_start, year_start + 7) + endyear_start = -1 + endyear_end = -1 + name_start = -1 + if year_end < 0: + year_end = statement.find(" ", year_start) + name_start = year_end + else: + endyear_start = statement.find("2", year_end) + if endyear_start >= 0: + endyear_end = statement.find(" ", endyear_start) + name_start = endyear_end + else: + name_start = year_end + oldestyear = int(statement[year_start:year_end].strip()) + newestyear = oldestyear + if endyear_end >= 0: + newestyear = int(statement[endyear_start:endyear_end].strip()) + name_long = statement[name_start:].strip() + name_short = "*" + if name_long in generic_authors: + highest_author = 0 + for author in copyright_lines: + if len(author) > 1: + if copyright_lines[author] > highest_author: + name_short = author + else: + name_short = short_authors[name_long] + if name_short == "*": + header_not_found[path] = True + print("Copyright by authors failed to be specified") + return + #print(statement) + #print(str(oldestyear)) + #print(str(newestyear)) + #print(name_long) + #print(name_short) + #if first_copyright == "?" or (path.startswith('code/studio') and first_copyright == 'winch_gate'): + if first_copyright == "?": + first_copyright = name_short + if copyright_oldest.get(name_short) == None or copyright_newest.get(name_short) == None: + copyright_oldest[name_short] = oldestyear + copyright_newest[name_short] = newestyear + else: + if oldestyear < copyright_oldest[name_short]: + copyright_oldest[name_short] = oldestyear + if newestyear > copyright_newest[name_short]: + copyright_newest[name_short] = newestyear + new_statement = "// " + make_copyright(copyright_oldest[first_copyright], copyright_newest[first_copyright], authors[first_copyright]) + "\n" + #has_blurb = False + #for author in copyright_oldest: + # if author != first_copyright and len(author) > 1: + # if not has_blurb: + # new_statement += "//\n" + # new_statement += "// " + modified_blurb + "\n" + # has_blurb = True + # new_statement += "// " + make_copyright(copyright_oldest[author], copyright_newest[author], authors[author]) + "\n" + modified_statements = [ ] + for author in copyright_oldest: + if author != first_copyright and len(author) > 1: + modified_statements += [ "// " + make_copyright(copyright_oldest[author], copyright_newest[author], authors[author]) + "\n" ] + if len(modified_statements) > 0: + modified_statements.sort() + new_statement += "//\n" + new_statement += "// " + modified_blurb + "\n" + for notice in modified_statements: + new_statement += notice; + new_statement += "//\n" + #print(copyright_block) + #print(new_statement) + new_contents = contents[0:copyright_start] + new_statement + contents[content_start:] + if contents != new_contents: + print(new_statement) + Path("../../../" + path).write_text(new_contents) + +def process_cpp(cpp_entry): + print(cpp_entry.path) + blame = repo.blame(repo.head.ref, cpp_entry.path) + commit_lines = {} + author_lines = {} + author_oldest = {} + author_newest = {} + retry_lines = {} + # Count number of lines per author + for tuple in blame: + commit = tuple[0] + lines = tuple[1] + if commit.hexsha == "af454dd1cf9306afe0f074ea2b348a0629112a9e": + # Special treatment since this commit breaks blame history before 2012 + for line in lines: + # Allow blame from old history if this line matches + retry_lines[line] = True + # Do not count this line + continue + line_count = len(lines) + author = remap_author(cpp_entry, commit, stringify_author(commit.author)) + authored_date = datetime.utcfromtimestamp(commit.authored_date) + if author_lines.get(author) == None: + author_lines[author] = 0 + author_oldest[author] = authored_date.year + author_newest[author] = authored_date.year + author_lines[author] += line_count + if authored_date.year < author_oldest[author]: + author_oldest[author] = authored_date.year + if authored_date.year > author_newest[author]: + author_newest[author] = authored_date.year + if commit_lines.get(commit.hexsha) == None: + commit_lines[commit.hexsha] = 0 + if commit_counter.get(commit.hexsha) == None: + commit_counter[commit.hexsha] = 0 + commit_counter[commit.hexsha] += 1 + commit_lines[commit.hexsha] += line_count + # print(commit.hexsha) + # print(len(lines)) + if historic_paths.get(cpp_entry.path) == True: + historic_blame = repo.blame(historic_commit, cpp_entry.path) + for tuple in historic_blame: + commit = tuple[0] + lines = tuple[1] + line_count = 0 + for line in lines: + if retry_lines.get(line) == True: + line_count += 1 + if line_count == 0: + continue + # Exact copy of above from here on + author = remap_author(cpp_entry, commit, stringify_author(commit.author)) + authored_date = datetime.utcfromtimestamp(commit.authored_date) + if author_lines.get(author) == None: + author_lines[author] = 0 + author_oldest[author] = authored_date.year + author_newest[author] = authored_date.year + author_lines[author] += line_count + if authored_date.year < author_oldest[author]: + author_oldest[author] = authored_date.year + if authored_date.year > author_newest[author]: + author_newest[author] = authored_date.year + if commit_lines.get(commit.hexsha) == None: + commit_lines[commit.hexsha] = 0 + if commit_counter.get(commit.hexsha) == None: + commit_counter[commit.hexsha] = 0 + commit_counter[commit.hexsha] += 1 + commit_lines[commit.hexsha] += line_count + # also todo: keep oldest and newest year for each user + if len(author_lines) > 1 or author_lines.get('/') == None: + # Debug output for modified files + # print(str(author_lines)) + # print(str(commit_lines)) + for author in author_lines: + if author != "/": + print(str(author_oldest[author]) + "-" + str(author_newest[author]) + " " + author + ": " + str(author_lines[author])) + rewrite_cpp(cpp_entry.path, author_oldest, author_newest, author_lines) + +def process_tree(tree_entry): + for blob in tree_entry.blobs: + # print("Blob: " + blob.path) + if exclude_paths.get(blob.path) == True: + continue + if blob.path.endswith(".cpp") or blob.path.endswith(".h") or blob.path.endswith(".c"): + process_cpp(blob) + for tree in tree_entry.trees: + # print("Tree: " + tree.path) + if exclude_paths.get(tree.path) == True: + continue + process_tree(tree) + +def list_historic_tree(tree_entry): + for blob in tree_entry.blobs: + historic_paths[blob.path] = True + for tree in tree_entry.trees: + list_historic_tree(tree) + + +# Go +#list_unknown_authors() +#list_large_commits() + +print("-- Process files --") +list_historic_tree(historic_commit.tree) +process_tree(tree) + +# Lazily sorted large commits +print("-- List large commits --") +for commit in commit_counter: + count = commit_counter[commit] + if count > 1000: + print(commit + ": " + str(count)) +for commit in commit_counter: + count = commit_counter[commit] + if count > 500 and count < 1000: + print(commit + ": " + str(count)) +for commit in commit_counter: + count = commit_counter[commit] + if count > 100 and count < 500: + print(commit + ": " + str(count)) +for commit in commit_counter: + count = commit_counter[commit] + if count > 50 and count < 100: + print(commit + ": " + str(count)) + +# -- List large commits -- +# af454dd1cf9306afe0f074ea2b348a0629112a9e: 4001 +# 613d4ddc34ae0a7a16ee6cfb42957c300d0c654e: 267 # Remove throw statements, OK +# e7e51f01e080bfacd87331d16e3e124ba90a04ac: 460 # Merging GUI editor repo, author change todo +# c73f0d944917d8d51860430591450f490ce2635a: 113 # Add max file library, OK +# f605c5faa55148302e7538b801b6fd6b5b646b8a: 152 # Replace clear, OK +# d5c601ffa5690b89f121561bac165b83f39a896f: 148 # Initial version, author change to winch_gate +# c3b3db07f160ac3b1cfd17f249851d139e952f7c: 273 # Memory leaks detection, OK +# b7e3e4b4f0d1b9b64909657d4edbc701bd823947: 121 # Memory leaks detection, OK +# 2fad59f296a07534a7664296a020285e63a538e1: 105 # Memory leaks detection, OK +# adb4963102e226ff8121caa45a802b7d31c25a81: 126 # OVQT, change author to dnk-88 +# ffb5b2678bb1028fbc5a92c156bddfdda87f7ae6: 120 # Code cleanup, OK +# 45c8b20f3981eeec3484e53f32ccdc8a372c6063: 60 +# 31a540b35d916b2eb5ed9ed66f0f43cb5cc30704: 94 +# 4b1959a5600b9e05b7ff2a27d5e564d07efd117d: 57 +# 449f0061f86f851e1806d61ed86d17815df7cbfa: 54 +# ab454f3d92e03b2721db9c0d687a4d6eb90620c8: 79 +# 58c8606d5ddc2b6e3b1e578ad9646a96bbce22a3: 64 +# f1cdcd1654e9522e347001a0c1918f36b23b506a: 61 +# 0fb9906929f248a09b4998d46b324bb71b390c68: 51 +# f5dec3c1caf4ca7f26f4c8c44ecb8aef01461a62: 59 +# db31312b11c946a97bd95137ab68ccfd55c3c244: 53 +# -- Done -- + +#print("-- Possible mismatching original author --") + +print("-- Source files without header --") +for path in header_not_found: + print(path) +#code/nel/include/nel/3d/fxaa.h +#code/nel/include/nel/3d/geometry_program.h +#code/nel/include/nel/3d/gpu_program_params.h +#code/nel/include/nel/3d/pixel_program.h +#code/nel/include/nel/3d/program.h +#code/nel/include/nel/3d/render_target_manager.h +#code/nel/include/nel/3d/stereo_debugger.h +#code/nel/include/nel/3d/stereo_display.h +#code/nel/include/nel/3d/stereo_hmd.h +#code/nel/include/nel/3d/stereo_libvr.h +#code/nel/include/nel/3d/stereo_ovr.h +#code/nel/include/nel/3d/stereo_ovr_04.h +#code/nel/include/nel/gui/string_case.h +#code/nel/include/nel/misc/callback.h +#code/nel/include/nel/misc/fast_id_map.h +#code/nel/include/nel/misc/wang_hash.h +#code/nel/include/nel/sound/audio_decoder.h +#code/nel/include/nel/sound/audio_decoder_vorbis.h +#code/nel/include/nel/sound/containers.h +#code/nel/include/nel/sound/group_controller.h +#code/nel/include/nel/sound/group_controller_root.h +#code/nel/include/nel/sound/source_music_channel.h +#code/nel/include/nel/sound/u_group_controller.h +#code/nel/include/nel/sound/decoder/dr_mp3.h +#code/nel/samples/3d/nel_qt/qtcolorpicker_cpp.h +#code/nel/samples/misc/callback/main.cpp +#code/nel/src/3d/fxaa.cpp +#code/nel/src/3d/fxaa_program.h +#code/nel/src/3d/geometry_program.cpp +#code/nel/src/3d/gpu_program_params.cpp +#code/nel/src/3d/pixel_program.cpp +#code/nel/src/3d/program.cpp +#code/nel/src/3d/render_target_manager.cpp +#code/nel/src/3d/stereo_debugger.cpp +#code/nel/src/3d/stereo_display.cpp +#code/nel/src/3d/stereo_hmd.cpp +#code/nel/src/3d/stereo_libvr.cpp +#code/nel/src/3d/stereo_ovr.cpp +#code/nel/src/3d/stereo_ovr_04.cpp +#code/nel/src/3d/stereo_ovr_04_program.h +#code/nel/src/3d/stereo_ovr_fp.cpp +#code/nel/src/3d/driver/direct3d/driver_direct3d_pixel_program.cpp +#code/nel/src/3d/driver/opengl/driver_opengl_pixel_program.cpp +#code/nel/src/3d/driver/opengl/EGL/egl.h +#code/nel/src/3d/driver/opengl/EGL/eglext.h +#code/nel/src/3d/driver/opengl/EGL/eglplatform.h +#code/nel/src/3d/driver/opengl/GLES/egl.h +#code/nel/src/3d/driver/opengl/GLES/gl.h +#code/nel/src/3d/driver/opengl/GLES/glext.h +#code/nel/src/3d/driver/opengl/GLES/glplatform.h +#code/nel/src/3d/driver/opengl/KHR/khrplatform.h +#code/nel/src/3d/shaders/fxaa3_11.h +#code/nel/src/ligo/primitive_utils.cpp +#code/nel/src/misc/config_file/cf_gramatical.cpp +#code/nel/src/misc/config_file/cf_lexical.cpp +#code/nel/src/sound/audio_decoder.cpp +#code/nel/src/sound/audio_decoder_vorbis.cpp +#code/nel/src/sound/group_controller.cpp +#code/nel/src/sound/group_controller_root.cpp +#code/nel/src/sound/source_music_channel.cpp +#code/nel/src/sound/stream_file_sound.cpp +#code/nel/src/sound/stream_file_source.cpp +#code/nel/tools/3d/ligo/plugin_max/ligoscape_utility.h +#code/nel/tools/3d/object_viewer_exe/resource.h +#code/nel/tools/3d/object_viewer_widget/src/entity.cpp +#code/nel/tools/3d/object_viewer_widget/src/entity.h +#code/nel/tools/3d/object_viewer_widget/src/interfaces.h +#code/nel/tools/3d/object_viewer_widget/src/object_viewer_widget.cpp +#code/nel/tools/3d/object_viewer_widget/src/object_viewer_widget.h +#code/nel/tools/3d/object_viewer_widget/src/stdpch.cpp +#code/nel/tools/3d/object_viewer_widget/src/stdpch.h +#code/nel/tools/3d/pipeline_max/class_data.cpp +#code/nel/tools/3d/pipeline_max/class_data.h +#code/nel/tools/3d/pipeline_max/class_directory_3.cpp +#code/nel/tools/3d/pipeline_max/class_directory_3.h +#code/nel/tools/3d/pipeline_max/config.cpp +#code/nel/tools/3d/pipeline_max/config.h +#code/nel/tools/3d/pipeline_max/derived_object.cpp +#code/nel/tools/3d/pipeline_max/derived_object.h +#code/nel/tools/3d/pipeline_max/dll_directory.cpp +#code/nel/tools/3d/pipeline_max/dll_directory.h +#code/nel/tools/3d/pipeline_max/dll_plugin_desc.cpp +#code/nel/tools/3d/pipeline_max/dll_plugin_desc.h +#code/nel/tools/3d/pipeline_max/scene.cpp +#code/nel/tools/3d/pipeline_max/scene.h +#code/nel/tools/3d/pipeline_max/scene_class.cpp +#code/nel/tools/3d/pipeline_max/scene_class.h +#code/nel/tools/3d/pipeline_max/scene_class_registry.cpp +#code/nel/tools/3d/pipeline_max/scene_class_registry.h +#code/nel/tools/3d/pipeline_max/scene_class_unknown.cpp +#code/nel/tools/3d/pipeline_max/scene_class_unknown.h +#code/nel/tools/3d/pipeline_max/storage_array.cpp +#code/nel/tools/3d/pipeline_max/storage_array.h +#code/nel/tools/3d/pipeline_max/storage_chunks.cpp +#code/nel/tools/3d/pipeline_max/storage_chunks.h +#code/nel/tools/3d/pipeline_max/storage_file.cpp +#code/nel/tools/3d/pipeline_max/storage_file.h +#code/nel/tools/3d/pipeline_max/storage_object.cpp +#code/nel/tools/3d/pipeline_max/storage_object.h +#code/nel/tools/3d/pipeline_max/storage_stream.cpp +#code/nel/tools/3d/pipeline_max/storage_stream.h +#code/nel/tools/3d/pipeline_max/storage_value.cpp +#code/nel/tools/3d/pipeline_max/storage_value.h +#code/nel/tools/3d/pipeline_max/super_class_desc.cpp +#code/nel/tools/3d/pipeline_max/super_class_desc.h +#code/nel/tools/3d/pipeline_max/typedefs.cpp +#code/nel/tools/3d/pipeline_max/typedefs.h +#code/nel/tools/3d/pipeline_max/wsm_derived_object.cpp +#code/nel/tools/3d/pipeline_max/wsm_derived_object.h +#code/nel/tools/3d/pipeline_max/builtin/animatable.cpp +#code/nel/tools/3d/pipeline_max/builtin/animatable.h +#code/nel/tools/3d/pipeline_max/builtin/base_object.cpp +#code/nel/tools/3d/pipeline_max/builtin/base_object.h +#code/nel/tools/3d/pipeline_max/builtin/bitmap_tex.cpp +#code/nel/tools/3d/pipeline_max/builtin/bitmap_tex.h +#code/nel/tools/3d/pipeline_max/builtin/builtin.cpp +#code/nel/tools/3d/pipeline_max/builtin/builtin.h +#code/nel/tools/3d/pipeline_max/builtin/editable_patch.cpp +#code/nel/tools/3d/pipeline_max/builtin/editable_patch.h +#code/nel/tools/3d/pipeline_max/builtin/geom_object.cpp +#code/nel/tools/3d/pipeline_max/builtin/geom_object.h +#code/nel/tools/3d/pipeline_max/builtin/i_node.cpp +#code/nel/tools/3d/pipeline_max/builtin/i_node.h +#code/nel/tools/3d/pipeline_max/builtin/modifier.cpp +#code/nel/tools/3d/pipeline_max/builtin/modifier.h +#code/nel/tools/3d/pipeline_max/builtin/mtl.cpp +#code/nel/tools/3d/pipeline_max/builtin/mtl.h +#code/nel/tools/3d/pipeline_max/builtin/mtl_base.cpp +#code/nel/tools/3d/pipeline_max/builtin/mtl_base.h +#code/nel/tools/3d/pipeline_max/builtin/multi_mtl.cpp +#code/nel/tools/3d/pipeline_max/builtin/multi_mtl.h +#code/nel/tools/3d/pipeline_max/builtin/node_impl.cpp +#code/nel/tools/3d/pipeline_max/builtin/node_impl.h +#code/nel/tools/3d/pipeline_max/builtin/object.cpp +#code/nel/tools/3d/pipeline_max/builtin/object.h +#code/nel/tools/3d/pipeline_max/builtin/param_block.cpp +#code/nel/tools/3d/pipeline_max/builtin/param_block.h +#code/nel/tools/3d/pipeline_max/builtin/param_block_2.cpp +#code/nel/tools/3d/pipeline_max/builtin/param_block_2.h +#code/nel/tools/3d/pipeline_max/builtin/patch_object.cpp +#code/nel/tools/3d/pipeline_max/builtin/patch_object.h +#code/nel/tools/3d/pipeline_max/builtin/poly_object.cpp +#code/nel/tools/3d/pipeline_max/builtin/poly_object.h +#code/nel/tools/3d/pipeline_max/builtin/reference_maker.cpp +#code/nel/tools/3d/pipeline_max/builtin/reference_maker.h +#code/nel/tools/3d/pipeline_max/builtin/reference_target.cpp +#code/nel/tools/3d/pipeline_max/builtin/reference_target.h +#code/nel/tools/3d/pipeline_max/builtin/root_node.cpp +#code/nel/tools/3d/pipeline_max/builtin/root_node.h +#code/nel/tools/3d/pipeline_max/builtin/scene_impl.cpp +#code/nel/tools/3d/pipeline_max/builtin/scene_impl.h +#code/nel/tools/3d/pipeline_max/builtin/std_mat.cpp +#code/nel/tools/3d/pipeline_max/builtin/std_mat.h +#code/nel/tools/3d/pipeline_max/builtin/std_mat_2.cpp +#code/nel/tools/3d/pipeline_max/builtin/std_mat_2.h +#code/nel/tools/3d/pipeline_max/builtin/super_class_unknown.cpp +#code/nel/tools/3d/pipeline_max/builtin/super_class_unknown.h +#code/nel/tools/3d/pipeline_max/builtin/texmap.cpp +#code/nel/tools/3d/pipeline_max/builtin/texmap.h +#code/nel/tools/3d/pipeline_max/builtin/track_view_node.cpp +#code/nel/tools/3d/pipeline_max/builtin/track_view_node.h +#code/nel/tools/3d/pipeline_max/builtin/tri_object.cpp +#code/nel/tools/3d/pipeline_max/builtin/tri_object.h +#code/nel/tools/3d/pipeline_max/builtin/storage/app_data.cpp +#code/nel/tools/3d/pipeline_max/builtin/storage/app_data.h +#code/nel/tools/3d/pipeline_max/builtin/storage/geom_buffers.cpp +#code/nel/tools/3d/pipeline_max/builtin/storage/geom_buffers.h +#code/nel/tools/3d/pipeline_max/epoly/editable_poly.cpp +#code/nel/tools/3d/pipeline_max/epoly/editable_poly.h +#code/nel/tools/3d/pipeline_max/epoly/epoly.cpp +#code/nel/tools/3d/pipeline_max/epoly/epoly.h +#code/nel/tools/3d/pipeline_max/update1/editable_mesh.cpp +#code/nel/tools/3d/pipeline_max/update1/editable_mesh.h +#code/nel/tools/3d/pipeline_max/update1/update1.cpp +#code/nel/tools/3d/pipeline_max/update1/update1.h +#code/nel/tools/3d/pipeline_max_dump/class_directory_3_2010.c +#code/nel/tools/3d/pipeline_max_dump/class_directory_3_3.c +#code/nel/tools/3d/pipeline_max_dump/config_2010.c +#code/nel/tools/3d/pipeline_max_dump/config_3.c +#code/nel/tools/3d/pipeline_max_dump/main.cpp +#code/nel/tools/3d/pipeline_max_dump/scene_2010.c +#code/nel/tools/3d/pipeline_max_rewrite_assets/main.cpp +#code/nel/tools/3d/plugin_max/nel_3dsmax_shared/resource.h +#code/nel/tools/3d/plugin_max/nel_export/nel_export_lightmap_v2.cpp +#code/nel/tools/3d/plugin_max/nel_export/resource.h +#code/nel/tools/3d/plugin_max/nel_patch_converter/nel_patch_converter.h +#code/nel/tools/3d/plugin_max/nel_patch_edit/editpat.h +#code/nel/tools/3d/plugin_max/nel_patch_edit/np.cpp +#code/nel/tools/3d/plugin_max/nel_patch_edit/np_edit_patch_mod.cpp +#code/nel/tools/3d/plugin_max/nel_patch_edit/np_editpops.cpp +#code/nel/tools/3d/plugin_max/nel_patch_edit/np_epm_add_patches.cpp +#code/nel/tools/3d/plugin_max/nel_patch_edit/np_epm_attach.cpp +#code/nel/tools/3d/plugin_max/nel_patch_edit/np_epm_bevel.cpp +#code/nel/tools/3d/plugin_max/nel_patch_edit/np_epm_del.cpp +#code/nel/tools/3d/plugin_max/nel_patch_edit/np_epm_detach.cpp +#code/nel/tools/3d/plugin_max/nel_patch_edit/np_epm_extrude.cpp +#code/nel/tools/3d/plugin_max/nel_patch_edit/np_epm_material.cpp +#code/nel/tools/3d/plugin_max/nel_patch_edit/np_epm_remember.cpp +#code/nel/tools/3d/plugin_max/nel_patch_edit/np_epm_selection.cpp +#code/nel/tools/3d/plugin_max/nel_patch_edit/np_epm_subdivide.cpp +#code/nel/tools/3d/plugin_max/nel_patch_edit/np_epm_surface.cpp +#code/nel/tools/3d/plugin_max/nel_patch_edit/np_epm_tess.cpp +#code/nel/tools/3d/plugin_max/nel_patch_edit/np_gui_bind.cpp +#code/nel/tools/3d/plugin_max/nel_patch_edit/np_main.cpp +#code/nel/tools/3d/plugin_max/nel_patch_edit/np_mods.cpp +#code/nel/tools/3d/plugin_max/nel_patch_edit/np_rollup.cpp +#code/nel/tools/3d/plugin_max/nel_patch_edit/stdafx.cpp +#code/nel/tools/3d/plugin_max/nel_patch_paint/DllEntry.cpp +#code/nel/tools/3d/plugin_max/nel_patch_paint/nel_patch_paint.h +#code/nel/tools/3d/plugin_max/nel_patch_paint/paint.cpp +#code/nel/tools/3d/plugin_max/nel_patch_paint/paint_main.cpp +#code/nel/tools/3d/plugin_max/nel_patch_paint/paint_pops.cpp +#code/nel/tools/3d/plugin_max/nel_patch_paint/paint_rollup.cpp +#code/nel/tools/3d/plugin_max/nel_patch_paint/paint_ui.cpp +#code/nel/tools/3d/plugin_max/nel_patch_paint/paint_ui.h +#code/nel/tools/3d/plugin_max/nel_patch_paint/paint_undo.cpp +#code/nel/tools/3d/plugin_max/nel_patch_paint/paint_vcolor.cpp +#code/nel/tools/3d/plugin_max/nel_patch_paint/paint_vcolor.h +#code/nel/tools/3d/plugin_max/nel_patch_paint/stdafx.cpp +#code/nel/tools/3d/plugin_max/nel_patch_paint/stdafx.h +#code/nel/tools/3d/plugin_max/nel_vertex_tree_paint/Paint.cpp +#code/nel/tools/3d/plugin_max/nel_vertex_tree_paint/dllmain.cpp +#code/nel/tools/3d/plugin_max/nel_vertex_tree_paint/vertex_tree_paint.cpp +#code/nel/tools/3d/plugin_max/nel_vertex_tree_paint/vertex_tree_paint.h +#code/nel/tools/3d/shared_widgets/command_log.cpp +#code/nel/tools/3d/shared_widgets/command_log.h +#code/nel/tools/3d/shared_widgets/common.h +#code/nel/tools/3d/tga_resize/main.cpp +#code/nel/tools/3d/tile_edit_qt/items_edit_dlg.cpp +#code/nel/tools/3d/tile_edit_qt/main.cpp +#code/nel/tools/3d/tile_edit_qt/tile_widget.cpp +#code/nel/tools/3d/tile_edit_qt/tiles_model.h +#code/nel/tools/3d/unbuild_interface/unbuild_interface.cpp +#code/nel/tools/logic/logic_editor_dll/Condition.cpp +#code/nel/tools/logic/logic_editor_dll/ConditionPage.cpp +#code/nel/tools/logic/logic_editor_dll/ConditionsView.cpp +#code/nel/tools/logic/logic_editor_dll/Counter.cpp +#code/nel/tools/logic/logic_editor_dll/CounterPage.cpp +#code/nel/tools/logic/logic_editor_dll/EditorFormView.cpp +#code/nel/tools/logic/logic_editor_dll/MainFrm.cpp +#code/nel/tools/logic/logic_editor_dll/MainFrm.h +#code/nel/tools/logic/logic_editor_dll/ResizablePage.cpp +#code/nel/tools/logic/logic_editor_dll/State.cpp +#code/nel/tools/logic/logic_editor_dll/StatePage.cpp +#code/nel/tools/logic/logic_editor_dll/StatesView.cpp +#code/nel/tools/logic/logic_editor_dll/StdAfx.h +#code/nel/tools/logic/logic_editor_dll/VariablePage.cpp +#code/nel/tools/logic/logic_editor_dll/logic_editor.cpp +#code/nel/tools/logic/logic_editor_dll/logic_editor.h +#code/nel/tools/logic/logic_editor_dll/logic_editorDoc.cpp +#code/nel/tools/logic/logic_editor_dll/logic_editorDoc.h +#code/nel/tools/logic/logic_editor_exe/logic_editor_exe.cpp +#code/nel/tools/misc/bnp_make_qt/main.cpp +#code/nel/tools/misc/bnp_make_qt/main.h +#code/nel/tools/misc/bnp_make_qt/mainwindow.cpp +#code/nel/tools/misc/bnp_make_qt/mainwindow.h +#code/nel/tools/misc/data_mirror/StdAfx.h +#code/nel/tools/misc/message_box_qt/main.cpp +#code/nel/tools/misc/words_dic_qt/main.cpp +#code/nel/tools/misc/words_dic_qt/words_dicDlg.cpp +#code/nel/tools/sound/source_sounds_builder/SoundPage.cpp +#code/nel/tools/sound/source_sounds_builder/source_sounds_builderDlg.cpp +#code/nelns/login_system/nel_launcher_qt/nel_launcher_dlg.cpp +#code/nelns/login_system/nel_launcher_windows_ext/BarTabsWnd.h +#code/nelns/login_system/nel_launcher_windows_ext/Configuration.cpp +#code/nelns/login_system/nel_launcher_windows_ext/nel_launcher.cpp +#code/ryzom/client/src/interface_v3/lua_ihm_ryzom.h +#code/ryzom/client/src/interface_v3/view_pointer_ryzom.h +#code/ryzom/common/src/game_share/crypt_sha512.cpp +#code/ryzom/common/src/game_share/welcome_service_itf.h +#code/ryzom/tools/client/client_patcher/main.cpp +#code/ryzom/tools/client/ryzom_installer/src/profilesmodel.cpp +#code/ryzom/tools/client/ryzom_installer/src/profilesmodel.h +#code/ryzom/tools/client/ryzom_installer/src/qzip.cpp +#code/ryzom/tools/client/ryzom_installer/src/qzipreader.h +#code/ryzom/tools/client/ryzom_installer/src/qzipwriter.h +#code/ryzom/tools/leveldesign/georges_editor_qt/src/completer_line_edit.cpp +#code/ryzom/tools/leveldesign/georges_editor_qt/src/completer_line_edit.h +#code/ryzom/tools/leveldesign/georges_editor_qt/src/configuration.cpp +#code/ryzom/tools/leveldesign/georges_editor_qt/src/configuration.h +#code/ryzom/tools/leveldesign/georges_editor_qt/src/entity.cpp +#code/ryzom/tools/leveldesign/georges_editor_qt/src/entity.h +#code/ryzom/tools/leveldesign/georges_editor_qt/src/filesystem_model.cpp +#code/ryzom/tools/leveldesign/georges_editor_qt/src/filesystem_model.h +#code/ryzom/tools/leveldesign/georges_editor_qt/src/formdelegate.cpp +#code/ryzom/tools/leveldesign/georges_editor_qt/src/formdelegate.h +#code/ryzom/tools/leveldesign/georges_editor_qt/src/formitem.cpp +#code/ryzom/tools/leveldesign/georges_editor_qt/src/formitem.h +#code/ryzom/tools/leveldesign/georges_editor_qt/src/georges.cpp +#code/ryzom/tools/leveldesign/georges_editor_qt/src/georges.h +#code/ryzom/tools/leveldesign/georges_editor_qt/src/georges_dirtree_dialog.cpp +#code/ryzom/tools/leveldesign/georges_editor_qt/src/georges_dirtree_dialog.h +#code/ryzom/tools/leveldesign/georges_editor_qt/src/georges_splash.cpp +#code/ryzom/tools/leveldesign/georges_editor_qt/src/georges_splash.h +#code/ryzom/tools/leveldesign/georges_editor_qt/src/georges_treeview_dialog.cpp +#code/ryzom/tools/leveldesign/georges_editor_qt/src/georges_treeview_dialog.h +#code/ryzom/tools/leveldesign/georges_editor_qt/src/georgesform_model.cpp +#code/ryzom/tools/leveldesign/georges_editor_qt/src/georgesform_model.h +#code/ryzom/tools/leveldesign/georges_editor_qt/src/georgesform_proxy_model.cpp +#code/ryzom/tools/leveldesign/georges_editor_qt/src/georgesform_proxy_model.h +#code/ryzom/tools/leveldesign/georges_editor_qt/src/log_dialog.cpp +#code/ryzom/tools/leveldesign/georges_editor_qt/src/log_dialog.h +#code/ryzom/tools/leveldesign/georges_editor_qt/src/main.cpp +#code/ryzom/tools/leveldesign/georges_editor_qt/src/main_window.cpp +#code/ryzom/tools/leveldesign/georges_editor_qt/src/main_window.h +#code/ryzom/tools/leveldesign/georges_editor_qt/src/modules.cpp +#code/ryzom/tools/leveldesign/georges_editor_qt/src/modules.h +#code/ryzom/tools/leveldesign/georges_editor_qt/src/new_dialog.cpp +#code/ryzom/tools/leveldesign/georges_editor_qt/src/new_dialog.h +#code/ryzom/tools/leveldesign/georges_editor_qt/src/objectviewer_dialog.cpp +#code/ryzom/tools/leveldesign/georges_editor_qt/src/objectviewer_dialog.h +#code/ryzom/tools/leveldesign/georges_editor_qt/src/progress_dialog.cpp +#code/ryzom/tools/leveldesign/georges_editor_qt/src/progress_dialog.h +#code/ryzom/tools/leveldesign/georges_editor_qt/src/qt_displayer.cpp +#code/ryzom/tools/leveldesign/georges_editor_qt/src/qt_displayer.h +#code/ryzom/tools/leveldesign/georges_editor_qt/src/settings_dialog.cpp +#code/ryzom/tools/leveldesign/georges_editor_qt/src/settings_dialog.h +#code/ryzom/tools/leveldesign/georges_editor_qt/src/stdpch.cpp +#code/ryzom/tools/leveldesign/georges_editor_qt/src/stdpch.h +#code/ryzom/tools/leveldesign/mission_compiler_fe/Resource.h +#code/ryzom/tools/leveldesign/world_editor/world_editor/resource.h +#code/ryzom/tools/xml_packer/xml_packer.cpp +#code/studio/src/description.h +#code/studio/src/plugins/core/qtwin.cpp +#code/studio/src/plugins/core/qtwin.h +#code/studio/src/plugins/example/example_plugin.cpp +#code/studio/src/plugins/example/example_plugin.h +#code/studio/src/plugins/gui_editor/action_list.cpp +#code/studio/src/plugins/gui_editor/action_list.h +#code/studio/src/plugins/gui_editor/add_widget_widget.cpp +#code/studio/src/plugins/gui_editor/add_widget_widget.h +#code/studio/src/plugins/log/log_plugin.h +#code/studio/src/plugins/log/qt_displayer.h +#code/studio/src/plugins/mission_compiler/mission_compiler_main_window.cpp +#code/studio/src/plugins/mission_compiler/mission_compiler_main_window.h +#code/studio/src/plugins/mission_compiler/mission_compiler_plugin.cpp +#code/studio/src/plugins/mission_compiler/mission_compiler_plugin.h +#code/studio/src/plugins/mission_compiler/mission_compiler_plugin_constants.h +#code/studio/src/plugins/mission_compiler/validation_file.cpp +#code/studio/src/plugins/mission_compiler/validation_file.h +#code/studio/src/plugins/object_viewer/graphics_viewport.cpp +#code/studio/src/plugins/object_viewer/graphics_viewport.h +#code/studio/src/plugins/object_viewer/main_window.cpp +#code/studio/src/plugins/object_viewer/main_window.h +#code/studio/src/plugins/object_viewer/modules.cpp +#code/studio/src/plugins/object_viewer/modules.h +#code/studio/src/plugins/object_viewer/object_viewer.cpp +#code/studio/src/plugins/object_viewer/object_viewer.h +#code/studio/src/plugins/object_viewer/object_viewer_plugin.cpp +#code/studio/src/plugins/object_viewer/object_viewer_plugin.h +#code/studio/src/plugins/object_viewer/stdpch.cpp +#code/studio/src/plugins/object_viewer/stdpch.h +#code/studio/src/plugins/object_viewer/particle_system/attrib_widget.cpp +#code/studio/src/plugins/object_viewer/particle_system/attrib_widget.h +#code/studio/src/plugins/object_viewer/particle_system/auto_lod_dialog.cpp +#code/studio/src/plugins/object_viewer/particle_system/auto_lod_dialog.h +#code/studio/src/plugins/object_viewer/particle_system/basic_edit_widget.cpp +#code/studio/src/plugins/object_viewer/particle_system/basic_edit_widget.h +#code/studio/src/plugins/object_viewer/particle_system/bin_op_dialog.cpp +#code/studio/src/plugins/object_viewer/particle_system/bin_op_dialog.h +#code/studio/src/plugins/object_viewer/particle_system/constraint_mesh_widget.cpp +#code/studio/src/plugins/object_viewer/particle_system/constraint_mesh_widget.h +#code/studio/src/plugins/object_viewer/particle_system/curve_dialog.cpp +#code/studio/src/plugins/object_viewer/particle_system/curve_dialog.h +#code/studio/src/plugins/object_viewer/particle_system/direction_widget.cpp +#code/studio/src/plugins/object_viewer/particle_system/direction_widget.h +#code/studio/src/plugins/object_viewer/particle_system/emitter_page.cpp +#code/studio/src/plugins/object_viewer/particle_system/emitter_page.h +#code/studio/src/plugins/object_viewer/particle_system/follow_path_dialog.cpp +#code/studio/src/plugins/object_viewer/particle_system/follow_path_dialog.h +#code/studio/src/plugins/object_viewer/particle_system/located_bindable_page.cpp +#code/studio/src/plugins/object_viewer/particle_system/located_bindable_page.h +#code/studio/src/plugins/object_viewer/particle_system/located_page.cpp +#code/studio/src/plugins/object_viewer/particle_system/located_page.h +#code/studio/src/plugins/object_viewer/particle_system/mesh_widget.cpp +#code/studio/src/plugins/object_viewer/particle_system/mesh_widget.h +#code/studio/src/plugins/object_viewer/particle_system/morph_mesh_dialog.cpp +#code/studio/src/plugins/object_viewer/particle_system/morph_mesh_dialog.h +#code/studio/src/plugins/object_viewer/particle_system/multi_tex_dialog.cpp +#code/studio/src/plugins/object_viewer/particle_system/multi_tex_dialog.h +#code/studio/src/plugins/object_viewer/particle_system/particle_control_dialog.cpp +#code/studio/src/plugins/object_viewer/particle_system/particle_control_dialog.h +#code/studio/src/plugins/object_viewer/particle_system/particle_editor.cpp +#code/studio/src/plugins/object_viewer/particle_system/particle_editor.h +#code/studio/src/plugins/object_viewer/particle_system/particle_force_page.cpp +#code/studio/src/plugins/object_viewer/particle_system/particle_force_page.h +#code/studio/src/plugins/object_viewer/particle_system/particle_light_page.cpp +#code/studio/src/plugins/object_viewer/particle_system/particle_light_page.h +#code/studio/src/plugins/object_viewer/particle_system/particle_link_skeleton_dialog.cpp +#code/studio/src/plugins/object_viewer/particle_system/particle_link_skeleton_dialog.h +#code/studio/src/plugins/object_viewer/particle_system/particle_property_dialog.cpp +#code/studio/src/plugins/object_viewer/particle_system/particle_property_dialog.h +#code/studio/src/plugins/object_viewer/particle_system/particle_sound_page.cpp +#code/studio/src/plugins/object_viewer/particle_system/particle_sound_page.h +#code/studio/src/plugins/object_viewer/particle_system/particle_system_page.cpp +#code/studio/src/plugins/object_viewer/particle_system/particle_system_page.h +#code/studio/src/plugins/object_viewer/particle_system/particle_texture_anim_widget.cpp +#code/studio/src/plugins/object_viewer/particle_system/particle_texture_anim_widget.h +#code/studio/src/plugins/object_viewer/particle_system/particle_texture_widget.cpp +#code/studio/src/plugins/object_viewer/particle_system/particle_texture_widget.h +#code/studio/src/plugins/object_viewer/particle_system/particle_tree_model.cpp +#code/studio/src/plugins/object_viewer/particle_system/particle_tree_model.h +#code/studio/src/plugins/object_viewer/particle_system/particle_workspace_dialog.cpp +#code/studio/src/plugins/object_viewer/particle_system/particle_workspace_dialog.h +#code/studio/src/plugins/object_viewer/particle_system/particle_workspace_page.cpp +#code/studio/src/plugins/object_viewer/particle_system/particle_workspace_page.h +#code/studio/src/plugins/object_viewer/particle_system/particle_zone_page.cpp +#code/studio/src/plugins/object_viewer/particle_system/particle_zone_page.h +#code/studio/src/plugins/object_viewer/particle_system/ps_mover_page.cpp +#code/studio/src/plugins/object_viewer/particle_system/ps_mover_page.h +#code/studio/src/plugins/object_viewer/particle_system/spinner_dialog.cpp +#code/studio/src/plugins/object_viewer/particle_system/spinner_dialog.h +#code/studio/src/plugins/object_viewer/particle_system/tail_particle_widget.cpp +#code/studio/src/plugins/object_viewer/particle_system/tail_particle_widget.h +#code/studio/src/plugins/object_viewer/particle_system/value_blender_dialog.cpp +#code/studio/src/plugins/object_viewer/particle_system/value_blender_dialog.h +#code/studio/src/plugins/object_viewer/particle_system/value_from_emitter_dialog.cpp +#code/studio/src/plugins/object_viewer/particle_system/value_from_emitter_dialog.h +#code/studio/src/plugins/object_viewer/scene/animation_dialog.cpp +#code/studio/src/plugins/object_viewer/scene/animation_dialog.h +#code/studio/src/plugins/object_viewer/scene/animation_set_dialog.cpp +#code/studio/src/plugins/object_viewer/scene/animation_set_dialog.h +#code/studio/src/plugins/object_viewer/scene/camera_control.cpp +#code/studio/src/plugins/object_viewer/scene/camera_control.h +#code/studio/src/plugins/object_viewer/scene/day_night_dialog.cpp +#code/studio/src/plugins/object_viewer/scene/day_night_dialog.h +#code/studio/src/plugins/object_viewer/scene/entity.cpp +#code/studio/src/plugins/object_viewer/scene/entity.h +#code/studio/src/plugins/object_viewer/scene/global_wind_dialog.cpp +#code/studio/src/plugins/object_viewer/scene/global_wind_dialog.h +#code/studio/src/plugins/object_viewer/scene/setup_fog_dialog.cpp +#code/studio/src/plugins/object_viewer/scene/setup_fog_dialog.h +#code/studio/src/plugins/object_viewer/scene/skeleton_scale_dialog.cpp +#code/studio/src/plugins/object_viewer/scene/skeleton_scale_dialog.h +#code/studio/src/plugins/object_viewer/scene/skeleton_tree_model.cpp +#code/studio/src/plugins/object_viewer/scene/skeleton_tree_model.h +#code/studio/src/plugins/object_viewer/scene/slot_manager_dialog.cpp +#code/studio/src/plugins/object_viewer/scene/slot_manager_dialog.h +#code/studio/src/plugins/object_viewer/scene/sun_color_dialog.cpp +#code/studio/src/plugins/object_viewer/scene/sun_color_dialog.h +#code/studio/src/plugins/object_viewer/scene/tune_mrm_dialog.cpp +#code/studio/src/plugins/object_viewer/scene/tune_mrm_dialog.h +#code/studio/src/plugins/object_viewer/scene/tune_timer_dialog.cpp +#code/studio/src/plugins/object_viewer/scene/tune_timer_dialog.h +#code/studio/src/plugins/object_viewer/scene/water_pool_dialog.cpp +#code/studio/src/plugins/object_viewer/scene/water_pool_dialog.h +#code/studio/src/plugins/object_viewer/vegetable/vegetable_appearance_page.cpp +#code/studio/src/plugins/object_viewer/vegetable/vegetable_appearance_page.h +#code/studio/src/plugins/object_viewer/vegetable/vegetable_density_page.cpp +#code/studio/src/plugins/object_viewer/vegetable/vegetable_density_page.h +#code/studio/src/plugins/object_viewer/vegetable/vegetable_dialog.cpp +#code/studio/src/plugins/object_viewer/vegetable/vegetable_dialog.h +#code/studio/src/plugins/object_viewer/vegetable/vegetable_editor.cpp +#code/studio/src/plugins/object_viewer/vegetable/vegetable_editor.h +#code/studio/src/plugins/object_viewer/vegetable/vegetable_landscape_page.cpp +#code/studio/src/plugins/object_viewer/vegetable/vegetable_landscape_page.h +#code/studio/src/plugins/object_viewer/vegetable/vegetable_node.cpp +#code/studio/src/plugins/object_viewer/vegetable/vegetable_node.h +#code/studio/src/plugins/object_viewer/vegetable/vegetable_noise_value_widget.cpp +#code/studio/src/plugins/object_viewer/vegetable/vegetable_noise_value_widget.h +#code/studio/src/plugins/object_viewer/vegetable/vegetable_rotate_page.cpp +#code/studio/src/plugins/object_viewer/vegetable/vegetable_rotate_page.h +#code/studio/src/plugins/object_viewer/vegetable/vegetable_scale_page.cpp +#code/studio/src/plugins/object_viewer/vegetable/vegetable_scale_page.h +#code/studio/src/plugins/object_viewer/widgets/color_edit_widget.cpp +#code/studio/src/plugins/object_viewer/widgets/color_edit_widget.h +#code/studio/src/plugins/object_viewer/widgets/edit_range_widget.cpp +#code/studio/src/plugins/object_viewer/widgets/edit_range_widget.h +#code/studio/src/plugins/translation_manager/ftp_selection.h +#code/studio/src/plugins/zone_painter/painter_dock_widget.cpp +#code/studio/src/plugins/zone_painter/painter_dock_widget.h +#code/studio/src/plugins/zone_painter/zone_painter_main_window.cpp +#code/studio/src/plugins/zone_painter/zone_painter_main_window.h +#code/studio/src/plugins/zone_painter/zone_painter_plugin.cpp +#code/studio/src/plugins/zone_painter/zone_painter_plugin.h + +print("-- Done --") From 8e21fed1e6b79bf92f6364c7cb4f0c56e1dda103 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Fri, 29 Nov 2019 18:37:24 +0800 Subject: [PATCH 098/236] AGPLv3: The work must carry prominent notices stating that you modified it, and giving a relevant date --- code/nel/include/nel/3d/bloom_effect.h | 3 +++ code/nel/include/nel/3d/computed_string.h | 3 +++ code/nel/include/nel/3d/driver.h | 3 +++ code/nel/include/nel/3d/driver_user.h | 5 +++++ code/nel/include/nel/3d/dru.h | 3 +++ code/nel/include/nel/3d/landscapevb_allocator.h | 3 +++ code/nel/include/nel/3d/material.h | 3 +++ code/nel/include/nel/3d/meshvp_per_pixel_light.h | 3 +++ code/nel/include/nel/3d/meshvp_wind_tree.h | 3 +++ code/nel/include/nel/3d/ps_sound.h | 3 +++ code/nel/include/nel/3d/render_trav.h | 3 +++ code/nel/include/nel/3d/scene.h | 3 +++ code/nel/include/nel/3d/scene_user.h | 3 +++ code/nel/include/nel/3d/skeleton_model.h | 3 +++ code/nel/include/nel/3d/text_context.h | 3 +++ code/nel/include/nel/3d/text_context_user.h | 3 +++ code/nel/include/nel/3d/tile_bank.h | 3 +++ code/nel/include/nel/3d/u_driver.h | 5 +++++ code/nel/include/nel/3d/u_ps_sound_impl.h | 3 +++ code/nel/include/nel/3d/u_ps_sound_interface.h | 3 +++ code/nel/include/nel/3d/u_scene.h | 3 +++ code/nel/include/nel/3d/u_text_context.h | 3 +++ code/nel/include/nel/3d/vegetable_manager.h | 3 +++ code/nel/include/nel/3d/vertex_program.h | 3 +++ code/nel/include/nel/3d/vertex_program_parse.h | 3 +++ code/nel/include/nel/3d/water_env_map.h | 3 +++ code/nel/include/nel/3d/water_shape.h | 3 +++ code/nel/include/nel/3d/zone_lighter.h | 3 +++ code/nel/include/nel/georges/form.h | 3 +++ code/nel/include/nel/georges/form_dfn.h | 3 +++ code/nel/include/nel/georges/form_elm.h | 3 +++ code/nel/include/nel/georges/form_loader.h | 3 +++ code/nel/include/nel/georges/header.h | 3 +++ code/nel/include/nel/georges/type.h | 3 +++ code/nel/include/nel/georges/u_form.h | 3 +++ code/nel/include/nel/gui/action_handler.h | 3 +++ code/nel/include/nel/gui/ctrl_base.h | 3 +++ code/nel/include/nel/gui/ctrl_base_button.h | 5 ++++- code/nel/include/nel/gui/ctrl_button.h | 3 +++ code/nel/include/nel/gui/ctrl_col_pick.h | 3 +++ code/nel/include/nel/gui/ctrl_draggable.h | 3 +++ code/nel/include/nel/gui/ctrl_polygon.h | 3 +++ code/nel/include/nel/gui/ctrl_quad.h | 3 +++ code/nel/include/nel/gui/ctrl_scroll.h | 3 +++ code/nel/include/nel/gui/ctrl_scroll_base.h | 3 +++ code/nel/include/nel/gui/ctrl_sheet_selection.h | 3 +++ code/nel/include/nel/gui/ctrl_text_button.h | 3 +++ code/nel/include/nel/gui/ctrl_tooltip.h | 3 +++ code/nel/include/nel/gui/db_manager.h | 3 +++ code/nel/include/nel/gui/dbgroup_combo_box.h | 4 ++++ code/nel/include/nel/gui/dbgroup_select_number.h | 3 +++ code/nel/include/nel/gui/dbview_bar.h | 3 +++ code/nel/include/nel/gui/dbview_bar3.h | 3 +++ code/nel/include/nel/gui/dbview_digit.h | 3 +++ code/nel/include/nel/gui/dbview_number.h | 3 +++ code/nel/include/nel/gui/dbview_quantity.h | 3 +++ code/nel/include/nel/gui/editor_selection_watcher.h | 3 +++ code/nel/include/nel/gui/event_descriptor.h | 3 +++ code/nel/include/nel/gui/event_listener.h | 3 +++ code/nel/include/nel/gui/group_container.h | 5 ++++- code/nel/include/nel/gui/group_container_base.h | 3 +++ code/nel/include/nel/gui/group_editbox.h | 3 +++ code/nel/include/nel/gui/group_editbox_base.h | 3 +++ code/nel/include/nel/gui/group_editbox_decor.h | 4 +++- code/nel/include/nel/gui/group_frame.h | 3 +++ code/nel/include/nel/gui/group_header.h | 3 +++ code/nel/include/nel/gui/group_html.h | 5 ++++- code/nel/include/nel/gui/group_list.h | 3 +++ code/nel/include/nel/gui/group_menu.h | 6 +++++- code/nel/include/nel/gui/group_modal.h | 3 +++ code/nel/include/nel/gui/group_paragraph.h | 3 +++ code/nel/include/nel/gui/group_scrolltext.h | 3 +++ code/nel/include/nel/gui/group_submenu_base.h | 3 +++ code/nel/include/nel/gui/group_tab.h | 3 +++ code/nel/include/nel/gui/group_table.h | 3 +++ code/nel/include/nel/gui/group_tree.h | 3 +++ code/nel/include/nel/gui/group_wheel.h | 3 +++ code/nel/include/nel/gui/http_hsts.h | 3 +++ code/nel/include/nel/gui/input_event_listener.h | 3 +++ code/nel/include/nel/gui/input_handler.h | 3 +++ code/nel/include/nel/gui/interface_anim.h | 3 +++ code/nel/include/nel/gui/interface_common.h | 3 +++ code/nel/include/nel/gui/interface_element.h | 3 +++ code/nel/include/nel/gui/interface_expr.h | 3 +++ code/nel/include/nel/gui/interface_expr_node.h | 3 +++ code/nel/include/nel/gui/interface_factory.h | 3 +++ code/nel/include/nel/gui/interface_group.h | 5 ++++- code/nel/include/nel/gui/interface_link.h | 4 ++++ code/nel/include/nel/gui/interface_options.h | 4 ++++ code/nel/include/nel/gui/interface_parser.h | 3 +++ code/nel/include/nel/gui/interface_property.h | 3 +++ code/nel/include/nel/gui/libwww.h | 3 +++ code/nel/include/nel/gui/link_data.h | 3 +++ code/nel/include/nel/gui/lua_helper.h | 4 ++++ code/nel/include/nel/gui/lua_helper_inline.h | 3 +++ code/nel/include/nel/gui/lua_ihm.h | 5 ++++- code/nel/include/nel/gui/lua_loadlib.h | 3 +++ code/nel/include/nel/gui/lua_manager.h | 3 +++ code/nel/include/nel/gui/lua_object.h | 4 ++++ code/nel/include/nel/gui/parser.h | 3 +++ code/nel/include/nel/gui/proc.h | 3 +++ code/nel/include/nel/gui/reflect.h | 3 +++ code/nel/include/nel/gui/reflect_register.h | 3 +++ code/nel/include/nel/gui/root_group.h | 3 +++ code/nel/include/nel/gui/variable_data.h | 3 +++ code/nel/include/nel/gui/view_base.h | 3 +++ code/nel/include/nel/gui/view_bitmap.h | 3 +++ code/nel/include/nel/gui/view_bitmap_combo.h | 3 +++ code/nel/include/nel/gui/view_link.h | 3 +++ code/nel/include/nel/gui/view_pointer.h | 3 +++ code/nel/include/nel/gui/view_pointer_base.h | 4 ++++ code/nel/include/nel/gui/view_polygon.h | 3 +++ code/nel/include/nel/gui/view_quad.h | 3 +++ code/nel/include/nel/gui/view_renderer.h | 3 +++ code/nel/include/nel/gui/view_text.h | 4 ++++ code/nel/include/nel/gui/view_text_formated.h | 3 +++ code/nel/include/nel/gui/view_text_id.h | 3 +++ code/nel/include/nel/gui/view_text_id_formated.h | 3 +++ code/nel/include/nel/gui/widget_manager.h | 4 ++++ code/nel/include/nel/misc/app_context.h | 3 +++ code/nel/include/nel/misc/bitmap.h | 3 +++ code/nel/include/nel/misc/cdb.h | 3 +++ code/nel/include/nel/misc/cdb_bank_handler.h | 3 +++ code/nel/include/nel/misc/cdb_branch.h | 4 ++++ code/nel/include/nel/misc/cdb_branch_observing_handler.h | 3 +++ code/nel/include/nel/misc/cdb_check_sum.h | 3 +++ code/nel/include/nel/misc/cdb_leaf.h | 3 +++ code/nel/include/nel/misc/cdb_manager.h | 3 +++ code/nel/include/nel/misc/class_id.h | 3 +++ code/nel/include/nel/misc/common.h | 7 ++++++- code/nel/include/nel/misc/debug.h | 3 +++ code/nel/include/nel/misc/dummy_window.h | 3 +++ code/nel/include/nel/misc/entity_id.h | 4 ++++ code/nel/include/nel/misc/event_emitter.h | 3 +++ code/nel/include/nel/misc/factory.h | 2 +- code/nel/include/nel/misc/fast_floor.h | 3 +++ code/nel/include/nel/misc/fixed_size_allocator.h | 3 +++ code/nel/include/nel/misc/gtk_displayer.h | 3 +++ code/nel/include/nel/misc/hierarchical_timer.h | 3 +++ code/nel/include/nel/misc/i18n.h | 3 +++ code/nel/include/nel/misc/i_streamed_package_provider.h | 2 +- code/nel/include/nel/misc/inter_window_msg_queue.h | 3 +++ code/nel/include/nel/misc/matrix.h | 3 +++ code/nel/include/nel/misc/mem_stream.h | 3 +++ code/nel/include/nel/misc/mutex.h | 4 ++++ code/nel/include/nel/misc/object_vector.h | 3 +++ code/nel/include/nel/misc/p_thread.h | 3 +++ code/nel/include/nel/misc/path.h | 4 ++++ code/nel/include/nel/misc/report.h | 4 ++++ code/nel/include/nel/misc/rgba.h | 3 +++ code/nel/include/nel/misc/seven_zip.h | 3 +++ code/nel/include/nel/misc/sha1.h | 3 +++ code/nel/include/nel/misc/sheet_id.h | 3 +++ code/nel/include/nel/misc/smart_ptr.h | 3 +++ code/nel/include/nel/misc/sstring.h | 3 +++ code/nel/include/nel/misc/streamed_package.h | 2 +- code/nel/include/nel/misc/streamed_package_manager.h | 2 +- code/nel/include/nel/misc/string_common.h | 4 ++++ code/nel/include/nel/misc/system_utils.h | 3 +++ code/nel/include/nel/misc/thread.h | 3 +++ code/nel/include/nel/misc/time_nl.h | 3 +++ code/nel/include/nel/misc/types_nl.h | 5 ++++- code/nel/include/nel/misc/ucstring.h | 3 +++ code/nel/include/nel/misc/win_displayer.h | 3 +++ code/nel/include/nel/misc/win_event_emitter.h | 3 +++ code/nel/include/nel/misc/win_thread.h | 3 +++ code/nel/include/nel/misc/window_displayer.h | 3 +++ code/nel/include/nel/misc/xml_auto_ptr.h | 4 ++++ code/nel/include/nel/net/buf_sock.h | 3 +++ code/nel/include/nel/net/service.h | 3 +++ code/nel/include/nel/pipeline/database_config.h | 3 +++ code/nel/include/nel/pipeline/project_config.h | 3 +++ code/nel/include/nel/pipeline/tool_logger.h | 5 ++++- code/nel/include/nel/sound/audio_decoder_mp3.h | 3 +++ code/nel/include/nel/sound/audio_mixer_user.h | 4 ++++ code/nel/include/nel/sound/background_sound.h | 4 ++++ code/nel/include/nel/sound/background_sound_manager.h | 4 ++++ code/nel/include/nel/sound/background_source.h | 4 ++++ code/nel/include/nel/sound/clustered_sound.h | 3 +++ code/nel/include/nel/sound/complex_sound.h | 4 ++++ code/nel/include/nel/sound/complex_source.h | 4 ++++ code/nel/include/nel/sound/context_sound.h | 4 ++++ code/nel/include/nel/sound/driver/buffer.h | 3 +++ code/nel/include/nel/sound/driver/music_channel.h | 3 +++ code/nel/include/nel/sound/driver/sound_driver.h | 3 +++ code/nel/include/nel/sound/driver/source.h | 3 +++ code/nel/include/nel/sound/music_channel_fader.h | 4 +++- code/nel/include/nel/sound/music_sound.h | 3 +++ code/nel/include/nel/sound/music_source.h | 4 ++++ code/nel/include/nel/sound/sample_bank.h | 3 +++ code/nel/include/nel/sound/sample_bank_manager.h | 3 +++ code/nel/include/nel/sound/simple_sound.h | 3 +++ code/nel/include/nel/sound/simple_source.h | 4 ++++ code/nel/include/nel/sound/sound.h | 3 +++ code/nel/include/nel/sound/sound_anim_manager.h | 3 +++ code/nel/include/nel/sound/sound_anim_marker.h | 4 ++++ code/nel/include/nel/sound/sound_animation.h | 3 +++ code/nel/include/nel/sound/sound_bank.h | 4 ++++ code/nel/include/nel/sound/source_common.h | 4 ++++ code/nel/include/nel/sound/stream_sound.h | 4 ++++ code/nel/include/nel/sound/stream_source.h | 5 ++++- code/nel/include/nel/sound/u_audio_mixer.h | 4 ++++ code/nel/include/nel/web/curl_certificates.h | 3 +++ code/nel/include/nel/web/http_client_curl.h | 3 +++ code/nel/include/nel/web/http_package_provider.h | 2 +- code/nel/samples/3d/cluster_viewer/main.cpp | 3 +++ code/nel/samples/3d/font/main.cpp | 3 +++ code/nel/samples/3d/shape_viewer/main.cpp | 3 +++ code/nel/samples/georges/main.cpp | 3 +++ code/nel/samples/misc/debug/main.cpp | 3 +++ code/nel/samples/net/chat/kbhit.cpp | 3 +++ code/nel/samples/net/chat/server.cpp | 3 +++ code/nel/samples/net/class_transport/ai_service.cpp | 3 +++ code/nel/samples/net/class_transport/gd_service.cpp | 3 +++ code/nel/samples/net/login_system/frontend_service.cpp | 3 +++ code/nel/samples/net/udp/bench_service.cpp | 3 +++ code/nel/samples/net/udp/receive_task.cpp | 3 +++ code/nel/samples/net/udp/simlag.cpp | 3 +++ code/nel/samples/sound/sound_sources/main.cpp | 3 +++ code/nel/samples/sound/stream_file/stream_file.cpp | 2 +- .../samples/sound/stream_ogg_vorbis/stream_ogg_vorbis.cpp | 2 +- code/nel/src/3d/bloom_effect.cpp | 3 +++ code/nel/src/3d/computed_string.cpp | 3 +++ code/nel/src/3d/driver.cpp | 3 +++ code/nel/src/3d/driver/direct3d/driver_direct3d.cpp | 5 +++++ code/nel/src/3d/driver/direct3d/driver_direct3d.h | 4 ++++ code/nel/src/3d/driver/direct3d/driver_direct3d_index.cpp | 3 +++ .../src/3d/driver/direct3d/driver_direct3d_material.cpp | 3 +++ .../nel/src/3d/driver/direct3d/driver_direct3d_shader.cpp | 3 +++ .../src/3d/driver/direct3d/driver_direct3d_texture.cpp | 3 +++ .../src/3d/driver/direct3d/driver_direct3d_uniform.cpp | 3 +++ .../nel/src/3d/driver/direct3d/driver_direct3d_vertex.cpp | 3 +++ .../3d/driver/direct3d/driver_direct3d_vertex_program.cpp | 3 +++ code/nel/src/3d/driver/opengl/driver_opengl.cpp | 4 ++++ code/nel/src/3d/driver/opengl/driver_opengl.h | 4 ++++ code/nel/src/3d/driver/opengl/driver_opengl_extension.cpp | 4 ++++ code/nel/src/3d/driver/opengl/driver_opengl_extension.h | 4 ++++ code/nel/src/3d/driver/opengl/driver_opengl_material.cpp | 3 +++ code/nel/src/3d/driver/opengl/driver_opengl_states.h | 3 +++ code/nel/src/3d/driver/opengl/driver_opengl_texture.cpp | 3 +++ code/nel/src/3d/driver/opengl/driver_opengl_uniform.cpp | 3 +++ code/nel/src/3d/driver/opengl/driver_opengl_vertex.cpp | 3 +++ .../3d/driver/opengl/driver_opengl_vertex_buffer_hard.cpp | 3 +++ .../src/3d/driver/opengl/driver_opengl_vertex_program.cpp | 4 ++++ code/nel/src/3d/driver/opengl/driver_opengl_window.cpp | 5 +++++ .../src/3d/driver/opengl/mac/cocoa_application_delegate.h | 3 +++ code/nel/src/3d/driver/opengl/mac/cocoa_event_emitter.cpp | 6 +++++- code/nel/src/3d/driver/opengl/mac/cocoa_event_emitter.h | 4 ++++ code/nel/src/3d/driver/opengl/mac/cocoa_opengl_view.h | 3 +++ code/nel/src/3d/driver/opengl/mac/cocoa_window_delegate.h | 3 +++ code/nel/src/3d/driver/opengl/stdopengl.h | 3 +++ code/nel/src/3d/driver/opengl/unix_event_emitter.cpp | 4 ++++ code/nel/src/3d/driver/opengl/unix_event_emitter.h | 3 +++ code/nel/src/3d/driver_user.cpp | 6 ++++++ code/nel/src/3d/driver_user2.cpp | 3 +++ code/nel/src/3d/dru.cpp | 3 +++ code/nel/src/3d/flare_model.cpp | 3 +++ code/nel/src/3d/font_generator.cpp | 3 +++ code/nel/src/3d/hls_texture_bank.cpp | 3 +++ code/nel/src/3d/init_3d.cpp | 3 +++ code/nel/src/3d/instance_lighter.cpp | 3 +++ code/nel/src/3d/landscape.cpp | 3 +++ code/nel/src/3d/landscapevb_allocator.cpp | 3 +++ code/nel/src/3d/mesh_mrm_skin.cpp | 3 +++ code/nel/src/3d/mesh_mrm_skin_template.cpp | 3 +++ code/nel/src/3d/mesh_mrm_skinned.cpp | 3 +++ code/nel/src/3d/mesh_multi_lod.cpp | 3 +++ code/nel/src/3d/meshvp_per_pixel_light.cpp | 3 +++ code/nel/src/3d/meshvp_wind_tree.cpp | 3 +++ code/nel/src/3d/particle_system.cpp | 3 +++ code/nel/src/3d/particle_system_shape.cpp | 3 +++ code/nel/src/3d/point_light.cpp | 3 +++ code/nel/src/3d/ps_mesh.cpp | 3 +++ code/nel/src/3d/ps_particle_basic.cpp | 3 +++ code/nel/src/3d/ps_sound.cpp | 3 +++ code/nel/src/3d/render_trav.cpp | 3 +++ code/nel/src/3d/scene.cpp | 3 +++ code/nel/src/3d/scene_group.cpp | 3 +++ code/nel/src/3d/scene_user.cpp | 3 +++ code/nel/src/3d/shadow_map_manager.cpp | 3 +++ code/nel/src/3d/text_context.cpp | 3 +++ code/nel/src/3d/text_context_user.cpp | 3 +++ code/nel/src/3d/texture_dlm.cpp | 3 +++ code/nel/src/3d/tile_bank.cpp | 3 +++ code/nel/src/3d/vegetable_manager.cpp | 3 +++ code/nel/src/3d/vegetablevb_allocator.cpp | 3 +++ code/nel/src/3d/vertex_buffer_heap.cpp | 3 +++ code/nel/src/3d/vertex_program.cpp | 3 +++ code/nel/src/3d/vertex_program_parse.cpp | 3 +++ code/nel/src/3d/visual_collision_mesh.cpp | 3 +++ code/nel/src/3d/water_env_map.cpp | 3 +++ code/nel/src/3d/water_model.cpp | 3 +++ code/nel/src/3d/water_shape.cpp | 3 +++ code/nel/src/3d/zone_lighter.cpp | 3 +++ code/nel/src/georges/form.cpp | 3 +++ code/nel/src/georges/form_dfn.cpp | 4 ++++ code/nel/src/georges/form_elm.cpp | 4 ++++ code/nel/src/georges/header.cpp | 3 +++ code/nel/src/georges/type.cpp | 3 +++ code/nel/src/gui/action_handler.cpp | 3 +++ code/nel/src/gui/ctrl_base.cpp | 5 ++++- code/nel/src/gui/ctrl_base_button.cpp | 5 ++++- code/nel/src/gui/ctrl_button.cpp | 3 +++ code/nel/src/gui/ctrl_col_pick.cpp | 3 +++ code/nel/src/gui/ctrl_draggable.cpp | 3 +++ code/nel/src/gui/ctrl_polygon.cpp | 3 +++ code/nel/src/gui/ctrl_quad.cpp | 3 +++ code/nel/src/gui/ctrl_scroll.cpp | 4 ++++ code/nel/src/gui/ctrl_scroll_base.cpp | 3 +++ code/nel/src/gui/ctrl_sheet_selection.cpp | 3 +++ code/nel/src/gui/ctrl_text_button.cpp | 3 +++ code/nel/src/gui/ctrl_tooltip.cpp | 3 +++ code/nel/src/gui/db_manager.cpp | 3 +++ code/nel/src/gui/dbgroup_combo_box.cpp | 4 ++++ code/nel/src/gui/dbgroup_select_number.cpp | 4 ++++ code/nel/src/gui/dbview_bar.cpp | 3 +++ code/nel/src/gui/dbview_bar3.cpp | 3 +++ code/nel/src/gui/dbview_digit.cpp | 3 +++ code/nel/src/gui/dbview_number.cpp | 3 +++ code/nel/src/gui/dbview_quantity.cpp | 3 +++ code/nel/src/gui/event_descriptor.cpp | 3 +++ code/nel/src/gui/event_listener.cpp | 3 +++ code/nel/src/gui/group_container.cpp | 6 +++++- code/nel/src/gui/group_container_base.cpp | 3 +++ code/nel/src/gui/group_editbox.cpp | 3 +++ code/nel/src/gui/group_editbox_base.cpp | 3 +++ code/nel/src/gui/group_editbox_decor.cpp | 4 +++- code/nel/src/gui/group_frame.cpp | 3 +++ code/nel/src/gui/group_header.cpp | 3 +++ code/nel/src/gui/group_html.cpp | 6 +++++- code/nel/src/gui/group_list.cpp | 3 +++ code/nel/src/gui/group_menu.cpp | 6 +++++- code/nel/src/gui/group_modal.cpp | 3 +++ code/nel/src/gui/group_paragraph.cpp | 3 +++ code/nel/src/gui/group_scrolltext.cpp | 3 +++ code/nel/src/gui/group_submenu_base.cpp | 3 +++ code/nel/src/gui/group_tab.cpp | 3 +++ code/nel/src/gui/group_table.cpp | 3 +++ code/nel/src/gui/group_tree.cpp | 3 +++ code/nel/src/gui/group_wheel.cpp | 4 ++++ code/nel/src/gui/http_hsts.cpp | 3 +++ code/nel/src/gui/input_handler.cpp | 3 +++ code/nel/src/gui/interface_anim.cpp | 4 ++++ code/nel/src/gui/interface_element.cpp | 3 +++ code/nel/src/gui/interface_expr.cpp | 3 +++ code/nel/src/gui/interface_expr_node.cpp | 3 +++ code/nel/src/gui/interface_expr_user_fct.cpp | 3 +++ code/nel/src/gui/interface_factory.cpp | 3 +++ code/nel/src/gui/interface_group.cpp | 4 ++++ code/nel/src/gui/interface_link.cpp | 4 ++++ code/nel/src/gui/interface_options.cpp | 4 ++++ code/nel/src/gui/interface_parser.cpp | 4 ++++ code/nel/src/gui/interface_property.cpp | 3 +++ code/nel/src/gui/libwww.cpp | 3 +++ code/nel/src/gui/link_hack.cpp | 4 ++++ code/nel/src/gui/lua_helper.cpp | 4 ++++ code/nel/src/gui/lua_ihm.cpp | 6 +++++- code/nel/src/gui/lua_manager.cpp | 3 +++ code/nel/src/gui/lua_object.cpp | 4 ++++ code/nel/src/gui/parser.cpp | 3 +++ code/nel/src/gui/proc.cpp | 3 +++ code/nel/src/gui/reflect.cpp | 3 +++ code/nel/src/gui/reflect_register.cpp | 3 +++ code/nel/src/gui/root_group.cpp | 3 +++ code/nel/src/gui/stdpch.h | 4 ++++ code/nel/src/gui/string_case.cpp | 3 +++ code/nel/src/gui/view_base.cpp | 3 +++ code/nel/src/gui/view_bitmap.cpp | 5 ++++- code/nel/src/gui/view_bitmap_combo.cpp | 3 +++ code/nel/src/gui/view_link.cpp | 3 +++ code/nel/src/gui/view_pointer.cpp | 3 +++ code/nel/src/gui/view_pointer_base.cpp | 4 ++++ code/nel/src/gui/view_polygon.cpp | 3 +++ code/nel/src/gui/view_quad.cpp | 3 +++ code/nel/src/gui/view_renderer.cpp | 3 +++ code/nel/src/gui/view_text.cpp | 6 +++++- code/nel/src/gui/view_text_formated.cpp | 3 +++ code/nel/src/gui/view_text_id.cpp | 3 +++ code/nel/src/gui/view_text_id_formated.cpp | 3 +++ code/nel/src/gui/widget_manager.cpp | 4 ++++ code/nel/src/ligo/primitive.cpp | 3 +++ code/nel/src/ligo/stdligo.h | 3 +++ code/nel/src/ligo/zone_bank.cpp | 4 ++++ code/nel/src/ligo/zone_region.cpp | 3 +++ code/nel/src/misc/app_context.cpp | 3 +++ code/nel/src/misc/bit_mem_stream.cpp | 3 +++ code/nel/src/misc/bitmap.cpp | 3 +++ code/nel/src/misc/bitmap_jpeg.cpp | 3 +++ code/nel/src/misc/bitmap_png.cpp | 3 +++ code/nel/src/misc/buf_fifo.cpp | 3 +++ code/nel/src/misc/cdb.cpp | 3 +++ code/nel/src/misc/cdb_bank_handler.cpp | 3 +++ code/nel/src/misc/cdb_branch.cpp | 4 ++++ code/nel/src/misc/cdb_branch_observing_handler.cpp | 3 +++ code/nel/src/misc/cdb_check_sum.cpp | 3 +++ code/nel/src/misc/cdb_leaf.cpp | 4 ++++ code/nel/src/misc/cdb_manager.cpp | 3 +++ code/nel/src/misc/class_id.cpp | 3 +++ code/nel/src/misc/co_task.cpp | 3 +++ code/nel/src/misc/command.cpp | 2 +- code/nel/src/misc/common.cpp | 3 +++ code/nel/src/misc/cpu_time_stat.cpp | 3 +++ code/nel/src/misc/debug.cpp | 4 ++++ code/nel/src/misc/displayer.cpp | 3 +++ code/nel/src/misc/dynloadlib.cpp | 3 +++ code/nel/src/misc/eid_translator.cpp | 2 +- code/nel/src/misc/eval_num_expr.cpp | 3 +++ code/nel/src/misc/events.cpp | 3 +++ code/nel/src/misc/file.cpp | 3 +++ code/nel/src/misc/fixed_size_allocator.cpp | 3 +++ code/nel/src/misc/gtk_displayer.cpp | 3 +++ code/nel/src/misc/i18n.cpp | 6 +++++- code/nel/src/misc/i_streamed_package_provider.cpp | 2 +- code/nel/src/misc/log.cpp | 2 +- code/nel/src/misc/matrix.cpp | 3 +++ code/nel/src/misc/mem_displayer.cpp | 3 +++ code/nel/src/misc/o_xml.cpp | 3 +++ code/nel/src/misc/object_arena_allocator.cpp | 3 +++ code/nel/src/misc/p_thread.cpp | 4 ++++ code/nel/src/misc/path.cpp | 4 ++++ code/nel/src/misc/report.cpp | 4 ++++ code/nel/src/misc/rgba.cpp | 3 +++ code/nel/src/misc/seven_zip.cpp | 3 +++ code/nel/src/misc/sha1.cpp | 3 +++ code/nel/src/misc/shared_memory.cpp | 3 +++ code/nel/src/misc/sheet_id.cpp | 3 +++ code/nel/src/misc/stdmisc.h | 3 +++ code/nel/src/misc/streamed_package.cpp | 2 +- code/nel/src/misc/streamed_package_manager.cpp | 2 +- code/nel/src/misc/string_common.cpp | 3 +++ code/nel/src/misc/system_info.cpp | 3 +++ code/nel/src/misc/system_utils.cpp | 3 +++ code/nel/src/misc/tds.cpp | 3 +++ code/nel/src/misc/time_nl.cpp | 3 +++ code/nel/src/misc/win_displayer.cpp | 3 +++ code/nel/src/misc/win_event_emitter.cpp | 4 ++++ code/nel/src/misc/win_thread.cpp | 3 +++ code/nel/src/misc/window_displayer.cpp | 3 +++ code/nel/src/misc/words_dictionary.cpp | 3 +++ code/nel/src/net/buf_client.cpp | 3 +++ code/nel/src/net/buf_server.cpp | 3 +++ code/nel/src/net/buf_sock.cpp | 3 +++ code/nel/src/net/callback_client.cpp | 3 +++ code/nel/src/net/listen_sock.cpp | 3 +++ code/nel/src/net/message_recorder.cpp | 3 +++ code/nel/src/net/net_log.cpp | 3 +++ code/nel/src/net/service.cpp | 3 +++ code/nel/src/net/sock.cpp | 3 +++ code/nel/src/net/tcp_sock.cpp | 3 +++ code/nel/src/net/udp_sock.cpp | 3 +++ code/nel/src/net/unified_network.cpp | 3 +++ code/nel/src/net/unitime.cpp | 3 +++ code/nel/src/pacs/edge_collide.cpp | 3 +++ code/nel/src/pacs/local_retriever.cpp | 3 +++ code/nel/src/pacs/move_container.cpp | 2 +- code/nel/src/pipeline/database_config.cpp | 3 +++ code/nel/src/pipeline/project_config.cpp | 3 +++ code/nel/src/pipeline/tool_logger.cpp | 5 ++++- code/nel/src/sound/async_file_manager_sound.cpp | 3 +++ code/nel/src/sound/audio_decoder_mp3.cpp | 3 +++ code/nel/src/sound/audio_mixer_user.cpp | 4 ++++ code/nel/src/sound/background_sound.cpp | 4 ++++ code/nel/src/sound/background_sound_manager.cpp | 4 ++++ code/nel/src/sound/background_source.cpp | 4 ++++ code/nel/src/sound/clustered_sound.cpp | 4 ++++ code/nel/src/sound/complex_sound.cpp | 4 ++++ code/nel/src/sound/complex_source.cpp | 4 ++++ code/nel/src/sound/context_sound.cpp | 4 ++++ code/nel/src/sound/driver/buffer.cpp | 3 +++ code/nel/src/sound/driver/dsound/sound_driver_dsound.cpp | 3 +++ code/nel/src/sound/driver/dsound/source_dsound.cpp | 3 +++ code/nel/src/sound/driver/effect.cpp | 3 +++ code/nel/src/sound/driver/fmod/music_channel_fmod.cpp | 3 +++ code/nel/src/sound/driver/fmod/music_channel_fmod.h | 3 +++ code/nel/src/sound/driver/fmod/source_fmod.cpp | 3 +++ code/nel/src/sound/driver/music_channel.cpp | 3 +++ code/nel/src/sound/driver/openal/buffer_al.cpp | 3 +++ code/nel/src/sound/driver/openal/buffer_al.h | 3 +++ code/nel/src/sound/driver/openal/ext_al.h | 3 +++ code/nel/src/sound/driver/openal/listener_al.cpp | 3 +++ code/nel/src/sound/driver/openal/sound_driver_al.cpp | 3 +++ code/nel/src/sound/driver/openal/sound_driver_al.h | 3 +++ code/nel/src/sound/driver/openal/source_al.cpp | 3 +++ code/nel/src/sound/driver/openal/source_al.h | 3 +++ code/nel/src/sound/driver/sound_driver.cpp | 4 ++++ code/nel/src/sound/driver/source.cpp | 3 +++ code/nel/src/sound/driver/xaudio2/adpcm_xaudio2.cpp | 2 +- code/nel/src/sound/driver/xaudio2/adpcm_xaudio2.h | 2 +- code/nel/src/sound/driver/xaudio2/buffer_xaudio2.cpp | 2 +- code/nel/src/sound/driver/xaudio2/buffer_xaudio2.h | 2 +- code/nel/src/sound/driver/xaudio2/effect_xaudio2.cpp | 2 +- code/nel/src/sound/driver/xaudio2/effect_xaudio2.h | 2 +- code/nel/src/sound/driver/xaudio2/listener_xaudio2.cpp | 2 +- code/nel/src/sound/driver/xaudio2/listener_xaudio2.h | 2 +- .../nel/src/sound/driver/xaudio2/sound_driver_xaudio2.cpp | 2 +- code/nel/src/sound/driver/xaudio2/sound_driver_xaudio2.h | 2 +- code/nel/src/sound/driver/xaudio2/source_xaudio2.cpp | 2 +- code/nel/src/sound/driver/xaudio2/source_xaudio2.h | 2 +- code/nel/src/sound/driver/xaudio2/stdxaudio2.cpp | 2 +- code/nel/src/sound/driver/xaudio2/stdxaudio2.h | 2 +- code/nel/src/sound/listener_user.cpp | 3 +++ code/nel/src/sound/mixing_track.cpp | 3 +++ code/nel/src/sound/music_channel_fader.cpp | 5 ++++- code/nel/src/sound/music_sound.cpp | 4 ++++ code/nel/src/sound/music_sound_manager.cpp | 3 +++ code/nel/src/sound/music_source.cpp | 4 ++++ code/nel/src/sound/sample_bank.cpp | 3 +++ code/nel/src/sound/sample_bank_manager.cpp | 3 +++ code/nel/src/sound/simple_sound.cpp | 4 ++++ code/nel/src/sound/simple_source.cpp | 4 ++++ code/nel/src/sound/sound.cpp | 4 ++++ code/nel/src/sound/sound_anim_marker.cpp | 3 +++ code/nel/src/sound/sound_animation.cpp | 3 +++ code/nel/src/sound/sound_bank.cpp | 4 ++++ code/nel/src/sound/source_common.cpp | 4 ++++ code/nel/src/sound/stream_sound.cpp | 5 ++++- code/nel/src/sound/stream_source.cpp | 5 ++++- code/nel/src/web/curl_certificates.cpp | 3 +++ code/nel/src/web/http_client_curl.cpp | 3 +++ code/nel/src/web/http_package_provider.cpp | 2 +- code/nel/src/web/stdweb.cpp | 3 +++ code/nel/src/web/stdweb.h | 3 +++ code/nel/tools/3d/build_coarse_mesh/build_coarse_mesh.cpp | 3 +++ code/nel/tools/3d/build_far_bank/build_far_bank.cpp | 3 +++ code/nel/tools/3d/cluster_viewer/view_cs.cpp | 3 +++ code/nel/tools/3d/ig_elevation/main.cpp | 3 +++ code/nel/tools/3d/ig_lighter_lib/ig_lighter_lib.cpp | 3 +++ code/nel/tools/3d/lightmap_optimizer/main.cpp | 3 +++ code/nel/tools/3d/ligo/plugin_max/DllEntry.cpp | 3 +++ code/nel/tools/3d/ligo/plugin_max/max_to_ligo.cpp | 3 +++ code/nel/tools/3d/ligo/plugin_max/script.cpp | 4 ++++ code/nel/tools/3d/mesh_utils/assimp_material.cpp | 3 +++ code/nel/tools/3d/mesh_utils/assimp_shape.cpp | 3 +++ code/nel/tools/3d/mesh_utils/mesh_utils.cpp | 3 +++ code/nel/tools/3d/mesh_utils/scene_context.cpp | 3 +++ code/nel/tools/3d/mesh_utils/scene_context.h | 3 +++ code/nel/tools/3d/object_viewer/animation_set_dlg.cpp | 3 +++ code/nel/tools/3d/object_viewer/attrib_dlg.cpp | 3 +++ code/nel/tools/3d/object_viewer/choose_name.cpp | 3 +++ code/nel/tools/3d/object_viewer/choose_pool_id.cpp | 3 +++ code/nel/tools/3d/object_viewer/create_file_dlg.cpp | 3 +++ code/nel/tools/3d/object_viewer/curve_edit.cpp | 3 +++ code/nel/tools/3d/object_viewer/direction_attr.cpp | 3 +++ code/nel/tools/3d/object_viewer/edit_ex.cpp | 3 +++ code/nel/tools/3d/object_viewer/edit_morph_mesh_dlg.cpp | 3 +++ code/nel/tools/3d/object_viewer/edit_ps_sound.cpp | 3 +++ code/nel/tools/3d/object_viewer/editable_range.h | 3 +++ code/nel/tools/3d/object_viewer/emitter_dlg.cpp | 3 +++ code/nel/tools/3d/object_viewer/lb_extern_id_dlg.cpp | 3 +++ .../tools/3d/object_viewer/located_bindable_dialog.cpp | 3 +++ code/nel/tools/3d/object_viewer/located_properties.cpp | 3 +++ code/nel/tools/3d/object_viewer/located_target_dlg.cpp | 3 +++ code/nel/tools/3d/object_viewer/main_frame.cpp | 3 +++ code/nel/tools/3d/object_viewer/mesh_dlg.cpp | 3 +++ code/nel/tools/3d/object_viewer/multi_tex_dlg.cpp | 3 +++ code/nel/tools/3d/object_viewer/object_viewer.cpp | 3 +++ code/nel/tools/3d/object_viewer/particle_dlg.cpp | 3 +++ code/nel/tools/3d/object_viewer/particle_tree_ctrl.cpp | 3 +++ code/nel/tools/3d/object_viewer/particle_workspace.cpp | 3 +++ code/nel/tools/3d/object_viewer/pick_sound.cpp | 3 +++ code/nel/tools/3d/object_viewer/pick_sound.h | 3 +++ .../tools/3d/object_viewer/precomputed_rotations_dlg.cpp | 3 +++ code/nel/tools/3d/object_viewer/ps_mover_dlg.cpp | 3 +++ code/nel/tools/3d/object_viewer/scheme_bank_dlg.cpp | 3 +++ code/nel/tools/3d/object_viewer/select_string.cpp | 3 +++ code/nel/tools/3d/object_viewer/skeleton_scale_dlg.cpp | 3 +++ code/nel/tools/3d/object_viewer/slot_dlg.cpp | 3 +++ code/nel/tools/3d/object_viewer/snapshot_tool_dlg.cpp | 3 +++ code/nel/tools/3d/object_viewer/sound_anim_dlg.cpp | 3 +++ code/nel/tools/3d/object_viewer/sound_anim_view.cpp | 3 +++ code/nel/tools/3d/object_viewer/sound_system.cpp | 3 +++ .../tools/3d/object_viewer/start_stop_particle_system.cpp | 3 +++ code/nel/tools/3d/object_viewer/std_afx.h | 3 +++ code/nel/tools/3d/object_viewer/texture_chooser.cpp | 3 +++ code/nel/tools/3d/object_viewer/vegetable_copy_dlg.cpp | 3 +++ .../nel/tools/3d/object_viewer/vegetable_density_page.cpp | 3 +++ code/nel/tools/3d/object_viewer/vegetable_dlg.cpp | 3 +++ code/nel/tools/3d/object_viewer/vegetable_edit_tools.cpp | 3 +++ .../tools/3d/object_viewer/vegetable_noise_value_dlg.cpp | 3 +++ code/nel/tools/3d/object_viewer/vegetable_select_dlg.cpp | 3 +++ code/nel/tools/3d/object_viewer/vegetable_wind_dlg.cpp | 3 +++ code/nel/tools/3d/object_viewer/water_pool_editor.cpp | 3 +++ code/nel/tools/3d/object_viewer_exe/std_afx.h | 3 +++ code/nel/tools/3d/panoply_maker/panoply_maker.cpp | 3 +++ code/nel/tools/3d/panoply_preview/main_window.cpp | 2 +- code/nel/tools/3d/panoply_preview/main_window.h | 2 +- code/nel/tools/3d/panoply_preview/panoply_preview.cpp | 2 +- code/nel/tools/3d/panoply_preview/panoply_preview.h | 2 +- code/nel/tools/3d/panoply_preview/tool_config.h | 3 +++ code/nel/tools/3d/panoply_preview/tool_main.cpp | 2 +- code/nel/tools/3d/panoply_preview/tool_main.h | 2 +- code/nel/tools/3d/plugin_max/nel_3dsmax_shared/StdAfx.cpp | 3 +++ .../3d/plugin_max/nel_3dsmax_shared/nel_3dsmax_shared.cpp | 3 +++ .../3d/plugin_max/nel_3dsmax_shared/nel_3dsmax_shared.h | 3 +++ .../tools/3d/plugin_max/nel_3dsmax_shared/string_common.h | 3 +++ code/nel/tools/3d/plugin_max/nel_export/DllEntry.cpp | 3 +++ code/nel/tools/3d/plugin_max/nel_export/nel_export.cpp | 3 +++ code/nel/tools/3d/plugin_max/nel_export/nel_export.h | 3 +++ .../tools/3d/plugin_max/nel_export/nel_export_export.cpp | 3 +++ .../3d/plugin_max/nel_export/nel_export_filetools.cpp | 3 +++ .../plugin_max/nel_export/nel_export_node_properties.cpp | 3 +++ .../tools/3d/plugin_max/nel_export/nel_export_scene.cpp | 3 +++ .../tools/3d/plugin_max/nel_export/nel_export_script.cpp | 3 +++ .../nel/tools/3d/plugin_max/nel_export/nel_export_swt.cpp | 3 +++ .../tools/3d/plugin_max/nel_export/nel_export_view.cpp | 3 +++ code/nel/tools/3d/plugin_max/nel_export/progress.cpp | 3 +++ code/nel/tools/3d/plugin_max/nel_export/std_afx.cpp | 3 +++ code/nel/tools/3d/plugin_max/nel_export/std_afx.h | 3 +++ code/nel/tools/3d/plugin_max/nel_mesh_lib/StdAfx.cpp | 3 +++ code/nel/tools/3d/plugin_max/nel_mesh_lib/StdAfx.h | 3 +++ code/nel/tools/3d/plugin_max/nel_mesh_lib/calc_lm.cpp | 3 +++ code/nel/tools/3d/plugin_max/nel_mesh_lib/calc_lm_rt.cpp | 3 +++ code/nel/tools/3d/plugin_max/nel_mesh_lib/export_anim.cpp | 3 +++ .../tools/3d/plugin_max/nel_mesh_lib/export_collision.cpp | 3 +++ .../nel/tools/3d/plugin_max/nel_mesh_lib/export_flare.cpp | 3 +++ .../nel/tools/3d/plugin_max/nel_mesh_lib/export_light.cpp | 3 +++ .../3d/plugin_max/nel_mesh_lib/export_lod_character.cpp | 3 +++ .../tools/3d/plugin_max/nel_mesh_lib/export_material.cpp | 3 +++ code/nel/tools/3d/plugin_max/nel_mesh_lib/export_mesh.cpp | 3 +++ .../3d/plugin_max/nel_mesh_lib/export_mesh_interface.cpp | 3 +++ code/nel/tools/3d/plugin_max/nel_mesh_lib/export_misc.cpp | 3 +++ code/nel/tools/3d/plugin_max/nel_mesh_lib/export_nel.h | 3 +++ .../3d/plugin_max/nel_mesh_lib/export_particle_system.cpp | 3 +++ .../3d/plugin_max/nel_mesh_lib/export_radial_normal.cpp | 3 +++ .../nel/tools/3d/plugin_max/nel_mesh_lib/export_scene.cpp | 3 +++ .../tools/3d/plugin_max/nel_mesh_lib/export_script.cpp | 3 +++ .../tools/3d/plugin_max/nel_mesh_lib/export_skinning.cpp | 3 +++ .../tools/3d/plugin_max/nel_mesh_lib/export_vegetable.cpp | 3 +++ .../tools/3d/plugin_max/nel_patch_converter/DllEntry.cpp | 3 +++ code/nel/tools/3d/plugin_max/nel_patch_converter/PO2RPO.h | 3 +++ .../nel_patch_converter/nel_patch_converter.cpp | 3 +++ .../tools/3d/plugin_max/nel_patch_converter/script.cpp | 3 +++ .../tools/3d/plugin_max/nel_patch_lib/nel_patch_mesh.cpp | 3 +++ .../tools/3d/plugin_max/nel_patch_lib/nel_patch_mesh.h | 3 +++ code/nel/tools/3d/plugin_max/nel_patch_lib/rpo.cpp | 3 +++ code/nel/tools/3d/plugin_max/nel_patch_lib/rpo.h | 3 +++ code/nel/tools/3d/plugin_max/nel_patch_lib/rpo2nel.cpp | 3 +++ code/nel/tools/3d/plugin_max/nel_patch_lib/stdafx.cpp | 3 +++ code/nel/tools/3d/plugin_max/tile_utility/DllEntry.cpp | 3 +++ code/nel/tools/3d/plugin_max/tile_utility/rgbadd.cpp | 3 +++ .../nel/tools/3d/plugin_max/tile_utility/tile_utility.cpp | 3 +++ code/nel/tools/3d/plugin_max/tile_utility/tile_utility.h | 3 +++ code/nel/tools/3d/shapes_exporter/main.cpp | 3 +++ code/nel/tools/3d/tga_2_dds/tga2dds.cpp | 3 +++ code/nel/tools/3d/tile_edit/Browse.cpp | 3 +++ code/nel/tools/3d/tile_edit/SelectionTerritoire.cpp | 3 +++ code/nel/tools/3d/tile_edit/View.cpp | 3 +++ code/nel/tools/3d/tile_edit/choose_veget_set.cpp | 3 +++ code/nel/tools/3d/tile_edit_qt/browser_model.cpp | 3 +++ code/nel/tools/3d/zone_dependencies/zone_dependencies.cpp | 3 +++ code/nel/tools/3d/zone_elevation/zone_elevation.cpp | 3 +++ code/nel/tools/3d/zone_ig_lighter/zone_ig_lighter.cpp | 3 +++ code/nel/tools/3d/zone_lighter/zone_lighter.cpp | 3 +++ code/nel/tools/3d/zviewer/zviewer.cpp | 3 +++ code/nel/tools/georges/georges2csv/georges2csv.cpp | 3 +++ code/nel/tools/misc/branch_patcher/StdAfx.h | 3 +++ code/nel/tools/misc/branch_patcher/branch_patcherDlg.cpp | 3 +++ code/nel/tools/misc/crash_report/crash_report.cpp | 6 ++++-- code/nel/tools/misc/crash_report/crash_report_data.h | 3 +-- code/nel/tools/misc/crash_report/crash_report_socket.cpp | 6 ++++-- code/nel/tools/misc/crash_report/crash_report_socket.h | 3 +-- code/nel/tools/misc/crash_report/crash_report_widget.cpp | 6 ++++-- code/nel/tools/misc/crash_report/crash_report_widget.h | 3 +-- code/nel/tools/misc/data_mirror/data_mirror.cpp | 3 +++ code/nel/tools/misc/data_mirror/data_mirrorDlg.cpp | 3 +++ code/nel/tools/misc/log_analyser/PlugInSelector.cpp | 3 +++ code/nel/tools/misc/log_analyser/StdAfx.h | 3 +++ code/nel/tools/misc/log_analyser/ViewDialog.cpp | 3 +++ code/nel/tools/misc/log_analyser/log_analyserDlg.cpp | 3 +++ code/nel/tools/misc/make_sheet_id/make_sheet_id.cpp | 3 +++ code/nel/tools/misc/message_box/message_box.cpp | 3 +++ .../tools/misc/multi_cd_setup_fix/multi_cd_setup_fix.cpp | 3 +++ code/nel/tools/misc/probe_timers/main.cpp | 2 +- code/nel/tools/misc/snp_make/main.cpp | 3 +++ code/nel/tools/misc/words_dic/StdAfx.h | 3 +++ code/nel/tools/misc/words_dic/words_dicDlg.cpp | 3 +++ code/nel/tools/misc/xml_packer/xml_packer.cpp | 3 +++ code/nel/tools/nel_unit_test/ut_misc_string_common.h | 3 +++ code/nel/tools/pacs/build_rbank/build_rbank.cpp | 3 +++ code/nel/tools/pacs/build_rbank/build_surf.cpp | 3 +++ code/nel/tools/pacs/build_rbank/build_surf.h | 3 +++ code/nel/tools/pacs/build_rbank/main.cpp | 3 +++ code/nel/tools/pacs/build_rbank/prim_checker.cpp | 3 +++ .../nel/tools/sound/build_samplebank/build_samplebank.cpp | 2 +- code/nel/tools/sound/build_sound/build_sound.cpp | 2 +- code/nel/tools/sound/build_soundbank/build_soundbank.cpp | 2 +- code/nelns/admin_executor_service/log_report.cpp | 3 +++ code/nelns/admin_service/admin_service.cpp | 3 +++ code/nelns/login_service/connection_client.cpp | 3 +++ code/nelns/login_service/connection_web.cpp | 3 +++ code/nelns/login_service/login_service.h | 3 +++ code/nelns/login_service/mysql_helper.cpp | 3 +++ code/nelns/login_service/mysql_helper.h | 3 +++ code/ryzom/client/src/actions.cpp | 3 +++ code/ryzom/client/src/actions.h | 4 ++++ code/ryzom/client/src/app_bundle_utils.cpp | 3 +++ code/ryzom/client/src/app_bundle_utils.h | 3 +++ code/ryzom/client/src/attached_fx.cpp | 3 +++ code/ryzom/client/src/bg_downloader_access.cpp | 3 +++ code/ryzom/client/src/browse_faq.cpp | 3 +++ code/ryzom/client/src/camera.cpp | 3 +++ code/ryzom/client/src/camera.h | 3 +++ code/ryzom/client/src/camera_recorder.cpp | 3 +++ code/ryzom/client/src/cdb_synchronised.cpp | 4 ++++ code/ryzom/client/src/cdb_synchronised.h | 4 ++++ code/ryzom/client/src/character_cl.cpp | 7 ++++++- code/ryzom/client/src/character_cl.h | 3 +++ code/ryzom/client/src/client.cpp | 6 +++++- code/ryzom/client/src/client_cfg.cpp | 8 +++++++- code/ryzom/client/src/client_cfg.h | 5 +++++ code/ryzom/client/src/client_chat_manager.cpp | 6 +++++- code/ryzom/client/src/client_chat_manager.h | 3 +++ code/ryzom/client/src/client_sheets/continent_sheet.h | 3 +++ code/ryzom/client/src/client_sheets/item_sheet.cpp | 2 +- code/ryzom/client/src/client_sheets/item_sheet.h | 2 +- code/ryzom/client/src/client_sheets/stdpch.h | 3 +++ code/ryzom/client/src/commands.cpp | 7 ++++++- code/ryzom/client/src/commands.h | 3 +++ code/ryzom/client/src/connection.cpp | 7 ++++++- code/ryzom/client/src/connection.h | 2 +- code/ryzom/client/src/contextual_cursor.cpp | 3 +++ code/ryzom/client/src/continent.cpp | 2 +- code/ryzom/client/src/continent_manager.cpp | 4 ++++ code/ryzom/client/src/cursor_functions.cpp | 7 ++++++- code/ryzom/client/src/debug_client.cpp | 4 ++++ code/ryzom/client/src/decal.cpp | 4 ++++ code/ryzom/client/src/decal_anim.cpp | 3 +++ code/ryzom/client/src/decal_anim.h | 3 +++ code/ryzom/client/src/entities.cpp | 6 +++++- code/ryzom/client/src/entities.h | 5 ++++- code/ryzom/client/src/entity_cl.cpp | 7 ++++++- code/ryzom/client/src/entity_cl.h | 5 +++++ code/ryzom/client/src/events_listener.cpp | 3 +++ code/ryzom/client/src/far_tp.cpp | 6 +++++- code/ryzom/client/src/fog_map.cpp | 3 +++ code/ryzom/client/src/forage_source_cl.cpp | 3 +++ code/ryzom/client/src/game_context_menu.cpp | 5 ++++- code/ryzom/client/src/game_context_menu.h | 5 ++++- code/ryzom/client/src/global.cpp | 6 +++++- code/ryzom/client/src/global.h | 5 ++++- code/ryzom/client/src/graph.cpp | 3 +++ code/ryzom/client/src/ground_fx_manager.cpp | 4 ++++ code/ryzom/client/src/ig_client.cpp | 3 +++ code/ryzom/client/src/ingame_database_manager.h | 3 +++ code/ryzom/client/src/init.cpp | 7 ++++++- code/ryzom/client/src/init.h | 3 +++ code/ryzom/client/src/init_main_loop.cpp | 6 +++++- code/ryzom/client/src/input.cpp | 5 +++++ .../ryzom/client/src/interface_v3/action_handler_base.cpp | 3 +++ code/ryzom/client/src/interface_v3/action_handler_base.h | 3 +++ .../client/src/interface_v3/action_handler_debug.cpp | 4 ++++ .../ryzom/client/src/interface_v3/action_handler_edit.cpp | 3 +++ .../ryzom/client/src/interface_v3/action_handler_game.cpp | 6 +++++- .../ryzom/client/src/interface_v3/action_handler_help.cpp | 4 ++++ code/ryzom/client/src/interface_v3/action_handler_help.h | 4 ++++ .../ryzom/client/src/interface_v3/action_handler_item.cpp | 6 +++++- .../ryzom/client/src/interface_v3/action_handler_misc.cpp | 4 ++++ code/ryzom/client/src/interface_v3/action_handler_misc.h | 3 +++ .../ryzom/client/src/interface_v3/action_handler_move.cpp | 5 ++++- .../client/src/interface_v3/action_handler_outpost.cpp | 3 +++ .../client/src/interface_v3/action_handler_phrase.cpp | 3 +++ .../client/src/interface_v3/action_handler_tools.cpp | 3 +++ code/ryzom/client/src/interface_v3/action_handler_ui.cpp | 4 ++++ .../ryzom/client/src/interface_v3/action_phrase_faber.cpp | 4 ++++ code/ryzom/client/src/interface_v3/action_phrase_faber.h | 4 ++++ .../client/src/interface_v3/animal_position_state.cpp | 3 +++ .../ryzom/client/src/interface_v3/animal_position_state.h | 3 +++ code/ryzom/client/src/interface_v3/bar_manager.cpp | 3 +++ code/ryzom/client/src/interface_v3/bar_manager.h | 3 +++ code/ryzom/client/src/interface_v3/bot_chat_manager.cpp | 3 +++ code/ryzom/client/src/interface_v3/bot_chat_manager.h | 3 +++ code/ryzom/client/src/interface_v3/bot_chat_page.cpp | 3 +++ .../src/interface_v3/bot_chat_page_create_guild.cpp | 3 +++ .../src/interface_v3/bot_chat_page_dynamic_mission.cpp | 3 +++ .../src/interface_v3/bot_chat_page_dynamic_mission.h | 3 +++ .../client/src/interface_v3/bot_chat_page_mission.cpp | 3 +++ .../client/src/interface_v3/bot_chat_page_mission_end.cpp | 3 +++ code/ryzom/client/src/interface_v3/bot_chat_page_news.cpp | 3 +++ .../client/src/interface_v3/bot_chat_page_player_gift.cpp | 3 +++ .../ryzom/client/src/interface_v3/bot_chat_page_trade.cpp | 4 ++++ code/ryzom/client/src/interface_v3/bot_chat_page_trade.h | 3 +++ code/ryzom/client/src/interface_v3/character_3d.cpp | 5 ++++- code/ryzom/client/src/interface_v3/character_3d.h | 3 +++ code/ryzom/client/src/interface_v3/chat_displayer.h | 3 +++ code/ryzom/client/src/interface_v3/chat_filter.cpp | 4 ++++ code/ryzom/client/src/interface_v3/chat_text_manager.cpp | 4 ++++ code/ryzom/client/src/interface_v3/chat_text_manager.h | 3 +++ code/ryzom/client/src/interface_v3/chat_window.cpp | 4 ++++ code/ryzom/client/src/interface_v3/chat_window.h | 3 +++ code/ryzom/client/src/interface_v3/dbctrl_sheet.cpp | 7 ++++++- code/ryzom/client/src/interface_v3/dbctrl_sheet.h | 7 ++++++- .../client/src/interface_v3/dbgroup_build_phrase.cpp | 3 +++ code/ryzom/client/src/interface_v3/dbgroup_build_phrase.h | 3 +++ code/ryzom/client/src/interface_v3/dbgroup_list_sheet.cpp | 4 ++++ code/ryzom/client/src/interface_v3/dbgroup_list_sheet.h | 3 +++ .../src/interface_v3/dbgroup_list_sheet_bonus_malus.cpp | 3 +++ .../src/interface_v3/dbgroup_list_sheet_bonus_malus.h | 3 +++ .../src/interface_v3/dbgroup_list_sheet_icon_phrase.cpp | 3 +++ .../src/interface_v3/dbgroup_list_sheet_icon_phrase.h | 3 +++ .../src/interface_v3/dbgroup_list_sheet_mission.cpp | 3 +++ .../client/src/interface_v3/dbgroup_list_sheet_text.cpp | 4 ++++ .../client/src/interface_v3/dbgroup_list_sheet_text.h | 3 +++ .../dbgroup_list_sheet_text_brick_composition.cpp | 4 ++++ .../src/interface_v3/dbgroup_list_sheet_text_phrase.cpp | 3 +++ .../src/interface_v3/dbgroup_list_sheet_text_phrase.h | 3 +++ .../src/interface_v3/dbgroup_list_sheet_text_share.cpp | 4 ++++ .../src/interface_v3/dbgroup_list_sheet_text_share.h | 3 +++ .../client/src/interface_v3/dbgroup_list_sheet_trade.cpp | 4 ++++ .../client/src/interface_v3/dbgroup_list_sheet_trade.h | 3 +++ .../client/src/interface_v3/encyclopedia_manager.cpp | 3 +++ .../ryzom/client/src/interface_v3/flying_text_manager.cpp | 3 +++ code/ryzom/client/src/interface_v3/group_career.cpp | 3 +++ code/ryzom/client/src/interface_v3/group_career.h | 3 +++ code/ryzom/client/src/interface_v3/group_compas.cpp | 4 ++++ code/ryzom/client/src/interface_v3/group_compas.h | 3 +++ code/ryzom/client/src/interface_v3/group_html_cs.cpp | 4 ++++ code/ryzom/client/src/interface_v3/group_html_cs.h | 4 ++++ code/ryzom/client/src/interface_v3/group_html_forum.cpp | 4 ++++ code/ryzom/client/src/interface_v3/group_html_forum.h | 4 ++++ code/ryzom/client/src/interface_v3/group_html_mail.cpp | 4 ++++ code/ryzom/client/src/interface_v3/group_html_mail.h | 4 ++++ code/ryzom/client/src/interface_v3/group_html_qcm.cpp | 3 +++ code/ryzom/client/src/interface_v3/group_html_qcm.h | 3 +++ code/ryzom/client/src/interface_v3/group_html_webig.cpp | 5 +++++ code/ryzom/client/src/interface_v3/group_html_webig.h | 4 ++++ code/ryzom/client/src/interface_v3/group_in_scene.cpp | 3 +++ code/ryzom/client/src/interface_v3/group_in_scene.h | 3 +++ .../client/src/interface_v3/group_in_scene_bubble.cpp | 4 ++++ .../ryzom/client/src/interface_v3/group_in_scene_bubble.h | 3 +++ .../client/src/interface_v3/group_in_scene_user_info.cpp | 5 +++++ .../client/src/interface_v3/group_in_scene_user_info.h | 4 ++++ code/ryzom/client/src/interface_v3/group_map.cpp | 6 +++++- code/ryzom/client/src/interface_v3/group_map.h | 5 ++++- .../ryzom/client/src/interface_v3/group_modal_get_key.cpp | 3 +++ code/ryzom/client/src/interface_v3/group_modal_get_key.h | 3 +++ .../client/src/interface_v3/group_phrase_skill_filter.cpp | 3 +++ .../client/src/interface_v3/group_phrase_skill_filter.h | 3 +++ code/ryzom/client/src/interface_v3/group_quick_help.cpp | 3 +++ code/ryzom/client/src/interface_v3/group_quick_help.h | 3 +++ code/ryzom/client/src/interface_v3/group_skills.cpp | 3 +++ code/ryzom/client/src/interface_v3/group_skills.h | 3 +++ code/ryzom/client/src/interface_v3/guild_manager.cpp | 6 +++++- code/ryzom/client/src/interface_v3/guild_manager.h | 3 +++ .../client/src/interface_v3/input_handler_manager.cpp | 4 ++++ .../ryzom/client/src/interface_v3/input_handler_manager.h | 3 +++ code/ryzom/client/src/interface_v3/interface_3d_scene.cpp | 6 +++++- code/ryzom/client/src/interface_v3/interface_3d_scene.h | 5 ++++- code/ryzom/client/src/interface_v3/interface_config.cpp | 3 +++ code/ryzom/client/src/interface_v3/interface_config.h | 3 +++ code/ryzom/client/src/interface_v3/interface_ddx.cpp | 3 +++ code/ryzom/client/src/interface_v3/interface_ddx.h | 3 +++ .../src/interface_v3/interface_expr_user_fct_game.cpp | 5 ++++- .../src/interface_v3/interface_expr_user_fct_items.cpp | 3 +++ code/ryzom/client/src/interface_v3/interface_manager.cpp | 8 +++++++- code/ryzom/client/src/interface_v3/interface_manager.h | 6 +++++- code/ryzom/client/src/interface_v3/interface_observer.h | 3 +++ .../client/src/interface_v3/interface_options_ryzom.cpp | 3 +++ .../client/src/interface_v3/interface_options_ryzom.h | 3 +++ code/ryzom/client/src/interface_v3/interface_pointer.h | 3 +++ code/ryzom/client/src/interface_v3/inventory_manager.cpp | 6 +++++- code/ryzom/client/src/interface_v3/inventory_manager.h | 5 ++++- code/ryzom/client/src/interface_v3/list_sheet_base.h | 3 +++ code/ryzom/client/src/interface_v3/lua_ihm_ryzom.cpp | 6 +++++- code/ryzom/client/src/interface_v3/macrocmd_key.cpp | 3 +++ code/ryzom/client/src/interface_v3/macrocmd_key.h | 3 +++ code/ryzom/client/src/interface_v3/macrocmd_manager.cpp | 3 +++ code/ryzom/client/src/interface_v3/music_player.cpp | 3 +++ code/ryzom/client/src/interface_v3/music_player.h | 3 +++ code/ryzom/client/src/interface_v3/obs_huge_list.cpp | 3 +++ code/ryzom/client/src/interface_v3/obs_huge_list.h | 3 +++ code/ryzom/client/src/interface_v3/parser_modules.cpp | 4 ++++ code/ryzom/client/src/interface_v3/parser_modules.h | 3 +++ .../ryzom/client/src/interface_v3/people_interraction.cpp | 4 ++++ code/ryzom/client/src/interface_v3/people_list.cpp | 5 ++++- code/ryzom/client/src/interface_v3/people_list.h | 3 +++ code/ryzom/client/src/interface_v3/player_trade.cpp | 3 +++ .../src/interface_v3/register_interface_elements.cpp | 3 +++ code/ryzom/client/src/interface_v3/sbrick_manager.cpp | 4 ++++ code/ryzom/client/src/interface_v3/sbrick_manager.h | 4 ++++ code/ryzom/client/src/interface_v3/skill_manager.cpp | 3 +++ code/ryzom/client/src/interface_v3/skill_manager.h | 3 +++ code/ryzom/client/src/interface_v3/sphrase_manager.cpp | 4 ++++ code/ryzom/client/src/interface_v3/sphrase_manager.h | 4 ++++ code/ryzom/client/src/interface_v3/task_bar_manager.cpp | 3 +++ code/ryzom/client/src/interface_v3/task_bar_manager.h | 3 +++ .../client/src/interface_v3/view_bitmap_faber_mp.cpp | 3 +++ code/ryzom/client/src/interface_v3/view_bitmap_faber_mp.h | 3 +++ code/ryzom/client/src/interface_v3/view_pointer_ryzom.cpp | 3 +++ code/ryzom/client/src/interface_v3/view_radar.cpp | 3 +++ code/ryzom/client/src/interface_v3/view_radar.h | 3 +++ code/ryzom/client/src/landscape_poly_drawer.h | 3 +++ code/ryzom/client/src/light_cycle_manager.cpp | 4 ++++ code/ryzom/client/src/login.cpp | 6 +++++- code/ryzom/client/src/login.h | 3 +++ code/ryzom/client/src/login_patch.cpp | 4 ++++ code/ryzom/client/src/login_progress_post_thread.cpp | 3 +++ code/ryzom/client/src/login_xdelta.cpp | 3 +++ code/ryzom/client/src/main_loop.cpp | 4 ++++ code/ryzom/client/src/main_loop.h | 3 +++ code/ryzom/client/src/main_loop_debug.cpp | 5 ++++- code/ryzom/client/src/main_loop_debug.h | 3 +++ code/ryzom/client/src/main_loop_temp.cpp | 3 +++ code/ryzom/client/src/main_loop_temp.h | 3 +++ code/ryzom/client/src/main_loop_utilities.cpp | 3 +++ code/ryzom/client/src/main_loop_utilities.h | 3 +++ code/ryzom/client/src/misc.cpp | 3 +++ code/ryzom/client/src/misc.h | 3 +++ code/ryzom/client/src/motion/modes/ai_mode.cpp | 3 +++ code/ryzom/client/src/motion/user_controls.cpp | 5 +++++ code/ryzom/client/src/motion/user_controls.h | 3 +++ code/ryzom/client/src/net_manager.cpp | 6 +++++- code/ryzom/client/src/net_manager.h | 4 ++++ code/ryzom/client/src/network_connection.cpp | 4 ++++ code/ryzom/client/src/network_connection.h | 4 ++++ code/ryzom/client/src/npc_icon.cpp | 3 +++ code/ryzom/client/src/npc_icon.h | 3 +++ code/ryzom/client/src/outpost_manager.cpp | 5 ++++- code/ryzom/client/src/outpost_manager.h | 2 +- code/ryzom/client/src/permanent_ban.cpp | 3 +++ code/ryzom/client/src/ping.cpp | 3 +++ code/ryzom/client/src/ping.h | 3 +++ code/ryzom/client/src/player_cl.cpp | 5 ++++- code/ryzom/client/src/player_r2_cl.cpp | 3 +++ code/ryzom/client/src/profiling.cpp | 3 +++ code/ryzom/client/src/profiling.h | 3 +++ code/ryzom/client/src/progress.cpp | 4 ++++ code/ryzom/client/src/property_decoder.cpp | 3 +++ code/ryzom/client/src/r2/config_var.h | 3 +++ code/ryzom/client/src/r2/displayer_base.cpp | 3 +++ code/ryzom/client/src/r2/displayer_base.h | 3 +++ code/ryzom/client/src/r2/displayer_lua.cpp | 3 +++ code/ryzom/client/src/r2/displayer_lua.h | 3 +++ code/ryzom/client/src/r2/displayer_visual.cpp | 3 +++ .../client/src/r2/displayer_visual_activity_sequence.cpp | 3 +++ code/ryzom/client/src/r2/displayer_visual_entity.cpp | 4 ++++ code/ryzom/client/src/r2/displayer_visual_entity.h | 3 +++ code/ryzom/client/src/r2/displayer_visual_group.cpp | 3 +++ code/ryzom/client/src/r2/displayer_visual_shape.h | 3 +++ code/ryzom/client/src/r2/dmc/action_historic.cpp | 3 +++ code/ryzom/client/src/r2/dmc/client_edition_module.cpp | 4 ++++ code/ryzom/client/src/r2/dmc/com_lua_module.cpp | 4 ++++ code/ryzom/client/src/r2/dmc/com_lua_module.h | 3 +++ code/ryzom/client/src/r2/dmc/dmc.h | 3 +++ code/ryzom/client/src/r2/editor.cpp | 4 ++++ code/ryzom/client/src/r2/editor.h | 3 +++ code/ryzom/client/src/r2/entity_custom_select_box.cpp | 3 +++ code/ryzom/client/src/r2/entity_custom_select_box.h | 3 +++ code/ryzom/client/src/r2/instance.cpp | 3 +++ code/ryzom/client/src/r2/instance.h | 3 +++ code/ryzom/client/src/r2/instance_map_deco.cpp | 3 +++ code/ryzom/client/src/r2/instance_map_deco.h | 3 +++ code/ryzom/client/src/r2/island_collision.cpp | 3 +++ code/ryzom/client/src/r2/island_collision.h | 3 +++ code/ryzom/client/src/r2/lua_event_forwarder.cpp | 3 +++ code/ryzom/client/src/r2/lua_event_forwarder.h | 3 +++ code/ryzom/client/src/r2/npc_editor.cpp | 3 +++ code/ryzom/client/src/r2/npc_editor.h | 3 +++ code/ryzom/client/src/r2/object_factory_client.cpp | 3 +++ code/ryzom/client/src/r2/object_factory_client.h | 3 +++ code/ryzom/client/src/r2/palette_node.h | 3 +++ code/ryzom/client/src/r2/prim_render.cpp | 3 +++ code/ryzom/client/src/r2/prim_render.h | 3 +++ code/ryzom/client/src/r2/tool.cpp | 4 ++++ code/ryzom/client/src/r2/tool.h | 4 ++++ code/ryzom/client/src/r2/tool_choose_pos.cpp | 3 +++ code/ryzom/client/src/r2/tool_choose_pos.h | 3 +++ code/ryzom/client/src/r2/tool_choose_pos_lua.h | 3 +++ code/ryzom/client/src/r2/tool_create_entity.cpp | 3 +++ code/ryzom/client/src/r2/tool_create_entity.h | 3 +++ code/ryzom/client/src/r2/tool_draw_prim.cpp | 3 +++ code/ryzom/client/src/r2/tool_draw_prim.h | 3 +++ code/ryzom/client/src/r2/tool_maintained_action.cpp | 3 +++ code/ryzom/client/src/r2/tool_pick.cpp | 3 +++ code/ryzom/client/src/release.cpp | 4 ++++ code/ryzom/client/src/session_browser_impl.cpp | 4 ++++ code/ryzom/client/src/session_browser_impl.h | 3 +++ code/ryzom/client/src/sheet_manager.cpp | 2 +- code/ryzom/client/src/sky.cpp | 3 +++ code/ryzom/client/src/sound_manager.cpp | 4 ++++ code/ryzom/client/src/sound_manager.h | 3 +++ code/ryzom/client/src/stdpch.h | 4 ++++ code/ryzom/client/src/streamable_ig.cpp | 3 +++ code/ryzom/client/src/string_manager_client.cpp | 2 +- code/ryzom/client/src/string_manager_client.h | 2 +- code/ryzom/client/src/time_client.cpp | 3 +++ code/ryzom/client/src/time_client.h | 3 +++ code/ryzom/client/src/timed_fx_manager.cpp | 3 +++ code/ryzom/client/src/user_entity.cpp | 6 +++++- code/ryzom/client/src/user_entity.h | 5 ++++- code/ryzom/client/src/view.cpp | 3 +++ code/ryzom/client/src/view.h | 3 +++ code/ryzom/client/src/village.h | 3 +++ code/ryzom/client/src/weather.cpp | 4 ++++ code/ryzom/client/src/weather.h | 3 +++ code/ryzom/client/src/weather_manager_client.cpp | 3 +++ code/ryzom/client/src/weather_manager_client.h | 3 +++ .../game_share/_backup_service_interface_non_module.cpp | 3 +++ code/ryzom/common/src/game_share/animal_status.h | 2 +- code/ryzom/common/src/game_share/animal_type.h | 2 +- code/ryzom/common/src/game_share/animals_orders.cpp | 2 +- code/ryzom/common/src/game_share/animals_orders.h | 2 +- code/ryzom/common/src/game_share/base_types.h | 3 +++ code/ryzom/common/src/game_share/bnp_patch.cpp | 3 +++ code/ryzom/common/src/game_share/bnp_patch.h | 3 +++ code/ryzom/common/src/game_share/crypt.cpp | 3 +++ code/ryzom/common/src/game_share/crypt.h | 3 +++ .../common/src/game_share/deployment_configuration.cpp | 4 ++++ .../common/src/game_share/deployment_configuration.h | 3 +++ code/ryzom/common/src/game_share/dyn_chat.cpp | 3 +++ code/ryzom/common/src/game_share/entity_types.h | 3 +++ code/ryzom/common/src/game_share/fame.cpp | 3 +++ code/ryzom/common/src/game_share/generic_xml_msg_mngr.cpp | 3 +++ code/ryzom/common/src/game_share/inventories.cpp | 2 +- code/ryzom/common/src/game_share/inventories.h | 2 +- code/ryzom/common/src/game_share/item_type.cpp | 2 +- code/ryzom/common/src/game_share/item_type.h | 2 +- code/ryzom/common/src/game_share/login_registry.cpp | 3 +++ code/ryzom/common/src/game_share/mirror.cpp | 4 ++++ code/ryzom/common/src/game_share/mirror_prop_value.h | 3 +++ code/ryzom/common/src/game_share/mirrored_data_set.cpp | 3 +++ code/ryzom/common/src/game_share/mode_and_behaviour.h | 3 +++ code/ryzom/common/src/game_share/object.cpp | 3 +++ code/ryzom/common/src/game_share/people.h | 2 +- code/ryzom/common/src/game_share/persistent_data_tree.cpp | 3 +++ code/ryzom/common/src/game_share/pvp_clan.cpp | 2 +- code/ryzom/common/src/game_share/pvp_clan.h | 2 +- code/ryzom/common/src/game_share/ring_access.cpp | 3 +++ code/ryzom/common/src/game_share/ryzom_entity_id.h | 3 +++ .../ryzom/common/src/game_share/ryzom_mirror_properties.h | 3 +++ .../ryzom/common/src/game_share/scenario_entry_points.cpp | 3 +++ code/ryzom/common/src/game_share/security_check.cpp | 3 +++ code/ryzom/common/src/game_share/security_check.h | 3 +++ code/ryzom/common/src/game_share/send_chat.cpp | 3 +++ code/ryzom/common/src/game_share/send_chat.h | 3 +++ code/ryzom/common/src/game_share/simlag.cpp | 3 +++ code/ryzom/common/src/game_share/stdpch.h | 3 +++ .../game_share/time_weather_season/time_and_season.cpp | 3 +++ .../src/game_share/time_weather_season/time_and_season.h | 3 +++ .../time_weather_season/time_date_season_manager.cpp | 3 +++ .../time_weather_season/time_date_season_manager.h | 3 +++ .../game_share/time_weather_season/weather_predict.cpp | 3 +++ code/ryzom/common/src/game_share/txt_command.h | 3 +++ code/ryzom/common/src/game_share/utils.h | 3 +++ code/ryzom/tools/assoc_mem/tree.cpp | 3 +++ code/ryzom/tools/client/client_config/display_dlg.cpp | 3 +++ .../src/display_settings_details_widget.cpp | 3 +++ .../client/client_config_qt/src/sound_settings_widget.cpp | 3 +++ code/ryzom/tools/client/r2_islands_textures/main.cpp | 3 +++ .../client/r2_islands_textures/screenshot_islands.cpp | 3 +++ .../tools/client/r2_islands_textures/screenshot_islands.h | 3 +++ .../tools/client/ryzom_installer/src/operationdialog.cpp | 2 +- code/ryzom/tools/client/ryzom_installer/src/profile.cpp | 2 +- code/ryzom/tools/client/ryzom_installer/src/profile.h | 2 +- .../tools/client/ryzom_installer/src/profilesdialog.cpp | 2 +- .../tools/client/ryzom_installer/src/profilesdialog.h | 2 +- .../csv_transform/sadge_lib/include/text_output.h | 3 +++ code/ryzom/tools/leveldesign/export/export.cpp | 4 ++++ code/ryzom/tools/leveldesign/georges_dll/action.cpp | 3 +++ code/ryzom/tools/leveldesign/georges_dll/action.h | 3 +++ code/ryzom/tools/leveldesign/georges_dll/base_dialog.cpp | 3 +++ code/ryzom/tools/leveldesign/georges_dll/base_dialog.h | 3 +++ code/ryzom/tools/leveldesign/georges_dll/child_frm.cpp | 3 +++ code/ryzom/tools/leveldesign/georges_dll/dfn_dialog.cpp | 3 +++ code/ryzom/tools/leveldesign/georges_dll/dfn_dialog.h | 3 +++ .../tools/leveldesign/georges_dll/edit_list_ctrl.cpp | 3 +++ .../tools/leveldesign/georges_dll/file_browser_dialog.cpp | 3 +++ .../tools/leveldesign/georges_dll/file_tree_view.cpp | 3 +++ code/ryzom/tools/leveldesign/georges_dll/file_tree_view.h | 3 +++ code/ryzom/tools/leveldesign/georges_dll/form_dialog.cpp | 3 +++ code/ryzom/tools/leveldesign/georges_dll/form_dialog.h | 3 +++ code/ryzom/tools/leveldesign/georges_dll/georges_edit.cpp | 3 +++ code/ryzom/tools/leveldesign/georges_dll/georges_edit.h | 3 +++ .../tools/leveldesign/georges_dll/georges_edit_doc.cpp | 3 +++ .../tools/leveldesign/georges_dll/georges_edit_view.cpp | 3 +++ .../leveldesign/georges_dll/georges_implementation.cpp | 3 +++ .../ryzom/tools/leveldesign/georges_dll/header_dialog.cpp | 3 +++ code/ryzom/tools/leveldesign/georges_dll/icon_wnd.cpp | 3 +++ code/ryzom/tools/leveldesign/georges_dll/imagelist_ex.cpp | 3 +++ code/ryzom/tools/leveldesign/georges_dll/left_view.cpp | 3 +++ code/ryzom/tools/leveldesign/georges_dll/main_frm.cpp | 3 +++ .../tools/leveldesign/georges_dll/memory_combo_box.cpp | 3 +++ .../tools/leveldesign/georges_dll/memory_combo_box.h | 3 +++ .../tools/leveldesign/georges_dll/output_console_dlg.cpp | 3 +++ .../tools/leveldesign/georges_dll/output_console_dlg.h | 3 +++ .../ryzom/tools/leveldesign/georges_dll/reg_shell_ext.cpp | 3 +++ .../tools/leveldesign/georges_dll/settings_dialog.cpp | 3 +++ code/ryzom/tools/leveldesign/georges_dll/stdafx.h | 3 +++ code/ryzom/tools/leveldesign/georges_dll/type_dialog.cpp | 3 +++ code/ryzom/tools/leveldesign/georges_exe/georges_exe.cpp | 3 +++ .../tools/leveldesign/georges_plugin_sound/PageBase.h | 3 +++ .../leveldesign/georges_plugin_sound/PageBgFades.cpp | 3 +++ .../leveldesign/georges_plugin_sound/PageBgFlags.cpp | 3 +++ .../tools/leveldesign/georges_plugin_sound/PageComplex.h | 3 +++ .../leveldesign/georges_plugin_sound/PageComtext.cpp | 3 +++ .../georges_plugin_sound/georges_plugin_sound.cpp | 3 +++ .../leveldesign/georges_plugin_sound/listener_view.cpp | 3 +++ .../leveldesign/georges_plugin_sound/loading_dialog.h | 3 +++ .../leveldesign/georges_plugin_sound/sound_dialog.cpp | 3 +++ .../tools/leveldesign/georges_plugin_sound/sound_dialog.h | 3 +++ .../leveldesign/georges_plugin_sound/sound_plugin.cpp | 3 +++ .../tools/leveldesign/georges_plugin_sound/sound_plugin.h | 3 +++ .../leveldesign/georges_plugin_sound/std_sound_plugin.h | 3 +++ code/ryzom/tools/leveldesign/icon_search/icon_search.cpp | 3 +++ code/ryzom/tools/leveldesign/mission_compiler_fe/StdAfx.h | 3 +++ .../mission_compiler_fe/mission_compiler_fe.cpp | 3 +++ .../mission_compiler_fe/mission_compiler_feDlg.cpp | 3 +++ .../leveldesign/mission_compiler_lib/mission_compiler.cpp | 4 ++++ .../leveldesign/mission_compiler_lib/mission_compiler.h | 3 +++ code/ryzom/tools/leveldesign/mission_compiler_lib/step.h | 3 +++ .../leveldesign/mission_compiler_lib/step_content.cpp | 3 +++ .../tools/leveldesign/mission_compiler_lib/steps.cpp | 3 +++ .../tools/leveldesign/mission_compiler_lib/variables.cpp | 3 +++ code/ryzom/tools/leveldesign/mp_generator/main.cpp | 3 +++ code/ryzom/tools/leveldesign/prim_export/main.cpp | 4 ++++ .../tools/leveldesign/world_editor/land_export/main.cpp | 3 +++ .../leveldesign/world_editor/land_export_lib/export.cpp | 4 ++++ .../leveldesign/world_editor/land_export_lib/export.h | 3 +++ .../world_editor/world_editor/builder_zone.cpp | 3 +++ .../world_editor/world_editor/dialog_properties.cpp | 3 +++ .../leveldesign/world_editor/world_editor/display.cpp | 3 +++ .../leveldesign/world_editor/world_editor/export_dlg.cpp | 3 +++ .../world_editor/world_editor/external_editor.cpp | 3 +++ .../world_editor/world_editor/file_dialog_ex.cpp | 3 +++ .../world_editor/world_editor/find_primitive_dlg.cpp | 3 +++ .../world_editor/world_editor/generate_dlg.cpp | 3 +++ .../world_editor/world_editor/imagelist_ex.cpp | 3 +++ .../leveldesign/world_editor/world_editor/main_frm.cpp | 3 +++ .../leveldesign/world_editor/world_editor/my_list_box.cpp | 3 +++ .../leveldesign/world_editor/world_editor/name_dlg.cpp | 3 +++ .../world_editor/primitive_configuration_dlg.cpp | 3 +++ .../world_editor/world_editor/project_settings.cpp | 3 +++ .../tools/leveldesign/world_editor/world_editor/stdafx.h | 4 ++++ .../leveldesign/world_editor/world_editor/tools_logic.cpp | 3 +++ .../leveldesign/world_editor/world_editor/tools_zone.cpp | 3 +++ .../world_editor/world_editor/type_manager_dlg.cpp | 3 +++ .../world_editor/world_editor/type_sel_dlg.cpp | 3 +++ .../world_editor/world_editor/world_editor.cpp | 3 +++ .../world_editor/world_editor/world_editor_doc.cpp | 3 +++ .../world_editor/world_editor/world_editor_doc.h | 3 +++ .../world_editor/world_editor_fauna_graph_plugin/StdAfx.h | 3 +++ .../world_editor/world_editor_graph_plugin/StdAfx.h | 3 +++ .../world_editor_graph_plugin/graph_plugin.cpp | 3 +++ .../world_editor_primitive_plugin/primitive_plugin.h | 3 +++ .../world_editor_shard_monitor_plugin/DialogFlags.cpp | 3 +++ .../world_editor_shard_monitor_plugin/StdAfx.h | 3 +++ .../memory_combo_box.cpp | 3 +++ .../world_editor_shard_monitor_plugin/plugin.cpp | 3 +++ .../world_editor_sound_plugin/DialogFlags.cpp | 3 +++ .../world_editor/world_editor_sound_plugin/StdAfx.h | 3 +++ code/ryzom/tools/patch_gen/patch_gen_common.cpp | 5 +++++ code/ryzom/tools/pd_parser/parser.cpp | 3 +++ .../tools/server/ai_build_wmap/build_proximity_maps.cpp | 4 ++++ code/ryzom/tools/server/ai_build_wmap/main.cpp | 3 +++ .../build_world_packed_col/build_world_packed_col.cpp | 4 ++++ .../build_world_packed_col/packed_world_builder.cpp | 3 +++ code/ryzom/tools/sheets_packer/stdpch.h | 3 +++ .../tools/sheets_packer_shard/sheets_packer_shard.cpp | 2 +- code/ryzom/tools/translation_tools/extract_bot_names.cpp | 3 +++ code/ryzom/tools/translation_tools/main.cpp | 3 +++ code/snowballs2/client/src/animation.cpp | 3 +++ code/snowballs2/client/src/camera.cpp | 3 +++ code/snowballs2/client/src/camera.h | 3 +++ code/snowballs2/client/src/commands.cpp | 3 +++ code/snowballs2/client/src/compass.cpp | 3 +++ code/snowballs2/client/src/configuration.cpp | 3 +++ code/snowballs2/client/src/entities.cpp | 3 +++ code/snowballs2/client/src/entities.h | 3 +++ code/snowballs2/client/src/game_time.cpp | 3 +++ code/snowballs2/client/src/game_time.h | 3 +++ code/snowballs2/client/src/graph.cpp | 3 +++ code/snowballs2/client/src/mouse_listener.cpp | 3 +++ code/snowballs2/client/src/network.cpp | 3 +++ code/snowballs2/client/src/snowballs_client.cpp | 3 +++ code/snowballs2/client/src/snowballs_client.h | 3 +++ code/snowballs2/client/src/snowballs_config.h | 3 +++ code/snowballs2/client/src/sound.cpp | 3 +++ code/snowballs2/client/src/sound.h | 3 +++ code/snowballs2/server/frontend/src/main.cpp | 3 +++ code/studio/src/extension_system/iplugin.h | 5 +++-- code/studio/src/extension_system/iplugin_manager.h | 6 ++++-- code/studio/src/extension_system/iplugin_spec.h | 5 +++-- code/studio/src/extension_system/plugin_manager.cpp | 6 ++++-- code/studio/src/extension_system/plugin_manager.h | 6 ++++-- code/studio/src/extension_system/plugin_spec.cpp | 6 ++++-- code/studio/src/extension_system/plugin_spec.h | 6 ++++-- code/studio/src/main.cpp | 6 +++++- .../studio/src/plugins/bnp_manager/bnp_dirtree_dialog.cpp | 2 +- code/studio/src/plugins/bnp_manager/bnp_dirtree_dialog.h | 2 +- code/studio/src/plugins/bnp_manager/bnp_file.cpp | 2 +- code/studio/src/plugins/bnp_manager/bnp_file.h | 2 +- .../src/plugins/bnp_manager/bnp_filelist_dialog.cpp | 2 +- code/studio/src/plugins/bnp_manager/bnp_filelist_dialog.h | 2 +- .../src/plugins/bnp_manager/bnp_filesystem_model.cpp | 2 +- .../studio/src/plugins/bnp_manager/bnp_filesystem_model.h | 2 +- .../src/plugins/bnp_manager/bnp_manager_constants.h | 2 +- .../studio/src/plugins/bnp_manager/bnp_manager_plugin.cpp | 5 ++++- code/studio/src/plugins/bnp_manager/bnp_manager_plugin.h | 2 +- .../studio/src/plugins/bnp_manager/bnp_manager_window.cpp | 2 +- code/studio/src/plugins/bnp_manager/bnp_manager_window.h | 2 +- code/studio/src/plugins/bnp_manager/bnp_proxy_model.cpp | 2 +- code/studio/src/plugins/bnp_manager/bnp_proxy_model.h | 2 +- code/studio/src/plugins/core/Nel3DWidget/nel3d_widget.cpp | 3 +++ code/studio/src/plugins/core/Nel3DWidget/nel3d_widget.h | 3 +++ code/studio/src/plugins/core/context_manager.cpp | 5 ++++- code/studio/src/plugins/core/context_manager.h | 5 ++++- code/studio/src/plugins/core/core.cpp | 6 ++++-- code/studio/src/plugins/core/core.h | 6 ++++-- code/studio/src/plugins/core/core_constants.h | 5 ++++- code/studio/src/plugins/core/core_global.h | 6 ++++-- code/studio/src/plugins/core/core_plugin.cpp | 5 ++++- code/studio/src/plugins/core/core_plugin.h | 5 ++++- code/studio/src/plugins/core/general_settings_page.cpp | 5 ++++- code/studio/src/plugins/core/general_settings_page.h | 5 ++++- code/studio/src/plugins/core/icontext.h | 5 ++++- code/studio/src/plugins/core/icore.h | 6 ++++-- code/studio/src/plugins/core/icore_listener.h | 6 ++++-- code/studio/src/plugins/core/ioptions_page.h | 6 ++++-- code/studio/src/plugins/core/main_window.cpp | 5 ++++- code/studio/src/plugins/core/main_window.h | 5 ++++- code/studio/src/plugins/core/menu_manager.cpp | 5 ++++- code/studio/src/plugins/core/menu_manager.h | 5 ++++- code/studio/src/plugins/core/plugin_view_dialog.cpp | 5 ++++- code/studio/src/plugins/core/plugin_view_dialog.h | 5 ++++- .../src/plugins/core/search_paths_settings_page.cpp | 5 ++++- code/studio/src/plugins/core/search_paths_settings_page.h | 5 ++++- code/studio/src/plugins/core/settings_dialog.cpp | 6 ++++-- code/studio/src/plugins/core/settings_dialog.h | 6 ++++-- .../src/plugins/disp_sheet_id/disp_sheet_id_plugin.cpp | 3 +++ .../src/plugins/disp_sheet_id/disp_sheet_id_plugin.h | 4 ++++ code/studio/src/plugins/disp_sheet_id/sheet_id_view.cpp | 3 +++ code/studio/src/plugins/disp_sheet_id/sheet_id_view.h | 3 +++ code/studio/src/plugins/example/example_settings_page.cpp | 4 +++- code/studio/src/plugins/example/example_settings_page.h | 4 +++- code/studio/src/plugins/example/qnel_widget.cpp | 4 +++- code/studio/src/plugins/example/qnel_widget.h | 4 +++- code/studio/src/plugins/example/simple_viewer.cpp | 4 +++- code/studio/src/plugins/example/simple_viewer.h | 4 +++- code/studio/src/plugins/georges_editor/actions.cpp | 6 +++++- code/studio/src/plugins/georges_editor/actions.h | 5 ++++- code/studio/src/plugins/georges_editor/browser_ctrl.cpp | 6 ++++-- code/studio/src/plugins/georges_editor/browser_ctrl.h | 3 +-- .../src/plugins/georges_editor/browser_ctrl_pvt.cpp | 6 ++++-- code/studio/src/plugins/georges_editor/browser_ctrl_pvt.h | 3 +-- .../src/plugins/georges_editor/dfn_browser_ctrl.cpp | 3 +-- code/studio/src/plugins/georges_editor/dfn_browser_ctrl.h | 3 +-- .../src/plugins/georges_editor/expandable_headerview.cpp | 2 +- .../src/plugins/georges_editor/expandable_headerview.h | 5 ++++- .../plugins/georges_editor/filepath_property_manager.cpp | 3 +-- .../plugins/georges_editor/filepath_property_manager.h | 3 +-- code/studio/src/plugins/georges_editor/formdelegate.cpp | 5 ++++- code/studio/src/plugins/georges_editor/formdelegate.h | 5 ++++- code/studio/src/plugins/georges_editor/formitem.cpp | 6 +++++- code/studio/src/plugins/georges_editor/formitem.h | 6 +++++- code/studio/src/plugins/georges_editor/georges.cpp | 2 +- code/studio/src/plugins/georges_editor/georges.h | 2 +- .../src/plugins/georges_editor/georges_dfn_dialog.cpp | 3 +-- .../src/plugins/georges_editor/georges_dfn_dialog.h | 3 +-- .../src/plugins/georges_editor/georges_dirtree_dialog.cpp | 6 +++++- .../src/plugins/georges_editor/georges_dirtree_dialog.h | 5 ++++- .../src/plugins/georges_editor/georges_dock_widget.cpp | 3 +-- .../src/plugins/georges_editor/georges_dock_widget.h | 3 +-- .../src/plugins/georges_editor/georges_editor_constants.h | 5 ++++- .../src/plugins/georges_editor/georges_editor_form.cpp | 6 +++++- .../src/plugins/georges_editor/georges_editor_form.h | 6 +++++- .../src/plugins/georges_editor/georges_editor_plugin.cpp | 6 +++++- .../src/plugins/georges_editor/georges_editor_plugin.h | 6 +++++- .../plugins/georges_editor/georges_filesystem_model.cpp | 2 +- .../src/plugins/georges_editor/georges_filesystem_model.h | 2 +- .../plugins/georges_editor/georges_treeview_dialog.cpp | 7 ++++++- .../src/plugins/georges_editor/georges_treeview_dialog.h | 6 +++++- .../src/plugins/georges_editor/georges_typ_dialog.cpp | 3 +-- .../src/plugins/georges_editor/georges_typ_dialog.h | 3 +-- .../src/plugins/georges_editor/georgesform_model.cpp | 6 +++++- .../studio/src/plugins/georges_editor/georgesform_model.h | 7 ++++++- .../plugins/georges_editor/georgesform_proxy_model.cpp | 5 ++++- .../src/plugins/georges_editor/georgesform_proxy_model.h | 5 ++++- code/studio/src/plugins/georges_editor/stdpch.cpp | 2 +- code/studio/src/plugins/georges_editor/stdpch.h | 2 +- .../src/plugins/georges_editor/typ_browser_ctrl.cpp | 3 +-- code/studio/src/plugins/georges_editor/typ_browser_ctrl.h | 3 +-- code/studio/src/plugins/gui_editor/action_editor.cpp | 3 +++ code/studio/src/plugins/gui_editor/action_editor.h | 3 +++ .../src/plugins/gui_editor/action_property_manager.cpp | 3 +++ .../src/plugins/gui_editor/action_property_manager.h | 3 +++ .../src/plugins/gui_editor/editor_message_processor.cpp | 3 +++ .../src/plugins/gui_editor/editor_message_processor.h | 4 ++++ .../src/plugins/gui_editor/editor_selection_watcher.cpp | 3 +++ .../src/plugins/gui_editor/editor_selection_watcher.h | 3 +++ code/studio/src/plugins/gui_editor/expr_link_dlg.cpp | 3 +-- code/studio/src/plugins/gui_editor/expr_link_dlg.h | 3 +-- code/studio/src/plugins/gui_editor/expr_slot_info.h | 3 +-- code/studio/src/plugins/gui_editor/expression_editor.cpp | 3 +-- code/studio/src/plugins/gui_editor/expression_editor.h | 3 +-- code/studio/src/plugins/gui_editor/expression_info.h | 3 +-- code/studio/src/plugins/gui_editor/expression_link.cpp | 3 +-- code/studio/src/plugins/gui_editor/expression_link.h | 3 +-- code/studio/src/plugins/gui_editor/expression_loader.cpp | 3 +-- code/studio/src/plugins/gui_editor/expression_loader.h | 3 +-- code/studio/src/plugins/gui_editor/expression_node.cpp | 3 +-- code/studio/src/plugins/gui_editor/expression_node.h | 3 +-- code/studio/src/plugins/gui_editor/expression_store.cpp | 3 +-- code/studio/src/plugins/gui_editor/expression_store.h | 3 +-- code/studio/src/plugins/gui_editor/gui_editor_constants.h | 3 +++ code/studio/src/plugins/gui_editor/gui_editor_context.cpp | 3 +++ code/studio/src/plugins/gui_editor/gui_editor_context.h | 3 +++ .../src/plugins/gui_editor/gui_editor_core_listener.cpp | 3 +++ .../src/plugins/gui_editor/gui_editor_core_listener.h | 3 +++ code/studio/src/plugins/gui_editor/gui_editor_global.h | 3 +++ code/studio/src/plugins/gui_editor/gui_editor_plugin.cpp | 3 +++ code/studio/src/plugins/gui_editor/gui_editor_plugin.h | 3 +++ code/studio/src/plugins/gui_editor/gui_editor_window.cpp | 3 +++ code/studio/src/plugins/gui_editor/gui_editor_window.h | 3 +++ code/studio/src/plugins/gui_editor/link_editor.cpp | 3 +++ code/studio/src/plugins/gui_editor/link_editor.h | 3 +++ code/studio/src/plugins/gui_editor/link_list.cpp | 3 +++ code/studio/src/plugins/gui_editor/link_list.h | 3 +++ code/studio/src/plugins/gui_editor/nelgui_ctrl.cpp | 3 +++ code/studio/src/plugins/gui_editor/nelgui_ctrl.h | 3 +++ code/studio/src/plugins/gui_editor/new_gui_dlg.cpp | 3 +-- code/studio/src/plugins/gui_editor/new_gui_dlg.h | 3 +-- .../studio/src/plugins/gui_editor/new_property_widget.cpp | 3 +++ code/studio/src/plugins/gui_editor/new_property_widget.h | 3 +++ code/studio/src/plugins/gui_editor/new_widget_widget.cpp | 3 +++ code/studio/src/plugins/gui_editor/new_widget_widget.h | 3 +++ code/studio/src/plugins/gui_editor/proc_editor.cpp | 3 +++ code/studio/src/plugins/gui_editor/proc_editor.h | 3 +++ code/studio/src/plugins/gui_editor/proc_list.cpp | 3 +++ code/studio/src/plugins/gui_editor/proc_list.h | 3 +++ .../studio/src/plugins/gui_editor/project_file_parser.cpp | 3 +++ code/studio/src/plugins/gui_editor/project_file_parser.h | 3 +++ .../src/plugins/gui_editor/project_file_serializer.cpp | 3 +++ .../src/plugins/gui_editor/project_file_serializer.h | 3 +++ code/studio/src/plugins/gui_editor/project_files.h | 3 +++ code/studio/src/plugins/gui_editor/project_window.cpp | 3 +++ code/studio/src/plugins/gui_editor/project_window.h | 3 +++ .../src/plugins/gui_editor/property_browser_ctrl.cpp | 3 +++ .../studio/src/plugins/gui_editor/property_browser_ctrl.h | 3 +++ code/studio/src/plugins/gui_editor/texture_chooser.cpp | 3 +++ code/studio/src/plugins/gui_editor/texture_chooser.h | 3 +++ .../src/plugins/gui_editor/texture_property_manager.cpp | 3 +++ .../src/plugins/gui_editor/texture_property_manager.h | 3 +++ code/studio/src/plugins/gui_editor/widget_hierarchy.cpp | 4 ++++ code/studio/src/plugins/gui_editor/widget_hierarchy.h | 3 +++ code/studio/src/plugins/gui_editor/widget_info.h | 3 +++ .../src/plugins/gui_editor/widget_info_serializer.cpp | 3 +++ .../src/plugins/gui_editor/widget_info_serializer.h | 3 +++ code/studio/src/plugins/gui_editor/widget_info_tree.h | 3 +++ .../studio/src/plugins/gui_editor/widget_info_tree_node.h | 3 +++ .../src/plugins/gui_editor/widget_info_tree_visitor.h | 3 +++ code/studio/src/plugins/gui_editor/widget_properties.cpp | 3 +++ code/studio/src/plugins/gui_editor/widget_properties.h | 3 +++ .../src/plugins/gui_editor/widget_properties_parser.cpp | 3 +++ .../src/plugins/gui_editor/widget_properties_parser.h | 3 +++ code/studio/src/plugins/gui_editor/widget_serializer.cpp | 3 +++ code/studio/src/plugins/gui_editor/widget_serializer.h | 3 +++ code/studio/src/plugins/landscape_editor/builder_zone.cpp | 4 +++- code/studio/src/plugins/landscape_editor/builder_zone.h | 4 +++- .../src/plugins/landscape_editor/builder_zone_base.cpp | 4 +++- .../src/plugins/landscape_editor/builder_zone_base.h | 4 +++- .../src/plugins/landscape_editor/landscape_actions.cpp | 4 +++- .../src/plugins/landscape_editor/landscape_actions.h | 4 +++- .../plugins/landscape_editor/landscape_editor_constants.h | 2 +- .../plugins/landscape_editor/landscape_editor_global.h | 5 +++-- .../plugins/landscape_editor/landscape_editor_plugin.cpp | 5 ++++- .../plugins/landscape_editor/landscape_editor_plugin.h | 2 +- .../plugins/landscape_editor/landscape_editor_window.cpp | 5 ++++- .../plugins/landscape_editor/landscape_editor_window.h | 2 +- .../src/plugins/landscape_editor/landscape_scene.cpp | 2 +- .../studio/src/plugins/landscape_editor/landscape_scene.h | 4 +++- .../src/plugins/landscape_editor/landscape_scene_base.cpp | 2 +- .../src/plugins/landscape_editor/landscape_scene_base.h | 2 +- .../src/plugins/landscape_editor/landscape_view.cpp | 2 +- code/studio/src/plugins/landscape_editor/landscape_view.h | 2 +- .../src/plugins/landscape_editor/list_zones_model.cpp | 4 +++- .../src/plugins/landscape_editor/list_zones_model.h | 4 +++- .../src/plugins/landscape_editor/list_zones_widget.cpp | 4 +++- .../src/plugins/landscape_editor/list_zones_widget.h | 2 +- .../src/plugins/landscape_editor/pixmap_database.cpp | 2 +- .../studio/src/plugins/landscape_editor/pixmap_database.h | 2 +- .../plugins/landscape_editor/project_settings_dialog.cpp | 2 +- .../plugins/landscape_editor/project_settings_dialog.h | 2 +- .../src/plugins/landscape_editor/snapshot_dialog.cpp | 2 +- .../studio/src/plugins/landscape_editor/snapshot_dialog.h | 2 +- .../src/plugins/landscape_editor/zone_region_editor.cpp | 4 +++- .../src/plugins/landscape_editor/zone_region_editor.h | 4 +++- code/studio/src/plugins/log/log_plugin.cpp | 7 ++++++- code/studio/src/plugins/log/log_settings_page.cpp | 6 +++++- code/studio/src/plugins/log/log_settings_page.h | 4 +++- code/studio/src/plugins/log/qt_displayer.cpp | 4 +++- .../mission_compiler/mission_compiler_settings_page.cpp | 6 +++++- .../mission_compiler/mission_compiler_settings_page.h | 5 ++++- .../src/plugins/mission_compiler/server_entry_dialog.cpp | 6 +++++- .../src/plugins/mission_compiler/server_entry_dialog.h | 6 +++++- .../src/plugins/object_viewer/graphics_settings_page.cpp | 4 +++- .../src/plugins/object_viewer/graphics_settings_page.h | 4 +++- .../src/plugins/object_viewer/object_viewer_constants.h | 4 +++- .../src/plugins/object_viewer/particle_system/dup_ps.h | 3 +++ .../object_viewer/particle_system/particle_node.cpp | 3 +++ .../object_viewer/particle_system/ps_initial_pos.cpp | 3 +++ .../object_viewer/particle_system/ps_initial_pos.h | 3 +++ .../plugins/object_viewer/particle_system/ps_wrapper.h | 3 +++ .../object_viewer/particle_system/scheme_bank_dialog.cpp | 3 +++ .../object_viewer/particle_system/scheme_bank_dialog.h | 3 +++ .../object_viewer/particle_system/scheme_manager.cpp | 3 +++ .../particle_system/value_gradient_dialog.cpp | 4 +++- .../object_viewer/particle_system/value_gradient_dialog.h | 4 +++- .../src/plugins/object_viewer/sound_settings_page.cpp | 4 +++- .../src/plugins/object_viewer/sound_settings_page.h | 4 +++- code/studio/src/plugins/object_viewer/sound_system.cpp | 4 ++++ code/studio/src/plugins/object_viewer/sound_system.h | 3 +++ .../src/plugins/object_viewer/vegetable_settings_page.cpp | 4 +++- .../src/plugins/object_viewer/vegetable_settings_page.h | 4 +++- .../src/plugins/object_viewer/widgets/hoverpoints.cpp | 5 +++-- .../src/plugins/object_viewer/widgets/hoverpoints.h | 5 +++-- .../src/plugins/ovqt_sheet_builder/ovqt_sheet_builder.cpp | 4 ++++ .../src/plugins/ovqt_sheet_builder/ovqt_sheet_builder.h | 4 ++++ code/studio/src/plugins/ovqt_sheet_builder/sheetbuilder.h | 3 +++ .../ovqt_sheet_builder/sheetbuilderconfgdialog.cpp | 3 +++ .../plugins/ovqt_sheet_builder/sheetbuilderconfgdialog.h | 3 +++ .../src/plugins/ovqt_sheet_builder/sheetbuilderdialog.cpp | 3 +++ .../src/plugins/ovqt_sheet_builder/sheetbuilderdialog.h | 3 +++ .../src/plugins/tile_editor/tile_editor_main_window.cpp | 4 ++++ .../src/plugins/tile_editor/tile_editor_main_window.h | 4 ++++ .../studio/src/plugins/tile_editor/tile_editor_plugin.cpp | 4 ++++ code/studio/src/plugins/tile_editor/tile_editor_plugin.h | 4 ++++ code/studio/src/plugins/tile_editor/tile_item.cpp | 4 ++++ code/studio/src/plugins/tile_editor/tile_item.h | 4 ++++ .../studio/src/plugins/tile_editor/tile_item_delegate.cpp | 3 +++ code/studio/src/plugins/tile_editor/tile_item_delegate.h | 4 ++++ code/studio/src/plugins/tile_editor/tile_model.cpp | 4 ++++ code/studio/src/plugins/tile_editor/tile_model.h | 4 ++++ .../src/plugins/translation_manager/editor_phrase.cpp | 2 +- .../src/plugins/translation_manager/editor_phrase.h | 4 +++- .../src/plugins/translation_manager/editor_worksheet.cpp | 4 +++- .../src/plugins/translation_manager/editor_worksheet.h | 4 +++- .../src/plugins/translation_manager/extract_bot_names.cpp | 5 ++++- .../src/plugins/translation_manager/extract_bot_names.h | 5 ++++- .../translation_manager/extract_new_sheet_names.cpp | 3 +++ .../plugins/translation_manager/extract_new_sheet_names.h | 3 +++ .../src/plugins/translation_manager/ftp_selection.cpp | 5 ++++- .../src/plugins/translation_manager/source_selection.cpp | 6 +++++- .../src/plugins/translation_manager/source_selection.h | 5 ++++- .../translation_manager/translation_manager_constants.h | 6 +++++- .../translation_manager/translation_manager_editor.h | 6 +++++- .../translation_manager_main_window.cpp | 5 ++++- .../translation_manager/translation_manager_main_window.h | 6 +++++- .../translation_manager/translation_manager_plugin.cpp | 6 +++++- .../translation_manager/translation_manager_plugin.h | 5 ++++- .../translation_manager_settings_page.cpp | 5 ++++- .../translation_manager_settings_page.h | 5 ++++- code/studio/src/plugins/translation_manager/uxt_editor.h | 3 +++ .../plugins/world_editor/const_string_array_editor.cpp | 3 +++ .../src/plugins/world_editor/const_string_array_editor.h | 3 +++ .../plugins/world_editor/const_string_array_property.cpp | 3 +++ .../plugins/world_editor/const_string_array_property.h | 3 +++ code/studio/src/plugins/world_editor/primitive_item.cpp | 2 +- code/studio/src/plugins/world_editor/primitive_item.h | 2 +- code/studio/src/plugins/world_editor/primitives_model.cpp | 2 +- code/studio/src/plugins/world_editor/primitives_model.h | 2 +- code/studio/src/plugins/world_editor/primitives_view.cpp | 2 +- code/studio/src/plugins/world_editor/primitives_view.h | 2 +- .../src/plugins/world_editor/project_settings_dialog.cpp | 2 +- .../src/plugins/world_editor/project_settings_dialog.h | 2 +- .../src/plugins/world_editor/property_editor_widget.cpp | 5 ++++- .../src/plugins/world_editor/property_editor_widget.h | 5 ++++- .../src/plugins/world_editor/world_editor_actions.cpp | 5 ++++- .../src/plugins/world_editor/world_editor_actions.h | 5 ++++- .../src/plugins/world_editor/world_editor_constants.h | 2 +- .../studio/src/plugins/world_editor/world_editor_global.h | 5 +++-- .../studio/src/plugins/world_editor/world_editor_misc.cpp | 3 +++ code/studio/src/plugins/world_editor/world_editor_misc.h | 4 ++++ .../src/plugins/world_editor/world_editor_plugin.cpp | 5 ++++- .../studio/src/plugins/world_editor/world_editor_plugin.h | 5 ++++- .../src/plugins/world_editor/world_editor_scene.cpp | 2 +- code/studio/src/plugins/world_editor/world_editor_scene.h | 2 +- .../src/plugins/world_editor/world_editor_scene_item.cpp | 2 +- .../src/plugins/world_editor/world_editor_scene_item.h | 2 +- .../plugins/world_editor/world_editor_settings_page.cpp | 5 ++++- .../src/plugins/world_editor/world_editor_settings_page.h | 5 ++++- .../src/plugins/world_editor/world_editor_window.cpp | 5 ++++- .../studio/src/plugins/world_editor/world_editor_window.h | 5 ++++- code/studio/src/plugins/zone_painter/qnel_widget.cpp | 5 ++++- code/studio/src/plugins/zone_painter/qnel_widget.h | 5 ++++- .../src/plugins/zone_painter/zone_painter_model.cpp | 5 ++++- code/studio/src/plugins/zone_painter/zone_painter_model.h | 5 ++++- .../plugins/zone_painter/zone_painter_settings_page.cpp | 4 +++- .../src/plugins/zone_painter/zone_painter_settings_page.h | 5 ++++- code/studio/src/pm_watcher.cpp | 3 +++ code/studio/src/pm_watcher.h | 3 +++ code/studio/src/splash_screen.cpp | 3 +++ code/studio/src/splash_screen.h | 3 +++ code/studio/src/startup_settings_dlg.cpp | 4 ++++ code/studio/src/startup_settings_dlg.h | 4 ++++ 1493 files changed, 4607 insertions(+), 404 deletions(-) diff --git a/code/nel/include/nel/3d/bloom_effect.h b/code/nel/include/nel/3d/bloom_effect.h index 49c959e23..1f49645a4 100644 --- a/code/nel/include/nel/3d/bloom_effect.h +++ b/code/nel/include/nel/3d/bloom_effect.h @@ -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) 2013-2014 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/include/nel/3d/computed_string.h b/code/nel/include/nel/3d/computed_string.h index 25d12a3ac..3f27a2879 100644 --- a/code/nel/include/nel/3d/computed_string.h +++ b/code/nel/include/nel/3d/computed_string.h @@ -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) 2014 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/include/nel/3d/driver.h b/code/nel/include/nel/3d/driver.h index 85140b3da..75472df37 100644 --- a/code/nel/include/nel/3d/driver.h +++ b/code/nel/include/nel/3d/driver.h @@ -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) 2013-2014 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/include/nel/3d/driver_user.h b/code/nel/include/nel/3d/driver_user.h index 62c6fd6db..c3564975f 100644 --- a/code/nel/include/nel/3d/driver_user.h +++ b/code/nel/include/nel/3d/driver_user.h @@ -1,6 +1,11 @@ // NeL - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2010 Matt RAYKOWSKI (sfb) +// Copyright (C) 2010 Robert TIMM (rti) +// Copyright (C) 2013-2014 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/include/nel/3d/dru.h b/code/nel/include/nel/3d/dru.h index c23d41382..49386487b 100644 --- a/code/nel/include/nel/3d/dru.h +++ b/code/nel/include/nel/3d/dru.h @@ -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) 2014 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/include/nel/3d/landscapevb_allocator.h b/code/nel/include/nel/3d/landscapevb_allocator.h index 0e485e990..fbf6f1eb4 100644 --- a/code/nel/include/nel/3d/landscapevb_allocator.h +++ b/code/nel/include/nel/3d/landscapevb_allocator.h @@ -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) 2013 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/include/nel/3d/material.h b/code/nel/include/nel/3d/material.h index 7a300da45..9c8865124 100644 --- a/code/nel/include/nel/3d/material.h +++ b/code/nel/include/nel/3d/material.h @@ -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) 2013 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/include/nel/3d/meshvp_per_pixel_light.h b/code/nel/include/nel/3d/meshvp_per_pixel_light.h index 4533464a9..9aef9fb0a 100644 --- a/code/nel/include/nel/3d/meshvp_per_pixel_light.h +++ b/code/nel/include/nel/3d/meshvp_per_pixel_light.h @@ -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) 2013 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/include/nel/3d/meshvp_wind_tree.h b/code/nel/include/nel/3d/meshvp_wind_tree.h index 790a2f774..e3e8e8bc2 100644 --- a/code/nel/include/nel/3d/meshvp_wind_tree.h +++ b/code/nel/include/nel/3d/meshvp_wind_tree.h @@ -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) 2013 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/include/nel/3d/ps_sound.h b/code/nel/include/nel/3d/ps_sound.h index a6da8f031..c716dd2a3 100644 --- a/code/nel/include/nel/3d/ps_sound.h +++ b/code/nel/include/nel/3d/ps_sound.h @@ -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/include/nel/3d/render_trav.h b/code/nel/include/nel/3d/render_trav.h index 41570c2ca..8ea14fabf 100644 --- a/code/nel/include/nel/3d/render_trav.h +++ b/code/nel/include/nel/3d/render_trav.h @@ -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) 2013-2014 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/include/nel/3d/scene.h b/code/nel/include/nel/3d/scene.h index 12c18b484..39d9707b7 100644 --- a/code/nel/include/nel/3d/scene.h +++ b/code/nel/include/nel/3d/scene.h @@ -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) 2013-2014 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/include/nel/3d/scene_user.h b/code/nel/include/nel/3d/scene_user.h index 639fa33d8..4abadb32e 100644 --- a/code/nel/include/nel/3d/scene_user.h +++ b/code/nel/include/nel/3d/scene_user.h @@ -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) 2014 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/include/nel/3d/skeleton_model.h b/code/nel/include/nel/3d/skeleton_model.h index dccafd1f1..85644e646 100644 --- a/code/nel/include/nel/3d/skeleton_model.h +++ b/code/nel/include/nel/3d/skeleton_model.h @@ -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) 2014 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/include/nel/3d/text_context.h b/code/nel/include/nel/3d/text_context.h index 1f75e1184..1eb256855 100644 --- a/code/nel/include/nel/3d/text_context.h +++ b/code/nel/include/nel/3d/text_context.h @@ -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) 2014 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/include/nel/3d/text_context_user.h b/code/nel/include/nel/3d/text_context_user.h index 15e93c3f2..2a167b2e9 100644 --- a/code/nel/include/nel/3d/text_context_user.h +++ b/code/nel/include/nel/3d/text_context_user.h @@ -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) 2014 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/include/nel/3d/tile_bank.h b/code/nel/include/nel/3d/tile_bank.h index 7d4eda3a7..c320b50c7 100644 --- a/code/nel/include/nel/3d/tile_bank.h +++ b/code/nel/include/nel/3d/tile_bank.h @@ -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) 2014 Laszlo KIS-ADAM (dfighter) +// // 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/include/nel/3d/u_driver.h b/code/nel/include/nel/3d/u_driver.h index 0500192ad..f4f78e2cb 100644 --- a/code/nel/include/nel/3d/u_driver.h +++ b/code/nel/include/nel/3d/u_driver.h @@ -1,6 +1,11 @@ // NeL - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2010 Matt RAYKOWSKI (sfb) +// Copyright (C) 2010 Robert TIMM (rti) +// Copyright (C) 2013-2014 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/include/nel/3d/u_ps_sound_impl.h b/code/nel/include/nel/3d/u_ps_sound_impl.h index f5436c842..8a6869d0b 100644 --- a/code/nel/include/nel/3d/u_ps_sound_impl.h +++ b/code/nel/include/nel/3d/u_ps_sound_impl.h @@ -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/include/nel/3d/u_ps_sound_interface.h b/code/nel/include/nel/3d/u_ps_sound_interface.h index c382b01bd..7faea5fc5 100644 --- a/code/nel/include/nel/3d/u_ps_sound_interface.h +++ b/code/nel/include/nel/3d/u_ps_sound_interface.h @@ -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/include/nel/3d/u_scene.h b/code/nel/include/nel/3d/u_scene.h index c0733c5d2..4bb831bb2 100644 --- a/code/nel/include/nel/3d/u_scene.h +++ b/code/nel/include/nel/3d/u_scene.h @@ -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) 2014 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/include/nel/3d/u_text_context.h b/code/nel/include/nel/3d/u_text_context.h index 4c1dfea47..cdde02f82 100644 --- a/code/nel/include/nel/3d/u_text_context.h +++ b/code/nel/include/nel/3d/u_text_context.h @@ -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) 2014 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/include/nel/3d/vegetable_manager.h b/code/nel/include/nel/3d/vegetable_manager.h index ee21af3f3..e1a2001a0 100644 --- a/code/nel/include/nel/3d/vegetable_manager.h +++ b/code/nel/include/nel/3d/vegetable_manager.h @@ -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) 2013 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/include/nel/3d/vertex_program.h b/code/nel/include/nel/3d/vertex_program.h index 3d77c6104..f493ccb2b 100644 --- a/code/nel/include/nel/3d/vertex_program.h +++ b/code/nel/include/nel/3d/vertex_program.h @@ -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) 2013 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/include/nel/3d/vertex_program_parse.h b/code/nel/include/nel/3d/vertex_program_parse.h index 88538da07..2ecb9f86b 100644 --- a/code/nel/include/nel/3d/vertex_program_parse.h +++ b/code/nel/include/nel/3d/vertex_program_parse.h @@ -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) 2013 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/include/nel/3d/water_env_map.h b/code/nel/include/nel/3d/water_env_map.h index 2282610d7..0d02f98ca 100644 --- a/code/nel/include/nel/3d/water_env_map.h +++ b/code/nel/include/nel/3d/water_env_map.h @@ -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) 2013 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/include/nel/3d/water_shape.h b/code/nel/include/nel/3d/water_shape.h index 633da8611..192423720 100644 --- a/code/nel/include/nel/3d/water_shape.h +++ b/code/nel/include/nel/3d/water_shape.h @@ -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) 2013 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/include/nel/3d/zone_lighter.h b/code/nel/include/nel/3d/zone_lighter.h index 4f2910c52..92708a38b 100644 --- a/code/nel/include/nel/3d/zone_lighter.h +++ b/code/nel/include/nel/3d/zone_lighter.h @@ -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) 2014 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/include/nel/georges/form.h b/code/nel/include/nel/georges/form.h index da5c0ea88..9b21c4c49 100644 --- a/code/nel/include/nel/georges/form.h +++ b/code/nel/include/nel/georges/form.h @@ -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) 2014 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/include/nel/georges/form_dfn.h b/code/nel/include/nel/georges/form_dfn.h index 4e9870043..c6ab83a07 100644 --- a/code/nel/include/nel/georges/form_dfn.h +++ b/code/nel/include/nel/georges/form_dfn.h @@ -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) 2014 Laszlo KIS-ADAM (dfighter) +// // 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/include/nel/georges/form_elm.h b/code/nel/include/nel/georges/form_elm.h index 738e6a55a..bf9b3ef62 100644 --- a/code/nel/include/nel/georges/form_elm.h +++ b/code/nel/include/nel/georges/form_elm.h @@ -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) 2014 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/include/nel/georges/form_loader.h b/code/nel/include/nel/georges/form_loader.h index c46d79f22..2dc998b11 100644 --- a/code/nel/include/nel/georges/form_loader.h +++ b/code/nel/include/nel/georges/form_loader.h @@ -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) 2014 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/include/nel/georges/header.h b/code/nel/include/nel/georges/header.h index 82a094b3d..61351dfe9 100644 --- a/code/nel/include/nel/georges/header.h +++ b/code/nel/include/nel/georges/header.h @@ -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) 2014 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/include/nel/georges/type.h b/code/nel/include/nel/georges/type.h index e1bad7934..5d9c6706e 100644 --- a/code/nel/include/nel/georges/type.h +++ b/code/nel/include/nel/georges/type.h @@ -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) 2014 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/include/nel/georges/u_form.h b/code/nel/include/nel/georges/u_form.h index d53e415f7..4f77a8b80 100644 --- a/code/nel/include/nel/georges/u_form.h +++ b/code/nel/include/nel/georges/u_form.h @@ -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) 2014 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/include/nel/gui/action_handler.h b/code/nel/include/nel/gui/action_handler.h index f0f4c46f8..7288c9529 100644 --- a/code/nel/include/nel/gui/action_handler.h +++ b/code/nel/include/nel/gui/action_handler.h @@ -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) 2013-2014 Laszlo KIS-ADAM (dfighter) +// // 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/include/nel/gui/ctrl_base.h b/code/nel/include/nel/gui/ctrl_base.h index 35148b5b0..a8bdef85f 100644 --- a/code/nel/include/nel/gui/ctrl_base.h +++ b/code/nel/include/nel/gui/ctrl_base.h @@ -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) 2013-2014 Laszlo KIS-ADAM (dfighter) +// // 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/include/nel/gui/ctrl_base_button.h b/code/nel/include/nel/gui/ctrl_base_button.h index 9859f5b6e..3698d9538 100644 --- a/code/nel/include/nel/gui/ctrl_base_button.h +++ b/code/nel/include/nel/gui/ctrl_base_button.h @@ -1,5 +1,8 @@ // Ryzom - MMORPG Framework -// Copyright (C) 2010 Winch Gate Property Limited +// Copyright (C) 2010-2018 Winch Gate Property Limited +// +// This source file has been modified by the following contributors: +// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/nel/include/nel/gui/ctrl_button.h b/code/nel/include/nel/gui/ctrl_button.h index 1910ea72a..20ad9e35b 100644 --- a/code/nel/include/nel/gui/ctrl_button.h +++ b/code/nel/include/nel/gui/ctrl_button.h @@ -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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/include/nel/gui/ctrl_col_pick.h b/code/nel/include/nel/gui/ctrl_col_pick.h index dd779e837..2a3e19288 100644 --- a/code/nel/include/nel/gui/ctrl_col_pick.h +++ b/code/nel/include/nel/gui/ctrl_col_pick.h @@ -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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/include/nel/gui/ctrl_draggable.h b/code/nel/include/nel/gui/ctrl_draggable.h index 22ace71e0..c54c664bf 100644 --- a/code/nel/include/nel/gui/ctrl_draggable.h +++ b/code/nel/include/nel/gui/ctrl_draggable.h @@ -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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/include/nel/gui/ctrl_polygon.h b/code/nel/include/nel/gui/ctrl_polygon.h index cef57dd3c..2d14d1151 100644 --- a/code/nel/include/nel/gui/ctrl_polygon.h +++ b/code/nel/include/nel/gui/ctrl_polygon.h @@ -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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/include/nel/gui/ctrl_quad.h b/code/nel/include/nel/gui/ctrl_quad.h index 08c89675e..29948cb94 100644 --- a/code/nel/include/nel/gui/ctrl_quad.h +++ b/code/nel/include/nel/gui/ctrl_quad.h @@ -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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/include/nel/gui/ctrl_scroll.h b/code/nel/include/nel/gui/ctrl_scroll.h index a22da2cbd..76827dd29 100644 --- a/code/nel/include/nel/gui/ctrl_scroll.h +++ b/code/nel/include/nel/gui/ctrl_scroll.h @@ -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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/include/nel/gui/ctrl_scroll_base.h b/code/nel/include/nel/gui/ctrl_scroll_base.h index 38cfd9c09..7f4aaad7b 100644 --- a/code/nel/include/nel/gui/ctrl_scroll_base.h +++ b/code/nel/include/nel/gui/ctrl_scroll_base.h @@ -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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/include/nel/gui/ctrl_sheet_selection.h b/code/nel/include/nel/gui/ctrl_sheet_selection.h index 36d1c8336..3b0b32d4c 100644 --- a/code/nel/include/nel/gui/ctrl_sheet_selection.h +++ b/code/nel/include/nel/gui/ctrl_sheet_selection.h @@ -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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/include/nel/gui/ctrl_text_button.h b/code/nel/include/nel/gui/ctrl_text_button.h index e88ec81e1..25fc9eeac 100644 --- a/code/nel/include/nel/gui/ctrl_text_button.h +++ b/code/nel/include/nel/gui/ctrl_text_button.h @@ -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) 2013-2014 Laszlo KIS-ADAM (dfighter) +// // 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/include/nel/gui/ctrl_tooltip.h b/code/nel/include/nel/gui/ctrl_tooltip.h index a96bbad40..fe350c6c5 100644 --- a/code/nel/include/nel/gui/ctrl_tooltip.h +++ b/code/nel/include/nel/gui/ctrl_tooltip.h @@ -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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/include/nel/gui/db_manager.h b/code/nel/include/nel/gui/db_manager.h index d5036204d..cff3c0f88 100644 --- a/code/nel/include/nel/gui/db_manager.h +++ b/code/nel/include/nel/gui/db_manager.h @@ -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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/include/nel/gui/dbgroup_combo_box.h b/code/nel/include/nel/gui/dbgroup_combo_box.h index 723afbdc0..6f42572bb 100644 --- a/code/nel/include/nel/gui/dbgroup_combo_box.h +++ b/code/nel/include/nel/gui/dbgroup_combo_box.h @@ -1,6 +1,10 @@ // Ryzom - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) +// Copyright (C) 2015 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/include/nel/gui/dbgroup_select_number.h b/code/nel/include/nel/gui/dbgroup_select_number.h index a5ef692ff..995747ab8 100644 --- a/code/nel/include/nel/gui/dbgroup_select_number.h +++ b/code/nel/include/nel/gui/dbgroup_select_number.h @@ -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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/include/nel/gui/dbview_bar.h b/code/nel/include/nel/gui/dbview_bar.h index d4a3de340..f33959191 100644 --- a/code/nel/include/nel/gui/dbview_bar.h +++ b/code/nel/include/nel/gui/dbview_bar.h @@ -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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/include/nel/gui/dbview_bar3.h b/code/nel/include/nel/gui/dbview_bar3.h index 785cb165b..93d621f72 100644 --- a/code/nel/include/nel/gui/dbview_bar3.h +++ b/code/nel/include/nel/gui/dbview_bar3.h @@ -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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/include/nel/gui/dbview_digit.h b/code/nel/include/nel/gui/dbview_digit.h index 33446b2de..2c832b1e8 100644 --- a/code/nel/include/nel/gui/dbview_digit.h +++ b/code/nel/include/nel/gui/dbview_digit.h @@ -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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/include/nel/gui/dbview_number.h b/code/nel/include/nel/gui/dbview_number.h index bfa963fb6..1082ffd31 100644 --- a/code/nel/include/nel/gui/dbview_number.h +++ b/code/nel/include/nel/gui/dbview_number.h @@ -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) 2013-2014 Laszlo KIS-ADAM (dfighter) +// // 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/include/nel/gui/dbview_quantity.h b/code/nel/include/nel/gui/dbview_quantity.h index 67c4e57ba..16a11f5a0 100644 --- a/code/nel/include/nel/gui/dbview_quantity.h +++ b/code/nel/include/nel/gui/dbview_quantity.h @@ -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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/include/nel/gui/editor_selection_watcher.h b/code/nel/include/nel/gui/editor_selection_watcher.h index 7e262bdf1..f928035e7 100644 --- a/code/nel/include/nel/gui/editor_selection_watcher.h +++ b/code/nel/include/nel/gui/editor_selection_watcher.h @@ -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) 2013-2014 Laszlo KIS-ADAM (dfighter) +// // 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/include/nel/gui/event_descriptor.h b/code/nel/include/nel/gui/event_descriptor.h index d44448027..276979fdd 100644 --- a/code/nel/include/nel/gui/event_descriptor.h +++ b/code/nel/include/nel/gui/event_descriptor.h @@ -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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/include/nel/gui/event_listener.h b/code/nel/include/nel/gui/event_listener.h index 06a2d0776..f7c44acef 100644 --- a/code/nel/include/nel/gui/event_listener.h +++ b/code/nel/include/nel/gui/event_listener.h @@ -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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/include/nel/gui/group_container.h b/code/nel/include/nel/gui/group_container.h index dcc3e9759..742dfcfb2 100644 --- a/code/nel/include/nel/gui/group_container.h +++ b/code/nel/include/nel/gui/group_container.h @@ -1,5 +1,8 @@ // Ryzom - MMORPG Framework -// Copyright (C) 2010 Winch Gate Property Limited +// Copyright (C) 2010-2018 Winch Gate Property Limited +// +// This source file has been modified by the following contributors: +// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/nel/include/nel/gui/group_container_base.h b/code/nel/include/nel/gui/group_container_base.h index 6aa7425b7..ab65b005b 100644 --- a/code/nel/include/nel/gui/group_container_base.h +++ b/code/nel/include/nel/gui/group_container_base.h @@ -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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/include/nel/gui/group_editbox.h b/code/nel/include/nel/gui/group_editbox.h index 14d9d55a5..096f3daa0 100644 --- a/code/nel/include/nel/gui/group_editbox.h +++ b/code/nel/include/nel/gui/group_editbox.h @@ -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) 2013-2014 Laszlo KIS-ADAM (dfighter) +// // 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/include/nel/gui/group_editbox_base.h b/code/nel/include/nel/gui/group_editbox_base.h index 3aa6a555f..bd85a1ba1 100644 --- a/code/nel/include/nel/gui/group_editbox_base.h +++ b/code/nel/include/nel/gui/group_editbox_base.h @@ -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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/include/nel/gui/group_editbox_decor.h b/code/nel/include/nel/gui/group_editbox_decor.h index 975177612..13d8a00a3 100644 --- a/code/nel/include/nel/gui/group_editbox_decor.h +++ b/code/nel/include/nel/gui/group_editbox_decor.h @@ -1,5 +1,7 @@ // Ryzom - MMORPG Framework -// Copyright (C) 2014 Laszlo Kis-Adam +// Copyright (C) 2014 Laszlo KIS-ADAM (dfighter) +// +// This source file has been modified by the following contributors: // Copyright (C) 2010 Winch Gate Property Limited // // This program is free software: you can redistribute it and/or modify diff --git a/code/nel/include/nel/gui/group_frame.h b/code/nel/include/nel/gui/group_frame.h index 3d350b4d5..8c3cf2888 100644 --- a/code/nel/include/nel/gui/group_frame.h +++ b/code/nel/include/nel/gui/group_frame.h @@ -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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/include/nel/gui/group_header.h b/code/nel/include/nel/gui/group_header.h index ab6c94c35..8c1b0e56d 100644 --- a/code/nel/include/nel/gui/group_header.h +++ b/code/nel/include/nel/gui/group_header.h @@ -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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/include/nel/gui/group_html.h b/code/nel/include/nel/gui/group_html.h index 17a138eee..392644abb 100644 --- a/code/nel/include/nel/gui/group_html.h +++ b/code/nel/include/nel/gui/group_html.h @@ -1,5 +1,8 @@ // Ryzom - MMORPG Framework -// Copyright (C) 2010 Winch Gate Property Limited +// Copyright (C) 2010-2019 Winch Gate Property Limited +// +// This source file has been modified by the following contributors: +// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/nel/include/nel/gui/group_list.h b/code/nel/include/nel/gui/group_list.h index a86950d3e..58af530b5 100644 --- a/code/nel/include/nel/gui/group_list.h +++ b/code/nel/include/nel/gui/group_list.h @@ -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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/include/nel/gui/group_menu.h b/code/nel/include/nel/gui/group_menu.h index 9c5b37589..21a740d84 100644 --- a/code/nel/include/nel/gui/group_menu.h +++ b/code/nel/include/nel/gui/group_menu.h @@ -1,5 +1,9 @@ // Ryzom - MMORPG Framework -// Copyright (C) 2010 Winch Gate Property Limited +// Copyright (C) 2010-2019 Winch Gate Property Limited +// +// This source file has been modified by the following contributors: +// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) +// Copyright (C) 2014 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 diff --git a/code/nel/include/nel/gui/group_modal.h b/code/nel/include/nel/gui/group_modal.h index c177d6f0c..83687b562 100644 --- a/code/nel/include/nel/gui/group_modal.h +++ b/code/nel/include/nel/gui/group_modal.h @@ -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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/include/nel/gui/group_paragraph.h b/code/nel/include/nel/gui/group_paragraph.h index 02f948582..6142bc33b 100644 --- a/code/nel/include/nel/gui/group_paragraph.h +++ b/code/nel/include/nel/gui/group_paragraph.h @@ -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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/include/nel/gui/group_scrolltext.h b/code/nel/include/nel/gui/group_scrolltext.h index 66fc89044..b9916aec8 100644 --- a/code/nel/include/nel/gui/group_scrolltext.h +++ b/code/nel/include/nel/gui/group_scrolltext.h @@ -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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/include/nel/gui/group_submenu_base.h b/code/nel/include/nel/gui/group_submenu_base.h index ada94bfa6..16e3a5c77 100644 --- a/code/nel/include/nel/gui/group_submenu_base.h +++ b/code/nel/include/nel/gui/group_submenu_base.h @@ -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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/include/nel/gui/group_tab.h b/code/nel/include/nel/gui/group_tab.h index ee68acbc8..fc05c5ae0 100644 --- a/code/nel/include/nel/gui/group_tab.h +++ b/code/nel/include/nel/gui/group_tab.h @@ -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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/include/nel/gui/group_table.h b/code/nel/include/nel/gui/group_table.h index 52839e14b..e23ea5af8 100644 --- a/code/nel/include/nel/gui/group_table.h +++ b/code/nel/include/nel/gui/group_table.h @@ -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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/include/nel/gui/group_tree.h b/code/nel/include/nel/gui/group_tree.h index ae4bcb3d0..3d3a2d6fd 100644 --- a/code/nel/include/nel/gui/group_tree.h +++ b/code/nel/include/nel/gui/group_tree.h @@ -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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/include/nel/gui/group_wheel.h b/code/nel/include/nel/gui/group_wheel.h index c61b92dfd..40d81cff0 100644 --- a/code/nel/include/nel/gui/group_wheel.h +++ b/code/nel/include/nel/gui/group_wheel.h @@ -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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/include/nel/gui/http_hsts.h b/code/nel/include/nel/gui/http_hsts.h index 28f1b5f5b..84adfc9fe 100644 --- a/code/nel/include/nel/gui/http_hsts.h +++ b/code/nel/include/nel/gui/http_hsts.h @@ -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) 2018 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/include/nel/gui/input_event_listener.h b/code/nel/include/nel/gui/input_event_listener.h index 75ec9e20a..448a8e552 100644 --- a/code/nel/include/nel/gui/input_event_listener.h +++ b/code/nel/include/nel/gui/input_event_listener.h @@ -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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/include/nel/gui/input_handler.h b/code/nel/include/nel/gui/input_handler.h index 5c87c6d1c..d114ab515 100644 --- a/code/nel/include/nel/gui/input_handler.h +++ b/code/nel/include/nel/gui/input_handler.h @@ -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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/include/nel/gui/interface_anim.h b/code/nel/include/nel/gui/interface_anim.h index 09f9cd9ea..af64eab98 100644 --- a/code/nel/include/nel/gui/interface_anim.h +++ b/code/nel/include/nel/gui/interface_anim.h @@ -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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/include/nel/gui/interface_common.h b/code/nel/include/nel/gui/interface_common.h index 251b28b2d..b4fce1efc 100644 --- a/code/nel/include/nel/gui/interface_common.h +++ b/code/nel/include/nel/gui/interface_common.h @@ -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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/include/nel/gui/interface_element.h b/code/nel/include/nel/gui/interface_element.h index 540ba96e8..dbe1ba37e 100644 --- a/code/nel/include/nel/gui/interface_element.h +++ b/code/nel/include/nel/gui/interface_element.h @@ -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) 2013-2014 Laszlo KIS-ADAM (dfighter) +// // 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/include/nel/gui/interface_expr.h b/code/nel/include/nel/gui/interface_expr.h index e99e9668e..b967ef7ab 100644 --- a/code/nel/include/nel/gui/interface_expr.h +++ b/code/nel/include/nel/gui/interface_expr.h @@ -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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/include/nel/gui/interface_expr_node.h b/code/nel/include/nel/gui/interface_expr_node.h index 47cb5a664..499b766e5 100644 --- a/code/nel/include/nel/gui/interface_expr_node.h +++ b/code/nel/include/nel/gui/interface_expr_node.h @@ -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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/include/nel/gui/interface_factory.h b/code/nel/include/nel/gui/interface_factory.h index bd7f8352a..9174fecb2 100644 --- a/code/nel/include/nel/gui/interface_factory.h +++ b/code/nel/include/nel/gui/interface_factory.h @@ -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) 2014 Laszlo KIS-ADAM (dfighter) +// // 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/include/nel/gui/interface_group.h b/code/nel/include/nel/gui/interface_group.h index b646c38b6..44c18414e 100644 --- a/code/nel/include/nel/gui/interface_group.h +++ b/code/nel/include/nel/gui/interface_group.h @@ -1,5 +1,8 @@ // Ryzom - MMORPG Framework -// Copyright (C) 2010 Winch Gate Property Limited +// Copyright (C) 2010-2019 Winch Gate Property Limited +// +// This source file has been modified by the following contributors: +// Copyright (C) 2013-2014 Laszlo KIS-ADAM (dfighter) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/nel/include/nel/gui/interface_link.h b/code/nel/include/nel/gui/interface_link.h index 42fb2bbcf..54ca5706b 100644 --- a/code/nel/include/nel/gui/interface_link.h +++ b/code/nel/include/nel/gui/interface_link.h @@ -1,6 +1,10 @@ // Ryzom - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2013 Jan BOON (Kaetemi) +// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/include/nel/gui/interface_options.h b/code/nel/include/nel/gui/interface_options.h index 4ee0f52ee..0c1ccf2e8 100644 --- a/code/nel/include/nel/gui/interface_options.h +++ b/code/nel/include/nel/gui/interface_options.h @@ -1,6 +1,10 @@ // Ryzom - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) +// Copyright (C) 2014 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/include/nel/gui/interface_parser.h b/code/nel/include/nel/gui/interface_parser.h index bfc951ce2..ae386f963 100644 --- a/code/nel/include/nel/gui/interface_parser.h +++ b/code/nel/include/nel/gui/interface_parser.h @@ -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) 2013-2014 Laszlo KIS-ADAM (dfighter) +// // 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/include/nel/gui/interface_property.h b/code/nel/include/nel/gui/interface_property.h index b506ec7a9..feb21a2c1 100644 --- a/code/nel/include/nel/gui/interface_property.h +++ b/code/nel/include/nel/gui/interface_property.h @@ -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) 2013-2014 Laszlo KIS-ADAM (dfighter) +// // 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/include/nel/gui/libwww.h b/code/nel/include/nel/gui/libwww.h index e713f3c81..1f1e07902 100644 --- a/code/nel/include/nel/gui/libwww.h +++ b/code/nel/include/nel/gui/libwww.h @@ -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) 2013-2015 Laszlo KIS-ADAM (dfighter) +// // 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/include/nel/gui/link_data.h b/code/nel/include/nel/gui/link_data.h index 3e7a5ae00..c49d04886 100644 --- a/code/nel/include/nel/gui/link_data.h +++ b/code/nel/include/nel/gui/link_data.h @@ -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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/include/nel/gui/lua_helper.h b/code/nel/include/nel/gui/lua_helper.h index 7388c729d..0269e1a69 100644 --- a/code/nel/include/nel/gui/lua_helper.h +++ b/code/nel/include/nel/gui/lua_helper.h @@ -1,6 +1,10 @@ // Ryzom - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2013 Jan BOON (Kaetemi) +// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/include/nel/gui/lua_helper_inline.h b/code/nel/include/nel/gui/lua_helper_inline.h index 1d6b4864a..0d380bbf1 100644 --- a/code/nel/include/nel/gui/lua_helper_inline.h +++ b/code/nel/include/nel/gui/lua_helper_inline.h @@ -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) 2013 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/include/nel/gui/lua_ihm.h b/code/nel/include/nel/gui/lua_ihm.h index a7c5f9e2b..cc1051e62 100644 --- a/code/nel/include/nel/gui/lua_ihm.h +++ b/code/nel/include/nel/gui/lua_ihm.h @@ -1,5 +1,8 @@ // Ryzom - MMORPG Framework -// Copyright (C) 2010 Winch Gate Property Limited +// Copyright (C) 2010-2019 Winch Gate Property Limited +// +// This source file has been modified by the following contributors: +// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/nel/include/nel/gui/lua_loadlib.h b/code/nel/include/nel/gui/lua_loadlib.h index adab3ec0b..c7937d2e8 100644 --- a/code/nel/include/nel/gui/lua_loadlib.h +++ b/code/nel/include/nel/gui/lua_loadlib.h @@ -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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/include/nel/gui/lua_manager.h b/code/nel/include/nel/gui/lua_manager.h index 01c123f55..f9739ddb1 100644 --- a/code/nel/include/nel/gui/lua_manager.h +++ b/code/nel/include/nel/gui/lua_manager.h @@ -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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/include/nel/gui/lua_object.h b/code/nel/include/nel/gui/lua_object.h index 88c011347..37549664f 100644 --- a/code/nel/include/nel/gui/lua_object.h +++ b/code/nel/include/nel/gui/lua_object.h @@ -1,6 +1,10 @@ // Ryzom - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) +// Copyright (C) 2015 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/include/nel/gui/parser.h b/code/nel/include/nel/gui/parser.h index bc53e402d..661f4a620 100644 --- a/code/nel/include/nel/gui/parser.h +++ b/code/nel/include/nel/gui/parser.h @@ -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) 2013-2014 Laszlo KIS-ADAM (dfighter) +// // 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/include/nel/gui/proc.h b/code/nel/include/nel/gui/proc.h index 9e98008e4..483259e88 100644 --- a/code/nel/include/nel/gui/proc.h +++ b/code/nel/include/nel/gui/proc.h @@ -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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/include/nel/gui/reflect.h b/code/nel/include/nel/gui/reflect.h index 848a79fa8..9b594a0a5 100644 --- a/code/nel/include/nel/gui/reflect.h +++ b/code/nel/include/nel/gui/reflect.h @@ -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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/include/nel/gui/reflect_register.h b/code/nel/include/nel/gui/reflect_register.h index 70bd82d31..a555979f6 100644 --- a/code/nel/include/nel/gui/reflect_register.h +++ b/code/nel/include/nel/gui/reflect_register.h @@ -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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/include/nel/gui/root_group.h b/code/nel/include/nel/gui/root_group.h index 58963a3b2..d4cad792d 100644 --- a/code/nel/include/nel/gui/root_group.h +++ b/code/nel/include/nel/gui/root_group.h @@ -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) 2014 Laszlo KIS-ADAM (dfighter) +// // 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/include/nel/gui/variable_data.h b/code/nel/include/nel/gui/variable_data.h index cffba2bce..652c3f16d 100644 --- a/code/nel/include/nel/gui/variable_data.h +++ b/code/nel/include/nel/gui/variable_data.h @@ -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) 2014 Laszlo KIS-ADAM (dfighter) +// // 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/include/nel/gui/view_base.h b/code/nel/include/nel/gui/view_base.h index f64803720..dc75e5e43 100644 --- a/code/nel/include/nel/gui/view_base.h +++ b/code/nel/include/nel/gui/view_base.h @@ -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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/include/nel/gui/view_bitmap.h b/code/nel/include/nel/gui/view_bitmap.h index ef7735857..3d41ae283 100644 --- a/code/nel/include/nel/gui/view_bitmap.h +++ b/code/nel/include/nel/gui/view_bitmap.h @@ -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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/include/nel/gui/view_bitmap_combo.h b/code/nel/include/nel/gui/view_bitmap_combo.h index f8329303f..f1b2d506e 100644 --- a/code/nel/include/nel/gui/view_bitmap_combo.h +++ b/code/nel/include/nel/gui/view_bitmap_combo.h @@ -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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/include/nel/gui/view_link.h b/code/nel/include/nel/gui/view_link.h index 0fbca1065..2b65fd120 100644 --- a/code/nel/include/nel/gui/view_link.h +++ b/code/nel/include/nel/gui/view_link.h @@ -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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/include/nel/gui/view_pointer.h b/code/nel/include/nel/gui/view_pointer.h index 1cc7a4b0c..cb550e44a 100644 --- a/code/nel/include/nel/gui/view_pointer.h +++ b/code/nel/include/nel/gui/view_pointer.h @@ -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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/include/nel/gui/view_pointer_base.h b/code/nel/include/nel/gui/view_pointer_base.h index 5468ba6d5..3ae3ae4ad 100644 --- a/code/nel/include/nel/gui/view_pointer_base.h +++ b/code/nel/include/nel/gui/view_pointer_base.h @@ -1,6 +1,10 @@ // Ryzom - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) +// Copyright (C) 2014 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/include/nel/gui/view_polygon.h b/code/nel/include/nel/gui/view_polygon.h index f45bcf305..4cf9d3c08 100644 --- a/code/nel/include/nel/gui/view_polygon.h +++ b/code/nel/include/nel/gui/view_polygon.h @@ -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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/include/nel/gui/view_quad.h b/code/nel/include/nel/gui/view_quad.h index 5c9ea7485..a80befbe2 100644 --- a/code/nel/include/nel/gui/view_quad.h +++ b/code/nel/include/nel/gui/view_quad.h @@ -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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/include/nel/gui/view_renderer.h b/code/nel/include/nel/gui/view_renderer.h index 1b489802f..4194a59fa 100644 --- a/code/nel/include/nel/gui/view_renderer.h +++ b/code/nel/include/nel/gui/view_renderer.h @@ -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) 2013-2014 Laszlo KIS-ADAM (dfighter) +// // 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/include/nel/gui/view_text.h b/code/nel/include/nel/gui/view_text.h index fa5f74b84..57ab6a096 100644 --- a/code/nel/include/nel/gui/view_text.h +++ b/code/nel/include/nel/gui/view_text.h @@ -1,6 +1,10 @@ // Ryzom - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2013-2014 Laszlo KIS-ADAM (dfighter) +// Copyright (C) 2014 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/include/nel/gui/view_text_formated.h b/code/nel/include/nel/gui/view_text_formated.h index d2271599d..43a7eb9a8 100644 --- a/code/nel/include/nel/gui/view_text_formated.h +++ b/code/nel/include/nel/gui/view_text_formated.h @@ -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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/include/nel/gui/view_text_id.h b/code/nel/include/nel/gui/view_text_id.h index ac0477254..1e46de062 100644 --- a/code/nel/include/nel/gui/view_text_id.h +++ b/code/nel/include/nel/gui/view_text_id.h @@ -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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/include/nel/gui/view_text_id_formated.h b/code/nel/include/nel/gui/view_text_id_formated.h index 278c33338..cbc494dc1 100644 --- a/code/nel/include/nel/gui/view_text_id_formated.h +++ b/code/nel/include/nel/gui/view_text_id_formated.h @@ -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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/include/nel/gui/widget_manager.h b/code/nel/include/nel/gui/widget_manager.h index 518c5be16..773c3198b 100644 --- a/code/nel/include/nel/gui/widget_manager.h +++ b/code/nel/include/nel/gui/widget_manager.h @@ -1,6 +1,10 @@ // Ryzom - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2013 Jan BOON (Kaetemi) +// Copyright (C) 2013-2014 Laszlo KIS-ADAM (dfighter) +// // 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/include/nel/misc/app_context.h b/code/nel/include/nel/misc/app_context.h index 6afe62c79..1aa240f66 100644 --- a/code/nel/include/nel/misc/app_context.h +++ b/code/nel/include/nel/misc/app_context.h @@ -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) 2014-2015 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/include/nel/misc/bitmap.h b/code/nel/include/nel/misc/bitmap.h index 7e5994152..d726a4a94 100644 --- a/code/nel/include/nel/misc/bitmap.h +++ b/code/nel/include/nel/misc/bitmap.h @@ -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) 2016 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/include/nel/misc/cdb.h b/code/nel/include/nel/misc/cdb.h index 46fcc4849..a01c641c3 100644 --- a/code/nel/include/nel/misc/cdb.h +++ b/code/nel/include/nel/misc/cdb.h @@ -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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/include/nel/misc/cdb_bank_handler.h b/code/nel/include/nel/misc/cdb_bank_handler.h index 155c2abac..cd7abcd7b 100644 --- a/code/nel/include/nel/misc/cdb_bank_handler.h +++ b/code/nel/include/nel/misc/cdb_bank_handler.h @@ -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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/include/nel/misc/cdb_branch.h b/code/nel/include/nel/misc/cdb_branch.h index f8a979499..cacb35d69 100644 --- a/code/nel/include/nel/misc/cdb_branch.h +++ b/code/nel/include/nel/misc/cdb_branch.h @@ -1,6 +1,10 @@ // Ryzom - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2013 Jan BOON (Kaetemi) +// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/include/nel/misc/cdb_branch_observing_handler.h b/code/nel/include/nel/misc/cdb_branch_observing_handler.h index 69fb2bf9a..186fdf88a 100644 --- a/code/nel/include/nel/misc/cdb_branch_observing_handler.h +++ b/code/nel/include/nel/misc/cdb_branch_observing_handler.h @@ -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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/include/nel/misc/cdb_check_sum.h b/code/nel/include/nel/misc/cdb_check_sum.h index 126656ce3..8f5bbc462 100644 --- a/code/nel/include/nel/misc/cdb_check_sum.h +++ b/code/nel/include/nel/misc/cdb_check_sum.h @@ -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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/include/nel/misc/cdb_leaf.h b/code/nel/include/nel/misc/cdb_leaf.h index c80ec903a..dc734c434 100644 --- a/code/nel/include/nel/misc/cdb_leaf.h +++ b/code/nel/include/nel/misc/cdb_leaf.h @@ -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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/include/nel/misc/cdb_manager.h b/code/nel/include/nel/misc/cdb_manager.h index 3d8caa3a8..fba4eac22 100644 --- a/code/nel/include/nel/misc/cdb_manager.h +++ b/code/nel/include/nel/misc/cdb_manager.h @@ -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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/include/nel/misc/class_id.h b/code/nel/include/nel/misc/class_id.h index 5222bad49..d323e6aab 100644 --- a/code/nel/include/nel/misc/class_id.h +++ b/code/nel/include/nel/misc/class_id.h @@ -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/include/nel/misc/common.h b/code/nel/include/nel/misc/common.h index bf7276cd8..2b6f85f84 100644 --- a/code/nel/include/nel/misc/common.h +++ b/code/nel/include/nel/misc/common.h @@ -1,5 +1,10 @@ // NeL - MMORPG Framework -// Copyright (C) 2010 Winch Gate Property Limited +// Copyright (C) 2010-2018 Winch Gate Property Limited +// +// This source file has been modified by the following contributors: +// Copyright (C) 2010 Matt RAYKOWSKI (sfb) +// Copyright (C) 2010 Robert TIMM (rti) +// 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 diff --git a/code/nel/include/nel/misc/debug.h b/code/nel/include/nel/misc/debug.h index d01c85f1c..68f47af8a 100644 --- a/code/nel/include/nel/misc/debug.h +++ b/code/nel/include/nel/misc/debug.h @@ -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) 2015 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/include/nel/misc/dummy_window.h b/code/nel/include/nel/misc/dummy_window.h index 0993aebaa..a3b6876b6 100644 --- a/code/nel/include/nel/misc/dummy_window.h +++ b/code/nel/include/nel/misc/dummy_window.h @@ -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) 2015 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/include/nel/misc/entity_id.h b/code/nel/include/nel/misc/entity_id.h index 8999b170a..61bbe1ef4 100644 --- a/code/nel/include/nel/misc/entity_id.h +++ b/code/nel/include/nel/misc/entity_id.h @@ -1,6 +1,10 @@ // NeL - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2012 Robert TIMM (rti) +// Copyright (C) 2015-2016 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/include/nel/misc/event_emitter.h b/code/nel/include/nel/misc/event_emitter.h index eab005b82..74c0a24f5 100644 --- a/code/nel/include/nel/misc/event_emitter.h +++ b/code/nel/include/nel/misc/event_emitter.h @@ -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) 2010 Robert TIMM (rti) +// // 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/include/nel/misc/factory.h b/code/nel/include/nel/misc/factory.h index 82e2fa113..b1c22a668 100644 --- a/code/nel/include/nel/misc/factory.h +++ b/code/nel/include/nel/misc/factory.h @@ -1,5 +1,5 @@ // NeL - MMORPG Framework -// Copyright (C) 2010 Winch Gate Property Limited +// Copyright (C) 2010-2019 Winch Gate Property Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/nel/include/nel/misc/fast_floor.h b/code/nel/include/nel/misc/fast_floor.h index 6cb8e209c..ec6ec6f94 100644 --- a/code/nel/include/nel/misc/fast_floor.h +++ b/code/nel/include/nel/misc/fast_floor.h @@ -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) 2013 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/include/nel/misc/fixed_size_allocator.h b/code/nel/include/nel/misc/fixed_size_allocator.h index 643217f5d..e00809344 100644 --- a/code/nel/include/nel/misc/fixed_size_allocator.h +++ b/code/nel/include/nel/misc/fixed_size_allocator.h @@ -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) 2014 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/include/nel/misc/gtk_displayer.h b/code/nel/include/nel/misc/gtk_displayer.h index e2d35c83c..9a950c6f0 100644 --- a/code/nel/include/nel/misc/gtk_displayer.h +++ b/code/nel/include/nel/misc/gtk_displayer.h @@ -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) 2015 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/include/nel/misc/hierarchical_timer.h b/code/nel/include/nel/misc/hierarchical_timer.h index 1c1818c69..33ddd55b0 100644 --- a/code/nel/include/nel/misc/hierarchical_timer.h +++ b/code/nel/include/nel/misc/hierarchical_timer.h @@ -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) 2014 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/include/nel/misc/i18n.h b/code/nel/include/nel/misc/i18n.h index d50313357..e8b00385b 100644 --- a/code/nel/include/nel/misc/i18n.h +++ b/code/nel/include/nel/misc/i18n.h @@ -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) 2012 Laszlo KIS-ADAM (dfighter) +// // 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/include/nel/misc/i_streamed_package_provider.h b/code/nel/include/nel/misc/i_streamed_package_provider.h index da2618d85..e2af4e9a3 100644 --- a/code/nel/include/nel/misc/i_streamed_package_provider.h +++ b/code/nel/include/nel/misc/i_streamed_package_provider.h @@ -1,5 +1,5 @@ // NeL - MMORPG Framework -// Copyright (C) 2019 Jan BOON (jan.boon@kaetemi.be) +// 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 diff --git a/code/nel/include/nel/misc/inter_window_msg_queue.h b/code/nel/include/nel/misc/inter_window_msg_queue.h index 501105f61..bacd8d8e5 100644 --- a/code/nel/include/nel/misc/inter_window_msg_queue.h +++ b/code/nel/include/nel/misc/inter_window_msg_queue.h @@ -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) 2014-2015 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/include/nel/misc/matrix.h b/code/nel/include/nel/misc/matrix.h index 649d53324..83c65d36a 100644 --- a/code/nel/include/nel/misc/matrix.h +++ b/code/nel/include/nel/misc/matrix.h @@ -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) 2014 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/include/nel/misc/mem_stream.h b/code/nel/include/nel/misc/mem_stream.h index 4222e1672..ec1ea440d 100644 --- a/code/nel/include/nel/misc/mem_stream.h +++ b/code/nel/include/nel/misc/mem_stream.h @@ -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) 2016 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/include/nel/misc/mutex.h b/code/nel/include/nel/misc/mutex.h index ec9c89ceb..a37ec3dbf 100644 --- a/code/nel/include/nel/misc/mutex.h +++ b/code/nel/include/nel/misc/mutex.h @@ -1,6 +1,10 @@ // NeL - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2010 Jan BOON (Kaetemi) +// Copyright (C) 2011 Robert TIMM (rti) +// // 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/include/nel/misc/object_vector.h b/code/nel/include/nel/misc/object_vector.h index ea9be81e2..609071d1f 100644 --- a/code/nel/include/nel/misc/object_vector.h +++ b/code/nel/include/nel/misc/object_vector.h @@ -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) 2014 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/include/nel/misc/p_thread.h b/code/nel/include/nel/misc/p_thread.h index 01f476d7b..60de158b2 100644 --- a/code/nel/include/nel/misc/p_thread.h +++ b/code/nel/include/nel/misc/p_thread.h @@ -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) 2012 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/include/nel/misc/path.h b/code/nel/include/nel/misc/path.h index 5a9c417a2..74e24d715 100644 --- a/code/nel/include/nel/misc/path.h +++ b/code/nel/include/nel/misc/path.h @@ -1,6 +1,10 @@ // NeL - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2014-2015 Laszlo KIS-ADAM (dfighter) +// Copyright (C) 2014-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/include/nel/misc/report.h b/code/nel/include/nel/misc/report.h index 55a1c2dbf..18a1077a2 100644 --- a/code/nel/include/nel/misc/report.h +++ b/code/nel/include/nel/misc/report.h @@ -1,6 +1,10 @@ // NeL - MMORPG Framework // 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 Laszlo KIS-ADAM (dfighter) +// // 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/include/nel/misc/rgba.h b/code/nel/include/nel/misc/rgba.h index 81204aca9..9f6ea6607 100644 --- a/code/nel/include/nel/misc/rgba.h +++ b/code/nel/include/nel/misc/rgba.h @@ -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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/include/nel/misc/seven_zip.h b/code/nel/include/nel/misc/seven_zip.h index 469b24bb9..6eeec1738 100644 --- a/code/nel/include/nel/misc/seven_zip.h +++ b/code/nel/include/nel/misc/seven_zip.h @@ -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 diff --git a/code/nel/include/nel/misc/sha1.h b/code/nel/include/nel/misc/sha1.h index 33db14f75..87edba44c 100644 --- a/code/nel/include/nel/misc/sha1.h +++ b/code/nel/include/nel/misc/sha1.h @@ -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/include/nel/misc/sheet_id.h b/code/nel/include/nel/misc/sheet_id.h index 8db0470af..dc5a1385b 100644 --- a/code/nel/include/nel/misc/sheet_id.h +++ b/code/nel/include/nel/misc/sheet_id.h @@ -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) 2012 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/include/nel/misc/smart_ptr.h b/code/nel/include/nel/misc/smart_ptr.h index b0fc1c301..292120079 100644 --- a/code/nel/include/nel/misc/smart_ptr.h +++ b/code/nel/include/nel/misc/smart_ptr.h @@ -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) 2016 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/include/nel/misc/sstring.h b/code/nel/include/nel/misc/sstring.h index a8b231012..636b70e92 100644 --- a/code/nel/include/nel/misc/sstring.h +++ b/code/nel/include/nel/misc/sstring.h @@ -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) 2015 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/include/nel/misc/streamed_package.h b/code/nel/include/nel/misc/streamed_package.h index 9040598d6..82a138482 100644 --- a/code/nel/include/nel/misc/streamed_package.h +++ b/code/nel/include/nel/misc/streamed_package.h @@ -1,5 +1,5 @@ // NeL - MMORPG Framework -// Copyright (C) 2014 Jan BOON (jan.boon@kaetemi.be) +// Copyright (C) 2014-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 diff --git a/code/nel/include/nel/misc/streamed_package_manager.h b/code/nel/include/nel/misc/streamed_package_manager.h index 85d13db59..7dca60d52 100644 --- a/code/nel/include/nel/misc/streamed_package_manager.h +++ b/code/nel/include/nel/misc/streamed_package_manager.h @@ -1,5 +1,5 @@ // NeL - MMORPG Framework -// Copyright (C) 2014 Jan BOON (jan.boon@kaetemi.be) +// Copyright (C) 2014-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 diff --git a/code/nel/include/nel/misc/string_common.h b/code/nel/include/nel/misc/string_common.h index 7366a0693..bc506cf82 100644 --- a/code/nel/include/nel/misc/string_common.h +++ b/code/nel/include/nel/misc/string_common.h @@ -1,6 +1,10 @@ // NeL - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2012 Laszlo KIS-ADAM (dfighter) +// Copyright (C) 2016-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/include/nel/misc/system_utils.h b/code/nel/include/nel/misc/system_utils.h index c51a5ab99..426e38b73 100644 --- a/code/nel/include/nel/misc/system_utils.h +++ b/code/nel/include/nel/misc/system_utils.h @@ -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) 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 // published by the Free Software Foundation, either version 3 of the diff --git a/code/nel/include/nel/misc/thread.h b/code/nel/include/nel/misc/thread.h index e2dfcc3c7..73a507a2e 100644 --- a/code/nel/include/nel/misc/thread.h +++ b/code/nel/include/nel/misc/thread.h @@ -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) 2012 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/include/nel/misc/time_nl.h b/code/nel/include/nel/misc/time_nl.h index e7deaae24..fd3c21c21 100644 --- a/code/nel/include/nel/misc/time_nl.h +++ b/code/nel/include/nel/misc/time_nl.h @@ -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) 2012 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/include/nel/misc/types_nl.h b/code/nel/include/nel/misc/types_nl.h index f42f410e6..d5a566d89 100644 --- a/code/nel/include/nel/misc/types_nl.h +++ b/code/nel/include/nel/misc/types_nl.h @@ -1,5 +1,8 @@ // NeL - MMORPG Framework -// Copyright (C) 2010 Winch Gate Property Limited +// Copyright (C) 2010-2011 Winch Gate Property Limited +// +// This source file has been modified by the following contributors: +// Copyright (C) 2014-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 diff --git a/code/nel/include/nel/misc/ucstring.h b/code/nel/include/nel/misc/ucstring.h index 605a14a78..b3dc1294f 100644 --- a/code/nel/include/nel/misc/ucstring.h +++ b/code/nel/include/nel/misc/ucstring.h @@ -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) 2015 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/include/nel/misc/win_displayer.h b/code/nel/include/nel/misc/win_displayer.h index 7eca48351..2644ea818 100644 --- a/code/nel/include/nel/misc/win_displayer.h +++ b/code/nel/include/nel/misc/win_displayer.h @@ -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) 2014-2015 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/include/nel/misc/win_event_emitter.h b/code/nel/include/nel/misc/win_event_emitter.h index 1b361485f..d23d9d040 100644 --- a/code/nel/include/nel/misc/win_event_emitter.h +++ b/code/nel/include/nel/misc/win_event_emitter.h @@ -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) 2010 Robert TIMM (rti) +// // 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/include/nel/misc/win_thread.h b/code/nel/include/nel/misc/win_thread.h index 1ba122126..247607c0f 100644 --- a/code/nel/include/nel/misc/win_thread.h +++ b/code/nel/include/nel/misc/win_thread.h @@ -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) 2012 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/include/nel/misc/window_displayer.h b/code/nel/include/nel/misc/window_displayer.h index 4fc86c2b0..b0ad8fcf2 100644 --- a/code/nel/include/nel/misc/window_displayer.h +++ b/code/nel/include/nel/misc/window_displayer.h @@ -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) 2016 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/include/nel/misc/xml_auto_ptr.h b/code/nel/include/nel/misc/xml_auto_ptr.h index 83f6b1ad8..6ea8c8a97 100644 --- a/code/nel/include/nel/misc/xml_auto_ptr.h +++ b/code/nel/include/nel/misc/xml_auto_ptr.h @@ -1,6 +1,10 @@ // NeL - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) +// Copyright (C) 2015 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/include/nel/net/buf_sock.h b/code/nel/include/nel/net/buf_sock.h index 1a491d45d..c8f7a87c3 100644 --- a/code/nel/include/nel/net/buf_sock.h +++ b/code/nel/include/nel/net/buf_sock.h @@ -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) 2014 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/include/nel/net/service.h b/code/nel/include/nel/net/service.h index 5d99477ff..114732bdb 100644 --- a/code/nel/include/nel/net/service.h +++ b/code/nel/include/nel/net/service.h @@ -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/include/nel/pipeline/database_config.h b/code/nel/include/nel/pipeline/database_config.h index d2a9288b9..37374a3ee 100644 --- a/code/nel/include/nel/pipeline/database_config.h +++ b/code/nel/include/nel/pipeline/database_config.h @@ -1,6 +1,9 @@ // NeL - MMORPG Framework // Copyright (C) 2015 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2016 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/include/nel/pipeline/project_config.h b/code/nel/include/nel/pipeline/project_config.h index fd5ba3cdf..79605d84a 100644 --- a/code/nel/include/nel/pipeline/project_config.h +++ b/code/nel/include/nel/pipeline/project_config.h @@ -1,6 +1,9 @@ // NeL - MMORPG Framework // Copyright (C) 2015 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2016 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/include/nel/pipeline/tool_logger.h b/code/nel/include/nel/pipeline/tool_logger.h index 794ffcfe0..86667d5c8 100644 --- a/code/nel/include/nel/pipeline/tool_logger.h +++ b/code/nel/include/nel/pipeline/tool_logger.h @@ -9,7 +9,10 @@ */ // NeL - MMORPG Framework -// Copyright (C) 2012 Jan BOON (Kaetemi) +// Copyright (C) 2012-2016 Jan BOON (Kaetemi) +// +// This source file has been modified by the following contributors: +// Copyright (C) 2015 Winch Gate Property Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/nel/include/nel/sound/audio_decoder_mp3.h b/code/nel/include/nel/sound/audio_decoder_mp3.h index d9566608d..d67cf1eaa 100644 --- a/code/nel/include/nel/sound/audio_decoder_mp3.h +++ b/code/nel/include/nel/sound/audio_decoder_mp3.h @@ -1,6 +1,9 @@ // NeL - MMORPG Framework // Copyright (C) 2018 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/include/nel/sound/audio_mixer_user.h b/code/nel/include/nel/sound/audio_mixer_user.h index 03bd42ad8..d0f6f1d82 100644 --- a/code/nel/include/nel/sound/audio_mixer_user.h +++ b/code/nel/include/nel/sound/audio_mixer_user.h @@ -1,6 +1,10 @@ // NeL - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2010 Matt RAYKOWSKI (sfb) +// Copyright (C) 2012-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/include/nel/sound/background_sound.h b/code/nel/include/nel/sound/background_sound.h index 859035687..61c1347d8 100644 --- a/code/nel/include/nel/sound/background_sound.h +++ b/code/nel/include/nel/sound/background_sound.h @@ -1,6 +1,10 @@ // NeL - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2010 Matt RAYKOWSKI (sfb) +// 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/include/nel/sound/background_sound_manager.h b/code/nel/include/nel/sound/background_sound_manager.h index ad06f610f..b7bf317e3 100644 --- a/code/nel/include/nel/sound/background_sound_manager.h +++ b/code/nel/include/nel/sound/background_sound_manager.h @@ -1,6 +1,10 @@ // NeL - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2010 Matt RAYKOWSKI (sfb) +// 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/include/nel/sound/background_source.h b/code/nel/include/nel/sound/background_source.h index 7b89f4f03..bc4f38f5f 100644 --- a/code/nel/include/nel/sound/background_source.h +++ b/code/nel/include/nel/sound/background_source.h @@ -1,6 +1,10 @@ // NeL - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2010 Matt RAYKOWSKI (sfb) +// Copyright (C) 2012 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/include/nel/sound/clustered_sound.h b/code/nel/include/nel/sound/clustered_sound.h index e37762b20..e8de8e9ca 100644 --- a/code/nel/include/nel/sound/clustered_sound.h +++ b/code/nel/include/nel/sound/clustered_sound.h @@ -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) 2012-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/include/nel/sound/complex_sound.h b/code/nel/include/nel/sound/complex_sound.h index 24d889575..350b9ea55 100644 --- a/code/nel/include/nel/sound/complex_sound.h +++ b/code/nel/include/nel/sound/complex_sound.h @@ -1,6 +1,10 @@ // NeL - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2010 Matt RAYKOWSKI (sfb) +// 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/include/nel/sound/complex_source.h b/code/nel/include/nel/sound/complex_source.h index 6923a4b03..05cc33c9b 100644 --- a/code/nel/include/nel/sound/complex_source.h +++ b/code/nel/include/nel/sound/complex_source.h @@ -1,6 +1,10 @@ // NeL - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2010 Matt RAYKOWSKI (sfb) +// Copyright (C) 2012 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/include/nel/sound/context_sound.h b/code/nel/include/nel/sound/context_sound.h index c4ef50ee6..f387ec950 100644 --- a/code/nel/include/nel/sound/context_sound.h +++ b/code/nel/include/nel/sound/context_sound.h @@ -1,6 +1,10 @@ // NeL - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2010 Matt RAYKOWSKI (sfb) +// 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 // published by the Free Software Foundation, either version 3 of the diff --git a/code/nel/include/nel/sound/driver/buffer.h b/code/nel/include/nel/sound/driver/buffer.h index 8e6030949..6004488bf 100644 --- a/code/nel/include/nel/sound/driver/buffer.h +++ b/code/nel/include/nel/sound/driver/buffer.h @@ -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) 2012 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/include/nel/sound/driver/music_channel.h b/code/nel/include/nel/sound/driver/music_channel.h index 83968a32e..9083a7d33 100644 --- a/code/nel/include/nel/sound/driver/music_channel.h +++ b/code/nel/include/nel/sound/driver/music_channel.h @@ -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) 2012 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/include/nel/sound/driver/sound_driver.h b/code/nel/include/nel/sound/driver/sound_driver.h index e38126fff..1fba9c887 100644 --- a/code/nel/include/nel/sound/driver/sound_driver.h +++ b/code/nel/include/nel/sound/driver/sound_driver.h @@ -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) 2012 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/include/nel/sound/driver/source.h b/code/nel/include/nel/sound/driver/source.h index d2f4a5186..3b81fb709 100644 --- a/code/nel/include/nel/sound/driver/source.h +++ b/code/nel/include/nel/sound/driver/source.h @@ -12,6 +12,9 @@ // NeL - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2012 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/include/nel/sound/music_channel_fader.h b/code/nel/include/nel/sound/music_channel_fader.h index f1ad7b20b..6bb5677f9 100644 --- a/code/nel/include/nel/sound/music_channel_fader.h +++ b/code/nel/include/nel/sound/music_channel_fader.h @@ -7,7 +7,9 @@ */ // NeL - MMORPG Framework -// Copyright (C) 2008 Jan BOON (Kaetemi) +// Copyright (C) 2008-2012 Jan BOON (Kaetemi) +// +// This source file has been modified by the following contributors: // Copyright (C) 2010 Winch Gate Property Limited // // This program is free software: you can redistribute it and/or modify diff --git a/code/nel/include/nel/sound/music_sound.h b/code/nel/include/nel/sound/music_sound.h index 462a20a42..48175c71a 100644 --- a/code/nel/include/nel/sound/music_sound.h +++ b/code/nel/include/nel/sound/music_sound.h @@ -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) 2010 Matt RAYKOWSKI (sfb) +// // 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/include/nel/sound/music_source.h b/code/nel/include/nel/sound/music_source.h index c5ea6de43..19eb48512 100644 --- a/code/nel/include/nel/sound/music_source.h +++ b/code/nel/include/nel/sound/music_source.h @@ -1,6 +1,10 @@ // NeL - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2010 Matt RAYKOWSKI (sfb) +// Copyright (C) 2012 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/include/nel/sound/sample_bank.h b/code/nel/include/nel/sound/sample_bank.h index da57caba7..70edd6fe8 100644 --- a/code/nel/include/nel/sound/sample_bank.h +++ b/code/nel/include/nel/sound/sample_bank.h @@ -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) 2010 Matt RAYKOWSKI (sfb) +// // 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/include/nel/sound/sample_bank_manager.h b/code/nel/include/nel/sound/sample_bank_manager.h index d44bab809..dbbfebe90 100644 --- a/code/nel/include/nel/sound/sample_bank_manager.h +++ b/code/nel/include/nel/sound/sample_bank_manager.h @@ -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) 2010 Matt RAYKOWSKI (sfb) +// // 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/include/nel/sound/simple_sound.h b/code/nel/include/nel/sound/simple_sound.h index 44446a967..36b14e399 100644 --- a/code/nel/include/nel/sound/simple_sound.h +++ b/code/nel/include/nel/sound/simple_sound.h @@ -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) 2010 Matt RAYKOWSKI (sfb) +// // 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/include/nel/sound/simple_source.h b/code/nel/include/nel/sound/simple_source.h index ed0936e71..897d0152b 100644 --- a/code/nel/include/nel/sound/simple_source.h +++ b/code/nel/include/nel/sound/simple_source.h @@ -1,6 +1,10 @@ // NeL - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2010 Matt RAYKOWSKI (sfb) +// Copyright (C) 2012 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/include/nel/sound/sound.h b/code/nel/include/nel/sound/sound.h index f81f6a9b7..292336816 100644 --- a/code/nel/include/nel/sound/sound.h +++ b/code/nel/include/nel/sound/sound.h @@ -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) 2012-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/include/nel/sound/sound_anim_manager.h b/code/nel/include/nel/sound/sound_anim_manager.h index cb3d9be24..560dea13d 100644 --- a/code/nel/include/nel/sound/sound_anim_manager.h +++ b/code/nel/include/nel/sound/sound_anim_manager.h @@ -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) 2010 Matt RAYKOWSKI (sfb) +// // 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/include/nel/sound/sound_anim_marker.h b/code/nel/include/nel/sound/sound_anim_marker.h index 583febbfc..b09f56f74 100644 --- a/code/nel/include/nel/sound/sound_anim_marker.h +++ b/code/nel/include/nel/sound/sound_anim_marker.h @@ -1,6 +1,10 @@ // NeL - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2010 Matt RAYKOWSKI (sfb) +// 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/include/nel/sound/sound_animation.h b/code/nel/include/nel/sound/sound_animation.h index c5acf8599..2b53e59ee 100644 --- a/code/nel/include/nel/sound/sound_animation.h +++ b/code/nel/include/nel/sound/sound_animation.h @@ -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) 2010 Matt RAYKOWSKI (sfb) +// // 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/include/nel/sound/sound_bank.h b/code/nel/include/nel/sound/sound_bank.h index 7d3d7e446..9c616d787 100644 --- a/code/nel/include/nel/sound/sound_bank.h +++ b/code/nel/include/nel/sound/sound_bank.h @@ -1,6 +1,10 @@ // NeL - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2010 Matt RAYKOWSKI (sfb) +// 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/include/nel/sound/source_common.h b/code/nel/include/nel/sound/source_common.h index 96f11aabe..6cebfa22f 100644 --- a/code/nel/include/nel/sound/source_common.h +++ b/code/nel/include/nel/sound/source_common.h @@ -1,6 +1,10 @@ // NeL - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2010 Matt RAYKOWSKI (sfb) +// Copyright (C) 2012 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/include/nel/sound/stream_sound.h b/code/nel/include/nel/sound/stream_sound.h index fa0700549..7c52e0f4d 100644 --- a/code/nel/include/nel/sound/stream_sound.h +++ b/code/nel/include/nel/sound/stream_sound.h @@ -1,6 +1,10 @@ // NeL - MMORPG Framework // Copyright (C) 2010 Jan BOON (Kaetemi) // +// This source file has been modified by the following contributors: +// Copyright (C) 2010 Matt RAYKOWSKI (sfb) +// Copyright (C) 2010 Winch Gate Property Limited +// // 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/include/nel/sound/stream_source.h b/code/nel/include/nel/sound/stream_source.h index ac29f7ed8..46a549001 100644 --- a/code/nel/include/nel/sound/stream_source.h +++ b/code/nel/include/nel/sound/stream_source.h @@ -1,5 +1,8 @@ // NeL - MMORPG Framework -// Copyright (C) 2010 Jan BOON (Kaetemi) +// Copyright (C) 2010-2012 Jan BOON (Kaetemi) +// +// This source file has been modified by the following contributors: +// Copyright (C) 2010 Matt RAYKOWSKI (sfb) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/nel/include/nel/sound/u_audio_mixer.h b/code/nel/include/nel/sound/u_audio_mixer.h index a1fb2b3cc..311f69516 100644 --- a/code/nel/include/nel/sound/u_audio_mixer.h +++ b/code/nel/include/nel/sound/u_audio_mixer.h @@ -1,6 +1,10 @@ // NeL - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2010 Matt RAYKOWSKI (sfb) +// Copyright (C) 2012-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/include/nel/web/curl_certificates.h b/code/nel/include/nel/web/curl_certificates.h index b2b031a1a..bfb230f01 100644 --- a/code/nel/include/nel/web/curl_certificates.h +++ b/code/nel/include/nel/web/curl_certificates.h @@ -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 diff --git a/code/nel/include/nel/web/http_client_curl.h b/code/nel/include/nel/web/http_client_curl.h index ca005462c..77cf335ca 100644 --- a/code/nel/include/nel/web/http_client_curl.h +++ b/code/nel/include/nel/web/http_client_curl.h @@ -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 diff --git a/code/nel/include/nel/web/http_package_provider.h b/code/nel/include/nel/web/http_package_provider.h index e1d1bb8a4..380b5cfa2 100644 --- a/code/nel/include/nel/web/http_package_provider.h +++ b/code/nel/include/nel/web/http_package_provider.h @@ -1,5 +1,5 @@ // NeL - MMORPG Framework -// Copyright (C) 2019 Jan BOON (jan.boon@kaetemi.be) +// 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 diff --git a/code/nel/samples/3d/cluster_viewer/main.cpp b/code/nel/samples/3d/cluster_viewer/main.cpp index ef05d557e..201271fce 100644 --- a/code/nel/samples/3d/cluster_viewer/main.cpp +++ b/code/nel/samples/3d/cluster_viewer/main.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) 2014 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/samples/3d/font/main.cpp b/code/nel/samples/3d/font/main.cpp index bd1a91a09..5a656be49 100644 --- a/code/nel/samples/3d/font/main.cpp +++ b/code/nel/samples/3d/font/main.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) 2014 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/samples/3d/shape_viewer/main.cpp b/code/nel/samples/3d/shape_viewer/main.cpp index d1bd4825f..b4535c493 100644 --- a/code/nel/samples/3d/shape_viewer/main.cpp +++ b/code/nel/samples/3d/shape_viewer/main.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) 2014 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/samples/georges/main.cpp b/code/nel/samples/georges/main.cpp index bd7624689..cccd5a7fa 100644 --- a/code/nel/samples/georges/main.cpp +++ b/code/nel/samples/georges/main.cpp @@ -9,6 +9,9 @@ // NeL - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2014 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/samples/misc/debug/main.cpp b/code/nel/samples/misc/debug/main.cpp index 5850cb2b3..f5ddf6b6f 100644 --- a/code/nel/samples/misc/debug/main.cpp +++ b/code/nel/samples/misc/debug/main.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) 2015 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/samples/net/chat/kbhit.cpp b/code/nel/samples/net/chat/kbhit.cpp index 177fd1d29..fb56acb76 100644 --- a/code/nel/samples/net/chat/kbhit.cpp +++ b/code/nel/samples/net/chat/kbhit.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) 2014 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/samples/net/chat/server.cpp b/code/nel/samples/net/chat/server.cpp index 9b85b65e5..1372f75a1 100644 --- a/code/nel/samples/net/chat/server.cpp +++ b/code/nel/samples/net/chat/server.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) 2014 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/samples/net/class_transport/ai_service.cpp b/code/nel/samples/net/class_transport/ai_service.cpp index 371c8ff1b..cac680aef 100644 --- a/code/nel/samples/net/class_transport/ai_service.cpp +++ b/code/nel/samples/net/class_transport/ai_service.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) 2014 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/samples/net/class_transport/gd_service.cpp b/code/nel/samples/net/class_transport/gd_service.cpp index 7d6eff3e2..c2b0b2a58 100644 --- a/code/nel/samples/net/class_transport/gd_service.cpp +++ b/code/nel/samples/net/class_transport/gd_service.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) 2014 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/samples/net/login_system/frontend_service.cpp b/code/nel/samples/net/login_system/frontend_service.cpp index 351282a8a..46c0f2085 100644 --- a/code/nel/samples/net/login_system/frontend_service.cpp +++ b/code/nel/samples/net/login_system/frontend_service.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) 2014 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/samples/net/udp/bench_service.cpp b/code/nel/samples/net/udp/bench_service.cpp index 22f570260..d549b7908 100644 --- a/code/nel/samples/net/udp/bench_service.cpp +++ b/code/nel/samples/net/udp/bench_service.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) 2014-2016 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/samples/net/udp/receive_task.cpp b/code/nel/samples/net/udp/receive_task.cpp index 4ca68fd4e..43f7ba805 100644 --- a/code/nel/samples/net/udp/receive_task.cpp +++ b/code/nel/samples/net/udp/receive_task.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) 2014 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/samples/net/udp/simlag.cpp b/code/nel/samples/net/udp/simlag.cpp index c1839cfc9..f13b26e3a 100644 --- a/code/nel/samples/net/udp/simlag.cpp +++ b/code/nel/samples/net/udp/simlag.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) 2016 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/samples/sound/sound_sources/main.cpp b/code/nel/samples/sound/sound_sources/main.cpp index 006a5ad41..502d02dfb 100644 --- a/code/nel/samples/sound/sound_sources/main.cpp +++ b/code/nel/samples/sound/sound_sources/main.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) 2012-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/samples/sound/stream_file/stream_file.cpp b/code/nel/samples/sound/stream_file/stream_file.cpp index 605c01580..ce63cc690 100644 --- a/code/nel/samples/sound/stream_file/stream_file.cpp +++ b/code/nel/samples/sound/stream_file/stream_file.cpp @@ -1,5 +1,5 @@ // NeL - MMORPG Framework -// Copyright (C) 2012 Jan BOON (Kaetemi) +// Copyright (C) 2012-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 diff --git a/code/nel/samples/sound/stream_ogg_vorbis/stream_ogg_vorbis.cpp b/code/nel/samples/sound/stream_ogg_vorbis/stream_ogg_vorbis.cpp index a1d3b694e..a047f728c 100644 --- a/code/nel/samples/sound/stream_ogg_vorbis/stream_ogg_vorbis.cpp +++ b/code/nel/samples/sound/stream_ogg_vorbis/stream_ogg_vorbis.cpp @@ -1,5 +1,5 @@ // NeL - MMORPG Framework -// Copyright (C) 2012 Jan BOON (Kaetemi) +// Copyright (C) 2012-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 diff --git a/code/nel/src/3d/bloom_effect.cpp b/code/nel/src/3d/bloom_effect.cpp index 18a6ac303..8beec7d22 100644 --- a/code/nel/src/3d/bloom_effect.cpp +++ b/code/nel/src/3d/bloom_effect.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) 2013-2014 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/3d/computed_string.cpp b/code/nel/src/3d/computed_string.cpp index a8f7743b3..3d5bdff86 100644 --- a/code/nel/src/3d/computed_string.cpp +++ b/code/nel/src/3d/computed_string.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) 2013-2014 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/3d/driver.cpp b/code/nel/src/3d/driver.cpp index 36d783e78..32cd19a89 100644 --- a/code/nel/src/3d/driver.cpp +++ b/code/nel/src/3d/driver.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) 2013-2014 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/3d/driver/direct3d/driver_direct3d.cpp b/code/nel/src/3d/driver/direct3d/driver_direct3d.cpp index ce63ce2cd..691be14df 100644 --- a/code/nel/src/3d/driver/direct3d/driver_direct3d.cpp +++ b/code/nel/src/3d/driver/direct3d/driver_direct3d.cpp @@ -1,6 +1,11 @@ // NeL - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2010 Robert TIMM (rti) +// Copyright (C) 2013-2019 Jan BOON (Kaetemi) +// Copyright (C) 2014 Matthew LAGOE (Botanic) +// // 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/3d/driver/direct3d/driver_direct3d.h b/code/nel/src/3d/driver/direct3d/driver_direct3d.h index 8b17fa28b..8f8048368 100644 --- a/code/nel/src/3d/driver/direct3d/driver_direct3d.h +++ b/code/nel/src/3d/driver/direct3d/driver_direct3d.h @@ -1,6 +1,10 @@ // NeL - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2010 Robert TIMM (rti) +// Copyright (C) 2013-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/3d/driver/direct3d/driver_direct3d_index.cpp b/code/nel/src/3d/driver/direct3d/driver_direct3d_index.cpp index d7ee84303..b9dca0090 100644 --- a/code/nel/src/3d/driver/direct3d/driver_direct3d_index.cpp +++ b/code/nel/src/3d/driver/direct3d/driver_direct3d_index.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) 2014 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/3d/driver/direct3d/driver_direct3d_material.cpp b/code/nel/src/3d/driver/direct3d/driver_direct3d_material.cpp index e6622f61d..f902e9fb0 100644 --- a/code/nel/src/3d/driver/direct3d/driver_direct3d_material.cpp +++ b/code/nel/src/3d/driver/direct3d/driver_direct3d_material.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) 2013-2014 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/3d/driver/direct3d/driver_direct3d_shader.cpp b/code/nel/src/3d/driver/direct3d/driver_direct3d_shader.cpp index 3f11f8bce..35a59b9ba 100644 --- a/code/nel/src/3d/driver/direct3d/driver_direct3d_shader.cpp +++ b/code/nel/src/3d/driver/direct3d/driver_direct3d_shader.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) 2013 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/3d/driver/direct3d/driver_direct3d_texture.cpp b/code/nel/src/3d/driver/direct3d/driver_direct3d_texture.cpp index a10732c64..f45663f1b 100644 --- a/code/nel/src/3d/driver/direct3d/driver_direct3d_texture.cpp +++ b/code/nel/src/3d/driver/direct3d/driver_direct3d_texture.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) 2012-2014 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/3d/driver/direct3d/driver_direct3d_uniform.cpp b/code/nel/src/3d/driver/direct3d/driver_direct3d_uniform.cpp index a936d5b46..59f4ba2d9 100644 --- a/code/nel/src/3d/driver/direct3d/driver_direct3d_uniform.cpp +++ b/code/nel/src/3d/driver/direct3d/driver_direct3d_uniform.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) 2013 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/3d/driver/direct3d/driver_direct3d_vertex.cpp b/code/nel/src/3d/driver/direct3d/driver_direct3d_vertex.cpp index ba726fcc9..985f29b93 100644 --- a/code/nel/src/3d/driver/direct3d/driver_direct3d_vertex.cpp +++ b/code/nel/src/3d/driver/direct3d/driver_direct3d_vertex.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) 2014 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/3d/driver/direct3d/driver_direct3d_vertex_program.cpp b/code/nel/src/3d/driver/direct3d/driver_direct3d_vertex_program.cpp index 265468125..d785dcbc7 100644 --- a/code/nel/src/3d/driver/direct3d/driver_direct3d_vertex_program.cpp +++ b/code/nel/src/3d/driver/direct3d/driver_direct3d_vertex_program.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) 2013 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/3d/driver/opengl/driver_opengl.cpp b/code/nel/src/3d/driver/opengl/driver_opengl.cpp index 023997065..c5d7b1d05 100644 --- a/code/nel/src/3d/driver/opengl/driver_opengl.cpp +++ b/code/nel/src/3d/driver/opengl/driver_opengl.cpp @@ -1,6 +1,10 @@ // NeL - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2010 Robert TIMM (rti) +// Copyright (C) 2013-2014 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/3d/driver/opengl/driver_opengl.h b/code/nel/src/3d/driver/opengl/driver_opengl.h index a03077544..e6168d90a 100644 --- a/code/nel/src/3d/driver/opengl/driver_opengl.h +++ b/code/nel/src/3d/driver/opengl/driver_opengl.h @@ -1,6 +1,10 @@ // NeL - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2010 Robert TIMM (rti) +// Copyright (C) 2013-2014 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/3d/driver/opengl/driver_opengl_extension.cpp b/code/nel/src/3d/driver/opengl/driver_opengl_extension.cpp index d386dd85f..c81ab9e1e 100644 --- a/code/nel/src/3d/driver/opengl/driver_opengl_extension.cpp +++ b/code/nel/src/3d/driver/opengl/driver_opengl_extension.cpp @@ -1,6 +1,10 @@ // NeL - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2010 Robert TIMM (rti) +// Copyright (C) 2013-2014 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/3d/driver/opengl/driver_opengl_extension.h b/code/nel/src/3d/driver/opengl/driver_opengl_extension.h index 5338ff999..951fa99cb 100644 --- a/code/nel/src/3d/driver/opengl/driver_opengl_extension.h +++ b/code/nel/src/3d/driver/opengl/driver_opengl_extension.h @@ -1,6 +1,10 @@ // NeL - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2010 Robert TIMM (rti) +// Copyright (C) 2013-2014 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/3d/driver/opengl/driver_opengl_material.cpp b/code/nel/src/3d/driver/opengl/driver_opengl_material.cpp index e28521310..4dbe0226a 100644 --- a/code/nel/src/3d/driver/opengl/driver_opengl_material.cpp +++ b/code/nel/src/3d/driver/opengl/driver_opengl_material.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) 2013-2014 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/3d/driver/opengl/driver_opengl_states.h b/code/nel/src/3d/driver/opengl/driver_opengl_states.h index be5c1918f..e4b5eb518 100644 --- a/code/nel/src/3d/driver/opengl/driver_opengl_states.h +++ b/code/nel/src/3d/driver/opengl/driver_opengl_states.h @@ -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) 2010 Robert TIMM (rti) +// // 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/3d/driver/opengl/driver_opengl_texture.cpp b/code/nel/src/3d/driver/opengl/driver_opengl_texture.cpp index edd3943ef..e2a597884 100644 --- a/code/nel/src/3d/driver/opengl/driver_opengl_texture.cpp +++ b/code/nel/src/3d/driver/opengl/driver_opengl_texture.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) 2013-2014 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/3d/driver/opengl/driver_opengl_uniform.cpp b/code/nel/src/3d/driver/opengl/driver_opengl_uniform.cpp index bd945c1a1..57caeb374 100644 --- a/code/nel/src/3d/driver/opengl/driver_opengl_uniform.cpp +++ b/code/nel/src/3d/driver/opengl/driver_opengl_uniform.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) 2013 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/3d/driver/opengl/driver_opengl_vertex.cpp b/code/nel/src/3d/driver/opengl/driver_opengl_vertex.cpp index b3a3e5194..80c84ef98 100644 --- a/code/nel/src/3d/driver/opengl/driver_opengl_vertex.cpp +++ b/code/nel/src/3d/driver/opengl/driver_opengl_vertex.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) 2013-2014 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/3d/driver/opengl/driver_opengl_vertex_buffer_hard.cpp b/code/nel/src/3d/driver/opengl/driver_opengl_vertex_buffer_hard.cpp index b625af7f2..689c37ba5 100644 --- a/code/nel/src/3d/driver/opengl/driver_opengl_vertex_buffer_hard.cpp +++ b/code/nel/src/3d/driver/opengl/driver_opengl_vertex_buffer_hard.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) 2014 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/3d/driver/opengl/driver_opengl_vertex_program.cpp b/code/nel/src/3d/driver/opengl/driver_opengl_vertex_program.cpp index e9ac4814a..1d9a46761 100644 --- a/code/nel/src/3d/driver/opengl/driver_opengl_vertex_program.cpp +++ b/code/nel/src/3d/driver/opengl/driver_opengl_vertex_program.cpp @@ -1,6 +1,10 @@ // NeL - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2011 Robert TIMM (rti) +// Copyright (C) 2013 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/3d/driver/opengl/driver_opengl_window.cpp b/code/nel/src/3d/driver/opengl/driver_opengl_window.cpp index 6120ecd4c..de330117c 100644 --- a/code/nel/src/3d/driver/opengl/driver_opengl_window.cpp +++ b/code/nel/src/3d/driver/opengl/driver_opengl_window.cpp @@ -1,6 +1,11 @@ // NeL - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2010 Robert TIMM (rti) +// Copyright (C) 2014 Laszlo KIS-ADAM (dfighter) +// Copyright (C) 2014-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/3d/driver/opengl/mac/cocoa_application_delegate.h b/code/nel/src/3d/driver/opengl/mac/cocoa_application_delegate.h index 9577bda40..116c73f88 100644 --- a/code/nel/src/3d/driver/opengl/mac/cocoa_application_delegate.h +++ b/code/nel/src/3d/driver/opengl/mac/cocoa_application_delegate.h @@ -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) 2010 Robert TIMM (rti) +// // 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/3d/driver/opengl/mac/cocoa_event_emitter.cpp b/code/nel/src/3d/driver/opengl/mac/cocoa_event_emitter.cpp index f33667082..834331a3c 100644 --- a/code/nel/src/3d/driver/opengl/mac/cocoa_event_emitter.cpp +++ b/code/nel/src/3d/driver/opengl/mac/cocoa_event_emitter.cpp @@ -1,5 +1,9 @@ // NeL - MMORPG Framework -// Copyright (C) 2010 Winch Gate Property Limited +// Copyright (C) 2010-2011 Winch Gate Property Limited +// +// This source file has been modified by the following contributors: +// Copyright (C) 2010 Robert TIMM (rti) +// Copyright (C) 2011 Matt RAYKOWSKI (sfb) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/nel/src/3d/driver/opengl/mac/cocoa_event_emitter.h b/code/nel/src/3d/driver/opengl/mac/cocoa_event_emitter.h index 960614ef4..5d3728f3c 100644 --- a/code/nel/src/3d/driver/opengl/mac/cocoa_event_emitter.h +++ b/code/nel/src/3d/driver/opengl/mac/cocoa_event_emitter.h @@ -1,6 +1,10 @@ // NeL - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2010 Robert TIMM (rti) +// Copyright (C) 2014 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/3d/driver/opengl/mac/cocoa_opengl_view.h b/code/nel/src/3d/driver/opengl/mac/cocoa_opengl_view.h index e8acae926..f048b1d02 100644 --- a/code/nel/src/3d/driver/opengl/mac/cocoa_opengl_view.h +++ b/code/nel/src/3d/driver/opengl/mac/cocoa_opengl_view.h @@ -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) 2010 Robert TIMM (rti) +// // 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/3d/driver/opengl/mac/cocoa_window_delegate.h b/code/nel/src/3d/driver/opengl/mac/cocoa_window_delegate.h index 3f13a7345..9736e2a27 100644 --- a/code/nel/src/3d/driver/opengl/mac/cocoa_window_delegate.h +++ b/code/nel/src/3d/driver/opengl/mac/cocoa_window_delegate.h @@ -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) 2010 Robert TIMM (rti) +// // 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/3d/driver/opengl/stdopengl.h b/code/nel/src/3d/driver/opengl/stdopengl.h index 28ed25fc9..e58fdd608 100644 --- a/code/nel/src/3d/driver/opengl/stdopengl.h +++ b/code/nel/src/3d/driver/opengl/stdopengl.h @@ -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) 2014 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/3d/driver/opengl/unix_event_emitter.cpp b/code/nel/src/3d/driver/opengl/unix_event_emitter.cpp index a43a251a9..d4153dde5 100644 --- a/code/nel/src/3d/driver/opengl/unix_event_emitter.cpp +++ b/code/nel/src/3d/driver/opengl/unix_event_emitter.cpp @@ -1,6 +1,10 @@ // NeL - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2010 Robert TIMM (rti) +// Copyright (C) 2013-2014 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/3d/driver/opengl/unix_event_emitter.h b/code/nel/src/3d/driver/opengl/unix_event_emitter.h index 493c4ad35..bbee65e5e 100644 --- a/code/nel/src/3d/driver/opengl/unix_event_emitter.h +++ b/code/nel/src/3d/driver/opengl/unix_event_emitter.h @@ -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) 2010 Robert TIMM (rti) +// // 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/3d/driver_user.cpp b/code/nel/src/3d/driver_user.cpp index d1a747478..b44a64737 100644 --- a/code/nel/src/3d/driver_user.cpp +++ b/code/nel/src/3d/driver_user.cpp @@ -1,6 +1,12 @@ // NeL - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2010 Matt RAYKOWSKI (sfb) +// Copyright (C) 2010 Robert TIMM (rti) +// Copyright (C) 2013-2014 Jan BOON (Kaetemi) +// Copyright (C) 2015 Laszlo KIS-ADAM (dfighter) +// // 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/3d/driver_user2.cpp b/code/nel/src/3d/driver_user2.cpp index e24391a1c..3383832ad 100644 --- a/code/nel/src/3d/driver_user2.cpp +++ b/code/nel/src/3d/driver_user2.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) 2014 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/3d/dru.cpp b/code/nel/src/3d/dru.cpp index 54248c001..1749eda8e 100644 --- a/code/nel/src/3d/dru.cpp +++ b/code/nel/src/3d/dru.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) 2014-2016 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/3d/flare_model.cpp b/code/nel/src/3d/flare_model.cpp index f070bdcec..4ce32d406 100644 --- a/code/nel/src/3d/flare_model.cpp +++ b/code/nel/src/3d/flare_model.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) 2013 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/3d/font_generator.cpp b/code/nel/src/3d/font_generator.cpp index 0342f3d2a..44d8f5ab0 100644 --- a/code/nel/src/3d/font_generator.cpp +++ b/code/nel/src/3d/font_generator.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) 2015 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/3d/hls_texture_bank.cpp b/code/nel/src/3d/hls_texture_bank.cpp index d7e213cf4..b741ec387 100644 --- a/code/nel/src/3d/hls_texture_bank.cpp +++ b/code/nel/src/3d/hls_texture_bank.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) 2010 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/3d/init_3d.cpp b/code/nel/src/3d/init_3d.cpp index e34702b74..206406b10 100644 --- a/code/nel/src/3d/init_3d.cpp +++ b/code/nel/src/3d/init_3d.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) 2015 Laszlo KIS-ADAM (dfighter) +// // 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/3d/instance_lighter.cpp b/code/nel/src/3d/instance_lighter.cpp index 8e7c16294..87e0deb45 100644 --- a/code/nel/src/3d/instance_lighter.cpp +++ b/code/nel/src/3d/instance_lighter.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) 2014 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/3d/landscape.cpp b/code/nel/src/3d/landscape.cpp index 75e71920a..b02a36958 100644 --- a/code/nel/src/3d/landscape.cpp +++ b/code/nel/src/3d/landscape.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) 2013 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/3d/landscapevb_allocator.cpp b/code/nel/src/3d/landscapevb_allocator.cpp index 81a91fb12..762101cdb 100644 --- a/code/nel/src/3d/landscapevb_allocator.cpp +++ b/code/nel/src/3d/landscapevb_allocator.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) 2013 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/3d/mesh_mrm_skin.cpp b/code/nel/src/3d/mesh_mrm_skin.cpp index 7bba5d370..b8e772516 100644 --- a/code/nel/src/3d/mesh_mrm_skin.cpp +++ b/code/nel/src/3d/mesh_mrm_skin.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) 2014 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/3d/mesh_mrm_skin_template.cpp b/code/nel/src/3d/mesh_mrm_skin_template.cpp index 792b8c5dc..05fb52852 100644 --- a/code/nel/src/3d/mesh_mrm_skin_template.cpp +++ b/code/nel/src/3d/mesh_mrm_skin_template.cpp @@ -5,6 +5,9 @@ // NeL - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2014 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/3d/mesh_mrm_skinned.cpp b/code/nel/src/3d/mesh_mrm_skinned.cpp index a9d51a591..b7f0045ec 100644 --- a/code/nel/src/3d/mesh_mrm_skinned.cpp +++ b/code/nel/src/3d/mesh_mrm_skinned.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) 2011 Robert TIMM (rti) +// // 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/3d/mesh_multi_lod.cpp b/code/nel/src/3d/mesh_multi_lod.cpp index b3d51cc52..291c00225 100644 --- a/code/nel/src/3d/mesh_multi_lod.cpp +++ b/code/nel/src/3d/mesh_multi_lod.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) 2014 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/3d/meshvp_per_pixel_light.cpp b/code/nel/src/3d/meshvp_per_pixel_light.cpp index 3449d57d2..193a77e99 100644 --- a/code/nel/src/3d/meshvp_per_pixel_light.cpp +++ b/code/nel/src/3d/meshvp_per_pixel_light.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) 2013 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/3d/meshvp_wind_tree.cpp b/code/nel/src/3d/meshvp_wind_tree.cpp index 620465a0a..5e9fdfdcd 100644 --- a/code/nel/src/3d/meshvp_wind_tree.cpp +++ b/code/nel/src/3d/meshvp_wind_tree.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) 2013 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/3d/particle_system.cpp b/code/nel/src/3d/particle_system.cpp index 2c10f279b..4d7fba3c6 100644 --- a/code/nel/src/3d/particle_system.cpp +++ b/code/nel/src/3d/particle_system.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) 2014 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/3d/particle_system_shape.cpp b/code/nel/src/3d/particle_system_shape.cpp index 7da2e85f1..1f48fdd25 100644 --- a/code/nel/src/3d/particle_system_shape.cpp +++ b/code/nel/src/3d/particle_system_shape.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) 2012 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/3d/point_light.cpp b/code/nel/src/3d/point_light.cpp index ff0527689..f280f12db 100644 --- a/code/nel/src/3d/point_light.cpp +++ b/code/nel/src/3d/point_light.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) 2012 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/3d/ps_mesh.cpp b/code/nel/src/3d/ps_mesh.cpp index 6f21e2c25..34f964f7d 100644 --- a/code/nel/src/3d/ps_mesh.cpp +++ b/code/nel/src/3d/ps_mesh.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) 2011 Robert TIMM (rti) +// // 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/3d/ps_particle_basic.cpp b/code/nel/src/3d/ps_particle_basic.cpp index 110b5963b..4425e743b 100644 --- a/code/nel/src/3d/ps_particle_basic.cpp +++ b/code/nel/src/3d/ps_particle_basic.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) 2013 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/3d/ps_sound.cpp b/code/nel/src/3d/ps_sound.cpp index 1504cd212..c482b5aae 100644 --- a/code/nel/src/3d/ps_sound.cpp +++ b/code/nel/src/3d/ps_sound.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) 2012-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/3d/render_trav.cpp b/code/nel/src/3d/render_trav.cpp index cab2e3c00..0a071303f 100644 --- a/code/nel/src/3d/render_trav.cpp +++ b/code/nel/src/3d/render_trav.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) 2012-2014 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/3d/scene.cpp b/code/nel/src/3d/scene.cpp index 25d9695c0..7f1263ea1 100644 --- a/code/nel/src/3d/scene.cpp +++ b/code/nel/src/3d/scene.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) 2013-2014 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/3d/scene_group.cpp b/code/nel/src/3d/scene_group.cpp index 50e1f0171..dc5dd9f73 100644 --- a/code/nel/src/3d/scene_group.cpp +++ b/code/nel/src/3d/scene_group.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) 2014 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/3d/scene_user.cpp b/code/nel/src/3d/scene_user.cpp index c581c5c68..4eed212a4 100644 --- a/code/nel/src/3d/scene_user.cpp +++ b/code/nel/src/3d/scene_user.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) 2014 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/3d/shadow_map_manager.cpp b/code/nel/src/3d/shadow_map_manager.cpp index c592b5a07..a8400ce0b 100644 --- a/code/nel/src/3d/shadow_map_manager.cpp +++ b/code/nel/src/3d/shadow_map_manager.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) 2013 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/3d/text_context.cpp b/code/nel/src/3d/text_context.cpp index 235ea9fcb..1ccb920e4 100644 --- a/code/nel/src/3d/text_context.cpp +++ b/code/nel/src/3d/text_context.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) 2014 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/3d/text_context_user.cpp b/code/nel/src/3d/text_context_user.cpp index ae2cc2417..0430eae1a 100644 --- a/code/nel/src/3d/text_context_user.cpp +++ b/code/nel/src/3d/text_context_user.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) 2014 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/3d/texture_dlm.cpp b/code/nel/src/3d/texture_dlm.cpp index ab7168827..71ec5c2bb 100644 --- a/code/nel/src/3d/texture_dlm.cpp +++ b/code/nel/src/3d/texture_dlm.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) 2016 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/3d/tile_bank.cpp b/code/nel/src/3d/tile_bank.cpp index e2c488fe5..a22a797f4 100644 --- a/code/nel/src/3d/tile_bank.cpp +++ b/code/nel/src/3d/tile_bank.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) 2010 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/3d/vegetable_manager.cpp b/code/nel/src/3d/vegetable_manager.cpp index 8946bc67b..f27968479 100644 --- a/code/nel/src/3d/vegetable_manager.cpp +++ b/code/nel/src/3d/vegetable_manager.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) 2013 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/3d/vegetablevb_allocator.cpp b/code/nel/src/3d/vegetablevb_allocator.cpp index ff5dc293f..72f768038 100644 --- a/code/nel/src/3d/vegetablevb_allocator.cpp +++ b/code/nel/src/3d/vegetablevb_allocator.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) 2013 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/3d/vertex_buffer_heap.cpp b/code/nel/src/3d/vertex_buffer_heap.cpp index ad46d33d8..e6dd574b0 100644 --- a/code/nel/src/3d/vertex_buffer_heap.cpp +++ b/code/nel/src/3d/vertex_buffer_heap.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/3d/vertex_program.cpp b/code/nel/src/3d/vertex_program.cpp index dc717b825..e5c2c8c4c 100644 --- a/code/nel/src/3d/vertex_program.cpp +++ b/code/nel/src/3d/vertex_program.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) 2013 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/3d/vertex_program_parse.cpp b/code/nel/src/3d/vertex_program_parse.cpp index f4598659b..e8723c61f 100644 --- a/code/nel/src/3d/vertex_program_parse.cpp +++ b/code/nel/src/3d/vertex_program_parse.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) 2013 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/3d/visual_collision_mesh.cpp b/code/nel/src/3d/visual_collision_mesh.cpp index 8de722a2b..d3bd95b93 100644 --- a/code/nel/src/3d/visual_collision_mesh.cpp +++ b/code/nel/src/3d/visual_collision_mesh.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) 2012 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/3d/water_env_map.cpp b/code/nel/src/3d/water_env_map.cpp index 9592f2948..cb41c8d25 100644 --- a/code/nel/src/3d/water_env_map.cpp +++ b/code/nel/src/3d/water_env_map.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) 2013 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/3d/water_model.cpp b/code/nel/src/3d/water_model.cpp index d65ad582d..7c1cc6c45 100644 --- a/code/nel/src/3d/water_model.cpp +++ b/code/nel/src/3d/water_model.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) 2013 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/3d/water_shape.cpp b/code/nel/src/3d/water_shape.cpp index 6df5acb4c..32eb21eeb 100644 --- a/code/nel/src/3d/water_shape.cpp +++ b/code/nel/src/3d/water_shape.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) 2013 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/3d/zone_lighter.cpp b/code/nel/src/3d/zone_lighter.cpp index 4e8b32430..b17ab5f2d 100644 --- a/code/nel/src/3d/zone_lighter.cpp +++ b/code/nel/src/3d/zone_lighter.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) 2013-2014 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/georges/form.cpp b/code/nel/src/georges/form.cpp index a02b9e8cd..7fb51402e 100644 --- a/code/nel/src/georges/form.cpp +++ b/code/nel/src/georges/form.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) 2014 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/georges/form_dfn.cpp b/code/nel/src/georges/form_dfn.cpp index 629c17f86..d9c52c1b4 100644 --- a/code/nel/src/georges/form_dfn.cpp +++ b/code/nel/src/georges/form_dfn.cpp @@ -1,6 +1,10 @@ // NeL - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2014 Jan BOON (Kaetemi) +// Copyright (C) 2014 Laszlo KIS-ADAM (dfighter) +// // 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/georges/form_elm.cpp b/code/nel/src/georges/form_elm.cpp index 48368cc38..af87a2e0a 100644 --- a/code/nel/src/georges/form_elm.cpp +++ b/code/nel/src/georges/form_elm.cpp @@ -1,6 +1,10 @@ // NeL - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2014 Jan BOON (Kaetemi) +// Copyright (C) 2014 Laszlo KIS-ADAM (dfighter) +// // 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/georges/header.cpp b/code/nel/src/georges/header.cpp index 40617e6d5..62ba0e888 100644 --- a/code/nel/src/georges/header.cpp +++ b/code/nel/src/georges/header.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) 2014 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/georges/type.cpp b/code/nel/src/georges/type.cpp index 0dd2b9457..e8b2a8b5b 100644 --- a/code/nel/src/georges/type.cpp +++ b/code/nel/src/georges/type.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) 2014 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/gui/action_handler.cpp b/code/nel/src/gui/action_handler.cpp index e4809c00f..2b8bf890b 100644 --- a/code/nel/src/gui/action_handler.cpp +++ b/code/nel/src/gui/action_handler.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) 2013-2014 Laszlo KIS-ADAM (dfighter) +// // 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/gui/ctrl_base.cpp b/code/nel/src/gui/ctrl_base.cpp index cffa9590e..2d67ccc30 100644 --- a/code/nel/src/gui/ctrl_base.cpp +++ b/code/nel/src/gui/ctrl_base.cpp @@ -1,5 +1,8 @@ // Ryzom - MMORPG Framework -// Copyright (C) 2010 Winch Gate Property Limited +// Copyright (C) 2010-2019 Winch Gate Property Limited +// +// This source file has been modified by the following contributors: +// Copyright (C) 2013-2014 Laszlo KIS-ADAM (dfighter) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/nel/src/gui/ctrl_base_button.cpp b/code/nel/src/gui/ctrl_base_button.cpp index 91fe0b744..dec715048 100644 --- a/code/nel/src/gui/ctrl_base_button.cpp +++ b/code/nel/src/gui/ctrl_base_button.cpp @@ -1,5 +1,8 @@ // Ryzom - MMORPG Framework -// Copyright (C) 2010 Winch Gate Property Limited +// Copyright (C) 2010-2018 Winch Gate Property Limited +// +// This source file has been modified by the following contributors: +// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/nel/src/gui/ctrl_button.cpp b/code/nel/src/gui/ctrl_button.cpp index 457010859..e27d8cfbd 100644 --- a/code/nel/src/gui/ctrl_button.cpp +++ b/code/nel/src/gui/ctrl_button.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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/gui/ctrl_col_pick.cpp b/code/nel/src/gui/ctrl_col_pick.cpp index 4079388c2..411414de7 100644 --- a/code/nel/src/gui/ctrl_col_pick.cpp +++ b/code/nel/src/gui/ctrl_col_pick.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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/gui/ctrl_draggable.cpp b/code/nel/src/gui/ctrl_draggable.cpp index 781585083..a9fc92e9e 100644 --- a/code/nel/src/gui/ctrl_draggable.cpp +++ b/code/nel/src/gui/ctrl_draggable.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) 2012-2013 Laszlo KIS-ADAM (dfighter) +// // 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/gui/ctrl_polygon.cpp b/code/nel/src/gui/ctrl_polygon.cpp index c7ce984d2..2adf96f52 100644 --- a/code/nel/src/gui/ctrl_polygon.cpp +++ b/code/nel/src/gui/ctrl_polygon.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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/gui/ctrl_quad.cpp b/code/nel/src/gui/ctrl_quad.cpp index 22f4d4ae6..135c1c846 100644 --- a/code/nel/src/gui/ctrl_quad.cpp +++ b/code/nel/src/gui/ctrl_quad.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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/gui/ctrl_scroll.cpp b/code/nel/src/gui/ctrl_scroll.cpp index e97bd8cd4..124655264 100644 --- a/code/nel/src/gui/ctrl_scroll.cpp +++ b/code/nel/src/gui/ctrl_scroll.cpp @@ -1,6 +1,10 @@ // Ryzom - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) +// Copyright (C) 2015 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/gui/ctrl_scroll_base.cpp b/code/nel/src/gui/ctrl_scroll_base.cpp index 2813b997a..34760bf9e 100644 --- a/code/nel/src/gui/ctrl_scroll_base.cpp +++ b/code/nel/src/gui/ctrl_scroll_base.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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/gui/ctrl_sheet_selection.cpp b/code/nel/src/gui/ctrl_sheet_selection.cpp index d0202547f..3885786b8 100644 --- a/code/nel/src/gui/ctrl_sheet_selection.cpp +++ b/code/nel/src/gui/ctrl_sheet_selection.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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/gui/ctrl_text_button.cpp b/code/nel/src/gui/ctrl_text_button.cpp index d10dfa0c9..de01174ed 100644 --- a/code/nel/src/gui/ctrl_text_button.cpp +++ b/code/nel/src/gui/ctrl_text_button.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) 2013-2014 Laszlo KIS-ADAM (dfighter) +// // 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/gui/ctrl_tooltip.cpp b/code/nel/src/gui/ctrl_tooltip.cpp index da42084ac..479c09149 100644 --- a/code/nel/src/gui/ctrl_tooltip.cpp +++ b/code/nel/src/gui/ctrl_tooltip.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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/gui/db_manager.cpp b/code/nel/src/gui/db_manager.cpp index 7896cbde3..aa127abbe 100644 --- a/code/nel/src/gui/db_manager.cpp +++ b/code/nel/src/gui/db_manager.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) 2012-2013 Laszlo KIS-ADAM (dfighter) +// // 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/gui/dbgroup_combo_box.cpp b/code/nel/src/gui/dbgroup_combo_box.cpp index 5893c0b72..834d2d5bf 100644 --- a/code/nel/src/gui/dbgroup_combo_box.cpp +++ b/code/nel/src/gui/dbgroup_combo_box.cpp @@ -1,6 +1,10 @@ // Ryzom - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) +// Copyright (C) 2013-2015 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/gui/dbgroup_select_number.cpp b/code/nel/src/gui/dbgroup_select_number.cpp index 22afa4d0e..4d07cf191 100644 --- a/code/nel/src/gui/dbgroup_select_number.cpp +++ b/code/nel/src/gui/dbgroup_select_number.cpp @@ -1,6 +1,10 @@ // Ryzom - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2013 Jan BOON (Kaetemi) +// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/gui/dbview_bar.cpp b/code/nel/src/gui/dbview_bar.cpp index e2256444f..7f360c158 100644 --- a/code/nel/src/gui/dbview_bar.cpp +++ b/code/nel/src/gui/dbview_bar.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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/gui/dbview_bar3.cpp b/code/nel/src/gui/dbview_bar3.cpp index 187a52f99..39fdb1e67 100644 --- a/code/nel/src/gui/dbview_bar3.cpp +++ b/code/nel/src/gui/dbview_bar3.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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/gui/dbview_digit.cpp b/code/nel/src/gui/dbview_digit.cpp index 81063d519..662764895 100644 --- a/code/nel/src/gui/dbview_digit.cpp +++ b/code/nel/src/gui/dbview_digit.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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/gui/dbview_number.cpp b/code/nel/src/gui/dbview_number.cpp index 36f5523f2..af768140c 100644 --- a/code/nel/src/gui/dbview_number.cpp +++ b/code/nel/src/gui/dbview_number.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) 2013-2014 Laszlo KIS-ADAM (dfighter) +// // 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/gui/dbview_quantity.cpp b/code/nel/src/gui/dbview_quantity.cpp index 4685fc23d..cac772c96 100644 --- a/code/nel/src/gui/dbview_quantity.cpp +++ b/code/nel/src/gui/dbview_quantity.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) 2013-2014 Laszlo KIS-ADAM (dfighter) +// // 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/gui/event_descriptor.cpp b/code/nel/src/gui/event_descriptor.cpp index 356e75aec..160b02730 100644 --- a/code/nel/src/gui/event_descriptor.cpp +++ b/code/nel/src/gui/event_descriptor.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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/gui/event_listener.cpp b/code/nel/src/gui/event_listener.cpp index b1e53c374..65997116a 100644 --- a/code/nel/src/gui/event_listener.cpp +++ b/code/nel/src/gui/event_listener.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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/gui/group_container.cpp b/code/nel/src/gui/group_container.cpp index 0f35e6486..b642a50b5 100644 --- a/code/nel/src/gui/group_container.cpp +++ b/code/nel/src/gui/group_container.cpp @@ -1,5 +1,9 @@ // Ryzom - MMORPG Framework -// Copyright (C) 2010 Winch Gate Property Limited +// Copyright (C) 2010-2018 Winch Gate Property Limited +// +// This source file has been modified by the following contributors: +// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) +// Copyright (C) 2014 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 diff --git a/code/nel/src/gui/group_container_base.cpp b/code/nel/src/gui/group_container_base.cpp index c031cec7e..93bdea33b 100644 --- a/code/nel/src/gui/group_container_base.cpp +++ b/code/nel/src/gui/group_container_base.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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/gui/group_editbox.cpp b/code/nel/src/gui/group_editbox.cpp index 1a800b23a..136909f63 100644 --- a/code/nel/src/gui/group_editbox.cpp +++ b/code/nel/src/gui/group_editbox.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) 2013-2014 Laszlo KIS-ADAM (dfighter) +// // 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/gui/group_editbox_base.cpp b/code/nel/src/gui/group_editbox_base.cpp index d3c001c34..578c004c2 100644 --- a/code/nel/src/gui/group_editbox_base.cpp +++ b/code/nel/src/gui/group_editbox_base.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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/gui/group_editbox_decor.cpp b/code/nel/src/gui/group_editbox_decor.cpp index 6d1e500ae..a44007af1 100644 --- a/code/nel/src/gui/group_editbox_decor.cpp +++ b/code/nel/src/gui/group_editbox_decor.cpp @@ -1,5 +1,7 @@ // Ryzom - MMORPG Framework -// Copyright (C) 2014 Laszlo Kis-Adam +// Copyright (C) 2014 Laszlo KIS-ADAM (dfighter) +// +// This source file has been modified by the following contributors: // Copyright (C) 2010 Winch Gate Property Limited // // This program is free software: you can redistribute it and/or modify diff --git a/code/nel/src/gui/group_frame.cpp b/code/nel/src/gui/group_frame.cpp index 747ca454e..dcb159028 100644 --- a/code/nel/src/gui/group_frame.cpp +++ b/code/nel/src/gui/group_frame.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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/gui/group_header.cpp b/code/nel/src/gui/group_header.cpp index dbc990447..f9d3eae86 100644 --- a/code/nel/src/gui/group_header.cpp +++ b/code/nel/src/gui/group_header.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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/gui/group_html.cpp b/code/nel/src/gui/group_html.cpp index 8179a6af0..2500af967 100644 --- a/code/nel/src/gui/group_html.cpp +++ b/code/nel/src/gui/group_html.cpp @@ -1,5 +1,9 @@ // Ryzom - MMORPG Framework -// Copyright (C) 2010 Winch Gate Property Limited +// Copyright (C) 2010-2019 Winch Gate Property Limited +// +// This source file has been modified by the following contributors: +// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) +// 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 diff --git a/code/nel/src/gui/group_list.cpp b/code/nel/src/gui/group_list.cpp index 624c68d75..b49eed7cc 100644 --- a/code/nel/src/gui/group_list.cpp +++ b/code/nel/src/gui/group_list.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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/gui/group_menu.cpp b/code/nel/src/gui/group_menu.cpp index c7db05e4f..3fc8d0bbb 100644 --- a/code/nel/src/gui/group_menu.cpp +++ b/code/nel/src/gui/group_menu.cpp @@ -1,5 +1,9 @@ // Ryzom - MMORPG Framework -// Copyright (C) 2010 Winch Gate Property Limited +// Copyright (C) 2010-2019 Winch Gate Property Limited +// +// This source file has been modified by the following contributors: +// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) +// Copyright (C) 2014-2015 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 diff --git a/code/nel/src/gui/group_modal.cpp b/code/nel/src/gui/group_modal.cpp index 95ca783eb..afc0388a5 100644 --- a/code/nel/src/gui/group_modal.cpp +++ b/code/nel/src/gui/group_modal.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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/gui/group_paragraph.cpp b/code/nel/src/gui/group_paragraph.cpp index 63ebc967d..9424c0218 100644 --- a/code/nel/src/gui/group_paragraph.cpp +++ b/code/nel/src/gui/group_paragraph.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) 2013-2014 Laszlo KIS-ADAM (dfighter) +// // 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/gui/group_scrolltext.cpp b/code/nel/src/gui/group_scrolltext.cpp index aff59e5c2..c456a4dd4 100644 --- a/code/nel/src/gui/group_scrolltext.cpp +++ b/code/nel/src/gui/group_scrolltext.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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/gui/group_submenu_base.cpp b/code/nel/src/gui/group_submenu_base.cpp index 8b26a7d85..ec7945e3c 100644 --- a/code/nel/src/gui/group_submenu_base.cpp +++ b/code/nel/src/gui/group_submenu_base.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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/gui/group_tab.cpp b/code/nel/src/gui/group_tab.cpp index d79efdad3..24d8b1506 100644 --- a/code/nel/src/gui/group_tab.cpp +++ b/code/nel/src/gui/group_tab.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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/gui/group_table.cpp b/code/nel/src/gui/group_table.cpp index df599ce4d..4411be1dd 100644 --- a/code/nel/src/gui/group_table.cpp +++ b/code/nel/src/gui/group_table.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) 2013-2014 Laszlo KIS-ADAM (dfighter) +// // 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/gui/group_tree.cpp b/code/nel/src/gui/group_tree.cpp index e1fa8292a..83c080b5e 100644 --- a/code/nel/src/gui/group_tree.cpp +++ b/code/nel/src/gui/group_tree.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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/gui/group_wheel.cpp b/code/nel/src/gui/group_wheel.cpp index a8d57c089..3c191053e 100644 --- a/code/nel/src/gui/group_wheel.cpp +++ b/code/nel/src/gui/group_wheel.cpp @@ -1,6 +1,10 @@ // Ryzom - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) +// Copyright (C) 2014 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/gui/http_hsts.cpp b/code/nel/src/gui/http_hsts.cpp index c57bb738c..d473f1786 100644 --- a/code/nel/src/gui/http_hsts.cpp +++ b/code/nel/src/gui/http_hsts.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) 2018 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/gui/input_handler.cpp b/code/nel/src/gui/input_handler.cpp index 9e4864caa..f00caf64d 100644 --- a/code/nel/src/gui/input_handler.cpp +++ b/code/nel/src/gui/input_handler.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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/gui/interface_anim.cpp b/code/nel/src/gui/interface_anim.cpp index 2fb190e85..0541b7676 100644 --- a/code/nel/src/gui/interface_anim.cpp +++ b/code/nel/src/gui/interface_anim.cpp @@ -1,6 +1,10 @@ // Ryzom - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) +// Copyright (C) 2015 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/gui/interface_element.cpp b/code/nel/src/gui/interface_element.cpp index d3ed2d01c..cf5646077 100644 --- a/code/nel/src/gui/interface_element.cpp +++ b/code/nel/src/gui/interface_element.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) 2013-2014 Laszlo KIS-ADAM (dfighter) +// // 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/gui/interface_expr.cpp b/code/nel/src/gui/interface_expr.cpp index 77d48906e..813962526 100644 --- a/code/nel/src/gui/interface_expr.cpp +++ b/code/nel/src/gui/interface_expr.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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/gui/interface_expr_node.cpp b/code/nel/src/gui/interface_expr_node.cpp index 2a32c09db..802414f25 100644 --- a/code/nel/src/gui/interface_expr_node.cpp +++ b/code/nel/src/gui/interface_expr_node.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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/gui/interface_expr_user_fct.cpp b/code/nel/src/gui/interface_expr_user_fct.cpp index a2467809d..2b77b143e 100644 --- a/code/nel/src/gui/interface_expr_user_fct.cpp +++ b/code/nel/src/gui/interface_expr_user_fct.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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/gui/interface_factory.cpp b/code/nel/src/gui/interface_factory.cpp index 7f0fe76ee..a0682ecdc 100644 --- a/code/nel/src/gui/interface_factory.cpp +++ b/code/nel/src/gui/interface_factory.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) 2014 Laszlo KIS-ADAM (dfighter) +// // 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/gui/interface_group.cpp b/code/nel/src/gui/interface_group.cpp index 07b840695..2b899aca1 100644 --- a/code/nel/src/gui/interface_group.cpp +++ b/code/nel/src/gui/interface_group.cpp @@ -1,6 +1,10 @@ // Ryzom - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2013 Jan BOON (Kaetemi) +// Copyright (C) 2013-2014 Laszlo KIS-ADAM (dfighter) +// // 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/gui/interface_link.cpp b/code/nel/src/gui/interface_link.cpp index 4266797f4..7ae26be5b 100644 --- a/code/nel/src/gui/interface_link.cpp +++ b/code/nel/src/gui/interface_link.cpp @@ -1,6 +1,10 @@ // Ryzom - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2013 Jan BOON (Kaetemi) +// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/gui/interface_options.cpp b/code/nel/src/gui/interface_options.cpp index 9a71e3709..1854cc638 100644 --- a/code/nel/src/gui/interface_options.cpp +++ b/code/nel/src/gui/interface_options.cpp @@ -1,6 +1,10 @@ // Ryzom - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) +// Copyright (C) 2014 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/gui/interface_parser.cpp b/code/nel/src/gui/interface_parser.cpp index 63eb165e3..204b28295 100644 --- a/code/nel/src/gui/interface_parser.cpp +++ b/code/nel/src/gui/interface_parser.cpp @@ -1,6 +1,10 @@ // Ryzom - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2013-2014 Laszlo KIS-ADAM (dfighter) +// Copyright (C) 2013-2015 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/gui/interface_property.cpp b/code/nel/src/gui/interface_property.cpp index 5b11c9b74..c3208c9d0 100644 --- a/code/nel/src/gui/interface_property.cpp +++ b/code/nel/src/gui/interface_property.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) 2012-2013 Laszlo KIS-ADAM (dfighter) +// // 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/gui/libwww.cpp b/code/nel/src/gui/libwww.cpp index 56e7f0c71..f54a13a83 100644 --- a/code/nel/src/gui/libwww.cpp +++ b/code/nel/src/gui/libwww.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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/gui/link_hack.cpp b/code/nel/src/gui/link_hack.cpp index 9ae97910d..ba784736f 100644 --- a/code/nel/src/gui/link_hack.cpp +++ b/code/nel/src/gui/link_hack.cpp @@ -1,6 +1,10 @@ // Ryzom - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2012-2014 Laszlo KIS-ADAM (dfighter) +// Copyright (C) 2013-2014 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/gui/lua_helper.cpp b/code/nel/src/gui/lua_helper.cpp index 4e776e0b9..d2b6a68d3 100644 --- a/code/nel/src/gui/lua_helper.cpp +++ b/code/nel/src/gui/lua_helper.cpp @@ -1,6 +1,10 @@ // Ryzom - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2013 Jan BOON (Kaetemi) +// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/gui/lua_ihm.cpp b/code/nel/src/gui/lua_ihm.cpp index 3a5134c05..1438150cf 100644 --- a/code/nel/src/gui/lua_ihm.cpp +++ b/code/nel/src/gui/lua_ihm.cpp @@ -1,5 +1,9 @@ // Ryzom - MMORPG Framework -// Copyright (C) 2010 Winch Gate Property Limited +// Copyright (C) 2010-2019 Winch Gate Property Limited +// +// This source file has been modified by the following contributors: +// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) +// 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 diff --git a/code/nel/src/gui/lua_manager.cpp b/code/nel/src/gui/lua_manager.cpp index d3f5dd81e..31f2a4450 100644 --- a/code/nel/src/gui/lua_manager.cpp +++ b/code/nel/src/gui/lua_manager.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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/gui/lua_object.cpp b/code/nel/src/gui/lua_object.cpp index 805e38ceb..608bb0053 100644 --- a/code/nel/src/gui/lua_object.cpp +++ b/code/nel/src/gui/lua_object.cpp @@ -1,6 +1,10 @@ // Ryzom - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) +// Copyright (C) 2013-2014 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/gui/parser.cpp b/code/nel/src/gui/parser.cpp index 0d521b726..109cf2f13 100644 --- a/code/nel/src/gui/parser.cpp +++ b/code/nel/src/gui/parser.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) 2012-2013 Laszlo KIS-ADAM (dfighter) +// // 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/gui/proc.cpp b/code/nel/src/gui/proc.cpp index 2974a861e..4ecb41878 100644 --- a/code/nel/src/gui/proc.cpp +++ b/code/nel/src/gui/proc.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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/gui/reflect.cpp b/code/nel/src/gui/reflect.cpp index 7ef321b6e..994df9c3a 100644 --- a/code/nel/src/gui/reflect.cpp +++ b/code/nel/src/gui/reflect.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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/gui/reflect_register.cpp b/code/nel/src/gui/reflect_register.cpp index 86abc0cd5..621bf70ba 100644 --- a/code/nel/src/gui/reflect_register.cpp +++ b/code/nel/src/gui/reflect_register.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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/gui/root_group.cpp b/code/nel/src/gui/root_group.cpp index 756fb1096..e7e358338 100644 --- a/code/nel/src/gui/root_group.cpp +++ b/code/nel/src/gui/root_group.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) 2014 Laszlo KIS-ADAM (dfighter) +// // 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/gui/stdpch.h b/code/nel/src/gui/stdpch.h index a4ba0ecac..9a2586a2b 100644 --- a/code/nel/src/gui/stdpch.h +++ b/code/nel/src/gui/stdpch.h @@ -1,6 +1,10 @@ // Ryzom - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2014 Jan BOON (Kaetemi) +// Copyright (C) 2014 Laszlo KIS-ADAM (dfighter) +// // 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/gui/string_case.cpp b/code/nel/src/gui/string_case.cpp index 06936b393..c96e2cc7f 100644 --- a/code/nel/src/gui/string_case.cpp +++ b/code/nel/src/gui/string_case.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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/gui/view_base.cpp b/code/nel/src/gui/view_base.cpp index 6b0201858..c4270fc7b 100644 --- a/code/nel/src/gui/view_base.cpp +++ b/code/nel/src/gui/view_base.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) 2013-2014 Laszlo KIS-ADAM (dfighter) +// // 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/gui/view_bitmap.cpp b/code/nel/src/gui/view_bitmap.cpp index 3a2fd4c5b..633a8856b 100644 --- a/code/nel/src/gui/view_bitmap.cpp +++ b/code/nel/src/gui/view_bitmap.cpp @@ -1,5 +1,8 @@ // Ryzom - MMORPG Framework -// Copyright (C) 2010 Winch Gate Property Limited +// Copyright (C) 2010-2018 Winch Gate Property Limited +// +// This source file has been modified by the following contributors: +// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/nel/src/gui/view_bitmap_combo.cpp b/code/nel/src/gui/view_bitmap_combo.cpp index 8fbc7609c..cb89d5042 100644 --- a/code/nel/src/gui/view_bitmap_combo.cpp +++ b/code/nel/src/gui/view_bitmap_combo.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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/gui/view_link.cpp b/code/nel/src/gui/view_link.cpp index 7de4e3a01..4e9cb17ce 100644 --- a/code/nel/src/gui/view_link.cpp +++ b/code/nel/src/gui/view_link.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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/gui/view_pointer.cpp b/code/nel/src/gui/view_pointer.cpp index aa5dff6d2..82c0174f5 100644 --- a/code/nel/src/gui/view_pointer.cpp +++ b/code/nel/src/gui/view_pointer.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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/gui/view_pointer_base.cpp b/code/nel/src/gui/view_pointer_base.cpp index 9589afd9c..064609713 100644 --- a/code/nel/src/gui/view_pointer_base.cpp +++ b/code/nel/src/gui/view_pointer_base.cpp @@ -1,6 +1,10 @@ // Ryzom - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) +// Copyright (C) 2014 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/gui/view_polygon.cpp b/code/nel/src/gui/view_polygon.cpp index f3fd8efa2..4706f30f3 100644 --- a/code/nel/src/gui/view_polygon.cpp +++ b/code/nel/src/gui/view_polygon.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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/gui/view_quad.cpp b/code/nel/src/gui/view_quad.cpp index 2724fe3b3..fa5281671 100644 --- a/code/nel/src/gui/view_quad.cpp +++ b/code/nel/src/gui/view_quad.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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/gui/view_renderer.cpp b/code/nel/src/gui/view_renderer.cpp index 7d60f3c31..5dabede88 100644 --- a/code/nel/src/gui/view_renderer.cpp +++ b/code/nel/src/gui/view_renderer.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) 2013-2014 Laszlo KIS-ADAM (dfighter) +// // 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/gui/view_text.cpp b/code/nel/src/gui/view_text.cpp index 9efd2074d..dab618ff8 100644 --- a/code/nel/src/gui/view_text.cpp +++ b/code/nel/src/gui/view_text.cpp @@ -1,5 +1,9 @@ // Ryzom - MMORPG Framework -// Copyright (C) 2010 Winch Gate Property Limited +// Copyright (C) 2010-2018 Winch Gate Property Limited +// +// This source file has been modified by the following contributors: +// Copyright (C) 2013-2014 Laszlo KIS-ADAM (dfighter) +// Copyright (C) 2014 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 diff --git a/code/nel/src/gui/view_text_formated.cpp b/code/nel/src/gui/view_text_formated.cpp index 56a0b2e74..ac9263936 100644 --- a/code/nel/src/gui/view_text_formated.cpp +++ b/code/nel/src/gui/view_text_formated.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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/gui/view_text_id.cpp b/code/nel/src/gui/view_text_id.cpp index b7e276a10..562ba881a 100644 --- a/code/nel/src/gui/view_text_id.cpp +++ b/code/nel/src/gui/view_text_id.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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/gui/view_text_id_formated.cpp b/code/nel/src/gui/view_text_id_formated.cpp index 848bea21b..28998cee0 100644 --- a/code/nel/src/gui/view_text_id_formated.cpp +++ b/code/nel/src/gui/view_text_id_formated.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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/gui/widget_manager.cpp b/code/nel/src/gui/widget_manager.cpp index e1cd14ab0..b029b117c 100644 --- a/code/nel/src/gui/widget_manager.cpp +++ b/code/nel/src/gui/widget_manager.cpp @@ -1,6 +1,10 @@ // Ryzom - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2013-2014 Jan BOON (Kaetemi) +// Copyright (C) 2013-2014 Laszlo KIS-ADAM (dfighter) +// // 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/ligo/primitive.cpp b/code/nel/src/ligo/primitive.cpp index cc6555222..807894be2 100644 --- a/code/nel/src/ligo/primitive.cpp +++ b/code/nel/src/ligo/primitive.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) 2014 Laszlo KIS-ADAM (dfighter) +// // 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/ligo/stdligo.h b/code/nel/src/ligo/stdligo.h index adc3887cf..288861871 100644 --- a/code/nel/src/ligo/stdligo.h +++ b/code/nel/src/ligo/stdligo.h @@ -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) 2014 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/ligo/zone_bank.cpp b/code/nel/src/ligo/zone_bank.cpp index c26205316..c51c2311b 100644 --- a/code/nel/src/ligo/zone_bank.cpp +++ b/code/nel/src/ligo/zone_bank.cpp @@ -1,6 +1,10 @@ // NeL - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2010-2013 Matt RAYKOWSKI (sfb) +// 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/ligo/zone_region.cpp b/code/nel/src/ligo/zone_region.cpp index 9926d3757..cde505af4 100644 --- a/code/nel/src/ligo/zone_region.cpp +++ b/code/nel/src/ligo/zone_region.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) 2010 Matt RAYKOWSKI (sfb) +// // 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/misc/app_context.cpp b/code/nel/src/misc/app_context.cpp index 73c9aa1b3..34d312d98 100644 --- a/code/nel/src/misc/app_context.cpp +++ b/code/nel/src/misc/app_context.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) 2015 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/misc/bit_mem_stream.cpp b/code/nel/src/misc/bit_mem_stream.cpp index 4cd77e8ab..687fabbec 100644 --- a/code/nel/src/misc/bit_mem_stream.cpp +++ b/code/nel/src/misc/bit_mem_stream.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) 2016 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/misc/bitmap.cpp b/code/nel/src/misc/bitmap.cpp index 7a3a38e70..13fe82247 100644 --- a/code/nel/src/misc/bitmap.cpp +++ b/code/nel/src/misc/bitmap.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) 2016 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/misc/bitmap_jpeg.cpp b/code/nel/src/misc/bitmap_jpeg.cpp index a43c707e7..5709dda76 100644 --- a/code/nel/src/misc/bitmap_jpeg.cpp +++ b/code/nel/src/misc/bitmap_jpeg.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) 2014 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/misc/bitmap_png.cpp b/code/nel/src/misc/bitmap_png.cpp index 2e700787c..2d0518ec9 100644 --- a/code/nel/src/misc/bitmap_png.cpp +++ b/code/nel/src/misc/bitmap_png.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) 2010 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/misc/buf_fifo.cpp b/code/nel/src/misc/buf_fifo.cpp index eee981644..691ca7940 100644 --- a/code/nel/src/misc/buf_fifo.cpp +++ b/code/nel/src/misc/buf_fifo.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) 2016 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/misc/cdb.cpp b/code/nel/src/misc/cdb.cpp index 60f6801bd..445ec8dcf 100644 --- a/code/nel/src/misc/cdb.cpp +++ b/code/nel/src/misc/cdb.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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/misc/cdb_bank_handler.cpp b/code/nel/src/misc/cdb_bank_handler.cpp index 78102498f..de1c43ef8 100644 --- a/code/nel/src/misc/cdb_bank_handler.cpp +++ b/code/nel/src/misc/cdb_bank_handler.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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/misc/cdb_branch.cpp b/code/nel/src/misc/cdb_branch.cpp index a15eac930..5f5cea571 100644 --- a/code/nel/src/misc/cdb_branch.cpp +++ b/code/nel/src/misc/cdb_branch.cpp @@ -1,6 +1,10 @@ // Ryzom - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2013 Jan BOON (Kaetemi) +// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/misc/cdb_branch_observing_handler.cpp b/code/nel/src/misc/cdb_branch_observing_handler.cpp index b64862a18..8e348a058 100644 --- a/code/nel/src/misc/cdb_branch_observing_handler.cpp +++ b/code/nel/src/misc/cdb_branch_observing_handler.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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/misc/cdb_check_sum.cpp b/code/nel/src/misc/cdb_check_sum.cpp index 7ec6614b2..13b47a85f 100644 --- a/code/nel/src/misc/cdb_check_sum.cpp +++ b/code/nel/src/misc/cdb_check_sum.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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/misc/cdb_leaf.cpp b/code/nel/src/misc/cdb_leaf.cpp index c996b78f3..f5bc50ac3 100644 --- a/code/nel/src/misc/cdb_leaf.cpp +++ b/code/nel/src/misc/cdb_leaf.cpp @@ -1,6 +1,10 @@ // Ryzom - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) +// Copyright (C) 2016 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/misc/cdb_manager.cpp b/code/nel/src/misc/cdb_manager.cpp index 1b19f4141..c1e47e5f8 100644 --- a/code/nel/src/misc/cdb_manager.cpp +++ b/code/nel/src/misc/cdb_manager.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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/misc/class_id.cpp b/code/nel/src/misc/class_id.cpp index 35a2e4b0e..3ad2ec0d8 100644 --- a/code/nel/src/misc/class_id.cpp +++ b/code/nel/src/misc/class_id.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/misc/co_task.cpp b/code/nel/src/misc/co_task.cpp index f817e3a5f..524cc69c6 100644 --- a/code/nel/src/misc/co_task.cpp +++ b/code/nel/src/misc/co_task.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) 2015 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/misc/command.cpp b/code/nel/src/misc/command.cpp index 5ad60a31f..1e259ca0f 100644 --- a/code/nel/src/misc/command.cpp +++ b/code/nel/src/misc/command.cpp @@ -1,5 +1,5 @@ // NeL - MMORPG Framework -// Copyright (C) 2010 Winch Gate Property Limited +// Copyright (C) 2010-2019 Winch Gate Property Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/nel/src/misc/common.cpp b/code/nel/src/misc/common.cpp index bb7cf0bcd..31a11b792 100644 --- a/code/nel/src/misc/common.cpp +++ b/code/nel/src/misc/common.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) 2014-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/misc/cpu_time_stat.cpp b/code/nel/src/misc/cpu_time_stat.cpp index 455104b25..b61e07825 100644 --- a/code/nel/src/misc/cpu_time_stat.cpp +++ b/code/nel/src/misc/cpu_time_stat.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) 2016 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/misc/debug.cpp b/code/nel/src/misc/debug.cpp index 71da430de..3113de70e 100644 --- a/code/nel/src/misc/debug.cpp +++ b/code/nel/src/misc/debug.cpp @@ -1,6 +1,10 @@ // NeL - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2014-2019 Jan BOON (Kaetemi) +// Copyright (C) 2015 Laszlo KIS-ADAM (dfighter) +// // 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/misc/displayer.cpp b/code/nel/src/misc/displayer.cpp index ba5cc85d0..149bfb79d 100644 --- a/code/nel/src/misc/displayer.cpp +++ b/code/nel/src/misc/displayer.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) 2014-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/misc/dynloadlib.cpp b/code/nel/src/misc/dynloadlib.cpp index a36c02f17..8fe8a4227 100644 --- a/code/nel/src/misc/dynloadlib.cpp +++ b/code/nel/src/misc/dynloadlib.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) 2014-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/misc/eid_translator.cpp b/code/nel/src/misc/eid_translator.cpp index 9c6c6ea51..71d0fd4e2 100644 --- a/code/nel/src/misc/eid_translator.cpp +++ b/code/nel/src/misc/eid_translator.cpp @@ -1,5 +1,5 @@ // NeL - MMORPG Framework -// Copyright (C) 2010 Winch Gate Property Limited +// Copyright (C) 2010-2019 Winch Gate Property Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/nel/src/misc/eval_num_expr.cpp b/code/nel/src/misc/eval_num_expr.cpp index 42298c1fa..52dce523f 100644 --- a/code/nel/src/misc/eval_num_expr.cpp +++ b/code/nel/src/misc/eval_num_expr.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) 2016 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/misc/events.cpp b/code/nel/src/misc/events.cpp index 6f85c5f7e..212f78e5d 100644 --- a/code/nel/src/misc/events.cpp +++ b/code/nel/src/misc/events.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) 2012 Matt RAYKOWSKI (sfb) +// // 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/misc/file.cpp b/code/nel/src/misc/file.cpp index 5bb82c454..89af07129 100644 --- a/code/nel/src/misc/file.cpp +++ b/code/nel/src/misc/file.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) 2014-2016 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/misc/fixed_size_allocator.cpp b/code/nel/src/misc/fixed_size_allocator.cpp index 6ec664db4..7a082b8d8 100644 --- a/code/nel/src/misc/fixed_size_allocator.cpp +++ b/code/nel/src/misc/fixed_size_allocator.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) 2014 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/misc/gtk_displayer.cpp b/code/nel/src/misc/gtk_displayer.cpp index 0c581b2e5..bc6741d7d 100644 --- a/code/nel/src/misc/gtk_displayer.cpp +++ b/code/nel/src/misc/gtk_displayer.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) 2015 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/misc/i18n.cpp b/code/nel/src/misc/i18n.cpp index 1a1db0f00..f692fd849 100644 --- a/code/nel/src/misc/i18n.cpp +++ b/code/nel/src/misc/i18n.cpp @@ -1,5 +1,9 @@ // NeL - MMORPG Framework -// Copyright (C) 2010 Winch Gate Property Limited +// Copyright (C) 2010-2019 Winch Gate Property Limited +// +// This source file has been modified by the following contributors: +// Copyright (C) 2012 Laszlo KIS-ADAM (dfighter) +// Copyright (C) 2014 Matthew LAGOE (Botanic) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/nel/src/misc/i_streamed_package_provider.cpp b/code/nel/src/misc/i_streamed_package_provider.cpp index 12c873760..4b3c5d7c8 100644 --- a/code/nel/src/misc/i_streamed_package_provider.cpp +++ b/code/nel/src/misc/i_streamed_package_provider.cpp @@ -1,5 +1,5 @@ // NeL - MMORPG Framework -// Copyright (C) 2019 Jan BOON (jan.boon@kaetemi.be) +// 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 diff --git a/code/nel/src/misc/log.cpp b/code/nel/src/misc/log.cpp index d41c47404..62a2a803c 100644 --- a/code/nel/src/misc/log.cpp +++ b/code/nel/src/misc/log.cpp @@ -1,5 +1,5 @@ // NeL - MMORPG Framework -// Copyright (C) 2010 Winch Gate Property Limited +// Copyright (C) 2010-2019 Winch Gate Property Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/nel/src/misc/matrix.cpp b/code/nel/src/misc/matrix.cpp index e907fb2e0..15580ed34 100644 --- a/code/nel/src/misc/matrix.cpp +++ b/code/nel/src/misc/matrix.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) 2014 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/misc/mem_displayer.cpp b/code/nel/src/misc/mem_displayer.cpp index c2d7049de..04e5c71dd 100644 --- a/code/nel/src/misc/mem_displayer.cpp +++ b/code/nel/src/misc/mem_displayer.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) 2014-2016 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/misc/o_xml.cpp b/code/nel/src/misc/o_xml.cpp index 5458ebf4c..091d54fbf 100644 --- a/code/nel/src/misc/o_xml.cpp +++ b/code/nel/src/misc/o_xml.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) 2016 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/misc/object_arena_allocator.cpp b/code/nel/src/misc/object_arena_allocator.cpp index e27a066ec..bd00affc9 100644 --- a/code/nel/src/misc/object_arena_allocator.cpp +++ b/code/nel/src/misc/object_arena_allocator.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) 2014 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/misc/p_thread.cpp b/code/nel/src/misc/p_thread.cpp index a38fb84b2..19a0cd1ee 100644 --- a/code/nel/src/misc/p_thread.cpp +++ b/code/nel/src/misc/p_thread.cpp @@ -1,6 +1,10 @@ // NeL - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2011 Robert TIMM (rti) +// Copyright (C) 2012-2013 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/misc/path.cpp b/code/nel/src/misc/path.cpp index e563ad810..cdc71c1eb 100644 --- a/code/nel/src/misc/path.cpp +++ b/code/nel/src/misc/path.cpp @@ -1,6 +1,10 @@ // NeL - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2012-2019 Jan BOON (Kaetemi) +// Copyright (C) 2014-2015 Laszlo KIS-ADAM (dfighter) +// // 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/misc/report.cpp b/code/nel/src/misc/report.cpp index f997be6e0..67dbff85f 100644 --- a/code/nel/src/misc/report.cpp +++ b/code/nel/src/misc/report.cpp @@ -1,6 +1,10 @@ // NeL - MMORPG Framework // 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 Laszlo KIS-ADAM (dfighter) +// // 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/misc/rgba.cpp b/code/nel/src/misc/rgba.cpp index 33b6c42ec..d7eb00dce 100644 --- a/code/nel/src/misc/rgba.cpp +++ b/code/nel/src/misc/rgba.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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/misc/seven_zip.cpp b/code/nel/src/misc/seven_zip.cpp index 6f7f2f496..ff226af7d 100644 --- a/code/nel/src/misc/seven_zip.cpp +++ b/code/nel/src/misc/seven_zip.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 diff --git a/code/nel/src/misc/sha1.cpp b/code/nel/src/misc/sha1.cpp index c6e5701ec..d7085283a 100644 --- a/code/nel/src/misc/sha1.cpp +++ b/code/nel/src/misc/sha1.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/misc/shared_memory.cpp b/code/nel/src/misc/shared_memory.cpp index 99333a9c8..c6eea8e9f 100644 --- a/code/nel/src/misc/shared_memory.cpp +++ b/code/nel/src/misc/shared_memory.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) 2015 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/misc/sheet_id.cpp b/code/nel/src/misc/sheet_id.cpp index ecbe84089..55f517e4d 100644 --- a/code/nel/src/misc/sheet_id.cpp +++ b/code/nel/src/misc/sheet_id.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) 2012-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/misc/stdmisc.h b/code/nel/src/misc/stdmisc.h index 794fd9050..be52ae7e6 100644 --- a/code/nel/src/misc/stdmisc.h +++ b/code/nel/src/misc/stdmisc.h @@ -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) 2014-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/misc/streamed_package.cpp b/code/nel/src/misc/streamed_package.cpp index fed7d1dc3..f7189903a 100644 --- a/code/nel/src/misc/streamed_package.cpp +++ b/code/nel/src/misc/streamed_package.cpp @@ -1,5 +1,5 @@ // NeL - MMORPG Framework -// Copyright (C) 2014 Jan BOON (jan.boon@kaetemi.be) +// Copyright (C) 2014 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 diff --git a/code/nel/src/misc/streamed_package_manager.cpp b/code/nel/src/misc/streamed_package_manager.cpp index ac605b049..ecfb988b8 100644 --- a/code/nel/src/misc/streamed_package_manager.cpp +++ b/code/nel/src/misc/streamed_package_manager.cpp @@ -1,5 +1,5 @@ // NeL - MMORPG Framework -// Copyright (C) 2014 Jan BOON (jan.boon@kaetemi.be) +// Copyright (C) 2014-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 diff --git a/code/nel/src/misc/string_common.cpp b/code/nel/src/misc/string_common.cpp index 8f032c7c5..a0fb40942 100644 --- a/code/nel/src/misc/string_common.cpp +++ b/code/nel/src/misc/string_common.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/misc/system_info.cpp b/code/nel/src/misc/system_info.cpp index 3e8c296d3..f7b68b259 100644 --- a/code/nel/src/misc/system_info.cpp +++ b/code/nel/src/misc/system_info.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) 2014-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/misc/system_utils.cpp b/code/nel/src/misc/system_utils.cpp index 3655bc70c..8e6a1feae 100644 --- a/code/nel/src/misc/system_utils.cpp +++ b/code/nel/src/misc/system_utils.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) 2014-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/misc/tds.cpp b/code/nel/src/misc/tds.cpp index 170cda97d..928f2b66e 100644 --- a/code/nel/src/misc/tds.cpp +++ b/code/nel/src/misc/tds.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) 2014 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/misc/time_nl.cpp b/code/nel/src/misc/time_nl.cpp index 70b7b3807..cca6f14aa 100644 --- a/code/nel/src/misc/time_nl.cpp +++ b/code/nel/src/misc/time_nl.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) 2012-2015 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/misc/win_displayer.cpp b/code/nel/src/misc/win_displayer.cpp index 03e1265b9..3d096baf6 100644 --- a/code/nel/src/misc/win_displayer.cpp +++ b/code/nel/src/misc/win_displayer.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) 2014-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/misc/win_event_emitter.cpp b/code/nel/src/misc/win_event_emitter.cpp index 67e426f1e..5b6860794 100644 --- a/code/nel/src/misc/win_event_emitter.cpp +++ b/code/nel/src/misc/win_event_emitter.cpp @@ -1,6 +1,10 @@ // NeL - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2010 Robert TIMM (rti) +// Copyright (C) 2014 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/misc/win_thread.cpp b/code/nel/src/misc/win_thread.cpp index f8063b6b7..a75b2165f 100644 --- a/code/nel/src/misc/win_thread.cpp +++ b/code/nel/src/misc/win_thread.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) 2012-2014 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/misc/window_displayer.cpp b/code/nel/src/misc/window_displayer.cpp index c36ff6f58..39e5ff35d 100644 --- a/code/nel/src/misc/window_displayer.cpp +++ b/code/nel/src/misc/window_displayer.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) 2016 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/misc/words_dictionary.cpp b/code/nel/src/misc/words_dictionary.cpp index f0e7751ea..5478f1f43 100644 --- a/code/nel/src/misc/words_dictionary.cpp +++ b/code/nel/src/misc/words_dictionary.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) 2015 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/net/buf_client.cpp b/code/nel/src/net/buf_client.cpp index 18ce7babf..c28df3874 100644 --- a/code/nel/src/net/buf_client.cpp +++ b/code/nel/src/net/buf_client.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) 2014 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/net/buf_server.cpp b/code/nel/src/net/buf_server.cpp index 301972d68..812621841 100644 --- a/code/nel/src/net/buf_server.cpp +++ b/code/nel/src/net/buf_server.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) 2014-2016 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/net/buf_sock.cpp b/code/nel/src/net/buf_sock.cpp index b3d6d7acb..1ce08f3b4 100644 --- a/code/nel/src/net/buf_sock.cpp +++ b/code/nel/src/net/buf_sock.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) 2014 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/net/callback_client.cpp b/code/nel/src/net/callback_client.cpp index 2a5871c2f..6533be17c 100644 --- a/code/nel/src/net/callback_client.cpp +++ b/code/nel/src/net/callback_client.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) 2016 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/net/listen_sock.cpp b/code/nel/src/net/listen_sock.cpp index 7dedd6b97..0f421eeec 100644 --- a/code/nel/src/net/listen_sock.cpp +++ b/code/nel/src/net/listen_sock.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) 2014 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/net/message_recorder.cpp b/code/nel/src/net/message_recorder.cpp index 7b5412492..438293ba4 100644 --- a/code/nel/src/net/message_recorder.cpp +++ b/code/nel/src/net/message_recorder.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) 2016 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/net/net_log.cpp b/code/nel/src/net/net_log.cpp index 9f563bf98..2833efe12 100644 --- a/code/nel/src/net/net_log.cpp +++ b/code/nel/src/net/net_log.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) 2016 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/net/service.cpp b/code/nel/src/net/service.cpp index b0242bb86..04e160f22 100644 --- a/code/nel/src/net/service.cpp +++ b/code/nel/src/net/service.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) 2016-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/net/sock.cpp b/code/nel/src/net/sock.cpp index 4b736e541..1638a63dc 100644 --- a/code/nel/src/net/sock.cpp +++ b/code/nel/src/net/sock.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) 2014 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/net/tcp_sock.cpp b/code/nel/src/net/tcp_sock.cpp index ed04b21b4..7aee959c3 100644 --- a/code/nel/src/net/tcp_sock.cpp +++ b/code/nel/src/net/tcp_sock.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) 2014 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/net/udp_sock.cpp b/code/nel/src/net/udp_sock.cpp index 16b75d929..1968ca1da 100644 --- a/code/nel/src/net/udp_sock.cpp +++ b/code/nel/src/net/udp_sock.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) 2014 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/net/unified_network.cpp b/code/nel/src/net/unified_network.cpp index 2589e1cbf..5a6034e18 100644 --- a/code/nel/src/net/unified_network.cpp +++ b/code/nel/src/net/unified_network.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) 2014-2016 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/net/unitime.cpp b/code/nel/src/net/unitime.cpp index 55e00a311..df520d549 100644 --- a/code/nel/src/net/unitime.cpp +++ b/code/nel/src/net/unitime.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) 2016 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/edge_collide.cpp b/code/nel/src/pacs/edge_collide.cpp index c0766b691..b25792d62 100644 --- a/code/nel/src/pacs/edge_collide.cpp +++ b/code/nel/src/pacs/edge_collide.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) 2016 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 c17709c70..6ee2da559 100644 --- a/code/nel/src/pacs/local_retriever.cpp +++ b/code/nel/src/pacs/local_retriever.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) 2015 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/move_container.cpp b/code/nel/src/pacs/move_container.cpp index b885712d9..7c346aed4 100644 --- a/code/nel/src/pacs/move_container.cpp +++ b/code/nel/src/pacs/move_container.cpp @@ -1,5 +1,5 @@ // NeL - MMORPG Framework -// Copyright (C) 2010 Winch Gate Property Limited +// Copyright (C) 2010-2019 Winch Gate Property Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/nel/src/pipeline/database_config.cpp b/code/nel/src/pipeline/database_config.cpp index 9ee3eca54..57e3b88d8 100644 --- a/code/nel/src/pipeline/database_config.cpp +++ b/code/nel/src/pipeline/database_config.cpp @@ -1,6 +1,9 @@ // NeL - MMORPG Framework // Copyright (C) 2015 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2016 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/pipeline/project_config.cpp b/code/nel/src/pipeline/project_config.cpp index 31bd8a2dc..7d34846f0 100644 --- a/code/nel/src/pipeline/project_config.cpp +++ b/code/nel/src/pipeline/project_config.cpp @@ -1,6 +1,9 @@ // NeL - MMORPG Framework // Copyright (C) 2015 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2016 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/pipeline/tool_logger.cpp b/code/nel/src/pipeline/tool_logger.cpp index ae12a9d07..50245dd5e 100644 --- a/code/nel/src/pipeline/tool_logger.cpp +++ b/code/nel/src/pipeline/tool_logger.cpp @@ -7,7 +7,10 @@ */ // NeL - MMORPG Framework -// Copyright (C) 2012 Jan BOON (Kaetemi) +// Copyright (C) 2012-2016 Jan BOON (Kaetemi) +// +// This source file has been modified by the following contributors: +// Copyright (C) 2015 Winch Gate Property Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/nel/src/sound/async_file_manager_sound.cpp b/code/nel/src/sound/async_file_manager_sound.cpp index 2d7f80245..380a6cebb 100644 --- a/code/nel/src/sound/async_file_manager_sound.cpp +++ b/code/nel/src/sound/async_file_manager_sound.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) 2010 Matt RAYKOWSKI (sfb) +// // 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/sound/audio_decoder_mp3.cpp b/code/nel/src/sound/audio_decoder_mp3.cpp index 47795ec6e..9785b7944 100644 --- a/code/nel/src/sound/audio_decoder_mp3.cpp +++ b/code/nel/src/sound/audio_decoder_mp3.cpp @@ -1,6 +1,9 @@ // NeL - MMORPG Framework // Copyright (C) 2018 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/sound/audio_mixer_user.cpp b/code/nel/src/sound/audio_mixer_user.cpp index c7fd988bd..50f99f5d0 100644 --- a/code/nel/src/sound/audio_mixer_user.cpp +++ b/code/nel/src/sound/audio_mixer_user.cpp @@ -1,6 +1,10 @@ // NeL - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2010 Matt RAYKOWSKI (sfb) +// Copyright (C) 2012-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/sound/background_sound.cpp b/code/nel/src/sound/background_sound.cpp index ac4cc58cf..d8c52bd70 100644 --- a/code/nel/src/sound/background_sound.cpp +++ b/code/nel/src/sound/background_sound.cpp @@ -1,6 +1,10 @@ // NeL - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2010 Matt RAYKOWSKI (sfb) +// 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/sound/background_sound_manager.cpp b/code/nel/src/sound/background_sound_manager.cpp index c93e0bab0..d59a6f093 100644 --- a/code/nel/src/sound/background_sound_manager.cpp +++ b/code/nel/src/sound/background_sound_manager.cpp @@ -1,6 +1,10 @@ // NeL - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2010 Matt RAYKOWSKI (sfb) +// 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/sound/background_source.cpp b/code/nel/src/sound/background_source.cpp index d8cb4a7a4..013ace073 100644 --- a/code/nel/src/sound/background_source.cpp +++ b/code/nel/src/sound/background_source.cpp @@ -1,6 +1,10 @@ // NeL - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2010 Matt RAYKOWSKI (sfb) +// Copyright (C) 2012 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/sound/clustered_sound.cpp b/code/nel/src/sound/clustered_sound.cpp index 52a9848da..4fef89128 100644 --- a/code/nel/src/sound/clustered_sound.cpp +++ b/code/nel/src/sound/clustered_sound.cpp @@ -1,6 +1,10 @@ // NeL - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2010 Matt RAYKOWSKI (sfb) +// Copyright (C) 2012-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/sound/complex_sound.cpp b/code/nel/src/sound/complex_sound.cpp index f33f4b2bf..b1b96df01 100644 --- a/code/nel/src/sound/complex_sound.cpp +++ b/code/nel/src/sound/complex_sound.cpp @@ -1,6 +1,10 @@ // NeL - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2010 Matt RAYKOWSKI (sfb) +// 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/sound/complex_source.cpp b/code/nel/src/sound/complex_source.cpp index 86cb29d12..224cb7374 100644 --- a/code/nel/src/sound/complex_source.cpp +++ b/code/nel/src/sound/complex_source.cpp @@ -1,6 +1,10 @@ // NeL - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2010 Matt RAYKOWSKI (sfb) +// Copyright (C) 2012-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/sound/context_sound.cpp b/code/nel/src/sound/context_sound.cpp index 932a69f19..c03a1cc4f 100644 --- a/code/nel/src/sound/context_sound.cpp +++ b/code/nel/src/sound/context_sound.cpp @@ -1,6 +1,10 @@ // NeL - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2010 Matt RAYKOWSKI (sfb) +// 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/sound/driver/buffer.cpp b/code/nel/src/sound/driver/buffer.cpp index 9be9fa754..d3cba94b3 100644 --- a/code/nel/src/sound/driver/buffer.cpp +++ b/code/nel/src/sound/driver/buffer.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) 2010 Matt RAYKOWSKI (sfb) +// // 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/sound/driver/dsound/sound_driver_dsound.cpp b/code/nel/src/sound/driver/dsound/sound_driver_dsound.cpp index d95b80ca0..9ed8b97e1 100644 --- a/code/nel/src/sound/driver/dsound/sound_driver_dsound.cpp +++ b/code/nel/src/sound/driver/dsound/sound_driver_dsound.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) 2010 Matt RAYKOWSKI (sfb) +// // 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/sound/driver/dsound/source_dsound.cpp b/code/nel/src/sound/driver/dsound/source_dsound.cpp index b80d03590..4f52812e1 100644 --- a/code/nel/src/sound/driver/dsound/source_dsound.cpp +++ b/code/nel/src/sound/driver/dsound/source_dsound.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) 2010 Matt RAYKOWSKI (sfb) +// // 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/sound/driver/effect.cpp b/code/nel/src/sound/driver/effect.cpp index a25ad203a..2231cb672 100644 --- a/code/nel/src/sound/driver/effect.cpp +++ b/code/nel/src/sound/driver/effect.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) 2010 Matt RAYKOWSKI (sfb) +// // 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/sound/driver/fmod/music_channel_fmod.cpp b/code/nel/src/sound/driver/fmod/music_channel_fmod.cpp index 9abfd1006..6038cd83b 100644 --- a/code/nel/src/sound/driver/fmod/music_channel_fmod.cpp +++ b/code/nel/src/sound/driver/fmod/music_channel_fmod.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) 2012 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/sound/driver/fmod/music_channel_fmod.h b/code/nel/src/sound/driver/fmod/music_channel_fmod.h index 28ffef6ce..644545464 100644 --- a/code/nel/src/sound/driver/fmod/music_channel_fmod.h +++ b/code/nel/src/sound/driver/fmod/music_channel_fmod.h @@ -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) 2012 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/sound/driver/fmod/source_fmod.cpp b/code/nel/src/sound/driver/fmod/source_fmod.cpp index 1224d647d..3d1183767 100644 --- a/code/nel/src/sound/driver/fmod/source_fmod.cpp +++ b/code/nel/src/sound/driver/fmod/source_fmod.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) 2012 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/sound/driver/music_channel.cpp b/code/nel/src/sound/driver/music_channel.cpp index 2cf87099c..00fffd149 100644 --- a/code/nel/src/sound/driver/music_channel.cpp +++ b/code/nel/src/sound/driver/music_channel.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) 2010 Matt RAYKOWSKI (sfb) +// // 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/sound/driver/openal/buffer_al.cpp b/code/nel/src/sound/driver/openal/buffer_al.cpp index ae0054096..9c200fcf7 100644 --- a/code/nel/src/sound/driver/openal/buffer_al.cpp +++ b/code/nel/src/sound/driver/openal/buffer_al.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) 2010-2012 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/sound/driver/openal/buffer_al.h b/code/nel/src/sound/driver/openal/buffer_al.h index b2abf2036..218d2fe37 100644 --- a/code/nel/src/sound/driver/openal/buffer_al.h +++ b/code/nel/src/sound/driver/openal/buffer_al.h @@ -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) 2010 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/sound/driver/openal/ext_al.h b/code/nel/src/sound/driver/openal/ext_al.h index b87cf48f2..8750736c8 100644 --- a/code/nel/src/sound/driver/openal/ext_al.h +++ b/code/nel/src/sound/driver/openal/ext_al.h @@ -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/sound/driver/openal/listener_al.cpp b/code/nel/src/sound/driver/openal/listener_al.cpp index f39f0f18f..5f4c5cf51 100644 --- a/code/nel/src/sound/driver/openal/listener_al.cpp +++ b/code/nel/src/sound/driver/openal/listener_al.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) 2012 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/sound/driver/openal/sound_driver_al.cpp b/code/nel/src/sound/driver/openal/sound_driver_al.cpp index d237f533a..e0e478e18 100644 --- a/code/nel/src/sound/driver/openal/sound_driver_al.cpp +++ b/code/nel/src/sound/driver/openal/sound_driver_al.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) 2012-2014 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/sound/driver/openal/sound_driver_al.h b/code/nel/src/sound/driver/openal/sound_driver_al.h index a58d5418e..f3cfa1152 100644 --- a/code/nel/src/sound/driver/openal/sound_driver_al.h +++ b/code/nel/src/sound/driver/openal/sound_driver_al.h @@ -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) 2012 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/sound/driver/openal/source_al.cpp b/code/nel/src/sound/driver/openal/source_al.cpp index 3cc0dd328..fa3908f10 100644 --- a/code/nel/src/sound/driver/openal/source_al.cpp +++ b/code/nel/src/sound/driver/openal/source_al.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) 2012 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/sound/driver/openal/source_al.h b/code/nel/src/sound/driver/openal/source_al.h index 22cb3d67d..526c44de2 100644 --- a/code/nel/src/sound/driver/openal/source_al.h +++ b/code/nel/src/sound/driver/openal/source_al.h @@ -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) 2012 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/sound/driver/sound_driver.cpp b/code/nel/src/sound/driver/sound_driver.cpp index 7eeaf9f57..378bc7ac7 100644 --- a/code/nel/src/sound/driver/sound_driver.cpp +++ b/code/nel/src/sound/driver/sound_driver.cpp @@ -1,6 +1,10 @@ // NeL - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2010 Matt RAYKOWSKI (sfb) +// Copyright (C) 2014-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/sound/driver/source.cpp b/code/nel/src/sound/driver/source.cpp index 6ef5e420c..37f4d19ba 100644 --- a/code/nel/src/sound/driver/source.cpp +++ b/code/nel/src/sound/driver/source.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) 2012 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/sound/driver/xaudio2/adpcm_xaudio2.cpp b/code/nel/src/sound/driver/xaudio2/adpcm_xaudio2.cpp index 733c93724..6aed31713 100644 --- a/code/nel/src/sound/driver/xaudio2/adpcm_xaudio2.cpp +++ b/code/nel/src/sound/driver/xaudio2/adpcm_xaudio2.cpp @@ -1,5 +1,5 @@ // NeL - MMORPG Framework -// Copyright (C) 2008 Jan Boon (Kaetemi) +// Copyright (C) 2008 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 diff --git a/code/nel/src/sound/driver/xaudio2/adpcm_xaudio2.h b/code/nel/src/sound/driver/xaudio2/adpcm_xaudio2.h index 6de5b99fc..cf8a97156 100644 --- a/code/nel/src/sound/driver/xaudio2/adpcm_xaudio2.h +++ b/code/nel/src/sound/driver/xaudio2/adpcm_xaudio2.h @@ -1,5 +1,5 @@ // NeL - MMORPG Framework -// Copyright (C) 2008 Jan Boon (Kaetemi) +// Copyright (C) 2008-2014 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 diff --git a/code/nel/src/sound/driver/xaudio2/buffer_xaudio2.cpp b/code/nel/src/sound/driver/xaudio2/buffer_xaudio2.cpp index a15156f4c..d6e170f26 100644 --- a/code/nel/src/sound/driver/xaudio2/buffer_xaudio2.cpp +++ b/code/nel/src/sound/driver/xaudio2/buffer_xaudio2.cpp @@ -1,5 +1,5 @@ // NeL - MMORPG Framework -// Copyright (C) 2008 Jan Boon (Kaetemi) +// Copyright (C) 2008 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 diff --git a/code/nel/src/sound/driver/xaudio2/buffer_xaudio2.h b/code/nel/src/sound/driver/xaudio2/buffer_xaudio2.h index 63cf5d12c..07957022c 100644 --- a/code/nel/src/sound/driver/xaudio2/buffer_xaudio2.h +++ b/code/nel/src/sound/driver/xaudio2/buffer_xaudio2.h @@ -1,5 +1,5 @@ // NeL - MMORPG Framework -// Copyright (C) 2008 Jan Boon (Kaetemi) +// Copyright (C) 2008 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 diff --git a/code/nel/src/sound/driver/xaudio2/effect_xaudio2.cpp b/code/nel/src/sound/driver/xaudio2/effect_xaudio2.cpp index 47f504860..fb7b1a3b9 100644 --- a/code/nel/src/sound/driver/xaudio2/effect_xaudio2.cpp +++ b/code/nel/src/sound/driver/xaudio2/effect_xaudio2.cpp @@ -1,5 +1,5 @@ // NeL - MMORPG Framework -// Copyright (C) 2008 Jan Boon (Kaetemi) +// Copyright (C) 2008 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 diff --git a/code/nel/src/sound/driver/xaudio2/effect_xaudio2.h b/code/nel/src/sound/driver/xaudio2/effect_xaudio2.h index 53b573ec5..92ae4cedf 100644 --- a/code/nel/src/sound/driver/xaudio2/effect_xaudio2.h +++ b/code/nel/src/sound/driver/xaudio2/effect_xaudio2.h @@ -1,5 +1,5 @@ // NeL - MMORPG Framework -// Copyright (C) 2008 Jan Boon (Kaetemi) +// Copyright (C) 2008 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 diff --git a/code/nel/src/sound/driver/xaudio2/listener_xaudio2.cpp b/code/nel/src/sound/driver/xaudio2/listener_xaudio2.cpp index f689b8288..b3686f237 100644 --- a/code/nel/src/sound/driver/xaudio2/listener_xaudio2.cpp +++ b/code/nel/src/sound/driver/xaudio2/listener_xaudio2.cpp @@ -1,5 +1,5 @@ // NeL - MMORPG Framework -// Copyright (C) 2008 Jan Boon (Kaetemi) +// Copyright (C) 2008 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 diff --git a/code/nel/src/sound/driver/xaudio2/listener_xaudio2.h b/code/nel/src/sound/driver/xaudio2/listener_xaudio2.h index 2a7d4f55f..8ecfd65d7 100644 --- a/code/nel/src/sound/driver/xaudio2/listener_xaudio2.h +++ b/code/nel/src/sound/driver/xaudio2/listener_xaudio2.h @@ -1,5 +1,5 @@ // NeL - MMORPG Framework -// Copyright (C) 2008 Jan Boon (Kaetemi) +// Copyright (C) 2008 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 diff --git a/code/nel/src/sound/driver/xaudio2/sound_driver_xaudio2.cpp b/code/nel/src/sound/driver/xaudio2/sound_driver_xaudio2.cpp index 4901eca33..ea08835a4 100644 --- a/code/nel/src/sound/driver/xaudio2/sound_driver_xaudio2.cpp +++ b/code/nel/src/sound/driver/xaudio2/sound_driver_xaudio2.cpp @@ -1,5 +1,5 @@ // NeL - MMORPG Framework -// Copyright (C) 2008 Jan Boon (Kaetemi) +// Copyright (C) 2008-2014 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 diff --git a/code/nel/src/sound/driver/xaudio2/sound_driver_xaudio2.h b/code/nel/src/sound/driver/xaudio2/sound_driver_xaudio2.h index 512e2f7d5..4eca05950 100644 --- a/code/nel/src/sound/driver/xaudio2/sound_driver_xaudio2.h +++ b/code/nel/src/sound/driver/xaudio2/sound_driver_xaudio2.h @@ -1,5 +1,5 @@ // NeL - MMORPG Framework -// Copyright (C) 2008 Jan Boon (Kaetemi) +// Copyright (C) 2008 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 diff --git a/code/nel/src/sound/driver/xaudio2/source_xaudio2.cpp b/code/nel/src/sound/driver/xaudio2/source_xaudio2.cpp index 4573143bb..785ce0565 100644 --- a/code/nel/src/sound/driver/xaudio2/source_xaudio2.cpp +++ b/code/nel/src/sound/driver/xaudio2/source_xaudio2.cpp @@ -1,5 +1,5 @@ // NeL - MMORPG Framework -// Copyright (C) 2008 Jan Boon (Kaetemi) +// Copyright (C) 2008-2015 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 diff --git a/code/nel/src/sound/driver/xaudio2/source_xaudio2.h b/code/nel/src/sound/driver/xaudio2/source_xaudio2.h index 5c5c54a90..22e5bd4dc 100644 --- a/code/nel/src/sound/driver/xaudio2/source_xaudio2.h +++ b/code/nel/src/sound/driver/xaudio2/source_xaudio2.h @@ -1,5 +1,5 @@ // NeL - MMORPG Framework -// Copyright (C) 2008 Jan Boon (Kaetemi) +// Copyright (C) 2008-2015 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 diff --git a/code/nel/src/sound/driver/xaudio2/stdxaudio2.cpp b/code/nel/src/sound/driver/xaudio2/stdxaudio2.cpp index 04045fb8d..7ea1c42c2 100644 --- a/code/nel/src/sound/driver/xaudio2/stdxaudio2.cpp +++ b/code/nel/src/sound/driver/xaudio2/stdxaudio2.cpp @@ -1,5 +1,5 @@ // NeL - MMORPG Framework -// Copyright (C) 2008 Jan Boon (Kaetemi) +// Copyright (C) 2008 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 diff --git a/code/nel/src/sound/driver/xaudio2/stdxaudio2.h b/code/nel/src/sound/driver/xaudio2/stdxaudio2.h index 6f858f259..842b14292 100644 --- a/code/nel/src/sound/driver/xaudio2/stdxaudio2.h +++ b/code/nel/src/sound/driver/xaudio2/stdxaudio2.h @@ -1,5 +1,5 @@ // NeL - MMORPG Framework -// Copyright (C) 2008 Jan Boon (Kaetemi) +// Copyright (C) 2008-2014 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 diff --git a/code/nel/src/sound/listener_user.cpp b/code/nel/src/sound/listener_user.cpp index fe6e67271..66f2e63d9 100644 --- a/code/nel/src/sound/listener_user.cpp +++ b/code/nel/src/sound/listener_user.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) 2010 Matt RAYKOWSKI (sfb) +// // 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/sound/mixing_track.cpp b/code/nel/src/sound/mixing_track.cpp index 3fadbd214..757e3f494 100644 --- a/code/nel/src/sound/mixing_track.cpp +++ b/code/nel/src/sound/mixing_track.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) 2010 Matt RAYKOWSKI (sfb) +// // 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/sound/music_channel_fader.cpp b/code/nel/src/sound/music_channel_fader.cpp index a166c1e7e..ea2cc6341 100644 --- a/code/nel/src/sound/music_channel_fader.cpp +++ b/code/nel/src/sound/music_channel_fader.cpp @@ -1,5 +1,8 @@ // NeL - MMORPG Framework -// Copyright (C) 2008 Jan BOON (Kaetemi) +// Copyright (C) 2008-2012 Jan BOON (Kaetemi) +// +// This source file has been modified by the following contributors: +// Copyright (C) 2010 Matt RAYKOWSKI (sfb) // Copyright (C) 2010 Winch Gate Property Limited // // This program is free software: you can redistribute it and/or modify diff --git a/code/nel/src/sound/music_sound.cpp b/code/nel/src/sound/music_sound.cpp index 757044572..a2b61c5ad 100644 --- a/code/nel/src/sound/music_sound.cpp +++ b/code/nel/src/sound/music_sound.cpp @@ -1,6 +1,10 @@ // NeL - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2010 Matt RAYKOWSKI (sfb) +// Copyright (C) 2012 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/sound/music_sound_manager.cpp b/code/nel/src/sound/music_sound_manager.cpp index 14859f2af..ff0ad72aa 100644 --- a/code/nel/src/sound/music_sound_manager.cpp +++ b/code/nel/src/sound/music_sound_manager.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) 2010 Matt RAYKOWSKI (sfb) +// // 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/sound/music_source.cpp b/code/nel/src/sound/music_source.cpp index 60b296a8c..f77052d4e 100644 --- a/code/nel/src/sound/music_source.cpp +++ b/code/nel/src/sound/music_source.cpp @@ -1,6 +1,10 @@ // NeL - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2010 Matt RAYKOWSKI (sfb) +// Copyright (C) 2012 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/sound/sample_bank.cpp b/code/nel/src/sound/sample_bank.cpp index 0e2fa4424..53a6319e3 100644 --- a/code/nel/src/sound/sample_bank.cpp +++ b/code/nel/src/sound/sample_bank.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) 2010 Matt RAYKOWSKI (sfb) +// // 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/sound/sample_bank_manager.cpp b/code/nel/src/sound/sample_bank_manager.cpp index 6f6728bca..50104296f 100644 --- a/code/nel/src/sound/sample_bank_manager.cpp +++ b/code/nel/src/sound/sample_bank_manager.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) 2010 Matt RAYKOWSKI (sfb) +// // 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/sound/simple_sound.cpp b/code/nel/src/sound/simple_sound.cpp index c4c320ea4..acc292ea0 100644 --- a/code/nel/src/sound/simple_sound.cpp +++ b/code/nel/src/sound/simple_sound.cpp @@ -1,6 +1,10 @@ // NeL - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2010 Matt RAYKOWSKI (sfb) +// 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/sound/simple_source.cpp b/code/nel/src/sound/simple_source.cpp index 9b9ee5950..6c71c4174 100644 --- a/code/nel/src/sound/simple_source.cpp +++ b/code/nel/src/sound/simple_source.cpp @@ -1,6 +1,10 @@ // NeL - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2010 Matt RAYKOWSKI (sfb) +// Copyright (C) 2012 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/sound/sound.cpp b/code/nel/src/sound/sound.cpp index 5963ccc5b..c3ac77e23 100644 --- a/code/nel/src/sound/sound.cpp +++ b/code/nel/src/sound/sound.cpp @@ -1,6 +1,10 @@ // NeL - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2010 Matt RAYKOWSKI (sfb) +// Copyright (C) 2012-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/sound/sound_anim_marker.cpp b/code/nel/src/sound/sound_anim_marker.cpp index cf1198280..b69dd85d6 100644 --- a/code/nel/src/sound/sound_anim_marker.cpp +++ b/code/nel/src/sound/sound_anim_marker.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) 2012-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/sound/sound_animation.cpp b/code/nel/src/sound/sound_animation.cpp index 1f80b6223..c6b49aea7 100644 --- a/code/nel/src/sound/sound_animation.cpp +++ b/code/nel/src/sound/sound_animation.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/sound/sound_bank.cpp b/code/nel/src/sound/sound_bank.cpp index 5ffc8927b..38088b6da 100644 --- a/code/nel/src/sound/sound_bank.cpp +++ b/code/nel/src/sound/sound_bank.cpp @@ -1,6 +1,10 @@ // NeL - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2010 Matt RAYKOWSKI (sfb) +// Copyright (C) 2012-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/sound/source_common.cpp b/code/nel/src/sound/source_common.cpp index 6b997ed67..ddf1b5a84 100644 --- a/code/nel/src/sound/source_common.cpp +++ b/code/nel/src/sound/source_common.cpp @@ -1,6 +1,10 @@ // NeL - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2010 Matt RAYKOWSKI (sfb) +// Copyright (C) 2012 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/sound/stream_sound.cpp b/code/nel/src/sound/stream_sound.cpp index 80f9001d1..65902f4ca 100644 --- a/code/nel/src/sound/stream_sound.cpp +++ b/code/nel/src/sound/stream_sound.cpp @@ -1,5 +1,8 @@ // NeL - MMORPG Framework -// Copyright (C) 2010 Jan BOON (Kaetemi) +// Copyright (C) 2010-2019 Jan BOON (Kaetemi) +// +// This source file has been modified by the following contributors: +// Copyright (C) 2010 Matt RAYKOWSKI (sfb) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/nel/src/sound/stream_source.cpp b/code/nel/src/sound/stream_source.cpp index 97e36e91e..3e6216df2 100644 --- a/code/nel/src/sound/stream_source.cpp +++ b/code/nel/src/sound/stream_source.cpp @@ -1,5 +1,8 @@ // NeL - MMORPG Framework -// Copyright (C) 2010 Jan BOON (Kaetemi) +// Copyright (C) 2010-2012 Jan BOON (Kaetemi) +// +// This source file has been modified by the following contributors: +// Copyright (C) 2010 Matt RAYKOWSKI (sfb) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/nel/src/web/curl_certificates.cpp b/code/nel/src/web/curl_certificates.cpp index 84b41e609..ecb202b76 100644 --- a/code/nel/src/web/curl_certificates.cpp +++ b/code/nel/src/web/curl_certificates.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 diff --git a/code/nel/src/web/http_client_curl.cpp b/code/nel/src/web/http_client_curl.cpp index 31d54767d..1ec244cd2 100644 --- a/code/nel/src/web/http_client_curl.cpp +++ b/code/nel/src/web/http_client_curl.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 diff --git a/code/nel/src/web/http_package_provider.cpp b/code/nel/src/web/http_package_provider.cpp index 5d4b6004d..b71f97467 100644 --- a/code/nel/src/web/http_package_provider.cpp +++ b/code/nel/src/web/http_package_provider.cpp @@ -1,5 +1,5 @@ // NeL - MMORPG Framework -// Copyright (C) 2019 Jan BOON (jan.boon@kaetemi.be) +// 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 diff --git a/code/nel/src/web/stdweb.cpp b/code/nel/src/web/stdweb.cpp index d85dbcdc5..c53564266 100644 --- a/code/nel/src/web/stdweb.cpp +++ b/code/nel/src/web/stdweb.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/web/stdweb.h b/code/nel/src/web/stdweb.h index 7234cd50d..60100eacf 100644 --- a/code/nel/src/web/stdweb.h +++ b/code/nel/src/web/stdweb.h @@ -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/tools/3d/build_coarse_mesh/build_coarse_mesh.cpp b/code/nel/tools/3d/build_coarse_mesh/build_coarse_mesh.cpp index 20f162d86..fba1eb803 100644 --- a/code/nel/tools/3d/build_coarse_mesh/build_coarse_mesh.cpp +++ b/code/nel/tools/3d/build_coarse_mesh/build_coarse_mesh.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) 2010 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/tools/3d/build_far_bank/build_far_bank.cpp b/code/nel/tools/3d/build_far_bank/build_far_bank.cpp index e625b4e7f..f2b0c0bf1 100644 --- a/code/nel/tools/3d/build_far_bank/build_far_bank.cpp +++ b/code/nel/tools/3d/build_far_bank/build_far_bank.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) 2010 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/tools/3d/cluster_viewer/view_cs.cpp b/code/nel/tools/3d/cluster_viewer/view_cs.cpp index b08cab749..04251c46e 100644 --- a/code/nel/tools/3d/cluster_viewer/view_cs.cpp +++ b/code/nel/tools/3d/cluster_viewer/view_cs.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) 2014-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/tools/3d/ig_elevation/main.cpp b/code/nel/tools/3d/ig_elevation/main.cpp index 122957eb0..0d43b5acc 100644 --- a/code/nel/tools/3d/ig_elevation/main.cpp +++ b/code/nel/tools/3d/ig_elevation/main.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/tools/3d/ig_lighter_lib/ig_lighter_lib.cpp b/code/nel/tools/3d/ig_lighter_lib/ig_lighter_lib.cpp index 8286a10e6..24439ff4d 100644 --- a/code/nel/tools/3d/ig_lighter_lib/ig_lighter_lib.cpp +++ b/code/nel/tools/3d/ig_lighter_lib/ig_lighter_lib.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) 2014 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/tools/3d/lightmap_optimizer/main.cpp b/code/nel/tools/3d/lightmap_optimizer/main.cpp index a84e797ad..f68112ea3 100644 --- a/code/nel/tools/3d/lightmap_optimizer/main.cpp +++ b/code/nel/tools/3d/lightmap_optimizer/main.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) 2014 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/tools/3d/ligo/plugin_max/DllEntry.cpp b/code/nel/tools/3d/ligo/plugin_max/DllEntry.cpp index 039f0d0fa..ce4b013c7 100644 --- a/code/nel/tools/3d/ligo/plugin_max/DllEntry.cpp +++ b/code/nel/tools/3d/ligo/plugin_max/DllEntry.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) 2010-2011 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/tools/3d/ligo/plugin_max/max_to_ligo.cpp b/code/nel/tools/3d/ligo/plugin_max/max_to_ligo.cpp index c09158a05..16b1dfe55 100644 --- a/code/nel/tools/3d/ligo/plugin_max/max_to_ligo.cpp +++ b/code/nel/tools/3d/ligo/plugin_max/max_to_ligo.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) 2010-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/tools/3d/ligo/plugin_max/script.cpp b/code/nel/tools/3d/ligo/plugin_max/script.cpp index 15c180192..a5fab3b21 100644 --- a/code/nel/tools/3d/ligo/plugin_max/script.cpp +++ b/code/nel/tools/3d/ligo/plugin_max/script.cpp @@ -1,6 +1,10 @@ // NeL - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2010 Matt RAYKOWSKI (sfb) +// Copyright (C) 2011-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/tools/3d/mesh_utils/assimp_material.cpp b/code/nel/tools/3d/mesh_utils/assimp_material.cpp index ecb392bf1..11b070c23 100644 --- a/code/nel/tools/3d/mesh_utils/assimp_material.cpp +++ b/code/nel/tools/3d/mesh_utils/assimp_material.cpp @@ -1,6 +1,9 @@ // NeL - MMORPG Framework // Copyright (C) 2015 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2016 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/tools/3d/mesh_utils/assimp_shape.cpp b/code/nel/tools/3d/mesh_utils/assimp_shape.cpp index 0f47cef19..e50313335 100644 --- a/code/nel/tools/3d/mesh_utils/assimp_shape.cpp +++ b/code/nel/tools/3d/mesh_utils/assimp_shape.cpp @@ -1,6 +1,9 @@ // NeL - MMORPG Framework // Copyright (C) 2015 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2016 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/tools/3d/mesh_utils/mesh_utils.cpp b/code/nel/tools/3d/mesh_utils/mesh_utils.cpp index 3674d56d8..5d00965ed 100644 --- a/code/nel/tools/3d/mesh_utils/mesh_utils.cpp +++ b/code/nel/tools/3d/mesh_utils/mesh_utils.cpp @@ -1,6 +1,9 @@ // NeL - MMORPG Framework // Copyright (C) 2015 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2016 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/tools/3d/mesh_utils/scene_context.cpp b/code/nel/tools/3d/mesh_utils/scene_context.cpp index 503505ca0..3b86c5c58 100644 --- a/code/nel/tools/3d/mesh_utils/scene_context.cpp +++ b/code/nel/tools/3d/mesh_utils/scene_context.cpp @@ -1,6 +1,9 @@ // NeL - MMORPG Framework // Copyright (C) 2015 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2016 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/tools/3d/mesh_utils/scene_context.h b/code/nel/tools/3d/mesh_utils/scene_context.h index a526ffeb9..80ff558bd 100644 --- a/code/nel/tools/3d/mesh_utils/scene_context.h +++ b/code/nel/tools/3d/mesh_utils/scene_context.h @@ -1,6 +1,9 @@ // NeL - MMORPG Framework // Copyright (C) 2015 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2016 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/tools/3d/object_viewer/animation_set_dlg.cpp b/code/nel/tools/3d/object_viewer/animation_set_dlg.cpp index 743bb6b32..f69a37b43 100644 --- a/code/nel/tools/3d/object_viewer/animation_set_dlg.cpp +++ b/code/nel/tools/3d/object_viewer/animation_set_dlg.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/tools/3d/object_viewer/attrib_dlg.cpp b/code/nel/tools/3d/object_viewer/attrib_dlg.cpp index 93ac94209..6a6d48dd9 100644 --- a/code/nel/tools/3d/object_viewer/attrib_dlg.cpp +++ b/code/nel/tools/3d/object_viewer/attrib_dlg.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) 2010-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/tools/3d/object_viewer/choose_name.cpp b/code/nel/tools/3d/object_viewer/choose_name.cpp index 4f26140a4..73510d294 100644 --- a/code/nel/tools/3d/object_viewer/choose_name.cpp +++ b/code/nel/tools/3d/object_viewer/choose_name.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/tools/3d/object_viewer/choose_pool_id.cpp b/code/nel/tools/3d/object_viewer/choose_pool_id.cpp index 2423bc70a..1824dee57 100644 --- a/code/nel/tools/3d/object_viewer/choose_pool_id.cpp +++ b/code/nel/tools/3d/object_viewer/choose_pool_id.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/tools/3d/object_viewer/create_file_dlg.cpp b/code/nel/tools/3d/object_viewer/create_file_dlg.cpp index 28b058bfb..bc12d1562 100644 --- a/code/nel/tools/3d/object_viewer/create_file_dlg.cpp +++ b/code/nel/tools/3d/object_viewer/create_file_dlg.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/tools/3d/object_viewer/curve_edit.cpp b/code/nel/tools/3d/object_viewer/curve_edit.cpp index 170f351a4..e3e732ff4 100644 --- a/code/nel/tools/3d/object_viewer/curve_edit.cpp +++ b/code/nel/tools/3d/object_viewer/curve_edit.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) 2010 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/tools/3d/object_viewer/direction_attr.cpp b/code/nel/tools/3d/object_viewer/direction_attr.cpp index 6f422f97c..d72ef78d1 100644 --- a/code/nel/tools/3d/object_viewer/direction_attr.cpp +++ b/code/nel/tools/3d/object_viewer/direction_attr.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/tools/3d/object_viewer/edit_ex.cpp b/code/nel/tools/3d/object_viewer/edit_ex.cpp index 7bf13c3e3..886dbd7cf 100644 --- a/code/nel/tools/3d/object_viewer/edit_ex.cpp +++ b/code/nel/tools/3d/object_viewer/edit_ex.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/tools/3d/object_viewer/edit_morph_mesh_dlg.cpp b/code/nel/tools/3d/object_viewer/edit_morph_mesh_dlg.cpp index 43c80fb80..b00fc63b5 100644 --- a/code/nel/tools/3d/object_viewer/edit_morph_mesh_dlg.cpp +++ b/code/nel/tools/3d/object_viewer/edit_morph_mesh_dlg.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/tools/3d/object_viewer/edit_ps_sound.cpp b/code/nel/tools/3d/object_viewer/edit_ps_sound.cpp index 78cac0980..fa72853cb 100644 --- a/code/nel/tools/3d/object_viewer/edit_ps_sound.cpp +++ b/code/nel/tools/3d/object_viewer/edit_ps_sound.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/tools/3d/object_viewer/editable_range.h b/code/nel/tools/3d/object_viewer/editable_range.h index 1ba763cbb..16ef2adb0 100644 --- a/code/nel/tools/3d/object_viewer/editable_range.h +++ b/code/nel/tools/3d/object_viewer/editable_range.h @@ -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/tools/3d/object_viewer/emitter_dlg.cpp b/code/nel/tools/3d/object_viewer/emitter_dlg.cpp index df67f68b1..50a60782b 100644 --- a/code/nel/tools/3d/object_viewer/emitter_dlg.cpp +++ b/code/nel/tools/3d/object_viewer/emitter_dlg.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/tools/3d/object_viewer/lb_extern_id_dlg.cpp b/code/nel/tools/3d/object_viewer/lb_extern_id_dlg.cpp index 9b0432a9b..55b259bd4 100644 --- a/code/nel/tools/3d/object_viewer/lb_extern_id_dlg.cpp +++ b/code/nel/tools/3d/object_viewer/lb_extern_id_dlg.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/tools/3d/object_viewer/located_bindable_dialog.cpp b/code/nel/tools/3d/object_viewer/located_bindable_dialog.cpp index 98ad0794b..2723945f1 100644 --- a/code/nel/tools/3d/object_viewer/located_bindable_dialog.cpp +++ b/code/nel/tools/3d/object_viewer/located_bindable_dialog.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/tools/3d/object_viewer/located_properties.cpp b/code/nel/tools/3d/object_viewer/located_properties.cpp index ad77243bc..8189cf3fe 100644 --- a/code/nel/tools/3d/object_viewer/located_properties.cpp +++ b/code/nel/tools/3d/object_viewer/located_properties.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/tools/3d/object_viewer/located_target_dlg.cpp b/code/nel/tools/3d/object_viewer/located_target_dlg.cpp index 4de7dbe37..608945ca4 100644 --- a/code/nel/tools/3d/object_viewer/located_target_dlg.cpp +++ b/code/nel/tools/3d/object_viewer/located_target_dlg.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/tools/3d/object_viewer/main_frame.cpp b/code/nel/tools/3d/object_viewer/main_frame.cpp index 7e3b81486..78f8e5798 100644 --- a/code/nel/tools/3d/object_viewer/main_frame.cpp +++ b/code/nel/tools/3d/object_viewer/main_frame.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/tools/3d/object_viewer/mesh_dlg.cpp b/code/nel/tools/3d/object_viewer/mesh_dlg.cpp index b83552ab0..a2c086f42 100644 --- a/code/nel/tools/3d/object_viewer/mesh_dlg.cpp +++ b/code/nel/tools/3d/object_viewer/mesh_dlg.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/tools/3d/object_viewer/multi_tex_dlg.cpp b/code/nel/tools/3d/object_viewer/multi_tex_dlg.cpp index ce7162ff8..cb7ab1bbe 100644 --- a/code/nel/tools/3d/object_viewer/multi_tex_dlg.cpp +++ b/code/nel/tools/3d/object_viewer/multi_tex_dlg.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) 2010-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/tools/3d/object_viewer/object_viewer.cpp b/code/nel/tools/3d/object_viewer/object_viewer.cpp index 5f1310299..5562c4a4f 100644 --- a/code/nel/tools/3d/object_viewer/object_viewer.cpp +++ b/code/nel/tools/3d/object_viewer/object_viewer.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) 2013-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/tools/3d/object_viewer/particle_dlg.cpp b/code/nel/tools/3d/object_viewer/particle_dlg.cpp index b7dd9dab3..f3d323d20 100644 --- a/code/nel/tools/3d/object_viewer/particle_dlg.cpp +++ b/code/nel/tools/3d/object_viewer/particle_dlg.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/tools/3d/object_viewer/particle_tree_ctrl.cpp b/code/nel/tools/3d/object_viewer/particle_tree_ctrl.cpp index 00793a2c4..5c4960a72 100644 --- a/code/nel/tools/3d/object_viewer/particle_tree_ctrl.cpp +++ b/code/nel/tools/3d/object_viewer/particle_tree_ctrl.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/tools/3d/object_viewer/particle_workspace.cpp b/code/nel/tools/3d/object_viewer/particle_workspace.cpp index d5b3869c1..082ded1f9 100644 --- a/code/nel/tools/3d/object_viewer/particle_workspace.cpp +++ b/code/nel/tools/3d/object_viewer/particle_workspace.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/tools/3d/object_viewer/pick_sound.cpp b/code/nel/tools/3d/object_viewer/pick_sound.cpp index 181fec40d..01261cdec 100644 --- a/code/nel/tools/3d/object_viewer/pick_sound.cpp +++ b/code/nel/tools/3d/object_viewer/pick_sound.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/tools/3d/object_viewer/pick_sound.h b/code/nel/tools/3d/object_viewer/pick_sound.h index cbcf74601..486f1e090 100644 --- a/code/nel/tools/3d/object_viewer/pick_sound.h +++ b/code/nel/tools/3d/object_viewer/pick_sound.h @@ -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/tools/3d/object_viewer/precomputed_rotations_dlg.cpp b/code/nel/tools/3d/object_viewer/precomputed_rotations_dlg.cpp index 8897955f5..ecc99d606 100644 --- a/code/nel/tools/3d/object_viewer/precomputed_rotations_dlg.cpp +++ b/code/nel/tools/3d/object_viewer/precomputed_rotations_dlg.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/tools/3d/object_viewer/ps_mover_dlg.cpp b/code/nel/tools/3d/object_viewer/ps_mover_dlg.cpp index e1ac67c30..5854ed40e 100644 --- a/code/nel/tools/3d/object_viewer/ps_mover_dlg.cpp +++ b/code/nel/tools/3d/object_viewer/ps_mover_dlg.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/tools/3d/object_viewer/scheme_bank_dlg.cpp b/code/nel/tools/3d/object_viewer/scheme_bank_dlg.cpp index 10ebbbfcb..2225d32bc 100644 --- a/code/nel/tools/3d/object_viewer/scheme_bank_dlg.cpp +++ b/code/nel/tools/3d/object_viewer/scheme_bank_dlg.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/tools/3d/object_viewer/select_string.cpp b/code/nel/tools/3d/object_viewer/select_string.cpp index d38285a70..0a5240534 100644 --- a/code/nel/tools/3d/object_viewer/select_string.cpp +++ b/code/nel/tools/3d/object_viewer/select_string.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/tools/3d/object_viewer/skeleton_scale_dlg.cpp b/code/nel/tools/3d/object_viewer/skeleton_scale_dlg.cpp index d444bb31e..9c1ba8809 100644 --- a/code/nel/tools/3d/object_viewer/skeleton_scale_dlg.cpp +++ b/code/nel/tools/3d/object_viewer/skeleton_scale_dlg.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/tools/3d/object_viewer/slot_dlg.cpp b/code/nel/tools/3d/object_viewer/slot_dlg.cpp index 374ac99de..aba65d8bb 100644 --- a/code/nel/tools/3d/object_viewer/slot_dlg.cpp +++ b/code/nel/tools/3d/object_viewer/slot_dlg.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/tools/3d/object_viewer/snapshot_tool_dlg.cpp b/code/nel/tools/3d/object_viewer/snapshot_tool_dlg.cpp index ca5b7f549..159040b1c 100644 --- a/code/nel/tools/3d/object_viewer/snapshot_tool_dlg.cpp +++ b/code/nel/tools/3d/object_viewer/snapshot_tool_dlg.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/tools/3d/object_viewer/sound_anim_dlg.cpp b/code/nel/tools/3d/object_viewer/sound_anim_dlg.cpp index a212f84fa..472659c64 100644 --- a/code/nel/tools/3d/object_viewer/sound_anim_dlg.cpp +++ b/code/nel/tools/3d/object_viewer/sound_anim_dlg.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/tools/3d/object_viewer/sound_anim_view.cpp b/code/nel/tools/3d/object_viewer/sound_anim_view.cpp index acc7828c0..a7c039e1c 100644 --- a/code/nel/tools/3d/object_viewer/sound_anim_view.cpp +++ b/code/nel/tools/3d/object_viewer/sound_anim_view.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/tools/3d/object_viewer/sound_system.cpp b/code/nel/tools/3d/object_viewer/sound_system.cpp index d1c0072ba..22d4a374b 100644 --- a/code/nel/tools/3d/object_viewer/sound_system.cpp +++ b/code/nel/tools/3d/object_viewer/sound_system.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/tools/3d/object_viewer/start_stop_particle_system.cpp b/code/nel/tools/3d/object_viewer/start_stop_particle_system.cpp index 3fbf5b29a..ed575881e 100644 --- a/code/nel/tools/3d/object_viewer/start_stop_particle_system.cpp +++ b/code/nel/tools/3d/object_viewer/start_stop_particle_system.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/tools/3d/object_viewer/std_afx.h b/code/nel/tools/3d/object_viewer/std_afx.h index 7bee59e2f..998a7ffa0 100644 --- a/code/nel/tools/3d/object_viewer/std_afx.h +++ b/code/nel/tools/3d/object_viewer/std_afx.h @@ -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/tools/3d/object_viewer/texture_chooser.cpp b/code/nel/tools/3d/object_viewer/texture_chooser.cpp index e87a33315..f8416ca36 100644 --- a/code/nel/tools/3d/object_viewer/texture_chooser.cpp +++ b/code/nel/tools/3d/object_viewer/texture_chooser.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/tools/3d/object_viewer/vegetable_copy_dlg.cpp b/code/nel/tools/3d/object_viewer/vegetable_copy_dlg.cpp index d0015d26d..5cfa6d96c 100644 --- a/code/nel/tools/3d/object_viewer/vegetable_copy_dlg.cpp +++ b/code/nel/tools/3d/object_viewer/vegetable_copy_dlg.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/tools/3d/object_viewer/vegetable_density_page.cpp b/code/nel/tools/3d/object_viewer/vegetable_density_page.cpp index f86e681a7..0f5a49fae 100644 --- a/code/nel/tools/3d/object_viewer/vegetable_density_page.cpp +++ b/code/nel/tools/3d/object_viewer/vegetable_density_page.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/tools/3d/object_viewer/vegetable_dlg.cpp b/code/nel/tools/3d/object_viewer/vegetable_dlg.cpp index d9799408a..e1d420b1d 100644 --- a/code/nel/tools/3d/object_viewer/vegetable_dlg.cpp +++ b/code/nel/tools/3d/object_viewer/vegetable_dlg.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/tools/3d/object_viewer/vegetable_edit_tools.cpp b/code/nel/tools/3d/object_viewer/vegetable_edit_tools.cpp index 072d319d7..df02a5242 100644 --- a/code/nel/tools/3d/object_viewer/vegetable_edit_tools.cpp +++ b/code/nel/tools/3d/object_viewer/vegetable_edit_tools.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/tools/3d/object_viewer/vegetable_noise_value_dlg.cpp b/code/nel/tools/3d/object_viewer/vegetable_noise_value_dlg.cpp index 5b3360898..8790149dd 100644 --- a/code/nel/tools/3d/object_viewer/vegetable_noise_value_dlg.cpp +++ b/code/nel/tools/3d/object_viewer/vegetable_noise_value_dlg.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/tools/3d/object_viewer/vegetable_select_dlg.cpp b/code/nel/tools/3d/object_viewer/vegetable_select_dlg.cpp index b6e6df97a..78168939b 100644 --- a/code/nel/tools/3d/object_viewer/vegetable_select_dlg.cpp +++ b/code/nel/tools/3d/object_viewer/vegetable_select_dlg.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/tools/3d/object_viewer/vegetable_wind_dlg.cpp b/code/nel/tools/3d/object_viewer/vegetable_wind_dlg.cpp index 79533b623..6251f1953 100644 --- a/code/nel/tools/3d/object_viewer/vegetable_wind_dlg.cpp +++ b/code/nel/tools/3d/object_viewer/vegetable_wind_dlg.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/tools/3d/object_viewer/water_pool_editor.cpp b/code/nel/tools/3d/object_viewer/water_pool_editor.cpp index 5f5c0cc24..ab95a89ce 100644 --- a/code/nel/tools/3d/object_viewer/water_pool_editor.cpp +++ b/code/nel/tools/3d/object_viewer/water_pool_editor.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/tools/3d/object_viewer_exe/std_afx.h b/code/nel/tools/3d/object_viewer_exe/std_afx.h index f99ca7a0c..ed3403d5b 100644 --- a/code/nel/tools/3d/object_viewer_exe/std_afx.h +++ b/code/nel/tools/3d/object_viewer_exe/std_afx.h @@ -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) 2010-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/tools/3d/panoply_maker/panoply_maker.cpp b/code/nel/tools/3d/panoply_maker/panoply_maker.cpp index 5676bb89a..dc12e3e5f 100644 --- a/code/nel/tools/3d/panoply_maker/panoply_maker.cpp +++ b/code/nel/tools/3d/panoply_maker/panoply_maker.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) 2010 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/tools/3d/panoply_preview/main_window.cpp b/code/nel/tools/3d/panoply_preview/main_window.cpp index ea415ba3a..1b743d439 100644 --- a/code/nel/tools/3d/panoply_preview/main_window.cpp +++ b/code/nel/tools/3d/panoply_preview/main_window.cpp @@ -1,5 +1,5 @@ // NeL - MMORPG Framework -// Copyright (C) 2014 Jan BOON (jan.boon@kaetemi.be) +// Copyright (C) 2014-2016 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 diff --git a/code/nel/tools/3d/panoply_preview/main_window.h b/code/nel/tools/3d/panoply_preview/main_window.h index 3e3d2f025..681fba57e 100644 --- a/code/nel/tools/3d/panoply_preview/main_window.h +++ b/code/nel/tools/3d/panoply_preview/main_window.h @@ -1,5 +1,5 @@ // NeL - MMORPG Framework -// Copyright (C) 2014 Jan BOON (jan.boon@kaetemi.be) +// Copyright (C) 2014-2016 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 diff --git a/code/nel/tools/3d/panoply_preview/panoply_preview.cpp b/code/nel/tools/3d/panoply_preview/panoply_preview.cpp index 1eae30d9c..cc53e4531 100644 --- a/code/nel/tools/3d/panoply_preview/panoply_preview.cpp +++ b/code/nel/tools/3d/panoply_preview/panoply_preview.cpp @@ -1,5 +1,5 @@ // NeL - MMORPG Framework -// Copyright (C) 2014 Jan BOON (jan.boon@kaetemi.be) +// Copyright (C) 2014-2016 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 diff --git a/code/nel/tools/3d/panoply_preview/panoply_preview.h b/code/nel/tools/3d/panoply_preview/panoply_preview.h index 9fbe2bad3..8cebfa1a6 100644 --- a/code/nel/tools/3d/panoply_preview/panoply_preview.h +++ b/code/nel/tools/3d/panoply_preview/panoply_preview.h @@ -1,5 +1,5 @@ // NeL - MMORPG Framework -// Copyright (C) 2014 Jan BOON (jan.boon@kaetemi.be) +// Copyright (C) 2014-2016 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 diff --git a/code/nel/tools/3d/panoply_preview/tool_config.h b/code/nel/tools/3d/panoply_preview/tool_config.h index 94e53d2dc..cb4b6d102 100644 --- a/code/nel/tools/3d/panoply_preview/tool_config.h +++ b/code/nel/tools/3d/panoply_preview/tool_config.h @@ -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) 2016 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/tools/3d/panoply_preview/tool_main.cpp b/code/nel/tools/3d/panoply_preview/tool_main.cpp index 9c12f6f65..a84bf61f1 100644 --- a/code/nel/tools/3d/panoply_preview/tool_main.cpp +++ b/code/nel/tools/3d/panoply_preview/tool_main.cpp @@ -1,5 +1,5 @@ // NeL - MMORPG Framework -// Copyright (C) 2014 Jan BOON (jan.boon@kaetemi.be) +// Copyright (C) 2014-2016 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 diff --git a/code/nel/tools/3d/panoply_preview/tool_main.h b/code/nel/tools/3d/panoply_preview/tool_main.h index 75eae7204..70f765f3f 100644 --- a/code/nel/tools/3d/panoply_preview/tool_main.h +++ b/code/nel/tools/3d/panoply_preview/tool_main.h @@ -1,5 +1,5 @@ // NeL - MMORPG Framework -// Copyright (C) 2014 Jan BOON (jan.boon@kaetemi.be) +// Copyright (C) 2014-2016 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 diff --git a/code/nel/tools/3d/plugin_max/nel_3dsmax_shared/StdAfx.cpp b/code/nel/tools/3d/plugin_max/nel_3dsmax_shared/StdAfx.cpp index e0a8e62f6..eaadf1b01 100644 --- a/code/nel/tools/3d/plugin_max/nel_3dsmax_shared/StdAfx.cpp +++ b/code/nel/tools/3d/plugin_max/nel_3dsmax_shared/StdAfx.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/tools/3d/plugin_max/nel_3dsmax_shared/nel_3dsmax_shared.cpp b/code/nel/tools/3d/plugin_max/nel_3dsmax_shared/nel_3dsmax_shared.cpp index 3b73a3533..35715b971 100644 --- a/code/nel/tools/3d/plugin_max/nel_3dsmax_shared/nel_3dsmax_shared.cpp +++ b/code/nel/tools/3d/plugin_max/nel_3dsmax_shared/nel_3dsmax_shared.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) 2010-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/tools/3d/plugin_max/nel_3dsmax_shared/nel_3dsmax_shared.h b/code/nel/tools/3d/plugin_max/nel_3dsmax_shared/nel_3dsmax_shared.h index 19ebdf817..7230270cb 100644 --- a/code/nel/tools/3d/plugin_max/nel_3dsmax_shared/nel_3dsmax_shared.h +++ b/code/nel/tools/3d/plugin_max/nel_3dsmax_shared/nel_3dsmax_shared.h @@ -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) 2010-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/tools/3d/plugin_max/nel_3dsmax_shared/string_common.h b/code/nel/tools/3d/plugin_max/nel_3dsmax_shared/string_common.h index 72ae6adee..737b1a5dd 100644 --- a/code/nel/tools/3d/plugin_max/nel_3dsmax_shared/string_common.h +++ b/code/nel/tools/3d/plugin_max/nel_3dsmax_shared/string_common.h @@ -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/tools/3d/plugin_max/nel_export/DllEntry.cpp b/code/nel/tools/3d/plugin_max/nel_export/DllEntry.cpp index 7378fc8ca..38ee9307e 100644 --- a/code/nel/tools/3d/plugin_max/nel_export/DllEntry.cpp +++ b/code/nel/tools/3d/plugin_max/nel_export/DllEntry.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) 2010-2011 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/tools/3d/plugin_max/nel_export/nel_export.cpp b/code/nel/tools/3d/plugin_max/nel_export/nel_export.cpp index fdedc9a3d..6e8fb4725 100644 --- a/code/nel/tools/3d/plugin_max/nel_export/nel_export.cpp +++ b/code/nel/tools/3d/plugin_max/nel_export/nel_export.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) 2010-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/tools/3d/plugin_max/nel_export/nel_export.h b/code/nel/tools/3d/plugin_max/nel_export/nel_export.h index 3cf20cf47..08b2671f2 100644 --- a/code/nel/tools/3d/plugin_max/nel_export/nel_export.h +++ b/code/nel/tools/3d/plugin_max/nel_export/nel_export.h @@ -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) 2010 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/tools/3d/plugin_max/nel_export/nel_export_export.cpp b/code/nel/tools/3d/plugin_max/nel_export/nel_export_export.cpp index 49e1e5ea3..8e39c0f3d 100644 --- a/code/nel/tools/3d/plugin_max/nel_export/nel_export_export.cpp +++ b/code/nel/tools/3d/plugin_max/nel_export/nel_export_export.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) 2010-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/tools/3d/plugin_max/nel_export/nel_export_filetools.cpp b/code/nel/tools/3d/plugin_max/nel_export/nel_export_filetools.cpp index ea5444fca..5562ab493 100644 --- a/code/nel/tools/3d/plugin_max/nel_export/nel_export_filetools.cpp +++ b/code/nel/tools/3d/plugin_max/nel_export/nel_export_filetools.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/tools/3d/plugin_max/nel_export/nel_export_node_properties.cpp b/code/nel/tools/3d/plugin_max/nel_export/nel_export_node_properties.cpp index ef5e4c7e7..4ec04c1e3 100644 --- a/code/nel/tools/3d/plugin_max/nel_export/nel_export_node_properties.cpp +++ b/code/nel/tools/3d/plugin_max/nel_export/nel_export_node_properties.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) 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 // published by the Free Software Foundation, either version 3 of the diff --git a/code/nel/tools/3d/plugin_max/nel_export/nel_export_scene.cpp b/code/nel/tools/3d/plugin_max/nel_export/nel_export_scene.cpp index 9a57dfeeb..5e564face 100644 --- a/code/nel/tools/3d/plugin_max/nel_export/nel_export_scene.cpp +++ b/code/nel/tools/3d/plugin_max/nel_export/nel_export_scene.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/tools/3d/plugin_max/nel_export/nel_export_script.cpp b/code/nel/tools/3d/plugin_max/nel_export/nel_export_script.cpp index d28cb48b0..0d5b2b270 100644 --- a/code/nel/tools/3d/plugin_max/nel_export/nel_export_script.cpp +++ b/code/nel/tools/3d/plugin_max/nel_export/nel_export_script.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) 2010-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/tools/3d/plugin_max/nel_export/nel_export_swt.cpp b/code/nel/tools/3d/plugin_max/nel_export/nel_export_swt.cpp index e9ca83451..ff77af320 100644 --- a/code/nel/tools/3d/plugin_max/nel_export/nel_export_swt.cpp +++ b/code/nel/tools/3d/plugin_max/nel_export/nel_export_swt.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/tools/3d/plugin_max/nel_export/nel_export_view.cpp b/code/nel/tools/3d/plugin_max/nel_export/nel_export_view.cpp index 431155929..415aa742a 100644 --- a/code/nel/tools/3d/plugin_max/nel_export/nel_export_view.cpp +++ b/code/nel/tools/3d/plugin_max/nel_export/nel_export_view.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/tools/3d/plugin_max/nel_export/progress.cpp b/code/nel/tools/3d/plugin_max/nel_export/progress.cpp index 495c4687d..6821b19c5 100644 --- a/code/nel/tools/3d/plugin_max/nel_export/progress.cpp +++ b/code/nel/tools/3d/plugin_max/nel_export/progress.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/tools/3d/plugin_max/nel_export/std_afx.cpp b/code/nel/tools/3d/plugin_max/nel_export/std_afx.cpp index 424138cda..106862518 100644 --- a/code/nel/tools/3d/plugin_max/nel_export/std_afx.cpp +++ b/code/nel/tools/3d/plugin_max/nel_export/std_afx.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/tools/3d/plugin_max/nel_export/std_afx.h b/code/nel/tools/3d/plugin_max/nel_export/std_afx.h index 27dd8372a..5ee715b77 100644 --- a/code/nel/tools/3d/plugin_max/nel_export/std_afx.h +++ b/code/nel/tools/3d/plugin_max/nel_export/std_afx.h @@ -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) 2011-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/tools/3d/plugin_max/nel_mesh_lib/StdAfx.cpp b/code/nel/tools/3d/plugin_max/nel_mesh_lib/StdAfx.cpp index e9230c36b..e4d097482 100644 --- a/code/nel/tools/3d/plugin_max/nel_mesh_lib/StdAfx.cpp +++ b/code/nel/tools/3d/plugin_max/nel_mesh_lib/StdAfx.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/tools/3d/plugin_max/nel_mesh_lib/StdAfx.h b/code/nel/tools/3d/plugin_max/nel_mesh_lib/StdAfx.h index cb2cec48f..c95eb92d4 100644 --- a/code/nel/tools/3d/plugin_max/nel_mesh_lib/StdAfx.h +++ b/code/nel/tools/3d/plugin_max/nel_mesh_lib/StdAfx.h @@ -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) 2011 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/tools/3d/plugin_max/nel_mesh_lib/calc_lm.cpp b/code/nel/tools/3d/plugin_max/nel_mesh_lib/calc_lm.cpp index 30d1f929c..d7c7fadca 100644 --- a/code/nel/tools/3d/plugin_max/nel_mesh_lib/calc_lm.cpp +++ b/code/nel/tools/3d/plugin_max/nel_mesh_lib/calc_lm.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) 2010-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/tools/3d/plugin_max/nel_mesh_lib/calc_lm_rt.cpp b/code/nel/tools/3d/plugin_max/nel_mesh_lib/calc_lm_rt.cpp index c35ff796e..53aff48ba 100644 --- a/code/nel/tools/3d/plugin_max/nel_mesh_lib/calc_lm_rt.cpp +++ b/code/nel/tools/3d/plugin_max/nel_mesh_lib/calc_lm_rt.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/tools/3d/plugin_max/nel_mesh_lib/export_anim.cpp b/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_anim.cpp index d3ef46de3..00304a547 100644 --- a/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_anim.cpp +++ b/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_anim.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) 2010-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/tools/3d/plugin_max/nel_mesh_lib/export_collision.cpp b/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_collision.cpp index 58f0db1d7..b659fe6ee 100644 --- a/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_collision.cpp +++ b/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_collision.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) 2010-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/tools/3d/plugin_max/nel_mesh_lib/export_flare.cpp b/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_flare.cpp index 8249eda39..cfa8edbfc 100644 --- a/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_flare.cpp +++ b/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_flare.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) 2014 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/tools/3d/plugin_max/nel_mesh_lib/export_light.cpp b/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_light.cpp index 3a497419b..7934ff66b 100644 --- a/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_light.cpp +++ b/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_light.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) 2010-2014 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/tools/3d/plugin_max/nel_mesh_lib/export_lod_character.cpp b/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_lod_character.cpp index 7feca2009..906ae1374 100644 --- a/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_lod_character.cpp +++ b/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_lod_character.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) 2010-2014 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/tools/3d/plugin_max/nel_mesh_lib/export_material.cpp b/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_material.cpp index 89e8a8aa2..0e27f66a2 100644 --- a/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_material.cpp +++ b/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_material.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) 2010-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/tools/3d/plugin_max/nel_mesh_lib/export_mesh.cpp b/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_mesh.cpp index 208e2c4fc..17d4abbf4 100644 --- a/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_mesh.cpp +++ b/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_mesh.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) 2010-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/tools/3d/plugin_max/nel_mesh_lib/export_mesh_interface.cpp b/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_mesh_interface.cpp index 6dd2e1ee4..3a0d26a00 100644 --- a/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_mesh_interface.cpp +++ b/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_mesh_interface.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) 2010-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/tools/3d/plugin_max/nel_mesh_lib/export_misc.cpp b/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_misc.cpp index 7ef95260d..584f6709e 100644 --- a/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_misc.cpp +++ b/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_misc.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) 2010-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/tools/3d/plugin_max/nel_mesh_lib/export_nel.h b/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_nel.h index 178190f13..cc18196cb 100644 --- a/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_nel.h +++ b/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_nel.h @@ -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) 2010 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/tools/3d/plugin_max/nel_mesh_lib/export_particle_system.cpp b/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_particle_system.cpp index 02e3f9018..7bad22740 100644 --- a/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_particle_system.cpp +++ b/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_particle_system.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) 2010-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/tools/3d/plugin_max/nel_mesh_lib/export_radial_normal.cpp b/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_radial_normal.cpp index 91fcd99db..3e9711611 100644 --- a/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_radial_normal.cpp +++ b/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_radial_normal.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/tools/3d/plugin_max/nel_mesh_lib/export_scene.cpp b/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_scene.cpp index 63bf28a49..daa565616 100644 --- a/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_scene.cpp +++ b/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_scene.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) 2010-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/tools/3d/plugin_max/nel_mesh_lib/export_script.cpp b/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_script.cpp index 1d495abc7..f88b5756f 100644 --- a/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_script.cpp +++ b/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_script.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) 2011-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/tools/3d/plugin_max/nel_mesh_lib/export_skinning.cpp b/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_skinning.cpp index e099dc1c3..c152da136 100644 --- a/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_skinning.cpp +++ b/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_skinning.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) 2010-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/tools/3d/plugin_max/nel_mesh_lib/export_vegetable.cpp b/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_vegetable.cpp index a39388786..dee94ea7d 100644 --- a/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_vegetable.cpp +++ b/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_vegetable.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) 2010-2014 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/tools/3d/plugin_max/nel_patch_converter/DllEntry.cpp b/code/nel/tools/3d/plugin_max/nel_patch_converter/DllEntry.cpp index 0fe5bc556..8d87fd2a4 100644 --- a/code/nel/tools/3d/plugin_max/nel_patch_converter/DllEntry.cpp +++ b/code/nel/tools/3d/plugin_max/nel_patch_converter/DllEntry.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) 2010-2011 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/tools/3d/plugin_max/nel_patch_converter/PO2RPO.h b/code/nel/tools/3d/plugin_max/nel_patch_converter/PO2RPO.h index 34e3da363..2bd64a3e1 100644 --- a/code/nel/tools/3d/plugin_max/nel_patch_converter/PO2RPO.h +++ b/code/nel/tools/3d/plugin_max/nel_patch_converter/PO2RPO.h @@ -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/tools/3d/plugin_max/nel_patch_converter/nel_patch_converter.cpp b/code/nel/tools/3d/plugin_max/nel_patch_converter/nel_patch_converter.cpp index 4b7483057..7b55837ba 100644 --- a/code/nel/tools/3d/plugin_max/nel_patch_converter/nel_patch_converter.cpp +++ b/code/nel/tools/3d/plugin_max/nel_patch_converter/nel_patch_converter.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/tools/3d/plugin_max/nel_patch_converter/script.cpp b/code/nel/tools/3d/plugin_max/nel_patch_converter/script.cpp index 8ceaddb6e..2c2f100f7 100644 --- a/code/nel/tools/3d/plugin_max/nel_patch_converter/script.cpp +++ b/code/nel/tools/3d/plugin_max/nel_patch_converter/script.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) 2011-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/tools/3d/plugin_max/nel_patch_lib/nel_patch_mesh.cpp b/code/nel/tools/3d/plugin_max/nel_patch_lib/nel_patch_mesh.cpp index 72d31a85d..950b53f01 100644 --- a/code/nel/tools/3d/plugin_max/nel_patch_lib/nel_patch_mesh.cpp +++ b/code/nel/tools/3d/plugin_max/nel_patch_lib/nel_patch_mesh.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/tools/3d/plugin_max/nel_patch_lib/nel_patch_mesh.h b/code/nel/tools/3d/plugin_max/nel_patch_lib/nel_patch_mesh.h index e8cdf079b..6e2fd2cfd 100644 --- a/code/nel/tools/3d/plugin_max/nel_patch_lib/nel_patch_mesh.h +++ b/code/nel/tools/3d/plugin_max/nel_patch_lib/nel_patch_mesh.h @@ -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/tools/3d/plugin_max/nel_patch_lib/rpo.cpp b/code/nel/tools/3d/plugin_max/nel_patch_lib/rpo.cpp index 318b2902d..33b08fbe0 100644 --- a/code/nel/tools/3d/plugin_max/nel_patch_lib/rpo.cpp +++ b/code/nel/tools/3d/plugin_max/nel_patch_lib/rpo.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/tools/3d/plugin_max/nel_patch_lib/rpo.h b/code/nel/tools/3d/plugin_max/nel_patch_lib/rpo.h index 0f4ead01c..78010cbc7 100644 --- a/code/nel/tools/3d/plugin_max/nel_patch_lib/rpo.h +++ b/code/nel/tools/3d/plugin_max/nel_patch_lib/rpo.h @@ -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/tools/3d/plugin_max/nel_patch_lib/rpo2nel.cpp b/code/nel/tools/3d/plugin_max/nel_patch_lib/rpo2nel.cpp index 6fe193a30..c69c97903 100644 --- a/code/nel/tools/3d/plugin_max/nel_patch_lib/rpo2nel.cpp +++ b/code/nel/tools/3d/plugin_max/nel_patch_lib/rpo2nel.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) 2011-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/tools/3d/plugin_max/nel_patch_lib/stdafx.cpp b/code/nel/tools/3d/plugin_max/nel_patch_lib/stdafx.cpp index 8a8a72179..43e1a6a7b 100644 --- a/code/nel/tools/3d/plugin_max/nel_patch_lib/stdafx.cpp +++ b/code/nel/tools/3d/plugin_max/nel_patch_lib/stdafx.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/tools/3d/plugin_max/tile_utility/DllEntry.cpp b/code/nel/tools/3d/plugin_max/tile_utility/DllEntry.cpp index fbd53ca37..96ad44e28 100644 --- a/code/nel/tools/3d/plugin_max/tile_utility/DllEntry.cpp +++ b/code/nel/tools/3d/plugin_max/tile_utility/DllEntry.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) 2010-2011 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/tools/3d/plugin_max/tile_utility/rgbadd.cpp b/code/nel/tools/3d/plugin_max/tile_utility/rgbadd.cpp index 3c44efb4d..0f1480502 100644 --- a/code/nel/tools/3d/plugin_max/tile_utility/rgbadd.cpp +++ b/code/nel/tools/3d/plugin_max/tile_utility/rgbadd.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/tools/3d/plugin_max/tile_utility/tile_utility.cpp b/code/nel/tools/3d/plugin_max/tile_utility/tile_utility.cpp index 8110dbab9..42ef0890f 100644 --- a/code/nel/tools/3d/plugin_max/tile_utility/tile_utility.cpp +++ b/code/nel/tools/3d/plugin_max/tile_utility/tile_utility.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/tools/3d/plugin_max/tile_utility/tile_utility.h b/code/nel/tools/3d/plugin_max/tile_utility/tile_utility.h index 9736be511..641e5ade5 100644 --- a/code/nel/tools/3d/plugin_max/tile_utility/tile_utility.h +++ b/code/nel/tools/3d/plugin_max/tile_utility/tile_utility.h @@ -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/tools/3d/shapes_exporter/main.cpp b/code/nel/tools/3d/shapes_exporter/main.cpp index 8c42f740c..adc56ac32 100644 --- a/code/nel/tools/3d/shapes_exporter/main.cpp +++ b/code/nel/tools/3d/shapes_exporter/main.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) 2014-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/tools/3d/tga_2_dds/tga2dds.cpp b/code/nel/tools/3d/tga_2_dds/tga2dds.cpp index d7158c045..02adf4038 100644 --- a/code/nel/tools/3d/tga_2_dds/tga2dds.cpp +++ b/code/nel/tools/3d/tga_2_dds/tga2dds.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) 2010-2015 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/tools/3d/tile_edit/Browse.cpp b/code/nel/tools/3d/tile_edit/Browse.cpp index b96979d4d..fee54410f 100644 --- a/code/nel/tools/3d/tile_edit/Browse.cpp +++ b/code/nel/tools/3d/tile_edit/Browse.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 diff --git a/code/nel/tools/3d/tile_edit/SelectionTerritoire.cpp b/code/nel/tools/3d/tile_edit/SelectionTerritoire.cpp index a8a66e3c9..8bd360f77 100644 --- a/code/nel/tools/3d/tile_edit/SelectionTerritoire.cpp +++ b/code/nel/tools/3d/tile_edit/SelectionTerritoire.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 diff --git a/code/nel/tools/3d/tile_edit/View.cpp b/code/nel/tools/3d/tile_edit/View.cpp index fb6cd6890..4590af2c0 100644 --- a/code/nel/tools/3d/tile_edit/View.cpp +++ b/code/nel/tools/3d/tile_edit/View.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) 2014-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/tools/3d/tile_edit/choose_veget_set.cpp b/code/nel/tools/3d/tile_edit/choose_veget_set.cpp index a0256bd89..2ed8f570d 100644 --- a/code/nel/tools/3d/tile_edit/choose_veget_set.cpp +++ b/code/nel/tools/3d/tile_edit/choose_veget_set.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 diff --git a/code/nel/tools/3d/tile_edit_qt/browser_model.cpp b/code/nel/tools/3d/tile_edit_qt/browser_model.cpp index eab1b193e..23edc2204 100644 --- a/code/nel/tools/3d/tile_edit_qt/browser_model.cpp +++ b/code/nel/tools/3d/tile_edit_qt/browser_model.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) 2010 Matt RAYKOWSKI (sfb) +// // 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/tools/3d/zone_dependencies/zone_dependencies.cpp b/code/nel/tools/3d/zone_dependencies/zone_dependencies.cpp index 846902cde..933938023 100644 --- a/code/nel/tools/3d/zone_dependencies/zone_dependencies.cpp +++ b/code/nel/tools/3d/zone_dependencies/zone_dependencies.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) 2014 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/tools/3d/zone_elevation/zone_elevation.cpp b/code/nel/tools/3d/zone_elevation/zone_elevation.cpp index 3287a68ea..7fbd07e58 100644 --- a/code/nel/tools/3d/zone_elevation/zone_elevation.cpp +++ b/code/nel/tools/3d/zone_elevation/zone_elevation.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/tools/3d/zone_ig_lighter/zone_ig_lighter.cpp b/code/nel/tools/3d/zone_ig_lighter/zone_ig_lighter.cpp index a6636730f..26fc9179a 100644 --- a/code/nel/tools/3d/zone_ig_lighter/zone_ig_lighter.cpp +++ b/code/nel/tools/3d/zone_ig_lighter/zone_ig_lighter.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) 2014 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/tools/3d/zone_lighter/zone_lighter.cpp b/code/nel/tools/3d/zone_lighter/zone_lighter.cpp index 04c165a01..672b9511a 100644 --- a/code/nel/tools/3d/zone_lighter/zone_lighter.cpp +++ b/code/nel/tools/3d/zone_lighter/zone_lighter.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) 2014 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/tools/3d/zviewer/zviewer.cpp b/code/nel/tools/3d/zviewer/zviewer.cpp index 3af4df8d2..c6407532f 100644 --- a/code/nel/tools/3d/zviewer/zviewer.cpp +++ b/code/nel/tools/3d/zviewer/zviewer.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) 2014-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/tools/georges/georges2csv/georges2csv.cpp b/code/nel/tools/georges/georges2csv/georges2csv.cpp index 3e1207308..45dcc4006 100644 --- a/code/nel/tools/georges/georges2csv/georges2csv.cpp +++ b/code/nel/tools/georges/georges2csv/georges2csv.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) 2014 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/tools/misc/branch_patcher/StdAfx.h b/code/nel/tools/misc/branch_patcher/StdAfx.h index 3cd3005ba..66b0b1dc0 100644 --- a/code/nel/tools/misc/branch_patcher/StdAfx.h +++ b/code/nel/tools/misc/branch_patcher/StdAfx.h @@ -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) 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 // published by the Free Software Foundation, either version 3 of the diff --git a/code/nel/tools/misc/branch_patcher/branch_patcherDlg.cpp b/code/nel/tools/misc/branch_patcher/branch_patcherDlg.cpp index d185e16b6..99d75f87a 100644 --- a/code/nel/tools/misc/branch_patcher/branch_patcherDlg.cpp +++ b/code/nel/tools/misc/branch_patcher/branch_patcherDlg.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/tools/misc/crash_report/crash_report.cpp b/code/nel/tools/misc/crash_report/crash_report.cpp index 56aa5c87a..85b4f47f6 100644 --- a/code/nel/tools/misc/crash_report/crash_report.cpp +++ b/code/nel/tools/misc/crash_report/crash_report.cpp @@ -1,7 +1,9 @@ // Nel MMORPG framework - Error Reporter // -// Copyright (C) 2015 Laszlo Kis-Adam -// Copyright (C) 2010 Ryzom Core +// Copyright (C) 2015 Laszlo KIS-ADAM (dfighter) +// +// This source file has been modified by the following contributors: +// Copyright (C) 2010-2016 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 diff --git a/code/nel/tools/misc/crash_report/crash_report_data.h b/code/nel/tools/misc/crash_report/crash_report_data.h index f2d222189..d637fc998 100644 --- a/code/nel/tools/misc/crash_report/crash_report_data.h +++ b/code/nel/tools/misc/crash_report/crash_report_data.h @@ -1,7 +1,6 @@ // Ryzom Core MMORPG framework - Error Reporter // -// Copyright (C) 2015 Laszlo Kis-Adam -// Copyright (C) 2010 Ryzom Core +// Copyright (C) 2010-2015 Laszlo KIS-ADAM (dfighter) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/nel/tools/misc/crash_report/crash_report_socket.cpp b/code/nel/tools/misc/crash_report/crash_report_socket.cpp index f2a14e84b..94c0ed103 100644 --- a/code/nel/tools/misc/crash_report/crash_report_socket.cpp +++ b/code/nel/tools/misc/crash_report/crash_report_socket.cpp @@ -1,7 +1,9 @@ // Nel MMORPG framework - Error Reporter // -// Copyright (C) 2015 Laszlo Kis-Adam -// Copyright (C) 2010 Ryzom Core +// Copyright (C) 2015 Laszlo KIS-ADAM (dfighter) +// +// This source file has been modified by the following contributors: +// Copyright (C) 2010-2015 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 diff --git a/code/nel/tools/misc/crash_report/crash_report_socket.h b/code/nel/tools/misc/crash_report/crash_report_socket.h index 23965bf5d..fae2f4558 100644 --- a/code/nel/tools/misc/crash_report/crash_report_socket.h +++ b/code/nel/tools/misc/crash_report/crash_report_socket.h @@ -1,7 +1,6 @@ // Nel MMORPG framework - Error Reporter // -// Copyright (C) 2015 Laszlo Kis-Adam -// Copyright (C) 2010 Ryzom Core +// Copyright (C) 2010-2015 Laszlo KIS-ADAM (dfighter) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/nel/tools/misc/crash_report/crash_report_widget.cpp b/code/nel/tools/misc/crash_report/crash_report_widget.cpp index c41900303..d5423873d 100644 --- a/code/nel/tools/misc/crash_report/crash_report_widget.cpp +++ b/code/nel/tools/misc/crash_report/crash_report_widget.cpp @@ -1,7 +1,9 @@ // Nel MMORPG framework - Error Reporter // -// Copyright (C) 2015 Laszlo Kis-Adam -// Copyright (C) 2010 Ryzom Core +// Copyright (C) 2015 Laszlo KIS-ADAM (dfighter) +// +// This source file has been modified by the following contributors: +// Copyright (C) 2010-2015 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 diff --git a/code/nel/tools/misc/crash_report/crash_report_widget.h b/code/nel/tools/misc/crash_report/crash_report_widget.h index fc5eae070..7c330c28c 100644 --- a/code/nel/tools/misc/crash_report/crash_report_widget.h +++ b/code/nel/tools/misc/crash_report/crash_report_widget.h @@ -1,7 +1,6 @@ // Nel MMORPG framework - Error Reporter // -// Copyright (C) 2015 Laszlo Kis-Adam -// Copyright (C) 2010 Ryzom Core +// Copyright (C) 2010-2015 Laszlo KIS-ADAM (dfighter) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/nel/tools/misc/data_mirror/data_mirror.cpp b/code/nel/tools/misc/data_mirror/data_mirror.cpp index 344ecc1ad..03830cff8 100644 --- a/code/nel/tools/misc/data_mirror/data_mirror.cpp +++ b/code/nel/tools/misc/data_mirror/data_mirror.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/tools/misc/data_mirror/data_mirrorDlg.cpp b/code/nel/tools/misc/data_mirror/data_mirrorDlg.cpp index 602e805b2..a7f65aa3a 100644 --- a/code/nel/tools/misc/data_mirror/data_mirrorDlg.cpp +++ b/code/nel/tools/misc/data_mirror/data_mirrorDlg.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/tools/misc/log_analyser/PlugInSelector.cpp b/code/nel/tools/misc/log_analyser/PlugInSelector.cpp index abc5ec03c..2845f5f8c 100644 --- a/code/nel/tools/misc/log_analyser/PlugInSelector.cpp +++ b/code/nel/tools/misc/log_analyser/PlugInSelector.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/tools/misc/log_analyser/StdAfx.h b/code/nel/tools/misc/log_analyser/StdAfx.h index e7c2ae30d..1b385b17d 100644 --- a/code/nel/tools/misc/log_analyser/StdAfx.h +++ b/code/nel/tools/misc/log_analyser/StdAfx.h @@ -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) 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 // published by the Free Software Foundation, either version 3 of the diff --git a/code/nel/tools/misc/log_analyser/ViewDialog.cpp b/code/nel/tools/misc/log_analyser/ViewDialog.cpp index 5710795bf..3a5a725a4 100644 --- a/code/nel/tools/misc/log_analyser/ViewDialog.cpp +++ b/code/nel/tools/misc/log_analyser/ViewDialog.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/tools/misc/log_analyser/log_analyserDlg.cpp b/code/nel/tools/misc/log_analyser/log_analyserDlg.cpp index afc73018f..74988bbab 100644 --- a/code/nel/tools/misc/log_analyser/log_analyserDlg.cpp +++ b/code/nel/tools/misc/log_analyser/log_analyserDlg.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/tools/misc/make_sheet_id/make_sheet_id.cpp b/code/nel/tools/misc/make_sheet_id/make_sheet_id.cpp index a7f893237..be8f9cb53 100644 --- a/code/nel/tools/misc/make_sheet_id/make_sheet_id.cpp +++ b/code/nel/tools/misc/make_sheet_id/make_sheet_id.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) 2012-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/tools/misc/message_box/message_box.cpp b/code/nel/tools/misc/message_box/message_box.cpp index 64a4b93d7..ba2bcbf02 100644 --- a/code/nel/tools/misc/message_box/message_box.cpp +++ b/code/nel/tools/misc/message_box/message_box.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 diff --git a/code/nel/tools/misc/multi_cd_setup_fix/multi_cd_setup_fix.cpp b/code/nel/tools/misc/multi_cd_setup_fix/multi_cd_setup_fix.cpp index ee9b4b9fe..3349035a6 100644 --- a/code/nel/tools/misc/multi_cd_setup_fix/multi_cd_setup_fix.cpp +++ b/code/nel/tools/misc/multi_cd_setup_fix/multi_cd_setup_fix.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 diff --git a/code/nel/tools/misc/probe_timers/main.cpp b/code/nel/tools/misc/probe_timers/main.cpp index de4c1f785..9bfdf20ef 100644 --- a/code/nel/tools/misc/probe_timers/main.cpp +++ b/code/nel/tools/misc/probe_timers/main.cpp @@ -1,5 +1,5 @@ // NeL - MMORPG Framework -// Copyright (C) 2012 by authors +// Copyright (C) 2012 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 diff --git a/code/nel/tools/misc/snp_make/main.cpp b/code/nel/tools/misc/snp_make/main.cpp index a86d497d4..8b94b7afc 100644 --- a/code/nel/tools/misc/snp_make/main.cpp +++ b/code/nel/tools/misc/snp_make/main.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) 2014-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/tools/misc/words_dic/StdAfx.h b/code/nel/tools/misc/words_dic/StdAfx.h index 7f52b209c..6b869df38 100644 --- a/code/nel/tools/misc/words_dic/StdAfx.h +++ b/code/nel/tools/misc/words_dic/StdAfx.h @@ -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) 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 // published by the Free Software Foundation, either version 3 of the diff --git a/code/nel/tools/misc/words_dic/words_dicDlg.cpp b/code/nel/tools/misc/words_dic/words_dicDlg.cpp index cac6c20b2..9ee73eba1 100644 --- a/code/nel/tools/misc/words_dic/words_dicDlg.cpp +++ b/code/nel/tools/misc/words_dic/words_dicDlg.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/tools/misc/xml_packer/xml_packer.cpp b/code/nel/tools/misc/xml_packer/xml_packer.cpp index 7f7417020..1cd61f373 100644 --- a/code/nel/tools/misc/xml_packer/xml_packer.cpp +++ b/code/nel/tools/misc/xml_packer/xml_packer.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) 2015 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/tools/nel_unit_test/ut_misc_string_common.h b/code/nel/tools/nel_unit_test/ut_misc_string_common.h index b7c133e17..022824443 100644 --- a/code/nel/tools/nel_unit_test/ut_misc_string_common.h +++ b/code/nel/tools/nel_unit_test/ut_misc_string_common.h @@ -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/tools/pacs/build_rbank/build_rbank.cpp b/code/nel/tools/pacs/build_rbank/build_rbank.cpp index 833c6c749..cdcaa0e48 100644 --- a/code/nel/tools/pacs/build_rbank/build_rbank.cpp +++ b/code/nel/tools/pacs/build_rbank/build_rbank.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) 2015 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/tools/pacs/build_rbank/build_surf.cpp b/code/nel/tools/pacs/build_rbank/build_surf.cpp index ba75234d1..7172bae3d 100644 --- a/code/nel/tools/pacs/build_rbank/build_surf.cpp +++ b/code/nel/tools/pacs/build_rbank/build_surf.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) 2010-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/tools/pacs/build_rbank/build_surf.h b/code/nel/tools/pacs/build_rbank/build_surf.h index ad0342b1e..14324fab4 100644 --- a/code/nel/tools/pacs/build_rbank/build_surf.h +++ b/code/nel/tools/pacs/build_rbank/build_surf.h @@ -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) 2010 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/tools/pacs/build_rbank/main.cpp b/code/nel/tools/pacs/build_rbank/main.cpp index 8421ed807..318a79131 100644 --- a/code/nel/tools/pacs/build_rbank/main.cpp +++ b/code/nel/tools/pacs/build_rbank/main.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) 2010 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/tools/pacs/build_rbank/prim_checker.cpp b/code/nel/tools/pacs/build_rbank/prim_checker.cpp index 7bd8b74be..cef6b36ae 100644 --- a/code/nel/tools/pacs/build_rbank/prim_checker.cpp +++ b/code/nel/tools/pacs/build_rbank/prim_checker.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) 2014 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/tools/sound/build_samplebank/build_samplebank.cpp b/code/nel/tools/sound/build_samplebank/build_samplebank.cpp index ef3f7c3f5..5442638ab 100644 --- a/code/nel/tools/sound/build_samplebank/build_samplebank.cpp +++ b/code/nel/tools/sound/build_samplebank/build_samplebank.cpp @@ -7,7 +7,7 @@ */ // NeL - MMORPG Framework -// Copyright (C) 2010 Jan Boon (Kaetemi) +// Copyright (C) 2010 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 diff --git a/code/nel/tools/sound/build_sound/build_sound.cpp b/code/nel/tools/sound/build_sound/build_sound.cpp index bacdf7664..98cf45a64 100644 --- a/code/nel/tools/sound/build_sound/build_sound.cpp +++ b/code/nel/tools/sound/build_sound/build_sound.cpp @@ -7,7 +7,7 @@ */ // NeL - MMORPG Framework -// Copyright (C) 2009 Jan Boon (Kaetemi) +// Copyright (C) 2009-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 diff --git a/code/nel/tools/sound/build_soundbank/build_soundbank.cpp b/code/nel/tools/sound/build_soundbank/build_soundbank.cpp index 9829a1898..f00c4df9c 100644 --- a/code/nel/tools/sound/build_soundbank/build_soundbank.cpp +++ b/code/nel/tools/sound/build_soundbank/build_soundbank.cpp @@ -7,7 +7,7 @@ */ // NeL - MMORPG Framework -// Copyright (C) 2010 Jan Boon (Kaetemi) +// Copyright (C) 2010-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 diff --git a/code/nelns/admin_executor_service/log_report.cpp b/code/nelns/admin_executor_service/log_report.cpp index 7106fb9d1..1fb32ce92 100644 --- a/code/nelns/admin_executor_service/log_report.cpp +++ b/code/nelns/admin_executor_service/log_report.cpp @@ -1,6 +1,9 @@ // NeLNS - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2011 Matt RAYKOWSKI (sfb) +// // 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/nelns/admin_service/admin_service.cpp b/code/nelns/admin_service/admin_service.cpp index 6b964f562..9c11347fc 100644 --- a/code/nelns/admin_service/admin_service.cpp +++ b/code/nelns/admin_service/admin_service.cpp @@ -1,6 +1,9 @@ // NeLNS - 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/nelns/login_service/connection_client.cpp b/code/nelns/login_service/connection_client.cpp index ebdef1b9a..6ed1b48a4 100644 --- a/code/nelns/login_service/connection_client.cpp +++ b/code/nelns/login_service/connection_client.cpp @@ -1,6 +1,9 @@ // NeLNS - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2014 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/nelns/login_service/connection_web.cpp b/code/nelns/login_service/connection_web.cpp index e3abb9936..e8008f138 100644 --- a/code/nelns/login_service/connection_web.cpp +++ b/code/nelns/login_service/connection_web.cpp @@ -1,6 +1,9 @@ // NeLNS - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2014 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/nelns/login_service/login_service.h b/code/nelns/login_service/login_service.h index 3d84b1c8e..c98804ff5 100644 --- a/code/nelns/login_service/login_service.h +++ b/code/nelns/login_service/login_service.h @@ -1,6 +1,9 @@ // NeLNS - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2014 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/nelns/login_service/mysql_helper.cpp b/code/nelns/login_service/mysql_helper.cpp index e27960770..2979ca6b2 100644 --- a/code/nelns/login_service/mysql_helper.cpp +++ b/code/nelns/login_service/mysql_helper.cpp @@ -1,6 +1,9 @@ // NeLNS - 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/nelns/login_service/mysql_helper.h b/code/nelns/login_service/mysql_helper.h index ed4ebbd48..0de11088a 100644 --- a/code/nelns/login_service/mysql_helper.h +++ b/code/nelns/login_service/mysql_helper.h @@ -1,6 +1,9 @@ // NeLNS - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2014 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/client/src/actions.cpp b/code/ryzom/client/src/actions.cpp index 7aeaee537..783088b21 100644 --- a/code/ryzom/client/src/actions.cpp +++ b/code/ryzom/client/src/actions.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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/actions.h b/code/ryzom/client/src/actions.h index b177c1818..1e1bffb84 100644 --- a/code/ryzom/client/src/actions.h +++ b/code/ryzom/client/src/actions.h @@ -1,6 +1,10 @@ // Ryzom - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2012 Laszlo KIS-ADAM (dfighter) +// Copyright (C) 2015 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/client/src/app_bundle_utils.cpp b/code/ryzom/client/src/app_bundle_utils.cpp index 4c4753c4f..122ad187e 100644 --- a/code/ryzom/client/src/app_bundle_utils.cpp +++ b/code/ryzom/client/src/app_bundle_utils.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) 2010 Robert TIMM (rti) +// // 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/client/src/app_bundle_utils.h b/code/ryzom/client/src/app_bundle_utils.h index 0bf1c0a46..71421d43b 100644 --- a/code/ryzom/client/src/app_bundle_utils.h +++ b/code/ryzom/client/src/app_bundle_utils.h @@ -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) 2010 Robert TIMM (rti) +// // 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/client/src/attached_fx.cpp b/code/ryzom/client/src/attached_fx.cpp index 7a7b0cd4a..762898f67 100644 --- a/code/ryzom/client/src/attached_fx.cpp +++ b/code/ryzom/client/src/attached_fx.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) 2013 Matt RAYKOWSKI (sfb) +// // 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/client/src/bg_downloader_access.cpp b/code/ryzom/client/src/bg_downloader_access.cpp index 426a4176b..61364ea5f 100644 --- a/code/ryzom/client/src/bg_downloader_access.cpp +++ b/code/ryzom/client/src/bg_downloader_access.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) 2012 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/client/src/browse_faq.cpp b/code/ryzom/client/src/browse_faq.cpp index f56ed0baf..00faf5224 100644 --- a/code/ryzom/client/src/browse_faq.cpp +++ b/code/ryzom/client/src/browse_faq.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) 2014 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/client/src/camera.cpp b/code/ryzom/client/src/camera.cpp index 904a2db49..5ca126c35 100644 --- a/code/ryzom/client/src/camera.cpp +++ b/code/ryzom/client/src/camera.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) 2013-2014 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/client/src/camera.h b/code/ryzom/client/src/camera.h index 037661c3a..59053974b 100644 --- a/code/ryzom/client/src/camera.h +++ b/code/ryzom/client/src/camera.h @@ -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) 2013 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/client/src/camera_recorder.cpp b/code/ryzom/client/src/camera_recorder.cpp index 8f427c321..e863d808d 100644 --- a/code/ryzom/client/src/camera_recorder.cpp +++ b/code/ryzom/client/src/camera_recorder.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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/cdb_synchronised.cpp b/code/ryzom/client/src/cdb_synchronised.cpp index 3d102071b..f947d3696 100644 --- a/code/ryzom/client/src/cdb_synchronised.cpp +++ b/code/ryzom/client/src/cdb_synchronised.cpp @@ -1,6 +1,10 @@ // Ryzom - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) +// Copyright (C) 2013-2016 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/client/src/cdb_synchronised.h b/code/ryzom/client/src/cdb_synchronised.h index e5c2f4876..f4c647294 100644 --- a/code/ryzom/client/src/cdb_synchronised.h +++ b/code/ryzom/client/src/cdb_synchronised.h @@ -1,6 +1,10 @@ // Ryzom - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2013 Jan BOON (Kaetemi) +// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/character_cl.cpp b/code/ryzom/client/src/character_cl.cpp index e64384c0d..447ce8e3d 100644 --- a/code/ryzom/client/src/character_cl.cpp +++ b/code/ryzom/client/src/character_cl.cpp @@ -1,5 +1,10 @@ // Ryzom - MMORPG Framework -// Copyright (C) 2010 Winch Gate Property Limited +// Copyright (C) 2010-2018 Winch Gate Property Limited +// +// This source file has been modified by the following contributors: +// Copyright (C) 2012 Matt RAYKOWSKI (sfb) +// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) +// Copyright (C) 2014-2016 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 diff --git a/code/ryzom/client/src/character_cl.h b/code/ryzom/client/src/character_cl.h index 280fd470e..98b5d374e 100644 --- a/code/ryzom/client/src/character_cl.h +++ b/code/ryzom/client/src/character_cl.h @@ -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) 2012 Matt RAYKOWSKI (sfb) +// // 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/client/src/client.cpp b/code/ryzom/client/src/client.cpp index 2dbdced45..e824f6529 100644 --- a/code/ryzom/client/src/client.cpp +++ b/code/ryzom/client/src/client.cpp @@ -1,5 +1,9 @@ // Ryzom - MMORPG Framework -// Copyright (C) 2010 Winch Gate Property Limited +// Copyright (C) 2010-2019 Winch Gate Property Limited +// +// This source file has been modified by the following contributors: +// Copyright (C) 2010 Robert TIMM (rti) +// 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 diff --git a/code/ryzom/client/src/client_cfg.cpp b/code/ryzom/client/src/client_cfg.cpp index 23f5cc961..a315a52a9 100644 --- a/code/ryzom/client/src/client_cfg.cpp +++ b/code/ryzom/client/src/client_cfg.cpp @@ -1,5 +1,11 @@ // Ryzom - MMORPG Framework -// Copyright (C) 2010 Winch Gate Property Limited +// Copyright (C) 2010-2019 Winch Gate Property Limited +// +// This source file has been modified by the following contributors: +// Copyright (C) 2010 Robert TIMM (rti) +// Copyright (C) 2010-2019 Jan BOON (Kaetemi) +// Copyright (C) 2011-2012 Matt RAYKOWSKI (sfb) +// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/ryzom/client/src/client_cfg.h b/code/ryzom/client/src/client_cfg.h index 7d2dbac37..33d1d01e0 100644 --- a/code/ryzom/client/src/client_cfg.h +++ b/code/ryzom/client/src/client_cfg.h @@ -1,6 +1,11 @@ // Ryzom - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2010 Robert TIMM (rti) +// Copyright (C) 2010-2014 Jan BOON (Kaetemi) +// Copyright (C) 2011-2012 Matt RAYKOWSKI (sfb) +// // 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/client/src/client_chat_manager.cpp b/code/ryzom/client/src/client_chat_manager.cpp index c54aa6c0b..9d222a1b7 100644 --- a/code/ryzom/client/src/client_chat_manager.cpp +++ b/code/ryzom/client/src/client_chat_manager.cpp @@ -1,5 +1,9 @@ // Ryzom - MMORPG Framework -// Copyright (C) 2010 Winch Gate Property Limited +// Copyright (C) 2010-2017 Winch Gate Property Limited +// +// This source file has been modified by the following contributors: +// Copyright (C) 2012 Matt RAYKOWSKI (sfb) +// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/ryzom/client/src/client_chat_manager.h b/code/ryzom/client/src/client_chat_manager.h index 7ba4e3c77..2f7decac9 100644 --- a/code/ryzom/client/src/client_chat_manager.h +++ b/code/ryzom/client/src/client_chat_manager.h @@ -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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/client_sheets/continent_sheet.h b/code/ryzom/client/src/client_sheets/continent_sheet.h index 4a36b6a2d..0d791f396 100644 --- a/code/ryzom/client/src/client_sheets/continent_sheet.h +++ b/code/ryzom/client/src/client_sheets/continent_sheet.h @@ -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) 2014 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/client/src/client_sheets/item_sheet.cpp b/code/ryzom/client/src/client_sheets/item_sheet.cpp index b55382660..04d0737e1 100644 --- a/code/ryzom/client/src/client_sheets/item_sheet.cpp +++ b/code/ryzom/client/src/client_sheets/item_sheet.cpp @@ -1,5 +1,5 @@ // Ryzom - MMORPG Framework -// Copyright (C) 2010 Winch Gate Property Limited +// Copyright (C) 2010-2019 Winch Gate Property Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/ryzom/client/src/client_sheets/item_sheet.h b/code/ryzom/client/src/client_sheets/item_sheet.h index 752a40843..20a2e081b 100644 --- a/code/ryzom/client/src/client_sheets/item_sheet.h +++ b/code/ryzom/client/src/client_sheets/item_sheet.h @@ -1,5 +1,5 @@ // Ryzom - MMORPG Framework -// Copyright (C) 2010 Winch Gate Property Limited +// Copyright (C) 2010-2019 Winch Gate Property Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/ryzom/client/src/client_sheets/stdpch.h b/code/ryzom/client/src/client_sheets/stdpch.h index 3421b031d..fa693be25 100644 --- a/code/ryzom/client/src/client_sheets/stdpch.h +++ b/code/ryzom/client/src/client_sheets/stdpch.h @@ -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) 2011 Robert TIMM (rti) +// // 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/client/src/commands.cpp b/code/ryzom/client/src/commands.cpp index cd261b29b..fad157147 100644 --- a/code/ryzom/client/src/commands.cpp +++ b/code/ryzom/client/src/commands.cpp @@ -1,5 +1,10 @@ // Ryzom - MMORPG Framework -// Copyright (C) 2010 Winch Gate Property Limited +// Copyright (C) 2010-2019 Winch Gate Property Limited +// +// This source file has been modified by the following contributors: +// Copyright (C) 2012 Matt RAYKOWSKI (sfb) +// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) +// Copyright (C) 2013-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 diff --git a/code/ryzom/client/src/commands.h b/code/ryzom/client/src/commands.h index 7b16f442c..8a0b8764a 100644 --- a/code/ryzom/client/src/commands.h +++ b/code/ryzom/client/src/commands.h @@ -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) 2012 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/connection.cpp b/code/ryzom/client/src/connection.cpp index 0b2ed1439..b53c571e6 100644 --- a/code/ryzom/client/src/connection.cpp +++ b/code/ryzom/client/src/connection.cpp @@ -1,5 +1,10 @@ // Ryzom - MMORPG Framework -// Copyright (C) 2010 Winch Gate Property Limited +// Copyright (C) 2010-2019 Winch Gate Property Limited +// +// This source file has been modified by the following contributors: +// Copyright (C) 2012 Matt RAYKOWSKI (sfb) +// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) +// Copyright (C) 2014-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 diff --git a/code/ryzom/client/src/connection.h b/code/ryzom/client/src/connection.h index a424e80e9..67bda815c 100644 --- a/code/ryzom/client/src/connection.h +++ b/code/ryzom/client/src/connection.h @@ -1,5 +1,5 @@ // Ryzom - MMORPG Framework -// Copyright (C) 2010 Winch Gate Property Limited +// Copyright (C) 2010-2019 Winch Gate Property Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/ryzom/client/src/contextual_cursor.cpp b/code/ryzom/client/src/contextual_cursor.cpp index 391191a76..15dd6a17a 100644 --- a/code/ryzom/client/src/contextual_cursor.cpp +++ b/code/ryzom/client/src/contextual_cursor.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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/continent.cpp b/code/ryzom/client/src/continent.cpp index 51334195b..03b9a1fce 100644 --- a/code/ryzom/client/src/continent.cpp +++ b/code/ryzom/client/src/continent.cpp @@ -1,5 +1,5 @@ // Ryzom - MMORPG Framework -// Copyright (C) 2010 Winch Gate Property Limited +// Copyright (C) 2010-2019 Winch Gate Property Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/ryzom/client/src/continent_manager.cpp b/code/ryzom/client/src/continent_manager.cpp index cb8e11dbd..4bdb470f3 100644 --- a/code/ryzom/client/src/continent_manager.cpp +++ b/code/ryzom/client/src/continent_manager.cpp @@ -1,6 +1,10 @@ // Ryzom - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) +// Copyright (C) 2014 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/client/src/cursor_functions.cpp b/code/ryzom/client/src/cursor_functions.cpp index 8b1963e25..44e2dde7e 100644 --- a/code/ryzom/client/src/cursor_functions.cpp +++ b/code/ryzom/client/src/cursor_functions.cpp @@ -1,5 +1,10 @@ // Ryzom - MMORPG Framework -// Copyright (C) 2010 Winch Gate Property Limited +// Copyright (C) 2010-2018 Winch Gate Property Limited +// +// This source file has been modified by the following contributors: +// Copyright (C) 2012 Matt RAYKOWSKI (sfb) +// Copyright (C) 2013 Jan BOON (Kaetemi) +// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/ryzom/client/src/debug_client.cpp b/code/ryzom/client/src/debug_client.cpp index 4d5dc3a1b..dd182f3c9 100644 --- a/code/ryzom/client/src/debug_client.cpp +++ b/code/ryzom/client/src/debug_client.cpp @@ -1,6 +1,10 @@ // Ryzom - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) +// Copyright (C) 2014 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/client/src/decal.cpp b/code/ryzom/client/src/decal.cpp index aa705abea..e270a7c29 100644 --- a/code/ryzom/client/src/decal.cpp +++ b/code/ryzom/client/src/decal.cpp @@ -1,6 +1,10 @@ // Ryzom - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2013 Jan BOON (Kaetemi) +// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/decal_anim.cpp b/code/ryzom/client/src/decal_anim.cpp index c5a353a1f..c815961ad 100644 --- a/code/ryzom/client/src/decal_anim.cpp +++ b/code/ryzom/client/src/decal_anim.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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/decal_anim.h b/code/ryzom/client/src/decal_anim.h index 184240985..356e405af 100644 --- a/code/ryzom/client/src/decal_anim.h +++ b/code/ryzom/client/src/decal_anim.h @@ -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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/entities.cpp b/code/ryzom/client/src/entities.cpp index ab3de2b99..9ecadba93 100644 --- a/code/ryzom/client/src/entities.cpp +++ b/code/ryzom/client/src/entities.cpp @@ -1,5 +1,9 @@ // Ryzom - MMORPG Framework -// Copyright (C) 2010 Winch Gate Property Limited +// Copyright (C) 2010-2019 Winch Gate Property Limited +// +// This source file has been modified by the following contributors: +// Copyright (C) 2013 Jan BOON (Kaetemi) +// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/ryzom/client/src/entities.h b/code/ryzom/client/src/entities.h index 8372429db..48707d5cf 100644 --- a/code/ryzom/client/src/entities.h +++ b/code/ryzom/client/src/entities.h @@ -1,5 +1,8 @@ // Ryzom - MMORPG Framework -// Copyright (C) 2010 Winch Gate Property Limited +// Copyright (C) 2010-2019 Winch Gate Property Limited +// +// This source file has been modified by the following contributors: +// Copyright (C) 2013 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 diff --git a/code/ryzom/client/src/entity_cl.cpp b/code/ryzom/client/src/entity_cl.cpp index 5231b274d..14f3a1769 100644 --- a/code/ryzom/client/src/entity_cl.cpp +++ b/code/ryzom/client/src/entity_cl.cpp @@ -1,5 +1,10 @@ // Ryzom - MMORPG Framework -// Copyright (C) 2010 Winch Gate Property Limited +// Copyright (C) 2010-2017 Winch Gate Property Limited +// +// This source file has been modified by the following contributors: +// Copyright (C) 2012 Matt RAYKOWSKI (sfb) +// Copyright (C) 2013 Jan BOON (Kaetemi) +// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/ryzom/client/src/entity_cl.h b/code/ryzom/client/src/entity_cl.h index 9d9b4481a..e2985493a 100644 --- a/code/ryzom/client/src/entity_cl.h +++ b/code/ryzom/client/src/entity_cl.h @@ -1,6 +1,11 @@ // Ryzom - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2012 Matt RAYKOWSKI (sfb) +// Copyright (C) 2013 Jan BOON (Kaetemi) +// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/events_listener.cpp b/code/ryzom/client/src/events_listener.cpp index 969c0191a..879bd5a2a 100644 --- a/code/ryzom/client/src/events_listener.cpp +++ b/code/ryzom/client/src/events_listener.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) 2014 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/client/src/far_tp.cpp b/code/ryzom/client/src/far_tp.cpp index 92a8bbe3a..0a594e540 100644 --- a/code/ryzom/client/src/far_tp.cpp +++ b/code/ryzom/client/src/far_tp.cpp @@ -1,5 +1,9 @@ // Ryzom - MMORPG Framework -// Copyright (C) 2010 Winch Gate Property Limited +// Copyright (C) 2010-2011 Winch Gate Property Limited +// +// This source file has been modified by the following contributors: +// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) +// Copyright (C) 2014-2016 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 diff --git a/code/ryzom/client/src/fog_map.cpp b/code/ryzom/client/src/fog_map.cpp index d1467b415..5c0a34e77 100644 --- a/code/ryzom/client/src/fog_map.cpp +++ b/code/ryzom/client/src/fog_map.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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/forage_source_cl.cpp b/code/ryzom/client/src/forage_source_cl.cpp index b99d37218..4e673caaf 100644 --- a/code/ryzom/client/src/forage_source_cl.cpp +++ b/code/ryzom/client/src/forage_source_cl.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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/game_context_menu.cpp b/code/ryzom/client/src/game_context_menu.cpp index a8c1d9322..d4a152392 100644 --- a/code/ryzom/client/src/game_context_menu.cpp +++ b/code/ryzom/client/src/game_context_menu.cpp @@ -1,5 +1,8 @@ // Ryzom - MMORPG Framework -// Copyright (C) 2010 Winch Gate Property Limited +// Copyright (C) 2010-2019 Winch Gate Property Limited +// +// This source file has been modified by the following contributors: +// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/ryzom/client/src/game_context_menu.h b/code/ryzom/client/src/game_context_menu.h index 0f628b6bf..93fc8efa6 100644 --- a/code/ryzom/client/src/game_context_menu.h +++ b/code/ryzom/client/src/game_context_menu.h @@ -1,5 +1,8 @@ // Ryzom - MMORPG Framework -// Copyright (C) 2010 Winch Gate Property Limited +// Copyright (C) 2010-2019 Winch Gate Property Limited +// +// This source file has been modified by the following contributors: +// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/ryzom/client/src/global.cpp b/code/ryzom/client/src/global.cpp index 9789b3b5b..6e8bc4534 100644 --- a/code/ryzom/client/src/global.cpp +++ b/code/ryzom/client/src/global.cpp @@ -1,5 +1,9 @@ // Ryzom - MMORPG Framework -// Copyright (C) 2010 Winch Gate Property Limited +// Copyright (C) 2010-2017 Winch Gate Property Limited +// +// This source file has been modified by the following contributors: +// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) +// Copyright (C) 2013-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 diff --git a/code/ryzom/client/src/global.h b/code/ryzom/client/src/global.h index 8929f150c..c8e64d04e 100644 --- a/code/ryzom/client/src/global.h +++ b/code/ryzom/client/src/global.h @@ -1,5 +1,8 @@ // Ryzom - MMORPG Framework -// Copyright (C) 2010 Winch Gate Property Limited +// Copyright (C) 2010-2017 Winch Gate Property Limited +// +// This source file has been modified by the following contributors: +// Copyright (C) 2013-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 diff --git a/code/ryzom/client/src/graph.cpp b/code/ryzom/client/src/graph.cpp index 8270762fb..c9f7407f6 100644 --- a/code/ryzom/client/src/graph.cpp +++ b/code/ryzom/client/src/graph.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) 2014 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/client/src/ground_fx_manager.cpp b/code/ryzom/client/src/ground_fx_manager.cpp index beca9b9bd..ac5e540e3 100644 --- a/code/ryzom/client/src/ground_fx_manager.cpp +++ b/code/ryzom/client/src/ground_fx_manager.cpp @@ -1,6 +1,10 @@ // Ryzom - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) +// Copyright (C) 2014 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/client/src/ig_client.cpp b/code/ryzom/client/src/ig_client.cpp index b508248f3..a97dabae9 100644 --- a/code/ryzom/client/src/ig_client.cpp +++ b/code/ryzom/client/src/ig_client.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) 2015 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/client/src/ingame_database_manager.h b/code/ryzom/client/src/ingame_database_manager.h index 9ae628ede..3a49f8f01 100644 --- a/code/ryzom/client/src/ingame_database_manager.h +++ b/code/ryzom/client/src/ingame_database_manager.h @@ -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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/init.cpp b/code/ryzom/client/src/init.cpp index b9287d884..2f6702e4d 100644 --- a/code/ryzom/client/src/init.cpp +++ b/code/ryzom/client/src/init.cpp @@ -1,5 +1,10 @@ // Ryzom - MMORPG Framework -// Copyright (C) 2010 Winch Gate Property Limited +// Copyright (C) 2010-2011 Winch Gate Property Limited +// +// This source file has been modified by the following contributors: +// Copyright (C) 2010 Robert TIMM (rti) +// Copyright (C) 2010-2019 Jan BOON (Kaetemi) +// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/ryzom/client/src/init.h b/code/ryzom/client/src/init.h index 4ef738828..b887ba30c 100644 --- a/code/ryzom/client/src/init.h +++ b/code/ryzom/client/src/init.h @@ -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) 2014 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/client/src/init_main_loop.cpp b/code/ryzom/client/src/init_main_loop.cpp index e22aba478..2b391114c 100644 --- a/code/ryzom/client/src/init_main_loop.cpp +++ b/code/ryzom/client/src/init_main_loop.cpp @@ -1,5 +1,9 @@ // Ryzom - MMORPG Framework -// Copyright (C) 2010 Winch Gate Property Limited +// Copyright (C) 2010-2017 Winch Gate Property Limited +// +// This source file has been modified by the following contributors: +// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) +// Copyright (C) 2014-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 diff --git a/code/ryzom/client/src/input.cpp b/code/ryzom/client/src/input.cpp index d554002ed..2b0b83c96 100644 --- a/code/ryzom/client/src/input.cpp +++ b/code/ryzom/client/src/input.cpp @@ -1,6 +1,11 @@ // Ryzom - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2010 Robert TIMM (rti) +// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) +// Copyright (C) 2014 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/client/src/interface_v3/action_handler_base.cpp b/code/ryzom/client/src/interface_v3/action_handler_base.cpp index 2fbe4c662..6bb27d772 100644 --- a/code/ryzom/client/src/interface_v3/action_handler_base.cpp +++ b/code/ryzom/client/src/interface_v3/action_handler_base.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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/interface_v3/action_handler_base.h b/code/ryzom/client/src/interface_v3/action_handler_base.h index 6cbb51cca..6dcb056e5 100644 --- a/code/ryzom/client/src/interface_v3/action_handler_base.h +++ b/code/ryzom/client/src/interface_v3/action_handler_base.h @@ -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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/interface_v3/action_handler_debug.cpp b/code/ryzom/client/src/interface_v3/action_handler_debug.cpp index 74c5542da..1670bdc77 100644 --- a/code/ryzom/client/src/interface_v3/action_handler_debug.cpp +++ b/code/ryzom/client/src/interface_v3/action_handler_debug.cpp @@ -1,6 +1,10 @@ // Ryzom - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) +// Copyright (C) 2014 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/client/src/interface_v3/action_handler_edit.cpp b/code/ryzom/client/src/interface_v3/action_handler_edit.cpp index 9c44fa492..00a07dd39 100644 --- a/code/ryzom/client/src/interface_v3/action_handler_edit.cpp +++ b/code/ryzom/client/src/interface_v3/action_handler_edit.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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/interface_v3/action_handler_game.cpp b/code/ryzom/client/src/interface_v3/action_handler_game.cpp index 33b19307f..58c00421b 100644 --- a/code/ryzom/client/src/interface_v3/action_handler_game.cpp +++ b/code/ryzom/client/src/interface_v3/action_handler_game.cpp @@ -1,5 +1,9 @@ // Ryzom - MMORPG Framework -// Copyright (C) 2010 Winch Gate Property Limited +// Copyright (C) 2010-2019 Winch Gate Property Limited +// +// This source file has been modified by the following contributors: +// Copyright (C) 2013 Jan BOON (Kaetemi) +// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/ryzom/client/src/interface_v3/action_handler_help.cpp b/code/ryzom/client/src/interface_v3/action_handler_help.cpp index 43797b960..94754432d 100644 --- a/code/ryzom/client/src/interface_v3/action_handler_help.cpp +++ b/code/ryzom/client/src/interface_v3/action_handler_help.cpp @@ -1,6 +1,10 @@ // Ryzom - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2012 Matt RAYKOWSKI (sfb) +// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/interface_v3/action_handler_help.h b/code/ryzom/client/src/interface_v3/action_handler_help.h index 1ed51757e..0f6a59058 100644 --- a/code/ryzom/client/src/interface_v3/action_handler_help.h +++ b/code/ryzom/client/src/interface_v3/action_handler_help.h @@ -1,6 +1,10 @@ // Ryzom - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2012 Matt RAYKOWSKI (sfb) +// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/interface_v3/action_handler_item.cpp b/code/ryzom/client/src/interface_v3/action_handler_item.cpp index 5f2b99c72..3d0981306 100644 --- a/code/ryzom/client/src/interface_v3/action_handler_item.cpp +++ b/code/ryzom/client/src/interface_v3/action_handler_item.cpp @@ -1,5 +1,9 @@ // Ryzom - MMORPG Framework -// Copyright (C) 2010 Winch Gate Property Limited +// Copyright (C) 2010-2019 Winch Gate Property Limited +// +// This source file has been modified by the following contributors: +// Copyright (C) 2012 Matt RAYKOWSKI (sfb) +// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/ryzom/client/src/interface_v3/action_handler_misc.cpp b/code/ryzom/client/src/interface_v3/action_handler_misc.cpp index 47248ee2a..8b379f6d1 100644 --- a/code/ryzom/client/src/interface_v3/action_handler_misc.cpp +++ b/code/ryzom/client/src/interface_v3/action_handler_misc.cpp @@ -1,6 +1,10 @@ // Ryzom - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2013 Jan BOON (Kaetemi) +// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/interface_v3/action_handler_misc.h b/code/ryzom/client/src/interface_v3/action_handler_misc.h index 577219ee1..d820963ac 100644 --- a/code/ryzom/client/src/interface_v3/action_handler_misc.h +++ b/code/ryzom/client/src/interface_v3/action_handler_misc.h @@ -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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/interface_v3/action_handler_move.cpp b/code/ryzom/client/src/interface_v3/action_handler_move.cpp index d402f1750..cbdfb9491 100644 --- a/code/ryzom/client/src/interface_v3/action_handler_move.cpp +++ b/code/ryzom/client/src/interface_v3/action_handler_move.cpp @@ -1,5 +1,8 @@ // Ryzom - MMORPG Framework -// Copyright (C) 2010 Winch Gate Property Limited +// Copyright (C) 2010-2017 Winch Gate Property Limited +// +// This source file has been modified by the following contributors: +// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/ryzom/client/src/interface_v3/action_handler_outpost.cpp b/code/ryzom/client/src/interface_v3/action_handler_outpost.cpp index 7a1054316..023030ebe 100644 --- a/code/ryzom/client/src/interface_v3/action_handler_outpost.cpp +++ b/code/ryzom/client/src/interface_v3/action_handler_outpost.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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/interface_v3/action_handler_phrase.cpp b/code/ryzom/client/src/interface_v3/action_handler_phrase.cpp index 2faade900..8a94a4c16 100644 --- a/code/ryzom/client/src/interface_v3/action_handler_phrase.cpp +++ b/code/ryzom/client/src/interface_v3/action_handler_phrase.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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/interface_v3/action_handler_tools.cpp b/code/ryzom/client/src/interface_v3/action_handler_tools.cpp index dc2daf2e7..719f52d1e 100644 --- a/code/ryzom/client/src/interface_v3/action_handler_tools.cpp +++ b/code/ryzom/client/src/interface_v3/action_handler_tools.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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/interface_v3/action_handler_ui.cpp b/code/ryzom/client/src/interface_v3/action_handler_ui.cpp index bf83ddce1..7495cfa7f 100644 --- a/code/ryzom/client/src/interface_v3/action_handler_ui.cpp +++ b/code/ryzom/client/src/interface_v3/action_handler_ui.cpp @@ -1,6 +1,10 @@ // Ryzom - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) +// 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/client/src/interface_v3/action_phrase_faber.cpp b/code/ryzom/client/src/interface_v3/action_phrase_faber.cpp index 11f0b1b88..40efedac0 100644 --- a/code/ryzom/client/src/interface_v3/action_phrase_faber.cpp +++ b/code/ryzom/client/src/interface_v3/action_phrase_faber.cpp @@ -1,6 +1,10 @@ // Ryzom - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2012 Matt RAYKOWSKI (sfb) +// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/interface_v3/action_phrase_faber.h b/code/ryzom/client/src/interface_v3/action_phrase_faber.h index bb096a967..ba74ef0aa 100644 --- a/code/ryzom/client/src/interface_v3/action_phrase_faber.h +++ b/code/ryzom/client/src/interface_v3/action_phrase_faber.h @@ -1,6 +1,10 @@ // Ryzom - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2012 Matt RAYKOWSKI (sfb) +// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/interface_v3/animal_position_state.cpp b/code/ryzom/client/src/interface_v3/animal_position_state.cpp index 50e6d4265..a99788c8d 100644 --- a/code/ryzom/client/src/interface_v3/animal_position_state.cpp +++ b/code/ryzom/client/src/interface_v3/animal_position_state.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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/interface_v3/animal_position_state.h b/code/ryzom/client/src/interface_v3/animal_position_state.h index 0058c7da4..61abddafc 100644 --- a/code/ryzom/client/src/interface_v3/animal_position_state.h +++ b/code/ryzom/client/src/interface_v3/animal_position_state.h @@ -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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/interface_v3/bar_manager.cpp b/code/ryzom/client/src/interface_v3/bar_manager.cpp index 55d7cfb52..ec521955b 100644 --- a/code/ryzom/client/src/interface_v3/bar_manager.cpp +++ b/code/ryzom/client/src/interface_v3/bar_manager.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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/interface_v3/bar_manager.h b/code/ryzom/client/src/interface_v3/bar_manager.h index ca1532930..bf1145964 100644 --- a/code/ryzom/client/src/interface_v3/bar_manager.h +++ b/code/ryzom/client/src/interface_v3/bar_manager.h @@ -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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/interface_v3/bot_chat_manager.cpp b/code/ryzom/client/src/interface_v3/bot_chat_manager.cpp index ab793a999..d25763bff 100644 --- a/code/ryzom/client/src/interface_v3/bot_chat_manager.cpp +++ b/code/ryzom/client/src/interface_v3/bot_chat_manager.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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/interface_v3/bot_chat_manager.h b/code/ryzom/client/src/interface_v3/bot_chat_manager.h index 9b851f3cc..cbd2713f8 100644 --- a/code/ryzom/client/src/interface_v3/bot_chat_manager.h +++ b/code/ryzom/client/src/interface_v3/bot_chat_manager.h @@ -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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/interface_v3/bot_chat_page.cpp b/code/ryzom/client/src/interface_v3/bot_chat_page.cpp index 157ee1846..987cde4fc 100644 --- a/code/ryzom/client/src/interface_v3/bot_chat_page.cpp +++ b/code/ryzom/client/src/interface_v3/bot_chat_page.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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/interface_v3/bot_chat_page_create_guild.cpp b/code/ryzom/client/src/interface_v3/bot_chat_page_create_guild.cpp index 084411bef..b7ec631b9 100644 --- a/code/ryzom/client/src/interface_v3/bot_chat_page_create_guild.cpp +++ b/code/ryzom/client/src/interface_v3/bot_chat_page_create_guild.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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/interface_v3/bot_chat_page_dynamic_mission.cpp b/code/ryzom/client/src/interface_v3/bot_chat_page_dynamic_mission.cpp index c4e3deb8a..1e9d56dc3 100644 --- a/code/ryzom/client/src/interface_v3/bot_chat_page_dynamic_mission.cpp +++ b/code/ryzom/client/src/interface_v3/bot_chat_page_dynamic_mission.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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/interface_v3/bot_chat_page_dynamic_mission.h b/code/ryzom/client/src/interface_v3/bot_chat_page_dynamic_mission.h index b4fd1860a..fdea51d26 100644 --- a/code/ryzom/client/src/interface_v3/bot_chat_page_dynamic_mission.h +++ b/code/ryzom/client/src/interface_v3/bot_chat_page_dynamic_mission.h @@ -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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/interface_v3/bot_chat_page_mission.cpp b/code/ryzom/client/src/interface_v3/bot_chat_page_mission.cpp index caa90cdda..ad95a35e5 100644 --- a/code/ryzom/client/src/interface_v3/bot_chat_page_mission.cpp +++ b/code/ryzom/client/src/interface_v3/bot_chat_page_mission.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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/interface_v3/bot_chat_page_mission_end.cpp b/code/ryzom/client/src/interface_v3/bot_chat_page_mission_end.cpp index c4cb1b26e..0b9496770 100644 --- a/code/ryzom/client/src/interface_v3/bot_chat_page_mission_end.cpp +++ b/code/ryzom/client/src/interface_v3/bot_chat_page_mission_end.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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/interface_v3/bot_chat_page_news.cpp b/code/ryzom/client/src/interface_v3/bot_chat_page_news.cpp index 8b3fc77c8..163a4b35c 100644 --- a/code/ryzom/client/src/interface_v3/bot_chat_page_news.cpp +++ b/code/ryzom/client/src/interface_v3/bot_chat_page_news.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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/interface_v3/bot_chat_page_player_gift.cpp b/code/ryzom/client/src/interface_v3/bot_chat_page_player_gift.cpp index 30a2a903f..c6fbc7d0a 100644 --- a/code/ryzom/client/src/interface_v3/bot_chat_page_player_gift.cpp +++ b/code/ryzom/client/src/interface_v3/bot_chat_page_player_gift.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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/interface_v3/bot_chat_page_trade.cpp b/code/ryzom/client/src/interface_v3/bot_chat_page_trade.cpp index 966a3886a..4a59163b3 100644 --- a/code/ryzom/client/src/interface_v3/bot_chat_page_trade.cpp +++ b/code/ryzom/client/src/interface_v3/bot_chat_page_trade.cpp @@ -1,6 +1,10 @@ // Ryzom - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2012 Matt RAYKOWSKI (sfb) +// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/interface_v3/bot_chat_page_trade.h b/code/ryzom/client/src/interface_v3/bot_chat_page_trade.h index 4731a19f5..ae11a2008 100644 --- a/code/ryzom/client/src/interface_v3/bot_chat_page_trade.h +++ b/code/ryzom/client/src/interface_v3/bot_chat_page_trade.h @@ -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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/interface_v3/character_3d.cpp b/code/ryzom/client/src/interface_v3/character_3d.cpp index 9a688c6b1..edc300d19 100644 --- a/code/ryzom/client/src/interface_v3/character_3d.cpp +++ b/code/ryzom/client/src/interface_v3/character_3d.cpp @@ -1,5 +1,8 @@ // Ryzom - MMORPG Framework -// Copyright (C) 2010 Winch Gate Property Limited +// Copyright (C) 2010-2018 Winch Gate Property Limited +// +// This source file has been modified by the following contributors: +// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/ryzom/client/src/interface_v3/character_3d.h b/code/ryzom/client/src/interface_v3/character_3d.h index 8915098b5..083152619 100644 --- a/code/ryzom/client/src/interface_v3/character_3d.h +++ b/code/ryzom/client/src/interface_v3/character_3d.h @@ -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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/interface_v3/chat_displayer.h b/code/ryzom/client/src/interface_v3/chat_displayer.h index 9d09e4c38..a3218670d 100644 --- a/code/ryzom/client/src/interface_v3/chat_displayer.h +++ b/code/ryzom/client/src/interface_v3/chat_displayer.h @@ -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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/interface_v3/chat_filter.cpp b/code/ryzom/client/src/interface_v3/chat_filter.cpp index b5741adfc..a5fd04c5b 100644 --- a/code/ryzom/client/src/interface_v3/chat_filter.cpp +++ b/code/ryzom/client/src/interface_v3/chat_filter.cpp @@ -1,6 +1,10 @@ // Ryzom - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2012 Matt RAYKOWSKI (sfb) +// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/interface_v3/chat_text_manager.cpp b/code/ryzom/client/src/interface_v3/chat_text_manager.cpp index 51179cf29..3b11d17a5 100644 --- a/code/ryzom/client/src/interface_v3/chat_text_manager.cpp +++ b/code/ryzom/client/src/interface_v3/chat_text_manager.cpp @@ -1,6 +1,10 @@ // Ryzom - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2012 Matt RAYKOWSKI (sfb) +// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/interface_v3/chat_text_manager.h b/code/ryzom/client/src/interface_v3/chat_text_manager.h index 41326f067..2f7e380be 100644 --- a/code/ryzom/client/src/interface_v3/chat_text_manager.h +++ b/code/ryzom/client/src/interface_v3/chat_text_manager.h @@ -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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/interface_v3/chat_window.cpp b/code/ryzom/client/src/interface_v3/chat_window.cpp index 4d9096e8c..1537e7b8b 100644 --- a/code/ryzom/client/src/interface_v3/chat_window.cpp +++ b/code/ryzom/client/src/interface_v3/chat_window.cpp @@ -1,6 +1,10 @@ // Ryzom - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2012 Matt RAYKOWSKI (sfb) +// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/interface_v3/chat_window.h b/code/ryzom/client/src/interface_v3/chat_window.h index 163f41485..278824753 100644 --- a/code/ryzom/client/src/interface_v3/chat_window.h +++ b/code/ryzom/client/src/interface_v3/chat_window.h @@ -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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/interface_v3/dbctrl_sheet.cpp b/code/ryzom/client/src/interface_v3/dbctrl_sheet.cpp index 8a3064a12..063ffdfad 100644 --- a/code/ryzom/client/src/interface_v3/dbctrl_sheet.cpp +++ b/code/ryzom/client/src/interface_v3/dbctrl_sheet.cpp @@ -1,5 +1,10 @@ // Ryzom - MMORPG Framework -// Copyright (C) 2010 Winch Gate Property Limited +// Copyright (C) 2010-2019 Winch Gate Property Limited +// +// This source file has been modified by the following contributors: +// Copyright (C) 2011 Jan BOON (Kaetemi) +// Copyright (C) 2012 Matt RAYKOWSKI (sfb) +// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/ryzom/client/src/interface_v3/dbctrl_sheet.h b/code/ryzom/client/src/interface_v3/dbctrl_sheet.h index 28d7a1ddf..1281b1ae8 100644 --- a/code/ryzom/client/src/interface_v3/dbctrl_sheet.h +++ b/code/ryzom/client/src/interface_v3/dbctrl_sheet.h @@ -1,5 +1,10 @@ // Ryzom - MMORPG Framework -// Copyright (C) 2010 Winch Gate Property Limited +// Copyright (C) 2010-2019 Winch Gate Property Limited +// +// This source file has been modified by the following contributors: +// Copyright (C) 2011 Jan BOON (Kaetemi) +// Copyright (C) 2012 Matt RAYKOWSKI (sfb) +// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/ryzom/client/src/interface_v3/dbgroup_build_phrase.cpp b/code/ryzom/client/src/interface_v3/dbgroup_build_phrase.cpp index 0a7f1204b..3cd8e759c 100644 --- a/code/ryzom/client/src/interface_v3/dbgroup_build_phrase.cpp +++ b/code/ryzom/client/src/interface_v3/dbgroup_build_phrase.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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/interface_v3/dbgroup_build_phrase.h b/code/ryzom/client/src/interface_v3/dbgroup_build_phrase.h index 36885b5c9..4bbe750c0 100644 --- a/code/ryzom/client/src/interface_v3/dbgroup_build_phrase.h +++ b/code/ryzom/client/src/interface_v3/dbgroup_build_phrase.h @@ -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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/interface_v3/dbgroup_list_sheet.cpp b/code/ryzom/client/src/interface_v3/dbgroup_list_sheet.cpp index 2966e65b4..c2074ee03 100644 --- a/code/ryzom/client/src/interface_v3/dbgroup_list_sheet.cpp +++ b/code/ryzom/client/src/interface_v3/dbgroup_list_sheet.cpp @@ -1,6 +1,10 @@ // Ryzom - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) +// Copyright (C) 2015 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/client/src/interface_v3/dbgroup_list_sheet.h b/code/ryzom/client/src/interface_v3/dbgroup_list_sheet.h index 546b80b0d..f6f4bbc8d 100644 --- a/code/ryzom/client/src/interface_v3/dbgroup_list_sheet.h +++ b/code/ryzom/client/src/interface_v3/dbgroup_list_sheet.h @@ -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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/interface_v3/dbgroup_list_sheet_bonus_malus.cpp b/code/ryzom/client/src/interface_v3/dbgroup_list_sheet_bonus_malus.cpp index c04e2e5a6..175d7339b 100644 --- a/code/ryzom/client/src/interface_v3/dbgroup_list_sheet_bonus_malus.cpp +++ b/code/ryzom/client/src/interface_v3/dbgroup_list_sheet_bonus_malus.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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/interface_v3/dbgroup_list_sheet_bonus_malus.h b/code/ryzom/client/src/interface_v3/dbgroup_list_sheet_bonus_malus.h index 5e7db5868..05774ec8d 100644 --- a/code/ryzom/client/src/interface_v3/dbgroup_list_sheet_bonus_malus.h +++ b/code/ryzom/client/src/interface_v3/dbgroup_list_sheet_bonus_malus.h @@ -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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/interface_v3/dbgroup_list_sheet_icon_phrase.cpp b/code/ryzom/client/src/interface_v3/dbgroup_list_sheet_icon_phrase.cpp index 75769108c..be89ead3d 100644 --- a/code/ryzom/client/src/interface_v3/dbgroup_list_sheet_icon_phrase.cpp +++ b/code/ryzom/client/src/interface_v3/dbgroup_list_sheet_icon_phrase.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) 2012 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/interface_v3/dbgroup_list_sheet_icon_phrase.h b/code/ryzom/client/src/interface_v3/dbgroup_list_sheet_icon_phrase.h index af29672ad..dcce50194 100644 --- a/code/ryzom/client/src/interface_v3/dbgroup_list_sheet_icon_phrase.h +++ b/code/ryzom/client/src/interface_v3/dbgroup_list_sheet_icon_phrase.h @@ -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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/interface_v3/dbgroup_list_sheet_mission.cpp b/code/ryzom/client/src/interface_v3/dbgroup_list_sheet_mission.cpp index dc557d966..da46e9e7b 100644 --- a/code/ryzom/client/src/interface_v3/dbgroup_list_sheet_mission.cpp +++ b/code/ryzom/client/src/interface_v3/dbgroup_list_sheet_mission.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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/interface_v3/dbgroup_list_sheet_text.cpp b/code/ryzom/client/src/interface_v3/dbgroup_list_sheet_text.cpp index 2294d3926..f34053396 100644 --- a/code/ryzom/client/src/interface_v3/dbgroup_list_sheet_text.cpp +++ b/code/ryzom/client/src/interface_v3/dbgroup_list_sheet_text.cpp @@ -1,6 +1,10 @@ // Ryzom - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) +// Copyright (C) 2014-2015 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/client/src/interface_v3/dbgroup_list_sheet_text.h b/code/ryzom/client/src/interface_v3/dbgroup_list_sheet_text.h index e607883d3..2486bfc29 100644 --- a/code/ryzom/client/src/interface_v3/dbgroup_list_sheet_text.h +++ b/code/ryzom/client/src/interface_v3/dbgroup_list_sheet_text.h @@ -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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/interface_v3/dbgroup_list_sheet_text_brick_composition.cpp b/code/ryzom/client/src/interface_v3/dbgroup_list_sheet_text_brick_composition.cpp index c67e69660..490c36b85 100644 --- a/code/ryzom/client/src/interface_v3/dbgroup_list_sheet_text_brick_composition.cpp +++ b/code/ryzom/client/src/interface_v3/dbgroup_list_sheet_text_brick_composition.cpp @@ -1,6 +1,10 @@ // Ryzom - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) +// Copyright (C) 2014 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/client/src/interface_v3/dbgroup_list_sheet_text_phrase.cpp b/code/ryzom/client/src/interface_v3/dbgroup_list_sheet_text_phrase.cpp index b7bb83698..ec1bfbaed 100644 --- a/code/ryzom/client/src/interface_v3/dbgroup_list_sheet_text_phrase.cpp +++ b/code/ryzom/client/src/interface_v3/dbgroup_list_sheet_text_phrase.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) 2012 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/interface_v3/dbgroup_list_sheet_text_phrase.h b/code/ryzom/client/src/interface_v3/dbgroup_list_sheet_text_phrase.h index 9fde36de3..f6d3fead6 100644 --- a/code/ryzom/client/src/interface_v3/dbgroup_list_sheet_text_phrase.h +++ b/code/ryzom/client/src/interface_v3/dbgroup_list_sheet_text_phrase.h @@ -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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/interface_v3/dbgroup_list_sheet_text_share.cpp b/code/ryzom/client/src/interface_v3/dbgroup_list_sheet_text_share.cpp index 112ec3e9e..1e8a98fae 100644 --- a/code/ryzom/client/src/interface_v3/dbgroup_list_sheet_text_share.cpp +++ b/code/ryzom/client/src/interface_v3/dbgroup_list_sheet_text_share.cpp @@ -1,6 +1,10 @@ // Ryzom - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) +// Copyright (C) 2014 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/client/src/interface_v3/dbgroup_list_sheet_text_share.h b/code/ryzom/client/src/interface_v3/dbgroup_list_sheet_text_share.h index 4c21b5d86..431a749b3 100644 --- a/code/ryzom/client/src/interface_v3/dbgroup_list_sheet_text_share.h +++ b/code/ryzom/client/src/interface_v3/dbgroup_list_sheet_text_share.h @@ -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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/interface_v3/dbgroup_list_sheet_trade.cpp b/code/ryzom/client/src/interface_v3/dbgroup_list_sheet_trade.cpp index d4fc5da86..4a7ef5701 100644 --- a/code/ryzom/client/src/interface_v3/dbgroup_list_sheet_trade.cpp +++ b/code/ryzom/client/src/interface_v3/dbgroup_list_sheet_trade.cpp @@ -1,6 +1,10 @@ // Ryzom - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2012 Matt RAYKOWSKI (sfb) +// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/interface_v3/dbgroup_list_sheet_trade.h b/code/ryzom/client/src/interface_v3/dbgroup_list_sheet_trade.h index a857080c9..5d6e121d5 100644 --- a/code/ryzom/client/src/interface_v3/dbgroup_list_sheet_trade.h +++ b/code/ryzom/client/src/interface_v3/dbgroup_list_sheet_trade.h @@ -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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/interface_v3/encyclopedia_manager.cpp b/code/ryzom/client/src/interface_v3/encyclopedia_manager.cpp index 507d052d2..ec82b5c8d 100644 --- a/code/ryzom/client/src/interface_v3/encyclopedia_manager.cpp +++ b/code/ryzom/client/src/interface_v3/encyclopedia_manager.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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/interface_v3/flying_text_manager.cpp b/code/ryzom/client/src/interface_v3/flying_text_manager.cpp index 510867ab1..23e6e963e 100644 --- a/code/ryzom/client/src/interface_v3/flying_text_manager.cpp +++ b/code/ryzom/client/src/interface_v3/flying_text_manager.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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/interface_v3/group_career.cpp b/code/ryzom/client/src/interface_v3/group_career.cpp index 845dbc760..d3f3e2563 100644 --- a/code/ryzom/client/src/interface_v3/group_career.cpp +++ b/code/ryzom/client/src/interface_v3/group_career.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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/interface_v3/group_career.h b/code/ryzom/client/src/interface_v3/group_career.h index db9788854..b05a6dd70 100644 --- a/code/ryzom/client/src/interface_v3/group_career.h +++ b/code/ryzom/client/src/interface_v3/group_career.h @@ -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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/interface_v3/group_compas.cpp b/code/ryzom/client/src/interface_v3/group_compas.cpp index 7c2b86984..87fcec6ce 100644 --- a/code/ryzom/client/src/interface_v3/group_compas.cpp +++ b/code/ryzom/client/src/interface_v3/group_compas.cpp @@ -1,6 +1,10 @@ // Ryzom - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2012 Matt RAYKOWSKI (sfb) +// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/interface_v3/group_compas.h b/code/ryzom/client/src/interface_v3/group_compas.h index e122866c7..c9ba106ef 100644 --- a/code/ryzom/client/src/interface_v3/group_compas.h +++ b/code/ryzom/client/src/interface_v3/group_compas.h @@ -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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/interface_v3/group_html_cs.cpp b/code/ryzom/client/src/interface_v3/group_html_cs.cpp index 66ac1006e..353410029 100644 --- a/code/ryzom/client/src/interface_v3/group_html_cs.cpp +++ b/code/ryzom/client/src/interface_v3/group_html_cs.cpp @@ -1,6 +1,10 @@ // Ryzom - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2012 Matt RAYKOWSKI (sfb) +// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/interface_v3/group_html_cs.h b/code/ryzom/client/src/interface_v3/group_html_cs.h index f710d9719..463bdbc09 100644 --- a/code/ryzom/client/src/interface_v3/group_html_cs.h +++ b/code/ryzom/client/src/interface_v3/group_html_cs.h @@ -1,6 +1,10 @@ // Ryzom - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2012 Matt RAYKOWSKI (sfb) +// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/interface_v3/group_html_forum.cpp b/code/ryzom/client/src/interface_v3/group_html_forum.cpp index d57aca3b6..79a4574dc 100644 --- a/code/ryzom/client/src/interface_v3/group_html_forum.cpp +++ b/code/ryzom/client/src/interface_v3/group_html_forum.cpp @@ -1,6 +1,10 @@ // Ryzom - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2012 Matt RAYKOWSKI (sfb) +// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/interface_v3/group_html_forum.h b/code/ryzom/client/src/interface_v3/group_html_forum.h index 344bf3fc0..53ab7d675 100644 --- a/code/ryzom/client/src/interface_v3/group_html_forum.h +++ b/code/ryzom/client/src/interface_v3/group_html_forum.h @@ -1,6 +1,10 @@ // Ryzom - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2012 Matt RAYKOWSKI (sfb) +// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/interface_v3/group_html_mail.cpp b/code/ryzom/client/src/interface_v3/group_html_mail.cpp index 6a612d560..e351b10ef 100644 --- a/code/ryzom/client/src/interface_v3/group_html_mail.cpp +++ b/code/ryzom/client/src/interface_v3/group_html_mail.cpp @@ -1,6 +1,10 @@ // Ryzom - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2012 Matt RAYKOWSKI (sfb) +// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/interface_v3/group_html_mail.h b/code/ryzom/client/src/interface_v3/group_html_mail.h index 4731e1c3c..e67a098a4 100644 --- a/code/ryzom/client/src/interface_v3/group_html_mail.h +++ b/code/ryzom/client/src/interface_v3/group_html_mail.h @@ -1,6 +1,10 @@ // Ryzom - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2012 Matt RAYKOWSKI (sfb) +// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/interface_v3/group_html_qcm.cpp b/code/ryzom/client/src/interface_v3/group_html_qcm.cpp index 95969a727..66dcd0c51 100644 --- a/code/ryzom/client/src/interface_v3/group_html_qcm.cpp +++ b/code/ryzom/client/src/interface_v3/group_html_qcm.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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/interface_v3/group_html_qcm.h b/code/ryzom/client/src/interface_v3/group_html_qcm.h index b77340f5c..a197c37cd 100644 --- a/code/ryzom/client/src/interface_v3/group_html_qcm.h +++ b/code/ryzom/client/src/interface_v3/group_html_qcm.h @@ -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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/interface_v3/group_html_webig.cpp b/code/ryzom/client/src/interface_v3/group_html_webig.cpp index 0cb00ded0..18ab0fc75 100644 --- a/code/ryzom/client/src/interface_v3/group_html_webig.cpp +++ b/code/ryzom/client/src/interface_v3/group_html_webig.cpp @@ -1,6 +1,11 @@ // Ryzom - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2012 Matt RAYKOWSKI (sfb) +// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) +// 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/client/src/interface_v3/group_html_webig.h b/code/ryzom/client/src/interface_v3/group_html_webig.h index 62e1cfedd..30ccb5825 100644 --- a/code/ryzom/client/src/interface_v3/group_html_webig.h +++ b/code/ryzom/client/src/interface_v3/group_html_webig.h @@ -1,6 +1,10 @@ // Ryzom - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2012 Matt RAYKOWSKI (sfb) +// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/interface_v3/group_in_scene.cpp b/code/ryzom/client/src/interface_v3/group_in_scene.cpp index b547f7fb0..e0d36fd7f 100644 --- a/code/ryzom/client/src/interface_v3/group_in_scene.cpp +++ b/code/ryzom/client/src/interface_v3/group_in_scene.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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/interface_v3/group_in_scene.h b/code/ryzom/client/src/interface_v3/group_in_scene.h index 877ea0262..777379f1e 100644 --- a/code/ryzom/client/src/interface_v3/group_in_scene.h +++ b/code/ryzom/client/src/interface_v3/group_in_scene.h @@ -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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/interface_v3/group_in_scene_bubble.cpp b/code/ryzom/client/src/interface_v3/group_in_scene_bubble.cpp index 063b56131..86ccd8e95 100644 --- a/code/ryzom/client/src/interface_v3/group_in_scene_bubble.cpp +++ b/code/ryzom/client/src/interface_v3/group_in_scene_bubble.cpp @@ -1,6 +1,10 @@ // Ryzom - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2012 Matt RAYKOWSKI (sfb) +// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/interface_v3/group_in_scene_bubble.h b/code/ryzom/client/src/interface_v3/group_in_scene_bubble.h index 00374b47a..288853488 100644 --- a/code/ryzom/client/src/interface_v3/group_in_scene_bubble.h +++ b/code/ryzom/client/src/interface_v3/group_in_scene_bubble.h @@ -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) 2012 Matt RAYKOWSKI (sfb) +// // 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/client/src/interface_v3/group_in_scene_user_info.cpp b/code/ryzom/client/src/interface_v3/group_in_scene_user_info.cpp index 53cddc93b..8c853b191 100644 --- a/code/ryzom/client/src/interface_v3/group_in_scene_user_info.cpp +++ b/code/ryzom/client/src/interface_v3/group_in_scene_user_info.cpp @@ -1,6 +1,11 @@ // Ryzom - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2012 Matt RAYKOWSKI (sfb) +// Copyright (C) 2013 Jan BOON (Kaetemi) +// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/interface_v3/group_in_scene_user_info.h b/code/ryzom/client/src/interface_v3/group_in_scene_user_info.h index 3869a74b1..e7cd82c56 100644 --- a/code/ryzom/client/src/interface_v3/group_in_scene_user_info.h +++ b/code/ryzom/client/src/interface_v3/group_in_scene_user_info.h @@ -1,6 +1,10 @@ // Ryzom - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2013 Jan BOON (Kaetemi) +// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/interface_v3/group_map.cpp b/code/ryzom/client/src/interface_v3/group_map.cpp index 66c967353..5245ca304 100644 --- a/code/ryzom/client/src/interface_v3/group_map.cpp +++ b/code/ryzom/client/src/interface_v3/group_map.cpp @@ -1,5 +1,9 @@ // Ryzom - MMORPG Framework -// Copyright (C) 2010 Winch Gate Property Limited +// Copyright (C) 2010-2019 Winch Gate Property Limited +// +// This source file has been modified by the following contributors: +// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) +// Copyright (C) 2014 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 diff --git a/code/ryzom/client/src/interface_v3/group_map.h b/code/ryzom/client/src/interface_v3/group_map.h index 2bc112c5b..1471b8975 100644 --- a/code/ryzom/client/src/interface_v3/group_map.h +++ b/code/ryzom/client/src/interface_v3/group_map.h @@ -1,5 +1,8 @@ // Ryzom - MMORPG Framework -// Copyright (C) 2010 Winch Gate Property Limited +// Copyright (C) 2010-2018 Winch Gate Property Limited +// +// This source file has been modified by the following contributors: +// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/ryzom/client/src/interface_v3/group_modal_get_key.cpp b/code/ryzom/client/src/interface_v3/group_modal_get_key.cpp index 47a36c973..c2d29df78 100644 --- a/code/ryzom/client/src/interface_v3/group_modal_get_key.cpp +++ b/code/ryzom/client/src/interface_v3/group_modal_get_key.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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/interface_v3/group_modal_get_key.h b/code/ryzom/client/src/interface_v3/group_modal_get_key.h index edf62bae9..cffeea360 100644 --- a/code/ryzom/client/src/interface_v3/group_modal_get_key.h +++ b/code/ryzom/client/src/interface_v3/group_modal_get_key.h @@ -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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/interface_v3/group_phrase_skill_filter.cpp b/code/ryzom/client/src/interface_v3/group_phrase_skill_filter.cpp index 8d55726a1..04d05e6f2 100644 --- a/code/ryzom/client/src/interface_v3/group_phrase_skill_filter.cpp +++ b/code/ryzom/client/src/interface_v3/group_phrase_skill_filter.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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/interface_v3/group_phrase_skill_filter.h b/code/ryzom/client/src/interface_v3/group_phrase_skill_filter.h index 6177eba9a..adf57ae25 100644 --- a/code/ryzom/client/src/interface_v3/group_phrase_skill_filter.h +++ b/code/ryzom/client/src/interface_v3/group_phrase_skill_filter.h @@ -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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/interface_v3/group_quick_help.cpp b/code/ryzom/client/src/interface_v3/group_quick_help.cpp index 857c3cacd..48b904398 100644 --- a/code/ryzom/client/src/interface_v3/group_quick_help.cpp +++ b/code/ryzom/client/src/interface_v3/group_quick_help.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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/interface_v3/group_quick_help.h b/code/ryzom/client/src/interface_v3/group_quick_help.h index 6af4e91b0..7843d5de2 100644 --- a/code/ryzom/client/src/interface_v3/group_quick_help.h +++ b/code/ryzom/client/src/interface_v3/group_quick_help.h @@ -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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/interface_v3/group_skills.cpp b/code/ryzom/client/src/interface_v3/group_skills.cpp index b5e5c5d34..f2586401a 100644 --- a/code/ryzom/client/src/interface_v3/group_skills.cpp +++ b/code/ryzom/client/src/interface_v3/group_skills.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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/interface_v3/group_skills.h b/code/ryzom/client/src/interface_v3/group_skills.h index fe799bed6..b34114768 100644 --- a/code/ryzom/client/src/interface_v3/group_skills.h +++ b/code/ryzom/client/src/interface_v3/group_skills.h @@ -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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/interface_v3/guild_manager.cpp b/code/ryzom/client/src/interface_v3/guild_manager.cpp index 0358d919a..d00661357 100644 --- a/code/ryzom/client/src/interface_v3/guild_manager.cpp +++ b/code/ryzom/client/src/interface_v3/guild_manager.cpp @@ -1,5 +1,9 @@ // Ryzom - MMORPG Framework -// Copyright (C) 2010 Winch Gate Property Limited +// Copyright (C) 2010-2019 Winch Gate Property Limited +// +// This source file has been modified by the following contributors: +// Copyright (C) 2012 Matt RAYKOWSKI (sfb) +// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/ryzom/client/src/interface_v3/guild_manager.h b/code/ryzom/client/src/interface_v3/guild_manager.h index 1cad76def..7b8b94df2 100644 --- a/code/ryzom/client/src/interface_v3/guild_manager.h +++ b/code/ryzom/client/src/interface_v3/guild_manager.h @@ -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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/interface_v3/input_handler_manager.cpp b/code/ryzom/client/src/interface_v3/input_handler_manager.cpp index 48582652a..9d1e9292d 100644 --- a/code/ryzom/client/src/interface_v3/input_handler_manager.cpp +++ b/code/ryzom/client/src/interface_v3/input_handler_manager.cpp @@ -1,6 +1,10 @@ // Ryzom - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) +// Copyright (C) 2014 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/client/src/interface_v3/input_handler_manager.h b/code/ryzom/client/src/interface_v3/input_handler_manager.h index 0e11bdb7d..7971ef9a8 100644 --- a/code/ryzom/client/src/interface_v3/input_handler_manager.h +++ b/code/ryzom/client/src/interface_v3/input_handler_manager.h @@ -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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/interface_v3/interface_3d_scene.cpp b/code/ryzom/client/src/interface_v3/interface_3d_scene.cpp index a0ab748be..6fcba9eac 100644 --- a/code/ryzom/client/src/interface_v3/interface_3d_scene.cpp +++ b/code/ryzom/client/src/interface_v3/interface_3d_scene.cpp @@ -1,5 +1,9 @@ // Ryzom - MMORPG Framework -// Copyright (C) 2010 Winch Gate Property Limited +// Copyright (C) 2010-2018 Winch Gate Property Limited +// +// This source file has been modified by the following contributors: +// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) +// Copyright (C) 2015 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 diff --git a/code/ryzom/client/src/interface_v3/interface_3d_scene.h b/code/ryzom/client/src/interface_v3/interface_3d_scene.h index cf0123335..89355e6df 100644 --- a/code/ryzom/client/src/interface_v3/interface_3d_scene.h +++ b/code/ryzom/client/src/interface_v3/interface_3d_scene.h @@ -1,5 +1,8 @@ // Ryzom - MMORPG Framework -// Copyright (C) 2010 Winch Gate Property Limited +// Copyright (C) 2010-2018 Winch Gate Property Limited +// +// This source file has been modified by the following contributors: +// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/ryzom/client/src/interface_v3/interface_config.cpp b/code/ryzom/client/src/interface_v3/interface_config.cpp index bfec3c93e..13a592b44 100644 --- a/code/ryzom/client/src/interface_v3/interface_config.cpp +++ b/code/ryzom/client/src/interface_v3/interface_config.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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/interface_v3/interface_config.h b/code/ryzom/client/src/interface_v3/interface_config.h index dad406856..998ecc5b7 100644 --- a/code/ryzom/client/src/interface_v3/interface_config.h +++ b/code/ryzom/client/src/interface_v3/interface_config.h @@ -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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/interface_v3/interface_ddx.cpp b/code/ryzom/client/src/interface_v3/interface_ddx.cpp index b63f049e7..347a0d94d 100644 --- a/code/ryzom/client/src/interface_v3/interface_ddx.cpp +++ b/code/ryzom/client/src/interface_v3/interface_ddx.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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/interface_v3/interface_ddx.h b/code/ryzom/client/src/interface_v3/interface_ddx.h index 9c7600d7a..48f329053 100644 --- a/code/ryzom/client/src/interface_v3/interface_ddx.h +++ b/code/ryzom/client/src/interface_v3/interface_ddx.h @@ -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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/interface_v3/interface_expr_user_fct_game.cpp b/code/ryzom/client/src/interface_v3/interface_expr_user_fct_game.cpp index 153cdf9a4..30126c0d9 100644 --- a/code/ryzom/client/src/interface_v3/interface_expr_user_fct_game.cpp +++ b/code/ryzom/client/src/interface_v3/interface_expr_user_fct_game.cpp @@ -1,5 +1,8 @@ // Ryzom - MMORPG Framework -// Copyright (C) 2010 Winch Gate Property Limited +// Copyright (C) 2010-2019 Winch Gate Property Limited +// +// This source file has been modified by the following contributors: +// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/ryzom/client/src/interface_v3/interface_expr_user_fct_items.cpp b/code/ryzom/client/src/interface_v3/interface_expr_user_fct_items.cpp index 14e603a7b..9aeec4e5f 100644 --- a/code/ryzom/client/src/interface_v3/interface_expr_user_fct_items.cpp +++ b/code/ryzom/client/src/interface_v3/interface_expr_user_fct_items.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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/interface_v3/interface_manager.cpp b/code/ryzom/client/src/interface_v3/interface_manager.cpp index a1efa5d1a..50acc2308 100644 --- a/code/ryzom/client/src/interface_v3/interface_manager.cpp +++ b/code/ryzom/client/src/interface_v3/interface_manager.cpp @@ -1,5 +1,11 @@ // Ryzom - MMORPG Framework -// Copyright (C) 2010 Winch Gate Property Limited +// Copyright (C) 2010-2017 Winch Gate Property Limited +// +// This source file has been modified by the following contributors: +// Copyright (C) 2010-2019 Jan BOON (Kaetemi) +// Copyright (C) 2011 Robert TIMM (rti) +// Copyright (C) 2012 Matt RAYKOWSKI (sfb) +// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/ryzom/client/src/interface_v3/interface_manager.h b/code/ryzom/client/src/interface_v3/interface_manager.h index 4179f4bb2..0b89584bc 100644 --- a/code/ryzom/client/src/interface_v3/interface_manager.h +++ b/code/ryzom/client/src/interface_v3/interface_manager.h @@ -1,5 +1,9 @@ // Ryzom - MMORPG Framework -// Copyright (C) 2010 Winch Gate Property Limited +// Copyright (C) 2010-2018 Winch Gate Property Limited +// +// This source file has been modified by the following contributors: +// Copyright (C) 2013 Jan BOON (Kaetemi) +// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/ryzom/client/src/interface_v3/interface_observer.h b/code/ryzom/client/src/interface_v3/interface_observer.h index c44357616..4a3884c9c 100644 --- a/code/ryzom/client/src/interface_v3/interface_observer.h +++ b/code/ryzom/client/src/interface_v3/interface_observer.h @@ -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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/interface_v3/interface_options_ryzom.cpp b/code/ryzom/client/src/interface_v3/interface_options_ryzom.cpp index b7863a357..a839330b8 100644 --- a/code/ryzom/client/src/interface_v3/interface_options_ryzom.cpp +++ b/code/ryzom/client/src/interface_v3/interface_options_ryzom.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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/interface_v3/interface_options_ryzom.h b/code/ryzom/client/src/interface_v3/interface_options_ryzom.h index ebce72956..ada894a8a 100644 --- a/code/ryzom/client/src/interface_v3/interface_options_ryzom.h +++ b/code/ryzom/client/src/interface_v3/interface_options_ryzom.h @@ -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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/interface_v3/interface_pointer.h b/code/ryzom/client/src/interface_v3/interface_pointer.h index 695b6ff73..e71f245af 100644 --- a/code/ryzom/client/src/interface_v3/interface_pointer.h +++ b/code/ryzom/client/src/interface_v3/interface_pointer.h @@ -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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/interface_v3/inventory_manager.cpp b/code/ryzom/client/src/interface_v3/inventory_manager.cpp index 996f91514..816f676e2 100644 --- a/code/ryzom/client/src/interface_v3/inventory_manager.cpp +++ b/code/ryzom/client/src/interface_v3/inventory_manager.cpp @@ -1,5 +1,9 @@ // Ryzom - MMORPG Framework -// Copyright (C) 2010 Winch Gate Property Limited +// Copyright (C) 2010-2019 Winch Gate Property Limited +// +// This source file has been modified by the following contributors: +// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) +// 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 diff --git a/code/ryzom/client/src/interface_v3/inventory_manager.h b/code/ryzom/client/src/interface_v3/inventory_manager.h index 8cc9f85d2..8c365a0be 100644 --- a/code/ryzom/client/src/interface_v3/inventory_manager.h +++ b/code/ryzom/client/src/interface_v3/inventory_manager.h @@ -1,5 +1,8 @@ // Ryzom - MMORPG Framework -// Copyright (C) 2010 Winch Gate Property Limited +// Copyright (C) 2010-2019 Winch Gate Property Limited +// +// This source file has been modified by the following contributors: +// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/ryzom/client/src/interface_v3/list_sheet_base.h b/code/ryzom/client/src/interface_v3/list_sheet_base.h index 59015b43f..b272372aa 100644 --- a/code/ryzom/client/src/interface_v3/list_sheet_base.h +++ b/code/ryzom/client/src/interface_v3/list_sheet_base.h @@ -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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/interface_v3/lua_ihm_ryzom.cpp b/code/ryzom/client/src/interface_v3/lua_ihm_ryzom.cpp index 824db6ade..119ce44b2 100644 --- a/code/ryzom/client/src/interface_v3/lua_ihm_ryzom.cpp +++ b/code/ryzom/client/src/interface_v3/lua_ihm_ryzom.cpp @@ -1,5 +1,9 @@ // Ryzom - MMORPG Framework -// Copyright (C) 2010 Winch Gate Property Limited +// Copyright (C) 2010-2019 Winch Gate Property Limited +// +// This source file has been modified by the following contributors: +// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) +// Copyright (C) 2013-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 diff --git a/code/ryzom/client/src/interface_v3/macrocmd_key.cpp b/code/ryzom/client/src/interface_v3/macrocmd_key.cpp index fb35d3de5..7f4c26c08 100644 --- a/code/ryzom/client/src/interface_v3/macrocmd_key.cpp +++ b/code/ryzom/client/src/interface_v3/macrocmd_key.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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/interface_v3/macrocmd_key.h b/code/ryzom/client/src/interface_v3/macrocmd_key.h index 56c9c2fdd..a8846a81e 100644 --- a/code/ryzom/client/src/interface_v3/macrocmd_key.h +++ b/code/ryzom/client/src/interface_v3/macrocmd_key.h @@ -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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/interface_v3/macrocmd_manager.cpp b/code/ryzom/client/src/interface_v3/macrocmd_manager.cpp index cff97fc68..4ffb2bb17 100644 --- a/code/ryzom/client/src/interface_v3/macrocmd_manager.cpp +++ b/code/ryzom/client/src/interface_v3/macrocmd_manager.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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/interface_v3/music_player.cpp b/code/ryzom/client/src/interface_v3/music_player.cpp index fe97dd937..77d3fd698 100644 --- a/code/ryzom/client/src/interface_v3/music_player.cpp +++ b/code/ryzom/client/src/interface_v3/music_player.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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/interface_v3/music_player.h b/code/ryzom/client/src/interface_v3/music_player.h index 7170934d4..549fa169d 100644 --- a/code/ryzom/client/src/interface_v3/music_player.h +++ b/code/ryzom/client/src/interface_v3/music_player.h @@ -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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/interface_v3/obs_huge_list.cpp b/code/ryzom/client/src/interface_v3/obs_huge_list.cpp index 03c2d973a..d28499791 100644 --- a/code/ryzom/client/src/interface_v3/obs_huge_list.cpp +++ b/code/ryzom/client/src/interface_v3/obs_huge_list.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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/interface_v3/obs_huge_list.h b/code/ryzom/client/src/interface_v3/obs_huge_list.h index 480d31540..664f2ab46 100644 --- a/code/ryzom/client/src/interface_v3/obs_huge_list.h +++ b/code/ryzom/client/src/interface_v3/obs_huge_list.h @@ -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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/interface_v3/parser_modules.cpp b/code/ryzom/client/src/interface_v3/parser_modules.cpp index 2d2c7cb60..37f93eda5 100644 --- a/code/ryzom/client/src/interface_v3/parser_modules.cpp +++ b/code/ryzom/client/src/interface_v3/parser_modules.cpp @@ -1,6 +1,10 @@ // Ryzom - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) +// Copyright (C) 2015 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/client/src/interface_v3/parser_modules.h b/code/ryzom/client/src/interface_v3/parser_modules.h index f816f8d39..780991ccc 100644 --- a/code/ryzom/client/src/interface_v3/parser_modules.h +++ b/code/ryzom/client/src/interface_v3/parser_modules.h @@ -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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/interface_v3/people_interraction.cpp b/code/ryzom/client/src/interface_v3/people_interraction.cpp index 75a29cba7..96f27bb6c 100644 --- a/code/ryzom/client/src/interface_v3/people_interraction.cpp +++ b/code/ryzom/client/src/interface_v3/people_interraction.cpp @@ -1,6 +1,10 @@ // Ryzom - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2013 Jan BOON (Kaetemi) +// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/interface_v3/people_list.cpp b/code/ryzom/client/src/interface_v3/people_list.cpp index 81f3e0013..6be310d94 100644 --- a/code/ryzom/client/src/interface_v3/people_list.cpp +++ b/code/ryzom/client/src/interface_v3/people_list.cpp @@ -1,5 +1,8 @@ // Ryzom - MMORPG Framework -// Copyright (C) 2010 Winch Gate Property Limited +// Copyright (C) 2010-2019 Winch Gate Property Limited +// +// This source file has been modified by the following contributors: +// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/ryzom/client/src/interface_v3/people_list.h b/code/ryzom/client/src/interface_v3/people_list.h index 5494644c2..32317b6b8 100644 --- a/code/ryzom/client/src/interface_v3/people_list.h +++ b/code/ryzom/client/src/interface_v3/people_list.h @@ -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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/interface_v3/player_trade.cpp b/code/ryzom/client/src/interface_v3/player_trade.cpp index a497ab0c4..5b0084cba 100644 --- a/code/ryzom/client/src/interface_v3/player_trade.cpp +++ b/code/ryzom/client/src/interface_v3/player_trade.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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/interface_v3/register_interface_elements.cpp b/code/ryzom/client/src/interface_v3/register_interface_elements.cpp index 203cac03a..c425f8401 100644 --- a/code/ryzom/client/src/interface_v3/register_interface_elements.cpp +++ b/code/ryzom/client/src/interface_v3/register_interface_elements.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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/interface_v3/sbrick_manager.cpp b/code/ryzom/client/src/interface_v3/sbrick_manager.cpp index 86946e2e1..d12ed783c 100644 --- a/code/ryzom/client/src/interface_v3/sbrick_manager.cpp +++ b/code/ryzom/client/src/interface_v3/sbrick_manager.cpp @@ -1,6 +1,10 @@ // Ryzom - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) +// Copyright (C) 2014 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/client/src/interface_v3/sbrick_manager.h b/code/ryzom/client/src/interface_v3/sbrick_manager.h index d963309bf..22168e132 100644 --- a/code/ryzom/client/src/interface_v3/sbrick_manager.h +++ b/code/ryzom/client/src/interface_v3/sbrick_manager.h @@ -1,6 +1,10 @@ // Ryzom - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) +// Copyright (C) 2014 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/client/src/interface_v3/skill_manager.cpp b/code/ryzom/client/src/interface_v3/skill_manager.cpp index d8656d925..c2f242921 100644 --- a/code/ryzom/client/src/interface_v3/skill_manager.cpp +++ b/code/ryzom/client/src/interface_v3/skill_manager.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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/interface_v3/skill_manager.h b/code/ryzom/client/src/interface_v3/skill_manager.h index 3e4137129..f47da38c5 100644 --- a/code/ryzom/client/src/interface_v3/skill_manager.h +++ b/code/ryzom/client/src/interface_v3/skill_manager.h @@ -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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/interface_v3/sphrase_manager.cpp b/code/ryzom/client/src/interface_v3/sphrase_manager.cpp index 09cc9b3fe..5ebf3eee9 100644 --- a/code/ryzom/client/src/interface_v3/sphrase_manager.cpp +++ b/code/ryzom/client/src/interface_v3/sphrase_manager.cpp @@ -1,6 +1,10 @@ // Ryzom - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) +// Copyright (C) 2013-2014 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/client/src/interface_v3/sphrase_manager.h b/code/ryzom/client/src/interface_v3/sphrase_manager.h index d4c1b2092..03c0f1718 100644 --- a/code/ryzom/client/src/interface_v3/sphrase_manager.h +++ b/code/ryzom/client/src/interface_v3/sphrase_manager.h @@ -1,6 +1,10 @@ // Ryzom - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2013 Jan BOON (Kaetemi) +// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/interface_v3/task_bar_manager.cpp b/code/ryzom/client/src/interface_v3/task_bar_manager.cpp index 96df8d7f5..70d2d9fe7 100644 --- a/code/ryzom/client/src/interface_v3/task_bar_manager.cpp +++ b/code/ryzom/client/src/interface_v3/task_bar_manager.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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/interface_v3/task_bar_manager.h b/code/ryzom/client/src/interface_v3/task_bar_manager.h index 45e5fc7da..06222413e 100644 --- a/code/ryzom/client/src/interface_v3/task_bar_manager.h +++ b/code/ryzom/client/src/interface_v3/task_bar_manager.h @@ -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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/interface_v3/view_bitmap_faber_mp.cpp b/code/ryzom/client/src/interface_v3/view_bitmap_faber_mp.cpp index a87e807cc..cbfdf8f42 100644 --- a/code/ryzom/client/src/interface_v3/view_bitmap_faber_mp.cpp +++ b/code/ryzom/client/src/interface_v3/view_bitmap_faber_mp.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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/interface_v3/view_bitmap_faber_mp.h b/code/ryzom/client/src/interface_v3/view_bitmap_faber_mp.h index 2fd357144..3f18bffa3 100644 --- a/code/ryzom/client/src/interface_v3/view_bitmap_faber_mp.h +++ b/code/ryzom/client/src/interface_v3/view_bitmap_faber_mp.h @@ -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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/interface_v3/view_pointer_ryzom.cpp b/code/ryzom/client/src/interface_v3/view_pointer_ryzom.cpp index 360e0b762..653e2351e 100644 --- a/code/ryzom/client/src/interface_v3/view_pointer_ryzom.cpp +++ b/code/ryzom/client/src/interface_v3/view_pointer_ryzom.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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/interface_v3/view_radar.cpp b/code/ryzom/client/src/interface_v3/view_radar.cpp index 62e921690..ea9f5286b 100644 --- a/code/ryzom/client/src/interface_v3/view_radar.cpp +++ b/code/ryzom/client/src/interface_v3/view_radar.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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/interface_v3/view_radar.h b/code/ryzom/client/src/interface_v3/view_radar.h index d218a4890..cc0ffc1dc 100644 --- a/code/ryzom/client/src/interface_v3/view_radar.h +++ b/code/ryzom/client/src/interface_v3/view_radar.h @@ -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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/landscape_poly_drawer.h b/code/ryzom/client/src/landscape_poly_drawer.h index 865112223..1e46346f6 100644 --- a/code/ryzom/client/src/landscape_poly_drawer.h +++ b/code/ryzom/client/src/landscape_poly_drawer.h @@ -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) 2013-2014 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/client/src/light_cycle_manager.cpp b/code/ryzom/client/src/light_cycle_manager.cpp index eeeeb66f6..40b784cf2 100644 --- a/code/ryzom/client/src/light_cycle_manager.cpp +++ b/code/ryzom/client/src/light_cycle_manager.cpp @@ -1,6 +1,10 @@ // Ryzom - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) +// Copyright (C) 2014-2015 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/client/src/login.cpp b/code/ryzom/client/src/login.cpp index 7cc58dfd7..ae678ead3 100644 --- a/code/ryzom/client/src/login.cpp +++ b/code/ryzom/client/src/login.cpp @@ -1,5 +1,9 @@ // Ryzom - MMORPG Framework -// Copyright (C) 2010 Winch Gate Property Limited +// Copyright (C) 2010-2019 Winch Gate Property Limited +// +// This source file has been modified by the following contributors: +// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) +// Copyright (C) 2014-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 diff --git a/code/ryzom/client/src/login.h b/code/ryzom/client/src/login.h index d3025837d..cca0165d3 100644 --- a/code/ryzom/client/src/login.h +++ b/code/ryzom/client/src/login.h @@ -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 diff --git a/code/ryzom/client/src/login_patch.cpp b/code/ryzom/client/src/login_patch.cpp index 3814d3a46..926ed61b1 100644 --- a/code/ryzom/client/src/login_patch.cpp +++ b/code/ryzom/client/src/login_patch.cpp @@ -1,6 +1,10 @@ // Ryzom - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2014 Matthew LAGOE (Botanic) +// Copyright (C) 2014-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/client/src/login_progress_post_thread.cpp b/code/ryzom/client/src/login_progress_post_thread.cpp index 08503f875..8673f77a6 100644 --- a/code/ryzom/client/src/login_progress_post_thread.cpp +++ b/code/ryzom/client/src/login_progress_post_thread.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) 2016 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/client/src/login_xdelta.cpp b/code/ryzom/client/src/login_xdelta.cpp index 8cb8beaa1..ad02f095a 100644 --- a/code/ryzom/client/src/login_xdelta.cpp +++ b/code/ryzom/client/src/login_xdelta.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 diff --git a/code/ryzom/client/src/main_loop.cpp b/code/ryzom/client/src/main_loop.cpp index 981bc7c72..a3f6f3059 100644 --- a/code/ryzom/client/src/main_loop.cpp +++ b/code/ryzom/client/src/main_loop.cpp @@ -1,6 +1,10 @@ // Ryzom - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) +// Copyright (C) 2013-2016 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/client/src/main_loop.h b/code/ryzom/client/src/main_loop.h index 79ebc69fa..04079e213 100644 --- a/code/ryzom/client/src/main_loop.h +++ b/code/ryzom/client/src/main_loop.h @@ -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) 2013-2014 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/client/src/main_loop_debug.cpp b/code/ryzom/client/src/main_loop_debug.cpp index 7eb2989b4..ac29a3984 100644 --- a/code/ryzom/client/src/main_loop_debug.cpp +++ b/code/ryzom/client/src/main_loop_debug.cpp @@ -1,5 +1,8 @@ // Ryzom - MMORPG Framework -// Copyright (C) 2010 Winch Gate Property Limited +// Copyright (C) 2010-2017 Winch Gate Property Limited +// +// This source file has been modified by the following contributors: +// Copyright (C) 2013-2016 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 diff --git a/code/ryzom/client/src/main_loop_debug.h b/code/ryzom/client/src/main_loop_debug.h index 70139290e..d1e63cb49 100644 --- a/code/ryzom/client/src/main_loop_debug.h +++ b/code/ryzom/client/src/main_loop_debug.h @@ -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) 2013 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/client/src/main_loop_temp.cpp b/code/ryzom/client/src/main_loop_temp.cpp index 0bb49b13f..d7da4f125 100644 --- a/code/ryzom/client/src/main_loop_temp.cpp +++ b/code/ryzom/client/src/main_loop_temp.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) 2013-2014 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/client/src/main_loop_temp.h b/code/ryzom/client/src/main_loop_temp.h index 4f24972f7..9f3703c1e 100644 --- a/code/ryzom/client/src/main_loop_temp.h +++ b/code/ryzom/client/src/main_loop_temp.h @@ -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) 2013 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/client/src/main_loop_utilities.cpp b/code/ryzom/client/src/main_loop_utilities.cpp index 37bfc3247..4243e15b0 100644 --- a/code/ryzom/client/src/main_loop_utilities.cpp +++ b/code/ryzom/client/src/main_loop_utilities.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) 2013-2014 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/client/src/main_loop_utilities.h b/code/ryzom/client/src/main_loop_utilities.h index d8ea3dedf..fa80a155b 100644 --- a/code/ryzom/client/src/main_loop_utilities.h +++ b/code/ryzom/client/src/main_loop_utilities.h @@ -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) 2013 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/client/src/misc.cpp b/code/ryzom/client/src/misc.cpp index 97aaea128..ee247e921 100644 --- a/code/ryzom/client/src/misc.cpp +++ b/code/ryzom/client/src/misc.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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/misc.h b/code/ryzom/client/src/misc.h index 9ba48b718..49127d100 100644 --- a/code/ryzom/client/src/misc.h +++ b/code/ryzom/client/src/misc.h @@ -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) 2015 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/client/src/motion/modes/ai_mode.cpp b/code/ryzom/client/src/motion/modes/ai_mode.cpp index 030402425..27bbeec67 100644 --- a/code/ryzom/client/src/motion/modes/ai_mode.cpp +++ b/code/ryzom/client/src/motion/modes/ai_mode.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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/motion/user_controls.cpp b/code/ryzom/client/src/motion/user_controls.cpp index a3a4751e7..1a9dac6e1 100644 --- a/code/ryzom/client/src/motion/user_controls.cpp +++ b/code/ryzom/client/src/motion/user_controls.cpp @@ -1,6 +1,11 @@ // Ryzom - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2010 Robert TIMM (rti) +// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) +// Copyright (C) 2013-2014 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/client/src/motion/user_controls.h b/code/ryzom/client/src/motion/user_controls.h index 018b2c8e9..b607ab180 100644 --- a/code/ryzom/client/src/motion/user_controls.h +++ b/code/ryzom/client/src/motion/user_controls.h @@ -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) 2013-2014 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/client/src/net_manager.cpp b/code/ryzom/client/src/net_manager.cpp index d562e5ea4..8f11e453a 100644 --- a/code/ryzom/client/src/net_manager.cpp +++ b/code/ryzom/client/src/net_manager.cpp @@ -1,5 +1,9 @@ // Ryzom - MMORPG Framework -// Copyright (C) 2010 Winch Gate Property Limited +// Copyright (C) 2010-2019 Winch Gate Property Limited +// +// This source file has been modified by the following contributors: +// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) +// Copyright (C) 2014-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 diff --git a/code/ryzom/client/src/net_manager.h b/code/ryzom/client/src/net_manager.h index 06d6a7621..5b445364e 100644 --- a/code/ryzom/client/src/net_manager.h +++ b/code/ryzom/client/src/net_manager.h @@ -1,6 +1,10 @@ // Ryzom - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2013 Jan BOON (Kaetemi) +// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/network_connection.cpp b/code/ryzom/client/src/network_connection.cpp index 133f92af1..731677043 100644 --- a/code/ryzom/client/src/network_connection.cpp +++ b/code/ryzom/client/src/network_connection.cpp @@ -1,6 +1,10 @@ // Ryzom - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) +// Copyright (C) 2014-2016 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/client/src/network_connection.h b/code/ryzom/client/src/network_connection.h index 5bfaeae36..d11702682 100644 --- a/code/ryzom/client/src/network_connection.h +++ b/code/ryzom/client/src/network_connection.h @@ -1,6 +1,10 @@ // Ryzom - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) +// Copyright (C) 2015 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/client/src/npc_icon.cpp b/code/ryzom/client/src/npc_icon.cpp index 27c83526e..aa85082f2 100644 --- a/code/ryzom/client/src/npc_icon.cpp +++ b/code/ryzom/client/src/npc_icon.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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/npc_icon.h b/code/ryzom/client/src/npc_icon.h index 3b798a263..eb0e9bf94 100644 --- a/code/ryzom/client/src/npc_icon.h +++ b/code/ryzom/client/src/npc_icon.h @@ -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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/outpost_manager.cpp b/code/ryzom/client/src/outpost_manager.cpp index 6c2ef2554..305cba650 100644 --- a/code/ryzom/client/src/outpost_manager.cpp +++ b/code/ryzom/client/src/outpost_manager.cpp @@ -1,5 +1,8 @@ // Ryzom - MMORPG Framework -// Copyright (C) 2010 Winch Gate Property Limited +// Copyright (C) 2010-2019 Winch Gate Property Limited +// +// This source file has been modified by the following contributors: +// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/ryzom/client/src/outpost_manager.h b/code/ryzom/client/src/outpost_manager.h index 1c55cecca..3a1b59673 100644 --- a/code/ryzom/client/src/outpost_manager.h +++ b/code/ryzom/client/src/outpost_manager.h @@ -1,5 +1,5 @@ // Ryzom - MMORPG Framework -// Copyright (C) 2010 Winch Gate Property Limited +// Copyright (C) 2010-2019 Winch Gate Property Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/ryzom/client/src/permanent_ban.cpp b/code/ryzom/client/src/permanent_ban.cpp index 5c9cbbb1f..56903f0cc 100644 --- a/code/ryzom/client/src/permanent_ban.cpp +++ b/code/ryzom/client/src/permanent_ban.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 diff --git a/code/ryzom/client/src/ping.cpp b/code/ryzom/client/src/ping.cpp index 98d469592..f9526e6fe 100644 --- a/code/ryzom/client/src/ping.cpp +++ b/code/ryzom/client/src/ping.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) 2013-2014 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/client/src/ping.h b/code/ryzom/client/src/ping.h index 46a7e2c13..6d6a4eede 100644 --- a/code/ryzom/client/src/ping.h +++ b/code/ryzom/client/src/ping.h @@ -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) 2013 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/client/src/player_cl.cpp b/code/ryzom/client/src/player_cl.cpp index 45dcf7c48..eafdec032 100644 --- a/code/ryzom/client/src/player_cl.cpp +++ b/code/ryzom/client/src/player_cl.cpp @@ -1,5 +1,8 @@ // Ryzom - MMORPG Framework -// Copyright (C) 2010 Winch Gate Property Limited +// Copyright (C) 2010-2018 Winch Gate Property Limited +// +// This source file has been modified by the following contributors: +// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/ryzom/client/src/player_r2_cl.cpp b/code/ryzom/client/src/player_r2_cl.cpp index 3d0e6e4df..138e7d8fa 100644 --- a/code/ryzom/client/src/player_r2_cl.cpp +++ b/code/ryzom/client/src/player_r2_cl.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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/profiling.cpp b/code/ryzom/client/src/profiling.cpp index 85805bbf4..ee8f24d31 100644 --- a/code/ryzom/client/src/profiling.cpp +++ b/code/ryzom/client/src/profiling.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) 2013-2014 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/client/src/profiling.h b/code/ryzom/client/src/profiling.h index 2499fa20b..cc06ab90e 100644 --- a/code/ryzom/client/src/profiling.h +++ b/code/ryzom/client/src/profiling.h @@ -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) 2013 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/client/src/progress.cpp b/code/ryzom/client/src/progress.cpp index 2766c60d2..133f5abd2 100644 --- a/code/ryzom/client/src/progress.cpp +++ b/code/ryzom/client/src/progress.cpp @@ -1,6 +1,10 @@ // Ryzom - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) +// Copyright (C) 2014 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/client/src/property_decoder.cpp b/code/ryzom/client/src/property_decoder.cpp index cb0bd5649..f0d2358a0 100644 --- a/code/ryzom/client/src/property_decoder.cpp +++ b/code/ryzom/client/src/property_decoder.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) 2016 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/client/src/r2/config_var.h b/code/ryzom/client/src/r2/config_var.h index 828f67768..1007893d2 100644 --- a/code/ryzom/client/src/r2/config_var.h +++ b/code/ryzom/client/src/r2/config_var.h @@ -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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/r2/displayer_base.cpp b/code/ryzom/client/src/r2/displayer_base.cpp index 1864d0e95..0c474f117 100644 --- a/code/ryzom/client/src/r2/displayer_base.cpp +++ b/code/ryzom/client/src/r2/displayer_base.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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/r2/displayer_base.h b/code/ryzom/client/src/r2/displayer_base.h index 0ec8f4ff5..40b46d85e 100644 --- a/code/ryzom/client/src/r2/displayer_base.h +++ b/code/ryzom/client/src/r2/displayer_base.h @@ -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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/r2/displayer_lua.cpp b/code/ryzom/client/src/r2/displayer_lua.cpp index 2f17efb1a..05974dd91 100644 --- a/code/ryzom/client/src/r2/displayer_lua.cpp +++ b/code/ryzom/client/src/r2/displayer_lua.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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/r2/displayer_lua.h b/code/ryzom/client/src/r2/displayer_lua.h index 8af0a11da..b8da8072c 100644 --- a/code/ryzom/client/src/r2/displayer_lua.h +++ b/code/ryzom/client/src/r2/displayer_lua.h @@ -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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/r2/displayer_visual.cpp b/code/ryzom/client/src/r2/displayer_visual.cpp index 76c4270a3..6d3c1a32e 100644 --- a/code/ryzom/client/src/r2/displayer_visual.cpp +++ b/code/ryzom/client/src/r2/displayer_visual.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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/r2/displayer_visual_activity_sequence.cpp b/code/ryzom/client/src/r2/displayer_visual_activity_sequence.cpp index 6fd17b470..1990185c2 100644 --- a/code/ryzom/client/src/r2/displayer_visual_activity_sequence.cpp +++ b/code/ryzom/client/src/r2/displayer_visual_activity_sequence.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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/r2/displayer_visual_entity.cpp b/code/ryzom/client/src/r2/displayer_visual_entity.cpp index d906d3d1e..6e09e580e 100644 --- a/code/ryzom/client/src/r2/displayer_visual_entity.cpp +++ b/code/ryzom/client/src/r2/displayer_visual_entity.cpp @@ -1,6 +1,10 @@ // Ryzom - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) +// Copyright (C) 2016 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/client/src/r2/displayer_visual_entity.h b/code/ryzom/client/src/r2/displayer_visual_entity.h index 62bcea86e..f5bf4ea94 100644 --- a/code/ryzom/client/src/r2/displayer_visual_entity.h +++ b/code/ryzom/client/src/r2/displayer_visual_entity.h @@ -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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/r2/displayer_visual_group.cpp b/code/ryzom/client/src/r2/displayer_visual_group.cpp index 3784879cc..05e120e66 100644 --- a/code/ryzom/client/src/r2/displayer_visual_group.cpp +++ b/code/ryzom/client/src/r2/displayer_visual_group.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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/r2/displayer_visual_shape.h b/code/ryzom/client/src/r2/displayer_visual_shape.h index 5dffcd88a..19d0b79b6 100644 --- a/code/ryzom/client/src/r2/displayer_visual_shape.h +++ b/code/ryzom/client/src/r2/displayer_visual_shape.h @@ -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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/r2/dmc/action_historic.cpp b/code/ryzom/client/src/r2/dmc/action_historic.cpp index e7a32cc62..19cab7384 100644 --- a/code/ryzom/client/src/r2/dmc/action_historic.cpp +++ b/code/ryzom/client/src/r2/dmc/action_historic.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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/r2/dmc/client_edition_module.cpp b/code/ryzom/client/src/r2/dmc/client_edition_module.cpp index 66dd94c9f..f58a9f669 100644 --- a/code/ryzom/client/src/r2/dmc/client_edition_module.cpp +++ b/code/ryzom/client/src/r2/dmc/client_edition_module.cpp @@ -1,6 +1,10 @@ // Ryzom - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) +// Copyright (C) 2015-2018 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/client/src/r2/dmc/com_lua_module.cpp b/code/ryzom/client/src/r2/dmc/com_lua_module.cpp index 930e06051..7a3fb94fc 100644 --- a/code/ryzom/client/src/r2/dmc/com_lua_module.cpp +++ b/code/ryzom/client/src/r2/dmc/com_lua_module.cpp @@ -1,6 +1,10 @@ // Ryzom - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) +// Copyright (C) 2013-2014 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/client/src/r2/dmc/com_lua_module.h b/code/ryzom/client/src/r2/dmc/com_lua_module.h index f7bd5d915..cddbc7f85 100644 --- a/code/ryzom/client/src/r2/dmc/com_lua_module.h +++ b/code/ryzom/client/src/r2/dmc/com_lua_module.h @@ -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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/r2/dmc/dmc.h b/code/ryzom/client/src/r2/dmc/dmc.h index b97ea7d9f..2da6293ee 100644 --- a/code/ryzom/client/src/r2/dmc/dmc.h +++ b/code/ryzom/client/src/r2/dmc/dmc.h @@ -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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/r2/editor.cpp b/code/ryzom/client/src/r2/editor.cpp index 68214151c..e97cbf4a5 100644 --- a/code/ryzom/client/src/r2/editor.cpp +++ b/code/ryzom/client/src/r2/editor.cpp @@ -1,6 +1,10 @@ // Ryzom - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) +// Copyright (C) 2013-2016 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/client/src/r2/editor.h b/code/ryzom/client/src/r2/editor.h index cd19f6c71..2fc85e1fa 100644 --- a/code/ryzom/client/src/r2/editor.h +++ b/code/ryzom/client/src/r2/editor.h @@ -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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/r2/entity_custom_select_box.cpp b/code/ryzom/client/src/r2/entity_custom_select_box.cpp index c426ad30c..5a5019ada 100644 --- a/code/ryzom/client/src/r2/entity_custom_select_box.cpp +++ b/code/ryzom/client/src/r2/entity_custom_select_box.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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/r2/entity_custom_select_box.h b/code/ryzom/client/src/r2/entity_custom_select_box.h index e2dc28347..9a3e04e1e 100644 --- a/code/ryzom/client/src/r2/entity_custom_select_box.h +++ b/code/ryzom/client/src/r2/entity_custom_select_box.h @@ -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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/r2/instance.cpp b/code/ryzom/client/src/r2/instance.cpp index f97719b0a..6f3d04a2f 100644 --- a/code/ryzom/client/src/r2/instance.cpp +++ b/code/ryzom/client/src/r2/instance.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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/r2/instance.h b/code/ryzom/client/src/r2/instance.h index 49b20cc3c..e8ee67d3d 100644 --- a/code/ryzom/client/src/r2/instance.h +++ b/code/ryzom/client/src/r2/instance.h @@ -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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/r2/instance_map_deco.cpp b/code/ryzom/client/src/r2/instance_map_deco.cpp index 4af0550f4..cdc792dc5 100644 --- a/code/ryzom/client/src/r2/instance_map_deco.cpp +++ b/code/ryzom/client/src/r2/instance_map_deco.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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/r2/instance_map_deco.h b/code/ryzom/client/src/r2/instance_map_deco.h index 520028da7..cf1a2352c 100644 --- a/code/ryzom/client/src/r2/instance_map_deco.h +++ b/code/ryzom/client/src/r2/instance_map_deco.h @@ -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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/r2/island_collision.cpp b/code/ryzom/client/src/r2/island_collision.cpp index 74829a17e..e488b9334 100644 --- a/code/ryzom/client/src/r2/island_collision.cpp +++ b/code/ryzom/client/src/r2/island_collision.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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/r2/island_collision.h b/code/ryzom/client/src/r2/island_collision.h index 6cf3eff0c..3c44dbcb4 100644 --- a/code/ryzom/client/src/r2/island_collision.h +++ b/code/ryzom/client/src/r2/island_collision.h @@ -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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/r2/lua_event_forwarder.cpp b/code/ryzom/client/src/r2/lua_event_forwarder.cpp index 27b1927b4..e904cb058 100644 --- a/code/ryzom/client/src/r2/lua_event_forwarder.cpp +++ b/code/ryzom/client/src/r2/lua_event_forwarder.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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/r2/lua_event_forwarder.h b/code/ryzom/client/src/r2/lua_event_forwarder.h index 56fb3eaf0..8b88eb30c 100644 --- a/code/ryzom/client/src/r2/lua_event_forwarder.h +++ b/code/ryzom/client/src/r2/lua_event_forwarder.h @@ -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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/r2/npc_editor.cpp b/code/ryzom/client/src/r2/npc_editor.cpp index a3c7e190d..056b18520 100644 --- a/code/ryzom/client/src/r2/npc_editor.cpp +++ b/code/ryzom/client/src/r2/npc_editor.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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/r2/npc_editor.h b/code/ryzom/client/src/r2/npc_editor.h index 5483187f0..a462ad11e 100644 --- a/code/ryzom/client/src/r2/npc_editor.h +++ b/code/ryzom/client/src/r2/npc_editor.h @@ -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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/r2/object_factory_client.cpp b/code/ryzom/client/src/r2/object_factory_client.cpp index f91ed6681..b70b9fa4d 100644 --- a/code/ryzom/client/src/r2/object_factory_client.cpp +++ b/code/ryzom/client/src/r2/object_factory_client.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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/r2/object_factory_client.h b/code/ryzom/client/src/r2/object_factory_client.h index f90419cc7..dbf4595b6 100644 --- a/code/ryzom/client/src/r2/object_factory_client.h +++ b/code/ryzom/client/src/r2/object_factory_client.h @@ -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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/r2/palette_node.h b/code/ryzom/client/src/r2/palette_node.h index 33379674e..e513aa7d7 100644 --- a/code/ryzom/client/src/r2/palette_node.h +++ b/code/ryzom/client/src/r2/palette_node.h @@ -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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/r2/prim_render.cpp b/code/ryzom/client/src/r2/prim_render.cpp index e8b1c23ac..59b05e1c4 100644 --- a/code/ryzom/client/src/r2/prim_render.cpp +++ b/code/ryzom/client/src/r2/prim_render.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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/r2/prim_render.h b/code/ryzom/client/src/r2/prim_render.h index bad6004df..7d2f708ed 100644 --- a/code/ryzom/client/src/r2/prim_render.h +++ b/code/ryzom/client/src/r2/prim_render.h @@ -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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/r2/tool.cpp b/code/ryzom/client/src/r2/tool.cpp index 2e663a5ec..8620341d8 100644 --- a/code/ryzom/client/src/r2/tool.cpp +++ b/code/ryzom/client/src/r2/tool.cpp @@ -1,6 +1,10 @@ // Ryzom - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2013 Jan BOON (Kaetemi) +// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/r2/tool.h b/code/ryzom/client/src/r2/tool.h index ee6b4fa27..122b85782 100644 --- a/code/ryzom/client/src/r2/tool.h +++ b/code/ryzom/client/src/r2/tool.h @@ -1,6 +1,10 @@ // Ryzom - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2013 Jan BOON (Kaetemi) +// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/r2/tool_choose_pos.cpp b/code/ryzom/client/src/r2/tool_choose_pos.cpp index ae76fc3bf..6170e21f1 100644 --- a/code/ryzom/client/src/r2/tool_choose_pos.cpp +++ b/code/ryzom/client/src/r2/tool_choose_pos.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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/r2/tool_choose_pos.h b/code/ryzom/client/src/r2/tool_choose_pos.h index 4b06bd5db..913dad3c1 100644 --- a/code/ryzom/client/src/r2/tool_choose_pos.h +++ b/code/ryzom/client/src/r2/tool_choose_pos.h @@ -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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/r2/tool_choose_pos_lua.h b/code/ryzom/client/src/r2/tool_choose_pos_lua.h index 813563c23..1a5b45bcf 100644 --- a/code/ryzom/client/src/r2/tool_choose_pos_lua.h +++ b/code/ryzom/client/src/r2/tool_choose_pos_lua.h @@ -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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/r2/tool_create_entity.cpp b/code/ryzom/client/src/r2/tool_create_entity.cpp index b6be50bd7..eef82ef87 100644 --- a/code/ryzom/client/src/r2/tool_create_entity.cpp +++ b/code/ryzom/client/src/r2/tool_create_entity.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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/r2/tool_create_entity.h b/code/ryzom/client/src/r2/tool_create_entity.h index 1bfbd3950..a6c174b22 100644 --- a/code/ryzom/client/src/r2/tool_create_entity.h +++ b/code/ryzom/client/src/r2/tool_create_entity.h @@ -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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/r2/tool_draw_prim.cpp b/code/ryzom/client/src/r2/tool_draw_prim.cpp index da8c41f06..c32682626 100644 --- a/code/ryzom/client/src/r2/tool_draw_prim.cpp +++ b/code/ryzom/client/src/r2/tool_draw_prim.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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/r2/tool_draw_prim.h b/code/ryzom/client/src/r2/tool_draw_prim.h index da545878e..c1b0b43f4 100644 --- a/code/ryzom/client/src/r2/tool_draw_prim.h +++ b/code/ryzom/client/src/r2/tool_draw_prim.h @@ -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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/r2/tool_maintained_action.cpp b/code/ryzom/client/src/r2/tool_maintained_action.cpp index ea0adaa93..7ed103e35 100644 --- a/code/ryzom/client/src/r2/tool_maintained_action.cpp +++ b/code/ryzom/client/src/r2/tool_maintained_action.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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/r2/tool_pick.cpp b/code/ryzom/client/src/r2/tool_pick.cpp index bb80a6258..b6f6064a3 100644 --- a/code/ryzom/client/src/r2/tool_pick.cpp +++ b/code/ryzom/client/src/r2/tool_pick.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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/release.cpp b/code/ryzom/client/src/release.cpp index 6686fea5d..0477acce9 100644 --- a/code/ryzom/client/src/release.cpp +++ b/code/ryzom/client/src/release.cpp @@ -1,6 +1,10 @@ // Ryzom - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) +// Copyright (C) 2013-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/client/src/session_browser_impl.cpp b/code/ryzom/client/src/session_browser_impl.cpp index 9762c4a90..9f3cc77a9 100644 --- a/code/ryzom/client/src/session_browser_impl.cpp +++ b/code/ryzom/client/src/session_browser_impl.cpp @@ -1,6 +1,10 @@ // Ryzom - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2013 Jan BOON (Kaetemi) +// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/session_browser_impl.h b/code/ryzom/client/src/session_browser_impl.h index 302da2864..8d39d7961 100644 --- a/code/ryzom/client/src/session_browser_impl.h +++ b/code/ryzom/client/src/session_browser_impl.h @@ -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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/sheet_manager.cpp b/code/ryzom/client/src/sheet_manager.cpp index 57de199a2..5407a761d 100644 --- a/code/ryzom/client/src/sheet_manager.cpp +++ b/code/ryzom/client/src/sheet_manager.cpp @@ -1,5 +1,5 @@ // Ryzom - MMORPG Framework -// Copyright (C) 2010 Winch Gate Property Limited +// Copyright (C) 2010-2019 Winch Gate Property Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/ryzom/client/src/sky.cpp b/code/ryzom/client/src/sky.cpp index eb7f70d7c..ad9411189 100644 --- a/code/ryzom/client/src/sky.cpp +++ b/code/ryzom/client/src/sky.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) 2014 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/client/src/sound_manager.cpp b/code/ryzom/client/src/sound_manager.cpp index 7cc6c3a6f..572bf2c07 100644 --- a/code/ryzom/client/src/sound_manager.cpp +++ b/code/ryzom/client/src/sound_manager.cpp @@ -1,6 +1,10 @@ // Ryzom - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2010 Matt RAYKOWSKI (sfb) +// Copyright (C) 2012-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/client/src/sound_manager.h b/code/ryzom/client/src/sound_manager.h index 1c03824e3..c097f092f 100644 --- a/code/ryzom/client/src/sound_manager.h +++ b/code/ryzom/client/src/sound_manager.h @@ -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) 2012-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/client/src/stdpch.h b/code/ryzom/client/src/stdpch.h index 5b95b65d9..45aa0f356 100644 --- a/code/ryzom/client/src/stdpch.h +++ b/code/ryzom/client/src/stdpch.h @@ -1,6 +1,10 @@ // Ryzom - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2011 Robert TIMM (rti) +// Copyright (C) 2014 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/client/src/streamable_ig.cpp b/code/ryzom/client/src/streamable_ig.cpp index 3216b2ee1..dab7a3fa8 100644 --- a/code/ryzom/client/src/streamable_ig.cpp +++ b/code/ryzom/client/src/streamable_ig.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) 2014 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/client/src/string_manager_client.cpp b/code/ryzom/client/src/string_manager_client.cpp index 88bebdfe7..06c3523b4 100644 --- a/code/ryzom/client/src/string_manager_client.cpp +++ b/code/ryzom/client/src/string_manager_client.cpp @@ -1,5 +1,5 @@ // Ryzom - MMORPG Framework -// Copyright (C) 2010 Winch Gate Property Limited +// Copyright (C) 2010-2017 Winch Gate Property Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/ryzom/client/src/string_manager_client.h b/code/ryzom/client/src/string_manager_client.h index f7732a40f..c977a8380 100644 --- a/code/ryzom/client/src/string_manager_client.h +++ b/code/ryzom/client/src/string_manager_client.h @@ -1,5 +1,5 @@ // Ryzom - MMORPG Framework -// Copyright (C) 2010 Winch Gate Property Limited +// Copyright (C) 2010-2017 Winch Gate Property Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/ryzom/client/src/time_client.cpp b/code/ryzom/client/src/time_client.cpp index c67f70d05..1a2b6972b 100644 --- a/code/ryzom/client/src/time_client.cpp +++ b/code/ryzom/client/src/time_client.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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/time_client.h b/code/ryzom/client/src/time_client.h index b3327ee76..a91c49d16 100644 --- a/code/ryzom/client/src/time_client.h +++ b/code/ryzom/client/src/time_client.h @@ -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) 2012 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/client/src/timed_fx_manager.cpp b/code/ryzom/client/src/timed_fx_manager.cpp index 8741e5197..b316f0ab5 100644 --- a/code/ryzom/client/src/timed_fx_manager.cpp +++ b/code/ryzom/client/src/timed_fx_manager.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) 2014 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/client/src/user_entity.cpp b/code/ryzom/client/src/user_entity.cpp index 395d5b698..18cd832be 100644 --- a/code/ryzom/client/src/user_entity.cpp +++ b/code/ryzom/client/src/user_entity.cpp @@ -1,5 +1,9 @@ // Ryzom - MMORPG Framework -// Copyright (C) 2010 Winch Gate Property Limited +// Copyright (C) 2010-2019 Winch Gate Property Limited +// +// This source file has been modified by the following contributors: +// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) +// Copyright (C) 2013-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 diff --git a/code/ryzom/client/src/user_entity.h b/code/ryzom/client/src/user_entity.h index 5149b46e8..382a7d810 100644 --- a/code/ryzom/client/src/user_entity.h +++ b/code/ryzom/client/src/user_entity.h @@ -1,5 +1,8 @@ // Ryzom - MMORPG Framework -// Copyright (C) 2010 Winch Gate Property Limited +// Copyright (C) 2010-2019 Winch Gate Property Limited +// +// This source file has been modified by the following contributors: +// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/ryzom/client/src/view.cpp b/code/ryzom/client/src/view.cpp index 8d097d142..66b575318 100644 --- a/code/ryzom/client/src/view.cpp +++ b/code/ryzom/client/src/view.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) 2013 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/client/src/view.h b/code/ryzom/client/src/view.h index e1c57d4ca..002edbf8b 100644 --- a/code/ryzom/client/src/view.h +++ b/code/ryzom/client/src/view.h @@ -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) 2013 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/client/src/village.h b/code/ryzom/client/src/village.h index bc9747631..0ec4343a6 100644 --- a/code/ryzom/client/src/village.h +++ b/code/ryzom/client/src/village.h @@ -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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/client/src/weather.cpp b/code/ryzom/client/src/weather.cpp index 5891ecb9f..f4ba5014a 100644 --- a/code/ryzom/client/src/weather.cpp +++ b/code/ryzom/client/src/weather.cpp @@ -1,6 +1,10 @@ // Ryzom - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) +// Copyright (C) 2013-2014 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/client/src/weather.h b/code/ryzom/client/src/weather.h index 954b7f2c8..96aef7882 100644 --- a/code/ryzom/client/src/weather.h +++ b/code/ryzom/client/src/weather.h @@ -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) 2014 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/client/src/weather_manager_client.cpp b/code/ryzom/client/src/weather_manager_client.cpp index 81bf0236f..caa3a6099 100644 --- a/code/ryzom/client/src/weather_manager_client.cpp +++ b/code/ryzom/client/src/weather_manager_client.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) 2016 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/client/src/weather_manager_client.h b/code/ryzom/client/src/weather_manager_client.h index f3c6ae07e..98cd8f3af 100644 --- a/code/ryzom/client/src/weather_manager_client.h +++ b/code/ryzom/client/src/weather_manager_client.h @@ -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) 2016 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/common/src/game_share/_backup_service_interface_non_module.cpp b/code/ryzom/common/src/game_share/_backup_service_interface_non_module.cpp index 801d78433..c7993aae3 100644 --- a/code/ryzom/common/src/game_share/_backup_service_interface_non_module.cpp +++ b/code/ryzom/common/src/game_share/_backup_service_interface_non_module.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) 2015 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/common/src/game_share/animal_status.h b/code/ryzom/common/src/game_share/animal_status.h index ac836d7e5..9ad6d1de1 100644 --- a/code/ryzom/common/src/game_share/animal_status.h +++ b/code/ryzom/common/src/game_share/animal_status.h @@ -1,5 +1,5 @@ // Ryzom - MMORPG Framework -// Copyright (C) 2010 Winch Gate Property Limited +// Copyright (C) 2010-2019 Winch Gate Property Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/ryzom/common/src/game_share/animal_type.h b/code/ryzom/common/src/game_share/animal_type.h index 7e28cc1da..3e8842cbc 100644 --- a/code/ryzom/common/src/game_share/animal_type.h +++ b/code/ryzom/common/src/game_share/animal_type.h @@ -1,5 +1,5 @@ // Ryzom - MMORPG Framework -// Copyright (C) 2010 Winch Gate Property Limited +// Copyright (C) 2010-2019 Winch Gate Property Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/ryzom/common/src/game_share/animals_orders.cpp b/code/ryzom/common/src/game_share/animals_orders.cpp index 96788e5e2..cdca08385 100644 --- a/code/ryzom/common/src/game_share/animals_orders.cpp +++ b/code/ryzom/common/src/game_share/animals_orders.cpp @@ -1,5 +1,5 @@ // Ryzom - MMORPG Framework -// Copyright (C) 2010 Winch Gate Property Limited +// Copyright (C) 2010-2019 Winch Gate Property Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/ryzom/common/src/game_share/animals_orders.h b/code/ryzom/common/src/game_share/animals_orders.h index 6ffaed7a8..7637dfe8c 100644 --- a/code/ryzom/common/src/game_share/animals_orders.h +++ b/code/ryzom/common/src/game_share/animals_orders.h @@ -1,5 +1,5 @@ // Ryzom - MMORPG Framework -// Copyright (C) 2010 Winch Gate Property Limited +// Copyright (C) 2010-2019 Winch Gate Property Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/ryzom/common/src/game_share/base_types.h b/code/ryzom/common/src/game_share/base_types.h index 1440c0974..86706a08d 100644 --- a/code/ryzom/common/src/game_share/base_types.h +++ b/code/ryzom/common/src/game_share/base_types.h @@ -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) 2015 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/common/src/game_share/bnp_patch.cpp b/code/ryzom/common/src/game_share/bnp_patch.cpp index 72c484c84..35a16ea03 100644 --- a/code/ryzom/common/src/game_share/bnp_patch.cpp +++ b/code/ryzom/common/src/game_share/bnp_patch.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 diff --git a/code/ryzom/common/src/game_share/bnp_patch.h b/code/ryzom/common/src/game_share/bnp_patch.h index b2d602194..d6ccff702 100644 --- a/code/ryzom/common/src/game_share/bnp_patch.h +++ b/code/ryzom/common/src/game_share/bnp_patch.h @@ -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 diff --git a/code/ryzom/common/src/game_share/crypt.cpp b/code/ryzom/common/src/game_share/crypt.cpp index 05f66d87f..a10c2ab6e 100644 --- a/code/ryzom/common/src/game_share/crypt.cpp +++ b/code/ryzom/common/src/game_share/crypt.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) 2014 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/common/src/game_share/crypt.h b/code/ryzom/common/src/game_share/crypt.h index b9fa8556b..c707b69eb 100644 --- a/code/ryzom/common/src/game_share/crypt.h +++ b/code/ryzom/common/src/game_share/crypt.h @@ -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) 2014 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/common/src/game_share/deployment_configuration.cpp b/code/ryzom/common/src/game_share/deployment_configuration.cpp index 8957c89ac..03ffd776a 100644 --- a/code/ryzom/common/src/game_share/deployment_configuration.cpp +++ b/code/ryzom/common/src/game_share/deployment_configuration.cpp @@ -1,6 +1,10 @@ // Ryzom - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2012 Matt RAYKOWSKI (sfb) +// Copyright (C) 2015 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/common/src/game_share/deployment_configuration.h b/code/ryzom/common/src/game_share/deployment_configuration.h index 930d15b5b..360c9f872 100644 --- a/code/ryzom/common/src/game_share/deployment_configuration.h +++ b/code/ryzom/common/src/game_share/deployment_configuration.h @@ -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) 2012 Matt RAYKOWSKI (sfb) +// // 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/common/src/game_share/dyn_chat.cpp b/code/ryzom/common/src/game_share/dyn_chat.cpp index eed4f33b0..080cfed0c 100644 --- a/code/ryzom/common/src/game_share/dyn_chat.cpp +++ b/code/ryzom/common/src/game_share/dyn_chat.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) 2010 Matt RAYKOWSKI (sfb) +// // 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/common/src/game_share/entity_types.h b/code/ryzom/common/src/game_share/entity_types.h index 23f4bd700..6087b33bb 100644 --- a/code/ryzom/common/src/game_share/entity_types.h +++ b/code/ryzom/common/src/game_share/entity_types.h @@ -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) 2014 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/common/src/game_share/fame.cpp b/code/ryzom/common/src/game_share/fame.cpp index a0e633199..cd9e2b850 100644 --- a/code/ryzom/common/src/game_share/fame.cpp +++ b/code/ryzom/common/src/game_share/fame.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) 2012 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/common/src/game_share/generic_xml_msg_mngr.cpp b/code/ryzom/common/src/game_share/generic_xml_msg_mngr.cpp index fd30af70d..5e46d9923 100644 --- a/code/ryzom/common/src/game_share/generic_xml_msg_mngr.cpp +++ b/code/ryzom/common/src/game_share/generic_xml_msg_mngr.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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/common/src/game_share/inventories.cpp b/code/ryzom/common/src/game_share/inventories.cpp index 6f58216a3..d6b4b5ba9 100644 --- a/code/ryzom/common/src/game_share/inventories.cpp +++ b/code/ryzom/common/src/game_share/inventories.cpp @@ -1,5 +1,5 @@ // Ryzom - MMORPG Framework -// Copyright (C) 2010 Winch Gate Property Limited +// Copyright (C) 2010-2018 Winch Gate Property Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/ryzom/common/src/game_share/inventories.h b/code/ryzom/common/src/game_share/inventories.h index 7b9782c9d..f99dd5331 100644 --- a/code/ryzom/common/src/game_share/inventories.h +++ b/code/ryzom/common/src/game_share/inventories.h @@ -1,5 +1,5 @@ // Ryzom - MMORPG Framework -// Copyright (C) 2010 Winch Gate Property Limited +// Copyright (C) 2010-2018 Winch Gate Property Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/ryzom/common/src/game_share/item_type.cpp b/code/ryzom/common/src/game_share/item_type.cpp index ef21b3850..605a2a75c 100644 --- a/code/ryzom/common/src/game_share/item_type.cpp +++ b/code/ryzom/common/src/game_share/item_type.cpp @@ -1,5 +1,5 @@ // Ryzom - MMORPG Framework -// Copyright (C) 2010 Winch Gate Property Limited +// Copyright (C) 2010-2018 Winch Gate Property Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/ryzom/common/src/game_share/item_type.h b/code/ryzom/common/src/game_share/item_type.h index e32e86905..5dfca77ff 100644 --- a/code/ryzom/common/src/game_share/item_type.h +++ b/code/ryzom/common/src/game_share/item_type.h @@ -1,5 +1,5 @@ // Ryzom - MMORPG Framework -// Copyright (C) 2010 Winch Gate Property Limited +// Copyright (C) 2010-2018 Winch Gate Property Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/ryzom/common/src/game_share/login_registry.cpp b/code/ryzom/common/src/game_share/login_registry.cpp index e30949400..46207fec5 100644 --- a/code/ryzom/common/src/game_share/login_registry.cpp +++ b/code/ryzom/common/src/game_share/login_registry.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 diff --git a/code/ryzom/common/src/game_share/mirror.cpp b/code/ryzom/common/src/game_share/mirror.cpp index 23e975831..a850b2b6e 100644 --- a/code/ryzom/common/src/game_share/mirror.cpp +++ b/code/ryzom/common/src/game_share/mirror.cpp @@ -1,6 +1,10 @@ // Ryzom - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2010 Matt RAYKOWSKI (sfb) +// Copyright (C) 2014 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/common/src/game_share/mirror_prop_value.h b/code/ryzom/common/src/game_share/mirror_prop_value.h index 1ff2ae6e4..d1b8ba26b 100644 --- a/code/ryzom/common/src/game_share/mirror_prop_value.h +++ b/code/ryzom/common/src/game_share/mirror_prop_value.h @@ -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) 2012-2014 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/common/src/game_share/mirrored_data_set.cpp b/code/ryzom/common/src/game_share/mirrored_data_set.cpp index 9b5613425..2d854c47a 100644 --- a/code/ryzom/common/src/game_share/mirrored_data_set.cpp +++ b/code/ryzom/common/src/game_share/mirrored_data_set.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) 2016 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/common/src/game_share/mode_and_behaviour.h b/code/ryzom/common/src/game_share/mode_and_behaviour.h index 7cf9faee5..e91bb8ae4 100644 --- a/code/ryzom/common/src/game_share/mode_and_behaviour.h +++ b/code/ryzom/common/src/game_share/mode_and_behaviour.h @@ -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) 2010 Matt RAYKOWSKI (sfb) +// // 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/common/src/game_share/object.cpp b/code/ryzom/common/src/game_share/object.cpp index 326e6dd1f..97794b812 100644 --- a/code/ryzom/common/src/game_share/object.cpp +++ b/code/ryzom/common/src/game_share/object.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) 2016 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/common/src/game_share/people.h b/code/ryzom/common/src/game_share/people.h index 65cc92d64..6a0b3bb96 100644 --- a/code/ryzom/common/src/game_share/people.h +++ b/code/ryzom/common/src/game_share/people.h @@ -1,5 +1,5 @@ // Ryzom - MMORPG Framework -// Copyright (C) 2010 Winch Gate Property Limited +// Copyright (C) 2010-2018 Winch Gate Property Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/ryzom/common/src/game_share/persistent_data_tree.cpp b/code/ryzom/common/src/game_share/persistent_data_tree.cpp index a8a15f06a..db41370e5 100644 --- a/code/ryzom/common/src/game_share/persistent_data_tree.cpp +++ b/code/ryzom/common/src/game_share/persistent_data_tree.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) 2015 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/common/src/game_share/pvp_clan.cpp b/code/ryzom/common/src/game_share/pvp_clan.cpp index f030b73f5..81a2ca1d3 100644 --- a/code/ryzom/common/src/game_share/pvp_clan.cpp +++ b/code/ryzom/common/src/game_share/pvp_clan.cpp @@ -1,5 +1,5 @@ // Ryzom - MMORPG Framework -// Copyright (C) 2010 Winch Gate Property Limited +// Copyright (C) 2010-2018 Winch Gate Property Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/ryzom/common/src/game_share/pvp_clan.h b/code/ryzom/common/src/game_share/pvp_clan.h index 14352828b..62d498cbb 100644 --- a/code/ryzom/common/src/game_share/pvp_clan.h +++ b/code/ryzom/common/src/game_share/pvp_clan.h @@ -1,5 +1,5 @@ // Ryzom - MMORPG Framework -// Copyright (C) 2010 Winch Gate Property Limited +// Copyright (C) 2010-2018 Winch Gate Property Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/ryzom/common/src/game_share/ring_access.cpp b/code/ryzom/common/src/game_share/ring_access.cpp index 479b69291..1d178efad 100644 --- a/code/ryzom/common/src/game_share/ring_access.cpp +++ b/code/ryzom/common/src/game_share/ring_access.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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/common/src/game_share/ryzom_entity_id.h b/code/ryzom/common/src/game_share/ryzom_entity_id.h index 0cb2981ab..8ae060992 100644 --- a/code/ryzom/common/src/game_share/ryzom_entity_id.h +++ b/code/ryzom/common/src/game_share/ryzom_entity_id.h @@ -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) 2014 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/common/src/game_share/ryzom_mirror_properties.h b/code/ryzom/common/src/game_share/ryzom_mirror_properties.h index 134ebe38b..defbf2815 100644 --- a/code/ryzom/common/src/game_share/ryzom_mirror_properties.h +++ b/code/ryzom/common/src/game_share/ryzom_mirror_properties.h @@ -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) 2014 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/common/src/game_share/scenario_entry_points.cpp b/code/ryzom/common/src/game_share/scenario_entry_points.cpp index c97689211..c09c310fd 100644 --- a/code/ryzom/common/src/game_share/scenario_entry_points.cpp +++ b/code/ryzom/common/src/game_share/scenario_entry_points.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) 2014 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/common/src/game_share/security_check.cpp b/code/ryzom/common/src/game_share/security_check.cpp index 6acd2aeac..1ded48aad 100644 --- a/code/ryzom/common/src/game_share/security_check.cpp +++ b/code/ryzom/common/src/game_share/security_check.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) 2013 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/common/src/game_share/security_check.h b/code/ryzom/common/src/game_share/security_check.h index 640fec93a..d64f0692f 100644 --- a/code/ryzom/common/src/game_share/security_check.h +++ b/code/ryzom/common/src/game_share/security_check.h @@ -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) 2013 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/common/src/game_share/send_chat.cpp b/code/ryzom/common/src/game_share/send_chat.cpp index f5b2353fb..40af570ec 100644 --- a/code/ryzom/common/src/game_share/send_chat.cpp +++ b/code/ryzom/common/src/game_share/send_chat.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) 2014 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/common/src/game_share/send_chat.h b/code/ryzom/common/src/game_share/send_chat.h index 1acc9799e..05a36152c 100644 --- a/code/ryzom/common/src/game_share/send_chat.h +++ b/code/ryzom/common/src/game_share/send_chat.h @@ -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) 2014 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/common/src/game_share/simlag.cpp b/code/ryzom/common/src/game_share/simlag.cpp index 86f61b60b..85b8510d6 100644 --- a/code/ryzom/common/src/game_share/simlag.cpp +++ b/code/ryzom/common/src/game_share/simlag.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) 2016 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/common/src/game_share/stdpch.h b/code/ryzom/common/src/game_share/stdpch.h index 46c71bcfe..dc26bdb0d 100644 --- a/code/ryzom/common/src/game_share/stdpch.h +++ b/code/ryzom/common/src/game_share/stdpch.h @@ -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) 2014 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/common/src/game_share/time_weather_season/time_and_season.cpp b/code/ryzom/common/src/game_share/time_weather_season/time_and_season.cpp index 609938f32..d44cf3788 100644 --- a/code/ryzom/common/src/game_share/time_weather_season/time_and_season.cpp +++ b/code/ryzom/common/src/game_share/time_weather_season/time_and_season.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) 2016 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/common/src/game_share/time_weather_season/time_and_season.h b/code/ryzom/common/src/game_share/time_weather_season/time_and_season.h index d712302aa..47734a2ba 100644 --- a/code/ryzom/common/src/game_share/time_weather_season/time_and_season.h +++ b/code/ryzom/common/src/game_share/time_weather_season/time_and_season.h @@ -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) 2016 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/common/src/game_share/time_weather_season/time_date_season_manager.cpp b/code/ryzom/common/src/game_share/time_weather_season/time_date_season_manager.cpp index dbd4fc0ad..796315a2b 100644 --- a/code/ryzom/common/src/game_share/time_weather_season/time_date_season_manager.cpp +++ b/code/ryzom/common/src/game_share/time_weather_season/time_date_season_manager.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) 2014 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/common/src/game_share/time_weather_season/time_date_season_manager.h b/code/ryzom/common/src/game_share/time_weather_season/time_date_season_manager.h index 62b988ad7..2bd1bdbbd 100644 --- a/code/ryzom/common/src/game_share/time_weather_season/time_date_season_manager.h +++ b/code/ryzom/common/src/game_share/time_weather_season/time_date_season_manager.h @@ -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) 2014 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/common/src/game_share/time_weather_season/weather_predict.cpp b/code/ryzom/common/src/game_share/time_weather_season/weather_predict.cpp index 33224acf9..b8bafa83c 100644 --- a/code/ryzom/common/src/game_share/time_weather_season/weather_predict.cpp +++ b/code/ryzom/common/src/game_share/time_weather_season/weather_predict.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) 2015 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/common/src/game_share/txt_command.h b/code/ryzom/common/src/game_share/txt_command.h index ea9193e5d..0a70a1de5 100644 --- a/code/ryzom/common/src/game_share/txt_command.h +++ b/code/ryzom/common/src/game_share/txt_command.h @@ -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) 2012 Matt RAYKOWSKI (sfb) +// // 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/common/src/game_share/utils.h b/code/ryzom/common/src/game_share/utils.h index 2914f0dc8..ed71af34b 100644 --- a/code/ryzom/common/src/game_share/utils.h +++ b/code/ryzom/common/src/game_share/utils.h @@ -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) 2010 Matt RAYKOWSKI (sfb) +// // 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/assoc_mem/tree.cpp b/code/ryzom/tools/assoc_mem/tree.cpp index 30d936a4c..544af78b9 100644 --- a/code/ryzom/tools/assoc_mem/tree.cpp +++ b/code/ryzom/tools/assoc_mem/tree.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) 2010 Robert TIMM (rti) +// // 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/client/client_config/display_dlg.cpp b/code/ryzom/tools/client/client_config/display_dlg.cpp index 71faa2a58..3e9cb21a4 100644 --- a/code/ryzom/tools/client/client_config/display_dlg.cpp +++ b/code/ryzom/tools/client/client_config/display_dlg.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) 2010 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/client/client_config_qt/src/display_settings_details_widget.cpp b/code/ryzom/tools/client/client_config_qt/src/display_settings_details_widget.cpp index fa79a9b8c..ae9b9804b 100644 --- a/code/ryzom/tools/client/client_config_qt/src/display_settings_details_widget.cpp +++ b/code/ryzom/tools/client/client_config_qt/src/display_settings_details_widget.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) 2012 Laszlo KIS-ADAM (dfighter) +// // 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/client/client_config_qt/src/sound_settings_widget.cpp b/code/ryzom/tools/client/client_config_qt/src/sound_settings_widget.cpp index 49348d38b..e490a9932 100644 --- a/code/ryzom/tools/client/client_config_qt/src/sound_settings_widget.cpp +++ b/code/ryzom/tools/client/client_config_qt/src/sound_settings_widget.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) 2012 Laszlo KIS-ADAM (dfighter) +// // 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/client/r2_islands_textures/main.cpp b/code/ryzom/tools/client/r2_islands_textures/main.cpp index cbde8b9d4..a65fec9ff 100644 --- a/code/ryzom/tools/client/r2_islands_textures/main.cpp +++ b/code/ryzom/tools/client/r2_islands_textures/main.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) 2014 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/client/r2_islands_textures/screenshot_islands.cpp b/code/ryzom/tools/client/r2_islands_textures/screenshot_islands.cpp index b176b496c..f76b1baf3 100644 --- a/code/ryzom/tools/client/r2_islands_textures/screenshot_islands.cpp +++ b/code/ryzom/tools/client/r2_islands_textures/screenshot_islands.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) 2014 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/client/r2_islands_textures/screenshot_islands.h b/code/ryzom/tools/client/r2_islands_textures/screenshot_islands.h index 7d47fa3e7..bb3df34b1 100644 --- a/code/ryzom/tools/client/r2_islands_textures/screenshot_islands.h +++ b/code/ryzom/tools/client/r2_islands_textures/screenshot_islands.h @@ -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) 2014 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/client/ryzom_installer/src/operationdialog.cpp b/code/ryzom/tools/client/ryzom_installer/src/operationdialog.cpp index 9017ea2d1..c194cef6c 100644 --- a/code/ryzom/tools/client/ryzom_installer/src/operationdialog.cpp +++ b/code/ryzom/tools/client/ryzom_installer/src/operationdialog.cpp @@ -1,5 +1,5 @@ // Ryzom - MMORPG Framework -// Copyright (C) 2010 Winch Gate Property Limited +// Copyright (C) 2010-2019 Winch Gate Property Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/ryzom/tools/client/ryzom_installer/src/profile.cpp b/code/ryzom/tools/client/ryzom_installer/src/profile.cpp index e6c9aff64..691e71135 100644 --- a/code/ryzom/tools/client/ryzom_installer/src/profile.cpp +++ b/code/ryzom/tools/client/ryzom_installer/src/profile.cpp @@ -1,5 +1,5 @@ // Ryzom - MMORPG Framework -// Copyright (C) 2010 Winch Gate Property Limited +// Copyright (C) 2010-2019 Winch Gate Property Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/ryzom/tools/client/ryzom_installer/src/profile.h b/code/ryzom/tools/client/ryzom_installer/src/profile.h index cad701643..8773e65c0 100644 --- a/code/ryzom/tools/client/ryzom_installer/src/profile.h +++ b/code/ryzom/tools/client/ryzom_installer/src/profile.h @@ -1,5 +1,5 @@ // Ryzom - MMORPG Framework -// Copyright (C) 2010 Winch Gate Property Limited +// Copyright (C) 2010-2019 Winch Gate Property Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/ryzom/tools/client/ryzom_installer/src/profilesdialog.cpp b/code/ryzom/tools/client/ryzom_installer/src/profilesdialog.cpp index ff1f0c0bc..ecb0797b3 100644 --- a/code/ryzom/tools/client/ryzom_installer/src/profilesdialog.cpp +++ b/code/ryzom/tools/client/ryzom_installer/src/profilesdialog.cpp @@ -1,5 +1,5 @@ // Ryzom - MMORPG Framework -// Copyright (C) 2010 Winch Gate Property Limited +// Copyright (C) 2010-2019 Winch Gate Property Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/ryzom/tools/client/ryzom_installer/src/profilesdialog.h b/code/ryzom/tools/client/ryzom_installer/src/profilesdialog.h index 29540a68d..495154655 100644 --- a/code/ryzom/tools/client/ryzom_installer/src/profilesdialog.h +++ b/code/ryzom/tools/client/ryzom_installer/src/profilesdialog.h @@ -1,5 +1,5 @@ // Ryzom - MMORPG Framework -// Copyright (C) 2010 Winch Gate Property Limited +// Copyright (C) 2010-2019 Winch Gate Property Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/ryzom/tools/leveldesign/csv_transform/sadge_lib/include/text_output.h b/code/ryzom/tools/leveldesign/csv_transform/sadge_lib/include/text_output.h index 1fd931f17..ba77ab9e2 100644 --- a/code/ryzom/tools/leveldesign/csv_transform/sadge_lib/include/text_output.h +++ b/code/ryzom/tools/leveldesign/csv_transform/sadge_lib/include/text_output.h @@ -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) 2016 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/export/export.cpp b/code/ryzom/tools/leveldesign/export/export.cpp index f4085cf94..aed92db31 100644 --- a/code/ryzom/tools/leveldesign/export/export.cpp +++ b/code/ryzom/tools/leveldesign/export/export.cpp @@ -1,6 +1,10 @@ // Ryzom - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2010 Matt RAYKOWSKI (sfb) +// Copyright (C) 2016 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/georges_dll/action.cpp b/code/ryzom/tools/leveldesign/georges_dll/action.cpp index c2e9562fd..520e2b2cf 100644 --- a/code/ryzom/tools/leveldesign/georges_dll/action.cpp +++ b/code/ryzom/tools/leveldesign/georges_dll/action.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 diff --git a/code/ryzom/tools/leveldesign/georges_dll/action.h b/code/ryzom/tools/leveldesign/georges_dll/action.h index caf49373a..cade0a34d 100644 --- a/code/ryzom/tools/leveldesign/georges_dll/action.h +++ b/code/ryzom/tools/leveldesign/georges_dll/action.h @@ -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 diff --git a/code/ryzom/tools/leveldesign/georges_dll/base_dialog.cpp b/code/ryzom/tools/leveldesign/georges_dll/base_dialog.cpp index 923d69c6b..cd8c30228 100644 --- a/code/ryzom/tools/leveldesign/georges_dll/base_dialog.cpp +++ b/code/ryzom/tools/leveldesign/georges_dll/base_dialog.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 diff --git a/code/ryzom/tools/leveldesign/georges_dll/base_dialog.h b/code/ryzom/tools/leveldesign/georges_dll/base_dialog.h index 5f96d8229..65acc9f00 100644 --- a/code/ryzom/tools/leveldesign/georges_dll/base_dialog.h +++ b/code/ryzom/tools/leveldesign/georges_dll/base_dialog.h @@ -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 diff --git a/code/ryzom/tools/leveldesign/georges_dll/child_frm.cpp b/code/ryzom/tools/leveldesign/georges_dll/child_frm.cpp index 9f388be4f..941992d34 100644 --- a/code/ryzom/tools/leveldesign/georges_dll/child_frm.cpp +++ b/code/ryzom/tools/leveldesign/georges_dll/child_frm.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 diff --git a/code/ryzom/tools/leveldesign/georges_dll/dfn_dialog.cpp b/code/ryzom/tools/leveldesign/georges_dll/dfn_dialog.cpp index 3958901a2..ca6c073d6 100644 --- a/code/ryzom/tools/leveldesign/georges_dll/dfn_dialog.cpp +++ b/code/ryzom/tools/leveldesign/georges_dll/dfn_dialog.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 diff --git a/code/ryzom/tools/leveldesign/georges_dll/dfn_dialog.h b/code/ryzom/tools/leveldesign/georges_dll/dfn_dialog.h index 4d7479ea6..81c04efb4 100644 --- a/code/ryzom/tools/leveldesign/georges_dll/dfn_dialog.h +++ b/code/ryzom/tools/leveldesign/georges_dll/dfn_dialog.h @@ -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 diff --git a/code/ryzom/tools/leveldesign/georges_dll/edit_list_ctrl.cpp b/code/ryzom/tools/leveldesign/georges_dll/edit_list_ctrl.cpp index 3e4d02046..522cbb3e4 100644 --- a/code/ryzom/tools/leveldesign/georges_dll/edit_list_ctrl.cpp +++ b/code/ryzom/tools/leveldesign/georges_dll/edit_list_ctrl.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 diff --git a/code/ryzom/tools/leveldesign/georges_dll/file_browser_dialog.cpp b/code/ryzom/tools/leveldesign/georges_dll/file_browser_dialog.cpp index a485e994f..9065df967 100644 --- a/code/ryzom/tools/leveldesign/georges_dll/file_browser_dialog.cpp +++ b/code/ryzom/tools/leveldesign/georges_dll/file_browser_dialog.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 diff --git a/code/ryzom/tools/leveldesign/georges_dll/file_tree_view.cpp b/code/ryzom/tools/leveldesign/georges_dll/file_tree_view.cpp index c0a74297b..673c12d9a 100644 --- a/code/ryzom/tools/leveldesign/georges_dll/file_tree_view.cpp +++ b/code/ryzom/tools/leveldesign/georges_dll/file_tree_view.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 diff --git a/code/ryzom/tools/leveldesign/georges_dll/file_tree_view.h b/code/ryzom/tools/leveldesign/georges_dll/file_tree_view.h index c3729e0bf..724b5e25e 100644 --- a/code/ryzom/tools/leveldesign/georges_dll/file_tree_view.h +++ b/code/ryzom/tools/leveldesign/georges_dll/file_tree_view.h @@ -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 diff --git a/code/ryzom/tools/leveldesign/georges_dll/form_dialog.cpp b/code/ryzom/tools/leveldesign/georges_dll/form_dialog.cpp index 8979d9237..a4d35fdcc 100644 --- a/code/ryzom/tools/leveldesign/georges_dll/form_dialog.cpp +++ b/code/ryzom/tools/leveldesign/georges_dll/form_dialog.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 diff --git a/code/ryzom/tools/leveldesign/georges_dll/form_dialog.h b/code/ryzom/tools/leveldesign/georges_dll/form_dialog.h index d3afef083..c1e0083c9 100644 --- a/code/ryzom/tools/leveldesign/georges_dll/form_dialog.h +++ b/code/ryzom/tools/leveldesign/georges_dll/form_dialog.h @@ -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 diff --git a/code/ryzom/tools/leveldesign/georges_dll/georges_edit.cpp b/code/ryzom/tools/leveldesign/georges_dll/georges_edit.cpp index 480fdfbe0..db3d4655c 100644 --- a/code/ryzom/tools/leveldesign/georges_dll/georges_edit.cpp +++ b/code/ryzom/tools/leveldesign/georges_dll/georges_edit.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 diff --git a/code/ryzom/tools/leveldesign/georges_dll/georges_edit.h b/code/ryzom/tools/leveldesign/georges_dll/georges_edit.h index 9232e688a..e86b7bacc 100644 --- a/code/ryzom/tools/leveldesign/georges_dll/georges_edit.h +++ b/code/ryzom/tools/leveldesign/georges_dll/georges_edit.h @@ -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 diff --git a/code/ryzom/tools/leveldesign/georges_dll/georges_edit_doc.cpp b/code/ryzom/tools/leveldesign/georges_dll/georges_edit_doc.cpp index 3d374b4b1..d7dcd6b89 100644 --- a/code/ryzom/tools/leveldesign/georges_dll/georges_edit_doc.cpp +++ b/code/ryzom/tools/leveldesign/georges_dll/georges_edit_doc.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) 2014-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/georges_dll/georges_edit_view.cpp b/code/ryzom/tools/leveldesign/georges_dll/georges_edit_view.cpp index 50a137006..d8181e2fa 100644 --- a/code/ryzom/tools/leveldesign/georges_dll/georges_edit_view.cpp +++ b/code/ryzom/tools/leveldesign/georges_dll/georges_edit_view.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 diff --git a/code/ryzom/tools/leveldesign/georges_dll/georges_implementation.cpp b/code/ryzom/tools/leveldesign/georges_dll/georges_implementation.cpp index d1c614834..2eaddc4b7 100644 --- a/code/ryzom/tools/leveldesign/georges_dll/georges_implementation.cpp +++ b/code/ryzom/tools/leveldesign/georges_dll/georges_implementation.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) 2014-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/georges_dll/header_dialog.cpp b/code/ryzom/tools/leveldesign/georges_dll/header_dialog.cpp index 0ef0e4aad..a1443d8af 100644 --- a/code/ryzom/tools/leveldesign/georges_dll/header_dialog.cpp +++ b/code/ryzom/tools/leveldesign/georges_dll/header_dialog.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) 2014-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/georges_dll/icon_wnd.cpp b/code/ryzom/tools/leveldesign/georges_dll/icon_wnd.cpp index fd657fcc7..9eb9661d9 100644 --- a/code/ryzom/tools/leveldesign/georges_dll/icon_wnd.cpp +++ b/code/ryzom/tools/leveldesign/georges_dll/icon_wnd.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 diff --git a/code/ryzom/tools/leveldesign/georges_dll/imagelist_ex.cpp b/code/ryzom/tools/leveldesign/georges_dll/imagelist_ex.cpp index e43ed11f8..824da9f2a 100644 --- a/code/ryzom/tools/leveldesign/georges_dll/imagelist_ex.cpp +++ b/code/ryzom/tools/leveldesign/georges_dll/imagelist_ex.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 diff --git a/code/ryzom/tools/leveldesign/georges_dll/left_view.cpp b/code/ryzom/tools/leveldesign/georges_dll/left_view.cpp index 8eeaebccc..c0d8a69d9 100644 --- a/code/ryzom/tools/leveldesign/georges_dll/left_view.cpp +++ b/code/ryzom/tools/leveldesign/georges_dll/left_view.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 diff --git a/code/ryzom/tools/leveldesign/georges_dll/main_frm.cpp b/code/ryzom/tools/leveldesign/georges_dll/main_frm.cpp index 9203fb605..af19420fb 100644 --- a/code/ryzom/tools/leveldesign/georges_dll/main_frm.cpp +++ b/code/ryzom/tools/leveldesign/georges_dll/main_frm.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 diff --git a/code/ryzom/tools/leveldesign/georges_dll/memory_combo_box.cpp b/code/ryzom/tools/leveldesign/georges_dll/memory_combo_box.cpp index 989afa15b..8e2152c52 100644 --- a/code/ryzom/tools/leveldesign/georges_dll/memory_combo_box.cpp +++ b/code/ryzom/tools/leveldesign/georges_dll/memory_combo_box.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 diff --git a/code/ryzom/tools/leveldesign/georges_dll/memory_combo_box.h b/code/ryzom/tools/leveldesign/georges_dll/memory_combo_box.h index e06d72d0c..5ca14a448 100644 --- a/code/ryzom/tools/leveldesign/georges_dll/memory_combo_box.h +++ b/code/ryzom/tools/leveldesign/georges_dll/memory_combo_box.h @@ -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 diff --git a/code/ryzom/tools/leveldesign/georges_dll/output_console_dlg.cpp b/code/ryzom/tools/leveldesign/georges_dll/output_console_dlg.cpp index 247725513..d33fbf4b5 100644 --- a/code/ryzom/tools/leveldesign/georges_dll/output_console_dlg.cpp +++ b/code/ryzom/tools/leveldesign/georges_dll/output_console_dlg.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 diff --git a/code/ryzom/tools/leveldesign/georges_dll/output_console_dlg.h b/code/ryzom/tools/leveldesign/georges_dll/output_console_dlg.h index cdc9a4745..f521480e2 100644 --- a/code/ryzom/tools/leveldesign/georges_dll/output_console_dlg.h +++ b/code/ryzom/tools/leveldesign/georges_dll/output_console_dlg.h @@ -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) 2012 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/georges_dll/reg_shell_ext.cpp b/code/ryzom/tools/leveldesign/georges_dll/reg_shell_ext.cpp index ada2b9078..8ac6e9409 100644 --- a/code/ryzom/tools/leveldesign/georges_dll/reg_shell_ext.cpp +++ b/code/ryzom/tools/leveldesign/georges_dll/reg_shell_ext.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 diff --git a/code/ryzom/tools/leveldesign/georges_dll/settings_dialog.cpp b/code/ryzom/tools/leveldesign/georges_dll/settings_dialog.cpp index 55bd70607..a77b9604a 100644 --- a/code/ryzom/tools/leveldesign/georges_dll/settings_dialog.cpp +++ b/code/ryzom/tools/leveldesign/georges_dll/settings_dialog.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 diff --git a/code/ryzom/tools/leveldesign/georges_dll/stdafx.h b/code/ryzom/tools/leveldesign/georges_dll/stdafx.h index cd230a597..1ac7df3e3 100644 --- a/code/ryzom/tools/leveldesign/georges_dll/stdafx.h +++ b/code/ryzom/tools/leveldesign/georges_dll/stdafx.h @@ -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 diff --git a/code/ryzom/tools/leveldesign/georges_dll/type_dialog.cpp b/code/ryzom/tools/leveldesign/georges_dll/type_dialog.cpp index fac9c64bd..291fee2ca 100644 --- a/code/ryzom/tools/leveldesign/georges_dll/type_dialog.cpp +++ b/code/ryzom/tools/leveldesign/georges_dll/type_dialog.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 diff --git a/code/ryzom/tools/leveldesign/georges_exe/georges_exe.cpp b/code/ryzom/tools/leveldesign/georges_exe/georges_exe.cpp index 5f4fa18ca..fe580e1c4 100644 --- a/code/ryzom/tools/leveldesign/georges_exe/georges_exe.cpp +++ b/code/ryzom/tools/leveldesign/georges_exe/georges_exe.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 diff --git a/code/ryzom/tools/leveldesign/georges_plugin_sound/PageBase.h b/code/ryzom/tools/leveldesign/georges_plugin_sound/PageBase.h index 16449a4d3..0b19077c4 100644 --- a/code/ryzom/tools/leveldesign/georges_plugin_sound/PageBase.h +++ b/code/ryzom/tools/leveldesign/georges_plugin_sound/PageBase.h @@ -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) 2014 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/georges_plugin_sound/PageBgFades.cpp b/code/ryzom/tools/leveldesign/georges_plugin_sound/PageBgFades.cpp index 45a4985b9..23a447850 100644 --- a/code/ryzom/tools/leveldesign/georges_plugin_sound/PageBgFades.cpp +++ b/code/ryzom/tools/leveldesign/georges_plugin_sound/PageBgFades.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 diff --git a/code/ryzom/tools/leveldesign/georges_plugin_sound/PageBgFlags.cpp b/code/ryzom/tools/leveldesign/georges_plugin_sound/PageBgFlags.cpp index c844e7ca6..153f4aad0 100644 --- a/code/ryzom/tools/leveldesign/georges_plugin_sound/PageBgFlags.cpp +++ b/code/ryzom/tools/leveldesign/georges_plugin_sound/PageBgFlags.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 diff --git a/code/ryzom/tools/leveldesign/georges_plugin_sound/PageComplex.h b/code/ryzom/tools/leveldesign/georges_plugin_sound/PageComplex.h index 74eb65e07..cb3d3bf8e 100644 --- a/code/ryzom/tools/leveldesign/georges_plugin_sound/PageComplex.h +++ b/code/ryzom/tools/leveldesign/georges_plugin_sound/PageComplex.h @@ -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) 2014 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/georges_plugin_sound/PageComtext.cpp b/code/ryzom/tools/leveldesign/georges_plugin_sound/PageComtext.cpp index f36c3563b..e7efc8f7c 100644 --- a/code/ryzom/tools/leveldesign/georges_plugin_sound/PageComtext.cpp +++ b/code/ryzom/tools/leveldesign/georges_plugin_sound/PageComtext.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 diff --git a/code/ryzom/tools/leveldesign/georges_plugin_sound/georges_plugin_sound.cpp b/code/ryzom/tools/leveldesign/georges_plugin_sound/georges_plugin_sound.cpp index a45b96f4e..047e8df6a 100644 --- a/code/ryzom/tools/leveldesign/georges_plugin_sound/georges_plugin_sound.cpp +++ b/code/ryzom/tools/leveldesign/georges_plugin_sound/georges_plugin_sound.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 diff --git a/code/ryzom/tools/leveldesign/georges_plugin_sound/listener_view.cpp b/code/ryzom/tools/leveldesign/georges_plugin_sound/listener_view.cpp index 867f0c7a2..4883b1b25 100644 --- a/code/ryzom/tools/leveldesign/georges_plugin_sound/listener_view.cpp +++ b/code/ryzom/tools/leveldesign/georges_plugin_sound/listener_view.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 diff --git a/code/ryzom/tools/leveldesign/georges_plugin_sound/loading_dialog.h b/code/ryzom/tools/leveldesign/georges_plugin_sound/loading_dialog.h index c21df7c2d..5f81f13ce 100644 --- a/code/ryzom/tools/leveldesign/georges_plugin_sound/loading_dialog.h +++ b/code/ryzom/tools/leveldesign/georges_plugin_sound/loading_dialog.h @@ -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) 2014 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/georges_plugin_sound/sound_dialog.cpp b/code/ryzom/tools/leveldesign/georges_plugin_sound/sound_dialog.cpp index 2b60fd098..741b702ac 100644 --- a/code/ryzom/tools/leveldesign/georges_plugin_sound/sound_dialog.cpp +++ b/code/ryzom/tools/leveldesign/georges_plugin_sound/sound_dialog.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 diff --git a/code/ryzom/tools/leveldesign/georges_plugin_sound/sound_dialog.h b/code/ryzom/tools/leveldesign/georges_plugin_sound/sound_dialog.h index 12b1a6ac8..f056dd755 100644 --- a/code/ryzom/tools/leveldesign/georges_plugin_sound/sound_dialog.h +++ b/code/ryzom/tools/leveldesign/georges_plugin_sound/sound_dialog.h @@ -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) 2014 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/georges_plugin_sound/sound_plugin.cpp b/code/ryzom/tools/leveldesign/georges_plugin_sound/sound_plugin.cpp index 3702c18e5..6196f6fca 100644 --- a/code/ryzom/tools/leveldesign/georges_plugin_sound/sound_plugin.cpp +++ b/code/ryzom/tools/leveldesign/georges_plugin_sound/sound_plugin.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 diff --git a/code/ryzom/tools/leveldesign/georges_plugin_sound/sound_plugin.h b/code/ryzom/tools/leveldesign/georges_plugin_sound/sound_plugin.h index 021749d15..69e3755aa 100644 --- a/code/ryzom/tools/leveldesign/georges_plugin_sound/sound_plugin.h +++ b/code/ryzom/tools/leveldesign/georges_plugin_sound/sound_plugin.h @@ -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) 2012 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/georges_plugin_sound/std_sound_plugin.h b/code/ryzom/tools/leveldesign/georges_plugin_sound/std_sound_plugin.h index f03a63bdc..17c2f0a75 100644 --- a/code/ryzom/tools/leveldesign/georges_plugin_sound/std_sound_plugin.h +++ b/code/ryzom/tools/leveldesign/georges_plugin_sound/std_sound_plugin.h @@ -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 diff --git a/code/ryzom/tools/leveldesign/icon_search/icon_search.cpp b/code/ryzom/tools/leveldesign/icon_search/icon_search.cpp index 7d406ec8c..029abcd4f 100644 --- a/code/ryzom/tools/leveldesign/icon_search/icon_search.cpp +++ b/code/ryzom/tools/leveldesign/icon_search/icon_search.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) 2010 Matt RAYKOWSKI (sfb) +// // 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/mission_compiler_fe/StdAfx.h b/code/ryzom/tools/leveldesign/mission_compiler_fe/StdAfx.h index 1d127a59b..8a67516b4 100644 --- a/code/ryzom/tools/leveldesign/mission_compiler_fe/StdAfx.h +++ b/code/ryzom/tools/leveldesign/mission_compiler_fe/StdAfx.h @@ -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 diff --git a/code/ryzom/tools/leveldesign/mission_compiler_fe/mission_compiler_fe.cpp b/code/ryzom/tools/leveldesign/mission_compiler_fe/mission_compiler_fe.cpp index 73ee44428..b8a82de55 100644 --- a/code/ryzom/tools/leveldesign/mission_compiler_fe/mission_compiler_fe.cpp +++ b/code/ryzom/tools/leveldesign/mission_compiler_fe/mission_compiler_fe.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 diff --git a/code/ryzom/tools/leveldesign/mission_compiler_fe/mission_compiler_feDlg.cpp b/code/ryzom/tools/leveldesign/mission_compiler_fe/mission_compiler_feDlg.cpp index 350203ae7..1198d166d 100644 --- a/code/ryzom/tools/leveldesign/mission_compiler_fe/mission_compiler_feDlg.cpp +++ b/code/ryzom/tools/leveldesign/mission_compiler_fe/mission_compiler_feDlg.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 diff --git a/code/ryzom/tools/leveldesign/mission_compiler_lib/mission_compiler.cpp b/code/ryzom/tools/leveldesign/mission_compiler_lib/mission_compiler.cpp index 28d895f54..b664bb0e2 100644 --- a/code/ryzom/tools/leveldesign/mission_compiler_lib/mission_compiler.cpp +++ b/code/ryzom/tools/leveldesign/mission_compiler_lib/mission_compiler.cpp @@ -1,6 +1,10 @@ // Ryzom - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2011 Matt RAYKOWSKI (sfb) +// Copyright (C) 2013 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/mission_compiler_lib/mission_compiler.h b/code/ryzom/tools/leveldesign/mission_compiler_lib/mission_compiler.h index 7016bd092..b5f0dbf79 100644 --- a/code/ryzom/tools/leveldesign/mission_compiler_lib/mission_compiler.h +++ b/code/ryzom/tools/leveldesign/mission_compiler_lib/mission_compiler.h @@ -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) 2011 Fabien HENON +// // 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/mission_compiler_lib/step.h b/code/ryzom/tools/leveldesign/mission_compiler_lib/step.h index 24f80a19a..4a0ecb958 100644 --- a/code/ryzom/tools/leveldesign/mission_compiler_lib/step.h +++ b/code/ryzom/tools/leveldesign/mission_compiler_lib/step.h @@ -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) 2011 Fabien HENON +// // 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/mission_compiler_lib/step_content.cpp b/code/ryzom/tools/leveldesign/mission_compiler_lib/step_content.cpp index 5ec77ceb9..8a3daa1d5 100644 --- a/code/ryzom/tools/leveldesign/mission_compiler_lib/step_content.cpp +++ b/code/ryzom/tools/leveldesign/mission_compiler_lib/step_content.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) 2011 Fabien HENON +// // 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/mission_compiler_lib/steps.cpp b/code/ryzom/tools/leveldesign/mission_compiler_lib/steps.cpp index 613621ca8..5e627bfa0 100644 --- a/code/ryzom/tools/leveldesign/mission_compiler_lib/steps.cpp +++ b/code/ryzom/tools/leveldesign/mission_compiler_lib/steps.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) 2011 Matt RAYKOWSKI (sfb) +// // 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/mission_compiler_lib/variables.cpp b/code/ryzom/tools/leveldesign/mission_compiler_lib/variables.cpp index f27f2a974..9fe80c878 100644 --- a/code/ryzom/tools/leveldesign/mission_compiler_lib/variables.cpp +++ b/code/ryzom/tools/leveldesign/mission_compiler_lib/variables.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) 2013 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/mp_generator/main.cpp b/code/ryzom/tools/leveldesign/mp_generator/main.cpp index 353642ac6..267f6a4ab 100644 --- a/code/ryzom/tools/leveldesign/mp_generator/main.cpp +++ b/code/ryzom/tools/leveldesign/mp_generator/main.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) 2012 Matt RAYKOWSKI (sfb) +// // 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/prim_export/main.cpp b/code/ryzom/tools/leveldesign/prim_export/main.cpp index be875b350..ad78325d5 100644 --- a/code/ryzom/tools/leveldesign/prim_export/main.cpp +++ b/code/ryzom/tools/leveldesign/prim_export/main.cpp @@ -1,6 +1,10 @@ // Ryzom - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2010 Matt RAYKOWSKI (sfb) +// Copyright (C) 2010-2014 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/land_export/main.cpp b/code/ryzom/tools/leveldesign/world_editor/land_export/main.cpp index 87c4c8448..205002417 100644 --- a/code/ryzom/tools/leveldesign/world_editor/land_export/main.cpp +++ b/code/ryzom/tools/leveldesign/world_editor/land_export/main.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) 2014 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/land_export_lib/export.cpp b/code/ryzom/tools/leveldesign/world_editor/land_export_lib/export.cpp index 5ca22a303..319925584 100644 --- a/code/ryzom/tools/leveldesign/world_editor/land_export_lib/export.cpp +++ b/code/ryzom/tools/leveldesign/world_editor/land_export_lib/export.cpp @@ -1,6 +1,10 @@ // Ryzom - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2010 Matt RAYKOWSKI (sfb) +// Copyright (C) 2014 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/land_export_lib/export.h b/code/ryzom/tools/leveldesign/world_editor/land_export_lib/export.h index 63fc35dde..a8a6b93cb 100644 --- a/code/ryzom/tools/leveldesign/world_editor/land_export_lib/export.h +++ b/code/ryzom/tools/leveldesign/world_editor/land_export_lib/export.h @@ -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) 2014 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/builder_zone.cpp b/code/ryzom/tools/leveldesign/world_editor/world_editor/builder_zone.cpp index 5e6119d89..65cb98af6 100644 --- a/code/ryzom/tools/leveldesign/world_editor/world_editor/builder_zone.cpp +++ b/code/ryzom/tools/leveldesign/world_editor/world_editor/builder_zone.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 diff --git a/code/ryzom/tools/leveldesign/world_editor/world_editor/dialog_properties.cpp b/code/ryzom/tools/leveldesign/world_editor/world_editor/dialog_properties.cpp index 5a4ebc39e..e4cf1e670 100644 --- a/code/ryzom/tools/leveldesign/world_editor/world_editor/dialog_properties.cpp +++ b/code/ryzom/tools/leveldesign/world_editor/world_editor/dialog_properties.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 diff --git a/code/ryzom/tools/leveldesign/world_editor/world_editor/display.cpp b/code/ryzom/tools/leveldesign/world_editor/world_editor/display.cpp index 7b0b9df23..30ff5bc81 100644 --- a/code/ryzom/tools/leveldesign/world_editor/world_editor/display.cpp +++ b/code/ryzom/tools/leveldesign/world_editor/world_editor/display.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) 2014-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/export_dlg.cpp b/code/ryzom/tools/leveldesign/world_editor/world_editor/export_dlg.cpp index cb58b0677..3767c78ef 100644 --- a/code/ryzom/tools/leveldesign/world_editor/world_editor/export_dlg.cpp +++ b/code/ryzom/tools/leveldesign/world_editor/world_editor/export_dlg.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 diff --git a/code/ryzom/tools/leveldesign/world_editor/world_editor/external_editor.cpp b/code/ryzom/tools/leveldesign/world_editor/world_editor/external_editor.cpp index be0f50a08..5d21d2d73 100644 --- a/code/ryzom/tools/leveldesign/world_editor/world_editor/external_editor.cpp +++ b/code/ryzom/tools/leveldesign/world_editor/world_editor/external_editor.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 diff --git a/code/ryzom/tools/leveldesign/world_editor/world_editor/file_dialog_ex.cpp b/code/ryzom/tools/leveldesign/world_editor/world_editor/file_dialog_ex.cpp index f4d203a19..9a07fff77 100644 --- a/code/ryzom/tools/leveldesign/world_editor/world_editor/file_dialog_ex.cpp +++ b/code/ryzom/tools/leveldesign/world_editor/world_editor/file_dialog_ex.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 diff --git a/code/ryzom/tools/leveldesign/world_editor/world_editor/find_primitive_dlg.cpp b/code/ryzom/tools/leveldesign/world_editor/world_editor/find_primitive_dlg.cpp index 8dd112873..357feb2ee 100644 --- a/code/ryzom/tools/leveldesign/world_editor/world_editor/find_primitive_dlg.cpp +++ b/code/ryzom/tools/leveldesign/world_editor/world_editor/find_primitive_dlg.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 diff --git a/code/ryzom/tools/leveldesign/world_editor/world_editor/generate_dlg.cpp b/code/ryzom/tools/leveldesign/world_editor/world_editor/generate_dlg.cpp index 88131ab60..80585c5d8 100644 --- a/code/ryzom/tools/leveldesign/world_editor/world_editor/generate_dlg.cpp +++ b/code/ryzom/tools/leveldesign/world_editor/world_editor/generate_dlg.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 diff --git a/code/ryzom/tools/leveldesign/world_editor/world_editor/imagelist_ex.cpp b/code/ryzom/tools/leveldesign/world_editor/world_editor/imagelist_ex.cpp index f00181879..5601d3ed4 100644 --- a/code/ryzom/tools/leveldesign/world_editor/world_editor/imagelist_ex.cpp +++ b/code/ryzom/tools/leveldesign/world_editor/world_editor/imagelist_ex.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 diff --git a/code/ryzom/tools/leveldesign/world_editor/world_editor/main_frm.cpp b/code/ryzom/tools/leveldesign/world_editor/world_editor/main_frm.cpp index 101903b21..ead8dd53d 100644 --- a/code/ryzom/tools/leveldesign/world_editor/world_editor/main_frm.cpp +++ b/code/ryzom/tools/leveldesign/world_editor/world_editor/main_frm.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 diff --git a/code/ryzom/tools/leveldesign/world_editor/world_editor/my_list_box.cpp b/code/ryzom/tools/leveldesign/world_editor/world_editor/my_list_box.cpp index 3546205c4..bcce5fc2a 100644 --- a/code/ryzom/tools/leveldesign/world_editor/world_editor/my_list_box.cpp +++ b/code/ryzom/tools/leveldesign/world_editor/world_editor/my_list_box.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 diff --git a/code/ryzom/tools/leveldesign/world_editor/world_editor/name_dlg.cpp b/code/ryzom/tools/leveldesign/world_editor/world_editor/name_dlg.cpp index 1f3f68087..d05fb6fc9 100644 --- a/code/ryzom/tools/leveldesign/world_editor/world_editor/name_dlg.cpp +++ b/code/ryzom/tools/leveldesign/world_editor/world_editor/name_dlg.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 diff --git a/code/ryzom/tools/leveldesign/world_editor/world_editor/primitive_configuration_dlg.cpp b/code/ryzom/tools/leveldesign/world_editor/world_editor/primitive_configuration_dlg.cpp index f113a31b8..6d573f36b 100644 --- a/code/ryzom/tools/leveldesign/world_editor/world_editor/primitive_configuration_dlg.cpp +++ b/code/ryzom/tools/leveldesign/world_editor/world_editor/primitive_configuration_dlg.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 diff --git a/code/ryzom/tools/leveldesign/world_editor/world_editor/project_settings.cpp b/code/ryzom/tools/leveldesign/world_editor/world_editor/project_settings.cpp index 700895992..1c855eec0 100644 --- a/code/ryzom/tools/leveldesign/world_editor/world_editor/project_settings.cpp +++ b/code/ryzom/tools/leveldesign/world_editor/world_editor/project_settings.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 diff --git a/code/ryzom/tools/leveldesign/world_editor/world_editor/stdafx.h b/code/ryzom/tools/leveldesign/world_editor/world_editor/stdafx.h index 37dc0bb78..9f1a88c97 100644 --- a/code/ryzom/tools/leveldesign/world_editor/world_editor/stdafx.h +++ b/code/ryzom/tools/leveldesign/world_editor/world_editor/stdafx.h @@ -1,6 +1,10 @@ // Ryzom - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2010 Matt RAYKOWSKI (sfb) +// Copyright (C) 2016-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/tools_logic.cpp b/code/ryzom/tools/leveldesign/world_editor/world_editor/tools_logic.cpp index d8967a609..bc5b04522 100644 --- a/code/ryzom/tools/leveldesign/world_editor/world_editor/tools_logic.cpp +++ b/code/ryzom/tools/leveldesign/world_editor/world_editor/tools_logic.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 diff --git a/code/ryzom/tools/leveldesign/world_editor/world_editor/tools_zone.cpp b/code/ryzom/tools/leveldesign/world_editor/world_editor/tools_zone.cpp index 23e8aaec0..ee4da6308 100644 --- a/code/ryzom/tools/leveldesign/world_editor/world_editor/tools_zone.cpp +++ b/code/ryzom/tools/leveldesign/world_editor/world_editor/tools_zone.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 diff --git a/code/ryzom/tools/leveldesign/world_editor/world_editor/type_manager_dlg.cpp b/code/ryzom/tools/leveldesign/world_editor/world_editor/type_manager_dlg.cpp index f66915c90..8b2f5d033 100644 --- a/code/ryzom/tools/leveldesign/world_editor/world_editor/type_manager_dlg.cpp +++ b/code/ryzom/tools/leveldesign/world_editor/world_editor/type_manager_dlg.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 diff --git a/code/ryzom/tools/leveldesign/world_editor/world_editor/type_sel_dlg.cpp b/code/ryzom/tools/leveldesign/world_editor/world_editor/type_sel_dlg.cpp index d79e2c110..8bb9afbae 100644 --- a/code/ryzom/tools/leveldesign/world_editor/world_editor/type_sel_dlg.cpp +++ b/code/ryzom/tools/leveldesign/world_editor/world_editor/type_sel_dlg.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 diff --git a/code/ryzom/tools/leveldesign/world_editor/world_editor/world_editor.cpp b/code/ryzom/tools/leveldesign/world_editor/world_editor/world_editor.cpp index f6e1743af..6ad30ccb7 100644 --- a/code/ryzom/tools/leveldesign/world_editor/world_editor/world_editor.cpp +++ b/code/ryzom/tools/leveldesign/world_editor/world_editor/world_editor.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 diff --git a/code/ryzom/tools/leveldesign/world_editor/world_editor/world_editor_doc.cpp b/code/ryzom/tools/leveldesign/world_editor/world_editor/world_editor_doc.cpp index 58f1cc351..7c91be97c 100644 --- a/code/ryzom/tools/leveldesign/world_editor/world_editor/world_editor_doc.cpp +++ b/code/ryzom/tools/leveldesign/world_editor/world_editor/world_editor_doc.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 diff --git a/code/ryzom/tools/leveldesign/world_editor/world_editor/world_editor_doc.h b/code/ryzom/tools/leveldesign/world_editor/world_editor/world_editor_doc.h index 2e9f07fe2..a8ceb45c1 100644 --- a/code/ryzom/tools/leveldesign/world_editor/world_editor/world_editor_doc.h +++ b/code/ryzom/tools/leveldesign/world_editor/world_editor/world_editor_doc.h @@ -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) 2010 Matt RAYKOWSKI (sfb) +// // 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_fauna_graph_plugin/StdAfx.h b/code/ryzom/tools/leveldesign/world_editor/world_editor_fauna_graph_plugin/StdAfx.h index 54dba15f8..11c3a0aee 100644 --- a/code/ryzom/tools/leveldesign/world_editor/world_editor_fauna_graph_plugin/StdAfx.h +++ b/code/ryzom/tools/leveldesign/world_editor/world_editor_fauna_graph_plugin/StdAfx.h @@ -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 diff --git a/code/ryzom/tools/leveldesign/world_editor/world_editor_graph_plugin/StdAfx.h b/code/ryzom/tools/leveldesign/world_editor/world_editor_graph_plugin/StdAfx.h index dc1d86459..ecac82483 100644 --- a/code/ryzom/tools/leveldesign/world_editor/world_editor_graph_plugin/StdAfx.h +++ b/code/ryzom/tools/leveldesign/world_editor/world_editor_graph_plugin/StdAfx.h @@ -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 diff --git a/code/ryzom/tools/leveldesign/world_editor/world_editor_graph_plugin/graph_plugin.cpp b/code/ryzom/tools/leveldesign/world_editor/world_editor_graph_plugin/graph_plugin.cpp index aacc4a253..864d79681 100644 --- a/code/ryzom/tools/leveldesign/world_editor/world_editor_graph_plugin/graph_plugin.cpp +++ b/code/ryzom/tools/leveldesign/world_editor/world_editor_graph_plugin/graph_plugin.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 diff --git a/code/ryzom/tools/leveldesign/world_editor/world_editor_primitive_plugin/primitive_plugin.h b/code/ryzom/tools/leveldesign/world_editor/world_editor_primitive_plugin/primitive_plugin.h index d7a19dc10..7712c7f07 100644 --- a/code/ryzom/tools/leveldesign/world_editor/world_editor_primitive_plugin/primitive_plugin.h +++ b/code/ryzom/tools/leveldesign/world_editor/world_editor_primitive_plugin/primitive_plugin.h @@ -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) 2012-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_shard_monitor_plugin/DialogFlags.cpp b/code/ryzom/tools/leveldesign/world_editor/world_editor_shard_monitor_plugin/DialogFlags.cpp index 0dbe2849d..b4dc971d6 100644 --- a/code/ryzom/tools/leveldesign/world_editor/world_editor_shard_monitor_plugin/DialogFlags.cpp +++ b/code/ryzom/tools/leveldesign/world_editor/world_editor_shard_monitor_plugin/DialogFlags.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 diff --git a/code/ryzom/tools/leveldesign/world_editor/world_editor_shard_monitor_plugin/StdAfx.h b/code/ryzom/tools/leveldesign/world_editor/world_editor_shard_monitor_plugin/StdAfx.h index 13e74ec50..66cc7ebe3 100644 --- a/code/ryzom/tools/leveldesign/world_editor/world_editor_shard_monitor_plugin/StdAfx.h +++ b/code/ryzom/tools/leveldesign/world_editor/world_editor_shard_monitor_plugin/StdAfx.h @@ -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 diff --git a/code/ryzom/tools/leveldesign/world_editor/world_editor_shard_monitor_plugin/memory_combo_box.cpp b/code/ryzom/tools/leveldesign/world_editor/world_editor_shard_monitor_plugin/memory_combo_box.cpp index 5f50ca065..cf9cf36cf 100644 --- a/code/ryzom/tools/leveldesign/world_editor/world_editor_shard_monitor_plugin/memory_combo_box.cpp +++ b/code/ryzom/tools/leveldesign/world_editor/world_editor_shard_monitor_plugin/memory_combo_box.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 diff --git a/code/ryzom/tools/leveldesign/world_editor/world_editor_shard_monitor_plugin/plugin.cpp b/code/ryzom/tools/leveldesign/world_editor/world_editor_shard_monitor_plugin/plugin.cpp index 30922cf1f..12b36a711 100644 --- a/code/ryzom/tools/leveldesign/world_editor/world_editor_shard_monitor_plugin/plugin.cpp +++ b/code/ryzom/tools/leveldesign/world_editor/world_editor_shard_monitor_plugin/plugin.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 diff --git a/code/ryzom/tools/leveldesign/world_editor/world_editor_sound_plugin/DialogFlags.cpp b/code/ryzom/tools/leveldesign/world_editor/world_editor_sound_plugin/DialogFlags.cpp index bf0857c39..f931ab9f1 100644 --- a/code/ryzom/tools/leveldesign/world_editor/world_editor_sound_plugin/DialogFlags.cpp +++ b/code/ryzom/tools/leveldesign/world_editor/world_editor_sound_plugin/DialogFlags.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 diff --git a/code/ryzom/tools/leveldesign/world_editor/world_editor_sound_plugin/StdAfx.h b/code/ryzom/tools/leveldesign/world_editor/world_editor_sound_plugin/StdAfx.h index 04ebecac8..4b709cc42 100644 --- a/code/ryzom/tools/leveldesign/world_editor/world_editor_sound_plugin/StdAfx.h +++ b/code/ryzom/tools/leveldesign/world_editor/world_editor_sound_plugin/StdAfx.h @@ -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 diff --git a/code/ryzom/tools/patch_gen/patch_gen_common.cpp b/code/ryzom/tools/patch_gen/patch_gen_common.cpp index 4ef82a350..a9502517d 100644 --- a/code/ryzom/tools/patch_gen/patch_gen_common.cpp +++ b/code/ryzom/tools/patch_gen/patch_gen_common.cpp @@ -1,6 +1,11 @@ // Ryzom - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2011-2013 Matt RAYKOWSKI (sfb) +// Copyright (C) 2014 Matthew LAGOE (Botanic) +// Copyright (C) 2014-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/pd_parser/parser.cpp b/code/ryzom/tools/pd_parser/parser.cpp index d4ae04508..80492e8b6 100644 --- a/code/ryzom/tools/pd_parser/parser.cpp +++ b/code/ryzom/tools/pd_parser/parser.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) 2015 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/server/ai_build_wmap/build_proximity_maps.cpp b/code/ryzom/tools/server/ai_build_wmap/build_proximity_maps.cpp index ed8f775c3..e77e7f777 100644 --- a/code/ryzom/tools/server/ai_build_wmap/build_proximity_maps.cpp +++ b/code/ryzom/tools/server/ai_build_wmap/build_proximity_maps.cpp @@ -1,6 +1,10 @@ // Ryzom - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2010 Matt RAYKOWSKI (sfb) +// Copyright (C) 2014 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/server/ai_build_wmap/main.cpp b/code/ryzom/tools/server/ai_build_wmap/main.cpp index 9fa9f4408..80183c9c4 100644 --- a/code/ryzom/tools/server/ai_build_wmap/main.cpp +++ b/code/ryzom/tools/server/ai_build_wmap/main.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) 2010 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/server/build_world_packed_col/build_world_packed_col.cpp b/code/ryzom/tools/server/build_world_packed_col/build_world_packed_col.cpp index b9ab53f98..4bbae8233 100644 --- a/code/ryzom/tools/server/build_world_packed_col/build_world_packed_col.cpp +++ b/code/ryzom/tools/server/build_world_packed_col/build_world_packed_col.cpp @@ -1,6 +1,10 @@ // Ryzom - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2010 Matt RAYKOWSKI (sfb) +// Copyright (C) 2010-2014 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/server/build_world_packed_col/packed_world_builder.cpp b/code/ryzom/tools/server/build_world_packed_col/packed_world_builder.cpp index 779e4102d..37e801012 100644 --- a/code/ryzom/tools/server/build_world_packed_col/packed_world_builder.cpp +++ b/code/ryzom/tools/server/build_world_packed_col/packed_world_builder.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) 2010 Matt RAYKOWSKI (sfb) +// // 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/sheets_packer/stdpch.h b/code/ryzom/tools/sheets_packer/stdpch.h index 5938546dc..2704ecf69 100644 --- a/code/ryzom/tools/sheets_packer/stdpch.h +++ b/code/ryzom/tools/sheets_packer/stdpch.h @@ -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) 2011 Robert TIMM (rti) +// // 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/sheets_packer_shard/sheets_packer_shard.cpp b/code/ryzom/tools/sheets_packer_shard/sheets_packer_shard.cpp index 9c2212efa..14ce53f4a 100644 --- a/code/ryzom/tools/sheets_packer_shard/sheets_packer_shard.cpp +++ b/code/ryzom/tools/sheets_packer_shard/sheets_packer_shard.cpp @@ -1,5 +1,5 @@ // NeL - MMORPG Framework -// Copyright (C) 2014 by authors +// Copyright (C) 2014 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 diff --git a/code/ryzom/tools/translation_tools/extract_bot_names.cpp b/code/ryzom/tools/translation_tools/extract_bot_names.cpp index 2b4e32629..15d8933c7 100644 --- a/code/ryzom/tools/translation_tools/extract_bot_names.cpp +++ b/code/ryzom/tools/translation_tools/extract_bot_names.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) 2011 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/translation_tools/main.cpp b/code/ryzom/tools/translation_tools/main.cpp index 3b7d27a05..a79b5158b 100644 --- a/code/ryzom/tools/translation_tools/main.cpp +++ b/code/ryzom/tools/translation_tools/main.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) 2014 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/snowballs2/client/src/animation.cpp b/code/snowballs2/client/src/animation.cpp index dd2296e25..423872599 100644 --- a/code/snowballs2/client/src/animation.cpp +++ b/code/snowballs2/client/src/animation.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) 2013 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/snowballs2/client/src/camera.cpp b/code/snowballs2/client/src/camera.cpp index 0b7971192..fb5d12ea2 100644 --- a/code/snowballs2/client/src/camera.cpp +++ b/code/snowballs2/client/src/camera.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) 2013-2014 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/snowballs2/client/src/camera.h b/code/snowballs2/client/src/camera.h index c2d61d866..c89ef9068 100644 --- a/code/snowballs2/client/src/camera.h +++ b/code/snowballs2/client/src/camera.h @@ -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) 2013 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/snowballs2/client/src/commands.cpp b/code/snowballs2/client/src/commands.cpp index d1929ab49..5234fcfac 100644 --- a/code/snowballs2/client/src/commands.cpp +++ b/code/snowballs2/client/src/commands.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) 2013-2014 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/snowballs2/client/src/compass.cpp b/code/snowballs2/client/src/compass.cpp index 1c36d1f6b..bedcbc4bb 100644 --- a/code/snowballs2/client/src/compass.cpp +++ b/code/snowballs2/client/src/compass.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) 2013-2014 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/snowballs2/client/src/configuration.cpp b/code/snowballs2/client/src/configuration.cpp index bc37448b2..7fa73cc9c 100644 --- a/code/snowballs2/client/src/configuration.cpp +++ b/code/snowballs2/client/src/configuration.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) 2018 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/snowballs2/client/src/entities.cpp b/code/snowballs2/client/src/entities.cpp index dde6df257..3b2d23dcd 100644 --- a/code/snowballs2/client/src/entities.cpp +++ b/code/snowballs2/client/src/entities.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) 2013-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/snowballs2/client/src/entities.h b/code/snowballs2/client/src/entities.h index e85ffc569..797fac870 100644 --- a/code/snowballs2/client/src/entities.h +++ b/code/snowballs2/client/src/entities.h @@ -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) 2013 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/snowballs2/client/src/game_time.cpp b/code/snowballs2/client/src/game_time.cpp index c6b1ff62c..3bcf51bbb 100644 --- a/code/snowballs2/client/src/game_time.cpp +++ b/code/snowballs2/client/src/game_time.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) 2013 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/snowballs2/client/src/game_time.h b/code/snowballs2/client/src/game_time.h index 7cf4ec827..a03627ef8 100644 --- a/code/snowballs2/client/src/game_time.h +++ b/code/snowballs2/client/src/game_time.h @@ -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) 2013 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/snowballs2/client/src/graph.cpp b/code/snowballs2/client/src/graph.cpp index 8fd3dd85c..31329fd7d 100644 --- a/code/snowballs2/client/src/graph.cpp +++ b/code/snowballs2/client/src/graph.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) 2013 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/snowballs2/client/src/mouse_listener.cpp b/code/snowballs2/client/src/mouse_listener.cpp index 67508e281..5dab385a9 100644 --- a/code/snowballs2/client/src/mouse_listener.cpp +++ b/code/snowballs2/client/src/mouse_listener.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) 2013 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/snowballs2/client/src/network.cpp b/code/snowballs2/client/src/network.cpp index 544645243..8e194e52f 100644 --- a/code/snowballs2/client/src/network.cpp +++ b/code/snowballs2/client/src/network.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) 2016 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/snowballs2/client/src/snowballs_client.cpp b/code/snowballs2/client/src/snowballs_client.cpp index d57b456a2..0d18b5361 100644 --- a/code/snowballs2/client/src/snowballs_client.cpp +++ b/code/snowballs2/client/src/snowballs_client.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) 2013-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/snowballs2/client/src/snowballs_client.h b/code/snowballs2/client/src/snowballs_client.h index d21f925f7..7f11977b9 100644 --- a/code/snowballs2/client/src/snowballs_client.h +++ b/code/snowballs2/client/src/snowballs_client.h @@ -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) 2013 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/snowballs2/client/src/snowballs_config.h b/code/snowballs2/client/src/snowballs_config.h index ee216f3c5..75dd46892 100644 --- a/code/snowballs2/client/src/snowballs_config.h +++ b/code/snowballs2/client/src/snowballs_config.h @@ -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) 2013-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/snowballs2/client/src/sound.cpp b/code/snowballs2/client/src/sound.cpp index f0a767825..bbefd9435 100644 --- a/code/snowballs2/client/src/sound.cpp +++ b/code/snowballs2/client/src/sound.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/snowballs2/client/src/sound.h b/code/snowballs2/client/src/sound.h index 34b0d6723..5b40d5b9a 100644 --- a/code/snowballs2/client/src/sound.h +++ b/code/snowballs2/client/src/sound.h @@ -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/snowballs2/server/frontend/src/main.cpp b/code/snowballs2/server/frontend/src/main.cpp index 38bcc18fc..4d9d94ae9 100644 --- a/code/snowballs2/server/frontend/src/main.cpp +++ b/code/snowballs2/server/frontend/src/main.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) 2014 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/studio/src/extension_system/iplugin.h b/code/studio/src/extension_system/iplugin.h index 973f80e14..01f337df1 100644 --- a/code/studio/src/extension_system/iplugin.h +++ b/code/studio/src/extension_system/iplugin.h @@ -1,7 +1,8 @@ // Object Viewer Qt - MMORPG Framework +// Copyright (C) 2010-2011 Dzmitry KAMIAHIN (dnk-88) +// +// This source file has been modified by the following contributors: // Copyright (C) 2010 Winch Gate Property Limited -// Copyright (C) 2011 Dzmitry Kamiahin -// Parts by Nokia Corporation (qt-info@nokia.com) Copyright (C) 2009. // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/extension_system/iplugin_manager.h b/code/studio/src/extension_system/iplugin_manager.h index f60f45890..41c3e93b5 100644 --- a/code/studio/src/extension_system/iplugin_manager.h +++ b/code/studio/src/extension_system/iplugin_manager.h @@ -1,7 +1,9 @@ // Object Viewer Qt - MMORPG Framework +// Copyright (C) 2010-2011 Dzmitry KAMIAHIN (dnk-88) +// +// This source file has been modified by the following contributors: // Copyright (C) 2010 Winch Gate Property Limited -// Copyright (C) 2011 Dzmitry Kamiahin -// Parts by Nokia Corporation (qt-info@nokia.com) Copyright (C) 2009. +// Copyright (C) 2014 Laszlo KIS-ADAM (dfighter) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/extension_system/iplugin_spec.h b/code/studio/src/extension_system/iplugin_spec.h index 2aefbb894..c701fca70 100644 --- a/code/studio/src/extension_system/iplugin_spec.h +++ b/code/studio/src/extension_system/iplugin_spec.h @@ -1,7 +1,8 @@ // Object Viewer Qt - MMORPG Framework +// Copyright (C) 2010-2011 Dzmitry KAMIAHIN (dnk-88) +// +// This source file has been modified by the following contributors: // Copyright (C) 2010 Winch Gate Property Limited -// Copyright (C) 2011 Dzmitry Kamiahin -// Parts by Nokia Corporation (qt-info@nokia.com) Copyright (C) 2009. // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/extension_system/plugin_manager.cpp b/code/studio/src/extension_system/plugin_manager.cpp index 37cd85237..2a32b5516 100644 --- a/code/studio/src/extension_system/plugin_manager.cpp +++ b/code/studio/src/extension_system/plugin_manager.cpp @@ -1,7 +1,9 @@ // Object Viewer Qt - MMORPG Framework +// Copyright (C) 2011 Dzmitry KAMIAHIN (dnk-88) +// +// This source file has been modified by the following contributors: // Copyright (C) 2010 Winch Gate Property Limited -// Copyright (C) 2011 Dzmitry Kamiahin -// Parts by Nokia Corporation (qt-info@nokia.com) Copyright (C) 2009. +// Copyright (C) 2014 Laszlo KIS-ADAM (dfighter) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/extension_system/plugin_manager.h b/code/studio/src/extension_system/plugin_manager.h index ca31e1552..42bca3d97 100644 --- a/code/studio/src/extension_system/plugin_manager.h +++ b/code/studio/src/extension_system/plugin_manager.h @@ -1,7 +1,9 @@ // Object Viewer Qt - MMORPG Framework +// Copyright (C) 2010-2011 Dzmitry KAMIAHIN (dnk-88) +// +// This source file has been modified by the following contributors: // Copyright (C) 2010 Winch Gate Property Limited -// Copyright (C) 2011 Dzmitry Kamiahin -// Parts by Nokia Corporation (qt-info@nokia.com) Copyright (C) 2009. +// Copyright (C) 2014 Laszlo KIS-ADAM (dfighter) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/extension_system/plugin_spec.cpp b/code/studio/src/extension_system/plugin_spec.cpp index 97a08ea64..53250cebe 100644 --- a/code/studio/src/extension_system/plugin_spec.cpp +++ b/code/studio/src/extension_system/plugin_spec.cpp @@ -1,7 +1,9 @@ // Object Viewer Qt - MMORPG Framework +// Copyright (C) 2011 Dzmitry KAMIAHIN (dnk-88) +// +// This source file has been modified by the following contributors: // Copyright (C) 2010 Winch Gate Property Limited -// Copyright (C) 2011 Dzmitry Kamiahin -// Parts by Nokia Corporation (qt-info@nokia.com) Copyright (C) 2009. +// Copyright (C) 2014 Laszlo KIS-ADAM (dfighter) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/extension_system/plugin_spec.h b/code/studio/src/extension_system/plugin_spec.h index d2abe1ef8..4f231488e 100644 --- a/code/studio/src/extension_system/plugin_spec.h +++ b/code/studio/src/extension_system/plugin_spec.h @@ -1,7 +1,9 @@ // Object Viewer Qt - MMORPG Framework +// Copyright (C) 2010-2011 Dzmitry KAMIAHIN (dnk-88) +// +// This source file has been modified by the following contributors: // Copyright (C) 2010 Winch Gate Property Limited -// Copyright (C) 2011 Dzmitry Kamiahin -// Parts by Nokia Corporation (qt-info@nokia.com) Copyright (C) 2009. +// Copyright (C) 2014 Laszlo KIS-ADAM (dfighter) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/main.cpp b/code/studio/src/main.cpp index e126e258a..787e57930 100644 --- a/code/studio/src/main.cpp +++ b/code/studio/src/main.cpp @@ -1,6 +1,10 @@ // Object Viewer Qt - MMORPG Framework +// Copyright (C) 2010 Dzmitry KAMIAHIN (dnk-88) +// +// This source file has been modified by the following contributors: // Copyright (C) 2010 Winch Gate Property Limited -// Copyright (C) 2010 Dzmitry Kamiahin +// Copyright (C) 2014-2015 Jan BOON (Kaetemi) +// Copyright (C) 2014-2015 Laszlo KIS-ADAM (dfighter) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/bnp_manager/bnp_dirtree_dialog.cpp b/code/studio/src/plugins/bnp_manager/bnp_dirtree_dialog.cpp index 057ac843e..1ddb25df1 100644 --- a/code/studio/src/plugins/bnp_manager/bnp_dirtree_dialog.cpp +++ b/code/studio/src/plugins/bnp_manager/bnp_dirtree_dialog.cpp @@ -1,5 +1,5 @@ // Object Viewer Qt - BNP Manager Plugin - MMORPG Framework -// Copyright (C) 2011 Roland Winklmeier +// Copyright (C) 2011 Roland WINKLMEIER // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/bnp_manager/bnp_dirtree_dialog.h b/code/studio/src/plugins/bnp_manager/bnp_dirtree_dialog.h index 6ad97b97d..a4ca1850e 100644 --- a/code/studio/src/plugins/bnp_manager/bnp_dirtree_dialog.h +++ b/code/studio/src/plugins/bnp_manager/bnp_dirtree_dialog.h @@ -1,5 +1,5 @@ // Object Viewer Qt - BNP Manager Plugin - MMORPG Framework -// Copyright (C) 2011 Roland Winklmeier +// Copyright (C) 2011 Roland WINKLMEIER // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/bnp_manager/bnp_file.cpp b/code/studio/src/plugins/bnp_manager/bnp_file.cpp index 675baa04f..b56fe1c2b 100644 --- a/code/studio/src/plugins/bnp_manager/bnp_file.cpp +++ b/code/studio/src/plugins/bnp_manager/bnp_file.cpp @@ -1,5 +1,5 @@ // Object Viewer Qt - BNP Manager Plugin - MMORPG Framework -// Copyright (C) 2011 Roland Winklmeier +// Copyright (C) 2011 Roland WINKLMEIER // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/bnp_manager/bnp_file.h b/code/studio/src/plugins/bnp_manager/bnp_file.h index c1211bcde..87798955f 100644 --- a/code/studio/src/plugins/bnp_manager/bnp_file.h +++ b/code/studio/src/plugins/bnp_manager/bnp_file.h @@ -1,5 +1,5 @@ // Object Viewer Qt - BNP Manager Plugin - MMORPG Framework -// Copyright (C) 2011 Roland Winklmeier +// Copyright (C) 2011 Roland WINKLMEIER // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/bnp_manager/bnp_filelist_dialog.cpp b/code/studio/src/plugins/bnp_manager/bnp_filelist_dialog.cpp index ebeb07bd8..1efa6aab0 100644 --- a/code/studio/src/plugins/bnp_manager/bnp_filelist_dialog.cpp +++ b/code/studio/src/plugins/bnp_manager/bnp_filelist_dialog.cpp @@ -1,5 +1,5 @@ // Object Viewer Qt - BNP Manager Plugin - MMORPG Framework -// Copyright (C) 2011 Roland Winklmeier +// Copyright (C) 2011 Roland WINKLMEIER // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/bnp_manager/bnp_filelist_dialog.h b/code/studio/src/plugins/bnp_manager/bnp_filelist_dialog.h index 2dc01ced2..fa1dff7c8 100644 --- a/code/studio/src/plugins/bnp_manager/bnp_filelist_dialog.h +++ b/code/studio/src/plugins/bnp_manager/bnp_filelist_dialog.h @@ -1,5 +1,5 @@ // Object Viewer Qt - BNP Manager Plugin - MMORPG Framework -// Copyright (C) 2011 Roland Winklmeier +// Copyright (C) 2011 Roland WINKLMEIER // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/bnp_manager/bnp_filesystem_model.cpp b/code/studio/src/plugins/bnp_manager/bnp_filesystem_model.cpp index 966605209..3705f8789 100644 --- a/code/studio/src/plugins/bnp_manager/bnp_filesystem_model.cpp +++ b/code/studio/src/plugins/bnp_manager/bnp_filesystem_model.cpp @@ -1,5 +1,5 @@ // Object Viewer Qt - BNP Manager Plugin - MMORPG Framework -// Copyright (C) 2011 Roland Winklmeier +// Copyright (C) 2011 Roland WINKLMEIER // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/bnp_manager/bnp_filesystem_model.h b/code/studio/src/plugins/bnp_manager/bnp_filesystem_model.h index 9d4f809c9..dabd33bd6 100644 --- a/code/studio/src/plugins/bnp_manager/bnp_filesystem_model.h +++ b/code/studio/src/plugins/bnp_manager/bnp_filesystem_model.h @@ -1,5 +1,5 @@ // Object Viewer Qt - BNP Manager Plugin - MMORPG Framework -// Copyright (C) 2011 Roland Winklmeier +// Copyright (C) 2011 Roland WINKLMEIER // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/bnp_manager/bnp_manager_constants.h b/code/studio/src/plugins/bnp_manager/bnp_manager_constants.h index 9a4a63cf1..086b2a11f 100644 --- a/code/studio/src/plugins/bnp_manager/bnp_manager_constants.h +++ b/code/studio/src/plugins/bnp_manager/bnp_manager_constants.h @@ -1,5 +1,5 @@ // Object Viewer Qt - BNP Manager Plugin - MMORPG Framework -// Copyright (C) 2011 Roland Winklmeier +// Copyright (C) 2011 Roland WINKLMEIER // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/bnp_manager/bnp_manager_plugin.cpp b/code/studio/src/plugins/bnp_manager/bnp_manager_plugin.cpp index 509dd2997..8941410d8 100644 --- a/code/studio/src/plugins/bnp_manager/bnp_manager_plugin.cpp +++ b/code/studio/src/plugins/bnp_manager/bnp_manager_plugin.cpp @@ -1,5 +1,8 @@ // Object Viewer Qt - BNP Manager Plugin - MMORPG Framework -// Copyright (C) 2011 Roland Winklmeier +// Copyright (C) 2011 Roland WINKLMEIER +// +// This source file has been modified by the following contributors: +// Copyright (C) 2014 Laszlo KIS-ADAM (dfighter) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/bnp_manager/bnp_manager_plugin.h b/code/studio/src/plugins/bnp_manager/bnp_manager_plugin.h index 0c69f459a..4736a4b99 100644 --- a/code/studio/src/plugins/bnp_manager/bnp_manager_plugin.h +++ b/code/studio/src/plugins/bnp_manager/bnp_manager_plugin.h @@ -1,5 +1,5 @@ // Object Viewer Qt - BNP Manager Plugin - MMORPG Framework -// Copyright (C) 2011 Roland Winklmeier +// Copyright (C) 2011 Roland WINKLMEIER // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/bnp_manager/bnp_manager_window.cpp b/code/studio/src/plugins/bnp_manager/bnp_manager_window.cpp index 04b4fd628..c9e1a1894 100644 --- a/code/studio/src/plugins/bnp_manager/bnp_manager_window.cpp +++ b/code/studio/src/plugins/bnp_manager/bnp_manager_window.cpp @@ -1,5 +1,5 @@ // Object Viewer Qt - BNP Manager Plugin - MMORPG Framework -// Copyright (C) 2011 Roland Winklmeier +// Copyright (C) 2011 Roland WINKLMEIER // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/bnp_manager/bnp_manager_window.h b/code/studio/src/plugins/bnp_manager/bnp_manager_window.h index ef06a35d9..887394b00 100644 --- a/code/studio/src/plugins/bnp_manager/bnp_manager_window.h +++ b/code/studio/src/plugins/bnp_manager/bnp_manager_window.h @@ -1,5 +1,5 @@ // Object Viewer Qt - BNP Manager Plugin - MMORPG Framework -// Copyright (C) 2011 Roland Winklmeier +// Copyright (C) 2011 Roland WINKLMEIER // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/bnp_manager/bnp_proxy_model.cpp b/code/studio/src/plugins/bnp_manager/bnp_proxy_model.cpp index 1eab0821b..e2d1f2bee 100644 --- a/code/studio/src/plugins/bnp_manager/bnp_proxy_model.cpp +++ b/code/studio/src/plugins/bnp_manager/bnp_proxy_model.cpp @@ -1,5 +1,5 @@ // Object Viewer Qt - BNP Manager Plugin - MMORPG Framework -// Copyright (C) 2011 Roland Winklmeier +// Copyright (C) 2011 Roland WINKLMEIER // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/bnp_manager/bnp_proxy_model.h b/code/studio/src/plugins/bnp_manager/bnp_proxy_model.h index ab16971e1..84ccbd994 100644 --- a/code/studio/src/plugins/bnp_manager/bnp_proxy_model.h +++ b/code/studio/src/plugins/bnp_manager/bnp_proxy_model.h @@ -1,5 +1,5 @@ // Object Viewer Qt - BNP Manager Plugin - MMORPG Framework -// Copyright (C) 2011 Roland Winklmeier +// Copyright (C) 2011 Roland WINKLMEIER // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/core/Nel3DWidget/nel3d_widget.cpp b/code/studio/src/plugins/core/Nel3DWidget/nel3d_widget.cpp index bc83b5d78..80e5a8db8 100644 --- a/code/studio/src/plugins/core/Nel3DWidget/nel3d_widget.cpp +++ b/code/studio/src/plugins/core/Nel3DWidget/nel3d_widget.cpp @@ -1,6 +1,9 @@ // Ryzom Core MMORPG framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2013-2014 Laszlo KIS-ADAM (dfighter) +// // 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/studio/src/plugins/core/Nel3DWidget/nel3d_widget.h b/code/studio/src/plugins/core/Nel3DWidget/nel3d_widget.h index 254001b25..27b6dd84c 100644 --- a/code/studio/src/plugins/core/Nel3DWidget/nel3d_widget.h +++ b/code/studio/src/plugins/core/Nel3DWidget/nel3d_widget.h @@ -1,6 +1,9 @@ // Ryzom Core MMORPG framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2012-2014 Laszlo KIS-ADAM (dfighter) +// // 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/studio/src/plugins/core/context_manager.cpp b/code/studio/src/plugins/core/context_manager.cpp index 203738faf..a44cb41e4 100644 --- a/code/studio/src/plugins/core/context_manager.cpp +++ b/code/studio/src/plugins/core/context_manager.cpp @@ -1,6 +1,9 @@ // Object Viewer Qt - MMORPG Framework +// Copyright (C) 2011 Dzmitry KAMIAHIN (dnk-88) +// +// This source file has been modified by the following contributors: // Copyright (C) 2010 Winch Gate Property Limited -// Copyright (C) 2011 Dzmitry Kamiahin +// Copyright (C) 2014 Laszlo KIS-ADAM (dfighter) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/core/context_manager.h b/code/studio/src/plugins/core/context_manager.h index 9b0a62c7e..a4c15957e 100644 --- a/code/studio/src/plugins/core/context_manager.h +++ b/code/studio/src/plugins/core/context_manager.h @@ -1,6 +1,9 @@ // Object Viewer Qt - MMORPG Framework +// Copyright (C) 2011 Dzmitry KAMIAHIN (dnk-88) +// +// This source file has been modified by the following contributors: // Copyright (C) 2010 Winch Gate Property Limited -// Copyright (C) 2011 Dzmitry Kamiahin +// Copyright (C) 2014 Laszlo KIS-ADAM (dfighter) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/core/core.cpp b/code/studio/src/plugins/core/core.cpp index b21d934c8..60cd08cb7 100644 --- a/code/studio/src/plugins/core/core.cpp +++ b/code/studio/src/plugins/core/core.cpp @@ -1,7 +1,9 @@ // Object Viewer Qt - MMORPG Framework +// Copyright (C) 2011 Dzmitry KAMIAHIN (dnk-88) +// +// This source file has been modified by the following contributors: // Copyright (C) 2010 Winch Gate Property Limited -// Copyright (C) 2011 Dzmitry Kamiahin -// Parts by Nokia Corporation (qt-info@nokia.com) Copyright (C) 2009. +// Copyright (C) 2014 Laszlo KIS-ADAM (dfighter) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/core/core.h b/code/studio/src/plugins/core/core.h index f34dd6ae6..3ea7004a4 100644 --- a/code/studio/src/plugins/core/core.h +++ b/code/studio/src/plugins/core/core.h @@ -1,7 +1,9 @@ // Object Viewer Qt - MMORPG Framework +// Copyright (C) 2011 Dzmitry KAMIAHIN (dnk-88) +// +// This source file has been modified by the following contributors: // Copyright (C) 2010 Winch Gate Property Limited -// Copyright (C) 2011 Dzmitry Kamiahin -// Parts by Nokia Corporation (qt-info@nokia.com) Copyright (C) 2009. +// Copyright (C) 2014 Laszlo KIS-ADAM (dfighter) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/core/core_constants.h b/code/studio/src/plugins/core/core_constants.h index 8bf6d5fcd..9bc4688f4 100644 --- a/code/studio/src/plugins/core/core_constants.h +++ b/code/studio/src/plugins/core/core_constants.h @@ -1,6 +1,9 @@ // Object Viewer Qt - MMORPG Framework +// Copyright (C) 2010 Dzmitry KAMIAHIN (dnk-88) +// +// This source file has been modified by the following contributors: // Copyright (C) 2010 Winch Gate Property Limited -// Copyright (C) 2010 Dzmitry Kamiahin +// Copyright (C) 2014 Laszlo KIS-ADAM (dfighter) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/core/core_global.h b/code/studio/src/plugins/core/core_global.h index 48fe0ece9..637f2bc2a 100644 --- a/code/studio/src/plugins/core/core_global.h +++ b/code/studio/src/plugins/core/core_global.h @@ -1,7 +1,9 @@ // Object Viewer Qt - MMORPG Framework +// Copyright (C) 2011 Dzmitry KAMIAHIN (dnk-88) +// +// This source file has been modified by the following contributors: // Copyright (C) 2010 Winch Gate Property Limited -// Copyright (C) 2011 Dzmitry Kamiahin -// Parts by Nokia Corporation (qt-info@nokia.com) Copyright (C) 2009. +// Copyright (C) 2014 Laszlo KIS-ADAM (dfighter) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/core/core_plugin.cpp b/code/studio/src/plugins/core/core_plugin.cpp index a72a68ccc..1d7ebf47c 100644 --- a/code/studio/src/plugins/core/core_plugin.cpp +++ b/code/studio/src/plugins/core/core_plugin.cpp @@ -1,6 +1,9 @@ // Object Viewer Qt - MMORPG Framework +// Copyright (C) 2010 Dzmitry KAMIAHIN (dnk-88) +// +// This source file has been modified by the following contributors: // Copyright (C) 2010 Winch Gate Property Limited -// Copyright (C) 2010 Dzmitry Kamiahin +// Copyright (C) 2014 Laszlo KIS-ADAM (dfighter) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/core/core_plugin.h b/code/studio/src/plugins/core/core_plugin.h index 5062227e3..aeddb967b 100644 --- a/code/studio/src/plugins/core/core_plugin.h +++ b/code/studio/src/plugins/core/core_plugin.h @@ -1,6 +1,9 @@ // Object Viewer Qt - MMORPG Framework +// Copyright (C) 2010 Dzmitry KAMIAHIN (dnk-88) +// +// This source file has been modified by the following contributors: // Copyright (C) 2010 Winch Gate Property Limited -// Copyright (C) 2010 Dzmitry Kamiahin +// Copyright (C) 2014 Laszlo KIS-ADAM (dfighter) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/core/general_settings_page.cpp b/code/studio/src/plugins/core/general_settings_page.cpp index bfbb06d66..79e1288a4 100644 --- a/code/studio/src/plugins/core/general_settings_page.cpp +++ b/code/studio/src/plugins/core/general_settings_page.cpp @@ -1,6 +1,9 @@ // Object Viewer Qt - MMORPG Framework +// Copyright (C) 2011 Dzmitry KAMIAHIN (dnk-88) +// +// This source file has been modified by the following contributors: // Copyright (C) 2010 Winch Gate Property Limited -// Copyright (C) 2011 Dzmitry Kamiahin +// Copyright (C) 2014 Laszlo KIS-ADAM (dfighter) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/core/general_settings_page.h b/code/studio/src/plugins/core/general_settings_page.h index 66eacd189..f62f5d826 100644 --- a/code/studio/src/plugins/core/general_settings_page.h +++ b/code/studio/src/plugins/core/general_settings_page.h @@ -1,6 +1,9 @@ // Object Viewer Qt - MMORPG Framework +// Copyright (C) 2011 Dzmitry KAMIAHIN (dnk-88) +// +// This source file has been modified by the following contributors: // Copyright (C) 2010 Winch Gate Property Limited -// Copyright (C) 2011 Dzmitry Kamiahin +// Copyright (C) 2014 Laszlo KIS-ADAM (dfighter) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/core/icontext.h b/code/studio/src/plugins/core/icontext.h index 616e0db14..78bde1832 100644 --- a/code/studio/src/plugins/core/icontext.h +++ b/code/studio/src/plugins/core/icontext.h @@ -1,6 +1,9 @@ // Object Viewer Qt - MMORPG Framework +// Copyright (C) 2011 Dzmitry KAMIAHIN (dnk-88) +// +// This source file has been modified by the following contributors: // Copyright (C) 2010 Winch Gate Property Limited -// Copyright (C) 2011 Dzmitry Kamiahin +// Copyright (C) 2014 Laszlo KIS-ADAM (dfighter) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/core/icore.h b/code/studio/src/plugins/core/icore.h index 4f1ee474f..69ea3c86b 100644 --- a/code/studio/src/plugins/core/icore.h +++ b/code/studio/src/plugins/core/icore.h @@ -1,7 +1,9 @@ // Object Viewer Qt - MMORPG Framework +// Copyright (C) 2011 Dzmitry KAMIAHIN (dnk-88) +// +// This source file has been modified by the following contributors: // Copyright (C) 2010 Winch Gate Property Limited -// Copyright (C) 2011 Dzmitry Kamiahin -// Parts by Nokia Corporation (qt-info@nokia.com) Copyright (C) 2009. +// Copyright (C) 2014 Laszlo KIS-ADAM (dfighter) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/core/icore_listener.h b/code/studio/src/plugins/core/icore_listener.h index c27e40242..ad82cab6a 100644 --- a/code/studio/src/plugins/core/icore_listener.h +++ b/code/studio/src/plugins/core/icore_listener.h @@ -1,7 +1,9 @@ // Object Viewer Qt - MMORPG Framework +// Copyright (C) 2011 Dzmitry KAMIAHIN (dnk-88) +// +// This source file has been modified by the following contributors: // Copyright (C) 2010 Winch Gate Property Limited -// Copyright (C) 2011 Dzmitry Kamiahin -// Parts by Nokia Corporation (qt-info@nokia.com) Copyright (C) 2009. +// Copyright (C) 2014 Laszlo KIS-ADAM (dfighter) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/core/ioptions_page.h b/code/studio/src/plugins/core/ioptions_page.h index 4d9ed6fda..b67ab7cfa 100644 --- a/code/studio/src/plugins/core/ioptions_page.h +++ b/code/studio/src/plugins/core/ioptions_page.h @@ -1,7 +1,9 @@ // Object Viewer Qt - MMORPG Framework +// Copyright (C) 2011 Dzmitry KAMIAHIN (dnk-88) +// +// This source file has been modified by the following contributors: // Copyright (C) 2010 Winch Gate Property Limited -// Copyright (C) 2011 Dzmitry Kamiahin -// Parts by Nokia Corporation (qt-info@nokia.com) Copyright (C) 2009. +// Copyright (C) 2014 Laszlo KIS-ADAM (dfighter) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/core/main_window.cpp b/code/studio/src/plugins/core/main_window.cpp index c181376e8..95b3e2320 100644 --- a/code/studio/src/plugins/core/main_window.cpp +++ b/code/studio/src/plugins/core/main_window.cpp @@ -1,6 +1,9 @@ // Object Viewer Qt - MMORPG Framework +// Copyright (C) 2011 Dzmitry KAMIAHIN (dnk-88) +// +// This source file has been modified by the following contributors: // Copyright (C) 2010 Winch Gate Property Limited -// Copyright (C) 2011 Dzmitry Kamiahin +// Copyright (C) 2014 Laszlo KIS-ADAM (dfighter) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/core/main_window.h b/code/studio/src/plugins/core/main_window.h index d258a5eba..ba31aece4 100644 --- a/code/studio/src/plugins/core/main_window.h +++ b/code/studio/src/plugins/core/main_window.h @@ -1,6 +1,9 @@ // Object Viewer Qt - MMORPG Framework +// Copyright (C) 2011 Dzmitry KAMIAHIN (dnk-88) +// +// This source file has been modified by the following contributors: // Copyright (C) 2010 Winch Gate Property Limited -// Copyright (C) 2011 Dzmitry Kamiahin +// Copyright (C) 2014 Laszlo KIS-ADAM (dfighter) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/core/menu_manager.cpp b/code/studio/src/plugins/core/menu_manager.cpp index 3e6272f0a..1e808ed7d 100644 --- a/code/studio/src/plugins/core/menu_manager.cpp +++ b/code/studio/src/plugins/core/menu_manager.cpp @@ -1,6 +1,9 @@ // Object Viewer Qt - MMORPG Framework +// Copyright (C) 2011 Dzmitry KAMIAHIN (dnk-88) +// +// This source file has been modified by the following contributors: // Copyright (C) 2010 Winch Gate Property Limited -// Copyright (C) 2011 Dzmitry Kamiahin +// Copyright (C) 2014 Laszlo KIS-ADAM (dfighter) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/core/menu_manager.h b/code/studio/src/plugins/core/menu_manager.h index fd6af8f3a..afcc88fac 100644 --- a/code/studio/src/plugins/core/menu_manager.h +++ b/code/studio/src/plugins/core/menu_manager.h @@ -1,6 +1,9 @@ // Object Viewer Qt - MMORPG Framework +// Copyright (C) 2011 Dzmitry KAMIAHIN (dnk-88) +// +// This source file has been modified by the following contributors: // Copyright (C) 2010 Winch Gate Property Limited -// Copyright (C) 2011 Dzmitry Kamiahin +// Copyright (C) 2014 Laszlo KIS-ADAM (dfighter) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/core/plugin_view_dialog.cpp b/code/studio/src/plugins/core/plugin_view_dialog.cpp index cccc98509..76cbc828e 100644 --- a/code/studio/src/plugins/core/plugin_view_dialog.cpp +++ b/code/studio/src/plugins/core/plugin_view_dialog.cpp @@ -1,6 +1,9 @@ // Object Viewer Qt - MMORPG Framework +// Copyright (C) 2011 Dzmitry KAMIAHIN (dnk-88) +// +// This source file has been modified by the following contributors: // Copyright (C) 2010 Winch Gate Property Limited -// Copyright (C) 2011 Dzmitry Kamiahin +// Copyright (C) 2014 Laszlo KIS-ADAM (dfighter) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/core/plugin_view_dialog.h b/code/studio/src/plugins/core/plugin_view_dialog.h index e7c1123c1..6039f9a29 100644 --- a/code/studio/src/plugins/core/plugin_view_dialog.h +++ b/code/studio/src/plugins/core/plugin_view_dialog.h @@ -1,6 +1,9 @@ // Object Viewer Qt - MMORPG Framework +// Copyright (C) 2011 Dzmitry KAMIAHIN (dnk-88) +// +// This source file has been modified by the following contributors: // Copyright (C) 2010 Winch Gate Property Limited -// Copyright (C) 2011 Dzmitry Kamiahin +// Copyright (C) 2014 Laszlo KIS-ADAM (dfighter) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/core/search_paths_settings_page.cpp b/code/studio/src/plugins/core/search_paths_settings_page.cpp index 516d3d3f3..918b58a7c 100644 --- a/code/studio/src/plugins/core/search_paths_settings_page.cpp +++ b/code/studio/src/plugins/core/search_paths_settings_page.cpp @@ -1,6 +1,9 @@ // Object Viewer Qt - MMORPG Framework +// Copyright (C) 2011 Dzmitry KAMIAHIN (dnk-88) +// +// This source file has been modified by the following contributors: // Copyright (C) 2010 Winch Gate Property Limited -// Copyright (C) 2011 Dzmitry Kamiahin +// Copyright (C) 2014-2015 Laszlo KIS-ADAM (dfighter) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/core/search_paths_settings_page.h b/code/studio/src/plugins/core/search_paths_settings_page.h index c45b29571..5c94b46d3 100644 --- a/code/studio/src/plugins/core/search_paths_settings_page.h +++ b/code/studio/src/plugins/core/search_paths_settings_page.h @@ -1,6 +1,9 @@ // Object Viewer Qt - MMORPG Framework +// Copyright (C) 2011 Dzmitry KAMIAHIN (dnk-88) +// +// This source file has been modified by the following contributors: // Copyright (C) 2010 Winch Gate Property Limited -// Copyright (C) 2011 Dzmitry Kamiahin +// Copyright (C) 2014 Laszlo KIS-ADAM (dfighter) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/core/settings_dialog.cpp b/code/studio/src/plugins/core/settings_dialog.cpp index b1027212c..b0cc32964 100644 --- a/code/studio/src/plugins/core/settings_dialog.cpp +++ b/code/studio/src/plugins/core/settings_dialog.cpp @@ -1,7 +1,9 @@ // Object Viewer Qt - MMORPG Framework +// Copyright (C) 2011 Dzmitry KAMIAHIN (dnk-88) +// +// This source file has been modified by the following contributors: // Copyright (C) 2010 Winch Gate Property Limited -// Copyright (C) 2011 Dzmitry Kamiahin -// Parts by Nokia Corporation (qt-info@nokia.com) Copyright (C) 2009. +// Copyright (C) 2014-2015 Laszlo KIS-ADAM (dfighter) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/core/settings_dialog.h b/code/studio/src/plugins/core/settings_dialog.h index 9e1c86444..3c4d14910 100644 --- a/code/studio/src/plugins/core/settings_dialog.h +++ b/code/studio/src/plugins/core/settings_dialog.h @@ -1,7 +1,9 @@ // Object Viewer Qt - MMORPG Framework +// Copyright (C) 2011 Dzmitry KAMIAHIN (dnk-88) +// +// This source file has been modified by the following contributors: // Copyright (C) 2010 Winch Gate Property Limited -// Copyright (C) 2011 Dzmitry Kamiahin -// Parts by Nokia Corporation (qt-info@nokia.com) Copyright (C) 2009. +// Copyright (C) 2014-2015 Laszlo KIS-ADAM (dfighter) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/disp_sheet_id/disp_sheet_id_plugin.cpp b/code/studio/src/plugins/disp_sheet_id/disp_sheet_id_plugin.cpp index 46a8ee6bd..7a5b110a6 100644 --- a/code/studio/src/plugins/disp_sheet_id/disp_sheet_id_plugin.cpp +++ b/code/studio/src/plugins/disp_sheet_id/disp_sheet_id_plugin.cpp @@ -1,6 +1,9 @@ // Object Viewer Qt - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2014 Laszlo KIS-ADAM (dfighter) +// // 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/studio/src/plugins/disp_sheet_id/disp_sheet_id_plugin.h b/code/studio/src/plugins/disp_sheet_id/disp_sheet_id_plugin.h index 7506b84cc..a34063777 100644 --- a/code/studio/src/plugins/disp_sheet_id/disp_sheet_id_plugin.h +++ b/code/studio/src/plugins/disp_sheet_id/disp_sheet_id_plugin.h @@ -1,6 +1,10 @@ // Object Viewer Qt - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2011 Dzmitry KAMIAHIN (dnk-88) +// Copyright (C) 2014 Laszlo KIS-ADAM (dfighter) +// // 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/studio/src/plugins/disp_sheet_id/sheet_id_view.cpp b/code/studio/src/plugins/disp_sheet_id/sheet_id_view.cpp index f05060a9c..e27ef9405 100644 --- a/code/studio/src/plugins/disp_sheet_id/sheet_id_view.cpp +++ b/code/studio/src/plugins/disp_sheet_id/sheet_id_view.cpp @@ -1,6 +1,9 @@ // Object Viewer Qt - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2011 Dzmitry KAMIAHIN (dnk-88) +// // 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/studio/src/plugins/disp_sheet_id/sheet_id_view.h b/code/studio/src/plugins/disp_sheet_id/sheet_id_view.h index e9c758481..ac5022328 100644 --- a/code/studio/src/plugins/disp_sheet_id/sheet_id_view.h +++ b/code/studio/src/plugins/disp_sheet_id/sheet_id_view.h @@ -1,6 +1,9 @@ // Object Viewer Qt - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2011 Dzmitry KAMIAHIN (dnk-88) +// // 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/studio/src/plugins/example/example_settings_page.cpp b/code/studio/src/plugins/example/example_settings_page.cpp index 71fb7f698..8b12aea0b 100644 --- a/code/studio/src/plugins/example/example_settings_page.cpp +++ b/code/studio/src/plugins/example/example_settings_page.cpp @@ -1,6 +1,8 @@ // Object Viewer Qt - MMORPG Framework +// Copyright (C) 2011 Dzmitry KAMIAHIN (dnk-88) +// +// This source file has been modified by the following contributors: // Copyright (C) 2010 Winch Gate Property Limited -// Copyright (C) 2011 Dzmitry Kamiahin // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/example/example_settings_page.h b/code/studio/src/plugins/example/example_settings_page.h index 8a1a7cef1..ae698edfc 100644 --- a/code/studio/src/plugins/example/example_settings_page.h +++ b/code/studio/src/plugins/example/example_settings_page.h @@ -1,6 +1,8 @@ // Object Viewer Qt - MMORPG Framework +// Copyright (C) 2011 Dzmitry KAMIAHIN (dnk-88) +// +// This source file has been modified by the following contributors: // Copyright (C) 2010 Winch Gate Property Limited -// Copyright (C) 2011 Dzmitry Kamiahin // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/example/qnel_widget.cpp b/code/studio/src/plugins/example/qnel_widget.cpp index d512521f7..d0821eb6b 100644 --- a/code/studio/src/plugins/example/qnel_widget.cpp +++ b/code/studio/src/plugins/example/qnel_widget.cpp @@ -1,6 +1,8 @@ // Object Viewer Qt - MMORPG Framework +// Copyright (C) 2011 Dzmitry KAMIAHIN (dnk-88) +// +// This source file has been modified by the following contributors: // Copyright (C) 2010 Winch Gate Property Limited -// Copyright (C) 2011 Dzmitry Kamiahin // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/example/qnel_widget.h b/code/studio/src/plugins/example/qnel_widget.h index 59bb9ecda..795a0b7a7 100644 --- a/code/studio/src/plugins/example/qnel_widget.h +++ b/code/studio/src/plugins/example/qnel_widget.h @@ -1,6 +1,8 @@ // Object Viewer Qt - MMORPG Framework +// Copyright (C) 2011 Dzmitry KAMIAHIN (dnk-88) +// +// This source file has been modified by the following contributors: // Copyright (C) 2010 Winch Gate Property Limited -// Copyright (C) 2011 Dzmitry Kamiahin // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/example/simple_viewer.cpp b/code/studio/src/plugins/example/simple_viewer.cpp index 6e6ef5d5b..89a5e88c8 100644 --- a/code/studio/src/plugins/example/simple_viewer.cpp +++ b/code/studio/src/plugins/example/simple_viewer.cpp @@ -1,6 +1,8 @@ // Object Viewer Qt - MMORPG Framework +// Copyright (C) 2011 Dzmitry KAMIAHIN (dnk-88) +// +// This source file has been modified by the following contributors: // Copyright (C) 2010 Winch Gate Property Limited -// Copyright (C) 2011 Dzmitry Kamiahin // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/example/simple_viewer.h b/code/studio/src/plugins/example/simple_viewer.h index 793b0745e..d1a2a19e0 100644 --- a/code/studio/src/plugins/example/simple_viewer.h +++ b/code/studio/src/plugins/example/simple_viewer.h @@ -1,6 +1,8 @@ // Object Viewer Qt - MMORPG Framework +// Copyright (C) 2011 Dzmitry KAMIAHIN (dnk-88) +// +// This source file has been modified by the following contributors: // Copyright (C) 2010 Winch Gate Property Limited -// Copyright (C) 2011 Dzmitry Kamiahin // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/georges_editor/actions.cpp b/code/studio/src/plugins/georges_editor/actions.cpp index 08196f79b..54819dc18 100644 --- a/code/studio/src/plugins/georges_editor/actions.cpp +++ b/code/studio/src/plugins/georges_editor/actions.cpp @@ -1,5 +1,9 @@ // Object Viewer Qt - Georges Editor Plugin - MMORPG Framework -// Copyright (C) 2011 Adrian Jaekel +// Copyright (C) 2011 Adrian JAEKEL +// +// This source file has been modified by the following contributors: +// Copyright (C) 2012 Matt RAYKOWSKI (sfb) +// Copyright (C) 2014 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 diff --git a/code/studio/src/plugins/georges_editor/actions.h b/code/studio/src/plugins/georges_editor/actions.h index 861eaef8e..019316e58 100644 --- a/code/studio/src/plugins/georges_editor/actions.h +++ b/code/studio/src/plugins/georges_editor/actions.h @@ -1,5 +1,8 @@ // Object Viewer Qt - Georges Editor Plugin - MMORPG Framework -// Copyright (C) 2011 Adrian Jaekel +// Copyright (C) 2011 Adrian JAEKEL +// +// This source file has been modified by the following contributors: +// Copyright (C) 2012 Matt RAYKOWSKI (sfb) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/georges_editor/browser_ctrl.cpp b/code/studio/src/plugins/georges_editor/browser_ctrl.cpp index ad947edcf..4d93556f4 100644 --- a/code/studio/src/plugins/georges_editor/browser_ctrl.cpp +++ b/code/studio/src/plugins/georges_editor/browser_ctrl.cpp @@ -1,7 +1,9 @@ // Ryzom Core Studio - Georges Editor Plugin // -// Copyright (C) 2014 Laszlo Kis-Adam -// Copyright (C) 2010 Ryzom Core +// Copyright (C) 2014 Laszlo KIS-ADAM (dfighter) +// +// This source file has been modified by the following contributors: +// Copyright (C) 2010-2014 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 diff --git a/code/studio/src/plugins/georges_editor/browser_ctrl.h b/code/studio/src/plugins/georges_editor/browser_ctrl.h index a70b57356..b0e1b6ec0 100644 --- a/code/studio/src/plugins/georges_editor/browser_ctrl.h +++ b/code/studio/src/plugins/georges_editor/browser_ctrl.h @@ -1,7 +1,6 @@ // Ryzom Core Studio - Georges Editor Plugin // -// Copyright (C) 2014 Laszlo Kis-Adam -// Copyright (C) 2010 Ryzom Core +// Copyright (C) 2010-2014 Laszlo KIS-ADAM (dfighter) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/georges_editor/browser_ctrl_pvt.cpp b/code/studio/src/plugins/georges_editor/browser_ctrl_pvt.cpp index dbeb8fecf..3abf3f988 100644 --- a/code/studio/src/plugins/georges_editor/browser_ctrl_pvt.cpp +++ b/code/studio/src/plugins/georges_editor/browser_ctrl_pvt.cpp @@ -1,7 +1,9 @@ // Ryzom Core Studio - Georges Editor Plugin // -// Copyright (C) 2014 Laszlo Kis-Adam -// Copyright (C) 2010 Ryzom Core +// Copyright (C) 2014 Laszlo KIS-ADAM (dfighter) +// +// This source file has been modified by the following contributors: +// Copyright (C) 2010-2014 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 diff --git a/code/studio/src/plugins/georges_editor/browser_ctrl_pvt.h b/code/studio/src/plugins/georges_editor/browser_ctrl_pvt.h index 2f9785411..704e63b0c 100644 --- a/code/studio/src/plugins/georges_editor/browser_ctrl_pvt.h +++ b/code/studio/src/plugins/georges_editor/browser_ctrl_pvt.h @@ -1,7 +1,6 @@ // Ryzom Core Studio - Georges Editor Plugin // -// Copyright (C) 2014 Laszlo Kis-Adam -// Copyright (C) 2010 Ryzom Core +// Copyright (C) 2010-2014 Laszlo KIS-ADAM (dfighter) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/georges_editor/dfn_browser_ctrl.cpp b/code/studio/src/plugins/georges_editor/dfn_browser_ctrl.cpp index c406b549a..ed992f7d3 100644 --- a/code/studio/src/plugins/georges_editor/dfn_browser_ctrl.cpp +++ b/code/studio/src/plugins/georges_editor/dfn_browser_ctrl.cpp @@ -1,7 +1,6 @@ // Ryzom Core Studio - Georges Editor Plugin // -// Copyright (C) 2014 Laszlo Kis-Adam -// Copyright (C) 2010 Ryzom Core +// Copyright (C) 2010-2014 Laszlo KIS-ADAM (dfighter) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/georges_editor/dfn_browser_ctrl.h b/code/studio/src/plugins/georges_editor/dfn_browser_ctrl.h index 71988bcc1..77e7cdec8 100644 --- a/code/studio/src/plugins/georges_editor/dfn_browser_ctrl.h +++ b/code/studio/src/plugins/georges_editor/dfn_browser_ctrl.h @@ -1,7 +1,6 @@ // Ryzom Core Studio - Georges Editor Plugin // -// Copyright (C) 2014 Laszlo Kis-Adam -// Copyright (C) 2010 Ryzom Core +// Copyright (C) 2010-2014 Laszlo KIS-ADAM (dfighter) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/georges_editor/expandable_headerview.cpp b/code/studio/src/plugins/georges_editor/expandable_headerview.cpp index cbe4bc0d7..09ab73e11 100644 --- a/code/studio/src/plugins/georges_editor/expandable_headerview.cpp +++ b/code/studio/src/plugins/georges_editor/expandable_headerview.cpp @@ -1,5 +1,5 @@ // Object Viewer Qt - Georges Editor Plugin - MMORPG Framework -// Copyright (C) 2011 Adrian Jaekel +// Copyright (C) 2011 Adrian JAEKEL // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/georges_editor/expandable_headerview.h b/code/studio/src/plugins/georges_editor/expandable_headerview.h index 4071b4637..de61a91d5 100644 --- a/code/studio/src/plugins/georges_editor/expandable_headerview.h +++ b/code/studio/src/plugins/georges_editor/expandable_headerview.h @@ -1,5 +1,8 @@ // Object Viewer Qt - Georges Editor Plugin - MMORPG Framework -// Copyright (C) 2011 Adrian Jaekel +// Copyright (C) 2011 Adrian JAEKEL +// +// This source file has been modified by the following contributors: +// Copyright (C) 2013 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 diff --git a/code/studio/src/plugins/georges_editor/filepath_property_manager.cpp b/code/studio/src/plugins/georges_editor/filepath_property_manager.cpp index 7d5ab8177..ca33904b5 100644 --- a/code/studio/src/plugins/georges_editor/filepath_property_manager.cpp +++ b/code/studio/src/plugins/georges_editor/filepath_property_manager.cpp @@ -1,7 +1,6 @@ // Ryzom Core Studio - Georges Editor Plugin // -// Copyright (C) 2014 Laszlo Kis-Adam -// Copyright (C) 2010 Ryzom Core +// Copyright (C) 2010-2014 Laszlo KIS-ADAM (dfighter) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/georges_editor/filepath_property_manager.h b/code/studio/src/plugins/georges_editor/filepath_property_manager.h index b365f46cb..88cc9c31c 100644 --- a/code/studio/src/plugins/georges_editor/filepath_property_manager.h +++ b/code/studio/src/plugins/georges_editor/filepath_property_manager.h @@ -1,7 +1,6 @@ // Ryzom Core Studio - Georges Editor Plugin // -// Copyright (C) 2014 Laszlo Kis-Adam -// Copyright (C) 2010 Ryzom Core +// Copyright (C) 2010-2014 Laszlo KIS-ADAM (dfighter) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/georges_editor/formdelegate.cpp b/code/studio/src/plugins/georges_editor/formdelegate.cpp index f2a2ba6c3..1f170a35d 100644 --- a/code/studio/src/plugins/georges_editor/formdelegate.cpp +++ b/code/studio/src/plugins/georges_editor/formdelegate.cpp @@ -1,5 +1,8 @@ // Object Viewer Qt - Georges Editor Plugin - MMORPG Framework -// Copyright (C) 2011 Adrian Jaekel +// Copyright (C) 2011 Adrian JAEKEL +// +// This source file has been modified by the following contributors: +// Copyright (C) 2012 Matt RAYKOWSKI (sfb) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/georges_editor/formdelegate.h b/code/studio/src/plugins/georges_editor/formdelegate.h index 42b10ef3d..3fadd3327 100644 --- a/code/studio/src/plugins/georges_editor/formdelegate.h +++ b/code/studio/src/plugins/georges_editor/formdelegate.h @@ -1,5 +1,8 @@ // Object Viewer Qt - Georges Editor Plugin - MMORPG Framework -// Copyright (C) 2011 Adrian Jaekel +// Copyright (C) 2011 Adrian JAEKEL +// +// This source file has been modified by the following contributors: +// Copyright (C) 2012 Matt RAYKOWSKI (sfb) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/georges_editor/formitem.cpp b/code/studio/src/plugins/georges_editor/formitem.cpp index 939ec4cf4..a1ef3bcfc 100644 --- a/code/studio/src/plugins/georges_editor/formitem.cpp +++ b/code/studio/src/plugins/georges_editor/formitem.cpp @@ -1,5 +1,9 @@ // Object Viewer Qt - Georges Editor Plugin - MMORPG Framework -// Copyright (C) 2011 Adrian Jaekel +// Copyright (C) 2011 Adrian JAEKEL +// +// This source file has been modified by the following contributors: +// Copyright (C) 2012 Matt RAYKOWSKI (sfb) +// Copyright (C) 2014 Laszlo KIS-ADAM (dfighter) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/georges_editor/formitem.h b/code/studio/src/plugins/georges_editor/formitem.h index a0aabfc10..83df0d48a 100644 --- a/code/studio/src/plugins/georges_editor/formitem.h +++ b/code/studio/src/plugins/georges_editor/formitem.h @@ -1,5 +1,9 @@ // Object Viewer Qt - Georges Editor Plugin - MMORPG Framework -// Copyright (C) 2011 Adrian Jaekel +// Copyright (C) 2011 Adrian JAEKEL +// +// This source file has been modified by the following contributors: +// Copyright (C) 2012 Matt RAYKOWSKI (sfb) +// Copyright (C) 2014 Laszlo KIS-ADAM (dfighter) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/georges_editor/georges.cpp b/code/studio/src/plugins/georges_editor/georges.cpp index ce577bfab..ef7027dac 100644 --- a/code/studio/src/plugins/georges_editor/georges.cpp +++ b/code/studio/src/plugins/georges_editor/georges.cpp @@ -1,5 +1,5 @@ // Object Viewer Qt - Georges Editor Plugin - MMORPG Framework -// Copyright (C) 2011 Adrian Jaekel +// Copyright (C) 2011 Adrian JAEKEL // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/georges_editor/georges.h b/code/studio/src/plugins/georges_editor/georges.h index b528b1ca2..09adb4247 100644 --- a/code/studio/src/plugins/georges_editor/georges.h +++ b/code/studio/src/plugins/georges_editor/georges.h @@ -1,5 +1,5 @@ // Object Viewer Qt - Georges Editor Plugin - MMORPG Framework -// Copyright (C) 2011 Adrian Jaekel +// Copyright (C) 2011 Adrian JAEKEL // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/georges_editor/georges_dfn_dialog.cpp b/code/studio/src/plugins/georges_editor/georges_dfn_dialog.cpp index c7244273e..7b0b18056 100644 --- a/code/studio/src/plugins/georges_editor/georges_dfn_dialog.cpp +++ b/code/studio/src/plugins/georges_editor/georges_dfn_dialog.cpp @@ -1,7 +1,6 @@ // Ryzom Core Studio - Georges Editor Plugin // -// Copyright (C) 2014 Laszlo Kis-Adam -// Copyright (C) 2010 Ryzom Core +// Copyright (C) 2010-2014 Laszlo KIS-ADAM (dfighter) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/georges_editor/georges_dfn_dialog.h b/code/studio/src/plugins/georges_editor/georges_dfn_dialog.h index edb67144c..806477ddf 100644 --- a/code/studio/src/plugins/georges_editor/georges_dfn_dialog.h +++ b/code/studio/src/plugins/georges_editor/georges_dfn_dialog.h @@ -1,7 +1,6 @@ // Ryzom Core Studio - Georges Editor Plugin // -// Copyright (C) 2014 Laszlo Kis-Adam -// Copyright (C) 2010 Ryzom Core +// Copyright (C) 2010-2014 Laszlo KIS-ADAM (dfighter) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/georges_editor/georges_dirtree_dialog.cpp b/code/studio/src/plugins/georges_editor/georges_dirtree_dialog.cpp index c1853233c..9599aa373 100644 --- a/code/studio/src/plugins/georges_editor/georges_dirtree_dialog.cpp +++ b/code/studio/src/plugins/georges_editor/georges_dirtree_dialog.cpp @@ -1,5 +1,9 @@ // Object Viewer Qt - Georges Editor Plugin - MMORPG Framework -// Copyright (C) 2011 Adrian Jaekel +// Copyright (C) 2011 Adrian JAEKEL +// +// This source file has been modified by the following contributors: +// Copyright (C) 2012 Matt RAYKOWSKI (sfb) +// Copyright (C) 2014 Laszlo KIS-ADAM (dfighter) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/georges_editor/georges_dirtree_dialog.h b/code/studio/src/plugins/georges_editor/georges_dirtree_dialog.h index 0a8fc682b..106f69a01 100644 --- a/code/studio/src/plugins/georges_editor/georges_dirtree_dialog.h +++ b/code/studio/src/plugins/georges_editor/georges_dirtree_dialog.h @@ -1,5 +1,8 @@ // Object Viewer Qt - Georges Editor Plugin - MMORPG Framework -// Copyright (C) 2011 Adrian Jaekel +// Copyright (C) 2011 Adrian JAEKEL +// +// This source file has been modified by the following contributors: +// Copyright (C) 2014 Laszlo KIS-ADAM (dfighter) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/georges_editor/georges_dock_widget.cpp b/code/studio/src/plugins/georges_editor/georges_dock_widget.cpp index e031fbc8f..f301db0f8 100644 --- a/code/studio/src/plugins/georges_editor/georges_dock_widget.cpp +++ b/code/studio/src/plugins/georges_editor/georges_dock_widget.cpp @@ -1,7 +1,6 @@ // Ryzom Core Studio - Georges Editor Plugin // -// Copyright (C) 2014 Laszlo Kis-Adam -// Copyright (C) 2010 Ryzom Core +// Copyright (C) 2010-2014 Laszlo KIS-ADAM (dfighter) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/georges_editor/georges_dock_widget.h b/code/studio/src/plugins/georges_editor/georges_dock_widget.h index d7f80dff1..8a1773b99 100644 --- a/code/studio/src/plugins/georges_editor/georges_dock_widget.h +++ b/code/studio/src/plugins/georges_editor/georges_dock_widget.h @@ -1,7 +1,6 @@ // Ryzom Core Studio - Georges Editor Plugin // -// Copyright (C) 2014 Laszlo Kis-Adam -// Copyright (C) 2010 Ryzom Core +// Copyright (C) 2010-2014 Laszlo KIS-ADAM (dfighter) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/georges_editor/georges_editor_constants.h b/code/studio/src/plugins/georges_editor/georges_editor_constants.h index cccede9fc..1734c2294 100644 --- a/code/studio/src/plugins/georges_editor/georges_editor_constants.h +++ b/code/studio/src/plugins/georges_editor/georges_editor_constants.h @@ -1,5 +1,8 @@ // Object Viewer Qt - Georges Editor Plugin - MMORPG Framework -// Copyright (C) 2011 Adrian Jaekel +// Copyright (C) 2011 Adrian JAEKEL +// +// This source file has been modified by the following contributors: +// Copyright (C) 2012 Matt RAYKOWSKI (sfb) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/georges_editor/georges_editor_form.cpp b/code/studio/src/plugins/georges_editor/georges_editor_form.cpp index 4f4b814ec..231a0efc3 100644 --- a/code/studio/src/plugins/georges_editor/georges_editor_form.cpp +++ b/code/studio/src/plugins/georges_editor/georges_editor_form.cpp @@ -1,5 +1,9 @@ // Object Viewer Qt - Georges Editor Plugin - MMORPG Framework -// Copyright (C) 2011 Adrian Jaekel +// Copyright (C) 2011 Adrian JAEKEL +// +// This source file has been modified by the following contributors: +// Copyright (C) 2012 Matt RAYKOWSKI (sfb) +// Copyright (C) 2014 Laszlo KIS-ADAM (dfighter) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/georges_editor/georges_editor_form.h b/code/studio/src/plugins/georges_editor/georges_editor_form.h index 031d6e0fc..a1d33e65e 100644 --- a/code/studio/src/plugins/georges_editor/georges_editor_form.h +++ b/code/studio/src/plugins/georges_editor/georges_editor_form.h @@ -1,5 +1,9 @@ // Object Viewer Qt - Georges Editor Plugin - MMORPG Framework -// Copyright (C) 2011 Adrian Jaekel +// Copyright (C) 2011 Adrian JAEKEL +// +// This source file has been modified by the following contributors: +// Copyright (C) 2012 Matt RAYKOWSKI (sfb) +// Copyright (C) 2014 Laszlo KIS-ADAM (dfighter) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/georges_editor/georges_editor_plugin.cpp b/code/studio/src/plugins/georges_editor/georges_editor_plugin.cpp index e0b29af2f..8fa764a5a 100644 --- a/code/studio/src/plugins/georges_editor/georges_editor_plugin.cpp +++ b/code/studio/src/plugins/georges_editor/georges_editor_plugin.cpp @@ -1,5 +1,9 @@ // Object Viewer Qt - Georges Editor Plugin - MMORPG Framework -// Copyright (C) 2011 Adrian Jaekel +// Copyright (C) 2011 Adrian JAEKEL +// +// This source file has been modified by the following contributors: +// Copyright (C) 2012 Matt RAYKOWSKI (sfb) +// Copyright (C) 2014 Laszlo KIS-ADAM (dfighter) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/georges_editor/georges_editor_plugin.h b/code/studio/src/plugins/georges_editor/georges_editor_plugin.h index 931e83ddf..960cb943b 100644 --- a/code/studio/src/plugins/georges_editor/georges_editor_plugin.h +++ b/code/studio/src/plugins/georges_editor/georges_editor_plugin.h @@ -1,5 +1,9 @@ // Object Viewer Qt - Georges Editor Plugin - MMORPG Framework -// Copyright (C) 2011 Adrian Jaekel +// Copyright (C) 2011 Adrian JAEKEL +// +// This source file has been modified by the following contributors: +// Copyright (C) 2012 Matt RAYKOWSKI (sfb) +// Copyright (C) 2014 Laszlo KIS-ADAM (dfighter) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/georges_editor/georges_filesystem_model.cpp b/code/studio/src/plugins/georges_editor/georges_filesystem_model.cpp index 56a5856ae..1da4d0cfb 100644 --- a/code/studio/src/plugins/georges_editor/georges_filesystem_model.cpp +++ b/code/studio/src/plugins/georges_editor/georges_filesystem_model.cpp @@ -1,5 +1,5 @@ // Object Viewer Qt - Georges Editor Plugin - MMORPG Framework -// Copyright (C) 2011 Adrian Jaekel +// Copyright (C) 2011 Adrian JAEKEL // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/georges_editor/georges_filesystem_model.h b/code/studio/src/plugins/georges_editor/georges_filesystem_model.h index fcd157c25..7d1e16cb1 100644 --- a/code/studio/src/plugins/georges_editor/georges_filesystem_model.h +++ b/code/studio/src/plugins/georges_editor/georges_filesystem_model.h @@ -1,5 +1,5 @@ // Object Viewer Qt - Georges Editor Plugin - MMORPG Framework -// Copyright (C) 2011 Adrian Jaekel +// Copyright (C) 2011 Adrian JAEKEL // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/georges_editor/georges_treeview_dialog.cpp b/code/studio/src/plugins/georges_editor/georges_treeview_dialog.cpp index ab5f03924..48b444945 100644 --- a/code/studio/src/plugins/georges_editor/georges_treeview_dialog.cpp +++ b/code/studio/src/plugins/georges_editor/georges_treeview_dialog.cpp @@ -1,5 +1,10 @@ // Object Viewer Qt - Georges Editor Plugin - MMORPG Framework -// Copyright (C) 2011 Adrian Jaekel +// Copyright (C) 2011 Adrian JAEKEL +// +// This source file has been modified by the following contributors: +// Copyright (C) 2012 Matt RAYKOWSKI (sfb) +// Copyright (C) 2014 Jan BOON (Kaetemi) +// Copyright (C) 2014 Laszlo KIS-ADAM (dfighter) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/georges_editor/georges_treeview_dialog.h b/code/studio/src/plugins/georges_editor/georges_treeview_dialog.h index 37ae55c20..eea41c387 100644 --- a/code/studio/src/plugins/georges_editor/georges_treeview_dialog.h +++ b/code/studio/src/plugins/georges_editor/georges_treeview_dialog.h @@ -1,5 +1,9 @@ // Object Viewer Qt - Georges Editor Plugin - MMORPG Framework -// Copyright (C) 2011 Adrian Jaekel +// Copyright (C) 2011 Adrian JAEKEL +// +// This source file has been modified by the following contributors: +// Copyright (C) 2012 Matt RAYKOWSKI (sfb) +// Copyright (C) 2014 Laszlo KIS-ADAM (dfighter) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/georges_editor/georges_typ_dialog.cpp b/code/studio/src/plugins/georges_editor/georges_typ_dialog.cpp index ab4cc0472..666793c25 100644 --- a/code/studio/src/plugins/georges_editor/georges_typ_dialog.cpp +++ b/code/studio/src/plugins/georges_editor/georges_typ_dialog.cpp @@ -1,7 +1,6 @@ // Ryzom Core Studio - Georges Editor Plugin // -// Copyright (C) 2014 Laszlo Kis-Adam -// Copyright (C) 2010 Ryzom Core +// Copyright (C) 2010-2014 Laszlo KIS-ADAM (dfighter) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/georges_editor/georges_typ_dialog.h b/code/studio/src/plugins/georges_editor/georges_typ_dialog.h index 5a6c09e61..8c27e4e8a 100644 --- a/code/studio/src/plugins/georges_editor/georges_typ_dialog.h +++ b/code/studio/src/plugins/georges_editor/georges_typ_dialog.h @@ -1,7 +1,6 @@ // Ryzom Core Studio - Georges Editor Plugin // -// Copyright (C) 2014 Laszlo Kis-Adam -// Copyright (C) 2010 Ryzom Core +// Copyright (C) 2010-2014 Laszlo KIS-ADAM (dfighter) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/georges_editor/georgesform_model.cpp b/code/studio/src/plugins/georges_editor/georgesform_model.cpp index 2579a09f5..ac5918809 100644 --- a/code/studio/src/plugins/georges_editor/georgesform_model.cpp +++ b/code/studio/src/plugins/georges_editor/georgesform_model.cpp @@ -1,5 +1,9 @@ // Object Viewer Qt - Georges Editor Plugin - MMORPG Framework -// Copyright (C) 2011 Adrian Jaekel +// Copyright (C) 2011 Adrian JAEKEL +// +// This source file has been modified by the following contributors: +// Copyright (C) 2012 Matt RAYKOWSKI (sfb) +// Copyright (C) 2014 Laszlo KIS-ADAM (dfighter) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/georges_editor/georgesform_model.h b/code/studio/src/plugins/georges_editor/georgesform_model.h index 7d6bac3f3..42bf9fad8 100644 --- a/code/studio/src/plugins/georges_editor/georgesform_model.h +++ b/code/studio/src/plugins/georges_editor/georgesform_model.h @@ -1,5 +1,10 @@ // Object Viewer Qt - Georges Editor Plugin - MMORPG Framework -// Copyright (C) 2011 Adrian Jaekel +// Copyright (C) 2011 Adrian JAEKEL +// +// This source file has been modified by the following contributors: +// Copyright (C) 2012 Matt RAYKOWSKI (sfb) +// Copyright (C) 2014 Jan BOON (Kaetemi) +// Copyright (C) 2014 Laszlo KIS-ADAM (dfighter) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/georges_editor/georgesform_proxy_model.cpp b/code/studio/src/plugins/georges_editor/georgesform_proxy_model.cpp index 81179f61c..a3bbd5244 100644 --- a/code/studio/src/plugins/georges_editor/georgesform_proxy_model.cpp +++ b/code/studio/src/plugins/georges_editor/georgesform_proxy_model.cpp @@ -1,5 +1,8 @@ // Object Viewer Qt - Georges Editor Plugin - MMORPG Framework -// Copyright (C) 2011 Adrian Jaekel +// Copyright (C) 2011 Adrian JAEKEL +// +// This source file has been modified by the following contributors: +// Copyright (C) 2012 Matt RAYKOWSKI (sfb) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/georges_editor/georgesform_proxy_model.h b/code/studio/src/plugins/georges_editor/georgesform_proxy_model.h index f4c968f80..b424c59eb 100644 --- a/code/studio/src/plugins/georges_editor/georgesform_proxy_model.h +++ b/code/studio/src/plugins/georges_editor/georgesform_proxy_model.h @@ -1,5 +1,8 @@ // Object Viewer Qt - Georges Editor Plugin - MMORPG Framework -// Copyright (C) 2011 Adrian Jaekel +// Copyright (C) 2011 Adrian JAEKEL +// +// This source file has been modified by the following contributors: +// Copyright (C) 2012 Matt RAYKOWSKI (sfb) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/georges_editor/stdpch.cpp b/code/studio/src/plugins/georges_editor/stdpch.cpp index 85c10995f..7475ecfb4 100644 --- a/code/studio/src/plugins/georges_editor/stdpch.cpp +++ b/code/studio/src/plugins/georges_editor/stdpch.cpp @@ -1,5 +1,5 @@ // Object Viewer Qt - Georges Editor Plugin - MMORPG Framework -// Copyright (C) 2011 Adrian Jaekel +// Copyright (C) 2011 Adrian JAEKEL // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/georges_editor/stdpch.h b/code/studio/src/plugins/georges_editor/stdpch.h index e5279839b..2c2a21a60 100644 --- a/code/studio/src/plugins/georges_editor/stdpch.h +++ b/code/studio/src/plugins/georges_editor/stdpch.h @@ -1,5 +1,5 @@ // Object Viewer Qt - Georges Editor Plugin - MMORPG Framework -// Copyright (C) 2011 Adrian Jaekel +// Copyright (C) 2011 Adrian JAEKEL // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/georges_editor/typ_browser_ctrl.cpp b/code/studio/src/plugins/georges_editor/typ_browser_ctrl.cpp index 5c234100d..906135dae 100644 --- a/code/studio/src/plugins/georges_editor/typ_browser_ctrl.cpp +++ b/code/studio/src/plugins/georges_editor/typ_browser_ctrl.cpp @@ -1,7 +1,6 @@ // Ryzom Core Studio - Georges Editor Plugin // -// Copyright (C) 2014 Laszlo Kis-Adam -// Copyright (C) 2010 Ryzom Core +// Copyright (C) 2010-2014 Laszlo KIS-ADAM (dfighter) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/georges_editor/typ_browser_ctrl.h b/code/studio/src/plugins/georges_editor/typ_browser_ctrl.h index 58718f5aa..775ec517b 100644 --- a/code/studio/src/plugins/georges_editor/typ_browser_ctrl.h +++ b/code/studio/src/plugins/georges_editor/typ_browser_ctrl.h @@ -1,7 +1,6 @@ // Ryzom Core Studio - Georges Editor Plugin // -// Copyright (C) 2014 Laszlo Kis-Adam -// Copyright (C) 2010 Ryzom Core +// Copyright (C) 2010-2014 Laszlo KIS-ADAM (dfighter) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/gui_editor/action_editor.cpp b/code/studio/src/plugins/gui_editor/action_editor.cpp index c765398ea..97d7fece8 100644 --- a/code/studio/src/plugins/gui_editor/action_editor.cpp +++ b/code/studio/src/plugins/gui_editor/action_editor.cpp @@ -1,6 +1,9 @@ // Object Viewer Qt GUI Editor plugin // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/studio/src/plugins/gui_editor/action_editor.h b/code/studio/src/plugins/gui_editor/action_editor.h index 4c6790916..274be800d 100644 --- a/code/studio/src/plugins/gui_editor/action_editor.h +++ b/code/studio/src/plugins/gui_editor/action_editor.h @@ -1,6 +1,9 @@ // Object Viewer Qt GUI Editor plugin // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/studio/src/plugins/gui_editor/action_property_manager.cpp b/code/studio/src/plugins/gui_editor/action_property_manager.cpp index 9e7690a56..31e237007 100644 --- a/code/studio/src/plugins/gui_editor/action_property_manager.cpp +++ b/code/studio/src/plugins/gui_editor/action_property_manager.cpp @@ -1,6 +1,9 @@ // Ryzom Core Studio GUI Editor plugin // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2014 Laszlo KIS-ADAM (dfighter) +// // 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/studio/src/plugins/gui_editor/action_property_manager.h b/code/studio/src/plugins/gui_editor/action_property_manager.h index 06cd714d7..9bc187dd9 100644 --- a/code/studio/src/plugins/gui_editor/action_property_manager.h +++ b/code/studio/src/plugins/gui_editor/action_property_manager.h @@ -1,6 +1,9 @@ // Ryzom Core Studio GUI Editor plugin // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2014 Laszlo KIS-ADAM (dfighter) +// // 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/studio/src/plugins/gui_editor/editor_message_processor.cpp b/code/studio/src/plugins/gui_editor/editor_message_processor.cpp index ef99c87fc..b9797c22f 100644 --- a/code/studio/src/plugins/gui_editor/editor_message_processor.cpp +++ b/code/studio/src/plugins/gui_editor/editor_message_processor.cpp @@ -1,6 +1,9 @@ // Object Viewer Qt GUI Editor plugin // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2013-2014 Laszlo KIS-ADAM (dfighter) +// // 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/studio/src/plugins/gui_editor/editor_message_processor.h b/code/studio/src/plugins/gui_editor/editor_message_processor.h index ee55fcda7..12a61cfc8 100644 --- a/code/studio/src/plugins/gui_editor/editor_message_processor.h +++ b/code/studio/src/plugins/gui_editor/editor_message_processor.h @@ -1,6 +1,10 @@ // Object Viewer Qt GUI Editor plugin // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2014 Jan BOON (Kaetemi) +// Copyright (C) 2014 Laszlo KIS-ADAM (dfighter) +// // 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/studio/src/plugins/gui_editor/editor_selection_watcher.cpp b/code/studio/src/plugins/gui_editor/editor_selection_watcher.cpp index 7647c8abb..02cec80f7 100644 --- a/code/studio/src/plugins/gui_editor/editor_selection_watcher.cpp +++ b/code/studio/src/plugins/gui_editor/editor_selection_watcher.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) 2013-2014 Laszlo KIS-ADAM (dfighter) +// // 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/studio/src/plugins/gui_editor/editor_selection_watcher.h b/code/studio/src/plugins/gui_editor/editor_selection_watcher.h index 2eab68310..fc9c45f3b 100644 --- a/code/studio/src/plugins/gui_editor/editor_selection_watcher.h +++ b/code/studio/src/plugins/gui_editor/editor_selection_watcher.h @@ -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) 2013-2014 Laszlo KIS-ADAM (dfighter) +// // 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/studio/src/plugins/gui_editor/expr_link_dlg.cpp b/code/studio/src/plugins/gui_editor/expr_link_dlg.cpp index e8d01af85..b3f18a3c2 100644 --- a/code/studio/src/plugins/gui_editor/expr_link_dlg.cpp +++ b/code/studio/src/plugins/gui_editor/expr_link_dlg.cpp @@ -1,7 +1,6 @@ // Ryzom Core Studio - GUI Editor Plugin // -// Copyright (C) 2014 Laszlo Kis-Adam -// Copyright (C) 2010 Ryzom Core +// Copyright (C) 2010-2014 Laszlo KIS-ADAM (dfighter) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/gui_editor/expr_link_dlg.h b/code/studio/src/plugins/gui_editor/expr_link_dlg.h index 3f3ba97c0..a4c5f4941 100644 --- a/code/studio/src/plugins/gui_editor/expr_link_dlg.h +++ b/code/studio/src/plugins/gui_editor/expr_link_dlg.h @@ -1,7 +1,6 @@ // Ryzom Core Studio - GUI Editor Plugin // -// Copyright (C) 2014 Laszlo Kis-Adam -// Copyright (C) 2010 Ryzom Core +// Copyright (C) 2010-2014 Laszlo KIS-ADAM (dfighter) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/gui_editor/expr_slot_info.h b/code/studio/src/plugins/gui_editor/expr_slot_info.h index 470edf68d..51f85cd59 100644 --- a/code/studio/src/plugins/gui_editor/expr_slot_info.h +++ b/code/studio/src/plugins/gui_editor/expr_slot_info.h @@ -1,7 +1,6 @@ // Ryzom Core Studio - GUI Editor Plugin // -// Copyright (C) 2014 Laszlo Kis-Adam -// Copyright (C) 2010 Ryzom Core +// Copyright (C) 2010-2014 Laszlo KIS-ADAM (dfighter) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/gui_editor/expression_editor.cpp b/code/studio/src/plugins/gui_editor/expression_editor.cpp index 858c63c9c..75927f697 100644 --- a/code/studio/src/plugins/gui_editor/expression_editor.cpp +++ b/code/studio/src/plugins/gui_editor/expression_editor.cpp @@ -1,7 +1,6 @@ // Ryzom Core Studio - GUI Editor Plugin // -// Copyright (C) 2014 Laszlo Kis-Adam -// Copyright (C) 2010 Ryzom Core +// Copyright (C) 2010-2014 Laszlo KIS-ADAM (dfighter) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/gui_editor/expression_editor.h b/code/studio/src/plugins/gui_editor/expression_editor.h index 92cc959bd..87c3af617 100644 --- a/code/studio/src/plugins/gui_editor/expression_editor.h +++ b/code/studio/src/plugins/gui_editor/expression_editor.h @@ -1,7 +1,6 @@ // Ryzom Core Studio - GUI Editor Plugin // -// Copyright (C) 2014 Laszlo Kis-Adam -// Copyright (C) 2010 Ryzom Core +// Copyright (C) 2010-2014 Laszlo KIS-ADAM (dfighter) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/gui_editor/expression_info.h b/code/studio/src/plugins/gui_editor/expression_info.h index 86218b6af..1fea5c035 100644 --- a/code/studio/src/plugins/gui_editor/expression_info.h +++ b/code/studio/src/plugins/gui_editor/expression_info.h @@ -1,7 +1,6 @@ // Ryzom Core Studio - GUI Editor Plugin // -// Copyright (C) 2014 Laszlo Kis-Adam -// Copyright (C) 2010 Ryzom Core +// Copyright (C) 2010-2014 Laszlo KIS-ADAM (dfighter) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/gui_editor/expression_link.cpp b/code/studio/src/plugins/gui_editor/expression_link.cpp index 54c7734b0..77aeb15f6 100644 --- a/code/studio/src/plugins/gui_editor/expression_link.cpp +++ b/code/studio/src/plugins/gui_editor/expression_link.cpp @@ -1,7 +1,6 @@ // Ryzom Core Studio - GUI Editor Plugin // -// Copyright (C) 2014 Laszlo Kis-Adam -// Copyright (C) 2010 Ryzom Core +// Copyright (C) 2010-2014 Laszlo KIS-ADAM (dfighter) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/gui_editor/expression_link.h b/code/studio/src/plugins/gui_editor/expression_link.h index a0e699451..040fc359e 100644 --- a/code/studio/src/plugins/gui_editor/expression_link.h +++ b/code/studio/src/plugins/gui_editor/expression_link.h @@ -1,7 +1,6 @@ // Ryzom Core Studio - GUI Editor Plugin // -// Copyright (C) 2014 Laszlo Kis-Adam -// Copyright (C) 2010 Ryzom Core +// Copyright (C) 2010-2014 Laszlo KIS-ADAM (dfighter) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/gui_editor/expression_loader.cpp b/code/studio/src/plugins/gui_editor/expression_loader.cpp index 07db432e0..057c6c774 100644 --- a/code/studio/src/plugins/gui_editor/expression_loader.cpp +++ b/code/studio/src/plugins/gui_editor/expression_loader.cpp @@ -1,7 +1,6 @@ // Ryzom Core Studio - GUI Editor Plugin // -// Copyright (C) 2014 Laszlo Kis-Adam -// Copyright (C) 2010 Ryzom Core +// Copyright (C) 2010-2014 Laszlo KIS-ADAM (dfighter) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/gui_editor/expression_loader.h b/code/studio/src/plugins/gui_editor/expression_loader.h index f315fcdcd..b1a0727cc 100644 --- a/code/studio/src/plugins/gui_editor/expression_loader.h +++ b/code/studio/src/plugins/gui_editor/expression_loader.h @@ -1,7 +1,6 @@ // Ryzom Core Studio - GUI Editor Plugin // -// Copyright (C) 2014 Laszlo Kis-Adam -// Copyright (C) 2010 Ryzom Core +// Copyright (C) 2010-2014 Laszlo KIS-ADAM (dfighter) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/gui_editor/expression_node.cpp b/code/studio/src/plugins/gui_editor/expression_node.cpp index 80ef571e2..6beb97327 100644 --- a/code/studio/src/plugins/gui_editor/expression_node.cpp +++ b/code/studio/src/plugins/gui_editor/expression_node.cpp @@ -1,7 +1,6 @@ // Ryzom Core Studio - GUI Editor Plugin // -// Copyright (C) 2014 Laszlo Kis-Adam -// Copyright (C) 2010 Ryzom Core +// Copyright (C) 2010-2014 Laszlo KIS-ADAM (dfighter) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/gui_editor/expression_node.h b/code/studio/src/plugins/gui_editor/expression_node.h index 1e0290344..b1565a277 100644 --- a/code/studio/src/plugins/gui_editor/expression_node.h +++ b/code/studio/src/plugins/gui_editor/expression_node.h @@ -1,7 +1,6 @@ // Ryzom Core Studio - GUI Editor Plugin // -// Copyright (C) 2014 Laszlo Kis-Adam -// Copyright (C) 2010 Ryzom Core +// Copyright (C) 2010-2014 Laszlo KIS-ADAM (dfighter) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/gui_editor/expression_store.cpp b/code/studio/src/plugins/gui_editor/expression_store.cpp index 0016374d3..9062133f7 100644 --- a/code/studio/src/plugins/gui_editor/expression_store.cpp +++ b/code/studio/src/plugins/gui_editor/expression_store.cpp @@ -1,7 +1,6 @@ // Ryzom Core Studio - GUI Editor Plugin // -// Copyright (C) 2014 Laszlo Kis-Adam -// Copyright (C) 2010 Ryzom Core +// Copyright (C) 2010-2015 Laszlo KIS-ADAM (dfighter) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/gui_editor/expression_store.h b/code/studio/src/plugins/gui_editor/expression_store.h index 9c29fa0f6..be3af69e6 100644 --- a/code/studio/src/plugins/gui_editor/expression_store.h +++ b/code/studio/src/plugins/gui_editor/expression_store.h @@ -1,7 +1,6 @@ // Ryzom Core Studio - GUI Editor Plugin // -// Copyright (C) 2014 Laszlo Kis-Adam -// Copyright (C) 2010 Ryzom Core +// Copyright (C) 2010-2014 Laszlo KIS-ADAM (dfighter) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/gui_editor/gui_editor_constants.h b/code/studio/src/plugins/gui_editor/gui_editor_constants.h index 2c50d9453..f8f7b4311 100644 --- a/code/studio/src/plugins/gui_editor/gui_editor_constants.h +++ b/code/studio/src/plugins/gui_editor/gui_editor_constants.h @@ -1,6 +1,9 @@ // Object Viewer Qt GUI Editor plugin // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2012 Laszlo KIS-ADAM (dfighter) +// // 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/studio/src/plugins/gui_editor/gui_editor_context.cpp b/code/studio/src/plugins/gui_editor/gui_editor_context.cpp index 169a6d859..b07fa51cd 100644 --- a/code/studio/src/plugins/gui_editor/gui_editor_context.cpp +++ b/code/studio/src/plugins/gui_editor/gui_editor_context.cpp @@ -1,6 +1,9 @@ // Object Viewer Qt GUI Editor plugin // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/studio/src/plugins/gui_editor/gui_editor_context.h b/code/studio/src/plugins/gui_editor/gui_editor_context.h index df6973ae1..c987afe7a 100644 --- a/code/studio/src/plugins/gui_editor/gui_editor_context.h +++ b/code/studio/src/plugins/gui_editor/gui_editor_context.h @@ -1,6 +1,9 @@ // Object Viewer Qt GUI Editor plugin // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/studio/src/plugins/gui_editor/gui_editor_core_listener.cpp b/code/studio/src/plugins/gui_editor/gui_editor_core_listener.cpp index 3784de660..623accabd 100644 --- a/code/studio/src/plugins/gui_editor/gui_editor_core_listener.cpp +++ b/code/studio/src/plugins/gui_editor/gui_editor_core_listener.cpp @@ -1,6 +1,9 @@ // Object Viewer Qt GUI Editor plugin // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/studio/src/plugins/gui_editor/gui_editor_core_listener.h b/code/studio/src/plugins/gui_editor/gui_editor_core_listener.h index c8f5226c2..a3a80297b 100644 --- a/code/studio/src/plugins/gui_editor/gui_editor_core_listener.h +++ b/code/studio/src/plugins/gui_editor/gui_editor_core_listener.h @@ -1,6 +1,9 @@ // Object Viewer Qt GUI Editor plugin // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/studio/src/plugins/gui_editor/gui_editor_global.h b/code/studio/src/plugins/gui_editor/gui_editor_global.h index 82ca563a6..2b71a1b31 100644 --- a/code/studio/src/plugins/gui_editor/gui_editor_global.h +++ b/code/studio/src/plugins/gui_editor/gui_editor_global.h @@ -1,6 +1,9 @@ // Object Viewer Qt GUI Editor plugin // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2012 Laszlo KIS-ADAM (dfighter) +// // 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/studio/src/plugins/gui_editor/gui_editor_plugin.cpp b/code/studio/src/plugins/gui_editor/gui_editor_plugin.cpp index d5f2403f1..a75190fa3 100644 --- a/code/studio/src/plugins/gui_editor/gui_editor_plugin.cpp +++ b/code/studio/src/plugins/gui_editor/gui_editor_plugin.cpp @@ -1,6 +1,9 @@ // Object Viewer Qt GUI Editor plugin // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2012-2014 Laszlo KIS-ADAM (dfighter) +// // 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/studio/src/plugins/gui_editor/gui_editor_plugin.h b/code/studio/src/plugins/gui_editor/gui_editor_plugin.h index 3b9fac2e7..30d4f3f45 100644 --- a/code/studio/src/plugins/gui_editor/gui_editor_plugin.h +++ b/code/studio/src/plugins/gui_editor/gui_editor_plugin.h @@ -1,6 +1,9 @@ // Object Viewer Qt GUI Editor plugin // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2012 Laszlo KIS-ADAM (dfighter) +// // 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/studio/src/plugins/gui_editor/gui_editor_window.cpp b/code/studio/src/plugins/gui_editor/gui_editor_window.cpp index 002002abd..74ff0791a 100644 --- a/code/studio/src/plugins/gui_editor/gui_editor_window.cpp +++ b/code/studio/src/plugins/gui_editor/gui_editor_window.cpp @@ -1,6 +1,9 @@ // Object Viewer Qt GUI Editor plugin // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2013-2014 Laszlo KIS-ADAM (dfighter) +// // 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/studio/src/plugins/gui_editor/gui_editor_window.h b/code/studio/src/plugins/gui_editor/gui_editor_window.h index 4a0a919a4..57ac32020 100644 --- a/code/studio/src/plugins/gui_editor/gui_editor_window.h +++ b/code/studio/src/plugins/gui_editor/gui_editor_window.h @@ -1,6 +1,9 @@ // Object Viewer Qt GUI Editor plugin // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2012-2014 Laszlo KIS-ADAM (dfighter) +// // 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/studio/src/plugins/gui_editor/link_editor.cpp b/code/studio/src/plugins/gui_editor/link_editor.cpp index 3cb49f37a..afe600694 100644 --- a/code/studio/src/plugins/gui_editor/link_editor.cpp +++ b/code/studio/src/plugins/gui_editor/link_editor.cpp @@ -1,6 +1,9 @@ // Object Viewer Qt GUI Editor plugin // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2013-2014 Laszlo KIS-ADAM (dfighter) +// // 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/studio/src/plugins/gui_editor/link_editor.h b/code/studio/src/plugins/gui_editor/link_editor.h index f5617982e..f33328d4d 100644 --- a/code/studio/src/plugins/gui_editor/link_editor.h +++ b/code/studio/src/plugins/gui_editor/link_editor.h @@ -1,6 +1,9 @@ // Object Viewer Qt GUI Editor plugin // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2013-2014 Laszlo KIS-ADAM (dfighter) +// // 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/studio/src/plugins/gui_editor/link_list.cpp b/code/studio/src/plugins/gui_editor/link_list.cpp index 533472da4..9d9af182f 100644 --- a/code/studio/src/plugins/gui_editor/link_list.cpp +++ b/code/studio/src/plugins/gui_editor/link_list.cpp @@ -1,6 +1,9 @@ // Object Viewer Qt GUI Editor plugin // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/studio/src/plugins/gui_editor/link_list.h b/code/studio/src/plugins/gui_editor/link_list.h index 233c3f848..94ae28db1 100644 --- a/code/studio/src/plugins/gui_editor/link_list.h +++ b/code/studio/src/plugins/gui_editor/link_list.h @@ -1,6 +1,9 @@ // Object Viewer Qt GUI Editor plugin // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/studio/src/plugins/gui_editor/nelgui_ctrl.cpp b/code/studio/src/plugins/gui_editor/nelgui_ctrl.cpp index 4852b227f..1f9091ae4 100644 --- a/code/studio/src/plugins/gui_editor/nelgui_ctrl.cpp +++ b/code/studio/src/plugins/gui_editor/nelgui_ctrl.cpp @@ -1,6 +1,9 @@ // Object Viewer Qt GUI Editor plugin // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2013-2014 Laszlo KIS-ADAM (dfighter) +// // 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/studio/src/plugins/gui_editor/nelgui_ctrl.h b/code/studio/src/plugins/gui_editor/nelgui_ctrl.h index d54c78c7a..016dc5049 100644 --- a/code/studio/src/plugins/gui_editor/nelgui_ctrl.h +++ b/code/studio/src/plugins/gui_editor/nelgui_ctrl.h @@ -1,6 +1,9 @@ // Object Viewer Qt GUI Editor plugin // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2013-2014 Laszlo KIS-ADAM (dfighter) +// // 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/studio/src/plugins/gui_editor/new_gui_dlg.cpp b/code/studio/src/plugins/gui_editor/new_gui_dlg.cpp index 43faabf79..ecd49e5b0 100644 --- a/code/studio/src/plugins/gui_editor/new_gui_dlg.cpp +++ b/code/studio/src/plugins/gui_editor/new_gui_dlg.cpp @@ -1,7 +1,6 @@ // Ryzom Core Studio - GUI Editor Plugin // -// Copyright (C) 2014 Laszlo Kis-Adam -// Copyright (C) 2010 Ryzom Core +// Copyright (C) 2010-2014 Laszlo KIS-ADAM (dfighter) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/gui_editor/new_gui_dlg.h b/code/studio/src/plugins/gui_editor/new_gui_dlg.h index 0d878461c..9caa7b55f 100644 --- a/code/studio/src/plugins/gui_editor/new_gui_dlg.h +++ b/code/studio/src/plugins/gui_editor/new_gui_dlg.h @@ -1,7 +1,6 @@ // Ryzom Core Studio - GUI Editor Plugin // -// Copyright (C) 2014 Laszlo Kis-Adam -// Copyright (C) 2010 Ryzom Core +// Copyright (C) 2010-2014 Laszlo KIS-ADAM (dfighter) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/gui_editor/new_property_widget.cpp b/code/studio/src/plugins/gui_editor/new_property_widget.cpp index b92fea72b..6f3f090c4 100644 --- a/code/studio/src/plugins/gui_editor/new_property_widget.cpp +++ b/code/studio/src/plugins/gui_editor/new_property_widget.cpp @@ -1,6 +1,9 @@ // Object Viewer Qt GUI Editor plugin // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/studio/src/plugins/gui_editor/new_property_widget.h b/code/studio/src/plugins/gui_editor/new_property_widget.h index 7e71e46c6..b7d4819dc 100644 --- a/code/studio/src/plugins/gui_editor/new_property_widget.h +++ b/code/studio/src/plugins/gui_editor/new_property_widget.h @@ -1,6 +1,9 @@ // Object Viewer Qt GUI Editor plugin // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/studio/src/plugins/gui_editor/new_widget_widget.cpp b/code/studio/src/plugins/gui_editor/new_widget_widget.cpp index 2d8ecdeb7..3c9c9c59a 100644 --- a/code/studio/src/plugins/gui_editor/new_widget_widget.cpp +++ b/code/studio/src/plugins/gui_editor/new_widget_widget.cpp @@ -1,6 +1,9 @@ // Object Viewer Qt GUI Editor plugin // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/studio/src/plugins/gui_editor/new_widget_widget.h b/code/studio/src/plugins/gui_editor/new_widget_widget.h index 8a02cfc5e..7e216ad3b 100644 --- a/code/studio/src/plugins/gui_editor/new_widget_widget.h +++ b/code/studio/src/plugins/gui_editor/new_widget_widget.h @@ -1,6 +1,9 @@ // Object Viewer Qt GUI Editor plugin // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/studio/src/plugins/gui_editor/proc_editor.cpp b/code/studio/src/plugins/gui_editor/proc_editor.cpp index e96a1cce1..6814ed472 100644 --- a/code/studio/src/plugins/gui_editor/proc_editor.cpp +++ b/code/studio/src/plugins/gui_editor/proc_editor.cpp @@ -1,6 +1,9 @@ // Object Viewer Qt GUI Editor plugin // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2012-2014 Laszlo KIS-ADAM (dfighter) +// // 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/studio/src/plugins/gui_editor/proc_editor.h b/code/studio/src/plugins/gui_editor/proc_editor.h index 8debfef02..5570dffd8 100644 --- a/code/studio/src/plugins/gui_editor/proc_editor.h +++ b/code/studio/src/plugins/gui_editor/proc_editor.h @@ -1,6 +1,9 @@ // Object Viewer Qt GUI Editor plugin // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2013-2014 Laszlo KIS-ADAM (dfighter) +// // 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/studio/src/plugins/gui_editor/proc_list.cpp b/code/studio/src/plugins/gui_editor/proc_list.cpp index 48b63153f..c6c4bbb33 100644 --- a/code/studio/src/plugins/gui_editor/proc_list.cpp +++ b/code/studio/src/plugins/gui_editor/proc_list.cpp @@ -1,6 +1,9 @@ // Object Viewer Qt GUI Editor plugin // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/studio/src/plugins/gui_editor/proc_list.h b/code/studio/src/plugins/gui_editor/proc_list.h index a720dc301..c266efd86 100644 --- a/code/studio/src/plugins/gui_editor/proc_list.h +++ b/code/studio/src/plugins/gui_editor/proc_list.h @@ -1,6 +1,9 @@ // Object Viewer Qt GUI Editor plugin // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/studio/src/plugins/gui_editor/project_file_parser.cpp b/code/studio/src/plugins/gui_editor/project_file_parser.cpp index 856b3c164..b60a66313 100644 --- a/code/studio/src/plugins/gui_editor/project_file_parser.cpp +++ b/code/studio/src/plugins/gui_editor/project_file_parser.cpp @@ -1,6 +1,9 @@ // Object Viewer Qt GUI Editor plugin // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2013-2014 Laszlo KIS-ADAM (dfighter) +// // 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/studio/src/plugins/gui_editor/project_file_parser.h b/code/studio/src/plugins/gui_editor/project_file_parser.h index da678a9f2..ac4f29167 100644 --- a/code/studio/src/plugins/gui_editor/project_file_parser.h +++ b/code/studio/src/plugins/gui_editor/project_file_parser.h @@ -1,6 +1,9 @@ // Object Viewer Qt GUI Editor plugin // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/studio/src/plugins/gui_editor/project_file_serializer.cpp b/code/studio/src/plugins/gui_editor/project_file_serializer.cpp index 0b34f511b..7b15e1241 100644 --- a/code/studio/src/plugins/gui_editor/project_file_serializer.cpp +++ b/code/studio/src/plugins/gui_editor/project_file_serializer.cpp @@ -1,6 +1,9 @@ // Object Viewer Qt GUI Editor plugin // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2013-2014 Laszlo KIS-ADAM (dfighter) +// // 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/studio/src/plugins/gui_editor/project_file_serializer.h b/code/studio/src/plugins/gui_editor/project_file_serializer.h index c283177ce..e19c11ec9 100644 --- a/code/studio/src/plugins/gui_editor/project_file_serializer.h +++ b/code/studio/src/plugins/gui_editor/project_file_serializer.h @@ -1,6 +1,9 @@ // Object Viewer Qt GUI Editor plugin // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/studio/src/plugins/gui_editor/project_files.h b/code/studio/src/plugins/gui_editor/project_files.h index 786bd22e4..c3b6432d9 100644 --- a/code/studio/src/plugins/gui_editor/project_files.h +++ b/code/studio/src/plugins/gui_editor/project_files.h @@ -1,6 +1,9 @@ // Object Viewer Qt GUI Editor plugin // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2013-2014 Laszlo KIS-ADAM (dfighter) +// // 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/studio/src/plugins/gui_editor/project_window.cpp b/code/studio/src/plugins/gui_editor/project_window.cpp index 0279ede6a..d9d50fba3 100644 --- a/code/studio/src/plugins/gui_editor/project_window.cpp +++ b/code/studio/src/plugins/gui_editor/project_window.cpp @@ -1,6 +1,9 @@ // Object Viewer Qt GUI Editor plugin // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/studio/src/plugins/gui_editor/project_window.h b/code/studio/src/plugins/gui_editor/project_window.h index 291928811..09cc79f78 100644 --- a/code/studio/src/plugins/gui_editor/project_window.h +++ b/code/studio/src/plugins/gui_editor/project_window.h @@ -1,6 +1,9 @@ // Object Viewer Qt GUI Editor plugin // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/studio/src/plugins/gui_editor/property_browser_ctrl.cpp b/code/studio/src/plugins/gui_editor/property_browser_ctrl.cpp index 6db5423a3..b8a38ad93 100644 --- a/code/studio/src/plugins/gui_editor/property_browser_ctrl.cpp +++ b/code/studio/src/plugins/gui_editor/property_browser_ctrl.cpp @@ -1,6 +1,9 @@ // Object Viewer Qt GUI Editor plugin // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2013-2014 Laszlo KIS-ADAM (dfighter) +// // 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/studio/src/plugins/gui_editor/property_browser_ctrl.h b/code/studio/src/plugins/gui_editor/property_browser_ctrl.h index 3d72d92ba..547cdf635 100644 --- a/code/studio/src/plugins/gui_editor/property_browser_ctrl.h +++ b/code/studio/src/plugins/gui_editor/property_browser_ctrl.h @@ -1,6 +1,9 @@ // Object Viewer Qt GUI Editor plugin // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2013-2014 Laszlo KIS-ADAM (dfighter) +// // 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/studio/src/plugins/gui_editor/texture_chooser.cpp b/code/studio/src/plugins/gui_editor/texture_chooser.cpp index 3f988d4f3..406f25916 100644 --- a/code/studio/src/plugins/gui_editor/texture_chooser.cpp +++ b/code/studio/src/plugins/gui_editor/texture_chooser.cpp @@ -1,6 +1,9 @@ // Ryzom Core Studio GUI Editor plugin // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2014 Laszlo KIS-ADAM (dfighter) +// // 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/studio/src/plugins/gui_editor/texture_chooser.h b/code/studio/src/plugins/gui_editor/texture_chooser.h index 160b31481..3af33f9e6 100644 --- a/code/studio/src/plugins/gui_editor/texture_chooser.h +++ b/code/studio/src/plugins/gui_editor/texture_chooser.h @@ -1,6 +1,9 @@ // Ryzom Core Studio GUI Editor plugin // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2014 Laszlo KIS-ADAM (dfighter) +// // 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/studio/src/plugins/gui_editor/texture_property_manager.cpp b/code/studio/src/plugins/gui_editor/texture_property_manager.cpp index 6b40abc7f..732bdc914 100644 --- a/code/studio/src/plugins/gui_editor/texture_property_manager.cpp +++ b/code/studio/src/plugins/gui_editor/texture_property_manager.cpp @@ -1,6 +1,9 @@ // Ryzom Core Studio GUI Editor plugin // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2014 Laszlo KIS-ADAM (dfighter) +// // 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/studio/src/plugins/gui_editor/texture_property_manager.h b/code/studio/src/plugins/gui_editor/texture_property_manager.h index 9b686ea04..9af7de8c4 100644 --- a/code/studio/src/plugins/gui_editor/texture_property_manager.h +++ b/code/studio/src/plugins/gui_editor/texture_property_manager.h @@ -1,6 +1,9 @@ // Ryzom Core Studio GUI Editor plugin // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2014 Laszlo KIS-ADAM (dfighter) +// // 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/studio/src/plugins/gui_editor/widget_hierarchy.cpp b/code/studio/src/plugins/gui_editor/widget_hierarchy.cpp index 17e7f6e57..3107b5356 100644 --- a/code/studio/src/plugins/gui_editor/widget_hierarchy.cpp +++ b/code/studio/src/plugins/gui_editor/widget_hierarchy.cpp @@ -1,6 +1,10 @@ // Object Viewer Qt GUI Editor plugin // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2013 Matt RAYKOWSKI (sfb) +// Copyright (C) 2013-2014 Laszlo KIS-ADAM (dfighter) +// // 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/studio/src/plugins/gui_editor/widget_hierarchy.h b/code/studio/src/plugins/gui_editor/widget_hierarchy.h index cdfc9a741..ca93e3a96 100644 --- a/code/studio/src/plugins/gui_editor/widget_hierarchy.h +++ b/code/studio/src/plugins/gui_editor/widget_hierarchy.h @@ -1,6 +1,9 @@ // Object Viewer Qt GUI Editor plugin // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2013-2014 Laszlo KIS-ADAM (dfighter) +// // 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/studio/src/plugins/gui_editor/widget_info.h b/code/studio/src/plugins/gui_editor/widget_info.h index 2f7396071..f920728f0 100644 --- a/code/studio/src/plugins/gui_editor/widget_info.h +++ b/code/studio/src/plugins/gui_editor/widget_info.h @@ -1,6 +1,9 @@ // Object Viewer Qt GUI Editor plugin // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/studio/src/plugins/gui_editor/widget_info_serializer.cpp b/code/studio/src/plugins/gui_editor/widget_info_serializer.cpp index cf7acca1a..fb97feee2 100644 --- a/code/studio/src/plugins/gui_editor/widget_info_serializer.cpp +++ b/code/studio/src/plugins/gui_editor/widget_info_serializer.cpp @@ -1,6 +1,9 @@ // Object Viewer Qt GUI Editor plugin // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/studio/src/plugins/gui_editor/widget_info_serializer.h b/code/studio/src/plugins/gui_editor/widget_info_serializer.h index 81a996396..3049feee7 100644 --- a/code/studio/src/plugins/gui_editor/widget_info_serializer.h +++ b/code/studio/src/plugins/gui_editor/widget_info_serializer.h @@ -1,6 +1,9 @@ // Object Viewer Qt GUI Editor plugin // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/studio/src/plugins/gui_editor/widget_info_tree.h b/code/studio/src/plugins/gui_editor/widget_info_tree.h index 5e717923c..ebc76699c 100644 --- a/code/studio/src/plugins/gui_editor/widget_info_tree.h +++ b/code/studio/src/plugins/gui_editor/widget_info_tree.h @@ -1,6 +1,9 @@ // Object Viewer Qt GUI Editor plugin // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/studio/src/plugins/gui_editor/widget_info_tree_node.h b/code/studio/src/plugins/gui_editor/widget_info_tree_node.h index 8aefe6f0f..f62b5de35 100644 --- a/code/studio/src/plugins/gui_editor/widget_info_tree_node.h +++ b/code/studio/src/plugins/gui_editor/widget_info_tree_node.h @@ -1,6 +1,9 @@ // Object Viewer Qt GUI Editor plugin // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2013-2014 Laszlo KIS-ADAM (dfighter) +// // 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/studio/src/plugins/gui_editor/widget_info_tree_visitor.h b/code/studio/src/plugins/gui_editor/widget_info_tree_visitor.h index b5f276fd7..79a2a97bd 100644 --- a/code/studio/src/plugins/gui_editor/widget_info_tree_visitor.h +++ b/code/studio/src/plugins/gui_editor/widget_info_tree_visitor.h @@ -1,6 +1,9 @@ // Object Viewer Qt GUI Editor plugin // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/studio/src/plugins/gui_editor/widget_properties.cpp b/code/studio/src/plugins/gui_editor/widget_properties.cpp index 69d556975..fa09f40ad 100644 --- a/code/studio/src/plugins/gui_editor/widget_properties.cpp +++ b/code/studio/src/plugins/gui_editor/widget_properties.cpp @@ -1,6 +1,9 @@ // Object Viewer Qt GUI Editor plugin // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2012-2013 Laszlo KIS-ADAM (dfighter) +// // 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/studio/src/plugins/gui_editor/widget_properties.h b/code/studio/src/plugins/gui_editor/widget_properties.h index 44e535b0f..6aa3efb22 100644 --- a/code/studio/src/plugins/gui_editor/widget_properties.h +++ b/code/studio/src/plugins/gui_editor/widget_properties.h @@ -1,6 +1,9 @@ // Object Viewer Qt GUI Editor plugin // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/studio/src/plugins/gui_editor/widget_properties_parser.cpp b/code/studio/src/plugins/gui_editor/widget_properties_parser.cpp index fd74dcae4..6aedd075b 100644 --- a/code/studio/src/plugins/gui_editor/widget_properties_parser.cpp +++ b/code/studio/src/plugins/gui_editor/widget_properties_parser.cpp @@ -1,6 +1,9 @@ // Object Viewer Qt GUI Editor plugin // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2013-2015 Laszlo KIS-ADAM (dfighter) +// // 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/studio/src/plugins/gui_editor/widget_properties_parser.h b/code/studio/src/plugins/gui_editor/widget_properties_parser.h index f3aa25386..9882d3ab9 100644 --- a/code/studio/src/plugins/gui_editor/widget_properties_parser.h +++ b/code/studio/src/plugins/gui_editor/widget_properties_parser.h @@ -1,6 +1,9 @@ // Object Viewer Qt GUI Editor plugin // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/studio/src/plugins/gui_editor/widget_serializer.cpp b/code/studio/src/plugins/gui_editor/widget_serializer.cpp index a8594afed..e897c2fef 100644 --- a/code/studio/src/plugins/gui_editor/widget_serializer.cpp +++ b/code/studio/src/plugins/gui_editor/widget_serializer.cpp @@ -1,6 +1,9 @@ // Object Viewer Qt GUI Editor plugin // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/studio/src/plugins/gui_editor/widget_serializer.h b/code/studio/src/plugins/gui_editor/widget_serializer.h index b2bc8da94..07c8e72b8 100644 --- a/code/studio/src/plugins/gui_editor/widget_serializer.h +++ b/code/studio/src/plugins/gui_editor/widget_serializer.h @@ -1,6 +1,9 @@ // Object Viewer Qt GUI Editor plugin // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) +// // 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/studio/src/plugins/landscape_editor/builder_zone.cpp b/code/studio/src/plugins/landscape_editor/builder_zone.cpp index d8e74e564..8ed5121a4 100644 --- a/code/studio/src/plugins/landscape_editor/builder_zone.cpp +++ b/code/studio/src/plugins/landscape_editor/builder_zone.cpp @@ -1,6 +1,8 @@ // Object Viewer Qt - MMORPG Framework +// Copyright (C) 2011 Dzmitry KAMIAHIN (dnk-88) +// +// This source file has been modified by the following contributors: // Copyright (C) 2010 Winch Gate Property Limited -// Copyright (C) 2011 Dzmitry Kamiahin // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/landscape_editor/builder_zone.h b/code/studio/src/plugins/landscape_editor/builder_zone.h index 106b8ee58..7fde90e28 100644 --- a/code/studio/src/plugins/landscape_editor/builder_zone.h +++ b/code/studio/src/plugins/landscape_editor/builder_zone.h @@ -1,6 +1,8 @@ // Object Viewer Qt - MMORPG Framework +// Copyright (C) 2011-2012 Dzmitry KAMIAHIN (dnk-88) +// +// This source file has been modified by the following contributors: // Copyright (C) 2010 Winch Gate Property Limited -// Copyright (C) 2011 Dzmitry Kamiahin // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/landscape_editor/builder_zone_base.cpp b/code/studio/src/plugins/landscape_editor/builder_zone_base.cpp index 580068a56..0c0fd49cb 100644 --- a/code/studio/src/plugins/landscape_editor/builder_zone_base.cpp +++ b/code/studio/src/plugins/landscape_editor/builder_zone_base.cpp @@ -1,6 +1,8 @@ // Object Viewer Qt - MMORPG Framework +// Copyright (C) 2011 Dzmitry KAMIAHIN (dnk-88) +// +// This source file has been modified by the following contributors: // Copyright (C) 2010 Winch Gate Property Limited -// Copyright (C) 2011 Dzmitry Kamiahin // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/landscape_editor/builder_zone_base.h b/code/studio/src/plugins/landscape_editor/builder_zone_base.h index a8637d463..9e53551b5 100644 --- a/code/studio/src/plugins/landscape_editor/builder_zone_base.h +++ b/code/studio/src/plugins/landscape_editor/builder_zone_base.h @@ -1,6 +1,8 @@ // Object Viewer Qt - MMORPG Framework +// Copyright (C) 2011 Dzmitry KAMIAHIN (dnk-88) +// +// This source file has been modified by the following contributors: // Copyright (C) 2010 Winch Gate Property Limited -// Copyright (C) 2011 Dzmitry Kamiahin // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/landscape_editor/landscape_actions.cpp b/code/studio/src/plugins/landscape_editor/landscape_actions.cpp index 05b4d1671..f0e183455 100644 --- a/code/studio/src/plugins/landscape_editor/landscape_actions.cpp +++ b/code/studio/src/plugins/landscape_editor/landscape_actions.cpp @@ -1,6 +1,8 @@ // Object Viewer Qt - MMORPG Framework +// Copyright (C) 2011 Dzmitry KAMIAHIN (dnk-88) +// +// This source file has been modified by the following contributors: // Copyright (C) 2010 Winch Gate Property Limited -// Copyright (C) 2011 Dzmitry Kamiahin // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/landscape_editor/landscape_actions.h b/code/studio/src/plugins/landscape_editor/landscape_actions.h index c976360fa..9579417d0 100644 --- a/code/studio/src/plugins/landscape_editor/landscape_actions.h +++ b/code/studio/src/plugins/landscape_editor/landscape_actions.h @@ -1,6 +1,8 @@ // Object Viewer Qt - MMORPG Framework +// Copyright (C) 2011 Dzmitry KAMIAHIN (dnk-88) +// +// This source file has been modified by the following contributors: // Copyright (C) 2010 Winch Gate Property Limited -// Copyright (C) 2011 Dzmitry Kamiahin // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/landscape_editor/landscape_editor_constants.h b/code/studio/src/plugins/landscape_editor/landscape_editor_constants.h index 92845abb8..95a3c72fe 100644 --- a/code/studio/src/plugins/landscape_editor/landscape_editor_constants.h +++ b/code/studio/src/plugins/landscape_editor/landscape_editor_constants.h @@ -1,5 +1,5 @@ // Object Viewer Qt - MMORPG Framework -// Copyright (C) 2011 Dzmitry Kamiahin +// Copyright (C) 2011 Dzmitry KAMIAHIN (dnk-88) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/landscape_editor/landscape_editor_global.h b/code/studio/src/plugins/landscape_editor/landscape_editor_global.h index 167c8e24f..c7ff5238c 100644 --- a/code/studio/src/plugins/landscape_editor/landscape_editor_global.h +++ b/code/studio/src/plugins/landscape_editor/landscape_editor_global.h @@ -1,7 +1,8 @@ // Object Viewer Qt - MMORPG Framework +// Copyright (C) 2011 Dzmitry KAMIAHIN (dnk-88) +// +// This source file has been modified by the following contributors: // Copyright (C) 2010 Winch Gate Property Limited -// Copyright (C) 2011 Dzmitry Kamiahin -// Parts by Nokia Corporation (qt-info@nokia.com) Copyright (C) 2009. // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/landscape_editor/landscape_editor_plugin.cpp b/code/studio/src/plugins/landscape_editor/landscape_editor_plugin.cpp index f97aff691..b9078d059 100644 --- a/code/studio/src/plugins/landscape_editor/landscape_editor_plugin.cpp +++ b/code/studio/src/plugins/landscape_editor/landscape_editor_plugin.cpp @@ -1,6 +1,9 @@ // Object Viewer Qt - MMORPG Framework +// Copyright (C) 2011 Dzmitry KAMIAHIN (dnk-88) +// +// This source file has been modified by the following contributors: // Copyright (C) 2010 Winch Gate Property Limited -// Copyright (C) 2011 Dzmitry Kamiahin +// Copyright (C) 2014 Laszlo KIS-ADAM (dfighter) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/landscape_editor/landscape_editor_plugin.h b/code/studio/src/plugins/landscape_editor/landscape_editor_plugin.h index a01867894..5af2e6436 100644 --- a/code/studio/src/plugins/landscape_editor/landscape_editor_plugin.h +++ b/code/studio/src/plugins/landscape_editor/landscape_editor_plugin.h @@ -1,5 +1,5 @@ // Object Viewer Qt - MMORPG Framework -// Copyright (C) 2011 Dzmitry Kamiahin +// Copyright (C) 2011 Dzmitry KAMIAHIN (dnk-88) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/landscape_editor/landscape_editor_window.cpp b/code/studio/src/plugins/landscape_editor/landscape_editor_window.cpp index aeca41906..a7be90701 100644 --- a/code/studio/src/plugins/landscape_editor/landscape_editor_window.cpp +++ b/code/studio/src/plugins/landscape_editor/landscape_editor_window.cpp @@ -1,5 +1,8 @@ // Object Viewer Qt - MMORPG Framework -// Copyright (C) 2011 Dzmitry Kamiahin +// Copyright (C) 2011 Dzmitry KAMIAHIN (dnk-88) +// +// This source file has been modified by the following contributors: +// Copyright (C) 2014 Laszlo KIS-ADAM (dfighter) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/landscape_editor/landscape_editor_window.h b/code/studio/src/plugins/landscape_editor/landscape_editor_window.h index 6047a9e5e..b1ddd81ae 100644 --- a/code/studio/src/plugins/landscape_editor/landscape_editor_window.h +++ b/code/studio/src/plugins/landscape_editor/landscape_editor_window.h @@ -1,5 +1,5 @@ // Object Viewer Qt - MMORPG Framework -// Copyright (C) 2011 Dzmitry Kamiahin +// Copyright (C) 2011 Dzmitry KAMIAHIN (dnk-88) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/landscape_editor/landscape_scene.cpp b/code/studio/src/plugins/landscape_editor/landscape_scene.cpp index 1b9aaa9dc..f877935b5 100644 --- a/code/studio/src/plugins/landscape_editor/landscape_scene.cpp +++ b/code/studio/src/plugins/landscape_editor/landscape_scene.cpp @@ -1,5 +1,5 @@ // Object Viewer Qt - MMORPG Framework -// Copyright (C) 2011 Dzmitry Kamiahin +// Copyright (C) 2011 Dzmitry KAMIAHIN (dnk-88) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/landscape_editor/landscape_scene.h b/code/studio/src/plugins/landscape_editor/landscape_scene.h index 612eaca76..9d77fe7c4 100644 --- a/code/studio/src/plugins/landscape_editor/landscape_scene.h +++ b/code/studio/src/plugins/landscape_editor/landscape_scene.h @@ -1,6 +1,8 @@ // Object Viewer Qt - MMORPG Framework +// Copyright (C) 2011 Dzmitry KAMIAHIN (dnk-88) +// +// This source file has been modified by the following contributors: // Copyright (C) 2010 Winch Gate Property Limited -// Copyright (C) 2011 Dzmitry Kamiahin // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/landscape_editor/landscape_scene_base.cpp b/code/studio/src/plugins/landscape_editor/landscape_scene_base.cpp index 0aaa1ef1f..d6d9b1d7a 100644 --- a/code/studio/src/plugins/landscape_editor/landscape_scene_base.cpp +++ b/code/studio/src/plugins/landscape_editor/landscape_scene_base.cpp @@ -1,5 +1,5 @@ // Object Viewer Qt - MMORPG Framework -// Copyright (C) 2011 Dzmitry Kamiahin +// Copyright (C) 2011 Dzmitry KAMIAHIN (dnk-88) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/landscape_editor/landscape_scene_base.h b/code/studio/src/plugins/landscape_editor/landscape_scene_base.h index b392b8a85..2f13583ce 100644 --- a/code/studio/src/plugins/landscape_editor/landscape_scene_base.h +++ b/code/studio/src/plugins/landscape_editor/landscape_scene_base.h @@ -1,5 +1,5 @@ // Object Viewer Qt - MMORPG Framework -// Copyright (C) 2011 Dzmitry Kamiahin +// Copyright (C) 2011 Dzmitry KAMIAHIN (dnk-88) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/landscape_editor/landscape_view.cpp b/code/studio/src/plugins/landscape_editor/landscape_view.cpp index 74d6f9e7c..00252e2bb 100644 --- a/code/studio/src/plugins/landscape_editor/landscape_view.cpp +++ b/code/studio/src/plugins/landscape_editor/landscape_view.cpp @@ -1,5 +1,5 @@ // Object Viewer Qt - MMORPG Framework -// Copyright (C) 2011 Dzmitry Kamiahin +// Copyright (C) 2011 Dzmitry KAMIAHIN (dnk-88) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/landscape_editor/landscape_view.h b/code/studio/src/plugins/landscape_editor/landscape_view.h index 158edfaa9..2b20bf749 100644 --- a/code/studio/src/plugins/landscape_editor/landscape_view.h +++ b/code/studio/src/plugins/landscape_editor/landscape_view.h @@ -1,5 +1,5 @@ // Object Viewer Qt - MMORPG Framework -// Copyright (C) 2011 Dzmitry Kamiahin +// Copyright (C) 2011 Dzmitry KAMIAHIN (dnk-88) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/landscape_editor/list_zones_model.cpp b/code/studio/src/plugins/landscape_editor/list_zones_model.cpp index fabd56a40..c0bfdba68 100644 --- a/code/studio/src/plugins/landscape_editor/list_zones_model.cpp +++ b/code/studio/src/plugins/landscape_editor/list_zones_model.cpp @@ -1,6 +1,8 @@ // Object Viewer Qt - MMORPG Framework +// Copyright (C) 2011 Dzmitry KAMIAHIN (dnk-88) +// +// This source file has been modified by the following contributors: // Copyright (C) 2010 Winch Gate Property Limited -// Copyright (C) 2011 Dzmitry Kamiahin // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/landscape_editor/list_zones_model.h b/code/studio/src/plugins/landscape_editor/list_zones_model.h index e4682ebea..f8a85c03c 100644 --- a/code/studio/src/plugins/landscape_editor/list_zones_model.h +++ b/code/studio/src/plugins/landscape_editor/list_zones_model.h @@ -1,6 +1,8 @@ // Object Viewer Qt - MMORPG Framework +// Copyright (C) 2011 Dzmitry KAMIAHIN (dnk-88) +// +// This source file has been modified by the following contributors: // Copyright (C) 2010 Winch Gate Property Limited -// Copyright (C) 2011 Dzmitry Kamiahin // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/landscape_editor/list_zones_widget.cpp b/code/studio/src/plugins/landscape_editor/list_zones_widget.cpp index 42f472a81..389aa98d9 100644 --- a/code/studio/src/plugins/landscape_editor/list_zones_widget.cpp +++ b/code/studio/src/plugins/landscape_editor/list_zones_widget.cpp @@ -1,6 +1,8 @@ // Object Viewer Qt - MMORPG Framework +// Copyright (C) 2011 Dzmitry KAMIAHIN (dnk-88) +// +// This source file has been modified by the following contributors: // Copyright (C) 2010 Winch Gate Property Limited -// Copyright (C) 2011 Dzmitry Kamiahin // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/landscape_editor/list_zones_widget.h b/code/studio/src/plugins/landscape_editor/list_zones_widget.h index f33eda706..719e49299 100644 --- a/code/studio/src/plugins/landscape_editor/list_zones_widget.h +++ b/code/studio/src/plugins/landscape_editor/list_zones_widget.h @@ -1,5 +1,5 @@ // Object Viewer Qt - MMORPG Framework -// Copyright (C) 2011 Dzmitry Kamiahin +// Copyright (C) 2011 Dzmitry KAMIAHIN (dnk-88) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/landscape_editor/pixmap_database.cpp b/code/studio/src/plugins/landscape_editor/pixmap_database.cpp index 075624333..0f5426209 100644 --- a/code/studio/src/plugins/landscape_editor/pixmap_database.cpp +++ b/code/studio/src/plugins/landscape_editor/pixmap_database.cpp @@ -1,5 +1,5 @@ // Object Viewer Qt - MMORPG Framework -// Copyright (C) 2011 Dzmitry Kamiahin +// Copyright (C) 2011 Dzmitry KAMIAHIN (dnk-88) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/landscape_editor/pixmap_database.h b/code/studio/src/plugins/landscape_editor/pixmap_database.h index 282872343..c4c67aacf 100644 --- a/code/studio/src/plugins/landscape_editor/pixmap_database.h +++ b/code/studio/src/plugins/landscape_editor/pixmap_database.h @@ -1,5 +1,5 @@ // Object Viewer Qt - MMORPG Framework -// Copyright (C) 2011 Dzmitry Kamiahin +// Copyright (C) 2011 Dzmitry KAMIAHIN (dnk-88) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/landscape_editor/project_settings_dialog.cpp b/code/studio/src/plugins/landscape_editor/project_settings_dialog.cpp index 9cf5794b0..5bc8eeda9 100644 --- a/code/studio/src/plugins/landscape_editor/project_settings_dialog.cpp +++ b/code/studio/src/plugins/landscape_editor/project_settings_dialog.cpp @@ -1,5 +1,5 @@ // Object Viewer Qt - MMORPG Framework -// Copyright (C) 2011 Dzmitry Kamiahin +// Copyright (C) 2011 Dzmitry KAMIAHIN (dnk-88) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/landscape_editor/project_settings_dialog.h b/code/studio/src/plugins/landscape_editor/project_settings_dialog.h index ecad06f58..16cf4fd45 100644 --- a/code/studio/src/plugins/landscape_editor/project_settings_dialog.h +++ b/code/studio/src/plugins/landscape_editor/project_settings_dialog.h @@ -1,5 +1,5 @@ // Object Viewer Qt - MMORPG Framework -// Copyright (C) 2011 Dzmitry Kamiahin +// Copyright (C) 2011 Dzmitry KAMIAHIN (dnk-88) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/landscape_editor/snapshot_dialog.cpp b/code/studio/src/plugins/landscape_editor/snapshot_dialog.cpp index 68a75b2e8..b13ba791d 100644 --- a/code/studio/src/plugins/landscape_editor/snapshot_dialog.cpp +++ b/code/studio/src/plugins/landscape_editor/snapshot_dialog.cpp @@ -1,5 +1,5 @@ // Object Viewer Qt - MMORPG Framework -// Copyright (C) 2011 Dzmitry Kamiahin +// Copyright (C) 2011 Dzmitry KAMIAHIN (dnk-88) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/landscape_editor/snapshot_dialog.h b/code/studio/src/plugins/landscape_editor/snapshot_dialog.h index 07844ce31..824c1a817 100644 --- a/code/studio/src/plugins/landscape_editor/snapshot_dialog.h +++ b/code/studio/src/plugins/landscape_editor/snapshot_dialog.h @@ -1,5 +1,5 @@ // Object Viewer Qt - MMORPG Framework -// Copyright (C) 2011 Dzmitry Kamiahin +// Copyright (C) 2011 Dzmitry KAMIAHIN (dnk-88) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/landscape_editor/zone_region_editor.cpp b/code/studio/src/plugins/landscape_editor/zone_region_editor.cpp index 5bf855297..d295fdf31 100644 --- a/code/studio/src/plugins/landscape_editor/zone_region_editor.cpp +++ b/code/studio/src/plugins/landscape_editor/zone_region_editor.cpp @@ -1,6 +1,8 @@ // Object Viewer Qt - MMORPG Framework +// Copyright (C) 2011 Dzmitry KAMIAHIN (dnk-88) +// +// This source file has been modified by the following contributors: // Copyright (C) 2010 Winch Gate Property Limited -// Copyright (C) 2011 Dzmitry Kamiahin // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/landscape_editor/zone_region_editor.h b/code/studio/src/plugins/landscape_editor/zone_region_editor.h index e40aba9d4..7e4f22b25 100644 --- a/code/studio/src/plugins/landscape_editor/zone_region_editor.h +++ b/code/studio/src/plugins/landscape_editor/zone_region_editor.h @@ -1,6 +1,8 @@ // Object Viewer Qt - MMORPG Framework +// Copyright (C) 2011 Dzmitry KAMIAHIN (dnk-88) +// +// This source file has been modified by the following contributors: // Copyright (C) 2010 Winch Gate Property Limited -// Copyright (C) 2011 Dzmitry Kamiahin // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/log/log_plugin.cpp b/code/studio/src/plugins/log/log_plugin.cpp index 11da182a0..b5cdec4be 100644 --- a/code/studio/src/plugins/log/log_plugin.cpp +++ b/code/studio/src/plugins/log/log_plugin.cpp @@ -1,5 +1,10 @@ // Object Viewer Qt - Log Plugin - MMORPG Framework -// Copyright (C) 2011 Adrian Jaekel +// Copyright (C) 2011 Adrian JAEKEL +// +// This source file has been modified by the following contributors: +// Copyright (C) 2011 Matt RAYKOWSKI (sfb) +// Copyright (C) 2013 Jan BOON (Kaetemi) +// Copyright (C) 2014 Laszlo KIS-ADAM (dfighter) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/log/log_settings_page.cpp b/code/studio/src/plugins/log/log_settings_page.cpp index 4b3fa1ebb..3fd336097 100644 --- a/code/studio/src/plugins/log/log_settings_page.cpp +++ b/code/studio/src/plugins/log/log_settings_page.cpp @@ -1,6 +1,10 @@ // Object Viewer Qt - MMORPG Framework +// Copyright (C) 2011 Adrian JAEKEL +// +// This source file has been modified by the following contributors: // Copyright (C) 2010 Winch Gate Property Limited -// Copyright (C) 2011 Adrian Jaekel +// Copyright (C) 2011 Matt RAYKOWSKI (sfb) +// Copyright (C) 2013 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 diff --git a/code/studio/src/plugins/log/log_settings_page.h b/code/studio/src/plugins/log/log_settings_page.h index b8a5fd604..f85ede9bd 100644 --- a/code/studio/src/plugins/log/log_settings_page.h +++ b/code/studio/src/plugins/log/log_settings_page.h @@ -1,6 +1,8 @@ // Object Viewer Qt - MMORPG Framework +// Copyright (C) 2011 Dzmitry KAMIAHIN (dnk-88) +// +// This source file has been modified by the following contributors: // Copyright (C) 2010 Winch Gate Property Limited -// Copyright (C) 2011 Dzmitry Kamiahin // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/log/qt_displayer.cpp b/code/studio/src/plugins/log/qt_displayer.cpp index 3cdcffa68..81f78a967 100644 --- a/code/studio/src/plugins/log/qt_displayer.cpp +++ b/code/studio/src/plugins/log/qt_displayer.cpp @@ -1,6 +1,8 @@ // Object Viewer Qt - MMORPG Framework +// Copyright (C) 2011 Adrian JAEKEL +// +// This source file has been modified by the following contributors: // Copyright (C) 2010 Winch Gate Property Limited -// Copyright (C) 2011 Adrian Jaekel // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/mission_compiler/mission_compiler_settings_page.cpp b/code/studio/src/plugins/mission_compiler/mission_compiler_settings_page.cpp index 28dc4f9ce..1701c0471 100644 --- a/code/studio/src/plugins/mission_compiler/mission_compiler_settings_page.cpp +++ b/code/studio/src/plugins/mission_compiler/mission_compiler_settings_page.cpp @@ -1,6 +1,10 @@ // Object Viewer Qt - MMORPG Framework +// Copyright (C) 2011 Dzmitry KAMIAHIN (dnk-88) +// +// This source file has been modified by the following contributors: // Copyright (C) 2010 Winch Gate Property Limited -// Copyright (C) 2011 Dzmitry Kamiahin +// Copyright (C) 2011 Matt RAYKOWSKI (sfb) +// Copyright (C) 2014 Laszlo KIS-ADAM (dfighter) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/mission_compiler/mission_compiler_settings_page.h b/code/studio/src/plugins/mission_compiler/mission_compiler_settings_page.h index 71996e442..eb4c762fc 100644 --- a/code/studio/src/plugins/mission_compiler/mission_compiler_settings_page.h +++ b/code/studio/src/plugins/mission_compiler/mission_compiler_settings_page.h @@ -1,6 +1,9 @@ // Object Viewer Qt - MMORPG Framework +// Copyright (C) 2011 Dzmitry KAMIAHIN (dnk-88) +// +// This source file has been modified by the following contributors: // Copyright (C) 2010 Winch Gate Property Limited -// Copyright (C) 2011 Dzmitry Kamiahin +// Copyright (C) 2011 Matt RAYKOWSKI (sfb) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/mission_compiler/server_entry_dialog.cpp b/code/studio/src/plugins/mission_compiler/server_entry_dialog.cpp index 206f0db77..f420dd1ca 100644 --- a/code/studio/src/plugins/mission_compiler/server_entry_dialog.cpp +++ b/code/studio/src/plugins/mission_compiler/server_entry_dialog.cpp @@ -1,6 +1,10 @@ // Object Viewer Qt - MMORPG Framework +// Copyright (C) 2011 Dzmitry KAMIAHIN (dnk-88) +// +// This source file has been modified by the following contributors: // Copyright (C) 2010 Winch Gate Property Limited -// Copyright (C) 2011 Dzmitry Kamiahin +// Copyright (C) 2011 Matt RAYKOWSKI (sfb) +// Copyright (C) 2013 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 diff --git a/code/studio/src/plugins/mission_compiler/server_entry_dialog.h b/code/studio/src/plugins/mission_compiler/server_entry_dialog.h index 6dd560876..0ee8925b4 100644 --- a/code/studio/src/plugins/mission_compiler/server_entry_dialog.h +++ b/code/studio/src/plugins/mission_compiler/server_entry_dialog.h @@ -1,6 +1,10 @@ // Object Viewer Qt - MMORPG Framework +// Copyright (C) 2011 Dzmitry KAMIAHIN (dnk-88) +// +// This source file has been modified by the following contributors: // Copyright (C) 2010 Winch Gate Property Limited -// Copyright (C) 2011 Dzmitry Kamiahin +// Copyright (C) 2011 Matt RAYKOWSKI (sfb) +// Copyright (C) 2013 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 diff --git a/code/studio/src/plugins/object_viewer/graphics_settings_page.cpp b/code/studio/src/plugins/object_viewer/graphics_settings_page.cpp index 64b347f95..870af9bf2 100644 --- a/code/studio/src/plugins/object_viewer/graphics_settings_page.cpp +++ b/code/studio/src/plugins/object_viewer/graphics_settings_page.cpp @@ -1,6 +1,8 @@ // Object Viewer Qt - MMORPG Framework +// Copyright (C) 2011 Dzmitry KAMIAHIN (dnk-88) +// +// This source file has been modified by the following contributors: // Copyright (C) 2010 Winch Gate Property Limited -// Copyright (C) 2011 Dzmitry Kamiahin // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/object_viewer/graphics_settings_page.h b/code/studio/src/plugins/object_viewer/graphics_settings_page.h index 74df1b140..0783c53df 100644 --- a/code/studio/src/plugins/object_viewer/graphics_settings_page.h +++ b/code/studio/src/plugins/object_viewer/graphics_settings_page.h @@ -1,6 +1,8 @@ // Object Viewer Qt - MMORPG Framework +// Copyright (C) 2011 Dzmitry KAMIAHIN (dnk-88) +// +// This source file has been modified by the following contributors: // Copyright (C) 2010 Winch Gate Property Limited -// Copyright (C) 2011 Dzmitry Kamiahin // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/object_viewer/object_viewer_constants.h b/code/studio/src/plugins/object_viewer/object_viewer_constants.h index deb0c84ce..6a473fa1e 100644 --- a/code/studio/src/plugins/object_viewer/object_viewer_constants.h +++ b/code/studio/src/plugins/object_viewer/object_viewer_constants.h @@ -1,6 +1,8 @@ // Object Viewer Qt - MMORPG Framework +// Copyright (C) 2011 Dzmitry KAMIAHIN (dnk-88) +// +// This source file has been modified by the following contributors: // Copyright (C) 2010 Winch Gate Property Limited -// Copyright (C) 2011 Dzmitry Kamiahin // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/object_viewer/particle_system/dup_ps.h b/code/studio/src/plugins/object_viewer/particle_system/dup_ps.h index a85c6f346..40f6212f9 100644 --- a/code/studio/src/plugins/object_viewer/particle_system/dup_ps.h +++ b/code/studio/src/plugins/object_viewer/particle_system/dup_ps.h @@ -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) 2010 Dzmitry KAMIAHIN (dnk-88) +// // 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/studio/src/plugins/object_viewer/particle_system/particle_node.cpp b/code/studio/src/plugins/object_viewer/particle_system/particle_node.cpp index d8a7573ec..96dd43b69 100644 --- a/code/studio/src/plugins/object_viewer/particle_system/particle_node.cpp +++ b/code/studio/src/plugins/object_viewer/particle_system/particle_node.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) 2010 Dzmitry KAMIAHIN (dnk-88) +// // 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/studio/src/plugins/object_viewer/particle_system/ps_initial_pos.cpp b/code/studio/src/plugins/object_viewer/particle_system/ps_initial_pos.cpp index d3f0e9451..4058006c2 100644 --- a/code/studio/src/plugins/object_viewer/particle_system/ps_initial_pos.cpp +++ b/code/studio/src/plugins/object_viewer/particle_system/ps_initial_pos.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) 2010 Dzmitry KAMIAHIN (dnk-88) +// // 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/studio/src/plugins/object_viewer/particle_system/ps_initial_pos.h b/code/studio/src/plugins/object_viewer/particle_system/ps_initial_pos.h index c1e5abcde..11cddd3b9 100644 --- a/code/studio/src/plugins/object_viewer/particle_system/ps_initial_pos.h +++ b/code/studio/src/plugins/object_viewer/particle_system/ps_initial_pos.h @@ -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) 2010 Dzmitry KAMIAHIN (dnk-88) +// // 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/studio/src/plugins/object_viewer/particle_system/ps_wrapper.h b/code/studio/src/plugins/object_viewer/particle_system/ps_wrapper.h index 827483ce5..1208ed4f3 100644 --- a/code/studio/src/plugins/object_viewer/particle_system/ps_wrapper.h +++ b/code/studio/src/plugins/object_viewer/particle_system/ps_wrapper.h @@ -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) 2010 Dzmitry KAMIAHIN (dnk-88) +// // 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/studio/src/plugins/object_viewer/particle_system/scheme_bank_dialog.cpp b/code/studio/src/plugins/object_viewer/particle_system/scheme_bank_dialog.cpp index af8a4829f..55dc7c9c6 100644 --- a/code/studio/src/plugins/object_viewer/particle_system/scheme_bank_dialog.cpp +++ b/code/studio/src/plugins/object_viewer/particle_system/scheme_bank_dialog.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) 2011 Dzmitry KAMIAHIN (dnk-88) +// // 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/studio/src/plugins/object_viewer/particle_system/scheme_bank_dialog.h b/code/studio/src/plugins/object_viewer/particle_system/scheme_bank_dialog.h index 8f9f300b8..cb42d7552 100644 --- a/code/studio/src/plugins/object_viewer/particle_system/scheme_bank_dialog.h +++ b/code/studio/src/plugins/object_viewer/particle_system/scheme_bank_dialog.h @@ -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) 2011 Dzmitry KAMIAHIN (dnk-88) +// // 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/studio/src/plugins/object_viewer/particle_system/scheme_manager.cpp b/code/studio/src/plugins/object_viewer/particle_system/scheme_manager.cpp index e9f0e77b9..1cc3d2732 100644 --- a/code/studio/src/plugins/object_viewer/particle_system/scheme_manager.cpp +++ b/code/studio/src/plugins/object_viewer/particle_system/scheme_manager.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) 2011 Dzmitry KAMIAHIN (dnk-88) +// // 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/studio/src/plugins/object_viewer/particle_system/value_gradient_dialog.cpp b/code/studio/src/plugins/object_viewer/particle_system/value_gradient_dialog.cpp index 544ceec98..5754b181e 100644 --- a/code/studio/src/plugins/object_viewer/particle_system/value_gradient_dialog.cpp +++ b/code/studio/src/plugins/object_viewer/particle_system/value_gradient_dialog.cpp @@ -1,6 +1,8 @@ // Object Viewer Qt - MMORPG Framework +// Copyright (C) 2010-2011 Dzmitry KAMIAHIN (dnk-88) +// +// This source file has been modified by the following contributors: // Copyright (C) 2010 Winch Gate Property Limited -// Copyright (C) 2011 Dzmitry Kamiahin // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/object_viewer/particle_system/value_gradient_dialog.h b/code/studio/src/plugins/object_viewer/particle_system/value_gradient_dialog.h index dc2b366d8..afa67e843 100644 --- a/code/studio/src/plugins/object_viewer/particle_system/value_gradient_dialog.h +++ b/code/studio/src/plugins/object_viewer/particle_system/value_gradient_dialog.h @@ -1,6 +1,8 @@ // Object Viewer Qt - MMORPG Framework +// Copyright (C) 2010-2011 Dzmitry KAMIAHIN (dnk-88) +// +// This source file has been modified by the following contributors: // Copyright (C) 2010 Winch Gate Property Limited -// Copyright (C) 2011 Dzmitry Kamiahin // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/object_viewer/sound_settings_page.cpp b/code/studio/src/plugins/object_viewer/sound_settings_page.cpp index 6127cafb7..02815919b 100644 --- a/code/studio/src/plugins/object_viewer/sound_settings_page.cpp +++ b/code/studio/src/plugins/object_viewer/sound_settings_page.cpp @@ -1,6 +1,8 @@ // Object Viewer Qt - MMORPG Framework +// Copyright (C) 2011 Dzmitry KAMIAHIN (dnk-88) +// +// This source file has been modified by the following contributors: // Copyright (C) 2010 Winch Gate Property Limited -// Copyright (C) 2011 Dzmitry Kamiahin // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/object_viewer/sound_settings_page.h b/code/studio/src/plugins/object_viewer/sound_settings_page.h index 0e5361f54..841c0a0b4 100644 --- a/code/studio/src/plugins/object_viewer/sound_settings_page.h +++ b/code/studio/src/plugins/object_viewer/sound_settings_page.h @@ -1,6 +1,8 @@ // Object Viewer Qt - MMORPG Framework +// Copyright (C) 2011 Dzmitry KAMIAHIN (dnk-88) +// +// This source file has been modified by the following contributors: // Copyright (C) 2010 Winch Gate Property Limited -// Copyright (C) 2011 Dzmitry Kamiahin // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/object_viewer/sound_system.cpp b/code/studio/src/plugins/object_viewer/sound_system.cpp index afa315e0f..702e963f0 100644 --- a/code/studio/src/plugins/object_viewer/sound_system.cpp +++ b/code/studio/src/plugins/object_viewer/sound_system.cpp @@ -1,6 +1,10 @@ // NeL - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2010-2011 Dzmitry KAMIAHIN (dnk-88) +// Copyright (C) 2012 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/studio/src/plugins/object_viewer/sound_system.h b/code/studio/src/plugins/object_viewer/sound_system.h index 79ea68a46..edbf82403 100644 --- a/code/studio/src/plugins/object_viewer/sound_system.h +++ b/code/studio/src/plugins/object_viewer/sound_system.h @@ -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) 2010-2011 Dzmitry KAMIAHIN (dnk-88) +// // 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/studio/src/plugins/object_viewer/vegetable_settings_page.cpp b/code/studio/src/plugins/object_viewer/vegetable_settings_page.cpp index 68a1f4b98..cdf0ce4be 100644 --- a/code/studio/src/plugins/object_viewer/vegetable_settings_page.cpp +++ b/code/studio/src/plugins/object_viewer/vegetable_settings_page.cpp @@ -1,6 +1,8 @@ // Object Viewer Qt - MMORPG Framework +// Copyright (C) 2011 Dzmitry KAMIAHIN (dnk-88) +// +// This source file has been modified by the following contributors: // Copyright (C) 2010 Winch Gate Property Limited -// Copyright (C) 2011 Dzmitry Kamiahin // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/object_viewer/vegetable_settings_page.h b/code/studio/src/plugins/object_viewer/vegetable_settings_page.h index b66d070ba..fb20ae9aa 100644 --- a/code/studio/src/plugins/object_viewer/vegetable_settings_page.h +++ b/code/studio/src/plugins/object_viewer/vegetable_settings_page.h @@ -1,6 +1,8 @@ // Object Viewer Qt - MMORPG Framework +// Copyright (C) 2011 Dzmitry KAMIAHIN (dnk-88) +// +// This source file has been modified by the following contributors: // Copyright (C) 2010 Winch Gate Property Limited -// Copyright (C) 2011 Dzmitry Kamiahin // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/object_viewer/widgets/hoverpoints.cpp b/code/studio/src/plugins/object_viewer/widgets/hoverpoints.cpp index 0161a3273..184053ab9 100644 --- a/code/studio/src/plugins/object_viewer/widgets/hoverpoints.cpp +++ b/code/studio/src/plugins/object_viewer/widgets/hoverpoints.cpp @@ -1,7 +1,8 @@ // Object Viewer Qt - MMORPG Framework +// Copyright (C) 2010 Dzmitry KAMIAHIN (dnk-88) +// +// This source file has been modified by the following contributors: // Copyright (C) 2010 Winch Gate Property Limited -// Copyright (C) 2010 Dzmitry Kamiahin -// Parts by Nokia Corporation (qt-info@nokia.com) Copyright (C) 2009. // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/object_viewer/widgets/hoverpoints.h b/code/studio/src/plugins/object_viewer/widgets/hoverpoints.h index 7d4e3f917..f6a6e8b76 100644 --- a/code/studio/src/plugins/object_viewer/widgets/hoverpoints.h +++ b/code/studio/src/plugins/object_viewer/widgets/hoverpoints.h @@ -1,7 +1,8 @@ // Object Viewer Qt - MMORPG Framework +// Copyright (C) 2010 Dzmitry KAMIAHIN (dnk-88) +// +// This source file has been modified by the following contributors: // Copyright (C) 2010 Winch Gate Property Limited -// Copyright (C) 2010 Dzmitry Kamiahin -// Parts by Nokia Corporation (qt-info@nokia.com) Copyright (C) 2009. // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/ovqt_sheet_builder/ovqt_sheet_builder.cpp b/code/studio/src/plugins/ovqt_sheet_builder/ovqt_sheet_builder.cpp index 21358ec6f..ecb7c8d31 100644 --- a/code/studio/src/plugins/ovqt_sheet_builder/ovqt_sheet_builder.cpp +++ b/code/studio/src/plugins/ovqt_sheet_builder/ovqt_sheet_builder.cpp @@ -1,6 +1,10 @@ // NeL - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2010-2011 Dzmitry KAMIAHIN (dnk-88) +// Copyright (C) 2014 Laszlo KIS-ADAM (dfighter) +// // 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/studio/src/plugins/ovqt_sheet_builder/ovqt_sheet_builder.h b/code/studio/src/plugins/ovqt_sheet_builder/ovqt_sheet_builder.h index 21e2855c1..2a1328caf 100644 --- a/code/studio/src/plugins/ovqt_sheet_builder/ovqt_sheet_builder.h +++ b/code/studio/src/plugins/ovqt_sheet_builder/ovqt_sheet_builder.h @@ -1,6 +1,10 @@ // NeL - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2010-2011 Dzmitry KAMIAHIN (dnk-88) +// Copyright (C) 2014 Laszlo KIS-ADAM (dfighter) +// // 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/studio/src/plugins/ovqt_sheet_builder/sheetbuilder.h b/code/studio/src/plugins/ovqt_sheet_builder/sheetbuilder.h index eb9b3bc22..f976513f7 100644 --- a/code/studio/src/plugins/ovqt_sheet_builder/sheetbuilder.h +++ b/code/studio/src/plugins/ovqt_sheet_builder/sheetbuilder.h @@ -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) 2010-2011 Dzmitry KAMIAHIN (dnk-88) +// // 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/studio/src/plugins/ovqt_sheet_builder/sheetbuilderconfgdialog.cpp b/code/studio/src/plugins/ovqt_sheet_builder/sheetbuilderconfgdialog.cpp index aeb632fba..8cec3ed21 100644 --- a/code/studio/src/plugins/ovqt_sheet_builder/sheetbuilderconfgdialog.cpp +++ b/code/studio/src/plugins/ovqt_sheet_builder/sheetbuilderconfgdialog.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) 2010-2011 Dzmitry KAMIAHIN (dnk-88) +// // 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/studio/src/plugins/ovqt_sheet_builder/sheetbuilderconfgdialog.h b/code/studio/src/plugins/ovqt_sheet_builder/sheetbuilderconfgdialog.h index 77455c92d..f691e26b7 100644 --- a/code/studio/src/plugins/ovqt_sheet_builder/sheetbuilderconfgdialog.h +++ b/code/studio/src/plugins/ovqt_sheet_builder/sheetbuilderconfgdialog.h @@ -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) 2010-2011 Dzmitry KAMIAHIN (dnk-88) +// // 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/studio/src/plugins/ovqt_sheet_builder/sheetbuilderdialog.cpp b/code/studio/src/plugins/ovqt_sheet_builder/sheetbuilderdialog.cpp index c999daa17..1e1f83782 100644 --- a/code/studio/src/plugins/ovqt_sheet_builder/sheetbuilderdialog.cpp +++ b/code/studio/src/plugins/ovqt_sheet_builder/sheetbuilderdialog.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) 2010-2011 Dzmitry KAMIAHIN (dnk-88) +// // 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/studio/src/plugins/ovqt_sheet_builder/sheetbuilderdialog.h b/code/studio/src/plugins/ovqt_sheet_builder/sheetbuilderdialog.h index 19dff2188..efc27df19 100644 --- a/code/studio/src/plugins/ovqt_sheet_builder/sheetbuilderdialog.h +++ b/code/studio/src/plugins/ovqt_sheet_builder/sheetbuilderdialog.h @@ -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) 2010-2011 Dzmitry KAMIAHIN (dnk-88) +// // 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/studio/src/plugins/tile_editor/tile_editor_main_window.cpp b/code/studio/src/plugins/tile_editor/tile_editor_main_window.cpp index 4b00fb044..d0dd5faa4 100644 --- a/code/studio/src/plugins/tile_editor/tile_editor_main_window.cpp +++ b/code/studio/src/plugins/tile_editor/tile_editor_main_window.cpp @@ -1,6 +1,10 @@ // Object Viewer Qt - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2011-2012 Matt RAYKOWSKI (sfb) +// Copyright (C) 2014 Laszlo KIS-ADAM (dfighter) +// // 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/studio/src/plugins/tile_editor/tile_editor_main_window.h b/code/studio/src/plugins/tile_editor/tile_editor_main_window.h index d06d6deca..628bf3d49 100644 --- a/code/studio/src/plugins/tile_editor/tile_editor_main_window.h +++ b/code/studio/src/plugins/tile_editor/tile_editor_main_window.h @@ -1,6 +1,10 @@ // Object Viewer Qt - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2011-2012 Matt RAYKOWSKI (sfb) +// Copyright (C) 2014 Laszlo KIS-ADAM (dfighter) +// // 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/studio/src/plugins/tile_editor/tile_editor_plugin.cpp b/code/studio/src/plugins/tile_editor/tile_editor_plugin.cpp index b10eb6074..ac1bc225e 100644 --- a/code/studio/src/plugins/tile_editor/tile_editor_plugin.cpp +++ b/code/studio/src/plugins/tile_editor/tile_editor_plugin.cpp @@ -1,6 +1,10 @@ // Object Viewer Qt - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2014 Jan BOON (Kaetemi) +// Copyright (C) 2014 Laszlo KIS-ADAM (dfighter) +// // 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/studio/src/plugins/tile_editor/tile_editor_plugin.h b/code/studio/src/plugins/tile_editor/tile_editor_plugin.h index 70fb38e77..20a20111e 100644 --- a/code/studio/src/plugins/tile_editor/tile_editor_plugin.h +++ b/code/studio/src/plugins/tile_editor/tile_editor_plugin.h @@ -1,6 +1,10 @@ // Object Viewer Qt - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2011 Matt RAYKOWSKI (sfb) +// Copyright (C) 2014 Laszlo KIS-ADAM (dfighter) +// // 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/studio/src/plugins/tile_editor/tile_item.cpp b/code/studio/src/plugins/tile_editor/tile_item.cpp index 71fe336a2..10f9b0202 100644 --- a/code/studio/src/plugins/tile_editor/tile_item.cpp +++ b/code/studio/src/plugins/tile_editor/tile_item.cpp @@ -1,6 +1,10 @@ // Object Viewer Qt - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2011-2012 Matt RAYKOWSKI (sfb) +// Copyright (C) 2014 Laszlo KIS-ADAM (dfighter) +// // 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/studio/src/plugins/tile_editor/tile_item.h b/code/studio/src/plugins/tile_editor/tile_item.h index 5387a710d..c38261789 100644 --- a/code/studio/src/plugins/tile_editor/tile_item.h +++ b/code/studio/src/plugins/tile_editor/tile_item.h @@ -1,6 +1,10 @@ // Object Viewer Qt - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2011 Matt RAYKOWSKI (sfb) +// Copyright (C) 2014 Laszlo KIS-ADAM (dfighter) +// // 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/studio/src/plugins/tile_editor/tile_item_delegate.cpp b/code/studio/src/plugins/tile_editor/tile_item_delegate.cpp index 6f9479354..a3f50e691 100644 --- a/code/studio/src/plugins/tile_editor/tile_item_delegate.cpp +++ b/code/studio/src/plugins/tile_editor/tile_item_delegate.cpp @@ -1,6 +1,9 @@ // Object Viewer Qt - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2011 Matt RAYKOWSKI (sfb) +// // 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/studio/src/plugins/tile_editor/tile_item_delegate.h b/code/studio/src/plugins/tile_editor/tile_item_delegate.h index 015f32021..00bd521c0 100644 --- a/code/studio/src/plugins/tile_editor/tile_item_delegate.h +++ b/code/studio/src/plugins/tile_editor/tile_item_delegate.h @@ -1,6 +1,10 @@ // Object Viewer Qt - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2011 Matt RAYKOWSKI (sfb) +// Copyright (C) 2014 Laszlo KIS-ADAM (dfighter) +// // 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/studio/src/plugins/tile_editor/tile_model.cpp b/code/studio/src/plugins/tile_editor/tile_model.cpp index 2af4c6a84..c819a32f6 100644 --- a/code/studio/src/plugins/tile_editor/tile_model.cpp +++ b/code/studio/src/plugins/tile_editor/tile_model.cpp @@ -1,6 +1,10 @@ // Object Viewer Qt - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2011-2012 Matt RAYKOWSKI (sfb) +// Copyright (C) 2014 Laszlo KIS-ADAM (dfighter) +// // 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/studio/src/plugins/tile_editor/tile_model.h b/code/studio/src/plugins/tile_editor/tile_model.h index c6bfc8788..9cf836b14 100644 --- a/code/studio/src/plugins/tile_editor/tile_model.h +++ b/code/studio/src/plugins/tile_editor/tile_model.h @@ -1,6 +1,10 @@ // Object Viewer Qt - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2011-2012 Matt RAYKOWSKI (sfb) +// Copyright (C) 2014 Laszlo KIS-ADAM (dfighter) +// // 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/studio/src/plugins/translation_manager/editor_phrase.cpp b/code/studio/src/plugins/translation_manager/editor_phrase.cpp index 01ec90fe1..510255828 100644 --- a/code/studio/src/plugins/translation_manager/editor_phrase.cpp +++ b/code/studio/src/plugins/translation_manager/editor_phrase.cpp @@ -1,5 +1,5 @@ // Translation Manager Plugin - OVQT Plugin -// Copyright (C) 2011 Emanuel Costea +// Copyright (C) 2011 Emanuel COSTEA // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/translation_manager/editor_phrase.h b/code/studio/src/plugins/translation_manager/editor_phrase.h index f020c1923..404a17d51 100644 --- a/code/studio/src/plugins/translation_manager/editor_phrase.h +++ b/code/studio/src/plugins/translation_manager/editor_phrase.h @@ -1,6 +1,8 @@ // Translation Manager Plugin - OVQT Plugin +// Copyright (C) 2011 Emanuel COSTEA +// +// This source file has been modified by the following contributors: // Copyright (C) 2010 Winch Gate Property Limited -// Copyright (C) 2011 Emanuel Costea // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/translation_manager/editor_worksheet.cpp b/code/studio/src/plugins/translation_manager/editor_worksheet.cpp index c353bb1aa..4ea127527 100644 --- a/code/studio/src/plugins/translation_manager/editor_worksheet.cpp +++ b/code/studio/src/plugins/translation_manager/editor_worksheet.cpp @@ -1,6 +1,8 @@ // Translation Manager Plugin - OVQT Plugin +// Copyright (C) 2011 Emanuel COSTEA +// +// This source file has been modified by the following contributors: // Copyright (C) 2010 Winch Gate Property Limited -// Copyright (C) 2011 Emanuel Costea // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/translation_manager/editor_worksheet.h b/code/studio/src/plugins/translation_manager/editor_worksheet.h index d2a870daf..498f51564 100644 --- a/code/studio/src/plugins/translation_manager/editor_worksheet.h +++ b/code/studio/src/plugins/translation_manager/editor_worksheet.h @@ -1,6 +1,8 @@ // Translation Manager Plugin - OVQT Plugin +// Copyright (C) 2011 Emanuel COSTEA +// +// This source file has been modified by the following contributors: // Copyright (C) 2010 Winch Gate Property Limited -// Copyright (C) 2011 Emanuel Costea // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/translation_manager/extract_bot_names.cpp b/code/studio/src/plugins/translation_manager/extract_bot_names.cpp index ee65ca73c..ca867d4b2 100644 --- a/code/studio/src/plugins/translation_manager/extract_bot_names.cpp +++ b/code/studio/src/plugins/translation_manager/extract_bot_names.cpp @@ -1,6 +1,9 @@ // Translation Manager Plugin - OVQT Plugin +// Copyright (C) 2011 Emanuel COSTEA +// +// This source file has been modified by the following contributors: // Copyright (C) 2010 Winch Gate Property Limited -// Copyright (C) 2011 Emanuel Costea +// Copyright (C) 2011 Dzmitry KAMIAHIN (dnk-88) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/translation_manager/extract_bot_names.h b/code/studio/src/plugins/translation_manager/extract_bot_names.h index 208b4db5c..1027920a7 100644 --- a/code/studio/src/plugins/translation_manager/extract_bot_names.h +++ b/code/studio/src/plugins/translation_manager/extract_bot_names.h @@ -1,6 +1,9 @@ // Translation Manager Plugin - OVQT Plugin +// Copyright (C) 2011 Emanuel COSTEA +// +// This source file has been modified by the following contributors: // Copyright (C) 2010 Winch Gate Property Limited -// Copyright (C) 2011 Emanuel Costea +// Copyright (C) 2011 Dzmitry KAMIAHIN (dnk-88) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/translation_manager/extract_new_sheet_names.cpp b/code/studio/src/plugins/translation_manager/extract_new_sheet_names.cpp index 984f86d17..98c0164f6 100644 --- a/code/studio/src/plugins/translation_manager/extract_new_sheet_names.cpp +++ b/code/studio/src/plugins/translation_manager/extract_new_sheet_names.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) 2011 Dzmitry KAMIAHIN (dnk-88) +// // 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/studio/src/plugins/translation_manager/extract_new_sheet_names.h b/code/studio/src/plugins/translation_manager/extract_new_sheet_names.h index 01d0f1a0a..c445dd975 100644 --- a/code/studio/src/plugins/translation_manager/extract_new_sheet_names.h +++ b/code/studio/src/plugins/translation_manager/extract_new_sheet_names.h @@ -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) 2011 Dzmitry KAMIAHIN (dnk-88) +// // 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/studio/src/plugins/translation_manager/ftp_selection.cpp b/code/studio/src/plugins/translation_manager/ftp_selection.cpp index 876599b61..ddaad8745 100644 --- a/code/studio/src/plugins/translation_manager/ftp_selection.cpp +++ b/code/studio/src/plugins/translation_manager/ftp_selection.cpp @@ -1,5 +1,8 @@ // Translation Manager Plugin - OVQT Plugin -// Copyright (C) 2011 Emanuel Costea +// Copyright (C) 2011 Emanuel COSTEA +// +// This source file has been modified by the following contributors: +// Copyright (C) 2011 Dzmitry KAMIAHIN (dnk-88) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/translation_manager/source_selection.cpp b/code/studio/src/plugins/translation_manager/source_selection.cpp index 518906db0..043d82b3d 100644 --- a/code/studio/src/plugins/translation_manager/source_selection.cpp +++ b/code/studio/src/plugins/translation_manager/source_selection.cpp @@ -1,6 +1,10 @@ // Translation Manager Plugin - OVQT Plugin +// Copyright (C) 2011 Emanuel COSTEA +// +// This source file has been modified by the following contributors: // Copyright (C) 2010 Winch Gate Property Limited -// Copyright (C) 2011 Emanuel Costea +// Copyright (C) 2011 Dzmitry KAMIAHIN (dnk-88) +// Copyright (C) 2011 Matt RAYKOWSKI (sfb) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/translation_manager/source_selection.h b/code/studio/src/plugins/translation_manager/source_selection.h index 7b6fc2cb9..5d7c7b460 100644 --- a/code/studio/src/plugins/translation_manager/source_selection.h +++ b/code/studio/src/plugins/translation_manager/source_selection.h @@ -1,5 +1,8 @@ // Translation Manager Plugin - OVQT Plugin -// Copyright (C) 2011 Emanuel Costea +// Copyright (C) 2011 Emanuel COSTEA +// +// This source file has been modified by the following contributors: +// Copyright (C) 2011 Dzmitry KAMIAHIN (dnk-88) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/translation_manager/translation_manager_constants.h b/code/studio/src/plugins/translation_manager/translation_manager_constants.h index 7ff813d40..ae91d54cb 100644 --- a/code/studio/src/plugins/translation_manager/translation_manager_constants.h +++ b/code/studio/src/plugins/translation_manager/translation_manager_constants.h @@ -1,5 +1,9 @@ // Translation Manager Plugin - OVQT Plugin -// Copyright (C) 2011 Emanuel Costea +// Copyright (C) 2011 Emanuel COSTEA +// +// This source file has been modified by the following contributors: +// Copyright (C) 2011 Dzmitry KAMIAHIN (dnk-88) +// Copyright (C) 2014 Laszlo KIS-ADAM (dfighter) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/translation_manager/translation_manager_editor.h b/code/studio/src/plugins/translation_manager/translation_manager_editor.h index 3ded2c3af..1141f43fd 100644 --- a/code/studio/src/plugins/translation_manager/translation_manager_editor.h +++ b/code/studio/src/plugins/translation_manager/translation_manager_editor.h @@ -1,5 +1,9 @@ // Translation Manager Plugin - OVQT Plugin -// Copyright (C) 2011 Emanuel Costea +// Copyright (C) 2011 Emanuel COSTEA +// +// This source file has been modified by the following contributors: +// Copyright (C) 2011 Dzmitry KAMIAHIN (dnk-88) +// Copyright (C) 2014 Laszlo KIS-ADAM (dfighter) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/translation_manager/translation_manager_main_window.cpp b/code/studio/src/plugins/translation_manager/translation_manager_main_window.cpp index c5228fae6..047de7e8d 100644 --- a/code/studio/src/plugins/translation_manager/translation_manager_main_window.cpp +++ b/code/studio/src/plugins/translation_manager/translation_manager_main_window.cpp @@ -1,6 +1,9 @@ // Translation Manager Plugin - OVQT Plugin +// Copyright (C) 2011 Emanuel COSTEA +// +// This source file has been modified by the following contributors: // Copyright (C) 2010 Winch Gate Property Limited -// Copyright (C) 2011 Emanuel Costea +// Copyright (C) 2014 Laszlo KIS-ADAM (dfighter) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/translation_manager/translation_manager_main_window.h b/code/studio/src/plugins/translation_manager/translation_manager_main_window.h index 34f60ff19..d278a02b9 100644 --- a/code/studio/src/plugins/translation_manager/translation_manager_main_window.h +++ b/code/studio/src/plugins/translation_manager/translation_manager_main_window.h @@ -1,5 +1,9 @@ // Translation Manager Plugin - OVQT Plugin -// Copyright (C) 2011 Emanuel Costea +// Copyright (C) 2011 Emanuel COSTEA +// +// This source file has been modified by the following contributors: +// Copyright (C) 2011 Dzmitry KAMIAHIN (dnk-88) +// Copyright (C) 2014 Laszlo KIS-ADAM (dfighter) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/translation_manager/translation_manager_plugin.cpp b/code/studio/src/plugins/translation_manager/translation_manager_plugin.cpp index 3fafc7510..1e4db0c18 100644 --- a/code/studio/src/plugins/translation_manager/translation_manager_plugin.cpp +++ b/code/studio/src/plugins/translation_manager/translation_manager_plugin.cpp @@ -1,6 +1,10 @@ // Translation Manager Plugin - OVQT Plugin +// Copyright (C) 2011 Emanuel COSTEA +// +// This source file has been modified by the following contributors: // Copyright (C) 2010 Winch Gate Property Limited -// Copyright (C) 2011 Emanuel Costea +// Copyright (C) 2011 Dzmitry KAMIAHIN (dnk-88) +// Copyright (C) 2014 Laszlo KIS-ADAM (dfighter) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/translation_manager/translation_manager_plugin.h b/code/studio/src/plugins/translation_manager/translation_manager_plugin.h index fb03a49f1..0b3fb1f1e 100644 --- a/code/studio/src/plugins/translation_manager/translation_manager_plugin.h +++ b/code/studio/src/plugins/translation_manager/translation_manager_plugin.h @@ -1,6 +1,9 @@ // Translation Manager Plugin - OVQT Plugin +// Copyright (C) 2011 Emanuel COSTEA +// +// This source file has been modified by the following contributors: // Copyright (C) 2010 Winch Gate Property Limited -// Copyright (C) 2011 Emanuel Costea +// Copyright (C) 2011 Dzmitry KAMIAHIN (dnk-88) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/translation_manager/translation_manager_settings_page.cpp b/code/studio/src/plugins/translation_manager/translation_manager_settings_page.cpp index 427a26674..54fcd473c 100644 --- a/code/studio/src/plugins/translation_manager/translation_manager_settings_page.cpp +++ b/code/studio/src/plugins/translation_manager/translation_manager_settings_page.cpp @@ -1,5 +1,8 @@ // Translation Manager Plugin - OVQT Plugin -// Copyright (C) 2011 Emanuel Costea +// Copyright (C) 2011 Emanuel COSTEA +// +// This source file has been modified by the following contributors: +// Copyright (C) 2011 Dzmitry KAMIAHIN (dnk-88) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/translation_manager/translation_manager_settings_page.h b/code/studio/src/plugins/translation_manager/translation_manager_settings_page.h index 9b34d87ba..38d3962c0 100644 --- a/code/studio/src/plugins/translation_manager/translation_manager_settings_page.h +++ b/code/studio/src/plugins/translation_manager/translation_manager_settings_page.h @@ -1,6 +1,9 @@ // Translation Manager Plugin - OVQT Plugin +// Copyright (C) 2011 Emanuel COSTEA +// +// This source file has been modified by the following contributors: // Copyright (C) 2010 Winch Gate Property Limited -// Copyright (C) 2011 Emanuel Costea +// Copyright (C) 2011 Dzmitry KAMIAHIN (dnk-88) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/translation_manager/uxt_editor.h b/code/studio/src/plugins/translation_manager/uxt_editor.h index b749e65e3..bc3eb4206 100644 --- a/code/studio/src/plugins/translation_manager/uxt_editor.h +++ b/code/studio/src/plugins/translation_manager/uxt_editor.h @@ -1,6 +1,9 @@ // Ryzom Core Studio - Translation Manager Plugin // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2014 Laszlo KIS-ADAM (dfighter) +// // 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/studio/src/plugins/world_editor/const_string_array_editor.cpp b/code/studio/src/plugins/world_editor/const_string_array_editor.cpp index 1f9907646..0065c7010 100644 --- a/code/studio/src/plugins/world_editor/const_string_array_editor.cpp +++ b/code/studio/src/plugins/world_editor/const_string_array_editor.cpp @@ -1,6 +1,9 @@ // Ryzom Core Studio World Editor plugin // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2014 Laszlo KIS-ADAM (dfighter) +// // 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/studio/src/plugins/world_editor/const_string_array_editor.h b/code/studio/src/plugins/world_editor/const_string_array_editor.h index a2c458e7c..89521677b 100644 --- a/code/studio/src/plugins/world_editor/const_string_array_editor.h +++ b/code/studio/src/plugins/world_editor/const_string_array_editor.h @@ -1,6 +1,9 @@ // Ryzom Core Studio World Editor plugin // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2014 Laszlo KIS-ADAM (dfighter) +// // 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/studio/src/plugins/world_editor/const_string_array_property.cpp b/code/studio/src/plugins/world_editor/const_string_array_property.cpp index 5ef7566d8..17e202ca8 100644 --- a/code/studio/src/plugins/world_editor/const_string_array_property.cpp +++ b/code/studio/src/plugins/world_editor/const_string_array_property.cpp @@ -1,6 +1,9 @@ // Ryzom Core Studio World Editor plugin // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2014 Laszlo KIS-ADAM (dfighter) +// // 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/studio/src/plugins/world_editor/const_string_array_property.h b/code/studio/src/plugins/world_editor/const_string_array_property.h index a079f4802..78070ef57 100644 --- a/code/studio/src/plugins/world_editor/const_string_array_property.h +++ b/code/studio/src/plugins/world_editor/const_string_array_property.h @@ -1,6 +1,9 @@ // Ryzom Core Studio World Editor plugin // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2014 Laszlo KIS-ADAM (dfighter) +// // 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/studio/src/plugins/world_editor/primitive_item.cpp b/code/studio/src/plugins/world_editor/primitive_item.cpp index e14736bb0..b7bba9c70 100644 --- a/code/studio/src/plugins/world_editor/primitive_item.cpp +++ b/code/studio/src/plugins/world_editor/primitive_item.cpp @@ -1,5 +1,5 @@ // Object Viewer Qt - MMORPG Framework -// Copyright (C) 2011 Dzmitry Kamiahin +// Copyright (C) 2011 Dzmitry KAMIAHIN (dnk-88) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/world_editor/primitive_item.h b/code/studio/src/plugins/world_editor/primitive_item.h index 0b7cd8b4e..ef1e9504c 100644 --- a/code/studio/src/plugins/world_editor/primitive_item.h +++ b/code/studio/src/plugins/world_editor/primitive_item.h @@ -1,5 +1,5 @@ // Object Viewer Qt - MMORPG Framework -// Copyright (C) 2011 Dzmitry Kamiahin +// Copyright (C) 2011 Dzmitry KAMIAHIN (dnk-88) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/world_editor/primitives_model.cpp b/code/studio/src/plugins/world_editor/primitives_model.cpp index db8a7f44b..ac8bffa71 100644 --- a/code/studio/src/plugins/world_editor/primitives_model.cpp +++ b/code/studio/src/plugins/world_editor/primitives_model.cpp @@ -1,5 +1,5 @@ // Object Viewer Qt - MMORPG Framework -// Copyright (C) 2011 Dzmitry Kamiahin +// Copyright (C) 2011 Dzmitry KAMIAHIN (dnk-88) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/world_editor/primitives_model.h b/code/studio/src/plugins/world_editor/primitives_model.h index cd01532dd..1861ba8ff 100644 --- a/code/studio/src/plugins/world_editor/primitives_model.h +++ b/code/studio/src/plugins/world_editor/primitives_model.h @@ -1,5 +1,5 @@ // Object Viewer Qt - MMORPG Framework -// Copyright (C) 2011 Dzmitry Kamiahin +// Copyright (C) 2011 Dzmitry KAMIAHIN (dnk-88) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/world_editor/primitives_view.cpp b/code/studio/src/plugins/world_editor/primitives_view.cpp index ffa4ae955..0f54af5f4 100644 --- a/code/studio/src/plugins/world_editor/primitives_view.cpp +++ b/code/studio/src/plugins/world_editor/primitives_view.cpp @@ -1,5 +1,5 @@ // Object Viewer Qt - MMORPG Framework -// Copyright (C) 2011 Dzmitry Kamiahin +// Copyright (C) 2011 Dzmitry KAMIAHIN (dnk-88) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/world_editor/primitives_view.h b/code/studio/src/plugins/world_editor/primitives_view.h index 5810b6780..0a1745360 100644 --- a/code/studio/src/plugins/world_editor/primitives_view.h +++ b/code/studio/src/plugins/world_editor/primitives_view.h @@ -1,5 +1,5 @@ // Object Viewer Qt - MMORPG Framework -// Copyright (C) 2011 Dzmitry Kamiahin +// Copyright (C) 2011 Dzmitry KAMIAHIN (dnk-88) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/world_editor/project_settings_dialog.cpp b/code/studio/src/plugins/world_editor/project_settings_dialog.cpp index 86da1bb31..80bede158 100644 --- a/code/studio/src/plugins/world_editor/project_settings_dialog.cpp +++ b/code/studio/src/plugins/world_editor/project_settings_dialog.cpp @@ -1,5 +1,5 @@ // Object Viewer Qt - MMORPG Framework -// Copyright (C) 2011 Dzmitry Kamiahin +// Copyright (C) 2011 Dzmitry KAMIAHIN (dnk-88) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/world_editor/project_settings_dialog.h b/code/studio/src/plugins/world_editor/project_settings_dialog.h index b9a54b9ed..a1fddd629 100644 --- a/code/studio/src/plugins/world_editor/project_settings_dialog.h +++ b/code/studio/src/plugins/world_editor/project_settings_dialog.h @@ -1,5 +1,5 @@ // Object Viewer Qt - MMORPG Framework -// Copyright (C) 2011 Dzmitry Kamiahin +// Copyright (C) 2011 Dzmitry KAMIAHIN (dnk-88) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/world_editor/property_editor_widget.cpp b/code/studio/src/plugins/world_editor/property_editor_widget.cpp index 9c24c8452..1356413fb 100644 --- a/code/studio/src/plugins/world_editor/property_editor_widget.cpp +++ b/code/studio/src/plugins/world_editor/property_editor_widget.cpp @@ -1,6 +1,9 @@ // Object Viewer Qt - MMORPG Framework +// Copyright (C) 2011-2012 Dzmitry KAMIAHIN (dnk-88) +// +// This source file has been modified by the following contributors: // Copyright (C) 2010 Winch Gate Property Limited -// Copyright (C) 2011 Dzmitry Kamiahin +// Copyright (C) 2014 Laszlo KIS-ADAM (dfighter) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/world_editor/property_editor_widget.h b/code/studio/src/plugins/world_editor/property_editor_widget.h index dae7ad13e..8a695efa3 100644 --- a/code/studio/src/plugins/world_editor/property_editor_widget.h +++ b/code/studio/src/plugins/world_editor/property_editor_widget.h @@ -1,6 +1,9 @@ // Object Viewer Qt - MMORPG Framework +// Copyright (C) 2011-2012 Dzmitry KAMIAHIN (dnk-88) +// +// This source file has been modified by the following contributors: // Copyright (C) 2010 Winch Gate Property Limited -// Copyright (C) 2011 Dzmitry Kamiahin +// Copyright (C) 2014 Laszlo KIS-ADAM (dfighter) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/world_editor/world_editor_actions.cpp b/code/studio/src/plugins/world_editor/world_editor_actions.cpp index a25cb5e18..8ea55f85d 100644 --- a/code/studio/src/plugins/world_editor/world_editor_actions.cpp +++ b/code/studio/src/plugins/world_editor/world_editor_actions.cpp @@ -1,5 +1,8 @@ // Object Viewer Qt - MMORPG Framework -// Copyright (C) 2011 Dzmitry Kamiahin +// Copyright (C) 2011 Dzmitry KAMIAHIN (dnk-88) +// +// This source file has been modified by the following contributors: +// Copyright (C) 2014 Laszlo KIS-ADAM (dfighter) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/world_editor/world_editor_actions.h b/code/studio/src/plugins/world_editor/world_editor_actions.h index 95ce093e2..4ac39ed90 100644 --- a/code/studio/src/plugins/world_editor/world_editor_actions.h +++ b/code/studio/src/plugins/world_editor/world_editor_actions.h @@ -1,5 +1,8 @@ // Object Viewer Qt - MMORPG Framework -// Copyright (C) 2011 Dzmitry Kamiahin +// Copyright (C) 2011 Dzmitry KAMIAHIN (dnk-88) +// +// This source file has been modified by the following contributors: +// Copyright (C) 2014 Laszlo KIS-ADAM (dfighter) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/world_editor/world_editor_constants.h b/code/studio/src/plugins/world_editor/world_editor_constants.h index 7ca698697..8bd9c09f5 100644 --- a/code/studio/src/plugins/world_editor/world_editor_constants.h +++ b/code/studio/src/plugins/world_editor/world_editor_constants.h @@ -1,5 +1,5 @@ // Object Viewer Qt - MMORPG Framework -// Copyright (C) 2011 Dzmitry Kamiahin +// Copyright (C) 2011-2012 Dzmitry KAMIAHIN (dnk-88) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/world_editor/world_editor_global.h b/code/studio/src/plugins/world_editor/world_editor_global.h index a7a94ca75..f2df580c6 100644 --- a/code/studio/src/plugins/world_editor/world_editor_global.h +++ b/code/studio/src/plugins/world_editor/world_editor_global.h @@ -1,7 +1,8 @@ // Object Viewer Qt - MMORPG Framework +// Copyright (C) 2011 Dzmitry KAMIAHIN (dnk-88) +// +// This source file has been modified by the following contributors: // Copyright (C) 2010 Winch Gate Property Limited -// Copyright (C) 2011 Dzmitry Kamiahin -// Parts by Nokia Corporation (qt-info@nokia.com) Copyright (C) 2009. // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/world_editor/world_editor_misc.cpp b/code/studio/src/plugins/world_editor/world_editor_misc.cpp index 2dd86df15..7dd3fe2c7 100644 --- a/code/studio/src/plugins/world_editor/world_editor_misc.cpp +++ b/code/studio/src/plugins/world_editor/world_editor_misc.cpp @@ -1,6 +1,9 @@ // Object Viewer Qt - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2014-2015 Laszlo KIS-ADAM (dfighter) +// // 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/studio/src/plugins/world_editor/world_editor_misc.h b/code/studio/src/plugins/world_editor/world_editor_misc.h index 36c7b1a6a..d271eb037 100644 --- a/code/studio/src/plugins/world_editor/world_editor_misc.h +++ b/code/studio/src/plugins/world_editor/world_editor_misc.h @@ -1,6 +1,10 @@ // Object Viewer Qt - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2011 Dzmitry KAMIAHIN (dnk-88) +// Copyright (C) 2014 Laszlo KIS-ADAM (dfighter) +// // 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/studio/src/plugins/world_editor/world_editor_plugin.cpp b/code/studio/src/plugins/world_editor/world_editor_plugin.cpp index 9b9622d00..45548fc00 100644 --- a/code/studio/src/plugins/world_editor/world_editor_plugin.cpp +++ b/code/studio/src/plugins/world_editor/world_editor_plugin.cpp @@ -1,6 +1,9 @@ // Object Viewer Qt - MMORPG Framework +// Copyright (C) 2011 Dzmitry KAMIAHIN (dnk-88) +// +// This source file has been modified by the following contributors: // Copyright (C) 2010 Winch Gate Property Limited -// Copyright (C) 2011 Dzmitry Kamiahin +// Copyright (C) 2014 Laszlo KIS-ADAM (dfighter) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/world_editor/world_editor_plugin.h b/code/studio/src/plugins/world_editor/world_editor_plugin.h index cfb5448e3..8788c3d3f 100644 --- a/code/studio/src/plugins/world_editor/world_editor_plugin.h +++ b/code/studio/src/plugins/world_editor/world_editor_plugin.h @@ -1,6 +1,9 @@ // Object Viewer Qt - MMORPG Framework +// Copyright (C) 2011 Dzmitry KAMIAHIN (dnk-88) +// +// This source file has been modified by the following contributors: // Copyright (C) 2010 Winch Gate Property Limited -// Copyright (C) 2011 Dzmitry Kamiahin +// Copyright (C) 2014 Laszlo KIS-ADAM (dfighter) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/world_editor/world_editor_scene.cpp b/code/studio/src/plugins/world_editor/world_editor_scene.cpp index b4be9c30e..d86a2d57c 100644 --- a/code/studio/src/plugins/world_editor/world_editor_scene.cpp +++ b/code/studio/src/plugins/world_editor/world_editor_scene.cpp @@ -1,5 +1,5 @@ // Object Viewer Qt - MMORPG Framework -// Copyright (C) 2011 Dzmitry Kamiahin +// Copyright (C) 2011 Dzmitry KAMIAHIN (dnk-88) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/world_editor/world_editor_scene.h b/code/studio/src/plugins/world_editor/world_editor_scene.h index 7174c69c8..f88b82c09 100644 --- a/code/studio/src/plugins/world_editor/world_editor_scene.h +++ b/code/studio/src/plugins/world_editor/world_editor_scene.h @@ -1,5 +1,5 @@ // Object Viewer Qt - MMORPG Framework -// Copyright (C) 2011 Dzmitry Kamiahin +// Copyright (C) 2011 Dzmitry KAMIAHIN (dnk-88) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/world_editor/world_editor_scene_item.cpp b/code/studio/src/plugins/world_editor/world_editor_scene_item.cpp index 544feae89..b94e48a0f 100644 --- a/code/studio/src/plugins/world_editor/world_editor_scene_item.cpp +++ b/code/studio/src/plugins/world_editor/world_editor_scene_item.cpp @@ -1,5 +1,5 @@ // Object Viewer Qt - MMORPG Framework -// Copyright (C) 2011 Dzmitry Kamiahin +// Copyright (C) 2011 Dzmitry KAMIAHIN (dnk-88) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/world_editor/world_editor_scene_item.h b/code/studio/src/plugins/world_editor/world_editor_scene_item.h index 9752d783d..0579ef32a 100644 --- a/code/studio/src/plugins/world_editor/world_editor_scene_item.h +++ b/code/studio/src/plugins/world_editor/world_editor_scene_item.h @@ -1,5 +1,5 @@ // Object Viewer Qt - MMORPG Framework -// Copyright (C) 2011 Dzmitry Kamiahin +// Copyright (C) 2011 Dzmitry KAMIAHIN (dnk-88) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/world_editor/world_editor_settings_page.cpp b/code/studio/src/plugins/world_editor/world_editor_settings_page.cpp index d3b8bb849..dc15dc83a 100644 --- a/code/studio/src/plugins/world_editor/world_editor_settings_page.cpp +++ b/code/studio/src/plugins/world_editor/world_editor_settings_page.cpp @@ -1,5 +1,8 @@ // Object Viewer Qt - MMORPG Framework -// Copyright (C) 2011 Dzmitry Kamiahin +// Copyright (C) 2011 Dzmitry KAMIAHIN (dnk-88) +// +// This source file has been modified by the following contributors: +// Copyright (C) 2015 Laszlo KIS-ADAM (dfighter) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/world_editor/world_editor_settings_page.h b/code/studio/src/plugins/world_editor/world_editor_settings_page.h index 7eeb30e1d..1241c61ce 100644 --- a/code/studio/src/plugins/world_editor/world_editor_settings_page.h +++ b/code/studio/src/plugins/world_editor/world_editor_settings_page.h @@ -1,5 +1,8 @@ // Object Viewer Qt - MMORPG Framework -// Copyright (C) 2011 Dzmitry Kamiahin +// Copyright (C) 2011 Dzmitry KAMIAHIN (dnk-88) +// +// This source file has been modified by the following contributors: +// Copyright (C) 2015 Laszlo KIS-ADAM (dfighter) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/world_editor/world_editor_window.cpp b/code/studio/src/plugins/world_editor/world_editor_window.cpp index 6dbd07a8a..0dcd8c932 100644 --- a/code/studio/src/plugins/world_editor/world_editor_window.cpp +++ b/code/studio/src/plugins/world_editor/world_editor_window.cpp @@ -1,5 +1,8 @@ // Object Viewer Qt - MMORPG Framework -// Copyright (C) 2011 Dzmitry Kamiahin +// Copyright (C) 2011 Dzmitry KAMIAHIN (dnk-88) +// +// This source file has been modified by the following contributors: +// Copyright (C) 2014-2015 Laszlo KIS-ADAM (dfighter) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/world_editor/world_editor_window.h b/code/studio/src/plugins/world_editor/world_editor_window.h index 9080187f9..3abd8bd43 100644 --- a/code/studio/src/plugins/world_editor/world_editor_window.h +++ b/code/studio/src/plugins/world_editor/world_editor_window.h @@ -1,5 +1,8 @@ // Object Viewer Qt - MMORPG Framework -// Copyright (C) 2011 Dzmitry Kamiahin +// Copyright (C) 2011 Dzmitry KAMIAHIN (dnk-88) +// +// This source file has been modified by the following contributors: +// Copyright (C) 2014 Laszlo KIS-ADAM (dfighter) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/zone_painter/qnel_widget.cpp b/code/studio/src/plugins/zone_painter/qnel_widget.cpp index 9a67abb80..55881edb3 100644 --- a/code/studio/src/plugins/zone_painter/qnel_widget.cpp +++ b/code/studio/src/plugins/zone_painter/qnel_widget.cpp @@ -1,6 +1,9 @@ // Object Viewer Qt - MMORPG Framework +// Copyright (C) 2011 Dzmitry KAMIAHIN (dnk-88) +// +// This source file has been modified by the following contributors: // Copyright (C) 2010 Winch Gate Property Limited -// Copyright (C) 2011 Dzmitry Kamiahin +// Copyright (C) 2011 Matt RAYKOWSKI (sfb) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/zone_painter/qnel_widget.h b/code/studio/src/plugins/zone_painter/qnel_widget.h index a54e6bb8a..77ecf6da3 100644 --- a/code/studio/src/plugins/zone_painter/qnel_widget.h +++ b/code/studio/src/plugins/zone_painter/qnel_widget.h @@ -1,6 +1,9 @@ // Object Viewer Qt - MMORPG Framework +// Copyright (C) 2011 Dzmitry KAMIAHIN (dnk-88) +// +// This source file has been modified by the following contributors: // Copyright (C) 2010 Winch Gate Property Limited -// Copyright (C) 2011 Dzmitry Kamiahin +// Copyright (C) 2011 Matt RAYKOWSKI (sfb) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/zone_painter/zone_painter_model.cpp b/code/studio/src/plugins/zone_painter/zone_painter_model.cpp index 4ab93d62d..a137d6251 100644 --- a/code/studio/src/plugins/zone_painter/zone_painter_model.cpp +++ b/code/studio/src/plugins/zone_painter/zone_painter_model.cpp @@ -1,6 +1,9 @@ // Object Viewer Qt - MMORPG Framework +// Copyright (C) 2011 Dzmitry KAMIAHIN (dnk-88) +// +// This source file has been modified by the following contributors: // Copyright (C) 2010 Winch Gate Property Limited -// Copyright (C) 2011 Dzmitry Kamiahin +// Copyright (C) 2011 Matt RAYKOWSKI (sfb) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/zone_painter/zone_painter_model.h b/code/studio/src/plugins/zone_painter/zone_painter_model.h index 259634b63..d8d4ee29c 100644 --- a/code/studio/src/plugins/zone_painter/zone_painter_model.h +++ b/code/studio/src/plugins/zone_painter/zone_painter_model.h @@ -1,6 +1,9 @@ // Object Viewer Qt - MMORPG Framework +// Copyright (C) 2011 Dzmitry KAMIAHIN (dnk-88) +// +// This source file has been modified by the following contributors: // Copyright (C) 2010 Winch Gate Property Limited -// Copyright (C) 2011 Dzmitry Kamiahin +// Copyright (C) 2011 Matt RAYKOWSKI (sfb) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/zone_painter/zone_painter_settings_page.cpp b/code/studio/src/plugins/zone_painter/zone_painter_settings_page.cpp index fb10ace5a..3d8aa5b3d 100644 --- a/code/studio/src/plugins/zone_painter/zone_painter_settings_page.cpp +++ b/code/studio/src/plugins/zone_painter/zone_painter_settings_page.cpp @@ -1,6 +1,8 @@ // Object Viewer Qt - MMORPG Framework +// Copyright (C) 2011 Dzmitry KAMIAHIN (dnk-88) +// +// This source file has been modified by the following contributors: // Copyright (C) 2010 Winch Gate Property Limited -// Copyright (C) 2011 Dzmitry Kamiahin // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/zone_painter/zone_painter_settings_page.h b/code/studio/src/plugins/zone_painter/zone_painter_settings_page.h index d84b117eb..1610cad26 100644 --- a/code/studio/src/plugins/zone_painter/zone_painter_settings_page.h +++ b/code/studio/src/plugins/zone_painter/zone_painter_settings_page.h @@ -1,6 +1,9 @@ // Object Viewer Qt - MMORPG Framework +// Copyright (C) 2011 Dzmitry KAMIAHIN (dnk-88) +// +// This source file has been modified by the following contributors: // Copyright (C) 2010 Winch Gate Property Limited -// Copyright (C) 2011 Dzmitry Kamiahin +// Copyright (C) 2011 Matt RAYKOWSKI (sfb) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/pm_watcher.cpp b/code/studio/src/pm_watcher.cpp index 0bbd28ca1..6926048fd 100644 --- a/code/studio/src/pm_watcher.cpp +++ b/code/studio/src/pm_watcher.cpp @@ -1,6 +1,9 @@ // Ryzom Core - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2014 Laszlo KIS-ADAM (dfighter) +// // 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/studio/src/pm_watcher.h b/code/studio/src/pm_watcher.h index e37e81401..ee0e8b1a2 100644 --- a/code/studio/src/pm_watcher.h +++ b/code/studio/src/pm_watcher.h @@ -1,6 +1,9 @@ // Ryzom Core - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2014 Laszlo KIS-ADAM (dfighter) +// // 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/studio/src/splash_screen.cpp b/code/studio/src/splash_screen.cpp index 36f7b3bc0..6d8360b9f 100644 --- a/code/studio/src/splash_screen.cpp +++ b/code/studio/src/splash_screen.cpp @@ -1,6 +1,9 @@ // Ryzom Core - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2014 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/studio/src/splash_screen.h b/code/studio/src/splash_screen.h index c4ba0f648..c7502ffba 100644 --- a/code/studio/src/splash_screen.h +++ b/code/studio/src/splash_screen.h @@ -1,6 +1,9 @@ // Ryzom Core - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2014 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/studio/src/startup_settings_dlg.cpp b/code/studio/src/startup_settings_dlg.cpp index 645df7040..6d2e14a7e 100644 --- a/code/studio/src/startup_settings_dlg.cpp +++ b/code/studio/src/startup_settings_dlg.cpp @@ -1,6 +1,10 @@ // Ryzom Core - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2014 Jan BOON (Kaetemi) +// Copyright (C) 2015 Laszlo KIS-ADAM (dfighter) +// // 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/studio/src/startup_settings_dlg.h b/code/studio/src/startup_settings_dlg.h index 49dd01ef7..25b9a0892 100644 --- a/code/studio/src/startup_settings_dlg.h +++ b/code/studio/src/startup_settings_dlg.h @@ -1,6 +1,10 @@ // Ryzom Core - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // +// This source file has been modified by the following contributors: +// Copyright (C) 2014 Jan BOON (Kaetemi) +// Copyright (C) 2015 Laszlo KIS-ADAM (dfighter) +// // 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 From 22f487876c1fdf77c86288f6eecf9dc002f6dec3 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Fri, 29 Nov 2019 18:48:25 +0800 Subject: [PATCH 099/236] Filter commit --- code/tool/attribution/annotate.py | 1 + 1 file changed, 1 insertion(+) diff --git a/code/tool/attribution/annotate.py b/code/tool/attribution/annotate.py index 24318bc64..9098b9007 100644 --- a/code/tool/attribution/annotate.py +++ b/code/tool/attribution/annotate.py @@ -197,6 +197,7 @@ override_author["a9250a74f1140c08655d31cbe185a5e543e1e942"] = "-" # Header override_author["dd1043eaaec28399aa0013ddf5b5d7e0c32b1ce1"] = "-" # Header override_author["ff4a521b07a4983140d82f27fc2f0468a507d095"] = "-" # Header override_author["43452ea27c6e92488d8bd1417b2aee60d75d8a68"] = "-" # Header +override_author["8e21fed1e6b79bf92f6364c7cb4f0c56e1dda103"] = "-" # Header cleanup # Exclude some paths exclude_paths = { } From c8e562f37781d62ebc54b68ef74f7693de79a907 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Fri, 29 Nov 2019 19:08:35 +0800 Subject: [PATCH 100/236] AGPLv3: The work must carry prominent notices stating that you modified it, and giving a relevant date --- .../plugins/translation_manager/extract_new_sheet_names.cpp | 1 + .../src/plugins/translation_manager/extract_new_sheet_names.h | 1 + code/tool/attribution/annotate.py | 4 +++- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/code/studio/src/plugins/translation_manager/extract_new_sheet_names.cpp b/code/studio/src/plugins/translation_manager/extract_new_sheet_names.cpp index 98c0164f6..c53481084 100644 --- a/code/studio/src/plugins/translation_manager/extract_new_sheet_names.cpp +++ b/code/studio/src/plugins/translation_manager/extract_new_sheet_names.cpp @@ -3,6 +3,7 @@ // // This source file has been modified by the following contributors: // Copyright (C) 2011 Dzmitry KAMIAHIN (dnk-88) +// Copyright (C) 2011 Emanuel COSTEA // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/studio/src/plugins/translation_manager/extract_new_sheet_names.h b/code/studio/src/plugins/translation_manager/extract_new_sheet_names.h index c445dd975..f9ef8a38b 100644 --- a/code/studio/src/plugins/translation_manager/extract_new_sheet_names.h +++ b/code/studio/src/plugins/translation_manager/extract_new_sheet_names.h @@ -3,6 +3,7 @@ // // This source file has been modified by the following contributors: // Copyright (C) 2011 Dzmitry KAMIAHIN (dnk-88) +// Copyright (C) 2011 Emanuel COSTEA // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/code/tool/attribution/annotate.py b/code/tool/attribution/annotate.py index 9098b9007..02082bc7f 100644 --- a/code/tool/attribution/annotate.py +++ b/code/tool/attribution/annotate.py @@ -222,7 +222,9 @@ def remap_author(blob, commit, author): # them, remap here, limit by authored_date if needed. if short_author == "ulukyn" or short_author == "ace": short_author = "winch_gate" - if short_author == "riasan" or short_author == "sircotare": + if short_author == "riasan": + short_author = "winch_gate" + if short_author == "sircotare" and authored_date.year >= 2012: short_author = "winch_gate" if short_author == "inky": short_author = "winch_gate" From c2f01edab0131cc4a0d576ccbc54a95814c04a02 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Fri, 29 Nov 2019 19:59:11 +0800 Subject: [PATCH 101/236] Filter commit --- code/tool/attribution/annotate.py | 1 + 1 file changed, 1 insertion(+) diff --git a/code/tool/attribution/annotate.py b/code/tool/attribution/annotate.py index 02082bc7f..2aacf0041 100644 --- a/code/tool/attribution/annotate.py +++ b/code/tool/attribution/annotate.py @@ -198,6 +198,7 @@ override_author["dd1043eaaec28399aa0013ddf5b5d7e0c32b1ce1"] = "-" # Header override_author["ff4a521b07a4983140d82f27fc2f0468a507d095"] = "-" # Header override_author["43452ea27c6e92488d8bd1417b2aee60d75d8a68"] = "-" # Header override_author["8e21fed1e6b79bf92f6364c7cb4f0c56e1dda103"] = "-" # Header cleanup +override_author["c8e562f37781d62ebc54b68ef74f7693de79a907"] = "-" # Header cleanup # Exclude some paths exclude_paths = { } From dc734ed66226b257becae9fcd140898e14510e6a Mon Sep 17 00:00:00 2001 From: kaetemi Date: Sat, 30 Nov 2019 10:00:51 +0800 Subject: [PATCH 102/236] Use standard header format where applicable --- code/nel/include/nel/3d/fxaa.h | 33 +++++----- code/nel/include/nel/3d/geometry_program.h | 36 +++++----- code/nel/include/nel/3d/gpu_program_params.h | 33 +++++----- code/nel/include/nel/3d/pixel_program.h | 36 +++++----- code/nel/include/nel/3d/program.h | 33 +++++----- .../include/nel/3d/render_target_manager.h | 34 +++++----- code/nel/include/nel/3d/stereo_debugger.h | 34 +++++----- code/nel/include/nel/3d/stereo_display.h | 33 +++++----- code/nel/include/nel/3d/stereo_libvr.h | 33 +++++----- code/nel/include/nel/3d/stereo_ovr.h | 65 +++++++++---------- code/nel/include/nel/3d/stereo_ovr_04.h | 65 +++++++++---------- code/nel/include/nel/gui/string_case.h | 19 ++++++ code/nel/include/nel/misc/fast_id_map.h | 33 +++++----- code/nel/include/nel/sound/audio_decoder.h | 33 +++++----- .../include/nel/sound/audio_decoder_vorbis.h | 34 +++++----- code/nel/include/nel/sound/containers.h | 33 +++++----- code/nel/include/nel/sound/group_controller.h | 33 +++++----- .../include/nel/sound/group_controller_root.h | 33 +++++----- .../include/nel/sound/source_music_channel.h | 33 +++++----- .../include/nel/sound/u_group_controller.h | 33 +++++----- .../driver_direct3d_pixel_program.cpp | 36 +++++----- code/nel/src/3d/driver/opengl/driver_opengl.h | 1 + .../opengl/driver_opengl_pixel_program.cpp | 36 +++++----- code/nel/src/3d/fxaa.cpp | 33 +++++----- code/nel/src/3d/geometry_program.cpp | 36 +++++----- code/nel/src/3d/gpu_program_params.cpp | 33 +++++----- code/nel/src/3d/pixel_program.cpp | 36 +++++----- code/nel/src/3d/program.cpp | 33 +++++----- code/nel/src/3d/render_target_manager.cpp | 33 +++++----- code/nel/src/3d/stereo_debugger.cpp | 33 +++++----- code/nel/src/3d/stereo_display.cpp | 36 +++++----- code/nel/src/3d/stereo_hmd.cpp | 33 +++++----- code/nel/src/3d/stereo_libvr.cpp | 36 +++++----- code/nel/src/3d/stereo_ovr.cpp | 65 +++++++++---------- code/nel/src/3d/stereo_ovr_04.cpp | 65 +++++++++---------- code/nel/src/ligo/primitive_utils.cpp | 3 + code/nel/src/sound/audio_decoder.cpp | 33 +++++----- code/nel/src/sound/audio_decoder_vorbis.cpp | 33 +++++----- code/nel/src/sound/group_controller.cpp | 33 +++++----- code/nel/src/sound/group_controller_root.cpp | 33 +++++----- code/nel/src/sound/source_music_channel.cpp | 33 +++++----- code/nel/src/sound/stream_file_sound.cpp | 33 +++++----- code/nel/src/sound/stream_file_source.cpp | 33 +++++----- .../unbuild_interface/unbuild_interface.cpp | 33 +++++----- code/tool/attribution/annotate.py | 30 +++++---- 45 files changed, 747 insertions(+), 814 deletions(-) diff --git a/code/nel/include/nel/3d/fxaa.h b/code/nel/include/nel/3d/fxaa.h index f7ccf4866..9f97b81ad 100644 --- a/code/nel/include/nel/3d/fxaa.h +++ b/code/nel/include/nel/3d/fxaa.h @@ -6,24 +6,21 @@ * CFXAA */ -/* - * Copyright (C) 2014 by authors - * - * This file is part of NL3D. - * NL3D 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 - * License, or (at your option) any later version. - * - * NL3D is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General - * Public License for more details. - * - * You should have received a copy of the GNU Affero General Public - * License along with NL3D. If not, see - * . - */ +// NeL - MMORPG Framework +// Copyright (C) 2014 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 +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . #ifndef NL3D_FXAA_H #define NL3D_FXAA_H diff --git a/code/nel/include/nel/3d/geometry_program.h b/code/nel/include/nel/3d/geometry_program.h index 48e48e260..f8de082d6 100644 --- a/code/nel/include/nel/3d/geometry_program.h +++ b/code/nel/include/nel/3d/geometry_program.h @@ -2,24 +2,24 @@ * Geometry program definition */ -/* Copyright, 2000, 2001 Nevrax Ltd. - * - * This file is part of NEVRAX NEL. - * NEVRAX NEL is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - - * NEVRAX NEL is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - - * You should have received a copy of the GNU General Public License - * along with NEVRAX NEL; see the file COPYING. If not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, - * MA 02111-1307, USA. - */ +// NeL - MMORPG Framework +// Copyright (C) 2000-2001 Nevrax Ltd. +// +// This source file has been modified by the following contributors: +// Copyright (C) 2013 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 +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . #ifndef NL_GEOMETRY_PROGRAM_H #define NL_GEOMETRY_PROGRAM_H diff --git a/code/nel/include/nel/3d/gpu_program_params.h b/code/nel/include/nel/3d/gpu_program_params.h index 4615c58d9..337e611ea 100644 --- a/code/nel/include/nel/3d/gpu_program_params.h +++ b/code/nel/include/nel/3d/gpu_program_params.h @@ -6,24 +6,21 @@ * CGPUProgramParams */ -/* - * Copyright (C) 2013 by authors - * - * This file is part of NL3D. - * NL3D 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 - * License, or (at your option) any later version. - * - * NL3D is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General - * Public License for more details. - * - * You should have received a copy of the GNU Affero General Public - * License along with NL3D. If not, see - * . - */ +// NeL - MMORPG Framework +// Copyright (C) 2013 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 +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . #ifndef NL3D_GPU_PROGRAM_PARAMS_H #define NL3D_GPU_PROGRAM_PARAMS_H diff --git a/code/nel/include/nel/3d/pixel_program.h b/code/nel/include/nel/3d/pixel_program.h index 0787ae9fb..31818f1cd 100644 --- a/code/nel/include/nel/3d/pixel_program.h +++ b/code/nel/include/nel/3d/pixel_program.h @@ -2,24 +2,24 @@ * Pixel program definition */ -/* Copyright, 2000, 2001 Nevrax Ltd. - * - * This file is part of NEVRAX NEL. - * NEVRAX NEL is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - - * NEVRAX NEL is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - - * You should have received a copy of the GNU General Public License - * along with NEVRAX NEL; see the file COPYING. If not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, - * MA 02111-1307, USA. - */ +// NeL - MMORPG Framework +// Copyright (C) 2000-2001 Nevrax Ltd. +// +// This source file has been modified by the following contributors: +// Copyright (C) 2013 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 +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . #ifndef NL_PIXEL_PROGRAM_H #define NL_PIXEL_PROGRAM_H diff --git a/code/nel/include/nel/3d/program.h b/code/nel/include/nel/3d/program.h index 77e6baa62..c84a97058 100644 --- a/code/nel/include/nel/3d/program.h +++ b/code/nel/include/nel/3d/program.h @@ -6,24 +6,21 @@ * IProgram */ -/* - * Copyright (C) 2013 by authors - * - * This file is part of NL3D. - * NL3D 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 - * License, or (at your option) any later version. - * - * NL3D is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General - * Public License for more details. - * - * You should have received a copy of the GNU Affero General Public - * License along with NL3D. If not, see - * . - */ +// NeL - MMORPG Framework +// Copyright (C) 2013 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 +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . #ifndef NL3D_PROGRAM_H #define NL3D_PROGRAM_H diff --git a/code/nel/include/nel/3d/render_target_manager.h b/code/nel/include/nel/3d/render_target_manager.h index cae8e31b0..ac69b4228 100644 --- a/code/nel/include/nel/3d/render_target_manager.h +++ b/code/nel/include/nel/3d/render_target_manager.h @@ -6,24 +6,22 @@ * CRenderTargetManager */ -/* - * Copyright (C) 2013 by authors - * - * This file is part of NL3D. - * NL3D 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 - * License, or (at your option) any later version. - * - * NL3D is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General - * Public License for more details. - * - * You should have received a copy of the GNU Affero General Public - * License along with NL3D. If not, see - * . - */ + +// NeL - MMORPG Framework +// Copyright (C) 2014 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 +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . #ifndef NL3D_RENDER_TARGET_MANAGER_H #define NL3D_RENDER_TARGET_MANAGER_H diff --git a/code/nel/include/nel/3d/stereo_debugger.h b/code/nel/include/nel/3d/stereo_debugger.h index 6c974f93d..2ce751cb3 100644 --- a/code/nel/include/nel/3d/stereo_debugger.h +++ b/code/nel/include/nel/3d/stereo_debugger.h @@ -6,24 +6,22 @@ * CStereoDebugger */ -/* - * Copyright (C) 2013 by authors - * - * This file is part of NL3D. - * NL3D 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 - * License, or (at your option) any later version. - * - * NL3D is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General - * Public License for more details. - * - * You should have received a copy of the GNU Affero General Public - * License along with NL3D. If not, see - * . - */ + +// NeL - MMORPG Framework +// Copyright (C) 2013-2014 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 +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . #if !FINAL_VERSION #ifndef NL3D_STEREO_DEBUGGER_H diff --git a/code/nel/include/nel/3d/stereo_display.h b/code/nel/include/nel/3d/stereo_display.h index 3b6fdbb21..3ad941ee7 100644 --- a/code/nel/include/nel/3d/stereo_display.h +++ b/code/nel/include/nel/3d/stereo_display.h @@ -6,24 +6,21 @@ * IStereoDisplay */ -/* - * Copyright (C) 2013 by authors - * - * This file is part of NL3D. - * NL3D 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 - * License, or (at your option) any later version. - * - * NL3D is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General - * Public License for more details. - * - * You should have received a copy of the GNU Affero General Public - * License along with NL3D. If not, see - * . - */ +// NeL - MMORPG Framework +// Copyright (C) 2013-2014 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 +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . #ifndef NL3D_STEREO_DISPLAY_H #define NL3D_STEREO_DISPLAY_H diff --git a/code/nel/include/nel/3d/stereo_libvr.h b/code/nel/include/nel/3d/stereo_libvr.h index 76d1966fe..60fce94d9 100644 --- a/code/nel/include/nel/3d/stereo_libvr.h +++ b/code/nel/include/nel/3d/stereo_libvr.h @@ -6,24 +6,21 @@ * CStereoLibVR */ -/* - * Copyright (C) 2013 by authors - * - * This file is part of NL3D. - * NL3D 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 - * License, or (at your option) any later version. - * - * NL3D is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General - * Public License for more details. - * - * You should have received a copy of the GNU Affero General Public - * License along with NL3D. If not, see - * . - */ +// NeL - MMORPG Framework +// Copyright (C) 2013 Thibaut GIRKA (ThibG) +// +// 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 +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . #ifndef NL3D_STEREO_LIBVR_H #define NL3D_STEREO_LIBVR_H diff --git a/code/nel/include/nel/3d/stereo_ovr.h b/code/nel/include/nel/3d/stereo_ovr.h index 750f32027..a9fc1a331 100644 --- a/code/nel/include/nel/3d/stereo_ovr.h +++ b/code/nel/include/nel/3d/stereo_ovr.h @@ -6,40 +6,37 @@ * CStereoOVR */ -/* - * Copyright (C) 2013 by authors - * - * This file is part of NL3D. - * NL3D 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 - * License, or (at your option) any later version. - * - * NL3D is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General - * Public License for more details. - * - * You should have received a copy of the GNU Affero General Public - * License along with NL3D. If not, see - * . - * - * Linking this library statically or dynamically with other modules - * is making a combined work based on this library. Thus, the terms - * and conditions of the GNU General Public License cover the whole - * combination. - * - * As a special exception, the copyright holders of this library give - * you permission to link this library with the Oculus SDK to produce - * an executable, regardless of the license terms of the Oculus SDK, - * and distribute linked combinations including the two, provided that - * you also meet the terms and conditions of the license of the Oculus - * SDK. You must obey the GNU General Public License in all respects - * for all of the code used other than the Oculus SDK. If you modify - * this file, you may extend this exception to your version of the - * file, but you are not obligated to do so. If you do not wish to do - * so, delete this exception statement from your version. - */ +// NeL - MMORPG Framework +// Copyright (C) 2013-2014 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 +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . +// +// Linking this library statically or dynamically with other modules +// is making a combined work based on this library. Thus, the terms +// and conditions of the GNU General Public License cover the whole +// combination. +// +// As a special exception, the copyright holders of this library give +// you permission to link this library with the Oculus SDK to produce +// an executable, regardless of the license terms of the Oculus SDK, +// and distribute linked combinations including the two, provided that +// you also meet the terms and conditions of the license of the Oculus +// SDK. You must obey the GNU General Public License in all respects +// for all of the code used other than the Oculus SDK. If you modify +// this file, you may extend this exception to your version of the +// file, but you are not obligated to do so. If you do not wish to do +// so, delete this exception statement from your version. #ifndef NL3D_STEREO_OVR_H #define NL3D_STEREO_OVR_H diff --git a/code/nel/include/nel/3d/stereo_ovr_04.h b/code/nel/include/nel/3d/stereo_ovr_04.h index 8bda88c88..1cf1b61c7 100644 --- a/code/nel/include/nel/3d/stereo_ovr_04.h +++ b/code/nel/include/nel/3d/stereo_ovr_04.h @@ -6,40 +6,37 @@ * CStereoOVR */ -/* - * Copyright (C) 2014 by authors - * - * This file is part of NL3D. - * NL3D 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 - * License, or (at your option) any later version. - * - * NL3D is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General - * Public License for more details. - * - * You should have received a copy of the GNU Affero General Public - * License along with NL3D. If not, see - * . - * - * Linking this library statically or dynamically with other modules - * is making a combined work based on this library. Thus, the terms - * and conditions of the GNU General Public License cover the whole - * combination. - * - * As a special exception, the copyright holders of this library give - * you permission to link this library with the Oculus SDK to produce - * an executable, regardless of the license terms of the Oculus SDK, - * and distribute linked combinations including the two, provided that - * you also meet the terms and conditions of the license of the Oculus - * SDK. You must obey the GNU General Public License in all respects - * for all of the code used other than the Oculus SDK. If you modify - * this file, you may extend this exception to your version of the - * file, but you are not obligated to do so. If you do not wish to do - * so, delete this exception statement from your version. - */ +// NeL - MMORPG Framework +// Copyright (C) 2013-2014 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 +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . +// +// Linking this library statically or dynamically with other modules +// is making a combined work based on this library. Thus, the terms +// and conditions of the GNU General Public License cover the whole +// combination. +// +// As a special exception, the copyright holders of this library give +// you permission to link this library with the Oculus SDK to produce +// an executable, regardless of the license terms of the Oculus SDK, +// and distribute linked combinations including the two, provided that +// you also meet the terms and conditions of the license of the Oculus +// SDK. You must obey the GNU General Public License in all respects +// for all of the code used other than the Oculus SDK. If you modify +// this file, you may extend this exception to your version of the +// file, but you are not obligated to do so. If you do not wish to do +// so, delete this exception statement from your version. #ifndef NL3D_STEREO_OVR_04_H #define NL3D_STEREO_OVR_04_H diff --git a/code/nel/include/nel/gui/string_case.h b/code/nel/include/nel/gui/string_case.h index b7c30633f..ec8fa2925 100644 --- a/code/nel/include/nel/gui/string_case.h +++ b/code/nel/include/nel/gui/string_case.h @@ -1,3 +1,22 @@ +// NeL - MMORPG Framework +// Copyright (C) 2010 Winch Gate Property Limited +// +// This source file has been modified by the following contributors: +// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) +// +// 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 +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + #ifndef STRING_CASE_H #define STRING_CASE_H diff --git a/code/nel/include/nel/misc/fast_id_map.h b/code/nel/include/nel/misc/fast_id_map.h index c4b043278..095059cda 100644 --- a/code/nel/include/nel/misc/fast_id_map.h +++ b/code/nel/include/nel/misc/fast_id_map.h @@ -6,24 +6,21 @@ * CFastIdMap */ -/* - * Copyright (C) 2012 by authors - * - * This file is part of RYZOM CORE. - * RYZOM CORE 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 - * License, or (at your option) any later version. - * - * RYZOM CORE is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public - * License along with RYZOM CORE. If not, see - * . - */ +// NeL - MMORPG Framework +// Copyright (C) 2012 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 +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . #ifndef NLMISC_FAST_ID_MAP_H #define NLMISC_FAST_ID_MAP_H diff --git a/code/nel/include/nel/sound/audio_decoder.h b/code/nel/include/nel/sound/audio_decoder.h index f1dfdfc2c..e40211896 100644 --- a/code/nel/include/nel/sound/audio_decoder.h +++ b/code/nel/include/nel/sound/audio_decoder.h @@ -6,24 +6,21 @@ * IAudioDecoder */ -/* - * Copyright (C) 2008-2012 by authors - * - * This file is part of RYZOM CORE. - * RYZOM CORE 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 - * License, or (at your option) any later version. - * - * RYZOM CORE is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public - * License along with RYZOM CORE. If not, see - * . - */ +// NeL - MMORPG Framework +// Copyright (C) 2008-2012 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 +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . #ifndef NLSOUND_AUDIO_DECODER_H #define NLSOUND_AUDIO_DECODER_H diff --git a/code/nel/include/nel/sound/audio_decoder_vorbis.h b/code/nel/include/nel/sound/audio_decoder_vorbis.h index 4efcba255..cfb9faa69 100644 --- a/code/nel/include/nel/sound/audio_decoder_vorbis.h +++ b/code/nel/include/nel/sound/audio_decoder_vorbis.h @@ -6,24 +6,22 @@ * CAudioDecoderVorbis */ -/* - * Copyright (C) 2008-2012 by authors - * - * This file is part of RYZOM CORE. - * RYZOM CORE 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 - * License, or (at your option) any later version. - * - * RYZOM CORE is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public - * License along with RYZOM CORE. If not, see - * . - */ + +// NeL - MMORPG Framework +// Copyright (C) 2008-2012 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 +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . #ifndef NLSOUND_AUDIO_DECODER_VORBIS_H #define NLSOUND_AUDIO_DECODER_VORBIS_H diff --git a/code/nel/include/nel/sound/containers.h b/code/nel/include/nel/sound/containers.h index 57387e91e..0adaf557f 100644 --- a/code/nel/include/nel/sound/containers.h +++ b/code/nel/include/nel/sound/containers.h @@ -6,24 +6,21 @@ * CContainers */ -/* - * Copyright (C) 2012 by authors - * - * This file is part of RYZOM CORE. - * RYZOM CORE 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 - * License, or (at your option) any later version. - * - * RYZOM CORE is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public - * License along with RYZOM CORE. If not, see - * . - */ +// NeL - MMORPG Framework +// Copyright (C) 2012-2015 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 +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . #ifndef NLSOUND_CONTAINERS_H #define NLSOUND_CONTAINERS_H diff --git a/code/nel/include/nel/sound/group_controller.h b/code/nel/include/nel/sound/group_controller.h index a5bae83bb..bd740a66a 100644 --- a/code/nel/include/nel/sound/group_controller.h +++ b/code/nel/include/nel/sound/group_controller.h @@ -6,24 +6,21 @@ * CGroupController */ -/* - * Copyright (C) 2012 by authors - * - * This file is part of RYZOM CORE. - * RYZOM CORE 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 - * License, or (at your option) any later version. - * - * RYZOM CORE is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public - * License along with RYZOM CORE. If not, see - * . - */ +// NeL - MMORPG Framework +// Copyright (C) 2012 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 +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . #ifndef NLSOUND_GROUP_CONTROLLER_H #define NLSOUND_GROUP_CONTROLLER_H diff --git a/code/nel/include/nel/sound/group_controller_root.h b/code/nel/include/nel/sound/group_controller_root.h index c42e5c549..7fc987b2b 100644 --- a/code/nel/include/nel/sound/group_controller_root.h +++ b/code/nel/include/nel/sound/group_controller_root.h @@ -6,24 +6,21 @@ * CGroupControllerRoot */ -/* - * Copyright (C) 2012 by authors - * - * This file is part of RYZOM CORE. - * RYZOM CORE 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 - * License, or (at your option) any later version. - * - * RYZOM CORE is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public - * License along with RYZOM CORE. If not, see - * . - */ +// NeL - MMORPG Framework +// Copyright (C) 2012 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 +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . #ifndef NLSOUND_GROUP_CONTROLLER_ROOT_H #define NLSOUND_GROUP_CONTROLLER_ROOT_H diff --git a/code/nel/include/nel/sound/source_music_channel.h b/code/nel/include/nel/sound/source_music_channel.h index ea742c2c7..241ea22fc 100644 --- a/code/nel/include/nel/sound/source_music_channel.h +++ b/code/nel/include/nel/sound/source_music_channel.h @@ -6,24 +6,21 @@ * CSourceMusicChannel */ -/* - * Copyright (C) 2012 by authors - * - * This file is part of RYZOM CORE. - * RYZOM CORE 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 - * License, or (at your option) any later version. - * - * RYZOM CORE is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public - * License along with RYZOM CORE. If not, see - * . - */ +// NeL - MMORPG Framework +// Copyright (C) 2012 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 +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . #ifndef NLSOUND_SOURCE_MUSIC_CHANNEL_H #define NLSOUND_SOURCE_MUSIC_CHANNEL_H diff --git a/code/nel/include/nel/sound/u_group_controller.h b/code/nel/include/nel/sound/u_group_controller.h index 585651297..2b7ddfa9f 100644 --- a/code/nel/include/nel/sound/u_group_controller.h +++ b/code/nel/include/nel/sound/u_group_controller.h @@ -6,24 +6,21 @@ * UGroupController */ -/* - * Copyright (C) 2012 by authors - * - * This file is part of RYZOM CORE. - * RYZOM CORE 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 - * License, or (at your option) any later version. - * - * RYZOM CORE is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public - * License along with RYZOM CORE. If not, see - * . - */ +// NeL - MMORPG Framework +// Copyright (C) 2012 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 +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . #ifndef NLSOUND_U_GROUP_CONTROLLER_H #define NLSOUND_U_GROUP_CONTROLLER_H diff --git a/code/nel/src/3d/driver/direct3d/driver_direct3d_pixel_program.cpp b/code/nel/src/3d/driver/direct3d/driver_direct3d_pixel_program.cpp index 7d79eb1a7..f1cca7b2b 100644 --- a/code/nel/src/3d/driver/direct3d/driver_direct3d_pixel_program.cpp +++ b/code/nel/src/3d/driver/direct3d/driver_direct3d_pixel_program.cpp @@ -6,24 +6,24 @@ * \todo manage better the init/release system (if a throw occurs in the init, we must release correctly the driver) */ -/* Copyright, 2000 Nevrax Ltd. - * - * This file is part of NEVRAX NEL. - * NEVRAX NEL is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - - * NEVRAX NEL is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - - * You should have received a copy of the GNU General Public License - * along with NEVRAX NEL; see the file COPYING. If not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, - * MA 02111-1307, USA. - */ +// NeL - MMORPG Framework +// Copyright (C) 2000-2007 Nevrax Ltd. +// +// This source file has been modified by the following contributors: +// Copyright (C) 2013 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 +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . #include "stddirect3d.h" diff --git a/code/nel/src/3d/driver/opengl/driver_opengl.h b/code/nel/src/3d/driver/opengl/driver_opengl.h index e6168d90a..e9aa2e905 100644 --- a/code/nel/src/3d/driver/opengl/driver_opengl.h +++ b/code/nel/src/3d/driver/opengl/driver_opengl.h @@ -3,6 +3,7 @@ // // This source file has been modified by the following contributors: // Copyright (C) 2010 Robert TIMM (rti) +// Copyright (C) 2010 Thibaut GIRKA (ThibG) // Copyright (C) 2013-2014 Jan BOON (Kaetemi) // // This program is free software: you can redistribute it and/or modify diff --git a/code/nel/src/3d/driver/opengl/driver_opengl_pixel_program.cpp b/code/nel/src/3d/driver/opengl/driver_opengl_pixel_program.cpp index 67af0df64..29ec4caf8 100644 --- a/code/nel/src/3d/driver/opengl/driver_opengl_pixel_program.cpp +++ b/code/nel/src/3d/driver/opengl/driver_opengl_pixel_program.cpp @@ -6,24 +6,24 @@ * \todo manage better the init/release system (if a throw occurs in the init, we must release correctly the driver) */ -/* Copyright, 2000 Nevrax Ltd. - * - * This file is part of NEVRAX NEL. - * NEVRAX NEL is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - - * NEVRAX NEL is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - - * You should have received a copy of the GNU General Public License - * along with NEVRAX NEL; see the file COPYING. If not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, - * MA 02111-1307, USA. - */ +// NeL - MMORPG Framework +// Copyright (C) 2000-2007 Nevrax Ltd. +// +// This source file has been modified by the following contributors: +// Copyright (C) 2013 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 +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . #include "stdopengl.h" diff --git a/code/nel/src/3d/fxaa.cpp b/code/nel/src/3d/fxaa.cpp index d37a159ef..255f0234d 100644 --- a/code/nel/src/3d/fxaa.cpp +++ b/code/nel/src/3d/fxaa.cpp @@ -6,24 +6,21 @@ * CFXAA */ -/* - * Copyright (C) 2014 by authors - * - * This file is part of NL3D. - * NL3D 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 - * License, or (at your option) any later version. - * - * NL3D is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General - * Public License for more details. - * - * You should have received a copy of the GNU Affero General Public - * License along with NL3D. If not, see - * . - */ +// NeL - MMORPG Framework +// Copyright (C) 2014 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 +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . #include "std3d.h" #include "nel/3d/fxaa.h" diff --git a/code/nel/src/3d/geometry_program.cpp b/code/nel/src/3d/geometry_program.cpp index 985309a55..5fefc2b5b 100644 --- a/code/nel/src/3d/geometry_program.cpp +++ b/code/nel/src/3d/geometry_program.cpp @@ -2,24 +2,24 @@ * Geometry program definition */ -/* Copyright, 2000, 2001 Nevrax Ltd. - * - * This file is part of NEVRAX NEL. - * NEVRAX NEL is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - - * NEVRAX NEL is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - - * You should have received a copy of the GNU General Public License - * along with NEVRAX NEL; see the file COPYING. If not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, - * MA 02111-1307, USA. - */ +// NeL - MMORPG Framework +// Copyright (C) 2000-2001 Nevrax Ltd. +// +// This source file has been modified by the following contributors: +// Copyright (C) 2013 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 +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . #include "std3d.h" diff --git a/code/nel/src/3d/gpu_program_params.cpp b/code/nel/src/3d/gpu_program_params.cpp index f7cc6654d..d5ad9823e 100644 --- a/code/nel/src/3d/gpu_program_params.cpp +++ b/code/nel/src/3d/gpu_program_params.cpp @@ -6,24 +6,21 @@ * CGPUProgramParams */ -/* - * Copyright (C) 2013 by authors - * - * This file is part of NL3D. - * NL3D 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 - * License, or (at your option) any later version. - * - * NL3D is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General - * Public License for more details. - * - * You should have received a copy of the GNU Affero General Public - * License along with NL3D. If not, see - * . - */ +// NeL - MMORPG Framework +// Copyright (C) 2013 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 +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . #include "std3d.h" #include "nel/3d/gpu_program_params.h" diff --git a/code/nel/src/3d/pixel_program.cpp b/code/nel/src/3d/pixel_program.cpp index a11344055..81c914a43 100644 --- a/code/nel/src/3d/pixel_program.cpp +++ b/code/nel/src/3d/pixel_program.cpp @@ -2,24 +2,24 @@ * Pixel program definition */ -/* Copyright, 2000, 2001 Nevrax Ltd. - * - * This file is part of NEVRAX NEL. - * NEVRAX NEL is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - - * NEVRAX NEL is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - - * You should have received a copy of the GNU General Public License - * along with NEVRAX NEL; see the file COPYING. If not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, - * MA 02111-1307, USA. - */ +// NeL - MMORPG Framework +// Copyright (C) 2000-2001 Nevrax Ltd. +// +// This source file has been modified by the following contributors: +// Copyright (C) 2013 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 +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . #include "std3d.h" diff --git a/code/nel/src/3d/program.cpp b/code/nel/src/3d/program.cpp index 7758feec6..a1c0f69cb 100644 --- a/code/nel/src/3d/program.cpp +++ b/code/nel/src/3d/program.cpp @@ -6,24 +6,21 @@ * IProgram */ -/* - * Copyright (C) 2013 by authors - * - * This file is part of NL3D. - * NL3D 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 - * License, or (at your option) any later version. - * - * NL3D is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General - * Public License for more details. - * - * You should have received a copy of the GNU Affero General Public - * License along with NL3D. If not, see - * . - */ +// NeL - MMORPG Framework +// Copyright (C) 2013-2014 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 +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . #include "std3d.h" diff --git a/code/nel/src/3d/render_target_manager.cpp b/code/nel/src/3d/render_target_manager.cpp index 6012eeb8e..dd7b192a5 100644 --- a/code/nel/src/3d/render_target_manager.cpp +++ b/code/nel/src/3d/render_target_manager.cpp @@ -6,24 +6,21 @@ * CRenderTargetManager */ -/* - * Copyright (C) 2014 by authors - * - * This file is part of NL3D. - * NL3D 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 - * License, or (at your option) any later version. - * - * NL3D is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General - * Public License for more details. - * - * You should have received a copy of the GNU Affero General Public - * License along with NL3D. If not, see - * . - */ +// NeL - MMORPG Framework +// Copyright (C) 2014 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 +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . #include "std3d.h" #include "nel/3d/render_target_manager.h" diff --git a/code/nel/src/3d/stereo_debugger.cpp b/code/nel/src/3d/stereo_debugger.cpp index c0c36eb74..b046618cc 100644 --- a/code/nel/src/3d/stereo_debugger.cpp +++ b/code/nel/src/3d/stereo_debugger.cpp @@ -6,24 +6,21 @@ * CStereoDebugger */ -/* - * Copyright (C) 2013 by authors - * - * This file is part of NL3D. - * NL3D 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 - * License, or (at your option) any later version. - * - * NL3D is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General - * Public License for more details. - * - * You should have received a copy of the GNU Affero General Public - * License along with NL3D. If not, see - * . - */ +// NeL - MMORPG Framework +// Copyright (C) 2013-2014 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 +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . #if !FINAL_VERSION #include "std3d.h" diff --git a/code/nel/src/3d/stereo_display.cpp b/code/nel/src/3d/stereo_display.cpp index 6ff13b54c..d09e1eef8 100644 --- a/code/nel/src/3d/stereo_display.cpp +++ b/code/nel/src/3d/stereo_display.cpp @@ -6,24 +6,24 @@ * IStereoDisplay */ -/* - * Copyright (C) 2013 by authors - * - * This file is part of NL3D. - * NL3D 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 - * License, or (at your option) any later version. - * - * NL3D is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General - * Public License for more details. - * - * You should have received a copy of the GNU Affero General Public - * License along with NL3D. If not, see - * . - */ +// NeL - MMORPG Framework +// Copyright (C) 2013-2014 Jan BOON (Kaetemi) +// +// This source file has been modified by the following contributors: +// Copyright (C) 2013 Thibaut GIRKA (ThibG) +// +// 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 +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . #include "std3d.h" #include "nel/3d/stereo_display.h" diff --git a/code/nel/src/3d/stereo_hmd.cpp b/code/nel/src/3d/stereo_hmd.cpp index d5f29d107..6641aa349 100644 --- a/code/nel/src/3d/stereo_hmd.cpp +++ b/code/nel/src/3d/stereo_hmd.cpp @@ -6,24 +6,21 @@ * IStereoHMD */ -/* - * Copyright (C) 2013 by authors - * - * This file is part of NL3D. - * NL3D 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 - * License, or (at your option) any later version. - * - * NL3D is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General - * Public License for more details. - * - * You should have received a copy of the GNU Affero General Public - * License along with NL3D. If not, see - * . - */ +// NeL - MMORPG Framework +// Copyright (C) 2013-2014 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 +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . #include "std3d.h" #include "nel/3d/stereo_hmd.h" diff --git a/code/nel/src/3d/stereo_libvr.cpp b/code/nel/src/3d/stereo_libvr.cpp index d8c843dbf..e317f0b66 100644 --- a/code/nel/src/3d/stereo_libvr.cpp +++ b/code/nel/src/3d/stereo_libvr.cpp @@ -6,24 +6,24 @@ * CStereoLibVR */ -/* - * Copyright (C) 2013 by authors - * - * This file is part of NL3D. - * NL3D 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 - * License, or (at your option) any later version. - * - * NL3D is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General - * Public License for more details. - * - * You should have received a copy of the GNU Affero General Public - * License along with NL3D. If not, see - * . - */ +// NeL - MMORPG Framework +// Copyright (C) 2013 Thibaut GIRKA (ThibG) +// +// This source file has been modified by the following contributors: +// Copyright (C) 2014 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 +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . #ifdef HAVE_LIBVR diff --git a/code/nel/src/3d/stereo_ovr.cpp b/code/nel/src/3d/stereo_ovr.cpp index 69a2b0db0..d924d8145 100644 --- a/code/nel/src/3d/stereo_ovr.cpp +++ b/code/nel/src/3d/stereo_ovr.cpp @@ -6,40 +6,37 @@ * CStereoOVR */ -/* - * Copyright (C) 2013 by authors - * - * This file is part of NL3D. - * NL3D 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 - * License, or (at your option) any later version. - * - * NL3D is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General - * Public License for more details. - * - * You should have received a copy of the GNU Affero General Public - * License along with NL3D. If not, see - * . - * - * Linking this library statically or dynamically with other modules - * is making a combined work based on this library. Thus, the terms - * and conditions of the GNU General Public License cover the whole - * combination. - * - * As a special exception, the copyright holders of this library give - * you permission to link this library with the Oculus SDK to produce - * an executable, regardless of the license terms of the Oculus SDK, - * and distribute linked combinations including the two, provided that - * you also meet the terms and conditions of the license of the Oculus - * SDK. You must obey the GNU General Public License in all respects - * for all of the code used other than the Oculus SDK. If you modify - * this file, you may extend this exception to your version of the - * file, but you are not obligated to do so. If you do not wish to do - * so, delete this exception statement from your version. - */ +// NeL - MMORPG Framework +// Copyright (C) 2013-2014 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 +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . +// +// Linking this library statically or dynamically with other modules +// is making a combined work based on this library. Thus, the terms +// and conditions of the GNU General Public License cover the whole +// combination. +// +// As a special exception, the copyright holders of this library give +// you permission to link this library with the Oculus SDK to produce +// an executable, regardless of the license terms of the Oculus SDK, +// and distribute linked combinations including the two, provided that +// you also meet the terms and conditions of the license of the Oculus +// SDK. You must obey the GNU General Public License in all respects +// for all of the code used other than the Oculus SDK. If you modify +// this file, you may extend this exception to your version of the +// file, but you are not obligated to do so. If you do not wish to do +// so, delete this exception statement from your version. #ifdef HAVE_LIBOVR_02 diff --git a/code/nel/src/3d/stereo_ovr_04.cpp b/code/nel/src/3d/stereo_ovr_04.cpp index 2f382a176..1d0c82284 100644 --- a/code/nel/src/3d/stereo_ovr_04.cpp +++ b/code/nel/src/3d/stereo_ovr_04.cpp @@ -6,40 +6,37 @@ * CStereoOVR */ -/* - * Copyright (C) 2014 by authors - * - * This file is part of NL3D. - * NL3D 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 - * License, or (at your option) any later version. - * - * NL3D is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General - * Public License for more details. - * - * You should have received a copy of the GNU Affero General Public - * License along with NL3D. If not, see - * . - * - * Linking this library statically or dynamically with other modules - * is making a combined work based on this library. Thus, the terms - * and conditions of the GNU General Public License cover the whole - * combination. - * - * As a special exception, the copyright holders of this library give - * you permission to link this library with the Oculus SDK to produce - * an executable, regardless of the license terms of the Oculus SDK, - * and distribute linked combinations including the two, provided that - * you also meet the terms and conditions of the license of the Oculus - * SDK. You must obey the GNU General Public License in all respects - * for all of the code used other than the Oculus SDK. If you modify - * this file, you may extend this exception to your version of the - * file, but you are not obligated to do so. If you do not wish to do - * so, delete this exception statement from your version. - */ +// NeL - MMORPG Framework +// Copyright (C) 2013-2014 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 +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . +// +// Linking this library statically or dynamically with other modules +// is making a combined work based on this library. Thus, the terms +// and conditions of the GNU General Public License cover the whole +// combination. +// +// As a special exception, the copyright holders of this library give +// you permission to link this library with the Oculus SDK to produce +// an executable, regardless of the license terms of the Oculus SDK, +// and distribute linked combinations including the two, provided that +// you also meet the terms and conditions of the license of the Oculus +// SDK. You must obey the GNU General Public License in all respects +// for all of the code used other than the Oculus SDK. If you modify +// this file, you may extend this exception to your version of the +// file, but you are not obligated to do so. If you do not wish to do +// so, delete this exception statement from your version. #ifdef HAVE_LIBOVR diff --git a/code/nel/src/ligo/primitive_utils.cpp b/code/nel/src/ligo/primitive_utils.cpp index 8357c1d16..f97e46ea0 100644 --- a/code/nel/src/ligo/primitive_utils.cpp +++ b/code/nel/src/ligo/primitive_utils.cpp @@ -1,3 +1,6 @@ +// NeL - MMORPG Framework +// Copyright (C) 2010 Winch Gate Property Limited +// // 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/sound/audio_decoder.cpp b/code/nel/src/sound/audio_decoder.cpp index 6f558ad91..ac7745721 100644 --- a/code/nel/src/sound/audio_decoder.cpp +++ b/code/nel/src/sound/audio_decoder.cpp @@ -6,24 +6,21 @@ * IAudioDecoder */ -/* - * Copyright (C) 2008-2012 by authors - * - * This file is part of RYZOM CORE. - * RYZOM CORE 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 - * License, or (at your option) any later version. - * - * RYZOM CORE is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public - * License along with RYZOM CORE. If not, see - * . - */ +// NeL - MMORPG Framework +// Copyright (C) 2008-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 +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . #include "stdsound.h" #include diff --git a/code/nel/src/sound/audio_decoder_vorbis.cpp b/code/nel/src/sound/audio_decoder_vorbis.cpp index fdda6e742..097a791f7 100644 --- a/code/nel/src/sound/audio_decoder_vorbis.cpp +++ b/code/nel/src/sound/audio_decoder_vorbis.cpp @@ -6,24 +6,21 @@ * CAudioDecoderVorbis */ -/* - * Copyright (C) 2008-2012 by authors - * - * This file is part of RYZOM CORE. - * RYZOM CORE 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 - * License, or (at your option) any later version. - * - * RYZOM CORE is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public - * License along with RYZOM CORE. If not, see - * . - */ +// NeL - MMORPG Framework +// Copyright (C) 2008-2012 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 +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . #include "stdsound.h" #include diff --git a/code/nel/src/sound/group_controller.cpp b/code/nel/src/sound/group_controller.cpp index f56eb34a4..838f486c2 100644 --- a/code/nel/src/sound/group_controller.cpp +++ b/code/nel/src/sound/group_controller.cpp @@ -6,24 +6,21 @@ * CGroupController */ -/* - * Copyright (C) 2012 by authors - * - * This file is part of RYZOM CORE. - * RYZOM CORE 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 - * License, or (at your option) any later version. - * - * RYZOM CORE is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public - * License along with RYZOM CORE. If not, see - * . - */ +// NeL - MMORPG Framework +// Copyright (C) 2012 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 +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . #include "stdsound.h" #include diff --git a/code/nel/src/sound/group_controller_root.cpp b/code/nel/src/sound/group_controller_root.cpp index 254dc16f4..1cf124429 100644 --- a/code/nel/src/sound/group_controller_root.cpp +++ b/code/nel/src/sound/group_controller_root.cpp @@ -6,24 +6,21 @@ * CGroupControllerRoot */ -/* - * Copyright (C) 2012 by authors - * - * This file is part of RYZOM CORE. - * RYZOM CORE 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 - * License, or (at your option) any later version. - * - * RYZOM CORE is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public - * License along with RYZOM CORE. If not, see - * . - */ +// NeL - MMORPG Framework +// Copyright (C) 2012 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 +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . #include "stdsound.h" #include diff --git a/code/nel/src/sound/source_music_channel.cpp b/code/nel/src/sound/source_music_channel.cpp index b9f61e272..508521aa3 100644 --- a/code/nel/src/sound/source_music_channel.cpp +++ b/code/nel/src/sound/source_music_channel.cpp @@ -6,24 +6,21 @@ * CSourceMusicChannel */ -/* - * Copyright (C) 2012 by authors - * - * This file is part of RYZOM CORE. - * RYZOM CORE 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 - * License, or (at your option) any later version. - * - * RYZOM CORE is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public - * License along with RYZOM CORE. If not, see - * . - */ +// NeL - MMORPG Framework +// Copyright (C) 2012 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 +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . #include "stdsound.h" #include diff --git a/code/nel/src/sound/stream_file_sound.cpp b/code/nel/src/sound/stream_file_sound.cpp index 1eb40f4bb..f5fbaffc3 100644 --- a/code/nel/src/sound/stream_file_sound.cpp +++ b/code/nel/src/sound/stream_file_sound.cpp @@ -6,24 +6,21 @@ * CStreamFileSound */ -/* - * Copyright (C) 2012 by authors - * - * This file is part of RYZOM CORE. - * RYZOM CORE 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 - * License, or (at your option) any later version. - * - * RYZOM CORE is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public - * License along with RYZOM CORE. If not, see - * . - */ +// NeL - MMORPG Framework +// Copyright (C) 2012-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 +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . #include "stdsound.h" #include diff --git a/code/nel/src/sound/stream_file_source.cpp b/code/nel/src/sound/stream_file_source.cpp index 4d490cfac..fbd720a89 100644 --- a/code/nel/src/sound/stream_file_source.cpp +++ b/code/nel/src/sound/stream_file_source.cpp @@ -6,24 +6,21 @@ * CStreamFileSource */ -/* - * Copyright (C) 2012 by authors - * - * This file is part of RYZOM CORE. - * RYZOM CORE 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 - * License, or (at your option) any later version. - * - * RYZOM CORE is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public - * License along with RYZOM CORE. If not, see - * . - */ +// NeL - MMORPG Framework +// Copyright (C) 2012 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 +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . #include "stdsound.h" #include diff --git a/code/nel/tools/3d/unbuild_interface/unbuild_interface.cpp b/code/nel/tools/3d/unbuild_interface/unbuild_interface.cpp index 48443cae7..485696ee9 100644 --- a/code/nel/tools/3d/unbuild_interface/unbuild_interface.cpp +++ b/code/nel/tools/3d/unbuild_interface/unbuild_interface.cpp @@ -6,24 +6,21 @@ * Unbuild Interface */ -/* - * Copyright (C) 2009 by authors - * - * This file is part of NEVRAX NEL. - * NEVRAX NEL is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published - * by the Free Software Foundation, either version 2 of the License, - * or (at your option) any later version. - * - * NEVRAX NEL is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with NEVRAX NEL; see the file COPYING. If not, see - * . - */ +// NeL - MMORPG Framework +// Copyright (C) 2009-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 +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . #include diff --git a/code/tool/attribution/annotate.py b/code/tool/attribution/annotate.py index 2aacf0041..f5233a3ef 100644 --- a/code/tool/attribution/annotate.py +++ b/code/tool/attribution/annotate.py @@ -50,19 +50,22 @@ repo = Repo("../../..") # Mapping for author short name to full display name authors = { } authors["winch_gate"] = "Winch Gate Property Limited" -authors["sfb"] = "Matt RAYKOWSKI (sfb) " -authors["ace"] = "Vianney LECROART (ace) " -authors["rti"] = "Robert TIMM (rti) " -authors["botanic"] = "Matthew LAGOE (Botanic) " -authors["rtsan"] = "Henri KUUSTE " +authors["nevrax"] = "Nevrax Ltd." +authors["sfb"] = "Matt RAYKOWSKI (sfb) " # OpenNeL +authors["ace"] = "Vianney LECROART (ace) " # Nevrax, Winch Gate +authors["rti"] = "Robert TIMM (rti) " # OpenNeL +authors["botanic"] = "Matthew LAGOE (Botanic) " # OpenNeL +authors["rtsan"] = "Henri KUUSTE " # OpenNeL authors["kaetemi"] = "Jan BOON (Kaetemi) " authors["kervala"] = "Cédric OCHS (kervala) " authors["glorf"] = "Guillaume DUPUY (glorf) " authors["ulukyn"] = "Nuno GONCALVES (Ulukyn) " authors["nimetu"] = "Meelis MAGI (Nimetu) " -authors["dfighter"] = "Laszlo KIS-ADAM (dfighter) " -authors["dnk-88"] = "Dzmitry KAMIAHIN (dnk-88) " -authors["fhenon"] = "Fabien HENON" +authors["dfighter"] = "Laszlo KIS-ADAM (dfighter) " # GSoC +authors["dnk-88"] = "Dzmitry KAMIAHIN (dnk-88) " # GSoC +authors["fhenon"] = "Fabien HENON" # GSoC +authors["adrianj"] = "Adrian JAEKEL " # GSoC +authors["cemycc"] = "Emanuel COSTEA " # GSoC authors["inky"] = "Inky " authors["riasan"] = "Riasan " authors["karu"] = "karu" @@ -79,8 +82,7 @@ authors["liria"] = "liria " authors["etrange"] = "StudioEtrange " authors["sircotare"] = "SirCotare" authors["rolandw"] = "Roland WINKLMEIER " -authors["adrianj"] = "Adrian JAEKEL " -authors["cemycc"] = "Emanuel COSTEA " +authors["thibg"] = "Thibaut GIRKA (ThibG) " # LibVR support # Mapping from git author name to short name, dash to ignore author short_authors = { } @@ -160,6 +162,8 @@ short_authors["Adrian Jaekel "] = "adrianj" short_authors["Emanuel Costea "] = "cemycc" short_authors["cemycc "] = "cemycc" short_authors["cemycc"] = "cemycc" +short_authors["Thibaut Girka "] = "thibg" +short_authors["Thibaut Girka (ThibG)"] = "thibg" # short_authors["\"picomancer ext:(%22) "] = "-" # short_authors["Quitta"] = "-" # short_authors["Krolock"] = "-" @@ -167,7 +171,6 @@ short_authors["cemycc"] = "cemycc" # short_authors["Piotr Kaczmarek "] = "-" # short_authors["kerozcak"] = "-" # short_authors["thorbjorn"] = "-" -# short_authors["Thibaut Girka "] = "-" # short_authors["DJanssens "] = "-" # short_authors["Michael Witrant "] = "-" @@ -204,6 +207,9 @@ override_author["c8e562f37781d62ebc54b68ef74f7693de79a907"] = "-" # Header clean exclude_paths = { } exclude_paths["code/nel/3rdparty"] = True exclude_paths["code/nel/src/3d/driver/opengl/GL"] = True +exclude_paths["code/nel/src/3d/driver/opengl/EGL"] = True +exclude_paths["code/nel/src/3d/driver/opengl/GLES"] = True +exclude_paths["code/nel/src/3d/driver/opengl/KHR"] = True exclude_paths["code/studio/src/3rdparty"] = True # Programmatical remappings @@ -281,7 +287,7 @@ def list_unknown_authors(): # print(commit.hexsha + ": " + str(count_tree_size(commit.tree))) assert not repo.bare -assert not repo.is_dirty() +#assert not repo.is_dirty() # repo.untracked_files # assert repo.head.ref == repo.heads.develop From 83316e6e2c9431be1b184734dac807e23fa46855 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Sat, 30 Nov 2019 10:02:05 +0800 Subject: [PATCH 103/236] Filter commit --- code/tool/attribution/annotate.py | 1 + 1 file changed, 1 insertion(+) diff --git a/code/tool/attribution/annotate.py b/code/tool/attribution/annotate.py index f5233a3ef..80d530650 100644 --- a/code/tool/attribution/annotate.py +++ b/code/tool/attribution/annotate.py @@ -202,6 +202,7 @@ override_author["ff4a521b07a4983140d82f27fc2f0468a507d095"] = "-" # Header override_author["43452ea27c6e92488d8bd1417b2aee60d75d8a68"] = "-" # Header override_author["8e21fed1e6b79bf92f6364c7cb4f0c56e1dda103"] = "-" # Header cleanup override_author["c8e562f37781d62ebc54b68ef74f7693de79a907"] = "-" # Header cleanup +override_author["dc734ed66226b257becae9fcd140898e14510e6a"] = "-" # Header cleanup # Exclude some paths exclude_paths = { } From c2d0b6206c5bd28408cff9c7b3f6fbc9d599469a Mon Sep 17 00:00:00 2001 From: kaetemi Date: Sat, 30 Nov 2019 13:39:15 +0800 Subject: [PATCH 104/236] Correct tool name to zone_elevation --- code/nel/tools/3d/zone_elevation/main.rc | 4 ++-- code/nel/tools/pacs/build_rbank/build_surf.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/code/nel/tools/3d/zone_elevation/main.rc b/code/nel/tools/3d/zone_elevation/main.rc index 05cf7c976..e4e8f736a 100644 --- a/code/nel/tools/3d/zone_elevation/main.rc +++ b/code/nel/tools/3d/zone_elevation/main.rc @@ -27,10 +27,10 @@ BEGIN BLOCK "040904b0" BEGIN VALUE "CompanyName", AUTHOR - VALUE "FileDescription", "NeL Zone Heightmap" + VALUE "FileDescription", "NeL Zone Elevation" VALUE "FileVersion", NL_VERSION VALUE "LegalCopyright", COPYRIGHT - VALUE "OriginalFilename", "zone_heightmap" NL_FILEEXT ".exe" + VALUE "OriginalFilename", "zone_elevation" NL_FILEEXT ".exe" VALUE "ProductName", "NeL Tools" VALUE "ProductVersion", NL_PRODUCT_VERSION END diff --git a/code/nel/tools/pacs/build_rbank/build_surf.cpp b/code/nel/tools/pacs/build_rbank/build_surf.cpp index 7172bae3d..c7425e943 100644 --- a/code/nel/tools/pacs/build_rbank/build_surf.cpp +++ b/code/nel/tools/pacs/build_rbank/build_surf.cpp @@ -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 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: 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):"); for(uint j=0;j Date: Sat, 30 Nov 2019 17:22:17 +0800 Subject: [PATCH 105/236] Fix crash in georges edit due to string change --- .../tools/leveldesign/georges_dll/georges_edit.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/code/ryzom/tools/leveldesign/georges_dll/georges_edit.cpp b/code/ryzom/tools/leveldesign/georges_dll/georges_edit.cpp index db3d4655c..2941acdc0 100644 --- a/code/ryzom/tools/leveldesign/georges_dll/georges_edit.cpp +++ b/code/ryzom/tools/leveldesign/georges_dll/georges_edit.cpp @@ -1091,27 +1091,27 @@ bool CGeorgesEditApp::SerialIntoMemStream (const char *formName, CGeorgesEditDoc { if (array) { - (safe_cast (node))->write (nodeXml, doc->getFormPtr(), NULL); + (safe_cast (node))->write (nodeXml, doc->getFormPtr(), std::string()); } else { if (type == UFormDfn::EntryDfn) { - (safe_cast (node))->write (nodeXml, doc->getFormPtr(), NULL); + (safe_cast (node))->write (nodeXml, doc->getFormPtr(), std::string()); } else if (type == UFormDfn::EntryVirtualDfn) { - (safe_cast (node))->write (nodeXml, doc->getFormPtr(), NULL); + (safe_cast (node))->write (nodeXml, doc->getFormPtr(), std::string()); } else if (type == UFormDfn::EntryType) { - (safe_cast (node))->write (nodeXml, doc->getFormPtr(), NULL); + (safe_cast (node))->write (nodeXml, doc->getFormPtr(), std::string()); } } } else { - (safe_cast (node))->write (nodeXml, doc->getFormPtr(), NULL); + (safe_cast (node))->write (nodeXml, doc->getFormPtr(), std::string()); } } From d934f5769ad1323645bbaff8631008f285419c8c Mon Sep 17 00:00:00 2001 From: kaetemi Date: Sun, 1 Dec 2019 11:25:46 +0800 Subject: [PATCH 106/236] Fix initialization --- code/nel/src/misc/streamed_package_manager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/nel/src/misc/streamed_package_manager.cpp b/code/nel/src/misc/streamed_package_manager.cpp index ecfb988b8..3fe497e3e 100644 --- a/code/nel/src/misc/streamed_package_manager.cpp +++ b/code/nel/src/misc/streamed_package_manager.cpp @@ -27,7 +27,7 @@ namespace NLMISC NLMISC_SAFE_SINGLETON_IMPL(CStreamedPackageManager); -CStreamedPackageManager::CStreamedPackageManager() +CStreamedPackageManager::CStreamedPackageManager() : Provider(NULL) { // init } From 174aff62d7a5c92b840deca9c137a98fe7da152f Mon Sep 17 00:00:00 2001 From: kaetemi Date: Sat, 30 Nov 2019 19:52:53 +0800 Subject: [PATCH 107/236] Fix buffer overflow --- code/nel/tools/pacs/build_indoor_rbank/mouline.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/code/nel/tools/pacs/build_indoor_rbank/mouline.cpp b/code/nel/tools/pacs/build_indoor_rbank/mouline.cpp index 57592a431..73e140464 100644 --- a/code/nel/tools/pacs/build_indoor_rbank/mouline.cpp +++ b/code/nel/tools/pacs/build_indoor_rbank/mouline.cpp @@ -16,6 +16,7 @@ #include #include +#include #include "nel/pacs/collision_mesh_build.h" #include "nel/pacs/local_retriever.h" @@ -278,24 +279,26 @@ void linkExteriorToInterior(CLocalRetriever &lr) for (i=0; i Date: Sat, 30 Nov 2019 20:05:59 +0800 Subject: [PATCH 108/236] Why is this duplicate?! --- code/nel/src/pacs/build_indoor.cpp | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/code/nel/src/pacs/build_indoor.cpp b/code/nel/src/pacs/build_indoor.cpp index ca14eb7cf..222c18311 100644 --- a/code/nel/src/pacs/build_indoor.cpp +++ b/code/nel/src/pacs/build_indoor.cpp @@ -17,6 +17,8 @@ #include "stdpacs.h" #include "nel/pacs/build_indoor.h" +#include + #include "nel/pacs/collision_mesh_build.h" #include "nel/pacs/local_retriever.h" #include "nel/pacs/exterior_mesh.h" @@ -518,24 +520,26 @@ void linkExteriorToInterior(CLocalRetriever &lr) for (i=0; i Date: Sat, 30 Nov 2019 20:11:32 +0800 Subject: [PATCH 109/236] Patch more dangerous strcat buffers --- code/nel/src/pacs/build_indoor.cpp | 3 +++ code/nel/src/pacs/local_retriever.cpp | 15 ++++++++----- code/nel/tools/3d/zone_welder/zone_welder.cpp | 22 ++++++++++++------- .../tools/pacs/build_indoor_rbank/mouline.cpp | 3 +++ .../world_editor/generate_primitive.cpp | 18 ++++++++------- 5 files changed, 39 insertions(+), 22 deletions(-) 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; } From 35bfb16ff976a36707c9d9c258d9f6c4af6b5de3 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Fri, 6 Dec 2019 16:24:25 +0800 Subject: [PATCH 110/236] Add super handy endsWith string utility function --- code/nel/include/nel/misc/string_common.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/code/nel/include/nel/misc/string_common.h b/code/nel/include/nel/misc/string_common.h index bc506cf82..3fd46b835 100644 --- a/code/nel/include/nel/misc/string_common.h +++ b/code/nel/include/nel/misc/string_common.h @@ -275,6 +275,21 @@ inline bool startsWith(const char *str, const char *prefix) inline bool startsWith(const std::string &str, const char *prefix) { return startsWith(str.c_str(), prefix); } inline bool startsWith(const std::string &str, const std::string &prefix) { return startsWith(str.c_str(), prefix.c_str()); } +inline bool endsWith(const char *str, size_t strLen, const char *suffix, size_t suffixLen) +{ + if (strLen < suffixLen) + return false; + int minLen = strLen < suffixLen ? strLen : suffixLen; + for (int i = 1; i <= minLen; ++i) + if (str[strLen - i] != suffix[suffixLen - i]) + return false; + return true; +} + +inline bool endsWith(const char *str, const char *suffix) { return endsWith(str, strlen(str), suffix, strlen(suffix)); } +inline bool endsWith(const std::string &str, const char *suffix) { return endsWith(str.c_str(), str.size(), suffix, strlen(suffix)); } +inline bool endsWith(const std::string &str, const std::string &suffix) { return endsWith(str.c_str(), str.size(), suffix.c_str(), suffix.size()); } + // Convert local codepage to UTF-8 // On Windows, the local codepage is undetermined // On Linux, the local codepage is always UTF-8 (no-op) From 1069a5acf9e64de9637c280779db0a9f377363c1 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Fri, 6 Dec 2019 16:25:30 +0800 Subject: [PATCH 111/236] New tool to reverse a ligo land build, for data restoration --- code/nel/tools/CMakeLists.txt | 4 + code/nel/tools/ligo/CMakeLists.txt | 6 + .../tools/ligo/unbuild_land/CMakeLists.txt | 11 + .../nel/tools/ligo/unbuild_land/gold_pill.ico | Bin 0 -> 3638 bytes code/nel/tools/ligo/unbuild_land/main.rc | 42 ++ .../tools/ligo/unbuild_land/unbuild_land.cpp | 495 ++++++++++++++++++ 6 files changed, 558 insertions(+) create mode 100644 code/nel/tools/ligo/CMakeLists.txt create mode 100644 code/nel/tools/ligo/unbuild_land/CMakeLists.txt create mode 100644 code/nel/tools/ligo/unbuild_land/gold_pill.ico create mode 100644 code/nel/tools/ligo/unbuild_land/main.rc create mode 100644 code/nel/tools/ligo/unbuild_land/unbuild_land.cpp diff --git a/code/nel/tools/CMakeLists.txt b/code/nel/tools/CMakeLists.txt index 8734bf103..5297f34a4 100644 --- a/code/nel/tools/CMakeLists.txt +++ b/code/nel/tools/CMakeLists.txt @@ -17,6 +17,10 @@ IF(WITH_NEL_TOOLS) ADD_SUBDIRECTORY(pacs) ENDIF() + IF(WITH_LIGO) + ADD_SUBDIRECTORY(ligo) + ENDIF() + IF(WITH_LOGIC) ADD_SUBDIRECTORY(logic) ENDIF() diff --git a/code/nel/tools/ligo/CMakeLists.txt b/code/nel/tools/ligo/CMakeLists.txt new file mode 100644 index 000000000..9a7f24ebe --- /dev/null +++ b/code/nel/tools/ligo/CMakeLists.txt @@ -0,0 +1,6 @@ + +IF(WITH_LIGO) + IF(WITH_3D) + ADD_SUBDIRECTORY(unbuild_land) + ENDIF() +ENDIF() diff --git a/code/nel/tools/ligo/unbuild_land/CMakeLists.txt b/code/nel/tools/ligo/unbuild_land/CMakeLists.txt new file mode 100644 index 000000000..3e8c8fbdb --- /dev/null +++ b/code/nel/tools/ligo/unbuild_land/CMakeLists.txt @@ -0,0 +1,11 @@ +FILE(GLOB SRC *.cpp *.h *.rc) + +SOURCE_GROUP("" FILES ${SRC}) + +ADD_EXECUTABLE(unbuild_land ${SRC}) + +TARGET_LINK_LIBRARIES(unbuild_land nel3d nelmisc nelligo) +NL_DEFAULT_PROPS(unbuild_land "NeL, Tools, Ligo: Unbuild Land") +NL_ADD_RUNTIME_FLAGS(unbuild_land) + +INSTALL(TARGETS unbuild_land RUNTIME DESTINATION ${NL_BIN_PREFIX} COMPONENT toolsligo) diff --git a/code/nel/tools/ligo/unbuild_land/gold_pill.ico b/code/nel/tools/ligo/unbuild_land/gold_pill.ico new file mode 100644 index 0000000000000000000000000000000000000000..618b67a5d196bdbdc4d497a3b7ca998b79039677 GIT binary patch literal 3638 zcmeH|zityj5XQf`vv2R8lRF0=!64zvLOcRZ@(47%1EO$G7suZ;o}Ow9KWIF7uW|24qu=jCYmGObHC}wun9t{!&1Sg$ zP6MyLV>})M&yFz~jWC%^fQS2+=cprf1?md?hZP`8`Oj#}K*|8hER?sITv4;NA<$;R zq>3WH(P#z%rJ$%(X!S5zlUP+N zzr|;JJa&1AAFqXdR(y5mKwA%eZ9P`}w)9@{Sn*u(Tk&M^-mm(n@m=v)}3W?H=*(Tyb(EO1J?UWK}aqZWd!Zofe&kK&zR)e`x(xG +#include "config.h" + +IDI_MAIN_ICON ICON DISCARDABLE "gold_pill.ico" + +#ifdef _DEBUG +#define NL_FILEEXT "_d" +#else +#define NL_FILEEXT "" +#endif + +VS_VERSION_INFO VERSIONINFO + FILEVERSION NL_VERSION_RC + PRODUCTVERSION NL_VERSION_RC + FILEFLAGSMASK VS_FFI_FILEFLAGSMASK +#ifdef _DEBUG + FILEFLAGS VS_FF_DEBUG +#else + FILEFLAGS 0x0L +#endif + FILEOS VOS_NT_WINDOWS32 + FILETYPE VFT_APP + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "CompanyName", AUTHOR + VALUE "FileDescription", "NeL Unbuild Land" + VALUE "FileVersion", NL_VERSION + VALUE "LegalCopyright", COPYRIGHT + VALUE "OriginalFilename", "unbuild_land" NL_FILEEXT ".exe" + VALUE "ProductName", "NeL Tools" + VALUE "ProductVersion", NL_PRODUCT_VERSION + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x9, 1200 + END +END diff --git a/code/nel/tools/ligo/unbuild_land/unbuild_land.cpp b/code/nel/tools/ligo/unbuild_land/unbuild_land.cpp new file mode 100644 index 000000000..4f9ed0d1f --- /dev/null +++ b/code/nel/tools/ligo/unbuild_land/unbuild_land.cpp @@ -0,0 +1,495 @@ +// NeL - MMORPG Framework +// 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 +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . +// +// This utility is intended to rescue a lost .land file from existing +// runtime zones. It does not recover the heightmap. +// +// Author: Jan BOON (Kaetemi) + +// #include "../../3d/zone_lib/zone_utility.h" + +#include +#include +#include +#include +#include +#include +#include +//#include +#include +//#include +//#include +//#include +//#include +#include +#include +#include + +using namespace NL3D; +using namespace NLMISC; +using namespace NLLIGO; +using namespace std; + +namespace /* anonymous */ +{ + +sint32 s_ZoneMinX, s_ZoneMinY, s_ZoneMaxX, s_ZoneMaxY; +float s_CellSize = 160.0f; + +std::string s_ZoneBricksDirIn; // UTF-8 path +std::string s_ZoneRuntimeDirIn; // UTF-8 path +std::string s_LandFileOut; // UTF-8 path + +CZoneRegion s_Land; + +bool saveLand() +{ + try + { + COFile fileOut; + if (fileOut.open(s_LandFileOut, false, true, false)) + { + COXml xml; + nlverify(xml.init(&fileOut)); + s_Land.serial(xml); + } + else + { + nlwarning("Can't open the land file for writing: %s", s_LandFileOut.c_str()); + return false; + } + } + catch (const Exception &e) + { + nlwarning("Error in writing land file: %s", e.what()); + return true; + } + return true; +} + +bool getXYFromZoneName(sint32 &x, sint32 &y, const string &zoneName) +{ + string xStr, yStr; + uint32 i = 0; + while (zoneName[i] != '_') + { + yStr += zoneName[i]; + ++i; + if (i == zoneName.size()) + goto Fail; + } + if (!NLMISC::fromString(yStr, y)) + goto Fail; + y = -y; + ++i; + while (i < zoneName.size()) + { + xStr += zoneName[i]; + ++i; + } + if (xStr.size() != 2) + goto Fail; + xStr = NLMISC::toUpper(xStr); + x = ((xStr[0] - 'A') * 26 + (xStr[1] - 'A')); + return true; +Fail: + x = -1; + y = -1; + return false; +} + +void centerVertices(std::vector &vertices) +{ + CVector2f avg = CVector2f(0, 0); + for (ptrdiff_t i = 0; i < vertices.size(); ++i) + avg += vertices[i]; + avg /= (float)vertices.size(); + nldebug("Average: %f, %f", avg.x, avg.y); + for (ptrdiff_t i = 0; i < vertices.size(); ++i) + vertices[i] -= avg; +} + +void offsetVertices(std::vector &vertices, int x, int y) +{ + CVector2f off = CVector2f((float)x * s_CellSize, (float)y * s_CellSize); + for (ptrdiff_t i = 0; i < vertices.size(); ++i) + vertices[i] -= off; +} + +float ratePoints(const std::vector &zone, const std::vector &ref, float xx, float xy, float yx, float yy) +{ + // Rudimentary distance rating of vertices (not very reliable, but good enough!) + + float md = 0.f; + // std::vector refcpy = ref; + std::vector usedref; + usedref.resize(ref.size(), false); + for (ptrdiff_t i = 0; i < zone.size(); ++i) + { + if (ref.size()) + { + int lowj = 0; + float lowv = (CVector2f(ref[0].x * xx + ref[0].y * xy, ref[0].x * yx + ref[0].y * yy) - zone[i]).sqrnorm(); + for (ptrdiff_t j = 1; j < ref.size(); ++j) + { + float v = (CVector2f(ref[j].x * xx + ref[j].y * xy, ref[j].x * yx + ref[j].y * yy) - zone[i]).sqrnorm(); + if (v < lowv) + { + lowj = j; + lowv = v; + } + } + md += sqrtf(lowv); + usedref[lowj] = true; + // keep it! - refcpy.erase(refcpy.begin() + lowj); + } + else + { + md += zone[i].norm(); + } + } +#if 0 + md = 0.f; + std::vector usedzone; + usedzone.resize(zone.size(), false); + for (ptrdiff_t j = 0; j < ref.size(); ++j) + { + if (usedref[j]) + { + if (zone.size()) + { + int lowi = 0; + float lowv = (CVector2f(ref[j].x * xx + ref[j].y * xy, ref[j].x * yx + ref[j].y * yy) - zone[0]).sqrnorm(); + for (ptrdiff_t i = 1; i < zone.size(); ++i) + { + float v = (CVector2f(ref[j].x * xx + ref[j].y * xy, ref[j].x * yx + ref[j].y * yy) - zone[i]).sqrnorm(); + if (v < lowv) + { + lowi = i; + lowv = v; + } + } + md += lowv; + usedzone[lowi] = true; + } + else + { + md += ref[j].norm(); + } + } + } + md = 0.f; + int nc = 0; + for (ptrdiff_t i = 0; i < zone.size(); ++i) + { + if (usedzone[i]) + { + if (ref.size()) + { + int lowj = 0; + float lowv = (CVector2f(ref[0].x * xx + ref[0].y * xy, ref[0].x * yx + ref[0].y * yy) - zone[i]).sqrnorm(); + for (ptrdiff_t j = 1; j < ref.size(); ++j) + { + float v = (CVector2f(ref[j].x * xx + ref[j].y * xy, ref[j].x * yx + ref[j].y * yy) - zone[i]).sqrnorm(); + if (v < lowv) + { + lowj = j; + lowv = v; + } + } + md += sqrtf(lowv); + usedref[lowj] = true; + // keep it! - refcpy.erase(refcpy.begin() + lowj); + } + else + { + md += zone[i].norm(); + } + } + else + { + ++nc; + // md += 1.0f; + // md += 0.01; + } + } + for (ptrdiff_t j = 0; j < ref.size(); ++j) + { + if (!usedref[j]) + { + // md += 1.0f; + // md += 0.01; + } + } + if (nc * 8 > zone.size()) + return md + 10000; +#endif + return md; +} + +void findBestBrick(std::string &brick, int &rotate, int &flip, float &es, std::vector &zoneVertices, const std::map> &brickVertices) +{ + float bestPoints = (float)(uint32)~0; + for (std::map>::const_iterator it = brickVertices.begin(), end = brickVertices.end(); it != end; ++it) + { + float rating; + rating = ratePoints(zoneVertices, it->second, 1.0, 0.0, 0.0, 1.0); + if (rating < bestPoints) + { + brick = it->first; + rotate = 0; + flip = 0; + bestPoints = rating; + } + rating = ratePoints(zoneVertices, it->second, 0.0, -1.0, 1.0, 0.0); + if (rating < bestPoints) + { + brick = it->first; + rotate = 1; + flip = 0; + bestPoints = rating; + } + rating = ratePoints(zoneVertices, it->second, -1.0, 0.0, 0.0, -1.0); + if (rating < bestPoints) + { + brick = it->first; + rotate = 2; + flip = 0; + bestPoints = rating; + } + rating = ratePoints(zoneVertices, it->second, 0.0, 1.0, -1.0, 0.0); + if (rating < bestPoints) + { + brick = it->first; + rotate = 3; + flip = 0; + } + rating = ratePoints(zoneVertices, it->second, -1.0, 0.0, 0.0, 1.0); + if (rating < bestPoints) + { + brick = it->first; + rotate = 0; + flip = 1; + bestPoints = rating; + } + rating = ratePoints(zoneVertices, it->second, 0.0, -1.0, -1.0, 0.0); + if (rating < bestPoints) + { + brick = it->first; + rotate = 1; + flip = 1; + bestPoints = rating; + } + rating = ratePoints(zoneVertices, it->second, 1.0, 0.0, 0.0, -1.0); + if (rating < bestPoints) + { + brick = it->first; + rotate = 2; + flip = 1; + bestPoints = rating; + } + rating = ratePoints(zoneVertices, it->second, 0.0, 1.0, 1.0, 0.0); + if (rating < bestPoints) + { + brick = it->first; + rotate = 3; + flip = 1; + bestPoints = rating; + } + } + es = bestPoints; +} + +bool unbuildLand() +{ + s_Land.resize(s_ZoneMinX, s_ZoneMaxX, s_ZoneMinY, s_ZoneMaxY); + + // float th = s_CellSize * 0.5f; + float th = (s_CellSize * 0.5f) - (s_CellSize * 0.2f * 0.5f); + + // Read in all the bricks + std::vector brickFiles; + CPath::getPathContent(s_ZoneBricksDirIn, false, false, true, brickFiles); + std::map> brickVertices; + for (std::vector::const_iterator it = brickFiles.begin(), end = brickFiles.end(); it != end; ++it) + { + if (CFile::getExtension(*it) != "zone") + continue; + + if (NLMISC::startsWith(CFile::getFilename(*it), "converted-")) // Not a real ligo + continue; + + // if (NLMISC::startsWith(CFile::getFilename(*it), "foret-moor")) // Not useful for r2_forest + // continue; + // if (NLMISC::startsWith(CFile::getFilename(*it), "goo-")) // Not useful for r2_forest + // continue; + // if (NLMISC::endsWith(CFile::getFilenameWithoutExtension(*it), "_zc")) // Not useful for r2_forest + // continue; + + nldebug("Load %s", CFile::getFilenameWithoutExtension(*it).c_str()); + + CIFile zoneFile(*it); + CZone zone; + zone.serial(zoneFile); + zoneFile.close(); + + // Retrieve patches and vertices + uint16 zoneId = zone.getZoneId(); + std::vector zonePatches; + std::vector zoneBorderVertices; + zone.retrieve(zonePatches, zoneBorderVertices); + + brickVertices[CFile::getFilenameWithoutExtension(*it)] = std::vector(); + std::vector &vec = brickVertices[CFile::getFilenameWithoutExtension(*it)]; + CVector2f off = CVector2f(s_CellSize * 0.5f, s_CellSize * 0.5f); + for (ptrdiff_t i = 0; i < zonePatches.size(); ++i) + { + for (ptrdiff_t j = 0; j < 4; ++j) + { + float rx = zonePatches[i].Patch.Vertices[j].x - off.x; + float ry = zonePatches[i].Patch.Vertices[j].y - off.y; + if (rx <= -th || rx >= th + || ry <= -th || ry >= th) + goto SkipA; + } + for (ptrdiff_t j = 0; j < 4; ++j) + { + float rx = zonePatches[i].Patch.Vertices[j].x - off.x; + float ry = zonePatches[i].Patch.Vertices[j].y - off.y; + vec.push_back(CVector2f(rx, ry)); + } + SkipA:; + } + + // centerVertices(vec); + } + + std::vector runtimeFiles; + CPath::getPathContent(s_ZoneRuntimeDirIn, false, false, true, runtimeFiles); + for (std::vector::const_iterator it = runtimeFiles.begin(), end = runtimeFiles.end(); it != end; ++it) + { + if (CFile::getExtension(*it) != "zonel") + continue; + + int x, y; + std::string zoneName = CFile::getFilenameWithoutExtension(*it); + if (!getXYFromZoneName(x, y, zoneName)) + { + nlerrornoex("Bad zone name: %s", zoneName.c_str()); + continue; + } + + CIFile zoneFile(*it); + CZone zone; + zone.serial(zoneFile); + zoneFile.close(); + + // Retrieve patches and vertices + uint16 zoneId = zone.getZoneId(); + std::vector zonePatches; + std::vector zoneBorderVertices; + zone.retrieve(zonePatches, zoneBorderVertices); + + std::vector vec; + CVector2f off = CVector2f((float)x * s_CellSize, (float)y * s_CellSize) + CVector2f(s_CellSize * 0.5f, s_CellSize * 0.5f); + for (ptrdiff_t i = 0; i < zonePatches.size(); ++i) + { + for (ptrdiff_t j = 0; j < 4; ++j) + { + float rx = zonePatches[i].Patch.Vertices[j].x - off.x; + float ry = zonePatches[i].Patch.Vertices[j].y - off.y; + if (rx <= -th || rx >= th + || ry <= -th || ry >= th) + goto SkipB; + } + for (ptrdiff_t j = 0; j < 4; ++j) + { + float rx = zonePatches[i].Patch.Vertices[j].x - off.x; + float ry = zonePatches[i].Patch.Vertices[j].y - off.y; + vec.push_back(CVector2f(rx, ry)); + } + SkipB:; + } + + // offsetVertices(vec, x, y); + // centerVertices(vec); + + std::string brick; + int rotate; + int flip; + float es; + findBestBrick(brick, rotate, flip, es, vec, brickVertices); + + nlinfo("Zone: %s, brick: %s, rotate: %i; flip: %i, error score: %f", zoneName.c_str(), brick.c_str(), rotate, flip, es); + + s_Land.setName(x, y, brick); + s_Land.setRot(x, y, rotate); + s_Land.setFlip(x, y, flip); + } + + return saveLand(); +} + +} /* anonymous namespace */ + +int main(int argc, char **argv) +{ + NLMISC::CApplicationContext myApplicationContext; + + NLMISC::CCmdArgs args; + + args.addAdditionalArg("land", "Output ligo land file"); + args.addAdditionalArg("zonebricks", "Input zone bricks directory"); + args.addAdditionalArg("zoneruntime", "Input runtime zone directory"); + args.addAdditionalArg("zonemin", "Zone boundary"); + args.addAdditionalArg("zonemax", "Zone boundary"); + args.addArg("", "cellsize", "meters", "Zone cell size"); + + if (!args.parse(argc, argv)) + { + return EXIT_FAILURE; + } + + s_LandFileOut = args.getAdditionalArg("land")[0]; + s_ZoneBricksDirIn = args.getAdditionalArg("zonebricks")[0]; + s_ZoneRuntimeDirIn = args.getAdditionalArg("zoneruntime")[0]; + + sint32 zoneMinX, zoneMinY; + sint32 zoneMaxX, zoneMaxY; + if (!getXYFromZoneName(zoneMinX, zoneMinY, args.getAdditionalArg("zonemin")[0]) + || !getXYFromZoneName(zoneMaxX, zoneMaxY, args.getAdditionalArg("zonemax")[0])) + { + goto Fail; + } + s_ZoneMinX = min(zoneMinX, zoneMaxX); + s_ZoneMaxX = max(zoneMinX, zoneMaxX); + s_ZoneMinY = min(zoneMinY, zoneMaxY); + s_ZoneMaxY = max(zoneMinY, zoneMaxY); + + if (args.haveLongArg("cellsize")) + { + if (!NLMISC::fromString(args.getLongArg("cellsize")[0], s_CellSize)) + goto Fail; + } + + if (!unbuildLand()) + return EXIT_FAILURE; + + return EXIT_SUCCESS; +Fail: + args.displayHelp(); + return EXIT_FAILURE; +} From 3ed3841c3a8edb5282ca5da91295f90ecde93e60 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Sun, 8 Dec 2019 12:03:50 +0800 Subject: [PATCH 112/236] Fix crash in zone_lighter, index buffer was assumed 32 bit --- code/nel/src/3d/zone_lighter.cpp | 91 +++++++++++++++++++++++--------- 1 file changed, 67 insertions(+), 24 deletions(-) diff --git a/code/nel/src/3d/zone_lighter.cpp b/code/nel/src/3d/zone_lighter.cpp index b17ab5f2d..5dd322cc8 100644 --- a/code/nel/src/3d/zone_lighter.cpp +++ b/code/nel/src/3d/zone_lighter.cpp @@ -2,7 +2,7 @@ // Copyright (C) 2010 Winch Gate Property Limited // // This source file has been modified by the following contributors: -// Copyright (C) 2013-2014 Jan BOON (Kaetemi) +// Copyright (C) 2013-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 @@ -1765,7 +1765,7 @@ void CZoneLighter::addTriangles (const CMeshBase &meshBase, const CMeshGeom &mes alphaTestThreshold)); } } - else + else if (iba.getFormat() == CIndexBuffer::Indices16) { const uint16* triIndex=(const uint16*)iba.getPtr (); uint numTri=primitive.getNumIndexes ()/3; @@ -1797,6 +1797,10 @@ void CZoneLighter::addTriangles (const CMeshBase &meshBase, const CMeshGeom &mes alphaTestThreshold)); } } + else + { + nlerror("Invalid index buffer format"); + } } } } @@ -1901,34 +1905,73 @@ void CZoneLighter::addTriangles (const CMeshBase &meshBase, const CMeshMRMGeom & // Dump triangles CIndexBufferRead iba; primitive.lock (iba); - const uint32* triIndex= (const uint32 *) iba.getPtr (); - uint numTri=primitive.getNumIndexes ()/3; - uint tri; - for (tri=0; tri Date: Wed, 11 Dec 2019 18:16:03 +0800 Subject: [PATCH 113/236] Add option to include Z coordinate for zone test --- .../tools/ligo/unbuild_land/unbuild_land.cpp | 41 +++++++++++-------- 1 file changed, 23 insertions(+), 18 deletions(-) diff --git a/code/nel/tools/ligo/unbuild_land/unbuild_land.cpp b/code/nel/tools/ligo/unbuild_land/unbuild_land.cpp index 4f9ed0d1f..37b3b4e79 100644 --- a/code/nel/tools/ligo/unbuild_land/unbuild_land.cpp +++ b/code/nel/tools/ligo/unbuild_land/unbuild_land.cpp @@ -49,6 +49,8 @@ namespace /* anonymous */ sint32 s_ZoneMinX, s_ZoneMinY, s_ZoneMaxX, s_ZoneMaxY; float s_CellSize = 160.0f; +bool s_Height = false; + std::string s_ZoneBricksDirIn; // UTF-8 path std::string s_ZoneRuntimeDirIn; // UTF-8 path std::string s_LandFileOut; // UTF-8 path @@ -111,9 +113,9 @@ Fail: return false; } -void centerVertices(std::vector &vertices) +void centerVertices(std::vector &vertices) { - CVector2f avg = CVector2f(0, 0); + CVector avg = CVector(0.0f, 0.0f, 0.0f); for (ptrdiff_t i = 0; i < vertices.size(); ++i) avg += vertices[i]; avg /= (float)vertices.size(); @@ -122,19 +124,19 @@ void centerVertices(std::vector &vertices) vertices[i] -= avg; } -void offsetVertices(std::vector &vertices, int x, int y) +void offsetVertices(std::vector &vertices, int x, int y) { - CVector2f off = CVector2f((float)x * s_CellSize, (float)y * s_CellSize); + CVector off = CVector((float)x * s_CellSize, (float)y * s_CellSize, 0.0f); for (ptrdiff_t i = 0; i < vertices.size(); ++i) vertices[i] -= off; } -float ratePoints(const std::vector &zone, const std::vector &ref, float xx, float xy, float yx, float yy) +float ratePoints(const std::vector &zone, const std::vector &ref, float xx, float xy, float yx, float yy) { // Rudimentary distance rating of vertices (not very reliable, but good enough!) float md = 0.f; - // std::vector refcpy = ref; + // std::vector refcpy = ref; std::vector usedref; usedref.resize(ref.size(), false); for (ptrdiff_t i = 0; i < zone.size(); ++i) @@ -142,10 +144,10 @@ float ratePoints(const std::vector &zone, const std::vector &zone, const std::vector &zoneVertices, const std::map> &brickVertices) +void findBestBrick(std::string &brick, int &rotate, int &flip, float &es, std::vector &zoneVertices, const std::map> &brickVertices) { float bestPoints = (float)(uint32)~0; - for (std::map>::const_iterator it = brickVertices.begin(), end = brickVertices.end(); it != end; ++it) + for (std::map>::const_iterator it = brickVertices.begin(), end = brickVertices.end(); it != end; ++it) { float rating; rating = ratePoints(zoneVertices, it->second, 1.0, 0.0, 0.0, 1.0); @@ -323,7 +325,7 @@ bool unbuildLand() // Read in all the bricks std::vector brickFiles; CPath::getPathContent(s_ZoneBricksDirIn, false, false, true, brickFiles); - std::map> brickVertices; + std::map> brickVertices; for (std::vector::const_iterator it = brickFiles.begin(), end = brickFiles.end(); it != end; ++it) { if (CFile::getExtension(*it) != "zone") @@ -352,9 +354,9 @@ bool unbuildLand() std::vector zoneBorderVertices; zone.retrieve(zonePatches, zoneBorderVertices); - brickVertices[CFile::getFilenameWithoutExtension(*it)] = std::vector(); - std::vector &vec = brickVertices[CFile::getFilenameWithoutExtension(*it)]; - CVector2f off = CVector2f(s_CellSize * 0.5f, s_CellSize * 0.5f); + brickVertices[CFile::getFilenameWithoutExtension(*it)] = std::vector(); + std::vector &vec = brickVertices[CFile::getFilenameWithoutExtension(*it)]; + CVector off = CVector(s_CellSize * 0.5f, s_CellSize * 0.5f, 0.0f); for (ptrdiff_t i = 0; i < zonePatches.size(); ++i) { for (ptrdiff_t j = 0; j < 4; ++j) @@ -369,7 +371,7 @@ bool unbuildLand() { float rx = zonePatches[i].Patch.Vertices[j].x - off.x; float ry = zonePatches[i].Patch.Vertices[j].y - off.y; - vec.push_back(CVector2f(rx, ry)); + vec.push_back(CVector(rx, ry, s_Height ? zonePatches[i].Patch.Vertices[j].z : 0.0f)); } SkipA:; } @@ -403,8 +405,8 @@ bool unbuildLand() std::vector zoneBorderVertices; zone.retrieve(zonePatches, zoneBorderVertices); - std::vector vec; - CVector2f off = CVector2f((float)x * s_CellSize, (float)y * s_CellSize) + CVector2f(s_CellSize * 0.5f, s_CellSize * 0.5f); + std::vector vec; + CVector off = CVector((float)x * s_CellSize, (float)y * s_CellSize, 0.0f) + CVector(s_CellSize * 0.5f, s_CellSize * 0.5f, 0.0f); for (ptrdiff_t i = 0; i < zonePatches.size(); ++i) { for (ptrdiff_t j = 0; j < 4; ++j) @@ -419,7 +421,7 @@ bool unbuildLand() { float rx = zonePatches[i].Patch.Vertices[j].x - off.x; float ry = zonePatches[i].Patch.Vertices[j].y - off.y; - vec.push_back(CVector2f(rx, ry)); + vec.push_back(CVector(rx, ry, s_Height ? zonePatches[i].Patch.Vertices[j].z : 0.0f)); } SkipB:; } @@ -457,6 +459,7 @@ int main(int argc, char **argv) args.addAdditionalArg("zonemin", "Zone boundary"); args.addAdditionalArg("zonemax", "Zone boundary"); args.addArg("", "cellsize", "meters", "Zone cell size"); + args.addArg("", "height", "", "Take Z coordinate into account"); if (!args.parse(argc, argv)) { @@ -479,6 +482,8 @@ int main(int argc, char **argv) s_ZoneMinY = min(zoneMinY, zoneMaxY); s_ZoneMaxY = max(zoneMinY, zoneMaxY); + s_Height = args.haveLongArg("height"); + if (args.haveLongArg("cellsize")) { if (!NLMISC::fromString(args.getLongArg("cellsize")[0], s_CellSize)) From 761770d4eb961d01b9c0004c1742c302af2fd2be Mon Sep 17 00:00:00 2001 From: kaetemi Date: Thu, 12 Dec 2019 09:16:45 +0800 Subject: [PATCH 114/236] Fix divide by zero crash in zone lighter --- code/nel/src/3d/zone_lighter.cpp | 53 ++++++++++++++++++-------------- 1 file changed, 30 insertions(+), 23 deletions(-) diff --git a/code/nel/src/3d/zone_lighter.cpp b/code/nel/src/3d/zone_lighter.cpp index 5dd322cc8..570ba1075 100644 --- a/code/nel/src/3d/zone_lighter.cpp +++ b/code/nel/src/3d/zone_lighter.cpp @@ -1179,36 +1179,43 @@ void CZoneLighter::light (CLandscape &landscape, CZone& output, uint zoneToLight // Set the thread state _LastPatchComputed.resize (_ProcessCount); - // Launch threads - uint process; - for (process=0; process<_ProcessCount; process++) + if (patchCount) { - // Last patch - uint lastPatch=firstPatch+patchCountByThread; - lastPatch %= patchCount; + // Launch threads + uint process; + for (process = 0; process < _ProcessCount; process++) + { + // Last patch + uint lastPatch = firstPatch + patchCountByThread; + lastPatch %= patchCount; - // Last patch computed - _LastPatchComputed[process] = firstPatch; + // Last patch computed + _LastPatchComputed[process] = firstPatch; - // Create a thread - CLightRunnable *runnable = new CLightRunnable (process, this, &description); - IThread *pThread=IThread::create (runnable); - runnable->Thread = pThread; + // Create a thread + CLightRunnable *runnable = new CLightRunnable(process, this, &description); + IThread *pThread = IThread::create(runnable); + runnable->Thread = pThread; - // New first patch - firstPatch=lastPatch; + // New first patch + firstPatch = lastPatch; - // Launch - pThread->start(); - } + // Launch + pThread->start(); + } - // Wait for others processes - while (_ProcessExited!=_ProcessCount) - { - nlSleep (1000); + // Wait for others processes + while (_ProcessExited != _ProcessCount) + { + nlSleep(1000); - // Call the progress callback - progress ("Lighting patches", (float)_NumberOfPatchComputed/(float)_PatchInfo.size()); + // Call the progress callback + progress("Lighting patches", (float)_NumberOfPatchComputed / (float)_PatchInfo.size()); + } + } + else + { + nlwarning("Empty zone"); } // Reset old thread mask From e1c48be4ba6b7d1313942bf611c11df4a449b1e8 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Sat, 14 Dec 2019 09:04:54 +0800 Subject: [PATCH 115/236] Allow mapping TStringId from string literals, avoiding std::string allocation --- code/nel/include/nel/misc/string_mapper.h | 76 +++++++++++++++++------ code/nel/include/nel/misc/types_nl.h | 18 +++++- code/nel/src/misc/string_mapper.cpp | 63 +++++++++++-------- 3 files changed, 111 insertions(+), 46 deletions(-) diff --git a/code/nel/include/nel/misc/string_mapper.h b/code/nel/include/nel/misc/string_mapper.h index aeaccf959..c2229e746 100644 --- a/code/nel/include/nel/misc/string_mapper.h +++ b/code/nel/include/nel/misc/string_mapper.h @@ -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 @@ -65,7 +68,23 @@ class CStringMapper class CCharComp { public: - bool operator()(std::string *x, std::string *y) const +#ifdef NL_CPP14 + // https://www.fluentcpp.com/2017/06/09/search-set-another-type-key/ + + using is_transparent = void; + + bool operator()(const std::string *x, const char *y) const + { + return strcmp(x->c_str(), y) < 0; + } + + bool operator()(const char *x, const std::string *y) const + { + return strcmp(x, y->c_str()) < 0; + } +#endif + + bool operator()(const std::string *x, const std::string *y) const { return (*x) < (*y); } @@ -73,53 +92,70 @@ class CStringMapper class CAutoFastMutex { - CFastMutex *_Mutex; + CFastMutex *m_Mutex; + public: - CAutoFastMutex(CFastMutex *mtx) : _Mutex(mtx) {_Mutex->enter();} - ~CAutoFastMutex() {_Mutex->leave();} + CAutoFastMutex(CFastMutex *mtx) + : m_Mutex(mtx) + { + m_Mutex->enter(); + } + ~CAutoFastMutex() { m_Mutex->leave(); } }; // Local Data - std::set _StringTable; - std::string* _EmptyId; - CFastMutex _Mutex; // Must be thread-safe (Called by CPortal/CCluster, each of them called by CInstanceGroup) + typedef std::set TStringTable; + TStringTable m_StringTable; + std::string *m_EmptyId; + CFastMutex m_Mutex; // Must be thread-safe (Called by CPortal/CCluster, each of them called by CInstanceGroup) // The 'singleton' for static methods - static CStringMapper _GlobalMapper; + static CStringMapper s_GlobalMapper; // private constructor. CStringMapper(); public: - ~CStringMapper() { localClear(); + delete m_EmptyId; } /// Globaly map a string into a unique Id. ** This method IS Thread-Safe ** - static TStringId map(const std::string &str) { return _GlobalMapper.localMap(str); } + static TStringId map(const std::string &str) { return s_GlobalMapper.localMap(str); } + /// Globaly map a string into a unique Id. ** This method IS Thread-Safe ** + static TStringId map(const char *str) { return s_GlobalMapper.localMap(str); } /// Globaly unmap a string. ** This method IS Thread-Safe ** - static const std::string &unmap(const TStringId &stringId) { return _GlobalMapper.localUnmap(stringId); } + static const std::string &unmap(const TStringId &stringId) { return s_GlobalMapper.localUnmap(stringId); } /// Globaly helper to serial a string id. ** This method IS Thread-Safe ** - static void serialString(NLMISC::IStream &f, TStringId &id) {_GlobalMapper.localSerialString(f, id);} + static void serialString(NLMISC::IStream &f, TStringId &id) { s_GlobalMapper.localSerialString(f, id); } /// Return the global id for the empty string (helper function). NB: Works with every instance of CStringMapper - static TStringId emptyId() { return 0; } + static TStringId emptyId() { return NULL; } // ** This method IS Thread-Safe ** - static void clear() { _GlobalMapper.localClear(); } + static void clear() { s_GlobalMapper.localClear(); } /// Create a local mapper. You can dispose of it by deleting it. - static CStringMapper * createLocalMapper(); + static CStringMapper *createLocalMapper(); /// Localy map a string into a unique Id - TStringId localMap(const std::string &str); + TStringId localMap(const std::string &str); +#ifdef NL_CPP14 + /** + \brief Localy map a string into a unique Id. + Lookup in string mapper using `const char *` + to avoid an std::string allocation when using literals. + \author Jan BOON (Kaetemi) + \date 2019 + */ + TStringId localMap(const char *str); +#endif /// Localy unmap a string - const std::string &localUnmap(const TStringId &stringId) { return (stringId==0)?*_EmptyId:*((std::string*)stringId); } + const std::string &localUnmap(const TStringId &stringId) const { return (stringId == NULL) ? *m_EmptyId : *((const std::string *)stringId); } /// Localy helper to serial a string id - void localSerialString(NLMISC::IStream &f, TStringId &id); - - void localClear(); + void localSerialString(NLMISC::IStream &f, TStringId &id); + void localClear(); }; // linear from 0 (0 is empty string) (The TSStringId returned by CStaticStringMapper diff --git a/code/nel/include/nel/misc/types_nl.h b/code/nel/include/nel/misc/types_nl.h index d5a566d89..ff91f36d5 100644 --- a/code/nel/include/nel/misc/types_nl.h +++ b/code/nel/include/nel/misc/types_nl.h @@ -70,7 +70,13 @@ # endif # ifdef _MSC_VER # define NL_COMP_VC -# if _MSC_VER >= 1900 +# if _MSC_VER >= 1920 +# define NL_COMP_VC14 +# define NL_COMP_VC_VERSION 142 +# elif _MSC_VER >= 1910 +# define NL_COMP_VC14 +# define NL_COMP_VC_VERSION 141 +# elif _MSC_VER >= 1900 # define NL_COMP_VC14 # define NL_COMP_VC_VERSION 140 # elif _MSC_VER >= 1800 @@ -176,6 +182,16 @@ # define NL_NO_EXCEPTION_SPECS #endif +// https://docs.microsoft.com/en-us/cpp/overview/visual-cpp-language-conformance?view=vs-2019 +// https://gcc.gnu.org/projects/cxx-status.html +#if (defined(_MSC_VER) && (_MSC_VER >= 1910)) || (defined(__GNUC__ ) && (__GNUC__ >= 8)) +# define NL_CPP17 +#endif + +#if (defined(_MSC_VER) && (_MSC_VER >= 1900)) || (defined(__GNUC__ ) && (__GNUC__ >= 6)) +# define NL_CPP14 +#endif + #if defined(NL_COMP_VC) && (NL_COMP_VC_VERSION >= 140) #define nlmove(v) std::move(v) #else diff --git a/code/nel/src/misc/string_mapper.cpp b/code/nel/src/misc/string_mapper.cpp index 39931efd2..8518afa4b 100644 --- a/code/nel/src/misc/string_mapper.cpp +++ b/code/nel/src/misc/string_mapper.cpp @@ -27,13 +27,12 @@ using namespace std; namespace NLMISC { -CStringMapper CStringMapper::_GlobalMapper; - +CStringMapper CStringMapper::s_GlobalMapper; // **************************************************************************** CStringMapper::CStringMapper() { - _EmptyId = new string(); + m_EmptyId = new string(); } // **************************************************************************** @@ -46,39 +45,54 @@ CStringMapper *CStringMapper::createLocalMapper() TStringId CStringMapper::localMap(const std::string &str) { if (str.empty()) - return 0; - - CAutoFastMutex automutex(&_Mutex); + return NULL; - string *pStr = new string; - *pStr = str; + CAutoFastMutex autoMutex(&m_Mutex); - std::set::iterator it = _StringTable.find(pStr); + TStringTable::const_iterator it = m_StringTable.find((const std::string *)&str); - if (it == _StringTable.end()) + if (it == m_StringTable.end()) { - _StringTable.insert(pStr); + string *pStr = new string(str); + m_StringTable.insert(pStr); + return pStr; } - else + return (TStringId)(*it); +} + +#ifdef NL_CPP14 +// **************************************************************************** +TStringId CStringMapper::localMap(const char *str) +{ + if (!str[0]) + return NULL; + + CAutoFastMutex autoMutex(&m_Mutex); + + TStringTable::const_iterator it = m_StringTable.find(str); + + if (it == m_StringTable.end()) { - delete pStr; - pStr = (*it); + string *pStr = new string(str); + m_StringTable.insert(pStr); + return pStr; } - return (TStringId)pStr; + return (TStringId)(*it); } +#endif // *************************************************************************** void CStringMapper::localSerialString(NLMISC::IStream &f, TStringId &id) { - std::string str; - if(f.isReading()) + std::string str; + if (f.isReading()) { f.serial(str); - id= localMap(str); + id = localMap(str); } else { - str= localUnmap(id); + str = localUnmap(id); f.serial(str); } } @@ -86,17 +100,16 @@ void CStringMapper::localSerialString(NLMISC::IStream &f, TStringId &id) // **************************************************************************** void CStringMapper::localClear() { - CAutoFastMutex automutex(&_Mutex); + CAutoFastMutex autoMutex(&m_Mutex); - std::set::iterator it = _StringTable.begin(); - while (it != _StringTable.end()) + TStringTable::iterator it = m_StringTable.begin(); + while (it != m_StringTable.end()) { - string *ptrTmp = (*it); + const std::string *ptrTmp = (*it); delete ptrTmp; it++; } - _StringTable.clear(); - delete _EmptyId; + m_StringTable.clear(); } // **************************************************************************** From 4645d1837d1fdc4e9ef5442c746eaec0e64054d7 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Sat, 14 Dec 2019 11:12:15 +0800 Subject: [PATCH 116/236] Fix tool build --- code/ryzom/tools/leveldesign/mp_generator/main.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/code/ryzom/tools/leveldesign/mp_generator/main.cpp b/code/ryzom/tools/leveldesign/mp_generator/main.cpp index 267f6a4ab..150807f5c 100644 --- a/code/ryzom/tools/leveldesign/mp_generator/main.cpp +++ b/code/ryzom/tools/leveldesign/mp_generator/main.cpp @@ -307,6 +307,11 @@ bool endsWith( const CSString& s, const CSString& substring ) return (s.right( (uint)substring.size() ) == substring); } +bool endsWith( const CSString& s, const char *substring ) +{ + return endsWith(s, CSString(substring)); +} + // Generate item names void GenerateItemNames( const CSString& nomMP, char eco, int level, bool mission, bool creature, CSString& outStr ) From 45a43384daaff25deb94102c21448939562e84df Mon Sep 17 00:00:00 2001 From: kaetemi Date: Sat, 14 Dec 2019 11:12:38 +0800 Subject: [PATCH 117/236] Allow mapping CSheetId from string literals, avoiding std::string allocation --- code/nel/include/nel/misc/sheet_id.h | 54 ++++++++- code/nel/include/nel/misc/types_nl.h | 4 +- code/nel/src/misc/sheet_id.cpp | 162 +++++++++++++++++++++++---- 3 files changed, 192 insertions(+), 28 deletions(-) diff --git a/code/nel/include/nel/misc/sheet_id.h b/code/nel/include/nel/misc/sheet_id.h index dc5a1385b..856dbf330 100644 --- a/code/nel/include/nel/misc/sheet_id.h +++ b/code/nel/include/nel/misc/sheet_id.h @@ -58,19 +58,43 @@ public : */ explicit CSheetId( uint32 sheetRef = 0 ); + /** + * Constructor + */ + explicit CSheetId( int sheetRef ); + /** * Constructor */ explicit CSheetId( const std::string& sheetName ); + /** + * Operator= + */ + explicit CSheetId( const char *sheetName ); + /** * Constructor, uses defaultType as extension when sheetName * contains no file extension. */ explicit CSheetId( const std::string& sheetName, const std::string &defaultType ); + /** + * Constructor, uses defaultType as extension when sheetName + * contains no file extension. + */ + explicit CSheetId( const std::string& sheetName, const char *defaultType ); + + /** + * Constructor, uses defaultType as extension when sheetName + * contains no file extension. + */ + explicit CSheetId( const char *sheetName, const char *defaultType ); + // build from a string and returns true if the build succeed - bool buildSheetId(const std::string& sheetName); + bool buildSheetId(const char *sheetName, size_t sheetNameLen); + inline bool buildSheetId(const char *sheetName) { return buildSheetId(sheetName, strlen(sheetName)); } + inline bool buildSheetId(const std::string &sheetName) { return buildSheetId(sheetName.c_str(), sheetName.size()); } // build from a SubSheetId and a type void buildSheetId(uint32 shortId, uint32 type); @@ -93,17 +117,22 @@ public : /** * Return the **whole** sheet id (id+type) */ - uint32 asInt() const { return _Id.Id; } + inline uint32 asInt() const { return _Id.Id; } /** * Return the sheet type (sub part of the sheetid) */ - uint32 getSheetType() const { return _Id.IdInfos.Type; } + inline uint32 getSheetType() const { return _Id.IdInfos.Type; } /** * Return the sheet sub id (sub part of the sheetid) */ - uint32 getShortId() const { return _Id.IdInfos.Id; } + inline uint32 getShortId() const { return _Id.IdInfos.Id; } + + /** + * Operator bool + */ + inline operator bool() const { return _Id.Id; } /** * Operator= @@ -115,11 +144,21 @@ public : */ CSheetId& operator=( const std::string& sheetName ); + /** + * Operator= + */ + CSheetId& operator=( const char *sheetName ); + /** * Operator= */ CSheetId& operator=( uint32 sheetRef ); + /** + * Operator= + */ + CSheetId& operator=( int sheetRef ); + /** * Operator< */ @@ -218,9 +257,12 @@ private : } }; + typedef CStaticMap TSheetIdToNameMap; + typedef CStaticMap TSheetNameToIdMap; + static CChar _AllStrings; - static CStaticMap _SheetIdToName; - static CStaticMap _SheetNameToId; + static TSheetIdToNameMap _SheetIdToName; + static TSheetNameToIdMap _SheetNameToId; static std::vector _FileExtensions; static bool _Initialised; diff --git a/code/nel/include/nel/misc/types_nl.h b/code/nel/include/nel/misc/types_nl.h index ff91f36d5..3797c1137 100644 --- a/code/nel/include/nel/misc/types_nl.h +++ b/code/nel/include/nel/misc/types_nl.h @@ -184,11 +184,11 @@ // https://docs.microsoft.com/en-us/cpp/overview/visual-cpp-language-conformance?view=vs-2019 // https://gcc.gnu.org/projects/cxx-status.html -#if (defined(_MSC_VER) && (_MSC_VER >= 1910)) || (defined(__GNUC__ ) && (__GNUC__ >= 8)) +#if (defined(_MSC_VER) && (_MSC_VER >= 1910) && (!defined(_HAS_CXX17) || _HAS_CXX17)) || (defined(__GNUC__ ) && (__GNUC__ >= 8) && (__cplusplus >= 201703L)) # define NL_CPP17 #endif -#if (defined(_MSC_VER) && (_MSC_VER >= 1900)) || (defined(__GNUC__ ) && (__GNUC__ >= 6)) +#if (defined(_MSC_VER) && (_MSC_VER >= 1900)) || (defined(__GNUC__ ) && (__GNUC__ >= 6) && (__cplusplus >= 201402L)) # define NL_CPP14 #endif diff --git a/code/nel/src/misc/sheet_id.cpp b/code/nel/src/misc/sheet_id.cpp index 55f517e4d..77a56c099 100644 --- a/code/nel/src/misc/sheet_id.cpp +++ b/code/nel/src/misc/sheet_id.cpp @@ -52,7 +52,7 @@ std::map CSheetId::_DevTypeNameToId; std::vector> CSheetId::_DevSheetIdToName; std::map CSheetId::_DevSheetNameToId; -const CSheetId CSheetId::Unknown(0); +const CSheetId CSheetId::Unknown((uint32)0); void CSheetId::cbFileChange(const std::string &filename) { @@ -74,7 +74,35 @@ CSheetId::CSheetId(uint32 sheetRef) // For now, all static CSheetId are 0 (eg: CSheetId::Unknown) if (sheetRef) { - CStaticMap::iterator it(_SheetIdToName.find(sheetRef)); + TSheetIdToNameMap::iterator it(_SheetIdToName.find(sheetRef)); + if (it != _SheetIdToName.end()) + { + _DebugSheetName = it->second.Ptr; + } + else + _DebugSheetName = NULL; + } + else + { + _DebugSheetName = NULL; + } +#endif +} + +//----------------------------------------------- +// CSheetId +// +//----------------------------------------------- +CSheetId::CSheetId(int sheetRef) +{ + _Id.Id = (uint32)sheetRef; + +#ifdef NL_DEBUG_SHEET_ID + // Yoyo: don't access the static map, because of order of static ctor call. + // For now, all static CSheetId are 0 (eg: CSheetId::Unknown) + if (sheetRef) + { + TSheetIdToNameMap::iterator it(_SheetIdToName.find(sheetRef)); if (it != _SheetIdToName.end()) { _DebugSheetName = it->second.Ptr; @@ -95,7 +123,7 @@ CSheetId::CSheetId(uint32 sheetRef) //----------------------------------------------- CSheetId::CSheetId(const string &sheetName) { - if (!buildSheetId(sheetName)) + if (!buildSheetId(sheetName.c_str(), sheetName.size())) { if (sheetName.empty()) nlwarning("SHEETID: Try to create an CSheetId with empty name. TODO: check why."); @@ -115,6 +143,25 @@ CSheetId::CSheetId(const string &sheetName) } // CSheetId // +//----------------------------------------------- +// CSheetId +// +//----------------------------------------------- +CSheetId::CSheetId(const char *sheetName) +{ + if (!buildSheetId(sheetName, strlen(sheetName))) + { + if (!sheetName[0]) + nlwarning("SHEETID: Try to create an CSheetId with empty name. TODO: check why."); + else + nlwarning("SHEETID: The sheet '%s' is not in sheet_id.bin, setting it to Unknown", sheetName); + *this = Unknown; + } + + // nldebug("LIST_SHEET_ID: %s (%s)", toString().c_str(), sheetName.c_str()); + +} // CSheetId // + CSheetId::CSheetId(const std::string &sheetName, const std::string &defaultType) { // Don't use this function without defaultType, use the one above. @@ -132,11 +179,47 @@ CSheetId::CSheetId(const std::string &sheetName, const std::string &defaultType) } } +static std::string s_Dot = "."; + +CSheetId::CSheetId(const std::string &sheetName, const char *defaultType) +{ + // Don't use this function without defaultType, use the one above. + nlassert(defaultType[0]); + + if (sheetName.rfind('.') == std::string::npos) + { + std::string withType = sheetName + s_Dot + defaultType; + *this = CSheetId(withType); + // nldebug("SHEETID: Constructing CSheetId from name '%s' without explicit type, defaulting as '%s' to '%s'", sheetName.c_str(), defaultType.c_str(), withType.c_str()); + } + else + { + *this = CSheetId(sheetName); + } +} + +CSheetId::CSheetId(const char *sheetName, const char *defaultType) +{ + // Don't use this function without defaultType, use the one above. + nlassert(defaultType[0]); + + if (!strchr(sheetName, '.')) + { + std::string withType = sheetName + s_Dot + defaultType; + *this = CSheetId(withType); + // nldebug("SHEETID: Constructing CSheetId from name '%s' without explicit type, defaulting as '%s' to '%s'", sheetName.c_str(), defaultType.c_str(), withType.c_str()); + } + else + { + *this = CSheetId(sheetName); + } +} + //----------------------------------------------- // Build // //----------------------------------------------- -bool CSheetId::buildSheetId(const std::string &sheetName) +bool CSheetId::buildSheetId(const char *sheetName, size_t sheetNameLen) { nlassert(_Initialised); @@ -184,14 +267,23 @@ bool CSheetId::buildSheetId(const std::string &sheetName) } // try looking up the sheet name in _SheetNameToId - CStaticMap::const_iterator itId; + TSheetNameToIdMap::const_iterator itId; CChar c; +#ifdef alloca +#pragma warning(push) +#pragma warning(disable : 6255) + c.Ptr = (char *)alloca(sheetNameLen + 1); +#pragma warning(pop) +#else c.Ptr = new char[sheetName.size() + 1]; - strcpy(c.Ptr, sheetName.c_str()); +#endif + strcpy(c.Ptr, sheetName); toLower(c.Ptr); itId = _SheetNameToId.find(c); - delete[] c.Ptr; +#ifndef alloca + delete[] c.Ptr; // Don't delete alloca +#endif if (itId != _SheetNameToId.end()) { _Id.Id = itId->second; @@ -203,11 +295,10 @@ bool CSheetId::buildSheetId(const std::string &sheetName) } // we failed to find the sheet name in the sheetname map so see if the string is numeric - if (sheetName.size() > 1 && sheetName[0] == '#') + if (sheetName[0] == '#' && sheetName[1]) { uint32 numericId; - NLMISC::fromString((const char *)(sheetName.c_str() + 1), numericId); - if (NLMISC::toString("#%u", numericId) == sheetName) + if (NLMISC::fromString((const char *)(sheetName + 1), numericId)) { _Id.Id = numericId; return true; @@ -316,7 +407,7 @@ void CSheetId::loadSheetId() { uint32 nSize = (uint32)_SheetIdToName.size(); _SheetNameToId.reserve(nSize); - CStaticMap::iterator itStr; + TSheetIdToNameMap::iterator itStr; for (itStr = _SheetIdToName.begin(); itStr != _SheetIdToName.end(); ++itStr) { // add entry to the inverse map @@ -428,7 +519,7 @@ CSheetId &CSheetId::operator=(const CSheetId &sheetId) CSheetId &CSheetId::operator=(const string &sheetName) { - if (!buildSheetId(sheetName)) + if (!buildSheetId(sheetName.c_str(), sheetName.size())) *this = Unknown; // nldebug("LIST_SHEET_ID: %s (%s)", toString().c_str(), sheetName.c_str()); @@ -437,6 +528,22 @@ CSheetId &CSheetId::operator=(const string &sheetName) } // operator= // +//----------------------------------------------- +// operator= +// +//----------------------------------------------- +CSheetId &CSheetId::operator=(const char *sheetName) +{ + + if (!buildSheetId(sheetName, strlen(sheetName))) + *this = Unknown; + + // nldebug("LIST_SHEET_ID: %s (%s)", toString().c_str(), sheetName); + + return *this; + +} // operator= // + //----------------------------------------------- // operator= // @@ -452,6 +559,21 @@ CSheetId &CSheetId::operator=(uint32 sheetRef) } // operator= // +//----------------------------------------------- +// operator= +// +//----------------------------------------------- +CSheetId &CSheetId::operator=(int sheetRef) +{ + if (!_Initialised) + init(false); + + _Id.Id = (uint32)sheetRef; + + return *this; + +} // operator= // + //----------------------------------------------- // operator< // @@ -499,7 +621,7 @@ string CSheetId::toString(bool ifNotFoundUseNumericId) const } } - CStaticMap::const_iterator itStr = _SheetIdToName.find(_Id.Id); + TSheetIdToNameMap::const_iterator itStr = _SheetIdToName.find(_Id.Id); if (itStr != _SheetIdToName.end()) { return string((*itStr).second.Ptr); @@ -528,7 +650,7 @@ void CSheetId::serial(NLMISC::IStream &f) f.serial(_Id.Id); #ifdef NL_DEBUG_SHEET_ID - CStaticMap::iterator it(_SheetIdToName.find(_Id.Id)); + TSheetIdToNameMap::iterator it(_SheetIdToName.find(_Id.Id)); if (it != _SheetIdToName.end()) _DebugSheetName = it->second.Ptr; else @@ -564,7 +686,7 @@ void CSheetId::display() if (!_Initialised) init(false); - CStaticMap::const_iterator itStr; + TSheetIdToNameMap::const_iterator itStr; for (itStr = _SheetIdToName.begin(); itStr != _SheetIdToName.end(); ++itStr) { //nlinfo("%d %s",(*itStr).first,(*itStr).second.c_str()); @@ -582,7 +704,7 @@ void CSheetId::display(uint32 type) if (!_Initialised) init(false); - CStaticMap::const_iterator itStr; + TSheetIdToNameMap::const_iterator itStr; for (itStr = _SheetIdToName.begin(); itStr != _SheetIdToName.end(); ++itStr) { // work out the type value for this entry in the map @@ -608,7 +730,7 @@ void CSheetId::buildIdVector(std::vector &result) if (!_Initialised) init(false); - CStaticMap::const_iterator itStr; + TSheetIdToNameMap::const_iterator itStr; for (itStr = _SheetIdToName.begin(); itStr != _SheetIdToName.end(); ++itStr) { result.push_back((CSheetId)(*itStr).first); @@ -626,7 +748,7 @@ void CSheetId::buildIdVector(std::vector &result, uint32 type) init(false); nlassert(type < (1 << (NL_SHEET_ID_TYPE_BITS))); - CStaticMap::const_iterator itStr; + TSheetIdToNameMap::const_iterator itStr; for (itStr = _SheetIdToName.begin(); itStr != _SheetIdToName.end(); ++itStr) { // work out the type value for this entry in the map @@ -652,7 +774,7 @@ void CSheetId::buildIdVector(std::vector &result, std::vector::const_iterator itStr; + TSheetIdToNameMap::const_iterator itStr; for (itStr = _SheetIdToName.begin(); itStr != _SheetIdToName.end(); ++itStr) { // work out the type value for this entry in the map @@ -737,7 +859,7 @@ void CSheetId::buildSheetId(uint32 shortId, uint32 type) _Id.IdInfos.Type = type; #ifdef NL_DEBUG_SHEET_ID - CStaticMap::iterator it(_SheetIdToName.find(_Id.Id)); + TSheetIdToNameMap::iterator it(_SheetIdToName.find(_Id.Id)); if (it != _SheetIdToName.end()) { _DebugSheetName = it->second.Ptr; From e2610a025cd7a6fcf7d363acb06b4b382754f760 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Sat, 14 Dec 2019 14:01:33 +0800 Subject: [PATCH 118/236] Fix dbg login parameter issue --- code/ryzom/client/src/login.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/ryzom/client/src/login.cpp b/code/ryzom/client/src/login.cpp index ae678ead3..c9c1fdeaf 100644 --- a/code/ryzom/client/src/login.cpp +++ b/code/ryzom/client/src/login.cpp @@ -867,7 +867,7 @@ void initAutoLogin() void initAltLogin() { // Check the alt param - if (!LoginCustomParameters.empty()) + if (!LoginCustomParameters.empty() && LoginCustomParameters != "&dbg=1") { // don't use login and password for alternate login string res = checkLogin("", "", ClientApp, LoginCustomParameters); From 695ebeb0efd40663e7588358d5d6cf5cccb1c374 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Sun, 15 Dec 2019 17:11:05 +0800 Subject: [PATCH 119/236] Fix incorrect mutex usage --- code/ryzom/client/src/session_browser.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/code/ryzom/client/src/session_browser.cpp b/code/ryzom/client/src/session_browser.cpp index e2fa97c6d..6d80c55cb 100644 --- a/code/ryzom/client/src/session_browser.cpp +++ b/code/ryzom/client/src/session_browser.cpp @@ -66,19 +66,17 @@ class CCallbackClientAdaptor : public CNelCallbackClientAdaptor virtual void send(const NLNET::CMessage &buffer, NLNET::TSockId hostid = NLNET::InvalidSockId, bool log = true) { - CAutoMutex mutex1(_Mutex); + CAutoMutex mutex(_Mutex); if (!_PassThrue) { // queue the message for later sending. nldebug("SB: Pushing a buffer into SendQueue (from %u elts)", _SendQueue.size()); - CAutoMutex mutex(_Mutex); _SendQueue.push(buffer); } else { // protect socket because update() can be called in the main thread while send() can be called with passthru=true in the session browser thread (by authenticate() for example) - CAutoMutex mutex(_Mutex); _CallbackClient.send(buffer, hostid, log); } } From 02270e7113ddbe2d1f3306dbc83ec12334f11206 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Mon, 16 Dec 2019 08:47:27 +0800 Subject: [PATCH 120/236] Functions returning a string reference must not be cast to functions returning a string object --- code/nel/include/nel/gui/group_html.h | 2 +- code/nel/include/nel/gui/group_tree.h | 2 +- code/nel/include/nel/gui/interface_element.h | 9 +-- code/nel/include/nel/gui/interface_group.h | 24 +++---- code/nel/include/nel/gui/reflect.h | 66 ++++++++++++++----- code/nel/include/nel/misc/debug.h | 2 +- code/nel/src/gui/group_html.cpp | 2 +- code/nel/src/gui/interface_expr_user_fct.cpp | 6 ++ code/nel/src/gui/interface_link.cpp | 2 + code/nel/src/gui/lua_ihm.cpp | 16 +++++ .../client/src/interface_v3/dbctrl_sheet.h | 16 ++--- .../client/src/interface_v3/group_html_cs.cpp | 2 +- .../client/src/interface_v3/group_html_cs.h | 2 +- .../src/interface_v3/group_html_forum.cpp | 4 +- .../src/interface_v3/group_html_forum.h | 2 +- .../src/interface_v3/group_html_mail.cpp | 4 +- .../client/src/interface_v3/group_html_mail.h | 2 +- .../src/interface_v3/group_html_webig.cpp | 4 +- .../src/interface_v3/group_html_webig.h | 4 +- .../src/interface_v3/group_quick_help.cpp | 2 +- .../src/interface_v3/group_quick_help.h | 2 +- 21 files changed, 115 insertions(+), 60 deletions(-) diff --git a/code/nel/include/nel/gui/group_html.h b/code/nel/include/nel/gui/group_html.h index 392644abb..74c5a0145 100644 --- a/code/nel/include/nel/gui/group_html.h +++ b/code/nel/include/nel/gui/group_html.h @@ -215,7 +215,7 @@ namespace NLGUI // Browser home std::string Home; // Get Home URL - virtual std::string home(); + virtual std::string home() const; // Undo browse: Browse the precedent url browsed. no op if none void browseUndo (); diff --git a/code/nel/include/nel/gui/group_tree.h b/code/nel/include/nel/gui/group_tree.h index 3d3a2d6fd..266e7e23f 100644 --- a/code/nel/include/nel/gui/group_tree.h +++ b/code/nel/include/nel/gui/group_tree.h @@ -181,7 +181,7 @@ namespace NLGUI REFLECT_STRING("AHParamsClose", getAHParamsClose, setAHParamsClose); REFLECT_BOOL("Opened", getOpened, setOpened); REFLECT_BOOL("Show", getShow, setShow); - REFLECT_UCSTRING("Text", getText, setText); + REFLECT_UCSTRING_REF("Text", getText, setText); // lua REFLECT_LUA_METHOD("getNumChildren", luaGetNumChildren); REFLECT_LUA_METHOD("getChild", luaGetChild); diff --git a/code/nel/include/nel/gui/interface_element.h b/code/nel/include/nel/gui/interface_element.h index dbe1ba37e..47025f155 100644 --- a/code/nel/include/nel/gui/interface_element.h +++ b/code/nel/include/nel/gui/interface_element.h @@ -365,10 +365,6 @@ namespace NLGUI void setModulateGlobalColor(bool state) {_ModulateGlobalColor= state;} bool getModulateGlobalColor() const {return _ModulateGlobalColor;} - - void dummySet(sint32 value); - void dummySet(const std::string &value); - // lua methods int luaUpdateCoords(CLuaState &ls); int luaInvalidateCoords(CLuaState &ls); @@ -382,6 +378,11 @@ namespace NLGUI std::string getSizeRefAsString() const; std::string getSizeRefAsString( const sint32 &sizeRef, const sint32 &sizeDivW, const sint32 &sizeDivH ) const; + void dummySet(sint32 value); + void dummySet(const std::string &value); + + public: + // export some properties REFLECT_EXPORT_START(CInterfaceElement, CReflectable) REFLECT_BOOL ("active", getActive, setActive); diff --git a/code/nel/include/nel/gui/interface_group.h b/code/nel/include/nel/gui/interface_group.h index 44c18414e..9f1e5562b 100644 --- a/code/nel/include/nel/gui/interface_group.h +++ b/code/nel/include/nel/gui/interface_group.h @@ -234,18 +234,18 @@ namespace NLGUI REFLECT_LUA_METHOD("dumpSize", luaDumpSize); REFLECT_LUA_METHOD("dumpEltsOrder", luaDumpEltsOrder); REFLECT_LUA_METHOD("dumpGroups", luaDumpGroups); - REFLECT_STRING ("left_click", getLeftClickHandler, setLeftClickHandler); - REFLECT_STRING ("right_click", getRightClickHandler, setRightClickHandler); - REFLECT_STRING ("left_click_params", getLeftClickHandlerParams, setLeftClickHandlerParams); - REFLECT_STRING ("right_click_params", getRightClickHandlerParams, setRightClickHandlerParams); - REFLECT_STRING ("on_active", getOnActiveHandler, setOnActiveHandler); - REFLECT_STRING ("on_active_params", getOnActiveParams, setOnActiveParams); - REFLECT_STRING ("on_deactive", getOnDeactiveHandler, setOnDeactiveHandler); - REFLECT_STRING ("on_deactive_params", getOnDeactiveParams, setOnDeactiveParams); - REFLECT_STRING ("on_enter", getAHOnEnter, setAHOnEnter); - REFLECT_STRING ("on_enter_params", getAHOnEnterParams, setAHOnEnterParams); - REFLECT_STRING ("on_escape", getAHOnEscape, setAHOnEscape); - REFLECT_STRING ("on_escape_params", getAHOnEscapeParams, setAHOnEscapeParams); + REFLECT_STRING_REF ("left_click", getLeftClickHandler, setLeftClickHandler); + REFLECT_STRING_REF ("right_click", getRightClickHandler, setRightClickHandler); + REFLECT_STRING_REF ("left_click_params", getLeftClickHandlerParams, setLeftClickHandlerParams); + REFLECT_STRING_REF ("right_click_params", getRightClickHandlerParams, setRightClickHandlerParams); + REFLECT_STRING_REF ("on_active", getOnActiveHandler, setOnActiveHandler); + REFLECT_STRING_REF ("on_active_params", getOnActiveParams, setOnActiveParams); + REFLECT_STRING_REF ("on_deactive", getOnDeactiveHandler, setOnDeactiveHandler); + REFLECT_STRING_REF ("on_deactive_params", getOnDeactiveParams, setOnDeactiveParams); + REFLECT_STRING_REF ("on_enter", getAHOnEnter, setAHOnEnter); + REFLECT_STRING_REF ("on_enter_params", getAHOnEnterParams, setAHOnEnterParams); + REFLECT_STRING_REF ("on_escape", getAHOnEscape, setAHOnEscape); + REFLECT_STRING_REF ("on_escape_params", getAHOnEscapeParams, setAHOnEscapeParams); REFLECT_SINT32 ("ofsx", getOfsX, setOfsX); REFLECT_SINT32 ("ofsy", getOfsY, setOfsY); REFLECT_BOOL("child_resize_w", getResizeFromChildW, setResizeFromChildW); diff --git a/code/nel/include/nel/gui/reflect.h b/code/nel/include/nel/gui/reflect.h index 9b594a0a5..8bd3b4781 100644 --- a/code/nel/include/nel/gui/reflect.h +++ b/code/nel/include/nel/gui/reflect.h @@ -42,6 +42,8 @@ namespace NLGUI Float, String, UCString, + StringRef, + UCStringRef, RGBA, LuaMethod }; // other types will be added when needed @@ -52,6 +54,8 @@ namespace NLGUI typedef float (CReflectable::* TGetFloat) () const; typedef std::string (CReflectable::* TGetString) () const; typedef ucstring (CReflectable::* TGetUCString) () const; + typedef const std::string & (CReflectable::* TGetStringRef) () const; + typedef const ucstring & (CReflectable::* TGetUCStringRef) () const; typedef NLMISC::CRGBA (CReflectable::* TGetRGBA) () const; // typedef void (CReflectable::* TSetBool) (bool); @@ -75,6 +79,8 @@ namespace NLGUI TGetFloat GetFloat; TGetString GetString; TGetUCString GetUCString; + TGetStringRef GetStringRef; + TGetUCStringRef GetUCStringRef; TGetRGBA GetRGBA; TLuaMethod GetLuaMethod; // lua method can only be obtained, not written ... } GetMethod; @@ -108,7 +114,7 @@ namespace NLGUI public: virtual ~CReflectable() {} virtual const char *getReflectedClassName() const { return "CReflectable"; } - virtual const char *getRflectedParentClassName() const { return ""; } + virtual const char *getReflectedParentClassName() const { return ""; } /** When registering classes, the reflect system will call this function on each class * to know which properties they exports. @@ -211,8 +217,8 @@ namespace NLGUI * Should be placed inside the class */ #define REFLECT_EXPORT_START(className, parentName) \ - virtual const char *getReflectedClassName() const { return #className; } \ - virtual const char *getReflectedParentClassName() const { return #parentName; } \ + virtual const char *getReflectedClassName() const NL_OVERRIDE { return #className; } \ + virtual const char *getReflectedParentClassName() const NL_OVERRIDE { return #parentName; } \ static void getReflectedProperties(TReflectedProperties &props) \ { \ typedef className A; \ @@ -222,6 +228,8 @@ namespace NLGUI typedef float (className::* TGetFloata) () const; \ typedef std::string (className::* TGetStringa) () const; \ typedef ucstring (className::* TGetUCStringa) () const; \ + typedef const std::string & (className::* TGetStringRefa) () const; \ + typedef const ucstring & (className::* TGetUCStringRefa) () const; \ typedef NLMISC::CRGBA (className::* TGetRGBAa) () const; \ typedef void (className::* TSetBoola) (bool); \ typedef void (className::* TSetSInt32a) (sint32); \ @@ -240,8 +248,8 @@ namespace NLGUI CReflectedProperty prop; \ prop.Name = exportName; \ prop.Type = CReflectedProperty::Boolean; \ - prop.GetMethod.GetBool = (CReflectedProperty::TGetBool) (TGetBoola) &A::getMethod; \ - prop.SetMethod.SetBool = (CReflectedProperty::TSetBool) (TSetBoola) &A::setMethod; \ + prop.GetMethod.GetBool = (CReflectedProperty::TGetBool) static_cast(&A::getMethod); \ + prop.SetMethod.SetBool = (CReflectedProperty::TSetBool) static_cast(&A::setMethod); \ props.push_back(prop); \ } @@ -251,8 +259,8 @@ namespace NLGUI CReflectedProperty prop; \ prop.Name = exportName; \ prop.Type = CReflectedProperty::SInt32; \ - prop.GetMethod.GetSInt32 = (CReflectedProperty::TGetSInt32) (TGetSInt32a) &A::getMethod; \ - prop.SetMethod.SetSInt32 = (CReflectedProperty::TSetSInt32) (TSetSInt32a) &A::setMethod; \ + prop.GetMethod.GetSInt32 = (CReflectedProperty::TGetSInt32) static_cast(&A::getMethod); \ + prop.SetMethod.SetSInt32 = (CReflectedProperty::TSetSInt32) static_cast(&A::setMethod); \ props.push_back(prop); \ } @@ -262,8 +270,8 @@ namespace NLGUI CReflectedProperty prop; \ prop.Name = exportName; \ prop.Type = CReflectedProperty::UInt32; \ - prop.GetMethod.GetUInt32 = (CReflectedProperty::TGetUInt32) (TGetUInt32a) &A::getMethod; \ - prop.SetMethod.SetUInt32 = (CReflectedProperty::TSetUInt32) (TSetUInt32a) &A::setMethod; \ + prop.GetMethod.GetUInt32 = (CReflectedProperty::TGetUInt32) static_cast(&A::getMethod); \ + prop.SetMethod.SetUInt32 = (CReflectedProperty::TSetUInt32) static_cast(&A::setMethod); \ props.push_back(prop); \ } @@ -273,8 +281,8 @@ namespace NLGUI CReflectedProperty prop; \ prop.Name = exportName; \ prop.Type = CReflectedProperty::Float; \ - prop.GetMethod.GetFloat = (CReflectedProperty::TGetFloat) (TGetFloata) &A::getMethod; \ - prop.SetMethod.SetFloat = (CReflectedProperty::TSetFloat) (TSetFloata) &A::setMethod; \ + prop.GetMethod.GetFloat = (CReflectedProperty::TGetFloat) static_cast(&A::getMethod); \ + prop.SetMethod.SetFloat = (CReflectedProperty::TSetFloat) static_cast(&A::setMethod); \ props.push_back(prop); \ } @@ -284,8 +292,8 @@ namespace NLGUI CReflectedProperty prop; \ prop.Name = exportName; \ prop.Type = CReflectedProperty::String; \ - prop.GetMethod.GetString = (CReflectedProperty::TGetString) (TGetStringa) &A::getMethod; \ - prop.SetMethod.SetString = (CReflectedProperty::TSetString) (TSetStringa) &A::setMethod; \ + prop.GetMethod.GetString = (CReflectedProperty::TGetString) static_cast(&A::getMethod); \ + prop.SetMethod.SetString = (CReflectedProperty::TSetString) static_cast(&A::setMethod); \ props.push_back(prop); \ } @@ -295,8 +303,30 @@ namespace NLGUI CReflectedProperty prop; \ prop.Name = exportName; \ prop.Type = CReflectedProperty::UCString; \ - prop.GetMethod.GetUCString = (CReflectedProperty::TGetUCString) (TGetUCStringa) &A::getMethod; \ - prop.SetMethod.SetUCString = (CReflectedProperty::TSetUCString) (TSetUCStringa) &A::setMethod; \ + prop.GetMethod.GetUCString = (CReflectedProperty::TGetUCString) static_cast(&A::getMethod); \ + prop.SetMethod.SetUCString = (CReflectedProperty::TSetUCString) static_cast(&A::setMethod); \ + props.push_back(prop); \ + } + + // export a string value, by giving the name of the get and the set method + #define REFLECT_STRING_REF(exportName, getMethod, setMethod) \ + { \ + CReflectedProperty prop; \ + prop.Name = exportName; \ + prop.Type = CReflectedProperty::StringRef; \ + prop.GetMethod.GetStringRef = (CReflectedProperty::TGetStringRef) static_cast(&A::getMethod); \ + prop.SetMethod.SetString = (CReflectedProperty::TSetString) static_cast(&A::setMethod); \ + props.push_back(prop); \ + } + + // export a unicode string value, by giving the name of the get and the set method + #define REFLECT_UCSTRING_REF(exportName, getMethod, setMethod) \ + { \ + CReflectedProperty prop; \ + prop.Name = exportName; \ + prop.Type = CReflectedProperty::UCStringRef; \ + prop.GetMethod.GetUCStringRef = (CReflectedProperty::TGetUCStringRef) static_cast(&A::getMethod); \ + prop.SetMethod.SetUCString = (CReflectedProperty::TSetUCString) static_cast(&A::setMethod); \ props.push_back(prop); \ } @@ -307,8 +337,8 @@ namespace NLGUI CReflectedProperty prop; \ prop.Name = exportName; \ prop.Type = CReflectedProperty::RGBA; \ - prop.GetMethod.GetRGBA = (CReflectedProperty::TGetRGBA) (TGetRGBAa) &A::getMethod; \ - prop.SetMethod.SetRGBA = (CReflectedProperty::TSetRGBA) (TSetRGBAa) &A::setMethod; \ + prop.GetMethod.GetRGBA = (CReflectedProperty::TGetRGBA) static_cast(&A::getMethod); \ + prop.SetMethod.SetRGBA = (CReflectedProperty::TSetRGBA) static_cast(&A::setMethod); \ props.push_back(prop); \ } @@ -318,7 +348,7 @@ namespace NLGUI CReflectedProperty prop; \ prop.Name = exportName; \ prop.Type = CReflectedProperty::LuaMethod; \ - prop.GetMethod.GetLuaMethod = (CReflectedProperty::TLuaMethod) (TLuaMethoda) &A::method; \ + prop.GetMethod.GetLuaMethod = (CReflectedProperty::TLuaMethod) static_cast(&A::method); \ props.push_back(prop); \ } diff --git a/code/nel/include/nel/misc/debug.h b/code/nel/include/nel/misc/debug.h index 68f47af8a..668c2e5a3 100644 --- a/code/nel/include/nel/misc/debug.h +++ b/code/nel/include/nel/misc/debug.h @@ -589,7 +589,7 @@ template inline T type_cast(U o) /** Compile time assertion */ #ifdef NL_ISO_CPP0X_AVAILABLE -# define nlctassert(cond) static_assert(cond, "Compile time assert in "#cond) +# define nlctassert(cond) static_assert((cond), "Compile time assert in "#cond) #else # define nlctassert(cond) (void)sizeof(uint[(cond) ? 1 : 0]) #endif diff --git a/code/nel/src/gui/group_html.cpp b/code/nel/src/gui/group_html.cpp index 2500af967..2e74182c3 100644 --- a/code/nel/src/gui/group_html.cpp +++ b/code/nel/src/gui/group_html.cpp @@ -4318,7 +4318,7 @@ namespace NLGUI // *************************************************************************** - string CGroupHTML::home () + string CGroupHTML::home () const { return Home; } diff --git a/code/nel/src/gui/interface_expr_user_fct.cpp b/code/nel/src/gui/interface_expr_user_fct.cpp index 2b77b143e..d0c687d26 100644 --- a/code/nel/src/gui/interface_expr_user_fct.cpp +++ b/code/nel/src/gui/interface_expr_user_fct.cpp @@ -555,6 +555,12 @@ namespace NLGUI case CReflectedProperty::UCString: result.setUCString ((elem->*(pRP->GetMethod.GetUCString))()); break; + case CReflectedProperty::StringRef: + result.setString ((elem->*(pRP->GetMethod.GetStringRef))()); + break; + case CReflectedProperty::UCStringRef: + result.setUCString ((elem->*(pRP->GetMethod.GetUCStringRef))()); + break; case CReflectedProperty::RGBA: result.setRGBA ((elem->*(pRP->GetMethod.GetRGBA))()); break; diff --git a/code/nel/src/gui/interface_link.cpp b/code/nel/src/gui/interface_link.cpp index 7ae26be5b..966354e10 100644 --- a/code/nel/src/gui/interface_link.cpp +++ b/code/nel/src/gui/interface_link.cpp @@ -106,6 +106,7 @@ namespace NLGUI } break; case CReflectedProperty::String: + case CReflectedProperty::StringRef: if (valueToAffect.toString()) { (destElem.*(property.SetMethod.SetString))(valueToAffect.getString()); @@ -117,6 +118,7 @@ namespace NLGUI } break; case CReflectedProperty::UCString: + case CReflectedProperty::UCStringRef: if (valueToAffect.toString()) { (destElem.*(property.SetMethod.SetUCString))(valueToAffect.getUCString()); diff --git a/code/nel/src/gui/lua_ihm.cpp b/code/nel/src/gui/lua_ihm.cpp index 1438150cf..132f1e4b9 100644 --- a/code/nel/src/gui/lua_ihm.cpp +++ b/code/nel/src/gui/lua_ihm.cpp @@ -1435,6 +1435,20 @@ namespace NLGUI #endif } break; + case CReflectedProperty::UCStringRef: + { + ucstring str = (reflectedObject.*(property.GetMethod.GetUCStringRef))(); + #if LUABIND_VERSION > 600 + luabind::detail::push(ls.getStatePointer(), str); + #else + luabind::object obj(ls.getStatePointer(), str); + obj.pushvalue(); + #endif + } + break; + case CReflectedProperty::StringRef: + ls.push( (reflectedObject.*(property.GetMethod.GetStringRef))() ); + break; case CReflectedProperty::RGBA: { CRGBA color = (reflectedObject.*(property.GetMethod.GetRGBA))(); @@ -1499,6 +1513,7 @@ namespace NLGUI return; } case CReflectedProperty::String: + case CReflectedProperty::StringRef: { std::string val; ls.toString(stackIndex, val); @@ -1506,6 +1521,7 @@ namespace NLGUI return; } case CReflectedProperty::UCString: + case CReflectedProperty::UCStringRef: { ucstring val; // Additionaly return of CInterfaceExpr may be std::string... test std string too diff --git a/code/ryzom/client/src/interface_v3/dbctrl_sheet.h b/code/ryzom/client/src/interface_v3/dbctrl_sheet.h index 1281b1ae8..8b89a91ed 100644 --- a/code/ryzom/client/src/interface_v3/dbctrl_sheet.h +++ b/code/ryzom/client/src/interface_v3/dbctrl_sheet.h @@ -296,14 +296,14 @@ public: REFLECT_SINT32("symbol", getGuildSymbol, setGuildSymbol); REFLECT_BOOL("invert_symbol", getInvertGuildSymbol, setInvertGuildSymbol); REFLECT_BOOL("can_drop", getCanDrop, setCanDrop); - REFLECT_STRING ("left_click", getActionOnLeftClick, setActionOnLeftClick); - REFLECT_STRING ("right_click", getActionOnRightClick, setActionOnRightClick); - REFLECT_STRING ("left_click_params", getParamsOnLeftClick, setParamsOnLeftClick); - REFLECT_STRING ("right_click_params", getParamsOnRightClick, setParamsOnRightClick); - REFLECT_STRING ("on_drop", getActionOnDrop, setActionOnDrop); - REFLECT_STRING ("on_drop_params", getParamsOnDrop, setParamsOnDrop); - REFLECT_STRING ("on_can_drop", getActionOnCanDrop, setActionOnCanDrop); - REFLECT_STRING ("on_can_drop_params", getParamsOnCanDrop, setParamsOnCanDrop); + REFLECT_STRING_REF ("left_click", getActionOnLeftClick, setActionOnLeftClick); + REFLECT_STRING_REF ("right_click", getActionOnRightClick, setActionOnRightClick); + REFLECT_STRING_REF ("left_click_params", getParamsOnLeftClick, setParamsOnLeftClick); + REFLECT_STRING_REF ("right_click_params", getParamsOnRightClick, setParamsOnRightClick); + REFLECT_STRING_REF ("on_drop", getActionOnDrop, setActionOnDrop); + REFLECT_STRING_REF ("on_drop_params", getParamsOnDrop, setParamsOnDrop); + REFLECT_STRING_REF ("on_can_drop", getActionOnCanDrop, setActionOnCanDrop); + REFLECT_STRING_REF ("on_can_drop_params", getParamsOnCanDrop, setParamsOnCanDrop); REFLECT_LUA_METHOD("getDraggedSheet", luaGetDraggedSheet); REFLECT_LUA_METHOD("getItemInfo", luaGetItemInfo); REFLECT_LUA_METHOD("getName", luaGetName); diff --git a/code/ryzom/client/src/interface_v3/group_html_cs.cpp b/code/ryzom/client/src/interface_v3/group_html_cs.cpp index 353410029..ba20123e1 100644 --- a/code/ryzom/client/src/interface_v3/group_html_cs.cpp +++ b/code/ryzom/client/src/interface_v3/group_html_cs.cpp @@ -88,7 +88,7 @@ void CGroupHTMLCS::addHTTPPostParams (SFormFields &formfields, bool /*trustedDom // *************************************************************************** -string CGroupHTMLCS::home () +string CGroupHTMLCS::home () const { return Home; } diff --git a/code/ryzom/client/src/interface_v3/group_html_cs.h b/code/ryzom/client/src/interface_v3/group_html_cs.h index 463bdbc09..76a066e6d 100644 --- a/code/ryzom/client/src/interface_v3/group_html_cs.h +++ b/code/ryzom/client/src/interface_v3/group_html_cs.h @@ -45,7 +45,7 @@ public: // From CGroupHTML virtual void addHTTPGetParams (std::string &url, bool trustedDomain); virtual void addHTTPPostParams (SFormFields &formfields, bool trustedDomain); - virtual std::string home(); + virtual std::string home() const NL_OVERRIDE; private: diff --git a/code/ryzom/client/src/interface_v3/group_html_forum.cpp b/code/ryzom/client/src/interface_v3/group_html_forum.cpp index 79a4574dc..fe218c215 100644 --- a/code/ryzom/client/src/interface_v3/group_html_forum.cpp +++ b/code/ryzom/client/src/interface_v3/group_html_forum.cpp @@ -108,10 +108,10 @@ void CGroupHTMLForum::addHTTPPostParams (SFormFields &formfields, bool /*trusted // *************************************************************************** -string CGroupHTMLForum::home () +string CGroupHTMLForum::home () const { CInterfaceManager *pIM = CInterfaceManager::getInstance(); - NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:FORUM_UPDATED")->setValue32(0); + NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:FORUM_UPDATED")->setValue32(0); // FIXME: How is this const?! return Home; } diff --git a/code/ryzom/client/src/interface_v3/group_html_forum.h b/code/ryzom/client/src/interface_v3/group_html_forum.h index 53ab7d675..31e5308be 100644 --- a/code/ryzom/client/src/interface_v3/group_html_forum.h +++ b/code/ryzom/client/src/interface_v3/group_html_forum.h @@ -45,7 +45,7 @@ public: // From CGroupHTML virtual void addHTTPGetParams (std::string &url, bool trustedDomain); virtual void addHTTPPostParams (SFormFields &formfields, bool trustedDomain); - virtual std::string home(); + virtual std::string home() const NL_OVERRIDE; virtual void handle (); private: diff --git a/code/ryzom/client/src/interface_v3/group_html_mail.cpp b/code/ryzom/client/src/interface_v3/group_html_mail.cpp index e351b10ef..8627a8573 100644 --- a/code/ryzom/client/src/interface_v3/group_html_mail.cpp +++ b/code/ryzom/client/src/interface_v3/group_html_mail.cpp @@ -77,10 +77,10 @@ void CGroupHTMLMail::addHTTPPostParams (SFormFields &formfields, bool /*trustedD // *************************************************************************** -string CGroupHTMLMail::home () +string CGroupHTMLMail::home () const { CInterfaceManager *pIM = CInterfaceManager::getInstance(); - NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:MAIL_WAITING")->setValue32(0); + NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:MAIL_WAITING")->setValue32(0); // FIXME: How is this const?! return Home; } diff --git a/code/ryzom/client/src/interface_v3/group_html_mail.h b/code/ryzom/client/src/interface_v3/group_html_mail.h index e67a098a4..59cf4c852 100644 --- a/code/ryzom/client/src/interface_v3/group_html_mail.h +++ b/code/ryzom/client/src/interface_v3/group_html_mail.h @@ -45,7 +45,7 @@ public: // From CGroupHTML virtual void addHTTPGetParams (std::string &url, bool trustedDomain); virtual void addHTTPPostParams (SFormFields &formfields, bool trustedDomain); - virtual std::string home(); + virtual std::string home() const NL_OVERRIDE; virtual void handle (); private: diff --git a/code/ryzom/client/src/interface_v3/group_html_webig.cpp b/code/ryzom/client/src/interface_v3/group_html_webig.cpp index 18ab0fc75..985ae3f20 100644 --- a/code/ryzom/client/src/interface_v3/group_html_webig.cpp +++ b/code/ryzom/client/src/interface_v3/group_html_webig.cpp @@ -396,7 +396,7 @@ void CGroupHTMLAuth::addHTTPPostParams (SFormFields &formfields, bool trustedDom // *************************************************************************** -string CGroupHTMLAuth::home () +string CGroupHTMLAuth::home () const { return Home; } @@ -442,7 +442,7 @@ void CGroupHTMLWebIG::addHTTPPostParams (SFormFields &formfields, bool trustedDo // *************************************************************************** -string CGroupHTMLWebIG::home () +string CGroupHTMLWebIG::home () const { return Home; } diff --git a/code/ryzom/client/src/interface_v3/group_html_webig.h b/code/ryzom/client/src/interface_v3/group_html_webig.h index 30ccb5825..a339dd3dc 100644 --- a/code/ryzom/client/src/interface_v3/group_html_webig.h +++ b/code/ryzom/client/src/interface_v3/group_html_webig.h @@ -41,7 +41,7 @@ public: // From CGroupHTML virtual void addHTTPGetParams (std::string &url, bool trustedDomain); virtual void addHTTPPostParams (SFormFields &formfields, bool trustedDomain); - virtual std::string home(); + virtual std::string home() const NL_OVERRIDE; virtual void handle (); private: @@ -63,7 +63,7 @@ public: /// From CGroupHTMLAuth virtual void addHTTPGetParams (std::string &url, bool trustedDomain); virtual void addHTTPPostParams (SFormFields &formfields, bool trustedDomain); - virtual std::string home(); + virtual std::string home() const NL_OVERRIDE; virtual void handle (); private: diff --git a/code/ryzom/client/src/interface_v3/group_quick_help.cpp b/code/ryzom/client/src/interface_v3/group_quick_help.cpp index 48b904398..0b789fccf 100644 --- a/code/ryzom/client/src/interface_v3/group_quick_help.cpp +++ b/code/ryzom/client/src/interface_v3/group_quick_help.cpp @@ -348,7 +348,7 @@ void CGroupQuickHelp::browse (const char *url) // *************************************************************************** -std::string CGroupQuickHelp::home() +std::string CGroupQuickHelp::home() const { string completeURL = getLanguageUrl(Home, ClientCfg.getHtmlLanguageCode()); diff --git a/code/ryzom/client/src/interface_v3/group_quick_help.h b/code/ryzom/client/src/interface_v3/group_quick_help.h index 7843d5de2..0d897d014 100644 --- a/code/ryzom/client/src/interface_v3/group_quick_help.h +++ b/code/ryzom/client/src/interface_v3/group_quick_help.h @@ -53,7 +53,7 @@ private: virtual void beginElement (NLGUI::CHtmlElement &elm); virtual void endBuild (); virtual void browse (const char *url); - virtual std::string home(); + virtual std::string home() const NL_OVERRIDE; // Modify uri with '.html' or '_??.html' ending to have current user language, // If the uri is not found locally, then try "en" as fallback language From d56eab0420ac132f2ec52e101731c64ac7ed8700 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Mon, 16 Dec 2019 09:59:49 +0800 Subject: [PATCH 121/236] CObjectNumber for Lua interop needs to deal with both double and sint64 types, cannot have separate CObjectInteger type --- .../client/src/r2/dmc/com_lua_module.cpp | 2 +- code/ryzom/common/src/game_share/object.cpp | 267 +++++++----------- code/ryzom/common/src/game_share/object.h | 82 ++---- 3 files changed, 136 insertions(+), 215 deletions(-) diff --git a/code/ryzom/client/src/r2/dmc/com_lua_module.cpp b/code/ryzom/client/src/r2/dmc/com_lua_module.cpp index 7a3fb94fc..18ecbe011 100644 --- a/code/ryzom/client/src/r2/dmc/com_lua_module.cpp +++ b/code/ryzom/client/src/r2/dmc/com_lua_module.cpp @@ -1245,7 +1245,7 @@ CObject* CComLuaModule::getObjectFromLua(lua_State* state, sint idx) { sint64 value = lua_tointeger(state, -1); lua_pop(state, 1); - return new CObjectInteger(value); + return new CObjectNumber(value); } else #endif diff --git a/code/ryzom/common/src/game_share/object.cpp b/code/ryzom/common/src/game_share/object.cpp index 97794b812..c8e238107 100644 --- a/code/ryzom/common/src/game_share/object.cpp +++ b/code/ryzom/common/src/game_share/object.cpp @@ -175,12 +175,6 @@ void CObject::inPlaceCopy(const CObjectNumber &src) copyMismatchMsg(src); } -void CObject::inPlaceCopy(const CObjectInteger &src) -{ - //H_AUTO(R2_CObject_inPlaceCopy) - copyMismatchMsg(src); -} - void CObject::inPlaceCopy(const CObjectTable &src) { //H_AUTO(R2_CObject_inPlaceCopy) @@ -764,7 +758,15 @@ void CObjectRefId::doSerialize(std::string& out, CSerializeContext& /* context //----------------------- CObjectNumber ---------------------------------------- -CObjectNumber::CObjectNumber(double value) : CObject(), _Value(value){} +CObjectNumber::CObjectNumber(double value) : CObject(), m_IsInteger(false) +{ + m_Value.Integer = value; +} + +CObjectNumber::CObjectNumber(sint64 value) : CObject(), m_IsInteger(true) +{ + m_Value.Integer = value; +} const char *CObjectNumber::getTypeAsString() const { @@ -787,185 +789,137 @@ void CObjectNumber::inPlaceCopyTo(CObject &dest) const void CObjectNumber::inPlaceCopy(const CObjectNumber &src) { //H_AUTO(R2_CObjectNumber_inPlaceCopy) - _Value = src._Value; + m_IsInteger = src.m_IsInteger; + m_Value.Integer = src.m_Value.Integer; setGhost(src.getGhost()); } -std::string CObjectNumber::doToString() const { return NLMISC::toString("%lf", _Value);} +std::string CObjectNumber::doToString() const { return m_IsInteger ? NLMISC::toString(m_Value.Integer) : NLMISC::toString("%lf", m_Value.Number);} void CObjectNumber::doSerialize(std::string& out, CSerializeContext& /* context */) const { //H_AUTO(R2_CObjectNumber_doSerialize) nlassert(!getGhost()); - //out.precision(15); - std::string value = NLMISC::toString(double(sint64(_Value * 1000.0 + (_Value>=0.0?0.5:-0.5)))/1000.0); - // search for first not 0 value from the end - std::string::size_type pos = value.find_last_not_of('0'); - if (pos != std::string::npos) + if (m_IsInteger) + { + out += NLMISC::toString(m_Value.Integer); + } + else { - // don't remove character at pos if it's another digit - if (value[pos] != '.') ++pos; - value.erase(pos); + //out.precision(15); + double num = getNumberValue(); + // TODO: WTF is this for?! + std::string value = NLMISC::toString(double(sint64(num * 1000.0 + (num>=0.0?0.5:-0.5)))/1000.0); + // search for first not 0 value from the end + std::string::size_type pos = value.find_last_not_of('0'); + if (pos != std::string::npos) + { + // don't remove character at pos if it's another digit + if (value[pos] != '.') ++pos; + value.erase(pos); + } + out += value; } - out += value; } -bool CObjectNumber::set(const std::string& key, double value) +bool CObjectNumber::set(const std::string& key, sint64 value) { //H_AUTO(R2_CObjectNumber_set) BOMB_IF(!key.empty(), "Try to set an element of a table on an object that is not a table", return false); - _Value = value; + m_IsInteger = true; + m_Value.Integer = value; return true; } +bool CObjectNumber::set(const std::string& key, double value) +{ + //H_AUTO(R2_CObjectNumber_set) + + BOMB_IF(!key.empty(), "Try to set an element of a table on an object that is not a table", return false); + + m_IsInteger = false; + m_Value.Number = value; + return true; +} bool CObjectNumber::set(const std::string& key, const std::string & value) { //H_AUTO(R2_CObjectNumber_set) //XXX BOMB_IF(!key.empty(), "Try to set an element of a table on an object that is not a table", return false); - NLMISC::fromString(value, _Value); - return true; + double num; + sint64 i; + if (NLMISC::fromString(value, num)) + { + m_IsInteger = false; + m_Value.Number = num; + } + if (NLMISC::fromString(value, i)) + { + m_IsInteger = true; + m_Value.Number = i; + } + return false; } - -double CObjectNumber::doToNumber() const { return _Value; } - CObject* CObjectNumber::clone() const { //H_AUTO(R2_CObjectNumber_clone) - CObjectNumber *result = new CObjectNumber(_Value); + CObjectNumber *result = m_IsInteger + ? new CObjectNumber(m_Value.Integer) + : new CObjectNumber(m_Value.Number); result->setGhost(getGhost()); return result; } -bool CObjectNumber::doIsNumber() const { return true;} +bool CObjectNumber::doIsNumber() const { return !m_IsInteger || (sint64)getNumberValue() == m_Value.Integer;} + +double CObjectNumber::doToNumber() const { return getNumberValue(); } +bool CObjectNumber::doIsInteger() const { return m_IsInteger || (double)getIntegerValue() == m_Value.Number;} +sint64 CObjectNumber::doToInteger() const { return getIntegerValue(); } bool CObjectNumber::setObject(const std::string& /* key */, CObject* value) { //H_AUTO(R2_CObjectNumber_setObject) - BOMB_IF(!value->isNumber(), NLMISC::toString("Try to set an element of a type '%s' with a value of type '%s' on an object that is not a number", this->getTypeAsString(), value->getTypeAsString()), return false); + BOMB_IF(!value->isNumber() && !value->isInteger(), NLMISC::toString("Try to set an element of a type '%s' with a value of type '%s' on an object that is not a number", this->getTypeAsString(), value->getTypeAsString()), return false); - _Value = value->toNumber(); + if (value->isInteger()) + { + m_IsInteger = true; + m_Value.Integer = value->toInteger(); + } + else + { + m_IsInteger = false; + m_Value.Number = value->toNumber(); + } setGhost(value->getGhost()); return true; } - - bool CObjectNumber::equal(const CObject* other) const { - //H_AUTO(R2_CObjectNumber_equal) - if (!other || !other->isNumber()) return false; + if (!other) return false; + if (isInteger()) + { + if (!other->isInteger()) return false; + return (getIntegerValue() == other->toInteger()); + } + + if (!other->isNumber()) return false; + double value = getNumberValue(); double otherValue = other->toNumber(); - if (_Value == otherValue) return true; + if (value == otherValue) return true; // if difference between 2 values less than epsilon, we consider they are equals - return fabs(_Value - otherValue) <= std::numeric_limits::epsilon(); + return fabs(value - otherValue) <= std::numeric_limits::epsilon(); } - -//----------------------- CObjectInteger ---------------------------------------- - - -CObjectInteger::CObjectInteger(sint64 value) : CObject(), _Value(value){} - -const char *CObjectInteger::getTypeAsString() const -{ - return "Integer"; -} - -void CObjectInteger::visitInternal(IObjectVisitor &visitor) -{ - //H_AUTO(R2_CObjectInteger_visit) - visitor.visit(*this); -} - - -void CObjectInteger::inPlaceCopyTo(CObject &dest) const -{ - //H_AUTO(R2_CObjectInteger_inPlaceCopyTo) - dest.inPlaceCopy(*this); -} - -void CObjectInteger::inPlaceCopy(const CObjectInteger &src) -{ - //H_AUTO(R2_CObjectInteger_inPlaceCopy) - _Value = src._Value; - setGhost(src.getGhost()); -} - - -std::string CObjectInteger::doToString() const { return NLMISC::toString(_Value); } - -void CObjectInteger::doSerialize(std::string& out, CSerializeContext& /* context */) const -{ - //H_AUTO(R2_CObjectInteger_doSerialize) - nlassert(!getGhost()); - out += NLMISC::toString(_Value); -} - -bool CObjectInteger::set(const std::string& key, sint64 value) -{ - //H_AUTO(R2_CObjectInteger_set) - - BOMB_IF(!key.empty(), "Try to set an element of a table on an object that is not a table", return false); - - _Value = value; - return true; -} - - -bool CObjectInteger::set(const std::string& key, const std::string & value) -{ - //H_AUTO(R2_CObjectInteger_set) - //XXX - BOMB_IF(!key.empty(), "Try to set an element of a table on an object that is not a table", return false); - NLMISC::fromString(value, _Value); - return true; -} - - -sint64 CObjectInteger::doToInteger() const { return _Value; } - -CObject* CObjectInteger::clone() const -{ - //H_AUTO(R2_CObjectInteger_clone) - CObjectInteger *result = new CObjectInteger(_Value); - result->setGhost(getGhost()); - return result; -} - -bool CObjectInteger::doIsInteger() const { return true;} - - - -bool CObjectInteger::setObject(const std::string& /* key */, CObject* value) -{ - //H_AUTO(R2_CObjectInteger_setObject) - BOMB_IF(!value->isInteger(), NLMISC::toString("Try to set an element of a type '%s' with a value of type '%s' on an object that is not an integer", this->getTypeAsString(), value->getTypeAsString()), return false); - - _Value = value->toInteger(); - setGhost(value->getGhost()); - return true; -} - - - -bool CObjectInteger::equal(const CObject* other) const -{ - //H_AUTO(R2_CObjectInteger_equal) - if (!other || !other->isInteger()) return false; - sint64 otherValue = other->toInteger(); - return _Value == otherValue; -} - - //----------------------- CObjectTable ---------------------------------------- @@ -1686,7 +1640,7 @@ CObject* CObjectFactory::newBasic(const std::string & type) } else if (type == "Number") { - return new CObjectNumber(0); + return new CObjectNumber((sint64)0); } else if (type == "Table") { @@ -1976,15 +1930,10 @@ void CObjectNumber::dump(const std::string prefix, uint depth) const { //H_AUTO(R2_CObjectNumber_dump) std::string result(depth * 4, ' '); - result += NLMISC::toString("%sNumber, ptr = 0x%p, value = %lf, ghost = %s", prefix.c_str(), this, _Value, _Ghost ? "true" : "false"); - nlwarning(result.c_str()); -} - -void CObjectInteger::dump(const std::string prefix, uint depth) const -{ - //H_AUTO(R2_CObjectInteger_dump) - std::string result(depth * 4, ' '); - result += NLMISC::toString("%sInteger, ptr = 0x%p, value = %" NL_I64 "d, ghost = %s", prefix.c_str(), this, _Value, _Ghost ? "true" : "false"); + if (m_IsInteger) + result += NLMISC::toString("%sNumber, ptr = 0x%p, isNumber, value = %lf, ghost = %s", prefix.c_str(), this, m_Value.Integer, _Ghost ? "true" : "false"); + else + result += NLMISC::toString("%sNumber, ptr = 0x%p, isInteger, value = %lf, ghost = %s", prefix.c_str(), this, m_Value.Number, _Ghost ? "true" : "false"); nlwarning(result.c_str()); } @@ -3330,13 +3279,13 @@ void CObjectSerializerImpl::serialImpl(NLMISC::IStream& stream, CObject*& data, { double value; stream.serial(value); - data = serializer->Factory ? serializer->Factory->newBasic("Number") : new CObjectNumber(0); + data = serializer->Factory ? serializer->Factory->newBasic("Number") : new CObjectNumber((sint64)0); ((CObjectNumber *) data)->set("", value); return; } case ObjectNumberZero: { - data = serializer->Factory ? serializer->Factory->newBasic("Number") : new CObjectNumber(0); + data = serializer->Factory ? serializer->Factory->newBasic("Number") : new CObjectNumber((sint64)0); ((CObjectNumber *) data)->set("", 0.0); return; } @@ -3344,8 +3293,8 @@ void CObjectSerializerImpl::serialImpl(NLMISC::IStream& stream, CObject*& data, { sint32 value; stream.serial(value); - data = serializer->Factory ? serializer->Factory->newBasic("Number") : new CObjectNumber(0); - ((CObjectNumber *) data)->set("", value); + data = serializer->Factory ? serializer->Factory->newBasic("Number") : new CObjectNumber((sint64)0); + ((CObjectNumber *) data)->set("", (sint64)value); return; } @@ -3353,8 +3302,8 @@ void CObjectSerializerImpl::serialImpl(NLMISC::IStream& stream, CObject*& data, { uint32 value; stream.serial(value); - data = serializer->Factory ? serializer->Factory->newBasic("Number") : new CObjectNumber(0); - ((CObjectNumber *) data)->set("", value); + data = serializer->Factory ? serializer->Factory->newBasic("Number") : new CObjectNumber((sint64)0); + ((CObjectNumber *) data)->set("", (sint64)value); return; } @@ -3362,8 +3311,8 @@ void CObjectSerializerImpl::serialImpl(NLMISC::IStream& stream, CObject*& data, { sint16 value; stream.serial(value); - data = serializer->Factory ? serializer->Factory->newBasic("Number") : new CObjectNumber(0); - ((CObjectNumber *) data)->set("", value); + data = serializer->Factory ? serializer->Factory->newBasic("Number") : new CObjectNumber((sint64)0); + ((CObjectNumber *) data)->set("", (sint64)value); return; } @@ -3371,8 +3320,8 @@ void CObjectSerializerImpl::serialImpl(NLMISC::IStream& stream, CObject*& data, { uint16 value; stream.serial(value); - data = serializer->Factory ? serializer->Factory->newBasic("Number") : new CObjectNumber(0); - ((CObjectNumber *) data)->set("", value); + data = serializer->Factory ? serializer->Factory->newBasic("Number") : new CObjectNumber((sint64)0); + ((CObjectNumber *) data)->set("", (sint64)value); return; } @@ -3380,8 +3329,8 @@ void CObjectSerializerImpl::serialImpl(NLMISC::IStream& stream, CObject*& data, { sint8 value; stream.serial(value); - data = serializer->Factory ? serializer->Factory->newBasic("Number") : new CObjectNumber(0); - ((CObjectNumber *) data)->set("", value); + data = serializer->Factory ? serializer->Factory->newBasic("Number") : new CObjectNumber((sint64)0); + ((CObjectNumber *) data)->set("", (sint64)value); return; } @@ -3389,8 +3338,8 @@ void CObjectSerializerImpl::serialImpl(NLMISC::IStream& stream, CObject*& data, { uint8 value; stream.serial(value); - data = serializer->Factory ? serializer->Factory->newBasic("Number") : new CObjectNumber(0); - ((CObjectNumber *) data)->set("", value); + data = serializer->Factory ? serializer->Factory->newBasic("Number") : new CObjectNumber((sint64)0); + ((CObjectNumber *) data)->set("", (sint64)value); return; } // Do not remove this or it would be impossible to load old session @@ -3398,8 +3347,8 @@ void CObjectSerializerImpl::serialImpl(NLMISC::IStream& stream, CObject*& data, { float value; stream.serial(value); - data = serializer->Factory ? serializer->Factory->newBasic("Number") : new CObjectNumber(0); - ((CObjectNumber *) data)->set("", value); + data = serializer->Factory ? serializer->Factory->newBasic("Number") : new CObjectNumber((sint64)0); + ((CObjectNumber *) data)->set("", (double)value); return; } @@ -3407,7 +3356,7 @@ void CObjectSerializerImpl::serialImpl(NLMISC::IStream& stream, CObject*& data, { double value; stream.serial(value); - data = serializer->Factory ? serializer->Factory->newBasic("Number") : new CObjectNumber(0); + data = serializer->Factory ? serializer->Factory->newBasic("Number") : new CObjectNumber((sint64)0); ((CObjectNumber *) data)->set("", value); return; } diff --git a/code/ryzom/common/src/game_share/object.h b/code/ryzom/common/src/game_share/object.h index 7d4ab1f49..806d790aa 100644 --- a/code/ryzom/common/src/game_share/object.h +++ b/code/ryzom/common/src/game_share/object.h @@ -206,7 +206,6 @@ public: virtual void inPlaceCopyTo(CObject &dest) const = 0; virtual void inPlaceCopy(const CObjectString &src); virtual void inPlaceCopy(const CObjectNumber &src); - virtual void inPlaceCopy(const CObjectInteger &src); virtual void inPlaceCopy(const CObjectTable &src); protected: void copyMismatchMsg(const CObject &src); @@ -287,78 +286,51 @@ class CObjectNumber : public CObject public: explicit CObjectNumber(double value); + explicit CObjectNumber(sint64 value); - virtual const char *getTypeAsString() const; + virtual const char *getTypeAsString() const NL_OVERRIDE; - virtual bool set(const std::string& key, double value); - virtual bool set(const std::string& key, const std::string&value); + virtual bool set(const std::string& key, sint64 value) NL_OVERRIDE; + virtual bool set(const std::string& key, double value) NL_OVERRIDE; + virtual bool set(const std::string& key, const std::string&value) NL_OVERRIDE; - virtual bool setObject(const std::string& key, CObject* value); + virtual bool setObject(const std::string& key, CObject* value) NL_OVERRIDE; - virtual CObject* clone() const; + virtual CObject* clone() const NL_OVERRIDE; - double getValue() const { return _Value; } + double getNumberValue() const { return m_IsInteger ? m_Value.Integer : m_Value.Number; } + sint64 getIntegerValue() const { return m_IsInteger ? m_Value.Integer : m_Value.Number; } - virtual void dump(const std::string prefix = "", uint depth = 0) const; + virtual void dump(const std::string prefix = "", uint depth = 0) const NL_OVERRIDE; - virtual bool equal(const CObject* other) const; + virtual bool equal(const CObject* other) const NL_OVERRIDE; protected: - virtual void doSerialize(std::string& out, CSerializeContext& context) const; - - virtual bool doIsNumber() const; - - virtual double doToNumber() const; - - virtual std::string doToString() const; - - virtual void inPlaceCopyTo(CObject &dest) const; - virtual void inPlaceCopy(const CObjectNumber &src); + virtual void doSerialize(std::string& out, CSerializeContext& context) const NL_OVERRIDE; - virtual void visitInternal(IObjectVisitor &visitor); + virtual bool doIsNumber() const NL_OVERRIDE; -private: - double _Value; + virtual double doToNumber() const NL_OVERRIDE; -}; + virtual bool doIsInteger() const NL_OVERRIDE; -class CObjectInteger : public CObject -{ + virtual sint64 doToInteger() const NL_OVERRIDE; -public: - explicit CObjectInteger(sint64 value); + virtual std::string doToString() const NL_OVERRIDE; - virtual const char *getTypeAsString() const; + virtual void inPlaceCopyTo(CObject &dest) const NL_OVERRIDE; + virtual void inPlaceCopy(const CObjectNumber &src) NL_OVERRIDE; - virtual bool set(const std::string& key, sint64 value); - virtual bool set(const std::string& key, const std::string &value); - - virtual bool setObject(const std::string& key, CObject* value); - - virtual CObject* clone() const; - - sint64 getValue() const { return _Value; } - - virtual void dump(const std::string prefix = "", uint depth = 0) const; - - virtual bool equal(const CObject* other) const; - -protected: - virtual void doSerialize(std::string& out, CSerializeContext& context) const; - - virtual bool doIsInteger() const; - - virtual sint64 doToInteger() const; - - virtual std::string doToString() const; - - virtual void inPlaceCopyTo(CObject &dest) const; - virtual void inPlaceCopy(const CObjectInteger &src); - - virtual void visitInternal(IObjectVisitor &visitor); + virtual void visitInternal(IObjectVisitor &visitor) NL_OVERRIDE; private: - sint64 _Value; + bool m_IsInteger; + union + { + double Number; + sint64 Integer; + } m_Value; + }; class CObjectTable: public CObject From bddbed9da2bd192d7e59c200e3a2af9df0d183fc Mon Sep 17 00:00:00 2001 From: kaetemi Date: Mon, 16 Dec 2019 10:14:11 +0800 Subject: [PATCH 122/236] Sanity check for Lua integer size --- code/ryzom/client/src/r2/dmc/com_lua_module.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/code/ryzom/client/src/r2/dmc/com_lua_module.cpp b/code/ryzom/client/src/r2/dmc/com_lua_module.cpp index 18ecbe011..c717b2cba 100644 --- a/code/ryzom/client/src/r2/dmc/com_lua_module.cpp +++ b/code/ryzom/client/src/r2/dmc/com_lua_module.cpp @@ -1243,6 +1243,7 @@ CObject* CComLuaModule::getObjectFromLua(lua_State* state, sint idx) #if LUA_VERSION_NUM >= 503 if (lua_isinteger(state, -1) != 0) { + nlctassert(sizeof(lua_Integer) == sizeof(sint64)); sint64 value = lua_tointeger(state, -1); lua_pop(state, 1); return new CObjectNumber(value); @@ -1250,6 +1251,7 @@ CObject* CComLuaModule::getObjectFromLua(lua_State* state, sint idx) else #endif { + nlctassert(sizeof(lua_Number) == sizeof(double)); double value = lua_tonumber(state, -1); lua_pop(state, 1); return new CObjectNumber(value); From 2cdfc0ce29a4c094f9e0cd9a8d7d1983e72aa4c5 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Mon, 16 Dec 2019 10:26:22 +0800 Subject: [PATCH 123/236] CObjectNumber for Lua interop needs to deal with both double and sint64 types, cannot have separate CObjectInteger type --- code/ryzom/common/src/game_share/object.cpp | 22 ++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/code/ryzom/common/src/game_share/object.cpp b/code/ryzom/common/src/game_share/object.cpp index c8e238107..4b12cf3ea 100644 --- a/code/ryzom/common/src/game_share/object.cpp +++ b/code/ryzom/common/src/game_share/object.cpp @@ -801,9 +801,9 @@ void CObjectNumber::doSerialize(std::string& out, CSerializeContext& /* context { //H_AUTO(R2_CObjectNumber_doSerialize) nlassert(!getGhost()); - if (m_IsInteger) + if (doIsInteger()) { - out += NLMISC::toString(m_Value.Integer); + out += NLMISC::toString(getIntegerValue()); } else { @@ -852,15 +852,20 @@ bool CObjectNumber::set(const std::string& key, const std::string & value) BOMB_IF(!key.empty(), "Try to set an element of a table on an object that is not a table", return false); double num; sint64 i; + if (NLMISC::fromString(value, i)) + { + if (NLMISC::toString(i) == value) + { + m_IsInteger = true; + m_Value.Integer = i; + return true; + } + } if (NLMISC::fromString(value, num)) { m_IsInteger = false; m_Value.Number = num; - } - if (NLMISC::fromString(value, i)) - { - m_IsInteger = true; - m_Value.Number = i; + return true; } return false; } @@ -905,9 +910,8 @@ bool CObjectNumber::setObject(const std::string& /* key */, CObject* value) bool CObjectNumber::equal(const CObject* other) const { if (!other) return false; - if (isInteger()) + if (isInteger() && other->isInteger()) { - if (!other->isInteger()) return false; return (getIntegerValue() == other->toInteger()); } From ae68ce722e0cba79b709838a3ff2fa38d306c484 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Mon, 16 Dec 2019 11:50:15 +0800 Subject: [PATCH 124/236] Various fixes or adjustments --- code/nel/include/nel/3d/texture.h | 3 ++- code/ryzom/client/src/r2/dmc/com_lua_module.cpp | 2 +- code/ryzom/common/src/game_share/object.cpp | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/code/nel/include/nel/3d/texture.h b/code/nel/include/nel/3d/texture.h index bd71a00fd..f74af29d9 100644 --- a/code/nel/include/nel/3d/texture.h +++ b/code/nel/include/nel/3d/texture.h @@ -106,7 +106,8 @@ public: class ITexture : public CBitmap, public NLMISC::CRefCount, public NLMISC::IStreamable { public: -// NL_USES_DEFAULT_ARENA_OBJECT_ALLOCATOR // for fast alloc + // TODO: FIX: NL_USES_DEFAULT_ARENA_OBJECT_ALLOCATOR // for fast alloc + // Those enums MUST be the same than in UTexture!! enum TWrapMode { diff --git a/code/ryzom/client/src/r2/dmc/com_lua_module.cpp b/code/ryzom/client/src/r2/dmc/com_lua_module.cpp index c717b2cba..2ea3d91dd 100644 --- a/code/ryzom/client/src/r2/dmc/com_lua_module.cpp +++ b/code/ryzom/client/src/r2/dmc/com_lua_module.cpp @@ -1261,7 +1261,7 @@ CObject* CComLuaModule::getObjectFromLua(lua_State* state, sint idx) case LUA_TBOOLEAN: { - double value = static_cast(lua_toboolean(state, -1)); + sint64 value = lua_toboolean(state, -1); lua_pop(state, 1); return new CObjectNumber(value); } diff --git a/code/ryzom/common/src/game_share/object.cpp b/code/ryzom/common/src/game_share/object.cpp index 4b12cf3ea..c9315997f 100644 --- a/code/ryzom/common/src/game_share/object.cpp +++ b/code/ryzom/common/src/game_share/object.cpp @@ -760,7 +760,7 @@ void CObjectRefId::doSerialize(std::string& out, CSerializeContext& /* context CObjectNumber::CObjectNumber(double value) : CObject(), m_IsInteger(false) { - m_Value.Integer = value; + m_Value.Number = value; } CObjectNumber::CObjectNumber(sint64 value) : CObject(), m_IsInteger(true) From 58cc988fbc7bfa196ea91a0d6c9be9238bc9a4e9 Mon Sep 17 00:00:00 2001 From: Nimetu Date: Fri, 24 Jan 2020 15:50:00 +0200 Subject: [PATCH 125/236] Added: base64 encode/decode --- code/nel/include/nel/misc/base64.h | 154 ++++++++++++++++++ code/nel/tools/nel_unit_test/ut_misc.h | 2 + code/nel/tools/nel_unit_test/ut_misc_base64.h | 82 ++++++++++ 3 files changed, 238 insertions(+) create mode 100644 code/nel/include/nel/misc/base64.h create mode 100644 code/nel/tools/nel_unit_test/ut_misc_base64.h diff --git a/code/nel/include/nel/misc/base64.h b/code/nel/include/nel/misc/base64.h new file mode 100644 index 000000000..4c5c2babd --- /dev/null +++ b/code/nel/include/nel/misc/base64.h @@ -0,0 +1,154 @@ +// NeL - MMORPG Framework +// Copyright (C) 2010 Winch Gate Property Limited +// +// 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 +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + + +#ifndef NL_BASE64_H +#define NL_BASE64_h + +namespace NLMISC +{ + +/** + * \brief base64 encode/decode + * \date 2020-01-23 12:39GMT + * \author Meelis Mägi (Nimetu) + */ + +struct base64 { + static std::string encode(const std::string &data) + { + /* Conversion table. for base 64 */ + static const char tbl[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" + "abcdefghijklmnopqrstuvwxyz" + "0123456789+/"; + static const char padChar = '='; + + size_t inLength = data.size(); + size_t outLength = 4 * ((inLength + 2) / 3); + + std::string out; + out.resize(outLength); + + size_t iRead=0, oWrite=0; + for (size_t iLoop = 0; iLoop < inLength/3; iLoop++) + { + out[oWrite+0] = tbl[ (data[iRead+0] >> 2) & 0x3F]; + out[oWrite+1] = tbl[((data[iRead+0] << 4) & 0x30) + ((data[iRead+1] >> 4) & 0x0F)]; + out[oWrite+2] = tbl[((data[iRead+1] << 2) & 0x3C) + ((data[iRead+2] >> 6) & 0x03)]; + out[oWrite+3] = tbl[ data[iRead+2] & 0x3F]; + iRead += 3; + oWrite += 4; + } + + // remaining bytes + switch(inLength % 3) + { + case 2: + out[oWrite+0] = tbl[ (data[iRead+0] >> 2) & 0x3F]; + out[oWrite+1] = tbl[((data[iRead+0] << 4) & 0x30) + ((data[iRead+1] >> 4) & 0x0F)]; + out[oWrite+2] = tbl[((data[iRead+1] << 2) & 0x3C)]; + out[oWrite+3] = padChar; + break; + case 1: + out[oWrite+0] = tbl[ (data[iRead+0] >> 2) & 0x3F]; + out[oWrite+1] = tbl[((data[iRead+0] << 4) & 0x30)]; + out[oWrite+2] = padChar; + out[oWrite+3] = padChar; + break; + default: + break; + } + + return out; + } + + static std::string decode(const std::string &in) + { + static sint8 tbl[] = { + // 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 00 + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 10 + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 62, -1, -1, -1, 63, // 20 + / + 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, -1, -1, -1, 0, -1, -1, // 30 0..9 = + -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, // 40 A.. + 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, -1, -1, -1, -1, -1, // 50 ..Z + -1, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, // 60 a.. + 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, -1, -1, -1, -1, -1, // 70 ..z + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 80 + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 90 + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // A0 + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // B0 + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // C0 + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // D0 + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // E0 + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // F0 + }; + static char padChar = '='; + + size_t inLength = in.size(); + // add optional padding if its missing from input + size_t outLength = (inLength + inLength % 4) / 4 * 3; + + std::string out; + if (inLength > 0) + { + uint8 buf[4]; + size_t iBuf = 0; + size_t iRead = 0; + size_t oWrite = 0; + + out.resize(outLength); + while(iRead < inLength && in[iRead] != padChar) + { + buf[iBuf] = (uint8)tbl[in[iRead]]; + // invalid byte in input + if (buf[iBuf] == 0xFF) + break; + + iRead++; + iBuf++; + if (iBuf == 4) + { + out[oWrite+0] = ((buf[0] << 2) & 0xFC) + ((buf[1] >> 4) & 0x0F); + out[oWrite+1] = ((buf[1] << 4) & 0xF0) + ((buf[2] >> 2) & 0x0F); + out[oWrite+2] = ((buf[2] << 6) & 0xC0) + (buf[3] & 0x3F); + oWrite += 3; + iBuf = 0; + } + } + + if (iBuf > 0) + { + uint8 tmp[3]; + tmp[0] = ((buf[0] << 2) & 0xFC) + ((buf[1] >> 4) & 0x0F); + tmp[1] = ((buf[1] << 4) & 0xF0) + ((buf[2] >> 2) & 0x0F); + tmp[2] = ((buf[2] << 6) & 0xC0) + (buf[3] & 0x3F); + for(uint i = 0; i < iBuf-1; i++, oWrite++) + out[oWrite] = tmp[i]; + } + + if (out.size() != oWrite) + out.resize(oWrite); + } + + return out; + } +}; + +}//namespace NLMISC + +#endif // NL_BASE64_H + diff --git a/code/nel/tools/nel_unit_test/ut_misc.h b/code/nel/tools/nel_unit_test/ut_misc.h index 7f125f2f3..aef1e4c90 100644 --- a/code/nel/tools/nel_unit_test/ut_misc.h +++ b/code/nel/tools/nel_unit_test/ut_misc.h @@ -31,6 +31,7 @@ #include "ut_misc_variable.h" #include "ut_misc_types.h" #include "ut_misc_string_common.h" +#include "ut_misc_base64.h" // Add a line here when adding a new test CLASS struct CUTMisc : public Test::Suite @@ -51,6 +52,7 @@ struct CUTMisc : public Test::Suite add(std::auto_ptr(new CUTMiscVariable)); add(std::auto_ptr(new CUTMiscTypes)); add(std::auto_ptr(new CUTMiscStringCommon)); + add(std::auto_ptr(new CUTMiscBase64)); // Add a line here when adding a new test CLASS } }; diff --git a/code/nel/tools/nel_unit_test/ut_misc_base64.h b/code/nel/tools/nel_unit_test/ut_misc_base64.h new file mode 100644 index 000000000..84ddfcefc --- /dev/null +++ b/code/nel/tools/nel_unit_test/ut_misc_base64.h @@ -0,0 +1,82 @@ +// NeL - MMORPG Framework +// Copyright (C) 2010 Winch Gate Property Limited +// +// 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 +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +#ifndef UT_MISC_BASE64 +#define UT_MISC_BASE64 + +#include + +struct CUTMiscBase64 : public Test::Suite +{ + CUTMiscBase64() + { + TEST_ADD(CUTMiscBase64::testEncode); + TEST_ADD(CUTMiscBase64::testDecode); + TEST_ADD(CUTMiscBase64::testDecodeNoPadding); + TEST_ADD(CUTMiscBase64::testDecodeInvalid); + } + + void testEncode() + { + TEST_ASSERT("" == NLMISC::base64::encode("")); + + TEST_ASSERT("AA==" == NLMISC::base64::encode(std::string(1, '\0'))); + TEST_ASSERT("YQ==" == NLMISC::base64::encode("a")); + TEST_ASSERT("YWI=" == NLMISC::base64::encode("ab")); + TEST_ASSERT("YWJj" == NLMISC::base64::encode("abc")); + + std::string expect = "YWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXpBQkNERUZHSElKS0xNTk9QUVJTVFVWV1hZWjAxMjM0NTY3ODkhQCMwXiYqKCk7Ojw+LC4gW117fQ=="; + std::string encoded = NLMISC::base64::encode("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#0^&*();:<>,. []{}"); + TEST_ASSERT(expect == encoded); + } + + void testDecode() + { + TEST_ASSERT("" == NLMISC::base64::decode("")); + TEST_ASSERT("" == NLMISC::base64::decode("=")); + TEST_ASSERT("" == NLMISC::base64::decode("==")); + TEST_ASSERT("" == NLMISC::base64::decode("===")); + TEST_ASSERT("" == NLMISC::base64::decode("====")); + + TEST_ASSERT(std::string(1, '\0') == NLMISC::base64::decode("AA==")); + TEST_ASSERT("a" == NLMISC::base64::decode("YQ==")); + TEST_ASSERT("ab" == NLMISC::base64::decode("YWI=")); + TEST_ASSERT("abc" == NLMISC::base64::decode("YWJj")); + + std::string expect = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#0^&*();:<>,. []{}"; + std::string decoded = NLMISC::base64::decode("YWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXpBQkNERUZHSElKS0xNTk9QUVJTVFVWV1hZWjAxMjM0NTY3ODkhQCMwXiYqKCk7Ojw+LC4gW117fQ=="); + TEST_ASSERT(expect == decoded); + } + + void testDecodeNoPadding() + { + TEST_ASSERT(std::string(1, '\0') == NLMISC::base64::decode("AA")); + TEST_ASSERT("a" == NLMISC::base64::decode("YQ")); + TEST_ASSERT("ab" == NLMISC::base64::decode("YWI")); + + std::string expect = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#0^&*();:<>,. []{}"; + std::string decoded = NLMISC::base64::decode("YWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXpBQkNERUZHSElKS0xNTk9QUVJTVFVWV1hZWjAxMjM0NTY3ODkhQCMwXiYqKCk7Ojw+LC4gW117fQ"); + TEST_ASSERT(expect == decoded); + } + + void testDecodeInvalid() + { + TEST_ASSERT("" == NLMISC::base64::decode("A")); + TEST_ASSERT("" == NLMISC::base64::decode("A===")); + } +}; + +#endif From d2ccc09b7d80037f5fd6ebfe239bbc7171ff9fbf Mon Sep 17 00:00:00 2001 From: Nimetu Date: Sun, 26 Jan 2020 14:33:39 +0200 Subject: [PATCH 126/236] Added: encodeURIComponent, decodeURIComponent --- code/nel/include/nel/misc/common.h | 4 + code/nel/src/misc/common.cpp | 88 +++++++++++++++++++ code/nel/tools/nel_unit_test/ut_misc_common.h | 23 +++++ 3 files changed, 115 insertions(+) diff --git a/code/nel/include/nel/misc/common.h b/code/nel/include/nel/misc/common.h index 2b6f85f84..f5f99ea6a 100644 --- a/code/nel/include/nel/misc/common.h +++ b/code/nel/include/nel/misc/common.h @@ -307,6 +307,10 @@ template T trimQuotes (const T &str) return str.substr(1, size - 2); } +// encode/decode uri component using %AB hex encoding +std::string encodeURIComponent(const std::string &in); +std::string decodeURIComponent(const std::string &in); + ////////////////////////////////////////////////////////////////////////// // **** DEPRECATED *****: PLEASE DON'T USE THESE METHODS BUT FUNCTIONS ABOVE toLower() and toUpper() ////////////////////////////////////////////////////////////////////////// diff --git a/code/nel/src/misc/common.cpp b/code/nel/src/misc/common.cpp index 31a11b792..b9e9a7d85 100644 --- a/code/nel/src/misc/common.cpp +++ b/code/nel/src/misc/common.cpp @@ -784,6 +784,94 @@ bool fromHexa(const char hexa, uint8 &b) return false; } +static std::vector makeCharLookupTable(const std::string &chars) +{ + std::vector out(256, -1); + for(uint i = 0; i< chars.size(); i++) + out[chars[i]] = i; + + return out; +} + +std::string encodeURIComponent(const std::string &in) +{ + static const char hexLookup[] = "0123456789ABCDEF"; + static const std::vector notEscaped(makeCharLookupTable( + "ABCDEFGHIJKLMNOPQRSTUVWXYZ" + "abcdefghijklmnopqrstuvwxyz" + "0123456789" + "-_.!~*'()" + )); + + if (in.empty()) + return std::string(); + + std::string out; + + size_t inSize = in.size(); + size_t outSize = in.size(); + + // resize to worst case for smaller strings, + // give some replacements for free for larger strings + if (in.size() < 100) + out.reserve(in.size() * 3); + else + out.reserve(in.size() + 200); + + for(size_t i = 0; i < inSize; i++) + { + char ch = in[i]; + if (notEscaped[(uint8)ch] == -1) + { + out += '%'; + out += hexLookup[(ch>>4)& 0x0F]; + out += hexLookup[ch & 0x0F]; + outSize += 2; + } + else + { + out += ch; + } + } + // resize back to correct size + out.resize(outSize); + + return out; +} + +std::string decodeURIComponent(const std::string &in) +{ + if (in.find("%") == std::string::npos) + return in; + + std::string out; + out.resize(in.size()); + + size_t outIndex = 0, inSize = in.size(); + for(size_t i = 0; i < inSize; i++, outIndex++) + { + if (in[i] == '%' && (i+2 < inSize)) + { + uint8 a; + uint8 b; + if (fromHexa(in[i+1], a) && fromHexa(in[i+2], b)) + { + out[outIndex] = (a << 4) | b; + i += 2; + } else { + // not hex chars + out[outIndex] = in[i]; + } + } + else + { + out[outIndex] = in[i]; + } + } + out.resize(outIndex); + return out; +} + std::string formatThousands(const std::string& s) { sint i, k; diff --git a/code/nel/tools/nel_unit_test/ut_misc_common.h b/code/nel/tools/nel_unit_test/ut_misc_common.h index d33d65064..8a7aab150 100644 --- a/code/nel/tools/nel_unit_test/ut_misc_common.h +++ b/code/nel/tools/nel_unit_test/ut_misc_common.h @@ -26,6 +26,8 @@ struct CUTMiscCommon : public Test::Suite { TEST_ADD(CUTMiscCommon::bytesToHumanReadableUnits); TEST_ADD(CUTMiscCommon::humanReadableToBytes); + TEST_ADD(CUTMiscCommon::encodeURIComponent); + TEST_ADD(CUTMiscCommon::decodeURIComponent); // Add a line here when adding a new test METHOD } @@ -166,6 +168,27 @@ struct CUTMiscCommon : public Test::Suite bytes = NLMISC::humanReadableToBytes("-1 B"); TEST_ASSERT(bytes == 0); } + + void encodeURIComponent() + { + TEST_ASSERT("%00" == NLMISC::encodeURIComponent(std::string("\x00", 1))); + TEST_ASSERT("%0A" == NLMISC::encodeURIComponent(std::string("\x0A", 1))); + TEST_ASSERT("%A0" == NLMISC::encodeURIComponent(std::string("\xA0", 1))); + TEST_ASSERT("a%20b" == NLMISC::encodeURIComponent("a b")); + TEST_ASSERT("a%2Bb" == NLMISC::encodeURIComponent("a+b")); + } + + void decodeURIComponent() + { + TEST_ASSERT(std::string("\x00", 1) == NLMISC::decodeURIComponent(std::string("\x00", 1))); + TEST_ASSERT(std::string("\x0A", 1) == NLMISC::decodeURIComponent(std::string("\x0A", 1))); + TEST_ASSERT(std::string("\xA0", 1) == NLMISC::decodeURIComponent(std::string("\xA0", 1))); + TEST_ASSERT("a b" == NLMISC::decodeURIComponent("a%20b")); + TEST_ASSERT("a+b" == NLMISC::decodeURIComponent("a%2Bb")); + + TEST_ASSERT("a%A" == NLMISC::decodeURIComponent("a%A")); + TEST_ASSERT("a%AX" == NLMISC::decodeURIComponent("a%AX")); + } }; #endif From b208c0b805d204e0ec7ae008e1224361e89c5642 Mon Sep 17 00:00:00 2001 From: Nimetu Date: Sun, 26 Jan 2020 17:22:45 +0200 Subject: [PATCH 127/236] Added: Creating texture from data:image/type --- code/nel/include/nel/gui/view_renderer.h | 2 + code/nel/src/gui/view_bitmap.cpp | 2 +- code/nel/src/gui/view_renderer.cpp | 98 ++++++++++++++++++++++++ 3 files changed, 101 insertions(+), 1 deletion(-) diff --git a/code/nel/include/nel/gui/view_renderer.h b/code/nel/include/nel/gui/view_renderer.h index 4194a59fa..aefbb315f 100644 --- a/code/nel/include/nel/gui/view_renderer.h +++ b/code/nel/include/nel/gui/view_renderer.h @@ -267,6 +267,8 @@ namespace NLGUI bool bReleasable=true ); + // Create texture from dataURL "data:image/png;base64," string + sint32 createTextureFromDataURL(const std::string &data, bool uploadDXTC=true, bool bReleasable=true); // change position of a sub-texture (inside its big texture) from the sub-texture filename void updateTexturePos(const std::string &texturefileName, diff --git a/code/nel/src/gui/view_bitmap.cpp b/code/nel/src/gui/view_bitmap.cpp index 633a8856b..8922d5c4e 100644 --- a/code/nel/src/gui/view_bitmap.cpp +++ b/code/nel/src/gui/view_bitmap.cpp @@ -481,7 +481,7 @@ namespace NLGUI } } else - _TextureId.setTexture (toLower(TxName).c_str (), _TxtOffsetX, _TxtOffsetY, _TxtWidth, _TxtHeight, false); + _TextureId.setTexture (TxName.c_str (), _TxtOffsetX, _TxtOffsetY, _TxtWidth, _TxtHeight, false); } // ---------------------------------------------------------------------------- diff --git a/code/nel/src/gui/view_renderer.cpp b/code/nel/src/gui/view_renderer.cpp index 5dabede88..4c2db062a 100644 --- a/code/nel/src/gui/view_renderer.cpp +++ b/code/nel/src/gui/view_renderer.cpp @@ -24,6 +24,8 @@ #include "nel/misc/file.h" #include "nel/misc/uv.h" #include "nel/misc/hierarchical_timer.h" +#include "nel/misc/base64.h" +#include "nel/misc/md5.h" using namespace NLMISC; using namespace std; @@ -998,6 +1000,10 @@ namespace NLGUI ) { if (sGlobalTextureName.empty()) return -1; + + if (startsWith(sGlobalTextureName, "data:image/")) + return createTextureFromDataURL(sGlobalTextureName, uploadDXTC, bReleasable); + // Look if already existing string sLwrGTName = toLower(sGlobalTextureName); TGlobalTextureList::iterator ite = _GlobalTextures.begin(); @@ -1062,6 +1068,93 @@ namespace NLGUI return TextID; } + sint32 CViewRenderer::createTextureFromDataURL(const std::string &data, bool uploadDXTC, bool bReleasable) + { + if (!startsWith(data, "data:image/")) + return -1; + + size_t pos = data.find(";base64,"); + if (pos == std::string::npos) + { + nlwarning("Failed to parse dataURL (not base64?) '%s'", data.c_str()); + return -1; + } + + std::string md5hash = getMD5((uint8 *)data.c_str(), (uint32)data.size()).toString(); + + TGlobalTextureList::iterator ite = _GlobalTextures.begin(); + while (ite != _GlobalTextures.end()) + { + if (md5hash == ite->Name) + break; + ite++; + } + + // If global texture not exists create it + if (ite == _GlobalTextures.end()) + { + std::string decoded = base64::decode(data.substr(pos + 8)); + if (decoded.empty()) + { + nlwarning("base64 decode failed '%s'", data.substr(pos + 8).c_str()); + return -1; + } + + // + CMemStream buf; + if (buf.isReading()) buf.invert(); + buf.serialBuffer((uint8 *)(decoded.data()), decoded.size()); + buf.invert(); + + CBitmap btm; + btm.load(buf); + + SGlobalTexture gtTmp; + gtTmp.FromGlobaleTexture = false; + + gtTmp.Width = gtTmp.DefaultWidth = btm.getWidth();; + gtTmp.Height = gtTmp.DefaultHeight = btm.getHeight(); + + if (gtTmp.Width == 0 || gtTmp.Height == 0) + { + nlwarning("Failed to load the texture '%s', please check image format", data.c_str()); + return -1; + } + + UTextureMem *texture = driver->createTextureMem(btm.getWidth(), btm.getHeight(), CBitmap::RGBA); + if (!texture) + { + nlwarning("Failed to create mem texture (%d,%d)", btm.getWidth(), btm.getHeight()); + return -1; + } + + memcpy(texture->getPointer(), btm.getPixels().getPtr(), btm.getSize() * 4); + + gtTmp.Texture = texture; + gtTmp.Name = md5hash; + gtTmp.Texture->setFilterMode(UTexture::Nearest, UTexture::NearestMipMapOff); + gtTmp.Texture->setReleasable(bReleasable); + if(uploadDXTC) + gtTmp.Texture->setUploadFormat(UTexture::DXTC5); + + _GlobalTextures.push_back(gtTmp); + ite = _GlobalTextures.end(); + ite--; + } + + // Add a texture with reference to the i th global texture + SImage iTmp; + + // Set default parameters + iTmp.Name = data; + iTmp.GlobalTexturePtr = &(*ite); + iTmp.UVMin = CUV(0.f , 0.f); + iTmp.UVMax = CUV(1.f , 1.f); + sint32 TextID = addSImage(iTmp); + + return TextID; + } + void CViewRenderer::updateTexturePos(const std::string &texturefileName, sint32 offsetX /*=0*/, sint32 offsetY /*=0*/, sint32 width /*=-1*/, sint32 height /*=-1*/) { sint32 id = getTextureIdFromName (texturefileName); @@ -1159,6 +1252,11 @@ namespace NLGUI { driver->deleteTextureFile (tf); } + else + { + UTextureMem *tf = dynamic_cast(iteGT->Texture); + if (tf) driver->deleteTextureMem(tf); + } _GlobalTextures.erase (iteGT); return; } From f46ec8f6ffe90e1095389d253cde47693fbaeb26 Mon Sep 17 00:00:00 2001 From: Nimetu Date: Sun, 26 Jan 2020 17:38:15 +0200 Subject: [PATCH 128/236] Added: dataURL image support in html --- code/nel/src/gui/group_html.cpp | 84 ++++++++++++++++++++++---------- code/nel/src/gui/group_table.cpp | 4 -- 2 files changed, 57 insertions(+), 31 deletions(-) diff --git a/code/nel/src/gui/group_html.cpp b/code/nel/src/gui/group_html.cpp index 2e74182c3..160cda8ba 100644 --- a/code/nel/src/gui/group_html.cpp +++ b/code/nel/src/gui/group_html.cpp @@ -718,6 +718,14 @@ namespace NLGUI std::string finalUrl; img->setModulateGlobalColor(style.GlobalColor); + // data:image/png;base64,AA...== + if (startsWith(url, "data:image/")) + { + setImage(img, decodeURIComponent(url), type); + setImageSize(img, style); + return; + } + // load the image from local files/bnp std::string image = CFile::getPath(url) + CFile::getFilenameWithoutExtension(url) + ".tga"; if (lookupLocalFile(finalUrl, image.c_str(), false)) @@ -3137,45 +3145,67 @@ namespace NLGUI ctrlButton->setId(name); } - // Load only tga files.. (conversion in dds filename is done in the lookup procedure) - string normal = normalBitmap.empty()?"":CFile::getPath(normalBitmap) + CFile::getFilenameWithoutExtension(normalBitmap) + ".tga"; - - // if the image doesn't exist on local, we check in the cache - // if(!CFile::fileExists(normal)) - if(!CPath::exists(normal)) + std::string normal; + if (startsWith(normalBitmap, "data:image/")) { - // search in the compressed texture - CViewRenderer &rVR = *CViewRenderer::getInstance(); - sint32 id = rVR.getTextureIdFromName(normal); - if(id == -1) + normal = decodeURIComponent(normalBitmap); + } + else + { + // Load only tga files.. (conversion in dds filename is done in the lookup procedure) + normal = normalBitmap.empty()?"":CFile::getPath(normalBitmap) + CFile::getFilenameWithoutExtension(normalBitmap) + ".tga"; + + // if the image doesn't exist on local, we check in the cache + if(!CPath::exists(normal)) { - normal = localImageName(normalBitmap); - addImageDownload(normalBitmap, ctrlButton, style); + // search in the compressed texture + CViewRenderer &rVR = *CViewRenderer::getInstance(); + sint32 id = rVR.getTextureIdFromName(normal); + if(id == -1) + { + normal = localImageName(normalBitmap); + addImageDownload(normalBitmap, ctrlButton, style); + } } } - string pushed = pushedBitmap.empty()?"":CFile::getPath(pushedBitmap) + CFile::getFilenameWithoutExtension(pushedBitmap) + ".tga"; - // if the image doesn't exist on local, we check in the cache, don't download it because the "normal" will already setuped it - // if(!CFile::fileExists(pushed)) - if(!CPath::exists(pushed)) + std::string pushed; + if (startsWith(pushedBitmap, "data:image/")) + { + pushed = decodeURIComponent(pushedBitmap); + } + else { - // search in the compressed texture - CViewRenderer &rVR = *CViewRenderer::getInstance(); - sint32 id = rVR.getTextureIdFromName(pushed); - if(id == -1) + pushed = pushedBitmap.empty()?"":CFile::getPath(pushedBitmap) + CFile::getFilenameWithoutExtension(pushedBitmap) + ".tga"; + // if the image doesn't exist on local, we check in the cache, don't download it because the "normal" will already setuped it + if(!CPath::exists(pushed)) { - pushed = localImageName(pushedBitmap); + // search in the compressed texture + CViewRenderer &rVR = *CViewRenderer::getInstance(); + sint32 id = rVR.getTextureIdFromName(pushed); + if(id == -1) + { + pushed = localImageName(pushedBitmap); + } } } - string over = overBitmap.empty()?"":CFile::getPath(overBitmap) + CFile::getFilenameWithoutExtension(overBitmap) + ".tga"; - // schedule mouseover bitmap for download if its different from normal - if (!over.empty() && !CPath::exists(over)) + std::string over; + if (startsWith(overBitmap, "data:image/")) { - if (overBitmap != normalBitmap) + over = decodeURIComponent(overBitmap); + } + else + { + over = overBitmap.empty()?"":CFile::getPath(overBitmap) + CFile::getFilenameWithoutExtension(overBitmap) + ".tga"; + // schedule mouseover bitmap for download if its different from normal + if (!over.empty() && !CPath::exists(over)) { - over = localImageName(overBitmap); - addImageDownload(overBitmap, ctrlButton, style, OverImage); + if (overBitmap != normalBitmap) + { + over = localImageName(overBitmap); + addImageDownload(overBitmap, ctrlButton, style, OverImage); + } } } diff --git a/code/nel/src/gui/group_table.cpp b/code/nel/src/gui/group_table.cpp index 4411be1dd..4b63903e4 100644 --- a/code/nel/src/gui/group_table.cpp +++ b/code/nel/src/gui/group_table.cpp @@ -610,16 +610,12 @@ namespace NLGUI // ---------------------------------------------------------------------------- void CGroupCell::setTextureTile(bool tiled) { - if (tiled) - nlinfo("Set texture is Tiled"); _TextureTiled = tiled; } // ---------------------------------------------------------------------------- void CGroupCell::setTextureScale(bool scaled) { - if (scaled) - nlinfo("Set texture is Scaled : %s"); _TextureScaled = scaled; } From 8be553401d112ed821549a956532863789abe497 Mon Sep 17 00:00:00 2001 From: Nimetu Date: Thu, 13 Feb 2020 12:55:29 +0200 Subject: [PATCH 129/236] Changed: Add proper ids to groups in webig --- code/nel/include/nel/gui/group_html.h | 4 ++++ code/nel/src/gui/group_html.cpp | 18 ++++++++++++++++-- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/code/nel/include/nel/gui/group_html.h b/code/nel/include/nel/gui/group_html.h index 74c5a0145..d1091cec0 100644 --- a/code/nel/include/nel/gui/group_html.h +++ b/code/nel/include/nel/gui/group_html.h @@ -360,6 +360,10 @@ namespace NLGUI // Delete page content and prepare next page void removeContent (); + // Counter to number html elements without id attribute + uint32 getNextAutoIdSeq() { return _AutoIdSeq++; } + uint32 _AutoIdSeq; + // Current URL for relative links in page std::string _URL; // Current URL diff --git a/code/nel/src/gui/group_html.cpp b/code/nel/src/gui/group_html.cpp index 160cda8ba..9bebac4e5 100644 --- a/code/nel/src/gui/group_html.cpp +++ b/code/nel/src/gui/group_html.cpp @@ -1455,6 +1455,7 @@ namespace NLGUI _LastRefreshTime = 0.0; _RenderNextTime = false; _WaitingForStylesheet = false; + _AutoIdSeq = 0; // Register CWidgetManager::getInstance()->registerClockMsgTarget(this); @@ -2543,6 +2544,7 @@ namespace NLGUI { // Add a new paragraph CGroupParagraph *newParagraph = new CGroupParagraph(CViewBase::TCtorParam()); + newParagraph->setId(getCurrentGroup()->getId() + ":PARAGRAPH" + toString(getNextAutoIdSeq())); newParagraph->setResizeFromChildH(true); newParagraph->setMarginLeft(getIndent()); @@ -3285,6 +3287,7 @@ namespace NLGUI _ReadingHeadTag = false; _IgnoreHeadTag = false; _IgnoreBaseUrlTag = false; + _AutoIdSeq = 0; paragraphChange (); @@ -4361,6 +4364,7 @@ namespace NLGUI if (!_GroupListAdaptor) { _GroupListAdaptor = new CGroupListAdaptor(CViewBase::TCtorParam()); // deleted by the list + _GroupListAdaptor->setId(getList()->getId() + ":GLA"); _GroupListAdaptor->setResizeFromChildH(true); getList()->addChild (_GroupListAdaptor, true); } @@ -5677,6 +5681,8 @@ namespace NLGUI { string style = elm.getAttribute("style"); string id = elm.getAttribute("id"); + if (id.empty()) + id = "DIV" + toString(getNextAutoIdSeq()); typedef pair TTmplParam; vector tmplParams; @@ -5709,10 +5715,10 @@ namespace NLGUI parentId = _Paragraph->getId(); } - CInterfaceGroup *inst = CWidgetManager::getInstance()->getParser()->createGroupInstance(templateName, this->_Id+":"+id, tmplParams); + CInterfaceGroup *inst = CWidgetManager::getInstance()->getParser()->createGroupInstance(templateName, parentId, tmplParams); if (inst) { - inst->setId(this->_Id+":"+id); + inst->setId(parentId+":"+id); inst->updateCoords(); if (haveParentDiv) { @@ -6641,6 +6647,10 @@ namespace NLGUI CGroupTable *table = new CGroupTable(TCtorParam()); table->BgColor = _CellParams.back().BgColor; + if (elm.hasNonEmptyAttribute("id")) + table->setId(getCurrentGroup()->getId() + ":" + elm.getAttribute("id")); + else + table->setId(getCurrentGroup()->getId() + ":TABLE" + toString(getNextAutoIdSeq())); // TODO: border-spacing: 2em; { @@ -6801,6 +6811,10 @@ namespace NLGUI } _Cells.back() = new CGroupCell(CViewBase::TCtorParam()); + if (elm.hasNonEmptyAttribute("id")) + _Cells.back()->setId(getCurrentGroup()->getId() + ":TD" + elm.getAttribute("id")); + else + _Cells.back()->setId(getCurrentGroup()->getId() + ":TD" + toString(getNextAutoIdSeq())); if (_Style.checkStyle("background-repeat", "repeat")) _Cells.back()->setTextureTile(true); From 2191d21bce8dab5cda243da56d555c5a0cb7f13d Mon Sep 17 00:00:00 2001 From: Nimetu Date: Thu, 13 Feb 2020 15:39:18 +0200 Subject: [PATCH 130/236] Fixed: html button with empty formid attribute --- code/nel/include/nel/gui/group_html.h | 3 +++ code/nel/src/gui/group_html.cpp | 17 ++++++++++++++++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/code/nel/include/nel/gui/group_html.h b/code/nel/include/nel/gui/group_html.h index d1091cec0..590c43a89 100644 --- a/code/nel/include/nel/gui/group_html.h +++ b/code/nel/include/nel/gui/group_html.h @@ -683,6 +683,8 @@ namespace NLGUI std::vector Entries; }; std::vector _Forms; + // if
element has been closed or not + bool _FormOpen; // submit buttons added to from struct SFormSubmitButton @@ -953,6 +955,7 @@ namespace NLGUI //void htmlEM(const CHtmlElement &elm); void htmlFONT(const CHtmlElement &elm); void htmlFORM(const CHtmlElement &elm); + void htmlFORMend(const CHtmlElement &elm); void htmlH(const CHtmlElement &elm); void htmlHend(const CHtmlElement &elm); void htmlHEAD(const CHtmlElement &elm); diff --git a/code/nel/src/gui/group_html.cpp b/code/nel/src/gui/group_html.cpp index 9bebac4e5..166da4719 100644 --- a/code/nel/src/gui/group_html.cpp +++ b/code/nel/src/gui/group_html.cpp @@ -1201,7 +1201,7 @@ namespace NLGUI case HTML_DT: htmlDTend(elm); break; case HTML_EM: renderPseudoElement(":after", elm);break; case HTML_FONT: break; - case HTML_FORM: renderPseudoElement(":after", elm);break; + case HTML_FORM: htmlFORMend(elm); break; case HTML_H1://no-break case HTML_H2://no-break case HTML_H3://no-break @@ -1456,6 +1456,7 @@ namespace NLGUI _RenderNextTime = false; _WaitingForStylesheet = false; _AutoIdSeq = 0; + _FormOpen = false; // Register CWidgetManager::getInstance()->registerClockMsgTarget(this); @@ -3274,6 +3275,7 @@ namespace NLGUI _Cells.clear(); _TR.clear(); _Forms.clear(); + _FormOpen = false; _FormSubmit.clear(); _Groups.clear(); _Divs.clear(); @@ -5579,6 +5581,11 @@ namespace NLGUI std::string tooltip = elm.getAttribute("tooltip"); bool disabled = elm.hasAttribute("disabled"); + if (formId.empty() && _FormOpen) + { + formId = _Forms.back().id; + } + if (!formAction.empty()) { formAction = getAbsoluteUrl(formAction); @@ -5851,6 +5858,8 @@ namespace NLGUI // *************************************************************************** void CGroupHTML::htmlFORM(const CHtmlElement &elm) { + _FormOpen = true; + // Build the form CGroupHTML::CForm form; // id check is case sensitive and auto id's are uppercase @@ -5875,6 +5884,12 @@ namespace NLGUI renderPseudoElement(":before", elm); } + void CGroupHTML::htmlFORMend(const CHtmlElement &elm) + { + _FormOpen = false; + renderPseudoElement(":after", elm); + } + // *************************************************************************** void CGroupHTML::htmlH(const CHtmlElement &elm) { From b13d51242cb5de5ec02744a94275bb8ef4ba184c Mon Sep 17 00:00:00 2001 From: Nimetu Date: Thu, 13 Feb 2020 16:04:41 +0200 Subject: [PATCH 131/236] Fixed: ah:html_submit_form without caller object --- .../ryzom/client/src/interface_v3/action_handler_help.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/code/ryzom/client/src/interface_v3/action_handler_help.cpp b/code/ryzom/client/src/interface_v3/action_handler_help.cpp index 94754432d..77f5f5552 100644 --- a/code/ryzom/client/src/interface_v3/action_handler_help.cpp +++ b/code/ryzom/client/src/interface_v3/action_handler_help.cpp @@ -1120,8 +1120,8 @@ class CHandlerHTMLSubmitForm : public IActionHandler return; } - sint32 x = pCaller->getEventX(); - sint32 y = pCaller->getEventY(); + sint32 x = pCaller ? pCaller->getEventX() : 0; + sint32 y = pCaller ? pCaller->getEventY() : 0; CInterfaceElement *element = CWidgetManager::getInstance()->getElementFromId(container); { @@ -1131,6 +1131,10 @@ class CHandlerHTMLSubmitForm : public IActionHandler { groupHtml->submitForm(button, x, y); } + else + { + nlwarning("CGroupHTML with id '%s' not found.", container.c_str()); + } } } }; From c5d8f7b2de2f8ba5a55f86f2849a050b32678d17 Mon Sep 17 00:00:00 2001 From: Nimetu Date: Fri, 14 Feb 2020 11:18:11 +0200 Subject: [PATCH 132/236] Fixed: Invalid table cell id --- code/nel/src/gui/group_html.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/code/nel/src/gui/group_html.cpp b/code/nel/src/gui/group_html.cpp index 166da4719..91adff06f 100644 --- a/code/nel/src/gui/group_html.cpp +++ b/code/nel/src/gui/group_html.cpp @@ -6827,9 +6827,11 @@ namespace NLGUI _Cells.back() = new CGroupCell(CViewBase::TCtorParam()); if (elm.hasNonEmptyAttribute("id")) - _Cells.back()->setId(getCurrentGroup()->getId() + ":TD" + elm.getAttribute("id")); + _Cells.back()->setId(table->getId() + ":" + elm.getAttribute("id")); else - _Cells.back()->setId(getCurrentGroup()->getId() + ":TD" + toString(getNextAutoIdSeq())); + _Cells.back()->setId(table->getId() + ":TD" + toString(getNextAutoIdSeq())); + // inner cell content + _Cells.back()->Group->setId(_Cells.back()->getId() + ":CELL"); if (_Style.checkStyle("background-repeat", "repeat")) _Cells.back()->setTextureTile(true); From ff9aa6c6081a61444cb36a3e79e49c92d0abf084 Mon Sep 17 00:00:00 2001 From: Nimetu Date: Wed, 19 Feb 2020 13:59:53 +0200 Subject: [PATCH 133/236] Add missing PowerRoot effect families to sheetid conversions table. --- .../ryzom/common/src/game_share/effect_families.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/code/ryzom/common/src/game_share/effect_families.cpp b/code/ryzom/common/src/game_share/effect_families.cpp index 8d00cf200..391626393 100644 --- a/code/ryzom/common/src/game_share/effect_families.cpp +++ b/code/ryzom/common/src/game_share/effect_families.cpp @@ -323,6 +323,19 @@ namespace EFFECT_FAMILIES { "thorn_wall_aura.sbrick", PowerThornWall }, { "water_wall_aura.sbrick", PowerWaterWall }, { "lightning_wall_aura.sbrick", PowerLightningWall }, + + { "life_aura.sbrick", PowerRootLifeAura }, + { "stamina_aura.sbrick", PowerRootStaminaAura }, + { "sap_aura.sbrick", PowerRootSapAura }, + { "umbrella_aura.sbrick", PowerRootUmbrella }, + { "melee_protection_aura.sbrick", PowerRootProtection }, + { "anti_magic_shield_aura.sbrick", PowerRootAntiMagicShield }, + { "war_cry_aura.sbrick", PowerRootWarCry }, + { "fire_wall_aura.sbrick", PowerRootFireWall }, + { "thorn_wall_aura.sbrick", PowerRootThornWall }, + { "water_wall_aura.sbrick", PowerRootWaterWall }, + { "lightning_wall_aura.sbrick", PowerRootLightningWall }, + { "chg_charac.sbrick", PowerChgCharac }, { "mod_defense.sbrick", PowerModDefenseSkill }, { "mod_dodge.sbrick", PowerModDodgeSkill }, From e3df74eaeeae2f0a385813a7f14ea9586f411b0b Mon Sep 17 00:00:00 2001 From: Nimetu Date: Sat, 22 Feb 2020 16:11:17 +0200 Subject: [PATCH 134/236] Fixed: Form select option text as value if value attribute is not set. --- code/nel/src/gui/group_html.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/code/nel/src/gui/group_html.cpp b/code/nel/src/gui/group_html.cpp index 91adff06f..8009c5ac8 100644 --- a/code/nel/src/gui/group_html.cpp +++ b/code/nel/src/gui/group_html.cpp @@ -6425,6 +6425,12 @@ namespace NLGUI if (_Forms.empty() || _Forms.back().Entries.empty()) return; + // use option text as value + if (!elm.hasAttribute("value")) + { + _Forms.back().Entries.back().SelectValues.back() = _SelectOptionStr.toUtf8(); + } + // insert the parsed text into the select control CDBGroupComboBox *cb = _Forms.back().Entries.back().ComboBox; if (cb) From af221b7118df1dc7ddb1fbcc308c47f957e1ce89 Mon Sep 17 00:00:00 2001 From: Nimetu Date: Sun, 23 Feb 2020 12:36:24 +0200 Subject: [PATCH 135/236] Changed: More control to extend_over_text layout from xml --- code/nel/src/gui/widget_manager.cpp | 48 ++++++++++++++--------------- 1 file changed, 23 insertions(+), 25 deletions(-) diff --git a/code/nel/src/gui/widget_manager.cpp b/code/nel/src/gui/widget_manager.cpp index b029b117c..282465446 100644 --- a/code/nel/src/gui/widget_manager.cpp +++ b/code/nel/src/gui/widget_manager.cpp @@ -1190,6 +1190,10 @@ namespace NLGUI CViewText *vtDst = dynamic_cast(groupOver->getView("text")); if (vtDst != NULL) { + groupOver->setParentPos(vtSrc); + + sint32 backupX = groupOver->getX(); + // Copy all aspects to the view vtDst->setText (vtSrc->getText()); vtDst->setFontSize (vtSrc->getFontSize()); @@ -1212,42 +1216,36 @@ namespace NLGUI pOutline->setModulateGlobalColor(vtSrc->getModulateGlobalColor()); } - // the group is the position of the overed text, but apply the delta of borders (vtDst X/Y) - sint32 x = vtSrc->getXReal() - vtDst->getX(); - sint32 y = vtSrc->getYReal() - vtDst->getY(); - // update one time only to get correct W/H groupOver->updateCoords (); - if(!vtSrc->isClampRight()) + // align and clamp to screen coords + sint32 x = -backupX; + if (vtSrc->isClampRight()) { - // clamped from the left part - x += vtSrc->getWReal() - vtDst->getWReal(); + x += std::max(0, (groupOver->getXReal() + groupOver->getWReal()) - (groupOver->getParent()->getXReal() + groupOver->getParent()->getWReal())); } + else + { + x += vtDst->getWReal() - vtSrc->getWReal(); + if ( x > (groupOver->getXReal() - groupOver->getParent()->getXReal()) ) + { + x -= x - (groupOver->getXReal() - groupOver->getParent()->getXReal()); + } + } + if (x != 0) groupOver->setX(-x); - // clamp to screen coords, and set - if ((x+groupOver->getW()) > groupOver->getParent()->getWReal()) - x = groupOver->getParent()->getWReal() - groupOver->getW(); - if (x < 0) - x = 0; - if ((y+groupOver->getH()) > groupOver->getParent()->getHReal()) - y = groupOver->getParent()->getHReal() - groupOver->getH(); - if (y < 0) - y = 0; - - // set pos - groupOver->setX (x); - groupOver->setY (y); - - // update coords 3 times is required - groupOver->updateCoords (); - groupOver->updateCoords (); - groupOver->updateCoords (); + // TODO: there should be no overflow on y, unless barely visible and next to screen border + + groupOver->updateCoords(); // draw groupOver->draw (); // flush layers CViewRenderer::getInstance()->flush(); + + // restore backup values + if (x != 0) groupOver->setX(backupX); } } From 1db03005155a512723d698be8b5189f625da1b18 Mon Sep 17 00:00:00 2001 From: Ulukyn Date: Thu, 27 Feb 2020 17:52:55 +0100 Subject: [PATCH 136/236] Added: moveToTarget lua command and OpenArkUrl move action --- .../ryzom/client/src/interface_v3/lua_ihm_ryzom.cpp | 13 +++++++++++++ code/ryzom/client/src/interface_v3/lua_ihm_ryzom.h | 1 + code/ryzom/client/src/user_entity.cpp | 6 +++++- code/ryzom/client/src/user_entity.h | 1 + 4 files changed, 20 insertions(+), 1 deletion(-) diff --git a/code/ryzom/client/src/interface_v3/lua_ihm_ryzom.cpp b/code/ryzom/client/src/interface_v3/lua_ihm_ryzom.cpp index 006d45663..034a914b2 100644 --- a/code/ryzom/client/src/interface_v3/lua_ihm_ryzom.cpp +++ b/code/ryzom/client/src/interface_v3/lua_ihm_ryzom.cpp @@ -464,6 +464,7 @@ void CLuaIHMRyzom::RegisterRyzomFunctions(NLGUI::CLuaState &ls) ls.registerFunc("getTargetName", getTargetName); ls.registerFunc("getTargetTitleRaw", getTargetTitleRaw); ls.registerFunc("getTargetTitle", getTargetTitle); + ls.registerFunc("moveToTarget", moveToTarget); ls.registerFunc("addSearchPathUser", addSearchPathUser); ls.registerFunc("displaySystemInfo", displaySystemInfo); ls.registerFunc("displayChatMessage", displayChatMessage); @@ -1527,6 +1528,18 @@ int CLuaIHMRyzom::getTargetTitle(CLuaState &ls) return 1; } +// *************************************************************************** +int CLuaIHMRyzom::moveToTarget(CLuaState &ls) +{ + CLuaIHM::checkArgCount(ls, "moveToTarget", 0); + CEntityCL *target = getTargetEntity(); + if (!target) return 0; + + UserEntity->moveTo(UserEntity->selection(), 1.0, CUserEntity::OpenArkUrl); + return 0; +} + + // *************************************************************************** int CLuaIHMRyzom::addSearchPathUser(CLuaState &ls) { diff --git a/code/ryzom/client/src/interface_v3/lua_ihm_ryzom.h b/code/ryzom/client/src/interface_v3/lua_ihm_ryzom.h index 529ef8724..78b5a2a00 100644 --- a/code/ryzom/client/src/interface_v3/lua_ihm_ryzom.h +++ b/code/ryzom/client/src/interface_v3/lua_ihm_ryzom.h @@ -92,6 +92,7 @@ private: static int getTargetName(CLuaState &ls); static int getTargetTitleRaw(CLuaState &ls); static int getTargetTitle(CLuaState &ls); + static int moveToTarget(CLuaState &ls); static int addSearchPathUser(CLuaState &ls); static int getClientCfgVar(CLuaState &ls); static int isPlayerFreeTrial(CLuaState &ls); diff --git a/code/ryzom/client/src/user_entity.cpp b/code/ryzom/client/src/user_entity.cpp index fd1670da0..652568255 100644 --- a/code/ryzom/client/src/user_entity.cpp +++ b/code/ryzom/client/src/user_entity.cpp @@ -1682,10 +1682,14 @@ void CUserEntity::moveToAction(CEntityCL *ent) case CUserEntity::Outpost: CLuaManager::getInstance().executeLuaScript("game:outpostBCOpenStateWindow()", 0); break; - // BuildTotem + // BuildTotem case CUserEntity::BuildTotem: buildTotem(); break; + // openArkUrl + case CUserEntity::OpenArkUrl: + CLuaManager::getInstance().executeLuaScript("game:openTargetArkUrl()", 0); + break; default: break; } diff --git a/code/ryzom/client/src/user_entity.h b/code/ryzom/client/src/user_entity.h index e240622c9..194ba931f 100644 --- a/code/ryzom/client/src/user_entity.h +++ b/code/ryzom/client/src/user_entity.h @@ -95,6 +95,7 @@ public: Outpost, BuildTotem, MissionRing, + OpenArkUrl, }; public: From 4df2489f5996afbca76bbd9cd0fe2af7f5b42b45 Mon Sep 17 00:00:00 2001 From: Ulukyn Date: Thu, 27 Feb 2020 22:33:09 +0100 Subject: [PATCH 137/236] Changed: updated way to moveToTarget --- code/ryzom/client/src/interface_v3/lua_ihm_ryzom.cpp | 8 ++++++-- code/ryzom/client/src/user_entity.cpp | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/code/ryzom/client/src/interface_v3/lua_ihm_ryzom.cpp b/code/ryzom/client/src/interface_v3/lua_ihm_ryzom.cpp index 034a914b2..f83bd7dea 100644 --- a/code/ryzom/client/src/interface_v3/lua_ihm_ryzom.cpp +++ b/code/ryzom/client/src/interface_v3/lua_ihm_ryzom.cpp @@ -1531,10 +1531,14 @@ int CLuaIHMRyzom::getTargetTitle(CLuaState &ls) // *************************************************************************** int CLuaIHMRyzom::moveToTarget(CLuaState &ls) { - CLuaIHM::checkArgCount(ls, "moveToTarget", 0); + CLuaIHM::checkArgCount(ls, "moveToTarget", 1); + CLuaIHM::checkArgType(ls, "url", 1, LUA_TSTRING); + + const std::string &url = ls.toString(1); CEntityCL *target = getTargetEntity(); if (!target) return 0; - + + CLuaManager::getInstance().executeLuaScript("ArkTargetUrl = [["+url+"]]", 0); UserEntity->moveTo(UserEntity->selection(), 1.0, CUserEntity::OpenArkUrl); return 0; } diff --git a/code/ryzom/client/src/user_entity.cpp b/code/ryzom/client/src/user_entity.cpp index 652568255..67a31770f 100644 --- a/code/ryzom/client/src/user_entity.cpp +++ b/code/ryzom/client/src/user_entity.cpp @@ -1688,7 +1688,7 @@ void CUserEntity::moveToAction(CEntityCL *ent) break; // openArkUrl case CUserEntity::OpenArkUrl: - CLuaManager::getInstance().executeLuaScript("game:openTargetArkUrl()", 0); + CLuaManager::getInstance().executeLuaScript("getUI('ui:interface:web_transactions'):find('html'):browse(ArkTargetUrl)", 0); break; default: break; From 90dcb7257f4a5c0eb1a183a7d88756fa7c512e5d Mon Sep 17 00:00:00 2001 From: Nimetu Date: Tue, 3 Mar 2020 00:47:05 +0200 Subject: [PATCH 138/236] Added: Window snap --- code/nel/include/nel/gui/event_descriptor.h | 27 ++++- code/nel/include/nel/gui/widget_manager.h | 14 +++ code/nel/src/gui/group_container.cpp | 2 + code/nel/src/gui/widget_manager.cpp | 121 ++++++++++++++++++++ code/ryzom/client/client_default.cfg | 3 + code/ryzom/client/src/client_cfg.cpp | 5 + code/ryzom/client/src/client_cfg.h | 4 + code/ryzom/client/src/init.cpp | 3 + 8 files changed, 178 insertions(+), 1 deletion(-) diff --git a/code/nel/include/nel/gui/event_descriptor.h b/code/nel/include/nel/gui/event_descriptor.h index 276979fdd..95bdad212 100644 --- a/code/nel/include/nel/gui/event_descriptor.h +++ b/code/nel/include/nel/gui/event_descriptor.h @@ -63,7 +63,7 @@ public: keystring, // a string has been sent. The string is a ucstring unknown, // uninitialized event }; - CEventDescriptorKey() : _KeyEvent(unknown) + CEventDescriptorKey() : _KeyEvent(unknown), _CtrlState(false), _ShiftState(false), _AltState(false), _Char(0) { _EventType = key; } @@ -105,6 +105,31 @@ public: { return _AltState; } + + // return true if key was pressed or held down at a time of this event + bool isShiftDown() + { + return (_KeyEvent == CEventDescriptorKey::keydown && (_Key == NLMISC::KeySHIFT || _ShiftState)) + || (_KeyEvent == CEventDescriptorKey::keyup && (_Key != NLMISC::KeySHIFT && _ShiftState)) + || (_KeyEvent == CEventDescriptorKey::keychar && _ShiftState); + } + + // return true if key was pressed or held down at a time of this event + bool isCtrlDown() + { + return (_KeyEvent == CEventDescriptorKey::keydown && (_Key == NLMISC::KeyCONTROL || _CtrlState)) + || (_KeyEvent == CEventDescriptorKey::keyup && (_Key != NLMISC::KeyCONTROL && _CtrlState)) + || (_KeyEvent == CEventDescriptorKey::keychar && _CtrlState); + } + + // return true if key was pressed or held down at a time of this event + bool isAltDown() + { + return (_KeyEvent == CEventDescriptorKey::keydown && (_Key == NLMISC::KeyMENU || _AltState)) + || (_KeyEvent == CEventDescriptorKey::keyup && (_Key != NLMISC::KeyMENU && _AltState)) + || (_KeyEvent == CEventDescriptorKey::keychar && _AltState); + } + // init from a CEventKey obj void init(const NLMISC::CEventKey &ev); diff --git a/code/nel/include/nel/gui/widget_manager.h b/code/nel/include/nel/gui/widget_manager.h index 773c3198b..fced74024 100644 --- a/code/nel/include/nel/gui/widget_manager.h +++ b/code/nel/include/nel/gui/widget_manager.h @@ -269,6 +269,14 @@ namespace NLGUI CViewPointerBase* getPointer(){ return _Pointer; } void setPointer( CViewPointerBase *pointer ){ _Pointer = pointer; } + // If > 0, snap window to others closer than distance + void setWindowSnapDistance(uint32 d) { _WindowSnapDistance = d; } + uint32 getWindowSnapDistance() const { return _WindowSnapDistance; } + + // If true, only snap when shift is held down + void setWindowSnapInvert(bool b) { _WindowSnapInvert = b; } + bool getWindowSnapInvert() const { return _WindowSnapInvert; } + /** * get the window under a spot * \param : X coord of the spot @@ -310,6 +318,9 @@ namespace NLGUI void drawOverExtendViewText(); + // Snap to closest visible window border if snapping is enabled + void snapIfClose(CInterfaceGroup *group); + // Internal : adjust a tooltip with respect to its parent. Returns the number of coordinate that were clamped // against the screen border uint adjustTooltipPosition( CCtrlBase *newCtrl, CInterfaceGroup *win, THotSpot ttParentRef, @@ -624,6 +635,9 @@ namespace NLGUI CEventDescriptorKey lastKeyEvent; + uint32 _WindowSnapDistance; + bool _WindowSnapInvert; + uint32 _ScreenH; uint32 _ScreenW; float _InterfaceScale; diff --git a/code/nel/src/gui/group_container.cpp b/code/nel/src/gui/group_container.cpp index b642a50b5..87fb59c38 100644 --- a/code/nel/src/gui/group_container.cpp +++ b/code/nel/src/gui/group_container.cpp @@ -819,6 +819,8 @@ namespace NLGUI _Parent->setX(x); _Parent->setY(y); + CWidgetManager::getInstance()->snapIfClose(_Parent); + // if some action handler to call when moving if(gc->getAHOnMovePtr()) { diff --git a/code/nel/src/gui/widget_manager.cpp b/code/nel/src/gui/widget_manager.cpp index 282465446..c0a6a4c85 100644 --- a/code/nel/src/gui/widget_manager.cpp +++ b/code/nel/src/gui/widget_manager.cpp @@ -1254,7 +1254,125 @@ namespace NLGUI } } + // ---------------------------------------------------------------------------- + void CWidgetManager::snapIfClose(CInterfaceGroup *group) + { + if (!group || _WindowSnapDistance == 0 || _WindowSnapInvert != lastKeyEvent.isShiftDown()) + return; + + uint hsnap = _WindowSnapDistance; + uint vsnap = _WindowSnapDistance; + + sint32 newX = group->getX(); + sint32 newY = group->getY(); + + // new coords for window without snap + // used to calculate distance from target + sint gLeft = newX; + sint gRight = newX + group->getWReal(); + sint gTop = newY; + sint gBottom = newY - group->getHReal(); + + // current window coords as if already snaped + // used to calculate target for snap + sint gLeftR = group->getXReal(); + sint gRightR = gLeftR + group->getWReal(); + sint gBottomR = group->getYReal(); + sint gTopR = gBottomR + group->getHReal(); + for (uint32 nMasterGroup = 0; nMasterGroup < _MasterGroups.size(); nMasterGroup++) + { + CWidgetManager::SMasterGroup &rMG = _MasterGroups[nMasterGroup]; + if (!rMG.Group->getActive()) continue; + + for (uint8 nPriority = WIN_PRIORITY_MAX; nPriority > 0 ; nPriority--) + { + const std::list &rList = rMG.PrioritizedWindows[nPriority-1]; + std::list::const_reverse_iterator itw; + for (itw = rList.rbegin(); itw != rList.rend(); itw++) + { + CInterfaceGroup *pIG = *itw; + // do not snap to self, inactive, or not using mouse interaction + if (group == pIG || !(pIG->getActive() && pIG->getUseCursor())) + continue; + + // target + sint wLeft = pIG->getXReal(); + sint wRight = pIG->getXReal() + pIG->getWReal(); + sint wTop = pIG->getYReal() + pIG->getHReal(); + sint wBottom = pIG->getYReal(); + sint delta; + + if (gTopR >= wBottom && gBottomR <= wTop) + { + delta = abs(gRight - wLeft); + if (delta <= hsnap) + { + hsnap = delta; + newX = wLeft - group->getWReal(); + } + + delta = abs(gLeft - wRight); + if (delta <= hsnap) + { + hsnap = delta; + newX = wRight; + } + + delta = abs(gLeft - wLeft); + if (delta <= hsnap) + { + hsnap = delta; + newX = wLeft; + } + + delta = abs(gRight - wRight); + if (delta <= hsnap) + { + hsnap = delta; + newX = wRight - group->getWReal(); + } + } + + if (gLeftR <= wRight && gRightR >= wLeft) + { + delta = abs(gTop - wBottom); + if (delta <= vsnap) + { + vsnap = delta; + newY = wBottom; + } + + delta = abs(gBottom - wTop); + if (delta <= vsnap) + { + vsnap = delta; + newY = wTop + group->getHReal(); + } + + delta = abs(gTop - wTop); + if (delta <= vsnap) + { + vsnap = delta; + newY = wTop; + } + + delta = abs(gBottom - wBottom); + if (delta <= vsnap) + { + vsnap = delta; + newY = wBottom + group->getHReal(); + } + } + }//windows + }//priority + }//master group + + group->setX(newX); + group->setY(newY); + } + + // ---------------------------------------------------------------------------- uint CWidgetManager::adjustTooltipPosition( CCtrlBase *newCtrl, CInterfaceGroup *win, THotSpot ttParentRef, THotSpot ttPosRef, sint32 xParent, sint32 yParent, sint32 wParent, sint32 hParent ) @@ -3771,6 +3889,9 @@ namespace NLGUI setScreenWH(0, 0); _InterfaceScale = 1.0f; + _WindowSnapDistance = 10; + _WindowSnapInvert = false; + _GroupSelection = false; multiSelection = false; _WidgetCount = 0; diff --git a/code/ryzom/client/client_default.cfg b/code/ryzom/client/client_default.cfg index 501e0097d..7d134ad01 100644 --- a/code/ryzom/client/client_default.cfg +++ b/code/ryzom/client/client_default.cfg @@ -336,6 +336,9 @@ BilinearUI = 1; MaxMapScale = 2.0; R2EDMaxMapScale = 8.0; +WindowSnapInvert = 0; +WindowSnapDistance = 10; + ////////////////// // SOUND CONFIG // ////////////////// diff --git a/code/ryzom/client/src/client_cfg.cpp b/code/ryzom/client/src/client_cfg.cpp index a315a52a9..985f052db 100644 --- a/code/ryzom/client/src/client_cfg.cpp +++ b/code/ryzom/client/src/client_cfg.cpp @@ -316,6 +316,9 @@ CClientConfig::CClientConfig() InterfaceScale_step = 0.05; BilinearUI = true; + WindowSnapInvert = false; + WindowSnapDistance = 10; + VREnable = false; VRDisplayDevice = "Auto"; VRDisplayDeviceId = ""; @@ -866,6 +869,8 @@ void CClientConfig::setValues() READ_FLOAT_FV(InterfaceScale_step); clamp(ClientCfg.InterfaceScale, ClientCfg.InterfaceScale_min, ClientCfg.InterfaceScale_max); READ_BOOL_FV(BilinearUI); + READ_BOOL_FV(WindowSnapInvert); + READ_INT_FV(WindowSnapDistance); // 3D Driver varPtr = ClientCfg.ConfigFile.getVarPtr ("Driver3D"); if (varPtr) diff --git a/code/ryzom/client/src/client_cfg.h b/code/ryzom/client/src/client_cfg.h index 33d1d01e0..a5eff6883 100644 --- a/code/ryzom/client/src/client_cfg.h +++ b/code/ryzom/client/src/client_cfg.h @@ -157,6 +157,10 @@ struct CClientConfig float InterfaceScale_step; bool BilinearUI; + // Window snap + bool WindowSnapInvert; + uint32 WindowSnapDistance; + // VR bool VREnable; std::string VRDisplayDevice; diff --git a/code/ryzom/client/src/init.cpp b/code/ryzom/client/src/init.cpp index 2f6702e4d..1deacd146 100644 --- a/code/ryzom/client/src/init.cpp +++ b/code/ryzom/client/src/init.cpp @@ -1354,6 +1354,9 @@ void prelogInit() CViewRenderer::getInstance()->setInterfaceScale(1.0f, 1024, 768); CViewRenderer::getInstance()->setBilinearFiltering(ClientCfg.BilinearUI); + CWidgetManager::getInstance()->setWindowSnapInvert(ClientCfg.WindowSnapInvert); + CWidgetManager::getInstance()->setWindowSnapDistance(ClientCfg.WindowSnapDistance); + // Yoyo: initialize NOW the InputHandler for Event filtering. CInputHandlerManager *InputHandlerManager = CInputHandlerManager::getInstance(); InputHandlerManager->addToServer (&Driver->EventServer); From 3b08d50b8377f5a54d45c8af14671eacc3026854 Mon Sep 17 00:00:00 2001 From: Nimetu Date: Fri, 6 Mar 2020 15:28:58 +0200 Subject: [PATCH 139/236] Fixed: Scroll bar losing position when group window is minimized --- code/nel/src/gui/ctrl_scroll.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/nel/src/gui/ctrl_scroll.cpp b/code/nel/src/gui/ctrl_scroll.cpp index 06d3afe33..efa467acb 100644 --- a/code/nel/src/gui/ctrl_scroll.cpp +++ b/code/nel/src/gui/ctrl_scroll.cpp @@ -45,7 +45,7 @@ namespace NLGUI _Aligned = 1; _TrackPos = 0; _TrackDispPos = 0; - _TrackSize = _TrackSizeMin = 16; + _TrackSize = _TrackSizeMin = 8; _Min = 0; _Max = 100; _Value = 0; From 0078df9593bc33fce822fad01350da2f6f4ba938 Mon Sep 17 00:00:00 2001 From: Nimetu Date: Fri, 6 Mar 2020 15:28:58 +0200 Subject: [PATCH 140/236] Fixed: Scroll bar losing position when group window is minimized --- code/nel/src/gui/ctrl_scroll.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/nel/src/gui/ctrl_scroll.cpp b/code/nel/src/gui/ctrl_scroll.cpp index 124655264..df45b428f 100644 --- a/code/nel/src/gui/ctrl_scroll.cpp +++ b/code/nel/src/gui/ctrl_scroll.cpp @@ -49,7 +49,7 @@ namespace NLGUI _Aligned = 1; _TrackPos = 0; _TrackDispPos = 0; - _TrackSize = _TrackSizeMin = 16; + _TrackSize = _TrackSizeMin = 8; _Min = 0; _Max = 100; _Value = 0; From 1337908369766e491376d50a73419cb58ac76eb6 Mon Sep 17 00:00:00 2001 From: Nimetu Date: Sat, 7 Mar 2020 11:27:00 +0200 Subject: [PATCH 141/236] Changed: systemMessageBox on linux/macOS to non-blocking, log only --- code/nel/src/3d/driver/opengl/driver_opengl_window.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/code/nel/src/3d/driver/opengl/driver_opengl_window.cpp b/code/nel/src/3d/driver/opengl/driver_opengl_window.cpp index de330117c..2ab5a3aba 100644 --- a/code/nel/src/3d/driver/opengl/driver_opengl_window.cpp +++ b/code/nel/src/3d/driver/opengl/driver_opengl_window.cpp @@ -2681,8 +2681,11 @@ IDriver::TMessageBoxId CDriverGL::systemMessageBox (const char* message, const c } nlstop; #else // NL_OS_WINDOWS - // Call the console version! - IDriver::systemMessageBox (message, title, type, icon); + // TODO: if user did not launch from console, then program "freezes" without explanation or possibility to continue + //IDriver::systemMessageBox (message, title, type, icon); + // log only + printf("%s:%s\n", title, message); + nlwarning("%s: %s", title, message); #endif // NL_OS_WINDOWS return okId; } From 0bec2ee2ffc4ef160b5eaf8cbf7c4d367bd13723 Mon Sep 17 00:00:00 2001 From: Nimetu Date: Thu, 5 Mar 2020 15:00:33 +0200 Subject: [PATCH 142/236] Changed: Ignore setMousePos if window does not have input focus. --- .../src/3d/driver/opengl/driver_opengl.cpp | 1 + code/nel/src/3d/driver/opengl/driver_opengl.h | 1 + .../3d/driver/opengl/driver_opengl_inputs.cpp | 9 ++++++++- .../3d/driver/opengl/driver_opengl_window.cpp | 19 +++++++++++++++++++ 4 files changed, 29 insertions(+), 1 deletion(-) diff --git a/code/nel/src/3d/driver/opengl/driver_opengl.cpp b/code/nel/src/3d/driver/opengl/driver_opengl.cpp index c5d7b1d05..90b17958f 100644 --- a/code/nel/src/3d/driver/opengl/driver_opengl.cpp +++ b/code/nel/src/3d/driver/opengl/driver_opengl.cpp @@ -234,6 +234,7 @@ CDriverGL::CDriverGL() _win = EmptyWindow; _WindowX = 0; _WindowY = 0; + _WindowFocus = true; _WindowVisible = true; _DestroyWindow = false; _Maximized = false; diff --git a/code/nel/src/3d/driver/opengl/driver_opengl.h b/code/nel/src/3d/driver/opengl/driver_opengl.h index e9aa2e905..9bd19b14d 100644 --- a/code/nel/src/3d/driver/opengl/driver_opengl.h +++ b/code/nel/src/3d/driver/opengl/driver_opengl.h @@ -723,6 +723,7 @@ private: bool _Maximized; uint _Interval; bool _Resizable; + bool _WindowFocus; sint32 _DecorationWidth; sint32 _DecorationHeight; diff --git a/code/nel/src/3d/driver/opengl/driver_opengl_inputs.cpp b/code/nel/src/3d/driver/opengl/driver_opengl_inputs.cpp index 0d27166fc..3ede88b41 100644 --- a/code/nel/src/3d/driver/opengl/driver_opengl_inputs.cpp +++ b/code/nel/src/3d/driver/opengl/driver_opengl_inputs.cpp @@ -509,7 +509,7 @@ void CDriverGL::setMousePos(float x, float y) { H_AUTO_OGL(CDriverGL_setMousePos) - if (_win == EmptyWindow) + if (_win == EmptyWindow || !_WindowFocus) return; sint x1 = (sint)((float)_CurrentMode.Width*x); @@ -612,6 +612,7 @@ bool CDriverGL::isSystemCursorInClientArea() #ifdef NL_OS_WINDOWS return IsWindowVisible(_win) != FALSE; #endif + return _WindowFocus; } else { @@ -650,7 +651,13 @@ bool CDriverGL::isSystemCursorInClientArea() { return false; } +#elif defined(NL_OS_MAC) + // TODO: implement this +#elif defined (NL_OS_UNIX) + // TODO: implement this #endif + // TODO: probably wrong if NeL window is docked inside parent (ie QT widget) + return _WindowFocus; } return true; diff --git a/code/nel/src/3d/driver/opengl/driver_opengl_window.cpp b/code/nel/src/3d/driver/opengl/driver_opengl_window.cpp index 2ab5a3aba..293cb28bb 100644 --- a/code/nel/src/3d/driver/opengl/driver_opengl_window.cpp +++ b/code/nel/src/3d/driver/opengl/driver_opengl_window.cpp @@ -106,6 +106,13 @@ bool GlWndProc(CDriverGL *driver, HWND hWnd, UINT message, WPARAM wParam, LPARAM driver->_WndActive = true; } } + else if ((message == WM_SETFOCUS) || (message == WM_KILLFOCUS)) + { + if (driver != NULL) + { + driver->_WindowFocus = (message == WM_SETFOCUS); + } + } bool trapMessage = false; if (driver->_EventEmitter.getNumEmitters() > 0) @@ -291,6 +298,18 @@ bool GlWndProc(CDriverGL *driver, XEvent &e) break; + case FocusIn: + { + driver->_WindowFocus = true; + return driver->_EventEmitter.processMessage(e); + } + + case FocusOut: + { + driver->_WindowFocus = false; + return driver->_EventEmitter.processMessage(e); + } + default: // Process the message by the emitter From dccbb376a0f41d2b77aeb0f4be93468fe5fdc7a1 Mon Sep 17 00:00:00 2001 From: Nimetu Date: Fri, 6 Mar 2020 10:29:49 +0200 Subject: [PATCH 143/236] Changed: Windows focus events in Direct3d --- code/nel/src/3d/driver/direct3d/driver_direct3d.cpp | 10 ++++++++++ code/nel/src/3d/driver/direct3d/driver_direct3d.h | 1 + .../src/3d/driver/direct3d/driver_direct3d_inputs.cpp | 2 +- 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/code/nel/src/3d/driver/direct3d/driver_direct3d.cpp b/code/nel/src/3d/driver/direct3d/driver_direct3d.cpp index 691be14df..1ab29c3a0 100644 --- a/code/nel/src/3d/driver/direct3d/driver_direct3d.cpp +++ b/code/nel/src/3d/driver/direct3d/driver_direct3d.cpp @@ -197,6 +197,7 @@ CDriverD3D::CDriverD3D() _BackBuffer = NULL; _Maximized = false; _HandlePossibleSizeChangeNextSize = false; + _WindowFocus = true; _Interval = 1; _AGPMemoryAllocated = 0; _VRAMMemoryAllocated = 0; @@ -1164,6 +1165,14 @@ void D3DWndProc(CDriverD3D *driver, HWND hWnd, UINT message, WPARAM wParam, LPAR } } + if ((message == WM_SETFOCUS) || (message == WM_KILLFOCUS)) + { + if (driver != NULL) + { + driver->_WindowFocus = (message == WM_SETFOCUS); + } + } + if (driver->_EventEmitter.getNumEmitters() > 0) { CWinEventEmitter *we = NLMISC::safe_cast(driver->_EventEmitter.getEmitter(0)); @@ -1370,6 +1379,7 @@ bool CDriverD3D::setDisplay(nlWindow wnd, const GfxMode& mode, bool show, bool r // Reset window state _Maximized = false; _HandlePossibleSizeChangeNextSize = false; + _WindowFocus = true; if (_HWnd) { diff --git a/code/nel/src/3d/driver/direct3d/driver_direct3d.h b/code/nel/src/3d/driver/direct3d/driver_direct3d.h index 8f8048368..636695670 100644 --- a/code/nel/src/3d/driver/direct3d/driver_direct3d.h +++ b/code/nel/src/3d/driver/direct3d/driver_direct3d.h @@ -2324,6 +2324,7 @@ private: sint32 _WindowY; bool _DestroyWindow; bool _Maximized; + bool _WindowFocus; bool _HandlePossibleSizeChangeNextSize; GfxMode _CurrentMode; uint _Interval; diff --git a/code/nel/src/3d/driver/direct3d/driver_direct3d_inputs.cpp b/code/nel/src/3d/driver/direct3d/driver_direct3d_inputs.cpp index d26741faf..d5b4ef482 100644 --- a/code/nel/src/3d/driver/direct3d/driver_direct3d_inputs.cpp +++ b/code/nel/src/3d/driver/direct3d/driver_direct3d_inputs.cpp @@ -374,7 +374,7 @@ void CDriverD3D::setMousePos(float x, float y) { H_AUTO_D3D(CDriverD3D_setMousePos); - if (_HWnd == EmptyWindow) + if (_HWnd == EmptyWindow || !_WindowFocus) return; // convert position size from float to pixels From 9c46a9d8f780e3e670d283f4faf075888f398aaa Mon Sep 17 00:00:00 2001 From: Nimetu Date: Fri, 6 Mar 2020 10:23:39 +0200 Subject: [PATCH 144/236] Changed: Windows focus events on macOS --- code/nel/src/3d/driver/opengl/driver_opengl.h | 2 +- .../3d/driver/opengl/mac/cocoa_window_delegate.h | 2 ++ .../3d/driver/opengl/mac/cocoa_window_delegate.mm | 15 +++++++++++++++ 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/code/nel/src/3d/driver/opengl/driver_opengl.h b/code/nel/src/3d/driver/opengl/driver_opengl.h index 9bd19b14d..e1ee968a5 100644 --- a/code/nel/src/3d/driver/opengl/driver_opengl.h +++ b/code/nel/src/3d/driver/opengl/driver_opengl.h @@ -700,6 +700,7 @@ public: GfxMode _CurrentMode; sint32 _WindowX; sint32 _WindowY; + bool _WindowFocus; #ifdef NL_OS_MAC NLMISC::CCocoaEventEmitter _EventEmitter; @@ -723,7 +724,6 @@ private: bool _Maximized; uint _Interval; bool _Resizable; - bool _WindowFocus; sint32 _DecorationWidth; sint32 _DecorationHeight; diff --git a/code/nel/src/3d/driver/opengl/mac/cocoa_window_delegate.h b/code/nel/src/3d/driver/opengl/mac/cocoa_window_delegate.h index 9736e2a27..1e9881b47 100644 --- a/code/nel/src/3d/driver/opengl/mac/cocoa_window_delegate.h +++ b/code/nel/src/3d/driver/opengl/mac/cocoa_window_delegate.h @@ -40,5 +40,7 @@ using NL3D::CDriverGL; - (id)initWithDriver:(CDriverGL*)driver; - (void)windowDidMove:(NSNotification*)notification; +- (void)windowDidBecomeKey:(NSNotification *)notification; +- (void)windowDidResignKey:(NSNotification *)notification; @end diff --git a/code/nel/src/3d/driver/opengl/mac/cocoa_window_delegate.mm b/code/nel/src/3d/driver/opengl/mac/cocoa_window_delegate.mm index 2e5faf852..44031f7aa 100644 --- a/code/nel/src/3d/driver/opengl/mac/cocoa_window_delegate.mm +++ b/code/nel/src/3d/driver/opengl/mac/cocoa_window_delegate.mm @@ -55,4 +55,19 @@ static void windowDidMove(NSWindow* window, CDriverGL* driver) windowDidMove([notification object], _driver); } +- (void)windowDidBecomeKey:(NSNotification *)notification +{ + if (!_driver) + return; + + _driver->_WindowFocus = true; +} +- (void)windowDidResignKey:(NSNotification *)notification; +{ + if(!_driver) + return; + + _driver->_WindowFocus = false; +} + @end From 3220a2aa4746107325a094893392d0ac93c907cd Mon Sep 17 00:00:00 2001 From: Ulukyn Date: Tue, 10 Mar 2020 16:08:55 +0100 Subject: [PATCH 145/236] Changed: new name of Enclyclopedia window --- .../client/src/interface_v3/encyclopedia_manager.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/code/ryzom/client/src/interface_v3/encyclopedia_manager.h b/code/ryzom/client/src/interface_v3/encyclopedia_manager.h index dc5e97651..b1b589b16 100644 --- a/code/ryzom/client/src/interface_v3/encyclopedia_manager.h +++ b/code/ryzom/client/src/interface_v3/encyclopedia_manager.h @@ -77,11 +77,11 @@ private: bool _Initializing; }; -#define CONT_ENCY "ui:interface:encyclopedia" -#define LIST_ENCY_ALBUM "ui:interface:encyclopedia:content:sbtree:tree_list" -#define PAGE_ENCY_ALBUM "ui:interface:encyclopedia:content:album" -#define PAGE_ENCY_THEMA "ui:interface:encyclopedia:content:theme" -#define PAGE_ENCY_HELP "ui:interface:encyclopedia:content:help" +#define CONT_ENCY "ui:interface:legacy_encyclopedia" +#define LIST_ENCY_ALBUM "ui:interface:legacy_encyclopedia:content:sbtree:tree_list" +#define PAGE_ENCY_ALBUM "ui:interface:legacy_encyclopedia:content:album" +#define PAGE_ENCY_THEMA "ui:interface:legacy_encyclopedia:content:theme" +#define PAGE_ENCY_HELP "ui:interface:legacy_encyclopedia:content:help" #endif // RY_ENCYCLOPEDIA_MANAGER_H From 8f3aaee987a8927712f59164ef84f2996418ea6f Mon Sep 17 00:00:00 2001 From: Ulukyn Date: Tue, 10 Mar 2020 16:08:55 +0100 Subject: [PATCH 146/236] Changed: new name of Enclyclopedia window --- .../client/src/interface_v3/encyclopedia_manager.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/code/ryzom/client/src/interface_v3/encyclopedia_manager.h b/code/ryzom/client/src/interface_v3/encyclopedia_manager.h index dc5e97651..b1b589b16 100644 --- a/code/ryzom/client/src/interface_v3/encyclopedia_manager.h +++ b/code/ryzom/client/src/interface_v3/encyclopedia_manager.h @@ -77,11 +77,11 @@ private: bool _Initializing; }; -#define CONT_ENCY "ui:interface:encyclopedia" -#define LIST_ENCY_ALBUM "ui:interface:encyclopedia:content:sbtree:tree_list" -#define PAGE_ENCY_ALBUM "ui:interface:encyclopedia:content:album" -#define PAGE_ENCY_THEMA "ui:interface:encyclopedia:content:theme" -#define PAGE_ENCY_HELP "ui:interface:encyclopedia:content:help" +#define CONT_ENCY "ui:interface:legacy_encyclopedia" +#define LIST_ENCY_ALBUM "ui:interface:legacy_encyclopedia:content:sbtree:tree_list" +#define PAGE_ENCY_ALBUM "ui:interface:legacy_encyclopedia:content:album" +#define PAGE_ENCY_THEMA "ui:interface:legacy_encyclopedia:content:theme" +#define PAGE_ENCY_HELP "ui:interface:legacy_encyclopedia:content:help" #endif // RY_ENCYCLOPEDIA_MANAGER_H From 1f736fc347957fe42ede0f54acddebe2a9e0f2fa Mon Sep 17 00:00:00 2001 From: Nimetu Date: Fri, 6 Mar 2020 15:28:58 +0200 Subject: [PATCH 147/236] Fixed: Scroll bar losing position when group window is minimized --- code/nel/src/gui/ctrl_scroll.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/nel/src/gui/ctrl_scroll.cpp b/code/nel/src/gui/ctrl_scroll.cpp index e97bd8cd4..a940f6561 100644 --- a/code/nel/src/gui/ctrl_scroll.cpp +++ b/code/nel/src/gui/ctrl_scroll.cpp @@ -45,7 +45,7 @@ namespace NLGUI _Aligned = 1; _TrackPos = 0; _TrackDispPos = 0; - _TrackSize = _TrackSizeMin = 16; + _TrackSize = _TrackSizeMin = 8; _Min = 0; _Max = 100; _Value = 0; From f853adfcbaba3b93d48d5f6e902aafd66de231e3 Mon Sep 17 00:00:00 2001 From: Nimetu Date: Sat, 14 Mar 2020 01:23:38 +0200 Subject: [PATCH 148/236] Changed: show/hide rp_logo_x icons depending if texture is set or not --- .../interface_v3/group_in_scene_user_info.cpp | 33 +++++++++++-------- 1 file changed, 20 insertions(+), 13 deletions(-) diff --git a/code/ryzom/client/src/interface_v3/group_in_scene_user_info.cpp b/code/ryzom/client/src/interface_v3/group_in_scene_user_info.cpp index 53cddc93b..d36618a9f 100644 --- a/code/ryzom/client/src/interface_v3/group_in_scene_user_info.cpp +++ b/code/ryzom/client/src/interface_v3/group_in_scene_user_info.cpp @@ -461,22 +461,29 @@ CGroupInSceneUserInfo *CGroupInSceneUserInfo::build (CEntityCL *entity) if (rpTags) { CPlayerCL * pPlayer = dynamic_cast(entity); - CViewBitmap *bitmap; + CViewBitmap *rp1 = dynamic_cast(leftGroup->getView ("rp_logo_1")); + CViewBitmap *rp2 = dynamic_cast(leftGroup->getView ("rp_logo_2")); + CViewBitmap *rp3 = dynamic_cast(leftGroup->getView ("rp_logo_3")); + CViewBitmap *rp4 = dynamic_cast(leftGroup->getView ("rp_logo_4")); + if (pPlayer == NULL || (pPlayer != NULL && pPlayer->getPvpMode() & PVP_MODE::PvpFaction)) { - bitmap = dynamic_cast(leftGroup->getView ("rp_logo_1")); - if (bitmap) - bitmap->setTexture(entityTag1.toString()); - bitmap = dynamic_cast(leftGroup->getView ("rp_logo_2")); - if (bitmap) - bitmap->setTexture(entityTag2.toString()); + if (rp1) rp1->setTexture(entityTag1.toString()); + if (rp2) rp2->setTexture(entityTag2.toString()); + } + else + { + entityTag1.clear(); + entityTag2.clear(); } - bitmap = dynamic_cast(leftGroup->getView ("rp_logo_3")); - if (bitmap) - bitmap->setTexture(entityTag3.toString()); - bitmap = dynamic_cast(leftGroup->getView ("rp_logo_4")); - if (bitmap) - bitmap->setTexture(entityTag4.toString()); + if (rp3) rp3->setTexture(entityTag3.toString()); + if (rp4) rp4->setTexture(entityTag4.toString()); + + // hide if texture is empty + if (rp1) rp1->setActive(!entityTag1.empty()); + if (rp2) rp2->setActive(!entityTag2.empty()); + if (rp3) rp3->setActive(!entityTag3.empty()); + if (rp4) rp4->setActive(!entityTag4.empty()); } // Get the permanent content bitmap From 2ebe1c2a3dd8d452f3d2b164ae2e1dc8feb92d1d Mon Sep 17 00:00:00 2001 From: kaetemi Date: Mon, 16 Mar 2020 01:43:19 +0800 Subject: [PATCH 149/236] Clean up analysis warnings --- code/nel/include/nel/3d/landscape.h | 4 ++-- code/nel/include/nel/misc/common.h | 4 ++-- code/nel/include/nel/misc/debug.h | 35 +++++++++++++++++++++-------- code/nel/include/nel/misc/file.h | 2 +- code/nel/include/nel/misc/stream.h | 2 +- 5 files changed, 32 insertions(+), 15 deletions(-) diff --git a/code/nel/include/nel/3d/landscape.h b/code/nel/include/nel/3d/landscape.h index a7383963d..f6e1a5861 100644 --- a/code/nel/include/nel/3d/landscape.h +++ b/code/nel/include/nel/3d/landscape.h @@ -100,8 +100,8 @@ public: public: EBadBind() {} - ~EBadBind() throw () {} - virtual const char *what() const throw(); + virtual ~EBadBind() NL_OVERRIDE {} + virtual const char *what() const throw() NL_OVERRIDE; }; diff --git a/code/nel/include/nel/misc/common.h b/code/nel/include/nel/misc/common.h index f5f99ea6a..a5d1b2f27 100644 --- a/code/nel/include/nel/misc/common.h +++ b/code/nel/include/nel/misc/common.h @@ -368,8 +368,8 @@ public: Exception(); Exception(const std::string &reason); Exception(const char *format, ...); - virtual ~Exception() throw() {} - virtual const char *what() const throw(); + virtual ~Exception() NL_OVERRIDE {} + virtual const char *what() const throw() NL_OVERRIDE; }; diff --git a/code/nel/include/nel/misc/debug.h b/code/nel/include/nel/misc/debug.h index 668c2e5a3..7d4ddcd1b 100644 --- a/code/nel/include/nel/misc/debug.h +++ b/code/nel/include/nel/misc/debug.h @@ -368,13 +368,19 @@ extern bool _assertex_stop_1(bool &ignoreNextTime); // removed because we always check assert (even in release mode) #if defined(NL_DEBUG) +#if defined(_MSC_VER) && _MSC_VER >= 1900 +#define nlassume(exp) do { __analysis_assume(exp); } while (0) // __analysis_assume doesn't evaluate the expression at runtime +#else +#define nlassume(exp) do { ) while (0) +#endif + #ifdef NL_NO_DEBUG -# define nlassert(exp) if(false) -# define nlassertonce(exp) if(false) -# define nlassertex(exp, str) if(false) -# define nlverify(exp) { exp; } -# define nlverifyonce(exp) { exp; } -# define nlverifyex(exp, str) { exp; } +# define nlassert(exp) nlassume(exp) +# define nlassertonce(exp) nlassume(exp) +# define nlassertex(exp, str) nlassume(exp) +# define nlverify(exp) do { exp; nlassume(exp); } while (0) +# define nlverifyonce(exp) do { exp; nlassume(exp); } while (0) +# define nlverifyex(exp, str) do { exp; nlassume(exp); } while (0) #else // NL_NO_DEBUG # ifdef NL_OS_UNIX @@ -383,25 +389,29 @@ extern bool _assertex_stop_1(bool &ignoreNextTime); #define nlassert(exp) \ do { \ - if (!(exp)) { \ + bool _expResult_ = (exp) ? true : false; \ + if (!(_expResult_)) { \ NLMISC::createDebug (); \ NLMISC::INelContext::getInstance().getAssertLog()->setPosition (__LINE__, __FILE__, __FUNCTION__); \ NLMISC::INelContext::getInstance().getAssertLog()->displayNL ("\"%s\" ", #exp); \ NLMISC_BREAKPOINT; \ } \ + nlassume(_expResult_); \ } while(0) #define nlassertonce(exp) nlassert(exp) #define nlassertex(exp, str) \ do { \ - if (!(exp)) { \ + bool _expResult_ = (exp) ? true : false; \ + if (!(_expResult_)) { \ NLMISC::createDebug (); \ NLMISC::INelContext::getInstance().getAssertLog()->setPosition (__LINE__, __FILE__, __FUNCTION__); \ NLMISC::INelContext::getInstance().getAssertLog()->displayNL ("\"%s\" ", #exp); \ NLMISC::INelContext::getInstance().getAssertLog()->displayRawNL str; \ NLMISC_BREAKPOINT; \ } \ + nlassume(_expResult_); \ } while(0) #define nlverify(exp) nlassert(exp) @@ -419,16 +429,19 @@ do { \ NLMISC_BREAKPOINT; \ } \ ASSERT_THROW_EXCEPTION_CODE_EX(_expResult_, #exp) \ + nlassume(_expResult_); \ } while(0) #define nlassertonce(exp) \ do { \ static bool ignoreNextTime = false; \ - if (!ignoreNextTime && !(exp)) { \ + bool _expResult_ = (exp) ? true : false; \ + if (!ignoreNextTime && !(_expResult_)) { \ ignoreNextTime = true; \ if(NLMISC::_assert_stop(ignoreNextTime, __LINE__, __FILE__, __FUNCTION__, #exp)) \ NLMISC_BREAKPOINT; \ } \ + nlassume(_expResult_); \ } while(0) #define nlassertex(exp, str) \ @@ -442,6 +455,7 @@ do { \ NLMISC_BREAKPOINT; \ } \ ASSERT_THROW_EXCEPTION_CODE_EX(_expResult_, #exp) \ + nlassume(_expResult_); \ } while(0) #define nlverify(exp) \ @@ -453,6 +467,7 @@ do { \ NLMISC_BREAKPOINT; \ } \ ASSERT_THROW_EXCEPTION_CODE_EX(_expResult_, #exp) \ + nlassume(_expResult_); \ } while(0) #define nlverifyonce(exp) \ @@ -464,6 +479,7 @@ do { \ if(NLMISC::_assert_stop(ignoreNextTime, __LINE__, __FILE__, __FUNCTION__, #exp)) \ NLMISC_BREAKPOINT; \ } \ + nlassume(_expResult_); \ } while(0) #define nlverifyex(exp, str) \ @@ -477,6 +493,7 @@ do { \ NLMISC_BREAKPOINT; \ } \ ASSERT_THROW_EXCEPTION_CODE_EX(_expResult_, #exp) \ + nlassume(_expResult_); \ } while(0) # endif // NL_OS_UNIX diff --git a/code/nel/include/nel/misc/file.h b/code/nel/include/nel/misc/file.h index 3e40d122a..f634f4378 100644 --- a/code/nel/include/nel/misc/file.h +++ b/code/nel/include/nel/misc/file.h @@ -38,7 +38,7 @@ struct EFile : public EStream EFile (const std::string& filename) : EStream( "Unknown file error in '"+filename+"'" ), Filename(filename) {} EFile (const std::string& filename, const std::string& text, bool ) : EStream( text ), Filename(filename) {} - virtual ~EFile() throw() {} + virtual ~EFile() NL_OVERRIDE {} std::string Filename; }; diff --git a/code/nel/include/nel/misc/stream.h b/code/nel/include/nel/misc/stream.h index da9f2835e..89db78a1c 100644 --- a/code/nel/include/nel/misc/stream.h +++ b/code/nel/include/nel/misc/stream.h @@ -78,7 +78,7 @@ struct EStream : public Exception EStream( const IStream &f, const std::string& str ); - virtual ~EStream() throw() {} + virtual ~EStream() NL_OVERRIDE {} // May Not be Filled... std::string StreamName; From cd555f640b4dc0d0d24aff5cb4cbaff49fef7a65 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Mon, 16 Mar 2020 01:47:13 +0800 Subject: [PATCH 150/236] This should probably clear --- code/nel/src/3d/packed_zone.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/nel/src/3d/packed_zone.cpp b/code/nel/src/3d/packed_zone.cpp index aa3eff11f..72866ea78 100644 --- a/code/nel/src/3d/packed_zone.cpp +++ b/code/nel/src/3d/packed_zone.cpp @@ -492,7 +492,7 @@ static void computeRastersUnion(const CPolygon2D::TRasterVect &inRaster0, CPolyg { if (inRaster1.empty()) { - outRaster.empty(); + outRaster.clear(); finalMinY = -1; return; } From 71c7d3161ead23035a212d9d4700870845300452 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Mon, 16 Mar 2020 01:47:25 +0800 Subject: [PATCH 151/236] Disable unscoped enum warning --- code/nel/include/nel/misc/types_nl.h | 1 + 1 file changed, 1 insertion(+) diff --git a/code/nel/include/nel/misc/types_nl.h b/code/nel/include/nel/misc/types_nl.h index 3797c1137..445882c34 100644 --- a/code/nel/include/nel/misc/types_nl.h +++ b/code/nel/include/nel/misc/types_nl.h @@ -246,6 +246,7 @@ # pragma warning (disable : 4005) // don't warn on redefinitions caused by xp platform sdk # endif // NL_COMP_VC8 || NL_COMP_VC9 # pragma warning (disable : 26495) // Variable is uninitialized. Always initialize a member variable. (On purpose for performance.) +# pragma warning (disable : 26812) // The enum type is unscoped. Prefer 'enum class' over 'enum' (Enum.3). #endif // NL_OS_WINDOWS From 168c770716a0911e538f1e6a83705c50e3fd551b Mon Sep 17 00:00:00 2001 From: kaetemi Date: Mon, 16 Mar 2020 02:17:08 +0800 Subject: [PATCH 152/236] Assert return value --- code/nel/src/ligo/primitive.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/code/nel/src/ligo/primitive.cpp b/code/nel/src/ligo/primitive.cpp index 807894be2..d43d4cde1 100644 --- a/code/nel/src/ligo/primitive.cpp +++ b/code/nel/src/ligo/primitive.cpp @@ -1255,6 +1255,7 @@ const IPrimitive *IPrimitive::getPrimitive (const std::string &absoluteOrRelativ for (childIndex=0;childIndexgetNumChildren();childIndex++) { cursor->getChild(child,childIndex); + nlassert(child); string name; if ( child->getPropertyByName("class", name) && toUpper(name)==childName ) From e65d1587e7694e7aad9790cdab48aa6a226665b1 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Mon, 16 Mar 2020 02:17:21 +0800 Subject: [PATCH 153/236] Set fallback value on uninitialized variable --- code/nel/src/gui/ctrl_scroll.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/code/nel/src/gui/ctrl_scroll.cpp b/code/nel/src/gui/ctrl_scroll.cpp index df45b428f..14caa75f4 100644 --- a/code/nel/src/gui/ctrl_scroll.cpp +++ b/code/nel/src/gui/ctrl_scroll.cpp @@ -1348,6 +1348,7 @@ namespace NLGUI } else { + hs[hsIndex] = Hotspot_Bx; CLuaIHM::fails(ls, "%s : couldn't parse hotspot for vertical scrollbar", funcName); } } @@ -1369,6 +1370,7 @@ namespace NLGUI } else { + hs[hsIndex] = Hotspot_xL; CLuaIHM::fails(ls, "%s : couldn't parse hotspot for horizontal scrollbar", funcName); } } From 9d5af13c5ec83529ad76ffb76e35bc1713000771 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Mon, 16 Mar 2020 02:21:12 +0800 Subject: [PATCH 154/236] Assert parent exists --- code/nel/src/gui/group_header.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/code/nel/src/gui/group_header.cpp b/code/nel/src/gui/group_header.cpp index f9d3eae86..03d688921 100644 --- a/code/nel/src/gui/group_header.cpp +++ b/code/nel/src/gui/group_header.cpp @@ -179,6 +179,7 @@ namespace NLGUI while (limitingParent && (limitingParent->getResizeFromChildH() || dynamic_cast(limitingParent))) limitingParent = limitingParent->getParent(); + nlassert(limitingParent); getParentContainer()->setH(col->getH() + getParentContainer()->getHReal() - limitingParent->getHReal()); } } From 71e3ed5868f8b3e83192085bd850e5b7cc00094a Mon Sep 17 00:00:00 2001 From: kaetemi Date: Mon, 16 Mar 2020 02:33:07 +0800 Subject: [PATCH 155/236] Fix NULL _Parent and uninitialized parentId --- code/nel/src/gui/interface_group.cpp | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/code/nel/src/gui/interface_group.cpp b/code/nel/src/gui/interface_group.cpp index 2b899aca1..8f1d104c9 100644 --- a/code/nel/src/gui/interface_group.cpp +++ b/code/nel/src/gui/interface_group.cpp @@ -622,13 +622,30 @@ namespace NLGUI { std::string parentId; - if( value != "parent" ){ - if( _Parent != NULL ) + if (value != "parent") + { + if (_Parent != NULL) + { parentId = _Parent->getId() + ":" + value; + } else + { + parentId = "ui:" + value; + } + } + else + { + if (_Parent) + { parentId = _Parent->getId(); + } + else + { + parentId = value; + } } - CWidgetManager::getInstance()->getParser()->addParentSizeMaxAssociation( this, parentId ); + + CWidgetManager::getInstance()->getParser()->addParentSizeMaxAssociation(this, parentId); return; } else From 0a1e8186b34732e4acfe5ef5f885df7ea907f6e7 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Mon, 16 Mar 2020 04:18:11 +0800 Subject: [PATCH 156/236] Batch of fixes for client --- code/nel/include/nel/gui/lua_helper.h | 14 ++++---- code/nel/src/georges/form.cpp | 6 ++-- code/nel/src/georges/type.cpp | 2 +- code/nel/src/gui/interface_group.cpp | 1 + code/nel/src/gui/interface_link.cpp | 1 + code/nel/src/gui/lua_ihm.cpp | 32 +++++++++++-------- code/nel/src/gui/view_renderer.cpp | 2 +- code/nel/src/gui/widget_manager.cpp | 2 ++ code/nel/src/misc/bitmap.cpp | 4 +-- code/nel/src/misc/debug.cpp | 7 ++-- code/nel/src/misc/eid_translator.cpp | 2 +- code/nel/src/misc/i_xml.cpp | 5 ++- code/nel/src/misc/system_info.cpp | 1 + code/nel/src/misc/win_displayer.cpp | 4 +-- code/nel/src/pacs/build_indoor.cpp | 1 + code/ryzom/common/src/game_share/crypt.cpp | 8 ++--- .../src/game_share/mirrored_data_set.cpp | 1 + code/ryzom/common/src/game_share/object.cpp | 2 +- .../game_share/server_animation_module.cpp | 3 +- code/ryzom/common/src/game_share/utils.h | 4 +-- 20 files changed, 59 insertions(+), 43 deletions(-) diff --git a/code/nel/include/nel/gui/lua_helper.h b/code/nel/include/nel/gui/lua_helper.h index 0269e1a69..da5c33e6a 100644 --- a/code/nel/include/nel/gui/lua_helper.h +++ b/code/nel/include/nel/gui/lua_helper.h @@ -88,7 +88,7 @@ namespace NLGUI { public: ELuaError() { CLuaStackChecker::incrementExceptionContextCounter(); } - virtual ~ELuaError() throw() { CLuaStackChecker::decrementExceptionContextCounter(); } + virtual ~ELuaError() NL_OVERRIDE { CLuaStackChecker::decrementExceptionContextCounter(); } ELuaError(const std::string &reason) : Exception(reason) { CLuaStackChecker::incrementExceptionContextCounter(); } // what(), plus append the Reason virtual std::string luaWhat() const throw() {return NLMISC::toString("LUAError: %s", what());} @@ -100,9 +100,9 @@ namespace NLGUI public: ELuaParseError() {} ELuaParseError(const std::string &reason) : ELuaError(reason) {} - virtual ~ELuaParseError() throw() { } + virtual ~ELuaParseError() NL_OVERRIDE { } // what(), plus append the Reason - virtual std::string luaWhat() const throw() {return NLMISC::toString("ELuaParseError: %s", what());} + virtual std::string luaWhat() const throw() NL_OVERRIDE {return NLMISC::toString("ELuaParseError: %s", what());} }; /** Exception thrown when something went wrong inside a wrapped function called by lua @@ -113,8 +113,8 @@ namespace NLGUI ELuaWrappedFunctionException(CLuaState *luaState); ELuaWrappedFunctionException(CLuaState *luaState, const std::string &reason); ELuaWrappedFunctionException(CLuaState *luaState, const char *format, ...); - virtual ~ELuaWrappedFunctionException() throw() { } - virtual const char *what() const throw() {return _Reason.c_str();} + virtual ~ELuaWrappedFunctionException() NL_OVERRIDE { } + virtual const char *what() const throw() NL_OVERRIDE {return _Reason.c_str();} protected: void init(CLuaState *ls, const std::string &reason); protected: @@ -127,9 +127,9 @@ namespace NLGUI public: ELuaExecuteError() {} ELuaExecuteError(const std::string &reason) : ELuaError(reason) {} - virtual ~ELuaExecuteError() throw() { } + virtual ~ELuaExecuteError() NL_OVERRIDE { } // what(), plus append the Reason - virtual std::string luaWhat() const throw() {return NLMISC::toString("ELuaExecuteError: %s", what());} + virtual std::string luaWhat() const throw() NL_OVERRIDE {return NLMISC::toString("ELuaExecuteError: %s", what());} }; // A bad cast occurred when using lua_checkcast diff --git a/code/nel/src/georges/form.cpp b/code/nel/src/georges/form.cpp index 7fb51402e..c3fea6e0a 100644 --- a/code/nel/src/georges/form.cpp +++ b/code/nel/src/georges/form.cpp @@ -134,13 +134,13 @@ void CForm::write (xmlDocPtr doc, const std::string &filename) } // Write elements - Elements.write (node, this, NULL, true); + Elements.write (node, this, std::string(), true); // Write held elements uint i; for (i=0; iwrite (node, this, NULL, true); + HeldElements[i]->write (node, this, std::string(), true); } // Header @@ -273,7 +273,7 @@ void CForm::write (NLMISC::IStream &stream) xmlStream.init (&stream); // Write the file - write (xmlStream.getDocument (), NULL); + write (xmlStream.getDocument (), std::string()); } // *************************************************************************** diff --git a/code/nel/src/georges/type.cpp b/code/nel/src/georges/type.cpp index e8b2a8b5b..1055313dd 100644 --- a/code/nel/src/georges/type.cpp +++ b/code/nel/src/georges/type.cpp @@ -599,7 +599,7 @@ bool CType::getValue (string &result, const CForm *form, const CFormElmAtom *nod else if (evaluate == UFormElm::Eval) { // Evaluate numerical expression - if ((Type == Double) || (Type == SignedInt) || (Type == UnsignedInt) || (Type == UnsignedInt)) + if ((Type == Double) || (Type == SignedInt) || (Type == UnsignedInt)) { // Evaluate predefinition uint i; diff --git a/code/nel/src/gui/interface_group.cpp b/code/nel/src/gui/interface_group.cpp index 8f1d104c9..dacaf16cf 100644 --- a/code/nel/src/gui/interface_group.cpp +++ b/code/nel/src/gui/interface_group.cpp @@ -1540,6 +1540,7 @@ namespace NLGUI for (ite = _EltOrder.begin() ; ite != _EltOrder.end(); ite++) { CViewBase *pIE = *ite; + nlassert(pIE); if (pIE->getActive()) { const CInterfaceElement *el = pIE->getParentPos() ? pIE->getParentPos() : pIE->getParent(); diff --git a/code/nel/src/gui/interface_link.cpp b/code/nel/src/gui/interface_link.cpp index 966354e10..03a1212d3 100644 --- a/code/nel/src/gui/interface_link.cpp +++ b/code/nel/src/gui/interface_link.cpp @@ -667,6 +667,7 @@ namespace NLGUI string elt = Target.substr(0,Target.rfind(':')); CInterfaceElement *pIE = CWidgetManager::getInstance()->getElementFromId(elt); CInterfaceGroup *pIG = dynamic_cast(pIE); + nlassert(pIE); if (pIG == NULL) pIG = pIE->getParent(); diff --git a/code/nel/src/gui/lua_ihm.cpp b/code/nel/src/gui/lua_ihm.cpp index 132f1e4b9..946baa560 100644 --- a/code/nel/src/gui/lua_ihm.cpp +++ b/code/nel/src/gui/lua_ihm.cpp @@ -741,7 +741,7 @@ namespace NLGUI } // because this is a method, first parameter is the 'this' CReflectableRefPtrTarget *pRPT = getReflectableOnStack(*state, 1); - if (pRPT == NULL) + if (!pRPT) { state->push(NLMISC::toString("Error while calling lua method %s:%s : 'self' pointer is nil or of bad type, can't make the call.", prop->ParentClass->ClassName.c_str(), prop->Name.c_str()) @@ -752,19 +752,22 @@ namespace NLGUI state->remove(1); // remove 'self' reference from parameters stack // sint numResults = 0; - sint initialStackSize = state->getTop(); - try + if (pRPT) { - // call the actual method - numResults = (pRPT->*(prop->GetMethod.GetLuaMethod))(*state); - } - catch(const std::exception &e) - { - // restore stack to its initial size - state->setTop(initialStackSize); - lua_pushstring(ls, e.what()); - // TODO : see if this is safe to call lua error there" ... (it does a long jump) - lua_error(ls); + sint initialStackSize = state->getTop(); + try + { + // call the actual method + numResults = (pRPT->*(prop->GetMethod.GetLuaMethod))(*state); + } + catch (const std::exception & e) + { + // restore stack to its initial size + state->setTop(initialStackSize); + lua_pushstring(ls, e.what()); + // TODO : see if this is safe to call lua error there" ... (it does a long jump) + lua_error(ls); + } } return numResults; } @@ -787,6 +790,7 @@ namespace NLGUI CInterfaceElement *pIE= CLuaIHM::getUIOnStack(ls, 1); std::string script; ls.toString(2, script); + nlassert(pIE); // must be a group CInterfaceGroup *group= dynamic_cast(pIE); @@ -845,6 +849,7 @@ namespace NLGUI std::string dbList, script; ls.toString(2, dbList); ls.toString(3, script); + nlassert(pIE); // must be a group CInterfaceGroup *group= dynamic_cast(pIE); @@ -873,6 +878,7 @@ namespace NLGUI CInterfaceElement *pIE= CLuaIHM::getUIOnStack(ls, 1); std::string dbList; ls.toString(2, dbList); + nlassert(pIE); // must be a group CInterfaceGroup *group= dynamic_cast(pIE); diff --git a/code/nel/src/gui/view_renderer.cpp b/code/nel/src/gui/view_renderer.cpp index 4c2db062a..82716de4a 100644 --- a/code/nel/src/gui/view_renderer.cpp +++ b/code/nel/src/gui/view_renderer.cpp @@ -887,7 +887,7 @@ namespace NLGUI while (!iFile.eof()) { iFile.getline (bufTmp, 256); - sscanf (bufTmp, "%s %f %f %f %f", tgaName, &uvMinU, &uvMinV, &uvMaxU, &uvMaxV); + sscanf (bufTmp, "%s %f %f %f %f", tgaName, &uvMinU, &uvMinV, &uvMaxU, &uvMaxV); // FIXME: Return value ignored, tgaName may be uninitialized SImage image; image.UVMin.U = uvMinU; image.UVMin.V = uvMinV; diff --git a/code/nel/src/gui/widget_manager.cpp b/code/nel/src/gui/widget_manager.cpp index c0a6a4c85..864e4ef5b 100644 --- a/code/nel/src/gui/widget_manager.cpp +++ b/code/nel/src/gui/widget_manager.cpp @@ -2372,6 +2372,7 @@ namespace NLGUI // make sure all parent windows are active CCtrlBase *cb = getCaptureKeyboard(); CGroupContainer *lastContainer = NULL; + nlassert(cb); for(;;) { CGroupContainer *gc = dynamic_cast(cb); @@ -3226,6 +3227,7 @@ namespace NLGUI for( j = 0; j < mg.Group->getNumGroup(); j++ ) { CInterfaceGroup *g = mg.Group->getGroup( j ); + nlassert(g); if( dynamic_cast< CGroupModal* >( g ) != NULL ) continue; diff --git a/code/nel/src/misc/bitmap.cpp b/code/nel/src/misc/bitmap.cpp index 13fe82247..015a9c4c4 100644 --- a/code/nel/src/misc/bitmap.cpp +++ b/code/nel/src/misc/bitmap.cpp @@ -2046,7 +2046,7 @@ void CBitmap::resamplePicture32 (const NLMISC::CRGBA *pSrc, NLMISC::CRGBA *pDest sint32 nDestWidth, sint32 nDestHeight) { //logResample("RP32: 0 pSrc=%p pDest=%p, Src=%d x %d Dest=%d x %d", pSrc, pDest, nSrcWidth, nSrcHeight, nDestWidth, nDestHeight); - if ((nSrcWidth<=0)||(nSrcHeight<=0)||(nDestHeight<=0)||(nDestHeight<=0)) + if ((nSrcWidth<=0)||(nSrcHeight<=0)||(nDestWidth<=0)||(nDestHeight<=0)) return; // If we're reducing it by 2, call the fast resample @@ -2268,7 +2268,7 @@ void CBitmap::resamplePicture8 (const uint8 *pSrc, uint8 *pDest, sint32 nDestWidth, sint32 nDestHeight) { //logResample("RP8: 0 pSrc=%p pDest=%p, Src=%d x %d Dest=%d x %d", pSrc, pDest, nSrcWidth, nSrcHeight, nDestWidth, nDestHeight); - if ((nSrcWidth<=0)||(nSrcHeight<=0)||(nDestHeight<=0)||(nDestHeight<=0)) + if ((nSrcWidth<=0)||(nSrcHeight<=0)||(nDestWidth<=0)||(nDestHeight<=0)) return; // If we're reducing it by 2, call the fast resample diff --git a/code/nel/src/misc/debug.cpp b/code/nel/src/misc/debug.cpp index 3113de70e..cc3203a14 100644 --- a/code/nel/src/misc/debug.cpp +++ b/code/nel/src/misc/debug.cpp @@ -449,7 +449,7 @@ public: EDebug() { _Reason = "Nothing about EDebug"; } - virtual ~EDebug() throw() {} + virtual ~EDebug() NL_OVERRIDE {} EDebug(EXCEPTION_POINTERS * pexp) : m_pexp(pexp) { nlassert(pexp != 0); createWhat(); } EDebug(const EDebug& se) : m_pexp(se.m_pexp) { createWhat(); } @@ -863,9 +863,10 @@ public: cleanType (type, displayType); char tmp[1024]; + tmp[0]='\0'; if(type == "void") { - tmp[0]='\0'; + // tmp[0]='\0'; } else if(type == "int") { @@ -1716,6 +1717,7 @@ NLMISC_CATEGORISED_COMMAND(nel, writeaccess, "write a uint8 value in an invalid #endif } if(args.size() >= 2) NLMISC::fromString(args[1], val); + nlassume(adr); *adr = val; return true; } @@ -1736,6 +1738,7 @@ NLMISC_CATEGORISED_COMMAND(nel, readaccess, "read a uint8 value in an invalid ad adr = (uint8*)addr32; #endif } + nlassume(adr); val = *adr; log.displayNL("value is %hu", (uint16)val); return true; diff --git a/code/nel/src/misc/eid_translator.cpp b/code/nel/src/misc/eid_translator.cpp index 71d0fd4e2..9978b37e0 100644 --- a/code/nel/src/misc/eid_translator.cpp +++ b/code/nel/src/misc/eid_translator.cpp @@ -570,7 +570,7 @@ string CEntityIdTranslator::getUserName (uint32 uid) return entity.UserName; } } - return 0; + return string(); } void CEntityIdTranslator::getEntityIdInfo (const CEntityId &eid, ucstring &entityName, sint8 &entitySlot, uint32 &uid, string &userName, bool &online, std::string* additional) diff --git a/code/nel/src/misc/i_xml.cpp b/code/nel/src/misc/i_xml.cpp index ae5c8615e..87f848ab9 100644 --- a/code/nel/src/misc/i_xml.cpp +++ b/code/nel/src/misc/i_xml.cpp @@ -171,8 +171,7 @@ bool CIXml::init (IStream &stream) // Try binary mode if (_TryBinaryMode) { - string header; - header.resize(4); + char header[4]; header[0] = buffer[0]; header[1] = buffer[1]; header[2] = buffer[2]; @@ -180,7 +179,7 @@ bool CIXml::init (IStream &stream) toLower(header); // Does it a xml stream ? - if (header != "InternalSurface == currentSurfId); for (oedge=0; oedge<3 && next->Edge[oedge]!=currentFace; ++oedge) diff --git a/code/ryzom/common/src/game_share/crypt.cpp b/code/ryzom/common/src/game_share/crypt.cpp index a10c2ab6e..1416cac52 100644 --- a/code/ryzom/common/src/game_share/crypt.cpp +++ b/code/ryzom/common/src/game_share/crypt.cpp @@ -533,7 +533,7 @@ std::string rz_crypt(register const char *key, register const char *setting, cha keyblock.b[i] = t; } if (rz_des_setkey((char *)keyblock.b)) /* also initializes "a64toi" */ - return (NULL); + return std::string(); encp = &cryptresult[0]; switch (*setting) { @@ -544,14 +544,14 @@ std::string rz_crypt(register const char *key, register const char *setting, cha while (*key) { if (rz_des_cipher((char *)&keyblock, (char *)&keyblock, 0L, 1)) - return (NULL); + return std::string(); for (i = 0; i < 8; i++) { if ((t = 2*(unsigned char)(*key)) != 0) key++; keyblock.b[i] ^= t; } if (rz_des_setkey((char *)keyblock.b)) - return (NULL); + return std::string(); } *encp++ = *setting++; @@ -583,7 +583,7 @@ std::string rz_crypt(register const char *key, register const char *setting, cha encp += salt_size; if (rz_des_cipher((char *)&constdatablock, (char *)&rsltblock, salt, num_iter)) - return ""; + return std::string(); /* * Encode the 64 cipher bits as 11 ascii characters. diff --git a/code/ryzom/common/src/game_share/mirrored_data_set.cpp b/code/ryzom/common/src/game_share/mirrored_data_set.cpp index 2d854c47a..8db024784 100644 --- a/code/ryzom/common/src/game_share/mirrored_data_set.cpp +++ b/code/ryzom/common/src/game_share/mirrored_data_set.cpp @@ -1763,6 +1763,7 @@ void CMirroredDataSet::getValueToString( const TDataSetRow& entityIndex, TPro } default: result = toString( " (%s/E%d/P%hd)", name().c_str(), entityIndex.getIndex(), propIndex ); + return; } result = string(tmpStr); } diff --git a/code/ryzom/common/src/game_share/object.cpp b/code/ryzom/common/src/game_share/object.cpp index c9315997f..ef567d31a 100644 --- a/code/ryzom/common/src/game_share/object.cpp +++ b/code/ryzom/common/src/game_share/object.cpp @@ -1480,7 +1480,7 @@ bool CObjectTable::canTake(sint32 position) const { CObject* parent = getParent(); - if (parent) //try to take the root of a tree + if (!parent) //try to take the root of a tree { return true; } diff --git a/code/ryzom/common/src/game_share/server_animation_module.cpp b/code/ryzom/common/src/game_share/server_animation_module.cpp index 0f0c90bb0..3c3276130 100644 --- a/code/ryzom/common/src/game_share/server_animation_module.cpp +++ b/code/ryzom/common/src/game_share/server_animation_module.cpp @@ -667,11 +667,12 @@ void CAttributeToProperty::setAiStateName(const std::string& prefix) std::string name; CObject* tmp=_Object->getAttr("Id"); - if( !(tmp&&tmp->isString())&&((name = tmp->toString()).length()!=0)) + if (!tmp || !tmp->isString()) { nlwarning("R2Ani: invalide rtData"); return; } + name = tmp->toString(); _Primitive->addPropertyByName("name", new CPropertyString(prefix + name)); diff --git a/code/ryzom/common/src/game_share/utils.h b/code/ryzom/common/src/game_share/utils.h index ed71af34b..a534b156b 100644 --- a/code/ryzom/common/src/game_share/utils.h +++ b/code/ryzom/common/src/game_share/utils.h @@ -122,8 +122,8 @@ inline ucstring capitalize(const ucstring & s) #define GIVEUP_IF(condition,msg,action) if (!(condition));else GIVEUP(msg,action) #define WARN_IF(condition,msg) if (!(condition));else WARN(msg) #define DROP_IF(condition,msg,action) if (!(condition));else DROP(msg,action) -#define BOMB_IF(condition,msg,action) if (!(condition));else BOMB(msg,action) -#define STOP_IF(condition,msg) if (!(condition));else STOP(msg) +#define BOMB_IF(condition,msg,action) if (!(condition));else BOMB(msg,action); do { nlassume(condition); } while (0) +#define STOP_IF(condition,msg) if (!(condition));else STOP(msg); do { nlassume(condition); } while (0) // testing for variable value changes #define ON_CHANGE(type,var,code)\ From c056cd7d249916e963b73206e08644264c3b992d Mon Sep 17 00:00:00 2001 From: kaetemi Date: Mon, 16 Mar 2020 04:23:21 +0800 Subject: [PATCH 157/236] Fixes --- code/ryzom/common/src/game_share/object.cpp | 2 +- code/ryzom/common/src/game_share/timer.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/code/ryzom/common/src/game_share/object.cpp b/code/ryzom/common/src/game_share/object.cpp index ef567d31a..bb92c4936 100644 --- a/code/ryzom/common/src/game_share/object.cpp +++ b/code/ryzom/common/src/game_share/object.cpp @@ -1120,7 +1120,7 @@ CObject* CObjectTable::clone() const TContainer::const_iterator first(_Value.begin()), last(_Value.end()); for ( ;first != last; ++first ) { - BOMB_IF(!first->second, "Try to clone a table with an NULL component", return 0) + BOMB_IF(!first->second, "Try to clone a table with an NULL component", return 0); nlassert(first->second->getGhost() == this->getGhost()); CObject* clone = first->second->clone(); if (clone) { clone->setParent(0); } diff --git a/code/ryzom/common/src/game_share/timer.h b/code/ryzom/common/src/game_share/timer.h index e00dc3f84..1659464fa 100644 --- a/code/ryzom/common/src/game_share/timer.h +++ b/code/ryzom/common/src/game_share/timer.h @@ -424,7 +424,7 @@ inline void CTimerEvent::set(CTimer* owner,NLMISC::TGameCycle time,uint32 variat _Time = time + i; } } - BOMB_IF(best==NULL,"BUG: This can never happen!",return) + BOMB_IF(best == NULL, "BUG: This can never happen!", return); best->push_back(this); } @@ -452,7 +452,7 @@ inline void CTimerEvent::clear() inline void CTimerEvent::processEvent() { CTimer* owner=_Owner; - BOMB_IF(owner==NULL,"Attempt to process an event that no longer has a valid owner",return) + BOMB_IF(owner == NULL, "Attempt to process an event that no longer has a valid owner", return); // mark the event as expired - the state may be chnaged during the timer callback... // NOTE: This operation results in '_Owner' being set to NULL From f8bee17d3c0338cf9cf016603b20f4d9a364dc9d Mon Sep 17 00:00:00 2001 From: kaetemi Date: Mon, 16 Mar 2020 14:01:28 +0800 Subject: [PATCH 158/236] Fix build --- code/ryzom/client/src/net_manager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/ryzom/client/src/net_manager.cpp b/code/ryzom/client/src/net_manager.cpp index 8f11e453a..7ce27c4d5 100644 --- a/code/ryzom/client/src/net_manager.cpp +++ b/code/ryzom/client/src/net_manager.cpp @@ -2767,7 +2767,7 @@ void updateInventoryFromStream (NLMISC::CBitMemStream &impulse, const CInventory const string invBranchStr = CInventoryCategoryTemplate::getDbStr( (typename CInventoryCategoryTemplate::TInventoryId)invId ); ICDBNode::CTextId textId( invBranchStr ); ICDBNode *inventoryNode = IngameDbMngr.getNodePtr()->getNode( textId, false ); - BOMB_IF( !inventoryNode, "Inventory missing in database", return ) + BOMB_IF(!inventoryNode, "Inventory missing in database", return); // List of updates for ( uint c=0; c!=nbChanges; ++c ) From 86b809e5815ec4871bfaa03d0d9ed16c502d6fa8 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Mon, 16 Mar 2020 14:23:26 +0800 Subject: [PATCH 159/236] Fix typo --- code/nel/include/nel/misc/debug.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/nel/include/nel/misc/debug.h b/code/nel/include/nel/misc/debug.h index 7d4ddcd1b..d8e03ac8e 100644 --- a/code/nel/include/nel/misc/debug.h +++ b/code/nel/include/nel/misc/debug.h @@ -368,10 +368,10 @@ extern bool _assertex_stop_1(bool &ignoreNextTime); // removed because we always check assert (even in release mode) #if defined(NL_DEBUG) -#if defined(_MSC_VER) && _MSC_VER >= 1900 +#if defined(_MSC_VER) && _MSC_VER >= 1500 #define nlassume(exp) do { __analysis_assume(exp); } while (0) // __analysis_assume doesn't evaluate the expression at runtime #else -#define nlassume(exp) do { ) while (0) +#define nlassume(exp) do { } while (0) #endif #ifdef NL_NO_DEBUG From 7256109dcb69ccf8223ea339ae35e5a5c72f1ec6 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Mon, 16 Mar 2020 14:36:21 +0800 Subject: [PATCH 160/236] Add a verbose variant of assert that's disabled in final build --- code/nel/include/nel/misc/debug.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/code/nel/include/nel/misc/debug.h b/code/nel/include/nel/misc/debug.h index d8e03ac8e..a8c23eced 100644 --- a/code/nel/include/nel/misc/debug.h +++ b/code/nel/include/nel/misc/debug.h @@ -500,6 +500,15 @@ do { \ #endif // NL_NO_DEBUG +// Same as nlassert and nlverify, but only in DEV build +#if !FINAL_VERSION +#define nlassertverbose(exp) nlassert(exp) +#define nlverifyverbose(exp) nlverify(exp) +#else +#define nlassertverbose(exp) nlassume(exp) +#define nlverifyverbose(exp) do { exp; nlassume(exp); } while (0) +#endif + #define nlunreferenced(identifier) (void)identifier #define nlstop \ From c2e879ebcc07e4a38d2678d9d08fdc4ca7161e76 Mon Sep 17 00:00:00 2001 From: Ulukyn Date: Tue, 17 Mar 2020 17:30:46 +0100 Subject: [PATCH 161/236] Changed: removed pvp check for rp logos --- .../interface_v3/group_in_scene_user_info.cpp | 25 ++++++++----------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/code/ryzom/client/src/interface_v3/group_in_scene_user_info.cpp b/code/ryzom/client/src/interface_v3/group_in_scene_user_info.cpp index d36618a9f..46df394ad 100644 --- a/code/ryzom/client/src/interface_v3/group_in_scene_user_info.cpp +++ b/code/ryzom/client/src/interface_v3/group_in_scene_user_info.cpp @@ -466,16 +466,13 @@ CGroupInSceneUserInfo *CGroupInSceneUserInfo::build (CEntityCL *entity) CViewBitmap *rp3 = dynamic_cast(leftGroup->getView ("rp_logo_3")); CViewBitmap *rp4 = dynamic_cast(leftGroup->getView ("rp_logo_4")); - if (pPlayer == NULL || (pPlayer != NULL && pPlayer->getPvpMode() & PVP_MODE::PvpFaction)) - { - if (rp1) rp1->setTexture(entityTag1.toString()); - if (rp2) rp2->setTexture(entityTag2.toString()); - } - else - { - entityTag1.clear(); - entityTag2.clear(); - } + if (entityTag1.toString() == "_") entityTag1.clear(); + if (entityTag2.toString() == "_") entityTag2.clear(); + if (entityTag3.toString() == "_") entityTag3.clear(); + if (entityTag4.toString() == "_") entityTag4.clear(); + + if (rp1) rp1->setTexture(entityTag1.toString()); + if (rp2) rp2->setTexture(entityTag2.toString()); if (rp3) rp3->setTexture(entityTag3.toString()); if (rp4) rp4->setTexture(entityTag4.toString()); @@ -661,7 +658,7 @@ CGroupInSceneUserInfo *CGroupInSceneUserInfo::build (CEntityCL *entity) if (pPlayer != NULL && needPvPLogo) { - if (pvpFactionLogo) + if (pvpFactionLogo) { pvpFactionLogo->setActive(true); CViewBitmap * pvpFactionBitmap = dynamic_cast(pvpFactionLogo); @@ -713,7 +710,7 @@ CGroupInSceneUserInfo *CGroupInSceneUserInfo::build (CEntityCL *entity) } } } - + if (pvpOutpostLogo) { if( pPlayer->getOutpostId() != 0 ) @@ -721,7 +718,7 @@ CGroupInSceneUserInfo *CGroupInSceneUserInfo::build (CEntityCL *entity) else pvpOutpostLogo->setActive(false); } - + if (pvpDuelLogo) { if( pPlayer->getPvpMode()&PVP_MODE::PvpDuel ) @@ -952,7 +949,7 @@ void CGroupInSceneUserInfo::updateDynamicData () else if (pPlayer->getStateFx() == "sp_medit.ps") pPlayer->removeStateFx(); } - + if (_Entity->isDead()) _Entity->setStateFx("misc_dead.ps"); From f449bb7c519e95e5cadd4e63eec1849c47855163 Mon Sep 17 00:00:00 2001 From: Nimetu Date: Sun, 15 Mar 2020 13:28:12 +0200 Subject: [PATCH 162/236] Changed: Display mp3 music path on sysinfo window. --- .../client/src/interface_v3/music_player.cpp | 26 +++++++++++++------ 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/code/ryzom/client/src/interface_v3/music_player.cpp b/code/ryzom/client/src/interface_v3/music_player.cpp index 77d3fd698..2deaa965b 100644 --- a/code/ryzom/client/src/interface_v3/music_player.cpp +++ b/code/ryzom/client/src/interface_v3/music_player.cpp @@ -378,7 +378,10 @@ public: virtual void execute(CCtrlBase * /* pCaller */, const string &Params) { if(!SoundMngr) + { + CInterfaceManager::getInstance()->messageBox (CI18N::get ("uiSoundDisabled")); return; + } if (Params == "play_songs") { @@ -386,19 +389,26 @@ public: SoundMngr->getMixer()->getMusicExtensions(extensions); // no format supported - if (extensions.empty()) return; - - std::string message; - for(uint i = 0; i < extensions.size(); ++i) + if (extensions.empty()) { - message += " " + extensions[i]; + // in the very unlikely scenario + const ucstring message("Sound driver has no support for music."); + CInterfaceManager::getInstance()->displaySystemInfo(message, "SYS"); + nlinfo("%s", message.toUtf8().c_str()); + return; } - message += " m3u m3u8"; - nlinfo("Media player supports: '%s'", message.substr(1).c_str()); + std::string newPath = CPath::makePathAbsolute(CPath::standardizePath(ClientCfg.MediaPlayerDirectory), CPath::getCurrentPath(), true); + std::string extlist; + join(extensions, ", ", extlist); + extlist += ", m3u, m3u8"; + + std::string msg(CI18N::get("uiMk_system6").toUtf8()); + msg += ": " + newPath + " (" + extlist + ")"; + CInterfaceManager::getInstance()->displaySystemInfo(ucstring::makeFromUtf8(msg), "SYS"); + nlinfo("%s", msg.c_str()); // Recursive scan for files from media directory vector filesToProcess; - string newPath = CPath::standardizePath(ClientCfg.MediaPlayerDirectory); CPath::getPathContent (newPath, true, false, true, filesToProcess); uint i; From 6afd9ea1f2f72e5483a14aa63ac9ae6dad0c090e Mon Sep 17 00:00:00 2001 From: Nimetu Date: Mon, 23 Mar 2020 18:10:38 +0200 Subject: [PATCH 163/236] Fixed: invalid assignment --- code/nel/src/gui/group_html.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/nel/src/gui/group_html.cpp b/code/nel/src/gui/group_html.cpp index 8009c5ac8..50b381a3c 100644 --- a/code/nel/src/gui/group_html.cpp +++ b/code/nel/src/gui/group_html.cpp @@ -5178,7 +5178,7 @@ namespace NLGUI if (low < min) low = min; if (high > max) - max = max; + high = max; } float CGroupHTML::HTMLMeterElement::getValueRatio() const From e1dff3b4b8667499c5c7a5fb4e09b0537a0eb96e Mon Sep 17 00:00:00 2001 From: Nimetu Date: Tue, 24 Mar 2020 19:09:38 +0200 Subject: [PATCH 164/236] Fixed: typo --- code/nel/include/nel/misc/debug.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/nel/include/nel/misc/debug.h b/code/nel/include/nel/misc/debug.h index 7d4ddcd1b..fa32e6b96 100644 --- a/code/nel/include/nel/misc/debug.h +++ b/code/nel/include/nel/misc/debug.h @@ -371,7 +371,7 @@ extern bool _assertex_stop_1(bool &ignoreNextTime); #if defined(_MSC_VER) && _MSC_VER >= 1900 #define nlassume(exp) do { __analysis_assume(exp); } while (0) // __analysis_assume doesn't evaluate the expression at runtime #else -#define nlassume(exp) do { ) while (0) +#define nlassume(exp) do { } while (0) #endif #ifdef NL_NO_DEBUG From debb6b7d0c4f6f7e3975a1302952bf87003eba8d Mon Sep 17 00:00:00 2001 From: Ulukyn Date: Wed, 25 Mar 2020 14:49:40 +0100 Subject: [PATCH 165/236] Changed: exposed the toggle_fly to final clients --- .../src/interface_v3/action_handler_debug.cpp | 33 ++++++++++--------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/code/ryzom/client/src/interface_v3/action_handler_debug.cpp b/code/ryzom/client/src/interface_v3/action_handler_debug.cpp index 74c5542da..5259ae75b 100644 --- a/code/ryzom/client/src/interface_v3/action_handler_debug.cpp +++ b/code/ryzom/client/src/interface_v3/action_handler_debug.cpp @@ -108,6 +108,23 @@ class CAHToggleARKPACSBorders : public IActionHandler }; REGISTER_ACTION_HANDLER (CAHToggleARKPACSBorders, "ark_pacs_borders"); +// *************************************************************************** +class CAHToggleFly : public IActionHandler +{ + virtual void execute (CCtrlBase * /* pCaller */, const string &/* Params */) + { + // Change to AI Mode. + if(UserControls.mode() != CUserControls::AIMode) + UserControls.mode(CUserControls::AIMode); + // Leave the AI Mode. + else + UserEntity->viewMode(UserEntity->viewMode()); + } +}; +// *************************************************************************** +REGISTER_ACTION_HANDLER (CAHToggleFly, "toggle_fly"); + + #if !FINAL_VERSION // ------------------------------------------------------------------------------------------------ class CAHProfile : public IActionHandler @@ -266,22 +283,6 @@ class CAHSwitchConsoleDisplay : public IActionHandler // *************************************************************************** REGISTER_ACTION_HANDLER (CAHSwitchConsoleDisplay, "switch_console_display"); -// *************************************************************************** -class CAHToggleFly : public IActionHandler -{ - virtual void execute (CCtrlBase * /* pCaller */, const string &/* Params */) - { - // Change to AI Mode. - if(UserControls.mode() != CUserControls::AIMode) - UserControls.mode(CUserControls::AIMode); - // Leave the AI Mode. - else - UserEntity->viewMode(UserEntity->viewMode()); - } -}; -// *************************************************************************** -REGISTER_ACTION_HANDLER (CAHToggleFly, "toggle_fly"); - // *************************************************************************** class CAHReloadLandscapeIg : public IActionHandler { From c0110133d7d79e13537ed9f94d94689058e4340f Mon Sep 17 00:00:00 2001 From: Nimetu Date: Wed, 25 Mar 2020 16:53:34 +0200 Subject: [PATCH 166/236] Changed: Restore ryzom.com urls in client cfg --- code/ryzom/client/client_default.cfg | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/code/ryzom/client/client_default.cfg b/code/ryzom/client/client_default.cfg index d30270b5c..9d4d5c79a 100644 --- a/code/ryzom/client/client_default.cfg +++ b/code/ryzom/client/client_default.cfg @@ -39,18 +39,15 @@ Gamma_max = 1.0; // NETWORK // ///////////// -Application = { "open", "./client_ryzom_r.exe", "./" }; +Application = { "ryzom_live", "./client_ryzom_r.exe", "./" }; BackgroundDownloader = 0; -StartupHost = "https://open.ryzom.dev"; +StartupHost = "shard.ryzom.com:40916"; StartupPage = "/login/r2_login.php"; StartupVerify = 1; -ConditionsTermsURL = "http://www.gnu.org/licenses/agpl-3.0.html"; -LoginSupportURL = "https://open.ryzom.dev/ams/"; -NamingPolicyURL = "https://open.ryzom.dev/ams/"; -ForgetPwdURL = "https://open.ryzom.dev/ams/"; -InstallWebPage = "https://open.ryzom.dev/ams/"; -StreamedPackageHosts = { "https://cdn.ryzom.dev/open/stream/" }; +ConditionsTermsURL = "https://app.ryzom.com/app_forum/index.php?page=topic/view/21885/1&post148782=en#1"; +LoginSupportURL = "https://app.ryzom.com/app_forum/index.php?page=topic/view/22047/1&post149889=en#1"; +NamingPolicyURL = "https://app.ryzom.com/app_forum/index.php?page=topic/view/21885/1&post148784=en#3"; // Full path and filename where cURL can find certificate bundle file // cacert.pem file can be downloaded from https://curl.haxx.se/docs/caextract.html @@ -601,11 +598,11 @@ ChannelIgnoreFilter = // interval in minutes for webig notify thread to run WebIgNotifInterval = 10; -WebIgMainDomain = "https://open.ryzom.dev"; +WebIgMainDomain = "app.ryzom.com"; WebIgTrustedDomains = { - "open.ryzom.dev" + "api.ryzom.com", "app.ryzom.com" }; -PatchletUrl = "https://open.ryzom.dev/app_patchlet/index.php?patch=preload"; +PatchletUrl = "https://app.ryzom.com/app_patchlet/index.php?patch=preload"; SelectedSlot = 0; From 4aa94b3ae9c79c7f3efeaa0be0eda9ee35d77742 Mon Sep 17 00:00:00 2001 From: Nimetu Date: Wed, 25 Mar 2020 16:55:11 +0200 Subject: [PATCH 167/236] Changed: Set WITH_RYZOM_LIVE=ON as default --- code/CMakeModules/nel.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/CMakeModules/nel.cmake b/code/CMakeModules/nel.cmake index f8d01a0bc..483e65ed3 100644 --- a/code/CMakeModules/nel.cmake +++ b/code/CMakeModules/nel.cmake @@ -282,7 +282,7 @@ MACRO(NL_SETUP_DEFAULT_OPTIONS) OPTION(WITH_SNOWBALLS "Build Snowballs." OFF) OPTION(WITH_TOOLS "Build Tools" OFF) - OPTION(WITH_RYZOM_LIVE "Use ryzom.com urls" OFF) + OPTION(WITH_RYZOM_LIVE "Use ryzom.com urls" ON) ENDMACRO(NL_SETUP_DEFAULT_OPTIONS) MACRO(NL_SETUP_NEL_DEFAULT_OPTIONS) From f78decc6ad175f0956bbd2bfad54ab5b4d6079a4 Mon Sep 17 00:00:00 2001 From: Nimetu Date: Thu, 26 Mar 2020 12:49:14 +0200 Subject: [PATCH 168/236] Fixed: typo --- code/nel/include/nel/misc/base64.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/nel/include/nel/misc/base64.h b/code/nel/include/nel/misc/base64.h index 4c5c2babd..2d61cf254 100644 --- a/code/nel/include/nel/misc/base64.h +++ b/code/nel/include/nel/misc/base64.h @@ -16,7 +16,7 @@ #ifndef NL_BASE64_H -#define NL_BASE64_h +#define NL_BASE64_H namespace NLMISC { From 14076b899d633bbbe3cfc78dc297e297f4fbffa2 Mon Sep 17 00:00:00 2001 From: Nimetu Date: Thu, 26 Mar 2020 23:15:26 +0200 Subject: [PATCH 169/236] Fixed: compiling ryzom installer --- code/ryzom/tools/client/ryzom_installer/src/operationdialog.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/ryzom/tools/client/ryzom_installer/src/operationdialog.cpp b/code/ryzom/tools/client/ryzom_installer/src/operationdialog.cpp index c194cef6c..a1380407c 100644 --- a/code/ryzom/tools/client/ryzom_installer/src/operationdialog.cpp +++ b/code/ryzom/tools/client/ryzom_installer/src/operationdialog.cpp @@ -28,7 +28,7 @@ #include "filesextractor.h" #include "filescleaner.h" -#include "seven_zip.h" +#include "nel/misc/seven_zip.h" #if defined(Q_OS_WIN32) && defined(QT_WINEXTRAS_LIB) #include From f41126f4b26d6a5f6a90e86628d7c72aee0f5c45 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Fri, 27 Mar 2020 12:17:44 +0800 Subject: [PATCH 170/236] The order of processing directories really is important, don't randomize it!!! --- code/ryzom/client/src/init.cpp | 34 ++++++++++++++-------------------- 1 file changed, 14 insertions(+), 20 deletions(-) diff --git a/code/ryzom/client/src/init.cpp b/code/ryzom/client/src/init.cpp index 1deacd146..efc137ee6 100644 --- a/code/ryzom/client/src/init.cpp +++ b/code/ryzom/client/src/init.cpp @@ -697,7 +697,8 @@ static void addPaths(IProgressCallback &progress, const std::vector if (CFile::isDirectory(getRyzomSharePrefix())) directoryPrefixes.push_back(CPath::standardizePath(getRyzomSharePrefix())); #endif - std::map directoriesToProcess; + std::set directoriesToProcessSet; + std::vector directoriesToProcess; // first pass, build a map with all existing directories to process in second pass for (uint j = 0; j < directoryPrefixes.size(); j++) @@ -710,36 +711,29 @@ static void addPaths(IProgressCallback &progress, const std::vector // only prepend prefix if path is relative if (!directory.empty() && !directoryPrefix.empty() && !CPath::isAbsolutePath(directory)) - directory = directoryPrefix + directory; + directory = directoryPrefix + directory; // only process existing directories if (CFile::isExists(directory)) - directoriesToProcess[directory] = 1; + { + if (directoriesToProcessSet.find(directory) == directoriesToProcessSet.end()) + { + directoriesToProcessSet.insert(directory); + directoriesToProcess.push_back(directory); + } + } } } - uint total = (uint)directoriesToProcess.size(); - uint current = 0, next = 0; - - std::map::const_iterator it = directoriesToProcess.begin(), iend = directoriesToProcess.end(); - // second pass, add search paths - while (it != iend) + for (size_t i = 0; i < directoriesToProcess.size(); ++i) { - // update next progress value - ++next; - - progress.progress((float)current/(float)total); - progress.pushCropedValues((float)current/(float)total, (float)next/(float)total); + progress.progress((float)i / (float)directoriesToProcess.size()); + progress.pushCropedValues((float)i / (float)directoriesToProcess.size(), (float)(i + 1) / (float)directoriesToProcess.size()); - // next is current value - current = next; - - CPath::addSearchPath(it->first, recurse, false, &progress); + CPath::addSearchPath(directoriesToProcess[i], recurse, false, &progress); progress.popCropedValues(); - - ++it; } } From f0687a8157024315757f7be95208837faa5d1227 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Fri, 27 Mar 2020 13:03:14 +0800 Subject: [PATCH 171/236] Fix ring scenario edition mode initialization --- code/ryzom/client/src/r2/editor.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/code/ryzom/client/src/r2/editor.cpp b/code/ryzom/client/src/r2/editor.cpp index e97cbf4a5..dc221c200 100644 --- a/code/ryzom/client/src/r2/editor.cpp +++ b/code/ryzom/client/src/r2/editor.cpp @@ -243,7 +243,12 @@ void CDynamicMapClientEventForwarder::nodeMoved( void CDynamicMapClientEventForwarder::scenarioUpdated(CObject* highLevel, bool willTP, uint32 initialActIndex) { //H_AUTO(R2_CDynamicMapClientEventForwarder_scenarioUpdated) - if (getEditor().getMode() != CEditor::EditionMode) return; + if (getEditor().getMode() != CEditor::EditionMode + && getEditor().getMode() != CEditor::GoingToEditionMode) + { + nldebug("Scenario update received, but not in edition mode"); + return; + } getEditor().scenarioUpdated(highLevel, willTP, initialActIndex); } @@ -5708,6 +5713,7 @@ void CEditor::scenarioUpdated(CObject* highLevel, bool willTP, uint32 initialAct if (_WaitScenarioScreenActive) { // defer scenario update to the end of the wait screen + nlassert(!_NewScenario); _NewScenario = highLevel ? highLevel->clone() : NULL; _NewScenarioInitialAct = initialActIndex; _PostponeScenarioUpdated = true; From 0244c348eec1d8b26ad74842db7e23ae2edd7e41 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Fri, 27 Mar 2020 13:03:45 +0800 Subject: [PATCH 172/236] Fix exit crash when CTextureBump is destroyed after _NameToNF --- code/nel/include/nel/3d/texture_bump.h | 8 ----- code/nel/src/3d/texture_bump.cpp | 44 ++++++++++++++++++++------ 2 files changed, 34 insertions(+), 18 deletions(-) diff --git a/code/nel/include/nel/3d/texture_bump.h b/code/nel/include/nel/3d/texture_bump.h index 1fb6152de..1c1f2a245 100644 --- a/code/nel/include/nel/3d/texture_bump.h +++ b/code/nel/include/nel/3d/texture_bump.h @@ -84,14 +84,6 @@ protected: float *_NormalizationFactor; bool _DisableSharing; bool _ForceNormalize; - // Map that give the normalization factor for each map from its sharename. This avoid to generate several time the maps to get the normalization factor if a bumpmap is shared by severals CTextureBump instances; - struct CNormalizationInfo - { - uint NumRefs; - float NormalizationFactor; - }; - typedef std::map TNameToNI; // sharename to the normalization factor - static TNameToNI _NameToNF; // name to normalization factor private: /// we don't allow for mipmap for bump so we redefine this to prevent the user from doing this on the base class Itexture virtual void setFilterMode(TMagFilter magf, TMinFilter minf); diff --git a/code/nel/src/3d/texture_bump.cpp b/code/nel/src/3d/texture_bump.cpp index 3707476b2..7705a58fa 100644 --- a/code/nel/src/3d/texture_bump.cpp +++ b/code/nel/src/3d/texture_bump.cpp @@ -26,9 +26,31 @@ namespace NL3D { +namespace /* anonymous */ { -CTextureBump::TNameToNI CTextureBump::_NameToNF; +// Map that give the normalization factor for each map from its sharename. This avoid to generate several time the maps to get the normalization factor if a bumpmap is shared by severals CTextureBump instances; +struct CNormalizationInfo +{ + uint NumRefs; + float NormalizationFactor; +}; +typedef std::map TNameToNI; // sharename to the normalization factor +class CNameToNFStatic { +public: + TNameToNI Map; + bool Initialized; + CNameToNFStatic() : Initialized(true) + { + + } + ~CNameToNFStatic() + { + Initialized = false; + } +}; +CNameToNFStatic s_NameToNF; +} /* anonymous namespace */ #define GET_HGT(x, y) ((sint) ((src[(uint) (x) % width + ((uint) (y) % height) * width] & 0x00ff00) >> 8)) /// create a DsDt texture from a height map (red component of a rgba bitmap) @@ -242,14 +264,15 @@ void CTextureBump::doGenerate(bool async) } // create entry in the map for the normalization factor std::string shareName = getShareName(); - TNameToNI::iterator it = _NameToNF.find(shareName); - if (it == _NameToNF.end()) + nlassertverbose(s_NameToNF.Initialized); + TNameToNI::iterator it = s_NameToNF.Map.find(shareName); + if (it == s_NameToNF.Map.end()) { // create a new entry CNormalizationInfo ni; ni.NumRefs = 1; ni.NormalizationFactor = normalizationFactor; - std::pair pb = _NameToNF.insert(TNameToNI::value_type(shareName, ni)); + std::pair pb = s_NameToNF.Map.insert(TNameToNI::value_type(shareName, ni)); _NormalizationFactor = &(pb.first->second.NormalizationFactor); } else @@ -303,8 +326,9 @@ float CTextureBump::getNormalizationFactor() if (!_HeightMap) return 1.f; // not computed yet, see if another map has computed it std::string shareName = getShareName(); - TNameToNI::iterator it = _NameToNF.find(shareName); - if (it != _NameToNF.end()) + nlassertverbose(s_NameToNF.Initialized); + TNameToNI::iterator it = s_NameToNF.Map.find(shareName); + if (it != s_NameToNF.Map.end()) { _NormalizationFactor = &(it->second.NormalizationFactor); ++(it->second.NumRefs); @@ -320,16 +344,16 @@ float CTextureBump::getNormalizationFactor() ///============================================================================================== CTextureBump::~CTextureBump() { - if (_NormalizationFactor && !_NameToNF.empty()) + if (s_NameToNF.Initialized && _NormalizationFactor && !s_NameToNF.Map.empty()) { // find normalization factor from its name - TNameToNI::iterator it = _NameToNF.find(getShareName()); + TNameToNI::iterator it = s_NameToNF.Map.find(getShareName()); // if found - if (it != _NameToNF.end()) + if (it != s_NameToNF.Map.end()) { // we can delete it only if it's not used anymore - if (--(it->second.NumRefs) == 0) _NameToNF.erase(it); + if (--(it->second.NumRefs) == 0) s_NameToNF.Map.erase(it); } } } From 6b9a1f39cdb6880583ee098cff5c818815ed57d1 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Fri, 27 Mar 2020 13:40:18 +0800 Subject: [PATCH 173/236] Fix scenario loading --- code/ryzom/client/src/r2/editor.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/code/ryzom/client/src/r2/editor.cpp b/code/ryzom/client/src/r2/editor.cpp index dc221c200..457cee562 100644 --- a/code/ryzom/client/src/r2/editor.cpp +++ b/code/ryzom/client/src/r2/editor.cpp @@ -244,7 +244,8 @@ void CDynamicMapClientEventForwarder::scenarioUpdated(CObject* highLevel, bool w { //H_AUTO(R2_CDynamicMapClientEventForwarder_scenarioUpdated) if (getEditor().getMode() != CEditor::EditionMode - && getEditor().getMode() != CEditor::GoingToEditionMode) + && getEditor().getMode() != CEditor::GoingToEditionMode /* New scenario */ + && getEditor().getMode() != CEditor::AnimationModeLoading /* Loading animation scenario from terminal */) { nldebug("Scenario update received, but not in edition mode"); return; From 2c92649a729077e45ee33bfbd2a4f6f8fc5c2562 Mon Sep 17 00:00:00 2001 From: Nimetu Date: Fri, 27 Mar 2020 17:43:48 +0200 Subject: [PATCH 174/236] Fixed: Default value for WITH_RYZOM_LIVE not used. --- code/CMakeLists.txt | 42 +++++++++++++++++++++++------------------- 1 file changed, 23 insertions(+), 19 deletions(-) diff --git a/code/CMakeLists.txt b/code/CMakeLists.txt index 67d516ba5..0df8279f1 100644 --- a/code/CMakeLists.txt +++ b/code/CMakeLists.txt @@ -63,25 +63,6 @@ SET(RYZOM_VERSION_MAJOR 3) SET(RYZOM_VERSION_MINOR 5) SET(RYZOM_VERSION_PATCH 0) -SET(RYZOM_CLIENT_CREATE_ACCOUNT_URL "https://open.ryzom.dev/ams/" CACHE STRING "Ryzom Client Create Account URL") -SET(RYZOM_CLIENT_EDIT_ACCOUNT_URL "https://open.ryzom.dev/ams/" CACHE STRING "Ryzom Client Edit Account URL") -SET(RYZOM_CLIENT_FORGET_PASSWORD_URL "https://open.ryzom.dev/ams/" CACHE STRING "Ryzom Client Forget Password URL") -SET(RYZOM_CLIENT_PATCH_URL "https://cdn.ryzom.dev/open/patch/" CACHE STRING "Ryzom Client Patch URL") - -SET(RYZOM_WEBIG_MAIN_URL "https://open.ryzom.dev/" CACHE STRING "Ryzom Client WebIG Main URL") -SET(RYZOM_WEBIG_TRUSTED_DOMAIN "open.ryzom.dev" CACHE STRING "Ryzom Client WebIG Trusted Domain") - -# urls when compiling ryzom live client -IF(WITH_RYZOM_LIVE) - SET(RYZOM_CLIENT_CREATE_ACCOUNT_URL "https://account.ryzom.com/signup/from_client.php") - SET(RYZOM_CLIENT_EDIT_ACCOUNT_URL "https://account.ryzom.com/payment_profile/index.php") - SET(RYZOM_CLIENT_FORGET_PASSWORD_URL "https://account.ryzom.com/payment_profile/lost_secure_password.php") - SET(RYZOM_CLIENT_PATCH_URL "http://dl.ryzom.com/patch_live") - - SET(RYZOM_WEBIG_MAIN_URL "https://app.ryzom.com/") - SET(RYZOM_WEBIG_TRUSTED_DOMAIN "app.ryzom.com") -ENDIF() - #----------------------------------------------------------------------------- # Redirect output files SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) @@ -115,6 +96,29 @@ NL_SETUP_BUILD_FLAGS() NL_SETUP_PREFIX_PATHS() RYZOM_SETUP_PREFIX_PATHS() +#----------------------------------------------------------------------------- +# Default values for URL's +SET(RYZOM_CLIENT_CREATE_ACCOUNT_URL "https://open.ryzom.dev/ams/" CACHE STRING "Ryzom Client Create Account URL") +SET(RYZOM_CLIENT_EDIT_ACCOUNT_URL "https://open.ryzom.dev/ams/" CACHE STRING "Ryzom Client Edit Account URL") +SET(RYZOM_CLIENT_FORGET_PASSWORD_URL "https://open.ryzom.dev/ams/" CACHE STRING "Ryzom Client Forget Password URL") +SET(RYZOM_CLIENT_PATCH_URL "https://cdn.ryzom.dev/open/patch/" CACHE STRING "Ryzom Client Patch URL") + +SET(RYZOM_WEBIG_MAIN_URL "https://open.ryzom.dev/" CACHE STRING "Ryzom Client WebIG Main URL") +SET(RYZOM_WEBIG_TRUSTED_DOMAIN "open.ryzom.dev" CACHE STRING "Ryzom Client WebIG Trusted Domain") + +#----------------------------------------------------------------------------- +# urls when compiling ryzom live client +IF(WITH_RYZOM_LIVE) + MESSAGE("Using RYZOM_LIVE urls") + SET(RYZOM_CLIENT_CREATE_ACCOUNT_URL "https://account.ryzom.com/signup/from_client.php") + SET(RYZOM_CLIENT_EDIT_ACCOUNT_URL "https://account.ryzom.com/payment_profile/index.php") + SET(RYZOM_CLIENT_FORGET_PASSWORD_URL "https://account.ryzom.com/payment_profile/lost_secure_password.php") + SET(RYZOM_CLIENT_PATCH_URL "http://dl.ryzom.com/patch_live") + + SET(RYZOM_WEBIG_MAIN_URL "https://app.ryzom.com/") + SET(RYZOM_WEBIG_TRUSTED_DOMAIN "app.ryzom.com") +ENDIF() + #----------------------------------------------------------------------------- #Platform specifics From d4e5af7df27138ce7cc60edfd98cb20abe06c821 Mon Sep 17 00:00:00 2001 From: Ulukyn Date: Fri, 27 Mar 2020 17:36:07 +0100 Subject: [PATCH 175/236] Added: libicu in Makefile --- code/CMakeLists.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/code/CMakeLists.txt b/code/CMakeLists.txt index aceb82ce3..2ce437d86 100644 --- a/code/CMakeLists.txt +++ b/code/CMakeLists.txt @@ -152,6 +152,13 @@ IF(WITH_STATIC) IF(LIBLZMA_LIBRARIES) SET(LIBXML2_LIBRARIES ${LIBXML2_LIBRARIES} ${LIBLZMA_LIBRARIES}) ENDIF() + + # under Linux and OS X, recent libxml2 versions are linked against libicu + FIND_PACKAGE(Icu) + IF(ICU_LIBRARIES) + SET(LIBXML2_LIBRARIES ${LIBXML2_LIBRARIES} ${ICU_LIBRARIES} ${ICU_DATA_LIBRARIES}) + ENDIF() + ENDIF() ENDIF() From 95b0f636221c2cf1ffc85448c3ead147d2476214 Mon Sep 17 00:00:00 2001 From: Ulukyn Date: Sun, 29 Mar 2020 01:39:52 +0100 Subject: [PATCH 176/236] Fixed: hide RP-PVP tags if player are not tagged --- .../src/interface_v3/group_in_scene_user_info.cpp | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/code/ryzom/client/src/interface_v3/group_in_scene_user_info.cpp b/code/ryzom/client/src/interface_v3/group_in_scene_user_info.cpp index 46df394ad..f6ddc09fb 100644 --- a/code/ryzom/client/src/interface_v3/group_in_scene_user_info.cpp +++ b/code/ryzom/client/src/interface_v3/group_in_scene_user_info.cpp @@ -461,16 +461,22 @@ CGroupInSceneUserInfo *CGroupInSceneUserInfo::build (CEntityCL *entity) if (rpTags) { CPlayerCL * pPlayer = dynamic_cast(entity); - CViewBitmap *rp1 = dynamic_cast(leftGroup->getView ("rp_logo_1")); - CViewBitmap *rp2 = dynamic_cast(leftGroup->getView ("rp_logo_2")); - CViewBitmap *rp3 = dynamic_cast(leftGroup->getView ("rp_logo_3")); - CViewBitmap *rp4 = dynamic_cast(leftGroup->getView ("rp_logo_4")); + CViewBitmap *rp1 = dynamic_cast(info->getView ("rp_logo_1")); + CViewBitmap *rp2 = dynamic_cast(info->getView ("rp_logo_2")); + CViewBitmap *rp3 = dynamic_cast(info->getView ("rp_logo_3")); + CViewBitmap *rp4 = dynamic_cast(info->getView ("rp_logo_4")); if (entityTag1.toString() == "_") entityTag1.clear(); if (entityTag2.toString() == "_") entityTag2.clear(); if (entityTag3.toString() == "_") entityTag3.clear(); if (entityTag4.toString() == "_") entityTag4.clear(); + if (pPlayer && !(pPlayer->getPvpMode() & PVP_MODE::PvpFaction)) + { + entityTag3.clear(); + entityTag4.clear(); + } + if (rp1) rp1->setTexture(entityTag1.toString()); if (rp2) rp2->setTexture(entityTag2.toString()); if (rp3) rp3->setTexture(entityTag3.toString()); From 983475ff7c5cf379a2206c88cfdfa2e0aeeacd60 Mon Sep 17 00:00:00 2001 From: Nimetu Date: Sun, 29 Mar 2020 13:54:09 +0300 Subject: [PATCH 177/236] Fixed: Hide 'sound disabled' warning on startup --- code/ryzom/client/src/interface_v3/music_player.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/code/ryzom/client/src/interface_v3/music_player.cpp b/code/ryzom/client/src/interface_v3/music_player.cpp index 2deaa965b..f4d8b7db9 100644 --- a/code/ryzom/client/src/interface_v3/music_player.cpp +++ b/code/ryzom/client/src/interface_v3/music_player.cpp @@ -379,7 +379,10 @@ public: { if(!SoundMngr) { - CInterfaceManager::getInstance()->messageBox (CI18N::get ("uiSoundDisabled")); + // Do not show warning on volume change as its restored at startup + if (Params.find("volume") == std::string::npos) + CInterfaceManager::getInstance()->messageBox (CI18N::get ("uiMP3SoundDisabled")); + return; } From 7f373a904e46a2b2d8d4b661120a4848f565e3ae Mon Sep 17 00:00:00 2001 From: Nimetu Date: Sun, 29 Mar 2020 16:33:53 +0300 Subject: [PATCH 178/236] Fixed: Animal marker invalidates map on each frame --- code/ryzom/client/src/interface_v3/group_map.cpp | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/code/ryzom/client/src/interface_v3/group_map.cpp b/code/ryzom/client/src/interface_v3/group_map.cpp index 03e4a2f9f..dd5e5ae20 100644 --- a/code/ryzom/client/src/interface_v3/group_map.cpp +++ b/code/ryzom/client/src/interface_v3/group_map.cpp @@ -1334,15 +1334,18 @@ void CGroupMap::checkCoords() { if( _AnimalLM[i] ) { + // update pos + sint32 px, py; + _AnimalPosStates[i]->getPos(px, py); + updateLMPosFromDBPos(_AnimalLM[i], px, py); + if (_IsIsland) { _AnimalLM[i]->setActive(false); } - else + else if (_AnimalLM[i]->getActive()) { - _AnimalLM[i]->setActive(true); // update texture from animal status - CInterfaceManager *pIM= CInterfaceManager::getInstance(); CCDBNodeLeaf *statusNode = NLGUI::CDBManager::getInstance()->getDbProp(toString("SERVER:PACK_ANIMAL:BEAST%d", i) + ":STATUS", false); if (statusNode && ANIMAL_STATUS::isInStable((ANIMAL_STATUS::EAnimalStatus)statusNode->getValue32()) ) { @@ -1373,11 +1376,6 @@ void CGroupMap::checkCoords() case ANIMAL_TYPE::Demon: sPrefix = "uiPATitleDemon"; break; } _AnimalLM[i]->setDefaultContextHelp(NLMISC::CI18N::get(sPrefix+toString(i+1))); - - // update pos - sint32 px, py; - _AnimalPosStates[i]->getPos(px, py); - updateLMPosFromDBPos(_AnimalLM[i], px, py); } } } From 598be95efd7bba7f3ca8aa445655be3e6f953e23 Mon Sep 17 00:00:00 2001 From: Nimetu Date: Mon, 30 Mar 2020 10:11:17 +0300 Subject: [PATCH 179/236] Added: Ingame config options for window snap. --- code/ryzom/client/client_default.cfg | 3 +++ code/ryzom/client/src/main_loop_utilities.cpp | 3 +++ 2 files changed, 6 insertions(+) diff --git a/code/ryzom/client/client_default.cfg b/code/ryzom/client/client_default.cfg index 9d4d5c79a..a8476b5c6 100644 --- a/code/ryzom/client/client_default.cfg +++ b/code/ryzom/client/client_default.cfg @@ -335,6 +335,9 @@ R2EDMaxMapScale = 8.0; WindowSnapInvert = 0; WindowSnapDistance = 10; +WindowSnapDistance_min = 0; +WindowSnapDistance_max = 50; +WindowSnapDistance_step = 1; ////////////////// // SOUND CONFIG // diff --git a/code/ryzom/client/src/main_loop_utilities.cpp b/code/ryzom/client/src/main_loop_utilities.cpp index 4243e15b0..4a4b2bc38 100644 --- a/code/ryzom/client/src/main_loop_utilities.cpp +++ b/code/ryzom/client/src/main_loop_utilities.cpp @@ -110,6 +110,9 @@ void updateFromClientCfg() if (ClientCfg.BilinearUI != LastClientCfg.BilinearUI) CViewRenderer::getInstance()->setBilinearFiltering(ClientCfg.BilinearUI); + CWidgetManager::getInstance()->setWindowSnapInvert(ClientCfg.WindowSnapInvert); + CWidgetManager::getInstance()->setWindowSnapDistance(ClientCfg.WindowSnapDistance); + //--------------------------------------------------- if (ClientCfg.WaitVBL != LastClientCfg.WaitVBL) { From 7b15da10183b90346b62396baa97a5fd34107df8 Mon Sep 17 00:00:00 2001 From: Ulukyn Date: Tue, 31 Mar 2020 14:13:44 +0200 Subject: [PATCH 180/236] Removed: client_default.cfg (moved to ryzom-data) --- code/ryzom/client/client_default.cfg | 601 --------------------------- 1 file changed, 601 deletions(-) delete mode 100644 code/ryzom/client/client_default.cfg diff --git a/code/ryzom/client/client_default.cfg b/code/ryzom/client/client_default.cfg deleted file mode 100644 index 444f8d20a..000000000 --- a/code/ryzom/client/client_default.cfg +++ /dev/null @@ -1,601 +0,0 @@ -////////////////////////// -////////////////////////// -/// CLIENT CONFIG FILE /// -////////////////////////// -////////////////////////// - - -// If you set this variable to 1, your client.cfg will be overwritten when you quit the client. -// You will loose all the comments and identation in this file. -SaveConfig = 1; - -/////////////////// -// WINDOW CONFIG // -/////////////////// - -Driver3D="Auto"; // Valid values are "Auto" or "0", "OpengGL" or "1" & "Direct3D" or "2" - // "Auto" will choose the best suited driver depending on hardware -FullScreen = 0; -Width = 0; -Height = 0; -PositionX = 0; -PositionY = 0; -Frequency = 0; -Depth = 32; -Sleep = -1; -ProcessPriority = 0; // -2 = idle, -1 = below normal, 0 = normal, 1 = above normal, 2 = high, 3 = real time -Contrast = 0.0; // -1.0 ~ 1.0 -Luminosity = 0.0; // -1.0 ~ 1.0 -Gamma = 0.0; // -1.0 ~ 1.0 -Contrast_min = -1.0; -Luminosity_min = -1.0; -Gamma_min = -1.0; -Contrast_max = 1.0; -Luminosity_max = 1.0; -Gamma_max = 1.0; - - -///////////// -// NETWORK // -///////////// - -Application = { "ryzom_live", "./client_ryzom_r.exe", "./" }; -BackgroundDownloader = 0; -StartupHost = "shard.ryzom.com:40916"; -StartupPage = "/login/r2_login.php"; - -ConditionsTermsURL = "http://app.ryzom.com/app_forum/index.php?page=topic/view/21885/1&post148782=en#1"; -LoginSupportURL = "http://app.ryzom.com/app_forum/index.php?page=topic/view/22047/1&post149889=en#1"; -NamingPolicyURL = "http://app.ryzom.com/app_forum/index.php?page=topic/view/21885/1&post148784=en#3"; - -// Full path and filename where cURL can find certificate bundle file -// cacert.pem file can be downloaded from https://curl.haxx.se/docs/caextract.html -// and added to client data path or system specific bundle can be used -// Ubuntu has "/etc/ssl/certs/ca-certificates.crt" -// % = defaultConfigFilePath -CurlCABundle = "%cacert.pem"; - -//////////////// -// INTERFACES // -//////////////// - -// the language to use as in ISO 639-2 -LanguageCode = "en"; // english - -XMLInputFile = "input_config_v3.xml"; - -XMLLoginInterfaceFiles = { - "login_config.xml", - "login_widgets.xml", - "login_main.xml", - "login_keys.xml", -}; - -XMLOutGameInterfaceFiles = { - "out_v2_config.xml", - "out_v2_widgets.xml", - "out_v2_connect.xml", - "out_v2_intro.xml", - "out_v2_select.xml", - "out_v2_appear.xml", - "out_v2_location.xml", - "out_v2_crash.xml", - "out_v2_hierarchy.xml", - "out_v2_keys.xml", -}; - -// The ligo primitive class file -LigoPrimitiveClass = "world_editor_classes.xml"; - -VerboseLog = 1; - -/////////// -// MOUSE // -/////////// -HardwareCursor = 1; - -CursorSpeed = 1.0; // In pixels per mickey -CursorSpeed_min = 0.5; -CursorSpeed_max = 2.0; - -CursorAcceleration = 40; // Threshold in mickey -CursorAcceleration_min = 20; -CursorAcceleration_max = 80; - -FreeLookSpeed = 0.004; // In radian per mickey -FreeLookSpeed_min = 0.0001; -FreeLookSpeed_max = 0.01; - -FreeLookAcceleration = 40; // Threshold in mickey -FreeLookAcceleration_min = 20; -FreeLookAcceleration_max = 80; - -FreeLookInverted = 0; -FreeLookTablet = 0; -AutomaticCamera = 0; -DblClickMode = 1; -AutoEquipTool = 1; - -/////////////////// -// RENDER CONFIG // -/////////////////// - -// NB: thoses variables configure also the InGameConfigurator: -// _min and _max define the bounds -// _step defines the step (NB: take care of _min and _max!!) -// _ps0 is the LOW preset, _ps1 is the MEDIUM preset, _ps2 is the NORMAL Preset, and _ps3 is the HIGH one - - -// *** LANDSCAPE -LandscapeTileNear = 50.000000; -LandscapeTileNear_min = 20.000000; -LandscapeTileNear_max = 100.000000; -LandscapeTileNear_step = 10.0; -LandscapeTileNear_ps0 = 20.0; -LandscapeTileNear_ps1 = 40.0; -LandscapeTileNear_ps2 = 50.0; -LandscapeTileNear_ps3 = 80.0; - -// NB: threshold is inverted ULandscape::setThreshold(), to be more intelligible -LandscapeThreshold = 1000.0; -LandscapeThreshold_min = 100.0; // Low quality => 0.01 threshold -LandscapeThreshold_max = 2000.0; // High quality => 0.0005 threshold -LandscapeThreshold_step = 100.0; -LandscapeThreshold_ps0 = 100.0; -LandscapeThreshold_ps1 = 500.0; -LandscapeThreshold_ps2 = 1000.0; -LandscapeThreshold_ps3 = 2000.0; - -Vision = 500.000000; -Vision_min = 200.000000; -Vision_max = 800.000000; -Vision_step = 100.000000; -Vision_ps0 = 200.0; -Vision_ps1 = 400.0; -Vision_ps2 = 500.0; -Vision_ps3 = 800.0; - -MicroVeget = 1; // Enable/Disable MicroVeget. -MicroVeget_ps0 = 0; -MicroVeget_ps1 = 1; -MicroVeget_ps2 = 1; -MicroVeget_ps3 = 1; - -MicroVegetDensity = 80.0; -MicroVegetDensity_min = 10.0; -MicroVegetDensity_max = 100.0; -MicroVegetDensity_step = 10.0; -MicroVegetDensity_ps0 = 10.0; // not used since disabled! -MicroVegetDensity_ps1 = 30.0; -MicroVegetDensity_ps2 = 80.0; -MicroVegetDensity_ps3 = 100.0; - - -// *** FX -FxNbMaxPoly = 20000; -FxNbMaxPoly_min = 2000; -FxNbMaxPoly_max = 50000; -FxNbMaxPoly_step= 2000; -FxNbMaxPoly_ps0 = 2000; -FxNbMaxPoly_ps1 = 10000; -FxNbMaxPoly_ps2 = 20000; -FxNbMaxPoly_ps3 = 50000; - -Cloud = 1; -Cloud_ps0 = 0 ; -Cloud_ps1 = 1 ; -Cloud_ps2 = 1 ; -Cloud_ps3 = 1 ; - -CloudQuality = 160.0; -CloudQuality_min = 80.0; -CloudQuality_max = 320.0; -CloudQuality_step = 20.0; -CloudQuality_ps0 = 80.0; // not used since disabled! -CloudQuality_ps1 = 80.0; -CloudQuality_ps2 = 160.0; -CloudQuality_ps3 = 320.0; - -CloudUpdate = 1; -CloudUpdate_min = 1; -CloudUpdate_max = 8; -CloudUpdate_step= 1; -CloudUpdate_ps0 = 1; // not used since disabled! -CloudUpdate_ps1 = 1; -CloudUpdate_ps2 = 1; -CloudUpdate_ps3 = 3; - -Shadows = 1; -Shadows_ps0 = 0; -Shadows_ps1 = 1; -Shadows_ps2 = 1; -Shadows_ps3 = 1; - -FXAA = 1; -FXAA_ps0 = 0; -FXAA_ps1 = 1; -FXAA_ps2 = 1; -FXAA_ps3 = 1; - -AnisotropicFilter = 0; - -Bloom = 1; -Bloom_ps0 = 0; -Bloom_ps1 = 1; -Bloom_ps2 = 1; -Bloom_ps3 = 1; - -SquareBloom = 1; -SquareBloom_ps0 = 0; -SquareBloom_ps1 = 1; -SquareBloom_ps2 = 1; -SquareBloom_ps3 = 1; - -DensityBloom = 255.0; -DensityBloom_min = 0.0; -DensityBloom_max = 255.0; -DensityBloom_step = 1.0; -DensityBloom_ps0 = 255.0; -DensityBloom_ps1 = 255.0; -DensityBloom_ps2 = 255.0; -DensityBloom_ps3 = 255.0; - - -// *** CHARACTERS -SkinNbMaxPoly = 100000; -SkinNbMaxPoly_min = 5000; -SkinNbMaxPoly_max = 250000; -SkinNbMaxPoly_step = 5000; -SkinNbMaxPoly_ps0 = 10000; -SkinNbMaxPoly_ps1 = 70000; -SkinNbMaxPoly_ps2 = 100000; -SkinNbMaxPoly_ps3 = 200000; - -NbMaxSkeletonNotCLod = 125; -NbMaxSkeletonNotCLod_min = 5; -NbMaxSkeletonNotCLod_max = 255; -NbMaxSkeletonNotCLod_step = 5; -NbMaxSkeletonNotCLod_ps0 = 10; -NbMaxSkeletonNotCLod_ps1 = 50; -NbMaxSkeletonNotCLod_ps2 = 125; -NbMaxSkeletonNotCLod_ps3 = 255; - -CharacterFarClip = 200.0; -CharacterFarClip_min = 50.0; -CharacterFarClip_max = 500.0; -CharacterFarClip_step = 10.0; -CharacterFarClip_ps0 = 50.0; -CharacterFarClip_ps1 = 100.0; -CharacterFarClip_ps2 = 200.0; -CharacterFarClip_ps3 = 500.0; - -EnableRacialAnimation = 1; - -// *** MISC -// This is the actual aspect ratio of your screen (no relation with the resolution!!). Set 1.7777 if you got a 16/9 screen for instance -ScreenAspectRatio = 0.0; -ForceDXTC = 1; // Enable/Disable DXTC. -DivideTextureSizeBy2= 0; // Divide texture size -DisableVtxProgram = 0; // Disable Hardware Vertex Program. -DisableVtxAGP = 0; // Disable Hardware Vertex AGP. -DisableTextureShdr = 0; // Disable Hardware Texture Shader. -HDEntityTexture = 1; -HDTextureInstalled = 1; -WaitVBL = 0; // 0 or 1 to wait Vertical Sync. - -////////////////// -// GAME OPTIONS // -////////////////// -SelectWithRClick = 1; -DisplayWeapons = 1; -RotKeySpeedMax = 2.0; -RotKeySpeedMax_min = 1.0; -RotKeySpeedMax_max = 4.0; -RotKeySpeedMin = 1.0; -RotKeySpeedMin_min = 0.5; -RotKeySpeedMin_max = 2.0; -RotAccel = 3.0; -FollowOnAtk = 0; -AtkOnSelect = 0; -ZCPacsPrim = "gen_bt_col_ext.pacs_prim"; - -///////////////// -// PREFERENCES // -///////////////// -FPV = 0; // FPV(First Person View) : default is false (Third Person View). -CameraHeight = 2.2; // Camera Height (in meter) from the ground (for the Third Person View). -CameraDistance = 3.0; // Camera Distance(in meter) from the user (for the Third Person View). -CameraDistStep = 1.0; -CameraDistMin = 1.0; -CameraDistMax = 25.0; -CameraAccel = 5.0; -CameraSpeedMin = 2.0; -CameraSpeedMax = 100.0; -CameraResetSpeed = 10.0; // Speed in radian/s - -// Values for UI Scale -InterfaceScale = 1.0; -InterfaceScale_min = 0.8; -InterfaceScale_max = 2.0; -InterfaceScale_step = 0.05; - -// Enable biliner filtering for UI textures -// Texture atlas needs to be generated with border duplication -// or there will be visible texture bleeding -BilinearUI = 1; - -// Default values for map -MaxMapScale = 2.0; -R2EDMaxMapScale = 8.0; - -////////////////// -// SOUND CONFIG // -////////////////// -SoundForceSoftwareBuffer= 1; -SoundOn = 1; -UseEax = 0; - -MaxTrack = 32; -MaxTrack_min = 4; -MaxTrack_max = 32; -MaxTrack_step = 4; - -// This is the volume for "InGame" sound FXs -SoundSFXVolume = 1.0; -SoundSFXVolume_min = 0.0; -SoundSFXVolume_max = 1.0; -SoundSFXVolume_step = 0.001; - -// This is volume for "InGame" music. Does not affect the MP3 player -SoundGameMusicVolume = 0.5; -SoundGameMusicVolume_min = 0.0; -SoundGameMusicVolume_max = 1.0; -SoundGameMusicVolume_step = 0.001; - -// MP3 player -MediaPlayerDirectory = "music"; -MediaPlayerAutoPlay = false; - -// MISC -PreDataPath = { "user", "patch", "data", "examples" }; -NeedComputeVS = 0; - -NegFiltersDebug = {"Update DB", "Reading:", "Read Value :", "impulseCallBack", "CLIMPD:", "LNET" }; -NegFiltersInfo = { "CLIMPD:", "CPath::lookup" , "LNET" }; -NegFiltersWarning = { "'basics.Equipment Slot'.", "_usercolor.tga", "PACS" }; - -// Big screen shot -ScreenShotWidth = 0; -ScreenShotHeight = 0; -ScreenShotFullDetail = 1; // 1 to switch full detail mode for characters (both standard & big screenshots) - -// Read : "ID", "R G B A MODE [FX]" -SystemInfoColors = -{ -// OLD STUFF Here for compatibility -"RG", "0 0 0 255 normal", // Black to see when there is an error -"BC", "0 0 0 255 normal", // Black to see when there is an error -"JA", "0 0 0 255 normal", // Black to see when there is an error -"BL", "0 0 0 255 normal", // Black to see when there is an error -"VE", "0 0 0 255 normal", // Black to see when there is an error -"VI", "0 0 0 255 normal", // Black to see when there is an error - -// NEW System Info Categories -"SYS", "255 255 255 255 normal", // Default system messages -"BC", "255 255 255 255 centeraround", // Broadcast messages -"TAGBC", "255 255 255 255 centeraround", // Taged broadcast messages : color should remain white as some word are tagged -"XP", "255 255 64 255 over", // XP Gain -"SP", "255 255 64 255 over", // SP Gain -"TTL", "255 255 64 255 over", // Title -"TSK", "255 255 255 255 over", // Task -"ZON", "255 255 255 255 center", // Zone -"DG", "255 0 0 255 normal", // Damage to me -"DMG", "255 0 0 255 normal", // Damage to me -"DGP", "200 0 0 255 normal", // Damage to me from player -"DGM", "255 128 64 255 normal", // Damage from me -"MIS", "150 150 150 255 normal", // The opponent misses -"MISM", "255 255 255 255 normal", // I miss -"ITM", "0 200 0 255 over", // Item -"ITMO", "170 170 255 255 overonly", // Item other in group -"ITMF", "220 0 220 255 over", // Item failed -"SPL", "50 50 250 255 normal", // Spell to me -"SPLM", "50 150 250 255 normal", // Spell from me -"EMT", "255 150 150 255 normal", // Emote -"MTD", "255 255 0 255 over", // Message Of The Day -"FORLD","64 255 64 255 overonly", // Forage Locate Deposit -"CHK", "255 120 60 255 center", // Tous ce qui ne remplit pas une condition -"CHKCB","255 255 0 255 center", // Tous ce qui ne remplit pas une condition en combat (trop loin, cible invalide, pas assez de mana, etc.) -"PVPTM","255 120 60 255 overonly", // PVP timer -"THM", "255 255 64 255 over misc_levelup.ps", // Thema finished -"AMB", "255 255 64 255 center", // Ambiance -"ISE", "192 208 255 255 normal", // Item special effect -"ISE2", "192 208 255 255 center", // Item special effect with center text (for effects without flying text) -"OSM", "128 160 255 255 center", // Outpost state message -"AROUND","255 255 0 255 around", // Only in around channel -"R2_INVITE","0 255 0 255 around", // Ring invitation -}; - -loadingTexts = { - "0", "132", "30 144 255 255", "18", "uiS2", - "0", "105", "255 188 0 255", "14", "uiS2E0", - "0", "65", "255 255 255 255", "12", "NEWS" -}; - -DisplayMissingAnimFile = 0; - -LoadingStringCount = 54; - - -// Some R2 parameters ... - -R2Mode = 1; -R2EDEnabled = 1; -R2EDExtendedDebug = 0; -R2EDLightPalette = 0; -R2ClientGw = "r2linux01"; -LoadLuaDebugger = 0; -CheckR2ScenarioMD5 = 1; -LevelDesignEnabled = 0; - -DmCameraDistMax = 25; -DmRun = 20; -DmWalk = 6; - -R2EDReloadFiles = { - "r2ed.xml", - "r2_basic_bricks.lua", - "r2_components.lua", - "r2_core.lua", - "r2_features_default.lua", - "r2_features_fauna.lua", - "r2_features_npc_groups.lua", - "r2_palette.lua", - "r2_scenario.lua", - "r2_ui.lua" -}; - -XMLInterfaceFiles = { - "config.xml", - "widgets.xml", - "webig_widgets.xml", - "appzone.xml", - "player.xml", - "inventory.xml", - "interaction.xml", - "phrase.xml", - "harvest.xml", - "macros.xml", - "info_player.xml", - "outpost.xml", - "guild.xml", - "taskbar.xml", - "game_config.xml", - "game_context_menu.xml", - "player_trade.xml", - "bot_chat_v4.xml", - "compass.xml", - "map.xml", - "hierarchy.xml", - "reset.xml", - "actions.xml", - "help.xml", - "encyclopedia.xml", - "commands.xml", - "commands2.xml", - "ring_access_point_filter.xml", - "ring_window.xml", - "bg_downloader.xml", - "ryzhome_toolbar.xml", - "tp_interface.xml" -}; - -XMLR2EDInterfaceFiles = -{ - "r2ed.xml", - "r2_triggers.xml", - "r2_logic_entities.xml", - "r2ed_acts.xml", - "r2ed_scenario.xml", - "r2ed_connect.xml" -}; - -FogDistAndDepthLookupBias = 20; // bias for lookup of fog distance and depth - - -// Hardware cursor textures -// These will be extracted from the corresponding packed ui .tga files when they are loaded -// * -// * individual .tga files for hardware cursor bitmap not looked for, and not supported yet -HardwareCursors = -{ - "curs_can_pan.tga", - "curs_can_pan_dup.tga", - "curs_create.tga", - "curs_create_multi.tga", - "curs_create_vertex_invalid.tga", - "curs_default.tga", - "curs_dup.tga", - "curs_L.tga", - "curs_M.tga", - "curs_pan.tga", - "curs_pan_dup.tga", - "curs_pick.tga", - "curs_pick_dup.tga", - "curs_R.tga", - "curs_resize_BL_TR.tga", - "curs_resize_BR_TL.tga", - "curs_resize_LR.tga", - "curs_resize_TB.tga", - "curs_rotate.tga", - "curs_scale.tga", - "curs_stop.tga", - "text_cursor.tga", - "r2_hand_can_pan.tga", - "r2_hand_pan.tga", - "r2ed_tool_can_pick.tga", - "r2ed_tool_can_rotate.tga", - "r2ed_tool_pick.tga", - "r2ed_tool_rotate.tga", - "r2ed_tool_rotating.tga" -}; - -Loading_BG = "new_loading_bg.tga"; // Default name for the loading background file. -Launch_BG = "new_launcher_bg.tga"; // Default name for the launch background file. -TeleportKami_BG = "new_teleport_kami_bg.tga"; -TeleportKaravan_BG = "new_teleport_caravan_bg.tga"; -Elevator_BG = "new_elevator_bg.tga"; // Default name for the loading background file. -ResurectKami_BG = "new_resurect_kami_bg.tga"; -ResurectKaravan_BG = "new_resurect_caravane_bg.tga"; -End_BG = "end_bg.tga"; // Default name for the last background file. - -ScenarioSavePath = "./my_scenarios/"; - -// list ofpredefined keyset -// name will be looked up in the translation file by searching 'uiCP_KeysetName_" + id -// tooltip will be looked up in the translation file by searching 'uiCP_KeysetTooltip_" + id -// 'bi.' stands for built-in -// note : we add a dot in the name to be sure that there cannot be a conflict with character keyset name -BuiltInKeySets = -{ - "", // default ryzom keyboard layout - "bi.zqsd", // european keyboard fps displacement style (NB : don't change this layout name, ryzom will automatically select it if keyboard is french or belgian) - "bi.wasd", // english keyboard fps displacement style (NB : don't change this layout name, ryzom will automatically select it if keyboard is not french nor belgian) - "bi.wow_alike" // 'world of warcraft' like keyboard style. (NB : not available for ring) -}; - -// "Newbie Training", "Story Telling", "Mistery", "Hack & Slash", "Guild Training", "Other" -ScenarioTypes = {"so_newbie_training","so_story_telling","so_mistery","so_hack_slash","so_guild_training","so_other"}; - -ScenarioLanguages = {"fr","de","en","other_lang"}; - -// Map each language to a forum help page -HelpPages = -{ - "fr=https://app.ryzom.com/app_forum/index.php?page=topic/view/6629/1&lang=fr", - "en=https://app.ryzom.com/app_forum/index.php?page=topic/view/6629/1&lang=en", - "wk=https://app.ryzom.com/app_forum/index.php?page=topic/view/6629/1", - "de=https://app.ryzom.com/app_forum/index.php?page=topic/view/6629/1&lang=de", - "es=https://app.ryzom.com/app_forum/index.php?page=topic/view/6629/1&lang=es", - "ru=https://app.ryzom.com/app_forum/index.php?page=topic/view/6629/1&lang=ru" -}; - -// User created channel -ChannelIgnoreFilter = -{ - "Uni Français", "English Uni", "Español Uni", - "русский Uni", "Deutsch Uni", "Karavan", - "Kami", "Ranger", "Marauder", "Fyros", - "Matis", "Tryker", "Zoraï" -}; - -// interval in minutes for webig notify thread to run -WebIgNotifInterval = 10; -WebIgMainDomain = "app.ryzom.com"; -WebIgTrustedDomains = { - "api.ryzom.com", "app.ryzom.com" -}; -PatchletUrl = "http://app.ryzom.com/app_patchlet/index.php?patch=preload"; - -SelectedSlot = 0; - -BuildName = "RELEASE_HEAD"; From a6c7b3dd37f339558242990e888a58165cb9e236 Mon Sep 17 00:00:00 2001 From: Nimetu Date: Tue, 31 Mar 2020 17:37:48 +0300 Subject: [PATCH 181/236] Fixed: mp3 player keeps playing after clearing files from playlist --- code/ryzom/client/src/interface_v3/music_player.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/ryzom/client/src/interface_v3/music_player.cpp b/code/ryzom/client/src/interface_v3/music_player.cpp index f4d8b7db9..717ea7e66 100644 --- a/code/ryzom/client/src/interface_v3/music_player.cpp +++ b/code/ryzom/client/src/interface_v3/music_player.cpp @@ -85,7 +85,7 @@ void CMusicPlayer::playSongs (const std::vector &songs) rebuildPlaylist(); // If pause, stop, else play will resume - if (_State == Paused) + if (_State == Paused || _Songs.empty()) _State = Stopped; } From b3f8f307b04e565a3275b1352a0071645d96e7e9 Mon Sep 17 00:00:00 2001 From: Nimetu Date: Wed, 1 Apr 2020 17:23:09 +0300 Subject: [PATCH 182/236] Changed: Use worker thread to gather song title/duration. --- .../client/src/interface_v3/music_player.cpp | 244 +++++++++++++++--- .../client/src/interface_v3/music_player.h | 17 +- 2 files changed, 226 insertions(+), 35 deletions(-) diff --git a/code/ryzom/client/src/interface_v3/music_player.cpp b/code/ryzom/client/src/interface_v3/music_player.cpp index 717ea7e66..10b4cd288 100644 --- a/code/ryzom/client/src/interface_v3/music_player.cpp +++ b/code/ryzom/client/src/interface_v3/music_player.cpp @@ -28,6 +28,9 @@ #include "interface_manager.h" #include "../client_cfg.h" +#include "nel/misc/thread.h" +#include "nel/misc/mutex.h" + using namespace std; using namespace NLMISC; using namespace NL3D; @@ -48,6 +51,88 @@ extern UDriver *Driver; #define MP3_SAVE_REPEAT "UI:SAVE:MP3_REPEAT" CMusicPlayer MusicPlayer; +static NLMISC::CUnfairMutex MusicPlayerMutex; + +// *************************************************************************** +class CMusicPlayerWorker : public NLMISC::IRunnable +{ +private: + bool _Running; + IThread *_Thread; + + std::vector _Files; + +public: + CMusicPlayerWorker(): _Running(false), _Thread(NULL) + { + } + + ~CMusicPlayerWorker() + { + _Running = false; + if (_Thread) + { + _Thread->terminate(); + delete _Thread; + _Thread = NULL; + } + } + + bool isRunning() const { return _Running; } + + void run() + { + _Running = true; + + uint i = 0; + while(_Running && SoundMngr && i < _Files.size()) + { + // get copy incase _Files changes + std::string filename(_Files[i]); + + std::string title; + float length; + + if (SoundMngr->getMixer()->getSongTitle(filename, title, length)) + { + MusicPlayer.updateSong(filename, title, length); + } + + ++i; + } + + _Running = false; + _Files.clear(); + } + + // called from GUI + void getSongsInfo(const std::vector &filenames) + { + if (_Thread) + { + stopThread(); + } + + _Files = filenames; + + _Thread = IThread::create(this); + nlassert(_Thread != NULL); + _Thread->start(); + } + + void stopThread() + { + _Running = false; + if (_Thread) + { + _Thread->wait(); + delete _Thread; + _Thread = NULL; + } + } +}; + +static CMusicPlayerWorker MusicPlayerWorker; // *************************************************************************** @@ -69,11 +154,14 @@ bool CMusicPlayer::isShuffleEnabled() const return (NLGUI::CDBManager::getInstance()->getDbProp(MP3_SAVE_SHUFFLE)->getValue32() == 1); } - // *************************************************************************** -void CMusicPlayer::playSongs (const std::vector &songs) +void CMusicPlayer::playSongs (const std::vector &filenames) { - _Songs = songs; + _Songs.clear(); + for (uint i=0; i _Songs.size()) @@ -87,6 +175,9 @@ void CMusicPlayer::playSongs (const std::vector &songs) // If pause, stop, else play will resume if (_State == Paused || _Songs.empty()) _State = Stopped; + + // get song title/duration using worker thread + MusicPlayerWorker.getSongsInfo(filenames); } // *************************************************************************** @@ -107,6 +198,88 @@ void CMusicPlayer::updatePlaylist(sint prevIndex) if (pIE) pIE->setActive(true); } +// *************************************************************************** +// called from worker thread +void CMusicPlayer::updateSong(const std::string filename, const std::string title, float length) +{ + CAutoMutex mutex(MusicPlayerMutex); + + _SongUpdateQueue.push_back(CSongs(filename, title, length)); +} + +// *************************************************************************** +// called from GUI +void CMusicPlayer::updateSongs() +{ + CAutoMutex mutex(MusicPlayerMutex); + if (!_SongUpdateQueue.empty()) + { + for(uint i = 0; i < _SongUpdateQueue.size(); ++i) + { + updateSong(_SongUpdateQueue[i]); + } + _SongUpdateQueue.clear(); + } +} + +// *************************************************************************** +void CMusicPlayer::updateSong(const CSongs &song) +{ + uint index = 0; + while(index < _Songs.size()) + { + if (_Songs[index].Filename == song.Filename) + { + _Songs[index].Title = song.Title; + _Songs[index].Length = song.Length; + break; + } + + ++index; + } + if (index == _Songs.size()) + { + nlwarning("Unknown song file '%s'", song.Filename.c_str()); + return; + } + + std::string rowId(toString("%s:s%d", MP3_PLAYER_PLAYLIST_LIST, index)); + CInterfaceGroup *pIG = dynamic_cast(CWidgetManager::getInstance()->getElementFromId(rowId)); + if (!pIG) + { + nlwarning("Playlist row '%s' not found", rowId.c_str()); + return; + } + + CViewText *pVT; + pVT = dynamic_cast(pIG->getView(TEMPLATE_PLAYLIST_SONG_TITLE)); + if (pVT) + { + pVT->setHardText(song.Title); + } + else + { + nlwarning("title element '%s' not found", TEMPLATE_PLAYLIST_SONG_TITLE); + } + + pVT = dynamic_cast(pIG->getView(TEMPLATE_PLAYLIST_SONG_DURATION)); + if (pVT) + { + uint min = (sint32)(song.Length / 60) % 60; + uint sec = (sint32)(song.Length) % 60; + uint hour = song.Length / 3600; + std::string duration(toString("%02d:%02d", min, sec)); + if (hour > 0) + duration = toString("%02d:", hour) + duration; + + pVT->setHardText(duration); + } + else + { + nlwarning("duration element '%s' not found", TEMPLATE_PLAYLIST_SONG_DURATION); + } +} + // *************************************************************************** void CMusicPlayer::shuffleAndRebuildPlaylist() { @@ -131,12 +304,16 @@ void CMusicPlayer::rebuildPlaylist() _CurrentSongIndex = i; } - uint min = (sint32)(_Songs[i].Length / 60) % 60; - uint sec = (sint32)(_Songs[i].Length) % 60; - uint hour = _Songs[i].Length / 3600; - std::string duration(toString("%02d:%02d", min, sec)); - if (hour > 0) - duration = toString("%02d:", hour) + duration; + std::string duration("--:--"); + if (_Songs[i].Length > 0) + { + uint min = (sint32)(_Songs[i].Length / 60) % 60; + uint sec = (sint32)(_Songs[i].Length) % 60; + uint hour = _Songs[i].Length / 3600; + duration = toString("%02d:%02d", min, sec); + if (hour > 0) + duration = toString("%02d:", hour) + duration; + } vector< pair > vParams; vParams.push_back(pair("id", "s" + toString(i))); @@ -289,6 +466,12 @@ void CMusicPlayer::update () { if(!SoundMngr) return; + + if (MusicPlayerWorker.isRunning() || !_SongUpdateQueue.empty()) + { + updateSongs(); + } + if (_State == Playing) { CViewText *pVT = dynamic_cast(CWidgetManager::getInstance()->getElementFromId("ui:interface:mp3_player:screen:text")); @@ -331,7 +514,7 @@ void CMusicPlayer::update () } // *************************************************************************** -static void addFromPlaylist(const std::string &playlist, std::vector &filenames) +static void addFromPlaylist(const std::string &playlist, const std::vector &extensions, std::vector &filenames) { static uint8 utf8Header[] = { 0xefu, 0xbbu, 0xbfu }; @@ -362,9 +545,19 @@ static void addFromPlaylist(const std::string &playlist, std::vector songs; - for (i=0; igetMixer()->getSongTitle(filenames[i], song.Title, song.Length); - if (song.Length > 0) - songs.push_back (song); - } + // Sort songs by filename + sort(filenames.begin(), filenames.end()); - MusicPlayer.playSongs(songs); + MusicPlayer.playSongs(filenames); } else if (Params == "update_playlist") { diff --git a/code/ryzom/client/src/interface_v3/music_player.h b/code/ryzom/client/src/interface_v3/music_player.h index 549fa169d..3569d6439 100644 --- a/code/ryzom/client/src/interface_v3/music_player.h +++ b/code/ryzom/client/src/interface_v3/music_player.h @@ -42,12 +42,16 @@ public: class CSongs { public: + CSongs(std::string file = std::string(), std::string title = std::string(), float length = 0.f) + : Filename(file), Title(title), Length(length) + { } + std::string Filename; std::string Title; float Length; }; - void playSongs (const std::vector &songs); + void playSongs (const std::vector &filenames); void play (sint index = -1); // Play the song at current position, if playing, restart. If paused, resume. void pause (); void stop (); @@ -68,12 +72,23 @@ public: // Update playlist active row void updatePlaylist(sint prevIndex = -1); + // Update single song title/duration on _Songs and on playlist + void updateSong(const CSongs &song); + + // Update _Songs and playlist from _SongUpdateQueue + void updateSongs(); + + // update song from worker thread + void updateSong(const std::string filename, const std::string title, float length); + private: // The playlist CSongs _CurrentSong; uint _CurrentSongIndex; // If (!_Songs.empty()) must always be <_Songs.size() std::vector _Songs; + // updated info from worker thread + std::vector _SongUpdateQueue; // State enum TState { Stopped, Playing, Paused } _State; From 682985978de0c84164011b85e180b3b14412e602 Mon Sep 17 00:00:00 2001 From: Nimetu Date: Thu, 2 Apr 2020 11:10:51 +0300 Subject: [PATCH 183/236] Changed: Automatically build playlist on play if needed --- .../client/src/interface_v3/music_player.cpp | 125 ++++++++++-------- .../client/src/interface_v3/music_player.h | 3 + 2 files changed, 75 insertions(+), 53 deletions(-) diff --git a/code/ryzom/client/src/interface_v3/music_player.cpp b/code/ryzom/client/src/interface_v3/music_player.cpp index 10b4cd288..2f02352fb 100644 --- a/code/ryzom/client/src/interface_v3/music_player.cpp +++ b/code/ryzom/client/src/interface_v3/music_player.cpp @@ -353,6 +353,17 @@ void CMusicPlayer::play (sint index) if(!SoundMngr) return; + if (_Songs.empty()) + { + index = 0; + createPlaylistFromMusic(); + } + + if (_Songs.empty()) + { + _State = Stopped; + return; + } sint prevSongIndex = _CurrentSongIndex; @@ -465,7 +476,10 @@ void CMusicPlayer::next () void CMusicPlayer::update () { if(!SoundMngr) + { + _State = Stopped; return; + } if (MusicPlayerWorker.isRunning() || !_SongUpdateQueue.empty()) { @@ -564,6 +578,63 @@ static void addFromPlaylist(const std::string &playlist, const std::vector extensions; + SoundMngr->getMixer()->getMusicExtensions(extensions); + + // no format supported + if (extensions.empty()) + { + // in the very unlikely scenario + const ucstring message("Sound driver has no support for music."); + CInterfaceManager::getInstance()->displaySystemInfo(message, "SYS"); + nlinfo("%s", message.toUtf8().c_str()); + return; + } + std::string newPath = CPath::makePathAbsolute(CPath::standardizePath(ClientCfg.MediaPlayerDirectory), CPath::getCurrentPath(), true); + std::string extlist; + join(extensions, ", ", extlist); + extlist += ", m3u, m3u8"; + + std::string msg(CI18N::get("uiMk_system6").toUtf8()); + msg += ": " + newPath + " (" + extlist + ")"; + CInterfaceManager::getInstance()->displaySystemInfo(ucstring::makeFromUtf8(msg), "SYS"); + nlinfo("%s", msg.c_str()); + + // Recursive scan for files from media directory + vector filesToProcess; + CPath::getPathContent (newPath, true, false, true, filesToProcess); + + uint i; + std::vector filenames; + std::vector playlists; + + for (i = 0; i < filesToProcess.size(); ++i) + { + std::string ext = toLower(CFile::getExtension(filesToProcess[i])); + if (std::find(extensions.begin(), extensions.end(), ext) != extensions.end()) + { + filenames.push_back(filesToProcess[i]); + } + else if (ext == "m3u" || ext == "m3u8") + { + playlists.push_back(filesToProcess[i]); + } + } + + // Add songs from playlists + for (i = 0; i < playlists.size(); ++i) + { + addFromPlaylist(playlists[i], extensions, filenames); + } + + // Sort songs by filename + sort(filenames.begin(), filenames.end()); + + playSongs(filenames); +} + // *************************************************************************** class CMusicPlayerPlaySongs: public IActionHandler { @@ -581,59 +652,7 @@ public: if (Params == "play_songs") { - std::vector extensions; - SoundMngr->getMixer()->getMusicExtensions(extensions); - - // no format supported - if (extensions.empty()) - { - // in the very unlikely scenario - const ucstring message("Sound driver has no support for music."); - CInterfaceManager::getInstance()->displaySystemInfo(message, "SYS"); - nlinfo("%s", message.toUtf8().c_str()); - return; - } - std::string newPath = CPath::makePathAbsolute(CPath::standardizePath(ClientCfg.MediaPlayerDirectory), CPath::getCurrentPath(), true); - std::string extlist; - join(extensions, ", ", extlist); - extlist += ", m3u, m3u8"; - - std::string msg(CI18N::get("uiMk_system6").toUtf8()); - msg += ": " + newPath + " (" + extlist + ")"; - CInterfaceManager::getInstance()->displaySystemInfo(ucstring::makeFromUtf8(msg), "SYS"); - nlinfo("%s", msg.c_str()); - - // Recursive scan for files from media directory - vector filesToProcess; - CPath::getPathContent (newPath, true, false, true, filesToProcess); - - uint i; - std::vector filenames; - std::vector playlists; - - for (i = 0; i < filesToProcess.size(); ++i) - { - std::string ext = toLower(CFile::getExtension(filesToProcess[i])); - if (std::find(extensions.begin(), extensions.end(), ext) != extensions.end()) - { - filenames.push_back(filesToProcess[i]); - } - else if (ext == "m3u" || ext == "m3u8") - { - playlists.push_back(filesToProcess[i]); - } - } - - // Add songs from playlists - for (i = 0; i < playlists.size(); ++i) - { - addFromPlaylist(playlists[i], extensions, filenames); - } - - // Sort songs by filename - sort(filenames.begin(), filenames.end()); - - MusicPlayer.playSongs(filenames); + MusicPlayer.createPlaylistFromMusic(); } else if (Params == "update_playlist") { diff --git a/code/ryzom/client/src/interface_v3/music_player.h b/code/ryzom/client/src/interface_v3/music_player.h index 3569d6439..1932591e3 100644 --- a/code/ryzom/client/src/interface_v3/music_player.h +++ b/code/ryzom/client/src/interface_v3/music_player.h @@ -81,6 +81,9 @@ public: // update song from worker thread void updateSong(const std::string filename, const std::string title, float length); + // scan music folder and rebuild playlist + void createPlaylistFromMusic(); + private: // The playlist From 5250d227061500f2356f595d55ea321a8cd73125 Mon Sep 17 00:00:00 2001 From: Nimetu Date: Thu, 2 Apr 2020 11:11:43 +0300 Subject: [PATCH 184/236] Changed: Filter craft plans according to tool type. --- .../interface_v3/action_handler_phrase.cpp | 6 +++-- .../src/interface_v3/action_phrase_faber.cpp | 22 +++++++++++++++---- .../src/interface_v3/action_phrase_faber.h | 5 +++-- 3 files changed, 25 insertions(+), 8 deletions(-) diff --git a/code/ryzom/client/src/interface_v3/action_handler_phrase.cpp b/code/ryzom/client/src/interface_v3/action_handler_phrase.cpp index 8a94a4c16..0e5ba0c48 100644 --- a/code/ryzom/client/src/interface_v3/action_handler_phrase.cpp +++ b/code/ryzom/client/src/interface_v3/action_handler_phrase.cpp @@ -536,8 +536,10 @@ public: CInterfaceManager *pIM= CInterfaceManager::getInstance(); // Launch the modal to select the faber plan - extern void fillFaberPlanSelection(const std::string &brickDB, uint maxSelection); - fillFaberPlanSelection(CDBGroupBuildPhrase::BrickSelectionDB, CDBGroupBuildPhrase::MaxSelection); + extern void fillFaberPlanSelection(const std::string &brickDB, uint maxSelection, TOOL_TYPE::TCraftingToolType toolType); + // from sphrase_manager.cpp + extern TOOL_TYPE::TCraftingToolType getRightHandCraftToolType(); + fillFaberPlanSelection(CDBGroupBuildPhrase::BrickSelectionDB, CDBGroupBuildPhrase::MaxSelection, getRightHandCraftToolType()); // setup the validation CHandlerPhraseValidateBrick::BuildPhraseGroup= NULL; diff --git a/code/ryzom/client/src/interface_v3/action_phrase_faber.cpp b/code/ryzom/client/src/interface_v3/action_phrase_faber.cpp index 40efedac0..1c99983e3 100644 --- a/code/ryzom/client/src/interface_v3/action_phrase_faber.cpp +++ b/code/ryzom/client/src/interface_v3/action_phrase_faber.cpp @@ -257,7 +257,7 @@ void CActionPhraseFaber::onCloseFaberCastWindow() // *************************************************************************** -void CActionPhraseFaber::fillFaberPlanSelection(const std::string &brickDB, uint maxSelection) +void CActionPhraseFaber::fillFaberPlanSelection(const std::string &brickDB, uint maxSelection, TOOL_TYPE::TCraftingToolType toolType) { CInterfaceManager *pIM= CInterfaceManager::getInstance(); CSBrickManager *pBM= CSBrickManager::getInstance(); @@ -268,7 +268,21 @@ void CActionPhraseFaber::fillFaberPlanSelection(const std::string &brickDB, ui for(i=0;i<_FaberPlanBrickFamilies.size();i++) { const std::vector &famBricks= pBM->getFamilyBricks(_FaberPlanBrickFamilies[i]); - bricks.insert(bricks.end(), famBricks.begin(), famBricks.end()); + if (toolType == TOOL_TYPE::Unknown) + { + bricks.insert(bricks.end(), famBricks.begin(), famBricks.end()); + } + else + { + for(std::vector::const_iterator it = famBricks.begin(); it != famBricks.end(); ++it) + { + CSBrickSheet *brick= pBM->getBrick(*it); + if (brick && brick->FaberPlan.ToolType == toolType) + { + bricks.push_back(*it); + } + } + } } // get only ones known @@ -1257,10 +1271,10 @@ void launchFaberCastWindow(sint32 memoryLine, uint memoryIndex, CSBrickSheet *r } // *************************************************************************** -void fillFaberPlanSelection(const std::string &brickDB, uint maxSelection) +void fillFaberPlanSelection(const std::string &brickDB, uint maxSelection, TOOL_TYPE::TCraftingToolType toolType) { if (ActionPhraseFaber == NULL) ActionPhraseFaber = new CActionPhraseFaber; - ActionPhraseFaber->fillFaberPlanSelection(brickDB, maxSelection); + ActionPhraseFaber->fillFaberPlanSelection(brickDB, maxSelection, toolType); } // *************************************************************************** diff --git a/code/ryzom/client/src/interface_v3/action_phrase_faber.h b/code/ryzom/client/src/interface_v3/action_phrase_faber.h index ba74ef0aa..f406d0ee2 100644 --- a/code/ryzom/client/src/interface_v3/action_phrase_faber.h +++ b/code/ryzom/client/src/interface_v3/action_phrase_faber.h @@ -25,6 +25,7 @@ #include "nel/misc/types_nl.h" #include "inventory_manager.h" +#include "game_share/crafting_tool_type.h" #include "game_share/rm_family.h" #include "game_share/brick_families.h" #include "game_share/item_origin.h" @@ -62,7 +63,7 @@ public: /// Fill the Faber Plan selection DB (no window opened) - void fillFaberPlanSelection(const std::string &brickDB, uint maxSelection); + void fillFaberPlanSelection(const std::string &brickDB, uint maxSelection, TOOL_TYPE::TCraftingToolType toolType = TOOL_TYPE::Unknown); /// Called when the user has selected the Plan. copy bag. the itemPlanBrick must have "FaberPlan" good infos. void validateFaberPlanSelection(CSBrickSheet *itemPlanBrick); @@ -249,7 +250,7 @@ private: // Called when click a Faber phrase extern void launchFaberCastWindow(sint32 memoryLine, uint memoryIndex, CSBrickSheet *rootBrick); // Called when select a Faber plan -extern void fillFaberPlanSelection(const std::string &brickDB, uint maxSelection); +extern void fillFaberPlanSelection(const std::string &brickDB, uint maxSelection, TOOL_TYPE::TCraftingToolType toolType = TOOL_TYPE::Unknown); // Called when the Faber plan is selected extern void validateFaberPlanSelection(CSBrickSheet *itemPlanBrick); // Called when something needs to close the crafting window (does nothing if not open) From 24fd5a62304180cf96ec053884f18a01935e7f05 Mon Sep 17 00:00:00 2001 From: Nimetu Date: Thu, 2 Apr 2020 14:01:35 +0300 Subject: [PATCH 185/236] Fixed: Clear scene background if sky filter is used --- code/ryzom/client/src/main_loop.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/ryzom/client/src/main_loop.cpp b/code/ryzom/client/src/main_loop.cpp index ab5d07baf..5c4f99446 100644 --- a/code/ryzom/client/src/main_loop.cpp +++ b/code/ryzom/client/src/main_loop.cpp @@ -556,11 +556,11 @@ void clearBuffers() } // Sky is used to clear the frame buffer now, but if in line or point polygon mode, we should draw it - if (Driver->getPolygonMode() != UDriver::Filled) + if (Driver->getPolygonMode() != UDriver::Filled || !Filter3D[FilterSky]) { if (!Driver->isLost()) { - Driver->clearBuffers (CRGBA(127, 127, 127)); + Driver->clearBuffers (ClientCfg.BGColor); } } } From 24d4fb82532b4ce742c6931b543048a750713f98 Mon Sep 17 00:00:00 2001 From: Ulukyn Date: Thu, 2 Apr 2020 17:23:44 +0200 Subject: [PATCH 186/236] Fixed: Prevent crash if no StartupVerify config --- code/ryzom/client/src/login.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/code/ryzom/client/src/login.cpp b/code/ryzom/client/src/login.cpp index c9c1fdeaf..d3c0a629a 100644 --- a/code/ryzom/client/src/login.cpp +++ b/code/ryzom/client/src/login.cpp @@ -161,8 +161,10 @@ CLoginStateMachine LoginSM; bool CStartupHttpClient::connectToLogin() { - return connect(ClientCfg.ConfigFile.getVar("StartupHost").asString(0)) - && verifyServer(ClientCfg.ConfigFile.getVar("StartupVerify").asBool(0)); + bool checkConnect = connect(ClientCfg.ConfigFile.getVar("StartupHost").asString(0)); + + if (ClientCfg.ConfigFile.exists("StartupVerify")) + checkConnect = checkConnect && verifyServer(ClientCfg.ConfigFile.getVar("StartupVerify").asBool(0)); } CStartupHttpClient HttpClient; @@ -1969,7 +1971,7 @@ class CAHOpenURL : public IActionHandler } // modify existing languages - + // old site string::size_type pos_lang = url.find("/en/"); From 272f91210b9845e5dddf5749cfaf28f51c9b3c7e Mon Sep 17 00:00:00 2001 From: Ulukyn Date: Thu, 2 Apr 2020 17:24:27 +0200 Subject: [PATCH 187/236] Fixed: remove stupid hack for textures (finally...) --- code/ryzom/client/src/client_cfg.cpp | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/code/ryzom/client/src/client_cfg.cpp b/code/ryzom/client/src/client_cfg.cpp index 374cff866..d2e3458fb 100644 --- a/code/ryzom/client/src/client_cfg.cpp +++ b/code/ryzom/client/src/client_cfg.cpp @@ -326,17 +326,8 @@ CClientConfig::CClientConfig() Local = false; // Default is Net Mode. FSHost = ""; // Default Host. -#if 1 // Yubo hack - // The order is important here, because in a layer, global texture are rendered through this order - TexturesInterface.push_back("texture_interfaces_v3"); - // DXTC contain all items and bricks bitmaps, they must come after standard texture - TexturesInterface.push_back("new_texture_interfaces_dxtc"); - // Added icons by Yubo's Team 2009 - TexturesInterface.push_back("texture_extra"); -#else TexturesInterface.push_back("texture_interfaces_v3"); TexturesInterfaceDXTC.push_back("texture_interfaces_dxtc"); -#endif TexturesOutGameInterface.push_back("texture_interfaces_v3_outgame_ui"); @@ -1126,7 +1117,7 @@ void CClientConfig::setValues() if (ClientCfg.getDefaultConfigLocation(defaultConfigFileName)) ClientCfg.CurlCABundle = CFile::getPath(defaultConfigFileName)+ClientCfg.CurlCABundle.substr(1); } - + /////////////// // ANIMATION // // AnimatedAngleThreshold From 6a40fcf12d415b2e2bda2269da0713de71bf6b65 Mon Sep 17 00:00:00 2001 From: Ulukyn Date: Thu, 2 Apr 2020 18:02:29 +0200 Subject: [PATCH 188/236] Fixed: miss of return statement --- code/ryzom/client/src/login.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/code/ryzom/client/src/login.cpp b/code/ryzom/client/src/login.cpp index d3c0a629a..674b92397 100644 --- a/code/ryzom/client/src/login.cpp +++ b/code/ryzom/client/src/login.cpp @@ -165,6 +165,8 @@ bool CStartupHttpClient::connectToLogin() if (ClientCfg.ConfigFile.exists("StartupVerify")) checkConnect = checkConnect && verifyServer(ClientCfg.ConfigFile.getVar("StartupVerify").asBool(0)); + + return checkConnect; } CStartupHttpClient HttpClient; From aa0d9d0be9fd0f465925a514d0b90e693133edb8 Mon Sep 17 00:00:00 2001 From: Ulukyn Date: Thu, 9 Apr 2020 16:56:43 +0200 Subject: [PATCH 189/236] Changed: add border to pvp tags and display only if pvp --- .../interface_v3/group_in_scene_user_info.cpp | 24 +++++++++++-------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/code/ryzom/client/src/interface_v3/group_in_scene_user_info.cpp b/code/ryzom/client/src/interface_v3/group_in_scene_user_info.cpp index 6034b443c..aebc7cb4a 100644 --- a/code/ryzom/client/src/interface_v3/group_in_scene_user_info.cpp +++ b/code/ryzom/client/src/interface_v3/group_in_scene_user_info.cpp @@ -463,6 +463,7 @@ CGroupInSceneUserInfo *CGroupInSceneUserInfo::build (CEntityCL *entity) //else // stringSpace += textH; + bool have2pvptags = false; if (rpTags) { CPlayerCL * pPlayer = dynamic_cast(entity); @@ -476,10 +477,10 @@ CGroupInSceneUserInfo *CGroupInSceneUserInfo::build (CEntityCL *entity) if (entityTag3.toString() == "_") entityTag3.clear(); if (entityTag4.toString() == "_") entityTag4.clear(); - if (pPlayer && !(pPlayer->getPvpMode() & PVP_MODE::PvpFaction)) + if (pPlayer && (pPlayer->getPvpMode() == PVP_MODE::None)) { - entityTag3.clear(); - entityTag4.clear(); + entityTag1.clear(); + entityTag2.clear(); } if (rp1) rp1->setTexture(entityTag1.toString()); @@ -492,6 +493,8 @@ CGroupInSceneUserInfo *CGroupInSceneUserInfo::build (CEntityCL *entity) if (rp2) rp2->setActive(!entityTag2.empty()); if (rp3) rp3->setActive(!entityTag3.empty()); if (rp4) rp4->setActive(!entityTag4.empty()); + + have2pvptags = !entityTag1.empty() && !entityTag2.empty(); } // Get the permanent content bitmap @@ -660,6 +663,7 @@ CGroupInSceneUserInfo *CGroupInSceneUserInfo::build (CEntityCL *entity) } CViewBase * pvpFactionLogo = info->getView ("pvp_faction_logo"); + CViewBase * pvpFactionLogo2 = info->getView ("pvp_faction_logo2"); CViewBase * pvpOutpostLogo = info->getView ("pvp_outpost_logo"); CViewBase * pvpDuelLogo = info->getView ("pvp_duel_logo"); @@ -673,6 +677,7 @@ CGroupInSceneUserInfo *CGroupInSceneUserInfo::build (CEntityCL *entity) { pvpFactionLogo->setActive(true); CViewBitmap * pvpFactionBitmap = dynamic_cast(pvpFactionLogo); + CViewBitmap * pvpFactionBitmap2 = dynamic_cast(pvpFactionLogo2); if( pvpFactionBitmap ) { if (user) @@ -720,6 +725,12 @@ CGroupInSceneUserInfo *CGroupInSceneUserInfo::build (CEntityCL *entity) pvpFactionLogo->setActive(false); } } + + if( pvpFactionLogo && pvpFactionBitmap2 ) + { + pvpFactionBitmap2->setTexture(pvpFactionBitmap->getTexture()); + pvpFactionLogo2->setActive(have2pvptags); + } } if (pvpOutpostLogo) @@ -737,13 +748,6 @@ CGroupInSceneUserInfo *CGroupInSceneUserInfo::build (CEntityCL *entity) else pvpDuelLogo->setActive(false); } - - } - else - { - CInterfaceGroup* grp = info->getGroup("right_pvp"); - if (grp) - info->delGroup(grp); } } From 5bddfcfb224963e648ff853e6fdf963abcab9157 Mon Sep 17 00:00:00 2001 From: Nimetu Date: Fri, 17 Apr 2020 11:49:21 +0300 Subject: [PATCH 190/236] Fixed: Audio decoder getMusicInfo/getSongTitle needs to be thread safe --- .../include/nel/sound/driver/sound_driver.h | 2 +- code/nel/src/sound/audio_decoder.cpp | 11 ++++----- .../sound/driver/fmod/sound_driver_fmod.cpp | 24 ++++--------------- .../src/sound/driver/fmod/sound_driver_fmod.h | 2 +- 4 files changed, 11 insertions(+), 28 deletions(-) diff --git a/code/nel/include/nel/sound/driver/sound_driver.h b/code/nel/include/nel/sound/driver/sound_driver.h index 1fba9c887..9c758487a 100644 --- a/code/nel/include/nel/sound/driver/sound_driver.h +++ b/code/nel/include/nel/sound/driver/sound_driver.h @@ -191,7 +191,7 @@ public: /// Create a native music channel, only supported by the FMod driver. virtual IMusicChannel *createMusicChannel() { return NULL; } /** Get music info. Returns false if the song is not found or the function is not implemented. - * \param filepath path to file, CPath::lookup done by driver + * \param filepath full path to file * \param artist returns the song artist (empty if not available) * \param title returns the title (empty if not available) */ diff --git a/code/nel/src/sound/audio_decoder.cpp b/code/nel/src/sound/audio_decoder.cpp index ac7745721..1314cd448 100644 --- a/code/nel/src/sound/audio_decoder.cpp +++ b/code/nel/src/sound/audio_decoder.cpp @@ -116,10 +116,9 @@ IAudioDecoder *IAudioDecoder::createAudioDecoder(const std::string &type, NLMISC bool IAudioDecoder::getInfo(const std::string &filepath, std::string &artist, std::string &title, float &length) { - std::string lookup = CPath::lookup(filepath, false); - if (lookup.empty()) + if (filepath.empty() || !CFile::fileExists(filepath)) { - nlwarning("Music file %s does not exist!", filepath.c_str()); + nlwarning("Music file '%s' does not exist!", filepath.c_str()); return false; } @@ -127,7 +126,7 @@ bool IAudioDecoder::getInfo(const std::string &filepath, std::string &artist, st CIFile ifile; ifile.setCacheFileOnOpen(false); ifile.allowBNPCacheFileOnOpen(false); - if (ifile.open(lookup)) + if (ifile.open(filepath)) return CAudioDecoderFfmpeg::getInfo(&ifile, artist, title, length); #else std::string type = CFile::getExtension(filepath); @@ -138,7 +137,7 @@ bool IAudioDecoder::getInfo(const std::string &filepath, std::string &artist, st CIFile ifile; ifile.setCacheFileOnOpen(false); ifile.allowBNPCacheFileOnOpen(false); - if (ifile.open(lookup)) + if (ifile.open(filepath)) return CAudioDecoderVorbis::getInfo(&ifile, artist, title, length); nlwarning("Unable to open: '%s'", filepath.c_str()); @@ -149,7 +148,7 @@ bool IAudioDecoder::getInfo(const std::string &filepath, std::string &artist, st CIFile ifile; ifile.setCacheFileOnOpen(false); ifile.allowBNPCacheFileOnOpen(false); - if (ifile.open(lookup)) + if (ifile.open(filepath)) return CAudioDecoderMP3::getInfo(&ifile, artist, title, length); nlwarning("Unable to open: '%s'", filepath.c_str()); diff --git a/code/nel/src/sound/driver/fmod/sound_driver_fmod.cpp b/code/nel/src/sound/driver/fmod/sound_driver_fmod.cpp index d98aa600f..2b250a1d3 100644 --- a/code/nel/src/sound/driver/fmod/sound_driver_fmod.cpp +++ b/code/nel/src/sound/driver/fmod/sound_driver_fmod.cpp @@ -496,36 +496,20 @@ bool getTag (std::string &result, const char *tag, FSOUND_STREAM *stream) } /** Get music info. Returns false if the song is not found or the function is not implemented. - * \param filepath path to file, CPath::lookup done by driver + * \param filepath full path to file * \param artist returns the song artist (empty if not available) * \param title returns the title (empty if not available) */ bool CSoundDriverFMod::getMusicInfo(const std::string &filepath, std::string &artist, std::string &title, float &length) { - /* Open a stream, get the tag if it exists, close the stream */ - string pathName = CPath::lookup(filepath, false); - uint32 fileOffset = 0, fileSize = 0; - if (pathName.empty()) + if (filepath.empty() || !CFile::fileExists(filepath)) { nlwarning("NLSOUND FMod Driver: Music file %s not found!", filepath.c_str()); return false; } - // if the file is in a bnp - if (pathName.find('@') != string::npos) - { - if (CBigFile::getInstance().getFileInfo(pathName, fileSize, fileOffset)) - { - // set pathname to bnp - pathName = pathName.substr(0, pathName.find('@')); - } - else - { - nlwarning("NLSOUND FMod Driver: BNP BROKEN"); - return false; - } - } - FSOUND_STREAM *stream = FSOUND_Stream_Open((const char *)CPath::lookup(filepath, false).c_str(), FSOUND_2D, (sint)fileOffset, (sint)fileSize); + uint32 fileOffset = 0, fileSize = 0; + FSOUND_STREAM *stream = FSOUND_Stream_Open(filepath.c_str(), FSOUND_2D, (sint)fileOffset, (sint)fileSize); if (stream) { getTag(artist, "ARTIST", stream); diff --git a/code/nel/src/sound/driver/fmod/sound_driver_fmod.h b/code/nel/src/sound/driver/fmod/sound_driver_fmod.h index db82cde6e..73d3b8673 100644 --- a/code/nel/src/sound/driver/fmod/sound_driver_fmod.h +++ b/code/nel/src/sound/driver/fmod/sound_driver_fmod.h @@ -112,7 +112,7 @@ public: virtual IMusicChannel *createMusicChannel(); /** Get music info. Returns false if the song is not found or the function is not implemented. - * \param filepath path to file, CPath::lookup done by driver + * \param filepath full path to file * \param artist returns the song artist (empty if not available) * \param title returns the title (empty if not available) */ From 52d6f89e1e6036640221af8fa7fca9e3ba8445c4 Mon Sep 17 00:00:00 2001 From: Nimetu Date: Fri, 17 Apr 2020 13:29:27 +0300 Subject: [PATCH 191/236] Fixed: Clear song info when all songs are done playing. --- .../client/src/interface_v3/music_player.cpp | 60 +++++++++++++------ .../client/src/interface_v3/music_player.h | 6 ++ 2 files changed, 49 insertions(+), 17 deletions(-) diff --git a/code/ryzom/client/src/interface_v3/music_player.cpp b/code/ryzom/client/src/interface_v3/music_player.cpp index 2f02352fb..98bbd5299 100644 --- a/code/ryzom/client/src/interface_v3/music_player.cpp +++ b/code/ryzom/client/src/interface_v3/music_player.cpp @@ -174,28 +174,30 @@ void CMusicPlayer::playSongs (const std::vector &filenames) // If pause, stop, else play will resume if (_State == Paused || _Songs.empty()) - _State = Stopped; + stop(); // get song title/duration using worker thread MusicPlayerWorker.getSongsInfo(filenames); } // *************************************************************************** -void CMusicPlayer::updatePlaylist(sint prevIndex) +void CMusicPlayer::updatePlaylist(uint index, bool state) { - CInterfaceElement *pIE; - std::string rowId; + if (index >= _Songs.size()) return; + + std::string rowId = toString("%s:s%d:bg", MP3_PLAYER_PLAYLIST_LIST, index); + CInterfaceElement *pIE = dynamic_cast(CWidgetManager::getInstance()->getElementFromId(rowId)); + if (pIE) pIE->setActive(state); +} +void CMusicPlayer::updatePlaylist(sint prevIndex) +{ if (prevIndex >= 0 && prevIndex < _Songs.size()) { - rowId = toString("%s:s%d:bg", MP3_PLAYER_PLAYLIST_LIST, prevIndex); - pIE = dynamic_cast(CWidgetManager::getInstance()->getElementFromId(rowId)); - if (pIE) pIE->setActive(false); + updatePlaylist(prevIndex, false); } - rowId = toString("%s:s%d:bg", MP3_PLAYER_PLAYLIST_LIST, _CurrentSongIndex); - pIE = dynamic_cast(CWidgetManager::getInstance()->getElementFromId(rowId)); - if (pIE) pIE->setActive(true); + updatePlaylist(_CurrentSongIndex, true); } // *************************************************************************** @@ -361,7 +363,7 @@ void CMusicPlayer::play (sint index) if (_Songs.empty()) { - _State = Stopped; + stop(); return; } @@ -437,6 +439,8 @@ void CMusicPlayer::stop () _PlayStart = 0; _PauseTime = 0; + clearPlayingInfo(); + NLGUI::CDBManager::getInstance()->getDbProp("UI:TEMP:MP3_PLAYING")->setValueBool(false); } @@ -472,12 +476,31 @@ void CMusicPlayer::next () } // *************************************************************************** +void CMusicPlayer::updatePlayingInfo(const std::string info) +{ + CViewText *pVT = dynamic_cast(CWidgetManager::getInstance()->getElementFromId("ui:interface:mp3_player:screen:text")); + if (pVT) + { + pVT->setText(ucstring::makeFromUtf8(info)); + } +} + +// *************************************************************************** +void CMusicPlayer::clearPlayingInfo() +{ + updatePlayingInfo(""); +} +// *************************************************************************** void CMusicPlayer::update () { if(!SoundMngr) { - _State = Stopped; + if (_State != Stopped) + { + _State = Stopped; + clearPlayingInfo(); + } return; } @@ -488,8 +511,6 @@ void CMusicPlayer::update () if (_State == Playing) { - CViewText *pVT = dynamic_cast(CWidgetManager::getInstance()->getElementFromId("ui:interface:mp3_player:screen:text")); - if (pVT) { TTime dur = (CTime::getLocalTime() - _PlayStart) / 1000; uint min = (dur / 60) % 60; @@ -499,7 +520,7 @@ void CMusicPlayer::update () std::string title(toString("%02d:%02d", min, sec)); if (hour > 0) title = toString("%02d:", hour) + title; title += " " + _CurrentSong.Title; - pVT->setText(ucstring::makeFromUtf8(title)); + updatePlayingInfo(title); } if (SoundMngr->isMusicEnded ()) @@ -520,8 +541,13 @@ void CMusicPlayer::update () } else { - SoundMngr->stopMusic(0); - _State = Stopped; + // remove active highlight from playlist + updatePlaylist(_CurrentSongIndex, false); + + stop(); + + // restart from top on next 'play' + _CurrentSongIndex = 0; } } } diff --git a/code/ryzom/client/src/interface_v3/music_player.h b/code/ryzom/client/src/interface_v3/music_player.h index 1932591e3..febfde719 100644 --- a/code/ryzom/client/src/interface_v3/music_player.h +++ b/code/ryzom/client/src/interface_v3/music_player.h @@ -62,6 +62,10 @@ public: void update (); + // update currently playing song info/duration on main gui + void updatePlayingInfo(const std::string info); + void clearPlayingInfo(); + bool isRepeatEnabled() const; bool isShuffleEnabled() const; @@ -71,6 +75,8 @@ public: void shuffleAndRebuildPlaylist(); // Update playlist active row void updatePlaylist(sint prevIndex = -1); + // set/remove playlist highlight + void updatePlaylist(uint index, bool state); // Update single song title/duration on _Songs and on playlist void updateSong(const CSongs &song); From 6993a2731faa99fe2c491e253c36d404cec40b8b Mon Sep 17 00:00:00 2001 From: Nimetu Date: Sat, 18 Apr 2020 09:31:29 +0300 Subject: [PATCH 192/236] Changed: SHow no-files text if there is no songs in playlist --- code/ryzom/client/src/interface_v3/music_player.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/code/ryzom/client/src/interface_v3/music_player.cpp b/code/ryzom/client/src/interface_v3/music_player.cpp index 98bbd5299..6c94fa2cf 100644 --- a/code/ryzom/client/src/interface_v3/music_player.cpp +++ b/code/ryzom/client/src/interface_v3/music_player.cpp @@ -488,7 +488,14 @@ void CMusicPlayer::updatePlayingInfo(const std::string info) // *************************************************************************** void CMusicPlayer::clearPlayingInfo() { - updatePlayingInfo(""); + if (_Songs.empty()) + { + updatePlayingInfo(CI18N::get("uiNoFiles").toUtf8()); + } + else + { + updatePlayingInfo(""); + } } // *************************************************************************** From bde8d008d153e6d0f9e235f6665c7324d6dd2faf Mon Sep 17 00:00:00 2001 From: Nimetu Date: Sat, 18 Apr 2020 10:50:20 +0300 Subject: [PATCH 193/236] Fixed: Crash on switching chars, logout --- code/ryzom/client/src/interface_v3/dbctrl_sheet.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/code/ryzom/client/src/interface_v3/dbctrl_sheet.cpp b/code/ryzom/client/src/interface_v3/dbctrl_sheet.cpp index 3d6c58dcd..56727f6d4 100644 --- a/code/ryzom/client/src/interface_v3/dbctrl_sheet.cpp +++ b/code/ryzom/client/src/interface_v3/dbctrl_sheet.cpp @@ -567,6 +567,11 @@ CDBCtrlSheet::~CDBCtrlSheet() Driver->deleteTextureFile(_GuildSymb); _GuildSymb = NULL; } + if (_RegenText) + { + delete _RegenText; + _RegenText = NULL; + } // ensure erase static if(this==_CurrMenuSheet) _CurrMenuSheet = NULL; From 36187626a9a87eaa3e700c72ee0c6bbac24e6439 Mon Sep 17 00:00:00 2001 From: Nimetu Date: Sat, 18 Apr 2020 11:47:28 +0300 Subject: [PATCH 194/236] Fixed: Restore playlist after charselect --- code/ryzom/client/src/interface_v3/interface_manager.cpp | 4 ++++ code/ryzom/client/src/release.cpp | 8 ++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/code/ryzom/client/src/interface_v3/interface_manager.cpp b/code/ryzom/client/src/interface_v3/interface_manager.cpp index f8637bff3..e81785ea8 100644 --- a/code/ryzom/client/src/interface_v3/interface_manager.cpp +++ b/code/ryzom/client/src/interface_v3/interface_manager.cpp @@ -1044,6 +1044,10 @@ void CInterfaceManager::initInGame() gc->setTarget(gc->getSavedTarget()); } + // rebuild mp3 player playlist if user reselected a char (songs are already scanned) + CAHManager::getInstance()->runActionHandler("music_player", NULL, "update_playlist"); + CAHManager::getInstance()->runActionHandler("music_player", NULL, "stop"); + CCDBNodeLeaf *node = NLGUI::CDBManager::getInstance()->getDbProp("UI:SAVE:CHATLOG_STATE", false); if (node) { diff --git a/code/ryzom/client/src/release.cpp b/code/ryzom/client/src/release.cpp index 0477acce9..889bcee11 100644 --- a/code/ryzom/client/src/release.cpp +++ b/code/ryzom/client/src/release.cpp @@ -240,8 +240,8 @@ void releaseMainLoopReselect() // alredy called from farTPMainLoop() // --R2::getEditor().autoConfigRelease(IsInRingSession); - // Pause any user played music - MusicPlayer.pause(); + // stop any user played music + MusicPlayer.stop(); // only really needed at exit // --STRING_MANAGER::CStringManagerClient::instance()->flushStringCache(); @@ -390,8 +390,8 @@ void releaseMainLoop(bool closeConnection) // Release R2 editor if applicable R2::getEditor().autoConfigRelease(IsInRingSession); - // Pause any user played music - MusicPlayer.pause(); + // stop any user played music + MusicPlayer.stop(); // flush the server string cache STRING_MANAGER::CStringManagerClient::instance()->flushStringCache(); From 3da2f45363a7d4c23db822ff5e99e75377a7c9e8 Mon Sep 17 00:00:00 2001 From: Ulukyn Date: Mon, 4 May 2020 17:19:24 +0200 Subject: [PATCH 195/236] Added: Remove ambiance ans shininess to SE shapes. Add seasons texture set --- code/nel/src/misc/bitmap.cpp | 110 +++++++++--------- .../client/src/interface_v3/lua_ihm_ryzom.cpp | 19 ++- 2 files changed, 73 insertions(+), 56 deletions(-) diff --git a/code/nel/src/misc/bitmap.cpp b/code/nel/src/misc/bitmap.cpp index 015a9c4c4..c21b30fb7 100644 --- a/code/nel/src/misc/bitmap.cpp +++ b/code/nel/src/misc/bitmap.cpp @@ -3269,77 +3269,79 @@ CRGBAF CBitmap::getColor (float x, float y) const uint32 i; + bool isValid = true; for (i = 0; i < 4; ++i) { - nlassert (nX[i] >= 0); - nlassert (nY[i] >= 0 ); - nlassert (nX[i] < nWidth); - nlassert (nY[i] < nHeight); + if (nX[i] < 0 || nY[i] < 0 || nX[i] >= nWidth || nY[i] >= nHeight) + isValid = false; } - // Decimal part of (x,y) - x = x - (float)nX[0]; - y = y - (float)nY[0]; - - switch (this->PixelFormat) + if (isValid) { - case RGBA: - case DXTC1: - case DXTC1Alpha: - case DXTC3: - case DXTC5: - { - CRGBAF finalVal; - CRGBA val[4]; + // Decimal part of (x,y) + x = x - (float)nX[0]; + y = y - (float)nY[0]; - if (this->PixelFormat == RGBA) + switch (this->PixelFormat) + { + case RGBA: + case DXTC1: + case DXTC1Alpha: + case DXTC3: + case DXTC5: { - for (i = 0; i < 4; ++i) + CRGBAF finalVal; + CRGBA val[4]; + + if (this->PixelFormat == RGBA) { - val[i] = CRGBA (rBitmap[(nX[i]+nY[i]*nWidth)*4+0], - rBitmap[(nX[i]+nY[i]*nWidth)*4+1], - rBitmap[(nX[i]+nY[i]*nWidth)*4+2], - rBitmap[(nX[i]+nY[i]*nWidth)*4+3]); + for (i = 0; i < 4; ++i) + { + val[i] = CRGBA (rBitmap[(nX[i]+nY[i]*nWidth)*4+0], + rBitmap[(nX[i]+nY[i]*nWidth)*4+1], + rBitmap[(nX[i]+nY[i]*nWidth)*4+2], + rBitmap[(nX[i]+nY[i]*nWidth)*4+3]); + } } - } - else - { - // slower version : get from DXT - for (i = 0; i < 4; ++i) + else { - val[i] = getPixelColor(nX[i], nY[i]); + // slower version : get from DXT + for (i = 0; i < 4; ++i) + { + val[i] = getPixelColor(nX[i], nY[i]); + } } - } - finalVal.R = getColorInterp (x, y, val[0].R, val[1].R, val[2].R, val[3].R); - finalVal.G = getColorInterp (x, y, val[0].G, val[1].G, val[2].G, val[3].G); - finalVal.B = getColorInterp (x, y, val[0].B, val[1].B, val[2].B, val[3].B); - finalVal.A = getColorInterp (x, y, val[0].A, val[1].A, val[2].A, val[3].A); - finalVal /= 255.f; + finalVal.R = getColorInterp (x, y, val[0].R, val[1].R, val[2].R, val[3].R); + finalVal.G = getColorInterp (x, y, val[0].G, val[1].G, val[2].G, val[3].G); + finalVal.B = getColorInterp (x, y, val[0].B, val[1].B, val[2].B, val[3].B); + finalVal.A = getColorInterp (x, y, val[0].A, val[1].A, val[2].A, val[3].A); + finalVal /= 255.f; - return finalVal; - } - break; - case Alpha: - case Luminance: - { + return finalVal; + } + break; + case Alpha: + case Luminance: + { - float finalVal; - float val[4]; + float finalVal; + float val[4]; - for (i = 0; i < 4; ++i) - val[i] = rBitmap[(nX[i]+nY[i]*nWidth)]; + for (i = 0; i < 4; ++i) + val[i] = rBitmap[(nX[i]+nY[i]*nWidth)]; - finalVal = getColorInterp (x, y, val[0], val[1], val[2], val[3]); - finalVal /= 255.f; + finalVal = getColorInterp (x, y, val[0], val[1], val[2], val[3]); + finalVal /= 255.f; - if (this->PixelFormat == Alpha) - return CRGBAF (1.f, 1.f, 1.f, finalVal); - else // Luminance - return CRGBAF (finalVal, finalVal, finalVal, 1.f); + if (this->PixelFormat == Alpha) + return CRGBAF (1.f, 1.f, 1.f, finalVal); + else // Luminance + return CRGBAF (finalVal, finalVal, finalVal, 1.f); + } + break; + default: break; } - break; - default: break; } return CRGBAF (0.0f, 0.0f, 0.0f, 0.0f); @@ -3626,7 +3628,7 @@ void CBitmap::loadSize(NLMISC::IStream &f, uint32 &retWidth, uint32 &retHeight) { uint8 imagePrecision = 0; // sample precision uint32 imageSize = 0; // width and height - f.serial(imagePrecision); + f.serial(imagePrecision); f.serial(imageSize); NLMISC_BSWAP32(imageSize); diff --git a/code/ryzom/client/src/interface_v3/lua_ihm_ryzom.cpp b/code/ryzom/client/src/interface_v3/lua_ihm_ryzom.cpp index ac8d7dde8..8aa7af585 100644 --- a/code/ryzom/client/src/interface_v3/lua_ihm_ryzom.cpp +++ b/code/ryzom/client/src/interface_v3/lua_ihm_ryzom.cpp @@ -2298,13 +2298,28 @@ int CLuaIHMRyzom::addShape(CLuaState &ls) if(!instance.empty()) { + + if (texture == "#season#" || texture.empty()) + { + uint8 selectedTextureSet = (uint8)::computeCurrSeason(); + instance.selectTextureSet(selectedTextureSet); + texture = ""; + } + else if (texture[0] == '#') + { + uint8 selectedTextureSet; + fromString(texture.substr(1), selectedTextureSet); + instance.selectTextureSet(selectedTextureSet); + texture = ""; + } + for(uint j=0;j Date: Wed, 6 May 2020 17:43:51 +0300 Subject: [PATCH 196/236] Fixed: Calling stop on music player should not affect background music. --- code/ryzom/client/src/interface_v3/music_player.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/code/ryzom/client/src/interface_v3/music_player.cpp b/code/ryzom/client/src/interface_v3/music_player.cpp index 6c94fa2cf..56f97b554 100644 --- a/code/ryzom/client/src/interface_v3/music_player.cpp +++ b/code/ryzom/client/src/interface_v3/music_player.cpp @@ -434,7 +434,9 @@ void CMusicPlayer::stop () return; // stop the music only if we are really playing (else risk to stop a background music!) - SoundMngr->stopMusic(0); + if (_State != Stopped) + SoundMngr->stopMusic(0); + _State = Stopped; _PlayStart = 0; _PauseTime = 0; From ada46dfabcf0b17261fa8b7876778e458d077fb9 Mon Sep 17 00:00:00 2001 From: Riasan Date: Thu, 7 May 2020 18:22:41 +0200 Subject: [PATCH 197/236] Changed: update releasenote url --- code/ryzom/client/src/client_cfg.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/ryzom/client/src/client_cfg.cpp b/code/ryzom/client/src/client_cfg.cpp index d2e3458fb..df1debee2 100644 --- a/code/ryzom/client/src/client_cfg.cpp +++ b/code/ryzom/client/src/client_cfg.cpp @@ -439,8 +439,8 @@ CClientConfig::CClientConfig() CurlMaxConnections = 5; CurlCABundle.clear(); - RingReleaseNotePath = WebIgMainDomain + "/releasenotes_ring/index.php"; - ReleaseNotePath = WebIgMainDomain + "/releasenotes/index.php"; + RingReleaseNotePath = WebIgMainDomain + "/app_releasenotes/index.php"; + ReleaseNotePath = WebIgMainDomain + "/app_releasenotes/index.php"; /////////////// From 4254b6788a4b27d7d4e4501acbac346531dea1fc Mon Sep 17 00:00:00 2001 From: Ulukyn Date: Tue, 12 May 2020 15:44:38 +0200 Subject: [PATCH 198/236] Fixed: Bad dispaly of server custom names --- code/ryzom/client/src/string_manager_client.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/code/ryzom/client/src/string_manager_client.cpp b/code/ryzom/client/src/string_manager_client.cpp index 06c3523b4..ddc41d0d1 100644 --- a/code/ryzom/client/src/string_manager_client.cpp +++ b/code/ryzom/client/src/string_manager_client.cpp @@ -390,7 +390,7 @@ restartLoop4: else { result = it->second; - if (result.size() > 9 && result.substr(0, 9) == ucstring(" 9 && result.substr(0, 9) == ucstring("::iterator itds = _DynStrings.find(result.substr(9, result.size()-10)); if (itds != _DynStrings.end()) @@ -747,6 +747,12 @@ restartLoop: str = CEntityCL::removeTitleFromName(str); } + // if the string contains a special rename of creature, remove it + if (str.size() > 2 && str[0] == '<' && str[1] == '#') + { + str = str.substr(2); + } + // append this string temp.append(move, src+param.ReplacementPoint); temp += str; @@ -1625,7 +1631,7 @@ const ucchar *CStringManagerClient::getTitleLocalizedName(const ucstring &titleI _TitleWords.push_back(listInfos[0]); return getLocalizedName(_TitleWords.back()); } - + return getLocalizedName(titleId); } From d130a7f8260a5c46e11b783c9810357a96ec8bf9 Mon Sep 17 00:00:00 2001 From: Riasan Date: Wed, 3 Jun 2020 12:38:33 +0200 Subject: [PATCH 199/236] Changed: fix client crash from opengl changes + fix compiling error because of moved client_default.cfg --- code/CMakeLists.txt | 13 ++++++++++--- .../3d/driver/opengl/driver_opengl_extension.cpp | 6 ++++++ .../src/3d/driver/opengl/driver_opengl_window.cpp | 3 +++ code/ryzom/client/CMakeLists.txt | 2 +- code/ryzom/client/src/CMakeLists.txt | 2 +- 5 files changed, 21 insertions(+), 5 deletions(-) diff --git a/code/CMakeLists.txt b/code/CMakeLists.txt index 4c962537c..3225dc1b8 100644 --- a/code/CMakeLists.txt +++ b/code/CMakeLists.txt @@ -177,9 +177,16 @@ IF(WITH_STATIC) ENDIF() # under Linux and OS X, recent libxml2 versions are linked against libicu - FIND_PACKAGE(Icu) - IF(ICU_LIBRARIES) - SET(LIBXML2_LIBRARIES ${LIBXML2_LIBRARIES} ${ICU_LIBRARIES} ${ICU_DATA_LIBRARIES}) + # FIND_PACKAGE(Icu) + FIND_LIBRARY(ICU_LIBRARY icuuc) + IF(ICU_LIBRARY) + FIND_LIBRARY(ICU_DATA_LIBRARY icudata) + IF(ICU_LIBRARY) + MESSAGE(STATUS "ICU UC was found: ${ICU_LIBRARY}") + ELSE() + MESSAGE(STATUS "ICU UC was NOT found") + ENDIF() + SET(LIBXML2_LIBRARIES ${LIBXML2_LIBRARIES} ${ICU_DATA_LIBRARY} ${ICU_LIBRARY}) ENDIF() ENDIF() diff --git a/code/nel/src/3d/driver/opengl/driver_opengl_extension.cpp b/code/nel/src/3d/driver/opengl/driver_opengl_extension.cpp index c81ab9e1e..f7c0bf496 100644 --- a/code/nel/src/3d/driver/opengl/driver_opengl_extension.cpp +++ b/code/nel/src/3d/driver/opengl/driver_opengl_extension.cpp @@ -1583,6 +1583,12 @@ static bool setupATIMeminfo(const char *glext) void registerGlExtensions(CGlExtensions &ext) { H_AUTO_OGL(registerGlExtensions); + + CGLContextObj ctx = CGLGetCurrentContext(); + if (ctx == NULL) + { + nlerror("No OpenGL context set"); + } // OpenGL 1.2 ?? const char *nglVersion = (const char *)glGetString (GL_VERSION); diff --git a/code/nel/src/3d/driver/opengl/driver_opengl_window.cpp b/code/nel/src/3d/driver/opengl/driver_opengl_window.cpp index 293cb28bb..6537c289f 100644 --- a/code/nel/src/3d/driver/opengl/driver_opengl_window.cpp +++ b/code/nel/src/3d/driver/opengl/driver_opengl_window.cpp @@ -1072,6 +1072,9 @@ bool CDriverGL::setDisplay(nlWindow wnd, const GfxMode &mode, bool show, bool re [_ctx flushBuffer]; [_glView display]; + // Set context as thread context + CGLSetCurrentContext((CGLContextObj)[_ctx CGLContextObj]); + _EventEmitter.init(this, _glView, _DestroyWindow); #elif defined(NL_OS_UNIX) diff --git a/code/ryzom/client/CMakeLists.txt b/code/ryzom/client/CMakeLists.txt index 7a6cf7424..2e17c230e 100644 --- a/code/ryzom/client/CMakeLists.txt +++ b/code/ryzom/client/CMakeLists.txt @@ -8,7 +8,7 @@ IF(WITH_RYZOM_CLIENT) ADD_SUBDIRECTORY(unix) ENDIF() - INSTALL(FILES client_default.cfg DESTINATION ${RYZOM_ETC_PREFIX}) + #INSTALL(FILES client_default.cfg DESTINATION ${RYZOM_ETC_PREFIX}) IF(WITH_RYZOM_PATCH) IF(APPLE) diff --git a/code/ryzom/client/src/CMakeLists.txt b/code/ryzom/client/src/CMakeLists.txt index 99b9a6773..7e1f89348 100644 --- a/code/ryzom/client/src/CMakeLists.txt +++ b/code/ryzom/client/src/CMakeLists.txt @@ -82,7 +82,7 @@ IF(WITH_RYZOM_CLIENT) ADD_CUSTOM_COMMAND(TARGET ryzom_client PRE_BUILD COMMAND mkdir -p ${RYZOM_RESOURCES_DIR}) ADD_CUSTOM_COMMAND(TARGET ryzom_client POST_BUILD COMMAND cp ARGS -p ${MAC_RESOURCES_DIR}/PkgInfo ${RYZOM_CONTENTS_DIR}) ADD_CUSTOM_COMMAND(TARGET ryzom_client POST_BUILD COMMAND cp ARGS -p ${MAC_RESOURCES_DIR}/ryzom.icns ${RYZOM_RESOURCES_DIR}) - ADD_CUSTOM_COMMAND(TARGET ryzom_client POST_BUILD COMMAND cp ARGS -p ${CMAKE_SOURCE_DIR}/ryzom/client/client_default.cfg ${RYZOM_RESOURCES_DIR}) + #ADD_CUSTOM_COMMAND(TARGET ryzom_client POST_BUILD COMMAND cp ARGS -p ${CMAKE_SOURCE_DIR}/ryzom/client/client_default.cfg ${RYZOM_RESOURCES_DIR}) # remove any present installscript_osx.vdf before signing ADD_CUSTOM_COMMAND(TARGET ryzom_client POST_BUILD COMMAND rm -f ${RYZOM_OUTPUT_DIR}/installscript_osx.vdf) From c2e7807f99524a08885ea4addc89e49adc5d3c4e Mon Sep 17 00:00:00 2001 From: Sit Melai Date: Fri, 12 Jun 2020 00:30:03 +0200 Subject: [PATCH 200/236] Adapt action handler for editing phrases to handle second action bar --- .../interface_v3/action_handler_phrase.cpp | 87 +++++++++++-------- 1 file changed, 53 insertions(+), 34 deletions(-) diff --git a/code/ryzom/client/src/interface_v3/action_handler_phrase.cpp b/code/ryzom/client/src/interface_v3/action_handler_phrase.cpp index 0e5ba0c48..efe882b1d 100644 --- a/code/ryzom/client/src/interface_v3/action_handler_phrase.cpp +++ b/code/ryzom/client/src/interface_v3/action_handler_phrase.cpp @@ -1,9 +1,6 @@ // Ryzom - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // -// This source file has been modified by the following contributors: -// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) -// // 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 @@ -136,7 +133,7 @@ public: if (pCSDst->isShortCut()) pPM->CompositionPhraseMemoryLineDest= pPM->getSelectedMemoryLineDB(); else - pPM->CompositionPhraseMemoryLineDest= 0; + pPM->CompositionPhraseMemoryLineDest= pPM->getSelectedMemoryAltLineDB(); pPM->CompositionPhraseMemorySlotDest= pCSDst->getIndexInDB(); } @@ -536,10 +533,8 @@ public: CInterfaceManager *pIM= CInterfaceManager::getInstance(); // Launch the modal to select the faber plan - extern void fillFaberPlanSelection(const std::string &brickDB, uint maxSelection, TOOL_TYPE::TCraftingToolType toolType); - // from sphrase_manager.cpp - extern TOOL_TYPE::TCraftingToolType getRightHandCraftToolType(); - fillFaberPlanSelection(CDBGroupBuildPhrase::BrickSelectionDB, CDBGroupBuildPhrase::MaxSelection, getRightHandCraftToolType()); + extern void fillFaberPlanSelection(const std::string &brickDB, uint maxSelection); + fillFaberPlanSelection(CDBGroupBuildPhrase::BrickSelectionDB, CDBGroupBuildPhrase::MaxSelection); // setup the validation CHandlerPhraseValidateBrick::BuildPhraseGroup= NULL; @@ -750,8 +745,8 @@ class CHandlerMemorizePhraseOrMacro : public IActionHandler { public: virtual void execute (CCtrlBase *pCaller, const string &Params); - void memorizePhraseOrMacro(uint dstMemoryIndex, bool isMacro, sint32 phraseId, sint32 macroId); - void memorizePhraseSheet(uint dstMemoryIndex, uint32 sheetId); + void memorizePhraseOrMacro(sint32 memoryLine, uint dstMemoryIndex, bool isMacro, sint32 phraseId, sint32 macroId); + void memorizePhraseSheet(sint32 memoryLine, uint dstMemoryIndex, uint32 sheetId); }; REGISTER_ACTION_HANDLER( CHandlerMemorizePhraseOrMacro, "memorize_phrase_or_macro"); @@ -771,7 +766,11 @@ void CHandlerMemorizePhraseOrMacro::execute (CCtrlBase *pCaller, const string &P // The dest must be a memory or a macro memory if (!pCSDst->isSPhraseIdMemory() && !pCSDst->isMacroMemory()) return; // get the memory line and memory index - sint32 dstMemoryLine= pPM->getSelectedMemoryLineDB(); + sint32 dstMemoryLine; + if (pCSDst->isShortCut()) + dstMemoryLine = pPM->getSelectedMemoryLineDB(); + else + dstMemoryLine = pPM->getSelectedMemoryAltLineDB(); uint dstMemoryIndex= pCSDst->getIndexInDB(); bool srcIsMacro; @@ -806,7 +805,7 @@ void CHandlerMemorizePhraseOrMacro::execute (CCtrlBase *pCaller, const string &P pPM->sendLearnToServer(newPhraseId); // memorize the new phrase - memorizePhraseOrMacro(dstMemoryIndex, srcIsMacro, newPhraseId, srcMacroId); + memorizePhraseOrMacro(dstMemoryLine, dstMemoryIndex, srcIsMacro, newPhraseId, srcMacroId); } } else @@ -833,7 +832,7 @@ void CHandlerMemorizePhraseOrMacro::execute (CCtrlBase *pCaller, const string &P if(pCSSrc->isSPhrase()) { // learn and memorize this phrase - memorizePhraseSheet(dstMemoryIndex, pCSSrc->getSheetId()); + memorizePhraseSheet(dstMemoryLine, dstMemoryIndex, pCSSrc->getSheetId()); } else { @@ -842,7 +841,7 @@ void CHandlerMemorizePhraseOrMacro::execute (CCtrlBase *pCaller, const string &P pPM->fullDeletePhraseIfLast(dstMemoryLine, dstMemoryIndex); // memorize the phrase or macro - memorizePhraseOrMacro(dstMemoryIndex, srcIsMacro, srcPhraseId, srcMacroId); + memorizePhraseOrMacro(dstMemoryLine, dstMemoryIndex, srcIsMacro, srcPhraseId, srcMacroId); } } // Else the src is a memory too @@ -868,7 +867,7 @@ void CHandlerMemorizePhraseOrMacro::execute (CCtrlBase *pCaller, const string &P pPM->sendLearnToServer(newPhraseId); // memorize the new phrase - memorizePhraseOrMacro(dstMemoryIndex, srcIsMacro, newPhraseId, srcMacroId); + memorizePhraseOrMacro(dstMemoryLine, dstMemoryIndex, srcIsMacro, newPhraseId, srcMacroId); } else { @@ -876,7 +875,7 @@ void CHandlerMemorizePhraseOrMacro::execute (CCtrlBase *pCaller, const string &P pPM->fullDeletePhraseIfLast(dstMemoryLine, dstMemoryIndex); // memorize the macro (still a reference) - memorizePhraseOrMacro(dstMemoryIndex, srcIsMacro, srcPhraseId, srcMacroId); + memorizePhraseOrMacro(dstMemoryLine, dstMemoryIndex, srcIsMacro, srcPhraseId, srcMacroId); } } // else this is a swap! @@ -887,17 +886,23 @@ void CHandlerMemorizePhraseOrMacro::execute (CCtrlBase *pCaller, const string &P { // get the memory index for src uint srcMemoryIndex= pCSSrc->getIndexInDB(); - + // get the memory line for src + sint32 srcMemoryLine; + if (pCSSrc->isShortCut()) + srcMemoryLine = pPM->getSelectedMemoryLineDB(); + else + srcMemoryLine = pPM->getSelectedMemoryAltLineDB(); + // memorize dst into src - memorizePhraseOrMacro(srcMemoryIndex, dstIsMacro, dstPhraseId, dstMacroId); + memorizePhraseOrMacro(srcMemoryLine, srcMemoryIndex, dstIsMacro, dstPhraseId, dstMacroId); // memorize src into dst - memorizePhraseOrMacro(dstMemoryIndex, srcIsMacro, srcPhraseId, srcMacroId); + memorizePhraseOrMacro(dstMemoryLine, dstMemoryIndex, srcIsMacro, srcPhraseId, srcMacroId); } // else, it's a move else { // copy - memorizePhraseOrMacro(dstMemoryIndex, srcIsMacro, srcPhraseId, srcMacroId); + memorizePhraseOrMacro(dstMemoryLine, dstMemoryIndex, srcIsMacro, srcPhraseId, srcMacroId); // forget src (after shorctut change!) CAHManager::getInstance()->runActionHandler("forget_phrase_or_macro", pCSSrc); @@ -909,14 +914,13 @@ void CHandlerMemorizePhraseOrMacro::execute (CCtrlBase *pCaller, const string &P // memorize a spell -void CHandlerMemorizePhraseOrMacro::memorizePhraseOrMacro(uint memoryIndex, bool isMacro, sint32 phraseId, sint32 macroId) +void CHandlerMemorizePhraseOrMacro::memorizePhraseOrMacro(sint32 memoryLine, uint memoryIndex, bool isMacro, sint32 phraseId, sint32 macroId) { CSPhraseManager *pPM= CSPhraseManager::getInstance(); - sint32 memoryLine= pPM->getSelectedMemoryLineDB(); - if(memoryLine<0) - return; - + if (memoryLine<0) + return; + if(isMacro) { pPM->memorizeMacro(memoryLine, memoryIndex, macroId); @@ -931,11 +935,10 @@ void CHandlerMemorizePhraseOrMacro::memorizePhraseOrMacro(uint memoryIndex, bool } // memorize a default spell -void CHandlerMemorizePhraseOrMacro::memorizePhraseSheet(uint memoryIndex, uint32 sheetId) +void CHandlerMemorizePhraseOrMacro::memorizePhraseSheet(sint32 memoryLine, uint memoryIndex, uint32 sheetId) { CSPhraseManager *pPM= CSPhraseManager::getInstance(); - sint32 memoryLine= pPM->getSelectedMemoryLineDB(); if(memoryLine<0) return; @@ -989,7 +992,11 @@ public: return; // Ok, the user try to forget a phrase slot. - sint32 memoryLine= pPM->getSelectedMemoryLineDB(); + sint32 memoryLine; + if (pCSDst->isShortCut()) + memoryLine = pPM->getSelectedMemoryLineDB(); + else + memoryLine = pPM->getSelectedMemoryAltLineDB(); if(memoryLine<0) return; @@ -1026,6 +1033,9 @@ public: if (!pCSDst->isSPhraseIdMemory() && !pCSDst->isMacroMemory()) return; + // is alternative action bar + bool isMain = pCSDst->isShortCut(); + // get the memory index uint memoryIndex = pCSDst->getIndexInDB(); @@ -1034,7 +1044,9 @@ public: // build params string string sParams; - sParams.append("memoryIndex="); + sParams.append("isMain="); + sParams.append(toString(isMain)); + sParams.append("|memoryIndex="); sParams.append(toString(memoryIndex)); sParams.append("|isMacro="); sParams.append(toString(isMacro)); @@ -1066,11 +1078,10 @@ public: // Ok, the user try to forget a phrase slot CSPhraseManager *pPM = CSPhraseManager::getInstance(); - sint32 memoryLine = pPM->getSelectedMemoryLineDB(); - if (memoryLine<0) - return; - + // get params + bool isMain; + fromString(getParam(Params, "isMain"), isMain); uint memoryIndex; fromString(getParam(Params, "memoryIndex"), memoryIndex); bool isMacro; @@ -1078,6 +1089,14 @@ public: sint32 phraseId; fromString(getParam(Params, "phraseId"),phraseId); + sint32 memoryLine; + if (isMain) + memoryLine = pPM->getSelectedMemoryLineDB(); + else + memoryLine = pPM->getSelectedMemoryAltLineDB(); + if (memoryLine<0) + return; + if (isMacro) { pPM->forgetMacro(memoryLine, memoryIndex); @@ -1513,7 +1532,7 @@ public: if (pCSDst->isShortCut()) memoryLine = pPM->getSelectedMemoryLineDB(); else - memoryLine = 0; + memoryLine = pPM->getSelectedMemoryAltLineDB(); if(memoryLine<0) return; From 59c794f7166a23853c2db969d94d6aa5021d2a19 Mon Sep 17 00:00:00 2001 From: Sit Melai Date: Fri, 12 Jun 2020 02:24:37 +0200 Subject: [PATCH 201/236] Wrongly removed previous change --- .../ryzom/client/src/interface_v3/action_handler_phrase.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/code/ryzom/client/src/interface_v3/action_handler_phrase.cpp b/code/ryzom/client/src/interface_v3/action_handler_phrase.cpp index efe882b1d..f7ea71c33 100644 --- a/code/ryzom/client/src/interface_v3/action_handler_phrase.cpp +++ b/code/ryzom/client/src/interface_v3/action_handler_phrase.cpp @@ -533,8 +533,10 @@ public: CInterfaceManager *pIM= CInterfaceManager::getInstance(); // Launch the modal to select the faber plan - extern void fillFaberPlanSelection(const std::string &brickDB, uint maxSelection); - fillFaberPlanSelection(CDBGroupBuildPhrase::BrickSelectionDB, CDBGroupBuildPhrase::MaxSelection); + extern voidfillFaberPlanSelection(const std::string &brickDB, uint maxSelection, TOOL_TYPE::TCraftingToolType toolType); + // from sphrase_manager.cpp + extern TOOL_TYPE::TCraftingToolType getRightHandCraftToolType(); + fillFaberPlanSelection(CDBGroupBuildPhrase::BrickSelectionDB, CDBGroupBuildPhrase::MaxSelection, getRightHandCraftToolType()); // setup the validation CHandlerPhraseValidateBrick::BuildPhraseGroup= NULL; From 6c8aeb6ae33d1cd2c29d5d5858a56fcf50de6fee Mon Sep 17 00:00:00 2001 From: Sit Melai Date: Fri, 12 Jun 2020 02:31:46 +0200 Subject: [PATCH 202/236] Missed a whitespace --- code/ryzom/client/src/interface_v3/action_handler_phrase.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/ryzom/client/src/interface_v3/action_handler_phrase.cpp b/code/ryzom/client/src/interface_v3/action_handler_phrase.cpp index f7ea71c33..56e3d4b1b 100644 --- a/code/ryzom/client/src/interface_v3/action_handler_phrase.cpp +++ b/code/ryzom/client/src/interface_v3/action_handler_phrase.cpp @@ -533,7 +533,7 @@ public: CInterfaceManager *pIM= CInterfaceManager::getInstance(); // Launch the modal to select the faber plan - extern voidfillFaberPlanSelection(const std::string &brickDB, uint maxSelection, TOOL_TYPE::TCraftingToolType toolType); + extern void fillFaberPlanSelection(const std::string &brickDB, uint maxSelection, TOOL_TYPE::TCraftingToolType toolType); // from sphrase_manager.cpp extern TOOL_TYPE::TCraftingToolType getRightHandCraftToolType(); fillFaberPlanSelection(CDBGroupBuildPhrase::BrickSelectionDB, CDBGroupBuildPhrase::MaxSelection, getRightHandCraftToolType()); From 421de3fa913c88be5737980b42a50eec3e6b772c Mon Sep 17 00:00:00 2001 From: Ulukyn Date: Fri, 12 Jun 2020 14:07:17 +0200 Subject: [PATCH 203/236] Changed: fixed issue with rumors --- code/ryzom/client/src/game_context_menu.cpp | 7 +- .../client/src/interface_v3/chat_window.cpp | 107 ++++++++++-------- .../client/src/interface_v3/people_list.cpp | 37 +++--- 3 files changed, 87 insertions(+), 64 deletions(-) diff --git a/code/ryzom/client/src/game_context_menu.cpp b/code/ryzom/client/src/game_context_menu.cpp index c19ea62ac..78e58c4b5 100644 --- a/code/ryzom/client/src/game_context_menu.cpp +++ b/code/ryzom/client/src/game_context_menu.cpp @@ -451,18 +451,19 @@ void CGameContextMenu::update() else if (continent == "lepaysmalade.continent") fameIndex = CStaticFames::getInstance().getFactionIndex("zorai"); - + if (fameIndex != CStaticFames::INVALID_FACTION_INDEX) { CCDBNodeLeaf *pLeafFame = NLGUI::CDBManager::getInstance()->getDbProp(toString("SERVER:FAME:PLAYER%d:VALUE", fameIndex), false); if (pLeafFame != NULL) fameValue = pLeafFame->getValue8(); } + if (_TextNews) - _TextNews->setActive(selection && !canAttack() && selection->isNPC() && fameValue >= -30); + _TextNews->setActive(!UserEntity->isFighting() && !UserEntity->isRiding() && selection && !canAttack() && selection->isNPC() && fameValue >= -30); if (_TextNewsAgressive) - _TextNewsAgressive->setActive(selection && !canAttack() && selection->isNPC() && fameValue < -30); + _TextNewsAgressive->setActive(!UserEntity->isFighting() && !UserEntity->isRiding() && selection && !canAttack() && selection->isNPC() && fameValue < -30); if (_TextDuel && _TextUnDuel) diff --git a/code/ryzom/client/src/interface_v3/chat_window.cpp b/code/ryzom/client/src/interface_v3/chat_window.cpp index 1537e7b8b..13f7bc66d 100644 --- a/code/ryzom/client/src/interface_v3/chat_window.cpp +++ b/code/ryzom/client/src/interface_v3/chat_window.cpp @@ -215,29 +215,34 @@ void CChatWindow::displayMessage(const ucstring &msg, NLMISC::CRGBA col, CChatGr CChatTextManager &ctm = getChatTextMngr(); gl = dynamic_cast(_Chat->getGroup("cb:text_list")); - if (gl) gl->addChild(ctm.createMsgText(msg, col)); - // if the group is closed, make it blink - if (!_Chat->isOpen()) + CViewBase *child = ctm.createMsgText(msg, col); + if (child) { - if (numBlinks) _Chat->enableBlink(numBlinks); - } - if (_ParentBlink) - { - CGroupContainer *father = dynamic_cast(_Chat->getParent()); - if (father && !father->isOpen()) + if (gl) gl->addChild(child); + + // if the group is closed, make it blink + if (!_Chat->isOpen()) { - father->enableBlink(numBlinks); + if (numBlinks) _Chat->enableBlink(numBlinks); } + if (_ParentBlink) + { + CGroupContainer *father = dynamic_cast(_Chat->getParent()); + if (father && !father->isOpen()) + { + father->enableBlink(numBlinks); + } + } + if (windowVisible != NULL) + { + *windowVisible = isVisible(); + } + /*for(std::vector::iterator it = _Observers.begin(); it != _Observers.end(); ++it) + { + (*it)->displayMessage(this, msg, col, numBlinks); + }*/ } - if (windowVisible != NULL) - { - *windowVisible = isVisible(); - } - /*for(std::vector::iterator it = _Observers.begin(); it != _Observers.end(); ++it) - { - (*it)->displayMessage(this, msg, col, numBlinks); - }*/ } //================================================================================= @@ -563,12 +568,17 @@ void CChatGroupWindow::displayMessage(const ucstring &msg, NLMISC::CRGBA col, CC ucstring newmsg = msg; ucstring prefix; + CViewBase *child = NULL; if (gl != NULL) { - gl->addChild(ctm.createMsgText(newmsg, col)); - if (!gl->getParent()->getActive()) - if (tab != NULL) - tab->setTextColorNormal(newMsgColor); + child = ctm.createMsgText(newmsg, col); + if (child) + { + gl->addChild(child); + if (!gl->getParent()->getActive()) + if (tab != NULL) + tab->setTextColorNormal(newMsgColor); + } } // *** Display the message in the UserChat (special case) @@ -590,7 +600,7 @@ void CChatGroupWindow::displayMessage(const ucstring &msg, NLMISC::CRGBA col, CC case CChatGroup::guild: if (ci.Guild.isListeningWindow(cw)) gl = gl2; break; case CChatGroup::system: if (ci.SystemInfo.isListeningWindow(cw)) gl = gl2; break; case CChatGroup::universe: if (ci.Universe.isListeningWindow(cw)) gl = gl2; break; - case CChatGroup::dyn_chat: + case CChatGroup::dyn_chat: if (ci.DynamicChat[dynamicChatDbIndex].isListeningWindow(cw)) { gl = gl2; @@ -608,7 +618,7 @@ void CChatGroupWindow::displayMessage(const ucstring &msg, NLMISC::CRGBA col, CC pos = newmsg.find(ucstring("}")); prefix += " "; } - + if (pos == ucstring::npos) newmsg = prefix + newmsg; else @@ -635,31 +645,37 @@ void CChatGroupWindow::displayMessage(const ucstring &msg, NLMISC::CRGBA col, CC if (gl != NULL) { - gl->addChild(ctm.createMsgText(newmsg, col)); - if (!gl->getParent()->getActive()) - if (tab != NULL) - tab->setTextColorNormal(newMsgColor); + child = ctm.createMsgText(newmsg, col); + if (child) + { + gl->addChild(child); + if (!gl->getParent()->getActive()) + if (tab != NULL) + tab->setTextColorNormal(newMsgColor); + } } } - - // *** Blink and visibility event - // if the group is closed, make it blink - if (!_Chat->isOpen()) - { - if (numBlinks) _Chat->enableBlink(numBlinks); - } - if (_ParentBlink) + if (child) { - CGroupContainer *father = dynamic_cast(_Chat->getParent()); - if (father && !father->isOpen()) + // *** Blink and visibility event + // if the group is closed, make it blink + if (!_Chat->isOpen()) { - father->enableBlink(numBlinks); + if (numBlinks) _Chat->enableBlink(numBlinks); + } + if (_ParentBlink) + { + CGroupContainer *father = dynamic_cast(_Chat->getParent()); + if (father && !father->isOpen()) + { + father->enableBlink(numBlinks); + } + } + if (windowVisible != NULL) + { + *windowVisible = isVisible(); } - } - if (windowVisible != NULL) - { - *windowVisible = isVisible(); } } @@ -685,8 +701,9 @@ void CChatGroupWindow::displayTellMessage(const ucstring &msg, NLMISC::CRGBA col nlwarning(" can't get text_list."); return; } - - gl->addChild(getChatTextMngr().createMsgText(msg, col)); + CViewBase *child = getChatTextMngr().createMsgText(msg, col); + if (child) + gl->addChild(child); } //================================================================================= diff --git a/code/ryzom/client/src/interface_v3/people_list.cpp b/code/ryzom/client/src/interface_v3/people_list.cpp index 6be310d94..92601ed32 100644 --- a/code/ryzom/client/src/interface_v3/people_list.cpp +++ b/code/ryzom/client/src/interface_v3/people_list.cpp @@ -199,7 +199,7 @@ bool CPeopleList::sortExByName(const CPeople& a, const CPeople& b) { ucstring name_a = toUpper(a.getName()); ucstring name_b = toUpper(b.getName()); - + return (name_a < name_b); } @@ -208,7 +208,7 @@ bool CPeopleList::sortExByOnline(const CPeople& a, const CPeople& b) { ucstring name_a = toUpper(a.getName()); ucstring name_b = toUpper(b.getName()); - + // We want order: online/alpha, offworld/alpha, offline/alpha if (a.Online == b.Online) { @@ -249,7 +249,7 @@ void CPeopleList::sortEx(TSortOrder order) { _BaseContainer->detachContainer(_Peoples[k].Container); } - + switch (order) { default: @@ -480,17 +480,21 @@ void CPeopleList::displayLocalPlayerTell(const ucstring &receiver, uint index, c ucstring s = CI18N::get("youTellPlayer"); strFindReplace(s, "%name", receiver); strFindReplace(finalMsg, CI18N::get("youTell"), s); - gl->addChild(getChatTextMngr().createMsgText(finalMsg, prop.getRGBA())); - CInterfaceManager::getInstance()->log(finalMsg, CChatGroup::groupTypeToString(CChatGroup::tell)); - - // if the group is closed, make it blink - if (!gc->isOpen()) + CViewBase *child = getChatTextMngr().createMsgText(finalMsg, prop.getRGBA()); + if (child) { - if (numBlinks) gc->enableBlink(numBlinks); - } - if (_BaseContainer && !_BaseContainer->isOpen()) - { - _BaseContainer->enableBlink(numBlinks); + gl->addChild(child); + CInterfaceManager::getInstance()->log(finalMsg, CChatGroup::groupTypeToString(CChatGroup::tell)); + + // if the group is closed, make it blink + if (!gc->isOpen()) + { + if (numBlinks) gc->enableBlink(numBlinks); + } + if (_BaseContainer && !_BaseContainer->isOpen()) + { + _BaseContainer->enableBlink(numBlinks); + } } } @@ -539,8 +543,9 @@ void CPeopleList::displayMessage(uint index, const ucstring &msg, NLMISC::CRGBA nlwarning(" can't get text_list."); return; } - - gl->addChild(getChatTextMngr().createMsgText(msg, col)); + CViewBase *child = getChatTextMngr().createMsgText(msg, col); + if (child) + gl->addChild(child); } @@ -777,7 +782,7 @@ void CPeopleList::setOnline(uint index, TCharConnectionState online) CCtrlBase *chatButton = hc->getCtrl("chat_button"); if (chatButton != NULL) chatButton->setActive(online != ccs_offline); - + CCtrlBase *inviteButton = hc->getCtrl("invite_button"); if (inviteButton != NULL) inviteButton->setActive(online != ccs_offline); From 9e2872d15ec7f93040a62ba473d24785a532659c Mon Sep 17 00:00:00 2001 From: Ulukyn Date: Fri, 12 Jun 2020 14:09:29 +0200 Subject: [PATCH 204/236] Added: Add a language icon when client receive a translated message --- .../src/interface_v3/chat_text_manager.cpp | 26 +++++++++++++++++-- .../interface_v3/group_in_scene_bubble.cpp | 10 ++++++- 2 files changed, 33 insertions(+), 3 deletions(-) diff --git a/code/ryzom/client/src/interface_v3/chat_text_manager.cpp b/code/ryzom/client/src/interface_v3/chat_text_manager.cpp index 3b11d17a5..b3a673ffe 100644 --- a/code/ryzom/client/src/interface_v3/chat_text_manager.cpp +++ b/code/ryzom/client/src/interface_v3/chat_text_manager.cpp @@ -422,6 +422,29 @@ CViewBase *CChatTextManager::createMsgTextComplex(const ucstring &msg, NLMISC::C return para; } + ucstring::size_type pos = 0; + + // Manage Translations + string::size_type startTr = msg.find(ucstring("{:")); + string::size_type endOfOriginal = msg.find(ucstring("}@{")); + + // Original/Translated case, example: {:enHello the world!}@{ Bonjour le monde ! + if (startTr != string::npos && endOfOriginal != string::npos) + { + CViewBase *vt = createMsgTextSimple(msg.substr(0, startTr), col, justified, NULL); + para->addChild(vt); + + string texture = "flag-"+toLower(msg.substr(startTr+2, 2)).toString()+".tga"; + ucstring original = msg.substr(startTr+5, endOfOriginal-startTr-5); + pos = endOfOriginal+3; + CCtrlButton *ctrlButton = new CCtrlButton(CViewBase::TCtorParam()); + ctrlButton->setTexture(texture); + ctrlButton->setTextureOver(texture); + ctrlButton->setTexturePushed(texture); + ctrlButton->setDefaultContextHelp(original); + ctrlButton->setId("tr"); + para->addChild(ctrlButton); + } // quickly check if text has links or not bool hasUrl; @@ -430,8 +453,7 @@ CViewBase *CChatTextManager::createMsgTextComplex(const ucstring &msg, NLMISC::C hasUrl = (s.find(ucstring("http://")) || s.find(ucstring("https://"))); } - ucstring::size_type pos = 0; - for (ucstring::size_type i = 0; i< textSize;) + for (ucstring::size_type i = pos; i< textSize;) { if (hasUrl && isUrlTag(msg, i, textSize)) { diff --git a/code/ryzom/client/src/interface_v3/group_in_scene_bubble.cpp b/code/ryzom/client/src/interface_v3/group_in_scene_bubble.cpp index d79861b58..460a095fc 100644 --- a/code/ryzom/client/src/interface_v3/group_in_scene_bubble.cpp +++ b/code/ryzom/client/src/interface_v3/group_in_scene_bubble.cpp @@ -843,6 +843,14 @@ void CGroupInSceneBubbleManager::chatOpen (uint32 nUID, const ucstring &ucsText, if (pChar == NULL || nUID==CLFECOMMON::INVALID_CLIENT_DATASET_INDEX) return; if (bubbleTimer == 0) bubbleTimer = CWidgetManager::getInstance()->getSystemOption(CWidgetManager::OptionTimeoutBubbles).getValSInt32(); + + + // Clean bubble from translation system + ucstring::size_type pos = 0; + string::size_type endOfOriginal = ucsText.find(ucstring("}@{")); + if (endOfOriginal != string::npos) + pos = endOfOriginal+4; + // Output the message in a bubble bool show = false; @@ -862,7 +870,7 @@ void CGroupInSceneBubbleManager::chatOpen (uint32 nUID, const ucstring &ucsText, return; // Get a bubble - CGroupInSceneBubble *bubble = newBubble (ucsText); + CGroupInSceneBubble *bubble = newBubble (ucsText.substr(pos)); if (bubble) { // Link the bubble From 17e539132bcecd1dbfc430c0b5d28faacade9352 Mon Sep 17 00:00:00 2001 From: Ulukyn Date: Fri, 12 Jun 2020 14:11:01 +0200 Subject: [PATCH 205/236] Added: very basic anti-spam system (prevent duplication of same message) --- code/ryzom/client/src/net_manager.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/code/ryzom/client/src/net_manager.cpp b/code/ryzom/client/src/net_manager.cpp index 7ce27c4d5..60a996954 100644 --- a/code/ryzom/client/src/net_manager.cpp +++ b/code/ryzom/client/src/net_manager.cpp @@ -147,6 +147,7 @@ extern bool CharNameValidArrived; extern bool CharNameValid; bool IsInRingSession = false; TSessionId HighestMainlandSessionId; // highest in the position stack +ucstring lastUniversMessage; extern const char *CDBBankNames[INVALID_CDB_BANK+1]; @@ -770,7 +771,11 @@ void CInterfaceChatDisplayer::displayChat(TDataSetIndex compressedSenderIndex, c } else if (mode == CChatGroup::universe) { - PeopleInterraction.ChatInput.Universe.displayMessage(finalString, col, 2, &windowVisible); + if (lastUniversMessage != finalString) + { + PeopleInterraction.ChatInput.Universe.displayMessage(finalString, col, 2, &windowVisible); + lastUniversMessage = finalString; + } } else if (mode == CChatGroup::dyn_chat) { From 80a6bf72a9e4e2a477864e4cc3a49a5c6e32879e Mon Sep 17 00:00:00 2001 From: Ulukyn Date: Fri, 12 Jun 2020 14:11:26 +0200 Subject: [PATCH 206/236] Changed: renamed creatures are now name in ucfirst --- code/ryzom/client/src/string_manager_client.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/ryzom/client/src/string_manager_client.cpp b/code/ryzom/client/src/string_manager_client.cpp index ddc41d0d1..a10be8114 100644 --- a/code/ryzom/client/src/string_manager_client.cpp +++ b/code/ryzom/client/src/string_manager_client.cpp @@ -750,7 +750,7 @@ restartLoop: // if the string contains a special rename of creature, remove it if (str.size() > 2 && str[0] == '<' && str[1] == '#') { - str = str.substr(2); + str = toUpper(str[2])+str.substr(3); } // append this string From a87b0f4c973b9c10afa3ebec0a7b94aa86cde759 Mon Sep 17 00:00:00 2001 From: Ulukyn Date: Fri, 26 Jun 2020 15:18:54 +0200 Subject: [PATCH 207/236] Changed: When ryzom patch fails try to download lzma file (this last may never fail) --- code/ryzom/client/src/login_patch.cpp | 133 +++++++++++++++++++++----- code/ryzom/client/src/login_patch.h | 2 +- 2 files changed, 108 insertions(+), 27 deletions(-) diff --git a/code/ryzom/client/src/login_patch.cpp b/code/ryzom/client/src/login_patch.cpp index 926ed61b1..0a6b912dd 100644 --- a/code/ryzom/client/src/login_patch.cpp +++ b/code/ryzom/client/src/login_patch.cpp @@ -245,7 +245,7 @@ void CPatchManager::init(const std::vector& patchURIs, const std::s #endif // App name matches Domain on the SQL server - std::string appName = cf->getVarPtr("Application") + std::string appName = cf->getVarPtr("Application") ? cf->getVar("Application").asString(0) : "default"; @@ -1354,7 +1354,7 @@ void CPatchManager::getServerFile (const std::string &name, bool bZipped, const { //nlwarning("EXCEPTION CATCH: getServerFile() failed - try to find an alternative: %i: %s",UsedServer,PatchServers[UsedServer].DisplayedServerPath.c_str()); - nlwarning("EXCEPTION CATCH: getServerFile() failed - try to find an alternative :"); + nlwarning("EXCEPTION CATCH: getServerFile() failed - try to find an alternative : %s", (serverPath+srcName).c_str()); nlwarning("%i", UsedServer); if (UsedServer >= 0 && UsedServer < (int) PatchServers.size()) { @@ -2676,6 +2676,7 @@ void CPatchThread::processFile (CPatchManager::SFileToPatch &rFTP) string OutFilename; bool usePatchFile = true; + bool haveAllreadyTryiedDownloadingOfFile = false; // compute the total size of patch to download uint32 totalPatchSize = 0; @@ -2743,6 +2744,7 @@ void CPatchThread::processFile (CPatchManager::SFileToPatch &rFTP) { // can not load the 7zip file, use normal patching usePatchFile = true; + haveAllreadyTryiedDownloadingOfFile = true; break; } @@ -2754,6 +2756,7 @@ void CPatchThread::processFile (CPatchManager::SFileToPatch &rFTP) { // fallback to standard patch method usePatchFile = true; + haveAllreadyTryiedDownloadingOfFile = true; break; } } @@ -2766,6 +2769,7 @@ void CPatchThread::processFile (CPatchManager::SFileToPatch &rFTP) nlwarning("Failed to unpack lzma file %s", (pPM->ClientPatchPath+lzmaFile).c_str()); // fallback to standard patch method usePatchFile = true; + haveAllreadyTryiedDownloadingOfFile = true; break; } @@ -2874,32 +2878,108 @@ void CPatchThread::processFile (CPatchManager::SFileToPatch &rFTP) sTranslate = CI18N::get("uiApplyingDelta") + " " + CFile::getFilename(PatchName); pPM->setState(true, sTranslate); - xDeltaPatch(PatchName, SourceNameXD, OutFilename); + bool deltaPatchResult = xDeltaPatch(PatchName, SourceNameXD, OutFilename); - if (rFTP.LocalFileExists) - pPM->deleteFile(SourceName); - pPM->deleteFile(PatchName); - - if (j > 0) + if (!deltaPatchResult && !haveAllreadyTryiedDownloadingOfFile) // Patch failed, try to download and apply lzma { - pPM->deleteFile(SourceNameXD, false, false); // File can exists if bad BNP loading - } - tmpSourceName = OutFilename; - PatchSizeProgress += rFTP.PatcheSizes[j]; - currentPatchedSize += rFTP.PatcheSizes[j]; - } + breakable + { + // compute the seven zip filename + string lzmaFile = rFTP.FileName+".lzma"; - if (tmpSourceName != DestinationName) - { - pPM->deleteFile(SourceName, false, false); // File can exists if bad BNP loading - if (!_CommitPatch) - { - // let the patch in the unpack directory - pPM->renameFile(tmpSourceName, pPM->ClientPatchPath + rFTP.FileName + ".tmp"); + // download the 7zip file + try + { + // first, try in the file version subfolfer + try + { + progress.Scale = 1.f; + progress.Bias = 0.f; + if (!rFTP.Patches.empty()) + { + pPM->getServerFile(toString("%05u/", rFTP.Patches.back())+lzmaFile, false, "", &progress); + } + // else -> file comes from a previous download (with .tmp extension, and is up to date) + // the remaining code will just rename it with good name and exit + } + catch (const NLMISC::EWriteError &) + { + // this is a local error, rethrow ... + throw; + } + catch(...) + { + // failed with version subfolder, try in the root patch directory + pPM->getServerFile(lzmaFile, false, "", &progress); + } + } + catch (const NLMISC::EWriteError &) + { + // this is a local error, rethrow ... + throw; + } + catch (...) + { + break; + } + + OutFilename = pPM->ClientPatchPath + NLMISC::CFile::getFilename(rFTP.FileName); + // try to unpack the file + try + { + if (!unpackLZMA(pPM->ClientPatchPath+lzmaFile, OutFilename+".tmp")) + { + break; + } + } + catch (const NLMISC::EWriteError&) + { + throw; + } + catch (...) + { + nlwarning("Failed to unpack lzma file %s", (pPM->ClientPatchPath+lzmaFile).c_str()); + break; + } + + if (rFTP.LocalFileExists) + pPM->deleteFile(SourceName); + + pPM->deleteFile(pPM->ClientPatchPath+lzmaFile); // delete the archive file + pPM->deleteFile(SourceName, false, false); // File can exists if bad BNP loading + if (_CommitPatch) + { + pPM->renameFile(OutFilename+".tmp", DestinationName); + } + } } else { - pPM->renameFile(tmpSourceName, DestinationName); + if (rFTP.LocalFileExists) + pPM->deleteFile(SourceName); + pPM->deleteFile(PatchName); + + if (j > 0) + { + pPM->deleteFile(SourceNameXD, false, false); // File can exists if bad BNP loading + } + tmpSourceName = OutFilename; + PatchSizeProgress += rFTP.PatcheSizes[j]; + currentPatchedSize += rFTP.PatcheSizes[j]; + } + + if (tmpSourceName != DestinationName) + { + pPM->deleteFile(SourceName, false, false); // File can exists if bad BNP loading + if (!_CommitPatch) + { + // let the patch in the unpack directory + pPM->renameFile(tmpSourceName, pPM->ClientPatchPath + rFTP.FileName + ".tmp"); + } + else + { + pPM->renameFile(tmpSourceName, DestinationName); + } } } } @@ -2915,7 +2995,7 @@ void CPatchThread::processFile (CPatchManager::SFileToPatch &rFTP) } // **************************************************************************** -void CPatchThread::xDeltaPatch(const string &patch, const string &src, const string &out) +bool CPatchThread::xDeltaPatch(const string &patch, const string &src, const string &out) { // Internal xdelta @@ -2941,12 +3021,13 @@ void CPatchThread::xDeltaPatch(const string &patch, const string &src, const str break; default: { - std::string str = toString("Error applying %s to %s giving %s", patch.c_str(), src.c_str(), out.c_str()); - throw Exception (str); + nlinfo("Error applying %s to %s giving %s", patch.c_str(), src.c_str(), out.c_str()); + return false; } break; } - } + } else + return true; // Launching xdelta diff --git a/code/ryzom/client/src/login_patch.h b/code/ryzom/client/src/login_patch.h index 2b108994d..27ffec901 100644 --- a/code/ryzom/client/src/login_patch.h +++ b/code/ryzom/client/src/login_patch.h @@ -547,7 +547,7 @@ private: void run(); void processFile (CPatchManager::SFileToPatch &rFTP); - void xDeltaPatch(const std::string &patch, const std::string &src, const std::string &out); + bool xDeltaPatch(const std::string &patch, const std::string &src, const std::string &out); }; /** From 107dbc1987b64041aa7532b7f4156f4e897fe954 Mon Sep 17 00:00:00 2001 From: Ulukyn Date: Fri, 26 Jun 2020 19:44:54 +0200 Subject: [PATCH 208/236] Changed: Fixed non-Mac compilation --- .../src/3d/driver/opengl/driver_opengl_extension.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/code/nel/src/3d/driver/opengl/driver_opengl_extension.cpp b/code/nel/src/3d/driver/opengl/driver_opengl_extension.cpp index f7c0bf496..4bdd7ca97 100644 --- a/code/nel/src/3d/driver/opengl/driver_opengl_extension.cpp +++ b/code/nel/src/3d/driver/opengl/driver_opengl_extension.cpp @@ -1275,7 +1275,7 @@ static bool setupNVFragmentProgram2(const char *glext) { H_AUTO_OGL(setupNVFragmentProgram2); CHECK_EXT("GL_NV_fragment_program2"); - + return true; } @@ -1284,7 +1284,7 @@ static bool setupARBFragmentShader(const char *glext) { H_AUTO_OGL(setupNVFragmentProgram2); CHECK_EXT("GL_ARB_fragment_shader"); - + return true; } @@ -1583,12 +1583,14 @@ static bool setupATIMeminfo(const char *glext) void registerGlExtensions(CGlExtensions &ext) { H_AUTO_OGL(registerGlExtensions); - + +#ifdef NL_OS_MAC CGLContextObj ctx = CGLGetCurrentContext(); if (ctx == NULL) { nlerror("No OpenGL context set"); } +#endif // OpenGL 1.2 ?? const char *nglVersion = (const char *)glGetString (GL_VERSION); @@ -1697,12 +1699,12 @@ void registerGlExtensions(CGlExtensions &ext) ext.EXTVertexShader = false; ext.ARBVertexProgram = false; } - + // Check pixel program // Disable feature ??? if (!ext.DisableHardwarePixelProgram) { - ext.ARBFragmentProgram = setupARBFragmentProgram(glext); + ext.ARBFragmentProgram = setupARBFragmentProgram(glext); ext.NVFragmentProgram2 = setupNVFragmentProgram2(glext); ext.ARBFragmentShader = setupARBFragmentShader(glext); } From 2a4b16ab1b9fb66dac18a0353577323322c88b81 Mon Sep 17 00:00:00 2001 From: Nimetu Date: Thu, 25 Jun 2020 14:44:45 +0300 Subject: [PATCH 209/236] Changed: Allow to use 2x/4x hi-res texture atlas for GUI elements --- code/nel/include/nel/gui/view_renderer.h | 4 ++++ code/nel/src/gui/view_renderer.cpp | 26 +++++++++++++++++------- 2 files changed, 23 insertions(+), 7 deletions(-) diff --git a/code/nel/include/nel/gui/view_renderer.h b/code/nel/include/nel/gui/view_renderer.h index aefbb315f..4498a436a 100644 --- a/code/nel/include/nel/gui/view_renderer.h +++ b/code/nel/include/nel/gui/view_renderer.h @@ -444,9 +444,13 @@ namespace NLGUI SGlobalTexture () { FromGlobaleTexture = true; + Scale = 1.f; } uint32 Width, Height; uint32 DefaultWidth, DefaultHeight; + // used by texture atlas to unscale individual texture + // getTextureSizeFromId() calls to return 1x size for GUI. + float Scale; NL3D::UTexture *Texture; std::string Name; bool FromGlobaleTexture; diff --git a/code/nel/src/gui/view_renderer.cpp b/code/nel/src/gui/view_renderer.cpp index 82716de4a..6a7d86eef 100644 --- a/code/nel/src/gui/view_renderer.cpp +++ b/code/nel/src/gui/view_renderer.cpp @@ -621,9 +621,7 @@ namespace NLGUI return; sint32 txw, txh; - SImage &rImage = *getSImage(nTxId); - txw = (sint32)((rImage.UVMax.U - rImage.UVMin.U)*rImage.GlobalTexturePtr->Width+0.5f); - txh = (sint32)((rImage.UVMax.V - rImage.UVMin.V)*rImage.GlobalTexturePtr->Height+0.5f); + getTextureSizeFromId(nTxId, txw, txh); drawRotFlipBitmap (layerId, x, y, txw, txh, rot, flipv, nTxId, col); } @@ -859,6 +857,14 @@ namespace NLGUI CIFile ifTmp; if (ifTmp.open(filename)) CBitmap::loadSize (ifTmp, gt.Width, gt.Height); + + // extract textures scale from filename + // texture_interface_v3_2x.tga / texture_interface_v3_4x.tga + if (textureFileName.find("_2x.") != std::string::npos) + gt.Scale = 2.f; + else if (textureFileName.find("_4x.") != std::string::npos) + gt.Scale = 4.f; + gt.Texture = driver->createTextureFile (filename); // Force to generate the texture now. This way we can extract the mouse bitmaps from it now without having to load it again. // Its why we don't release it at the end, because it is likely to be uploaded soon) @@ -932,6 +938,10 @@ namespace NLGUI CBitmap curs; curs.resize(x1 - x0, y1 - y0); curs.blit(*texDatas, x0, y0, (x1 - x0), (y1 - y0), 0, 0); + // TODO: scaled cursors not supported + if (gt.Scale > 1.f) { + curs.resample((sint)(curs.getWidth() / gt.Scale), (sint)(curs.getHeight() / gt.Scale)); + } driver->addCursor(image.Name, curs); } } @@ -1357,8 +1367,8 @@ namespace NLGUI else { SImage &rImage = *getSImage(id); - width = (sint32)((rImage.UVMax.U - rImage.UVMin.U)*rImage.GlobalTexturePtr->Width+0.5f); - height = (sint32)((rImage.UVMax.V - rImage.UVMin.V)*rImage.GlobalTexturePtr->Height+0.5f); + width = (sint32)(((rImage.UVMax.U - rImage.UVMin.U)*rImage.GlobalTexturePtr->Width / rImage.GlobalTexturePtr->Scale)+0.5f); + height = (sint32)(((rImage.UVMax.V - rImage.UVMin.V)*rImage.GlobalTexturePtr->Height / rImage.GlobalTexturePtr->Scale)+0.5f); } } /* @@ -1373,9 +1383,11 @@ namespace NLGUI SImage &rImage = *getSImage(id); SGlobalTexture &rGT = *rImage.GlobalTexturePtr; + // get (possibly) scaled width/height sint32 width, height; - width = (sint32)((rImage.UVMax.U - rImage.UVMin.U)*rGT.Width+0.5f); - height = (sint32)((rImage.UVMax.V - rImage.UVMin.V)*rGT.Height+0.5f); + getTextureSizeFromId(id, width, height); + if (width == 0 || height == 0) + return CRGBA(255,255,255); float xRatio = ((float)x) / ((float)(width)); float yRatio = ((float)y) / ((float)(height)); UTexture *pTF = rGT.Texture; From f7be62eb3ddc1511df04bc407166c94e87db945d Mon Sep 17 00:00:00 2001 From: Nimetu Date: Mon, 6 Jul 2020 18:36:48 +0300 Subject: [PATCH 210/236] Fixed: Player/guild room buy dialog price --- code/ryzom/client/src/interface_v3/bot_chat_page_trade.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/code/ryzom/client/src/interface_v3/bot_chat_page_trade.cpp b/code/ryzom/client/src/interface_v3/bot_chat_page_trade.cpp index 4a59163b3..d05ba9d7a 100644 --- a/code/ryzom/client/src/interface_v3/bot_chat_page_trade.cpp +++ b/code/ryzom/client/src/interface_v3/bot_chat_page_trade.cpp @@ -588,7 +588,8 @@ void CBotChatPageTrade::updateTradeModal() if ((_BuyMean == MoneyGuildXP) || (_BuyMean == GuildMoney) || (_BuyMean == GuildMoneyGuildXP)) { uint64 totalPrice = (uint64) priceWithoutFame * (uint64) quantity; - NLGUI::CDBManager::getInstance()->getDbProp("UI:TEMP:TRADE_ITEM:PRICE")->setValue64(totalPrice); + NLGUI::CDBManager::getInstance()->getDbProp("UI:TEMP:TRADE_ITEM:UNIT_PRICE")->setValue64(totalPrice); + NLGUI::CDBManager::getInstance()->getDbProp("UI:TEMP:TRADE_ITEM:UNIT_PRICE_WITH_FAME")->setValue64(totalPrice); uint64 totalXP = (uint64) getCurrItemXP() * (uint64) quantity; CGuildManager *pGM = CGuildManager::getInstance(); From f31eeff8fc753f6cc0e78c00a0ff23d570da0ade Mon Sep 17 00:00:00 2001 From: Riasan Date: Tue, 7 Jul 2020 14:00:42 +0200 Subject: [PATCH 211/236] Changed: add display current online guildmembers --- code/ryzom/client/src/interface_v3/guild_manager.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/code/ryzom/client/src/interface_v3/guild_manager.cpp b/code/ryzom/client/src/interface_v3/guild_manager.cpp index d00661357..5190404ab 100644 --- a/code/ryzom/client/src/interface_v3/guild_manager.cpp +++ b/code/ryzom/client/src/interface_v3/guild_manager.cpp @@ -67,6 +67,7 @@ NLMISC_REGISTER_OBJECT(CViewBase, CDBGroupListAscensor, std::string, "list_sheet #define VIEW_TEXT_GUILD_QUIT "ui:interface:guild:content:tab_guild_info:quit_guild" #define CTRL_SHEET_GUILD_BLASON "ui:interface:guild:content:tab_guild_info:blason" #define VIEW_TEXT_GUILD_MEMBER_COUNT "ui:interface:guild:content:tab_guild_info:member_count" +#define VIEW_TEXT_GUILD_MEMBER_COUNT_ONLINE "ui:interface:guild:content:tab_guild_info:member_count_online" #define LIST_GUILD_MEMBERS "ui:interface:guild:content:tab_guild:list_member:guild_members" @@ -817,6 +818,7 @@ class CAHGuildSheetOpen : public IActionHandler if (pParent == NULL) return; pParent->clearGroups(); pParent->setDynamicDisplaySize(false); + uint member_online = 0; for (uint i = 0; i < rGuildMembers.size(); i++) { // create the member line @@ -855,11 +857,13 @@ class CAHGuildSheetOpen : public IActionHandler switch(rGuildMembers[i].Online) { case ccs_online: + member_online++; onlineView->setTexture("w_online.tga"); if (toolTip) toolTip->setDefaultContextHelp(CI18N::get("uittGuildMemberOnline")); break; case ccs_online_abroad: + member_online++; onlineView->setTexture("w_online_abroad.tga"); if (toolTip) toolTip->setDefaultContextHelp(CI18N::get("uittGuildMemberOnlineAbroad")); @@ -895,6 +899,12 @@ class CAHGuildSheetOpen : public IActionHandler pLine->setParent (pParent); pParent->addChild (pLine); } + + // update member online count view + CViewText *pOnlineMember = dynamic_cast(CWidgetManager::getInstance()->getElementFromId(VIEW_TEXT_GUILD_MEMBER_COUNT_ONLINE)); + if (pOnlineMember) + pOnlineMember->setText(toString(member_online)); + } } }; From 6fa74cd5c2dfca0dfb5a7f0b74d77fd893ba12c5 Mon Sep 17 00:00:00 2001 From: Ulukyn Date: Thu, 9 Jul 2020 13:15:13 +0200 Subject: [PATCH 212/236] Added: Option to use ryzom_client_patcher as bnp unpacker and xdelta patcher --- code/ryzom/client/src/login_patch.h | 3 +- .../tools/client/client_patcher/main.cpp | 31 +++++++++++++++++-- 2 files changed, 30 insertions(+), 4 deletions(-) diff --git a/code/ryzom/client/src/login_patch.h b/code/ryzom/client/src/login_patch.h index 27ffec901..7c0a68b2d 100644 --- a/code/ryzom/client/src/login_patch.h +++ b/code/ryzom/client/src/login_patch.h @@ -269,6 +269,7 @@ public: void setStartRyzomAtEnd(bool startAtEnd){ _StartRyzomAtEnd = startAtEnd; } // Forward message to installation software if needed void fatalError(const std::string& errorId, const std::string& param1, const std::string& param2); + bool bnpUnpack(const std::string &srcBigfile, const std::string &dstPath, std::vector &vFilenames); const std::string & getServerVersion () { return ServerVersion; } private: @@ -320,8 +321,6 @@ private: void getPatchFromDesc(SFileToPatch &ftpOut, const CBNPFile &fIn, bool forceCheckSumTest); - bool bnpUnpack(const std::string &srcBigfile, const std::string &dstPath, std::vector &vFilenames); - // stop the threads (called when knowing the thread ended) void stopCheckThread(); void stopPatchThread(); diff --git a/code/ryzom/tools/client/client_patcher/main.cpp b/code/ryzom/tools/client/client_patcher/main.cpp index e7d57a335..62937dd59 100644 --- a/code/ryzom/tools/client/client_patcher/main.cpp +++ b/code/ryzom/tools/client/client_patcher/main.cpp @@ -200,9 +200,38 @@ int main(int argc, char *argv[]) Args.setVersion(getDisplayVersion()); Args.setDescription("Ryzom client"); + Args.addArg("p", "patch", "patch", "Name of the file to use tp xdelta the source file"); + Args.addArg("s", "source", "source", "Name of source file to xdelta with patch file"); + Args.addArg("d", "destination", "destination", "Name of destination operation (patch or unpack)"); + Args.addArg("u", "unpack", "unpack", "Name of bnp file to unpack"); if (!Args.parse(argc, argv)) return 1; + if (Args.haveArg("p") && Args.haveArg("p") && Args.haveArg("p")) + { + string patchName = Args.getArg("p").front(); + string sourceName = Args.getArg("s").front(); + string destinationName = Args.getArg("d").front(); + + std::string errorMsg; + CXDeltaPatch::TApplyResult ar = CXDeltaPatch::apply(patchName, sourceName, destinationName, errorMsg); + nlinfo("%s", errorMsg.c_str()); + return ar; + } + + // initialize patch manager and set the ryzom full path, before it's used + CPatchManager *pPM = CPatchManager::getInstance(); + + if (Args.haveArg("u") && Args.haveArg("d")) + { + string bnpName = Args.getArg("u").front(); + string destinationName = Args.getArg("d").front(); + vector vFilenames; + if (pPM->bnpUnpack(bnpName, destinationName, vFilenames)) + return 0; + return 1; + } + // create logs in temporary directory createDebug(CPath::getTemporaryDirectory().c_str(), true, true); @@ -244,8 +273,6 @@ int main(int argc, char *argv[]) printf("\n"); printf("Checking %s files to patch...\n", convert(CI18N::get("TheSagaOfRyzom")).c_str()); - // initialize patch manager and set the ryzom full path, before it's used - CPatchManager *pPM = CPatchManager::getInstance(); // use PatchUrl vector patchURLs; From c06469b2a03c4bb919483f5693c949e4dfa42c52 Mon Sep 17 00:00:00 2001 From: Sit Melai Date: Sat, 15 Aug 2020 16:49:14 +0200 Subject: [PATCH 213/236] Fixed second action bar not updating after being changed --- code/ryzom/client/src/interface_v3/sphrase_manager.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/code/ryzom/client/src/interface_v3/sphrase_manager.cpp b/code/ryzom/client/src/interface_v3/sphrase_manager.cpp index 160010f3f..f9dd511d5 100644 --- a/code/ryzom/client/src/interface_v3/sphrase_manager.cpp +++ b/code/ryzom/client/src/interface_v3/sphrase_manager.cpp @@ -411,7 +411,7 @@ void CSPhraseManager::forgetPhrase(uint32 memoryLine, uint32 memorySlot) _Memories[memoryLine].Slot[memorySlot].Id= 0; // must update DB? - if((sint32)memoryLine==_SelectedMemoryDB) + if((sint32)memoryLine==_SelectedMemoryDB || (sint32)memoryLine==_SelectedMemoryDBalt) { // update the db updateMemoryDBSlot(memorySlot); @@ -465,7 +465,7 @@ void CSPhraseManager::memorizePhrase(uint32 memoryLine, uint32 memorySlot, ui _Memories[memoryLine].Slot[memorySlot].Id= slot; // must update DB? - if((sint32)memoryLine==_SelectedMemoryDB) + if((sint32)memoryLine==_SelectedMemoryDB || (sint32)memoryLine==_SelectedMemoryDBalt) { // update the DB updateMemoryDBSlot(memorySlot); @@ -3276,7 +3276,7 @@ void CSPhraseManager::memorizeMacro(uint32 memoryLine, uint32 memorySlot, uint32 _Memories[memoryLine].Slot[memorySlot].Id= macroId; // must update DB? - if((sint32)memoryLine==_SelectedMemoryDB) + if((sint32)memoryLine==_SelectedMemoryDB || (sint32)memoryLine==_SelectedMemoryDBalt) { // update the DB updateMemoryDBSlot(memorySlot); @@ -3302,7 +3302,7 @@ void CSPhraseManager::forgetMacro(uint32 memoryLine, uint32 memorySlot) _Memories[memoryLine].Slot[memorySlot].Id= 0; // must update DB? - if((sint32)memoryLine==_SelectedMemoryDB) + if((sint32)memoryLine==_SelectedMemoryDB || (sint32)memoryLine==_SelectedMemoryDBalt) { // update the db updateMemoryDBSlot(memorySlot); From e5b3b752d5743723f56fc7a457d92288f3396746 Mon Sep 17 00:00:00 2001 From: Sit Melai Date: Sat, 15 Aug 2020 15:01:09 +0000 Subject: [PATCH 214/236] Copyright somehow got lost --- code/ryzom/client/src/interface_v3/action_handler_phrase.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/code/ryzom/client/src/interface_v3/action_handler_phrase.cpp b/code/ryzom/client/src/interface_v3/action_handler_phrase.cpp index 56e3d4b1b..b18e348e5 100644 --- a/code/ryzom/client/src/interface_v3/action_handler_phrase.cpp +++ b/code/ryzom/client/src/interface_v3/action_handler_phrase.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) 2013 Laszlo KIS-ADAM (dfighter) +// // 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 From bccc86bd996b4ceedada6e49dc45b9c860609969 Mon Sep 17 00:00:00 2001 From: Sit Melai Date: Sat, 15 Aug 2020 18:51:20 +0200 Subject: [PATCH 215/236] Added option to show the translation as a tooltip and original by default --- .../src/interface_v3/chat_text_manager.cpp | 17 +++++++++++++-- .../interface_v3/group_in_scene_bubble.cpp | 21 ++++++++++++++++--- 2 files changed, 33 insertions(+), 5 deletions(-) diff --git a/code/ryzom/client/src/interface_v3/chat_text_manager.cpp b/code/ryzom/client/src/interface_v3/chat_text_manager.cpp index b3a673ffe..ec0aee822 100644 --- a/code/ryzom/client/src/interface_v3/chat_text_manager.cpp +++ b/code/ryzom/client/src/interface_v3/chat_text_manager.cpp @@ -425,6 +425,9 @@ CViewBase *CChatTextManager::createMsgTextComplex(const ucstring &msg, NLMISC::C ucstring::size_type pos = 0; // Manage Translations + CCDBNodeLeaf *node= NLGUI::CDBManager::getInstance()->getDbProp("UI:SAVE:CHAT:SHOW_TRANSLATION_ONLY_AS_TOOLTIP_CB", false); + bool originalFirst = node->getValueBool(); + string::size_type startTr = msg.find(ucstring("{:")); string::size_type endOfOriginal = msg.find(ucstring("}@{")); @@ -436,12 +439,22 @@ CViewBase *CChatTextManager::createMsgTextComplex(const ucstring &msg, NLMISC::C string texture = "flag-"+toLower(msg.substr(startTr+2, 2)).toString()+".tga"; ucstring original = msg.substr(startTr+5, endOfOriginal-startTr-5); - pos = endOfOriginal+3; + ucstring translation = msg.substr(endOfOriginal+3); CCtrlButton *ctrlButton = new CCtrlButton(CViewBase::TCtorParam()); ctrlButton->setTexture(texture); ctrlButton->setTextureOver(texture); ctrlButton->setTexturePushed(texture); - ctrlButton->setDefaultContextHelp(original); + if (!originalFirst) + { + ctrlButton->setDefaultContextHelp(original); + pos = endOfOriginal+3; + } + else + { + ctrlButton->setDefaultContextHelp(translation); + pos = startTr+5; + textSize = endOfOriginal; + } ctrlButton->setId("tr"); para->addChild(ctrlButton); } diff --git a/code/ryzom/client/src/interface_v3/group_in_scene_bubble.cpp b/code/ryzom/client/src/interface_v3/group_in_scene_bubble.cpp index 460a095fc..2276eb506 100644 --- a/code/ryzom/client/src/interface_v3/group_in_scene_bubble.cpp +++ b/code/ryzom/client/src/interface_v3/group_in_scene_bubble.cpp @@ -846,11 +846,26 @@ void CGroupInSceneBubbleManager::chatOpen (uint32 nUID, const ucstring &ucsText, // Clean bubble from translation system + CCDBNodeLeaf *node= NLGUI::CDBManager::getInstance()->getDbProp("UI:SAVE:CHAT:SHOW_TRANSLATION_ONLY_AS_TOOLTIP_CB", false); + bool originalFirst = node->getValueBool(); + ucstring::size_type pos = 0; + ucstring::size_type textSize = ucsText.size(); + string::size_type startTr = ucsText.find(ucstring("{:")); string::size_type endOfOriginal = ucsText.find(ucstring("}@{")); if (endOfOriginal != string::npos) - pos = endOfOriginal+4; - + { + if (!originalFirst) + { + pos = endOfOriginal+4; + } + else + { + pos = startTr+5; + textSize = endOfOriginal; + } + } + // Output the message in a bubble bool show = false; @@ -870,7 +885,7 @@ void CGroupInSceneBubbleManager::chatOpen (uint32 nUID, const ucstring &ucsText, return; // Get a bubble - CGroupInSceneBubble *bubble = newBubble (ucsText.substr(pos)); + CGroupInSceneBubble *bubble = newBubble (ucsText.substr(pos, textSize-pos)); if (bubble) { // Link the bubble From b8b21914f64413ee58f8dc07f9e89e2e1a3a56ef Mon Sep 17 00:00:00 2001 From: Sit Melai Date: Sun, 16 Aug 2020 02:58:52 +0200 Subject: [PATCH 216/236] Made item groups compatible with Zigs --- .../client/src/interface_v3/inventory_manager.cpp | 15 +++++++++++++++ .../client/src/interface_v3/inventory_manager.h | 9 +++++++++ code/ryzom/client/src/item_group_manager.cpp | 6 ++++++ 3 files changed, 30 insertions(+) diff --git a/code/ryzom/client/src/interface_v3/inventory_manager.cpp b/code/ryzom/client/src/interface_v3/inventory_manager.cpp index 816f676e2..312df9769 100644 --- a/code/ryzom/client/src/interface_v3/inventory_manager.cpp +++ b/code/ryzom/client/src/interface_v3/inventory_manager.cpp @@ -3769,6 +3769,21 @@ void CInventoryManager::sortBag() if (pIconList != NULL) pIconList->needToSort(); pList = dynamic_cast(CWidgetManager::getInstance()->getElementFromId(LIST_PA3_TEXT)); if (pList != NULL) pList->needToSort(); + + pIconList = dynamic_cast(CWidgetManager::getInstance()->getElementFromId(LIST_PA4_ICONS)); + if (pIconList != NULL) pIconList->needToSort(); + pList = dynamic_cast(CWidgetManager::getInstance()->getElementFromId(LIST_PA4_TEXT)); + if (pList != NULL) pList->needToSort(); + + pIconList = dynamic_cast(CWidgetManager::getInstance()->getElementFromId(LIST_PA5_ICONS)); + if (pIconList != NULL) pIconList->needToSort(); + pList = dynamic_cast(CWidgetManager::getInstance()->getElementFromId(LIST_PA5_TEXT)); + if (pList != NULL) pList->needToSort(); + + pIconList = dynamic_cast(CWidgetManager::getInstance()->getElementFromId(LIST_PA6_ICONS)); + if (pIconList != NULL) pIconList->needToSort(); + pList = dynamic_cast(CWidgetManager::getInstance()->getElementFromId(LIST_PA6_TEXT)); + if (pList != NULL) pList->needToSort(); } // *************************************************************************** diff --git a/code/ryzom/client/src/interface_v3/inventory_manager.h b/code/ryzom/client/src/interface_v3/inventory_manager.h index 8c365a0be..160b7c1aa 100644 --- a/code/ryzom/client/src/interface_v3/inventory_manager.h +++ b/code/ryzom/client/src/interface_v3/inventory_manager.h @@ -822,6 +822,15 @@ private: #define LIST_PA3_TEXT "ui:interface:inv_pa3:content:iil:bag_list" #define LIST_PA3_ICONS "ui:interface:inv_pa3:content:iil:bag_icons" +#define LIST_PA4_TEXT "ui:interface:inv_pa4:content:iil:bag_list" +#define LIST_PA4_ICONS "ui:interface:inv_pa4:content:iil:bag_icons" + +#define LIST_PA5_TEXT "ui:interface:inv_pa5:content:iil:bag_list" +#define LIST_PA5_ICONS "ui:interface:inv_pa5:content:iil:bag_icons" + +#define LIST_PA6_TEXT "ui:interface:inv_pa6:content:iil:bag_list" +#define LIST_PA6_ICONS "ui:interface:inv_pa6:content:iil:bag_icons" + // Theorically never used #define LIST_BAG2_TEXT "ui:interface:inv_bag:content:iil:bag_list" #define LIST_BAG2_ICONS "ui:interface:inv_bag:content:iil:bag_icons" diff --git a/code/ryzom/client/src/item_group_manager.cpp b/code/ryzom/client/src/item_group_manager.cpp index fddba873f..82a60f478 100644 --- a/code/ryzom/client/src/item_group_manager.cpp +++ b/code/ryzom/client/src/item_group_manager.cpp @@ -733,6 +733,12 @@ std::string CItemGroupManager::toDbPath(INVENTORIES::TInventory inventory) return LIST_PA2_TEXT; break; case INVENTORIES::pet_animal4: return LIST_PA3_TEXT; break; + case INVENTORIES::pet_animal5: + return LIST_PA4_TEXT; break; + case INVENTORIES::pet_animal6: + return LIST_PA5_TEXT; break; + case INVENTORIES::pet_animal7: + return LIST_PA6_TEXT; break; case INVENTORIES::player_room: return LIST_ROOM_TEXT;break; case INVENTORIES::guild: From 49fcec5759c5b02f918d8ed27fccc71cde1e07c3 Mon Sep 17 00:00:00 2001 From: Sit Melai Date: Thu, 27 Aug 2020 02:30:02 +0200 Subject: [PATCH 217/236] First steps, still work in progress --- .../src/interface_v3/people_interraction.cpp | 56 +++++++++++++++++++ .../client/src/interface_v3/people_list.h | 3 +- 2 files changed, 58 insertions(+), 1 deletion(-) diff --git a/code/ryzom/client/src/interface_v3/people_interraction.cpp b/code/ryzom/client/src/interface_v3/people_interraction.cpp index 96f27bb6c..91226657e 100644 --- a/code/ryzom/client/src/interface_v3/people_interraction.cpp +++ b/code/ryzom/client/src/interface_v3/people_interraction.cpp @@ -2307,6 +2307,62 @@ public: }; REGISTER_ACTION_HANDLER( CHandlerMoveContact, "move_contact"); +uint lastPeopleIndexChangeGroup; +//================================================================================================================= +class CHandlerChangeContactGroupBegin : public IActionHandler +{ +public: + void execute (CCtrlBase * /* pCaller */, const std::string &sParams) + { + // retrieve the index of the people + CPeopleList *srcList; + if (PeopleInterraction.getPeopleFromCurrentMenu(srcList, lastPeopleIndexChangeGroup)) + { + string groupName= getParam(sParams, "group"); + CInterfaceGroup *gc = dynamic_cast(CWidgetManager::getInstance()->getElementFromId(groupName)); + if (gc) + { + CGroupEditBox *geb = dynamic_cast(gc->getGroup("change_contact_group_eb:eb")); + geb->setInputString(ucstring("")); + } + CAHManager::getInstance()->runActionHandler("enter_modal", pCaller, sParams); + } + } +}; +REGISTER_ACTION_HANDLER( CHandlerMoveContact, "change_contact_group_begin"); + +//================================================================================================================= +// Add a contact to the list +class CHandlerChangeContactGroup : public IActionHandler +{ +public: + void execute (CCtrlBase *pCaller, const std::string &/* sParams */) + { + CInterfaceManager *pIM = CInterfaceManager::getInstance(); + + if (pCaller) + { + // Get the modal edit box + CGroupEditBox *geb = dynamic_cast(CWidgetManager::getInstance()->getElementFromId("ui:interface:change_contact_group_eb:eb")); + if (geb && !geb->getInputString().empty()) + { + // don't add if it is the player name + if (!ClientCfg.Local && (UserEntity->getEntityName() == geb->getInputString())) + { + displayVisibleSystemMsg(CI18N::get("uiCantAddYourSelfInContactList")); + } + else + { + PeopleInterraction.askAddContact(geb->getInputString(), peopleList); + geb->setInputString(ucstring("")); + } + geb->setInputString(ucstring("")); + } + } + CAHManager::getInstance()->runActionHandler("leave_modal", pCaller, ""); + } +}; +REGISTER_ACTION_HANDLER( CHandlerAddContact, "change_contact_group"); //================================================================================================================= class CHandlerSortContacts : public IActionHandler diff --git a/code/ryzom/client/src/interface_v3/people_list.h b/code/ryzom/client/src/interface_v3/people_list.h index 32317b6b8..6845ce73a 100644 --- a/code/ryzom/client/src/interface_v3/people_list.h +++ b/code/ryzom/client/src/interface_v3/people_list.h @@ -151,13 +151,14 @@ public: private: struct CPeople { - CPeople() : Container(NULL), Chat(NULL), Online(ccs_offline), Blocked(false), ContactId(0) {} + CPeople() : Container(NULL), Chat(NULL), Online(ccs_offline), Blocked(false), ContactId(0), Group("") {} NLMISC::CRefPtr Container; // todo : replace this with a CChatWindow one day, for consistency NLMISC::CRefPtr Chat; uint GlobalID; TCharConnectionState Online; bool Blocked; uint32 ContactId; + ucstring Group; bool operator < (const CPeople &other) const { return getName() < other.getName(); } ucstring getName() const { return Container->getUCTitle(); } }; From 5dc85db8b114d5d21993b1c48200cd599688f438 Mon Sep 17 00:00:00 2001 From: Sit Melai Date: Tue, 1 Sep 2020 15:29:02 +0200 Subject: [PATCH 218/236] Added action handlers to change contact group and read/write to file --- .../src/interface_v3/people_interraction.cpp | 517 +++++++++--------- .../client/src/interface_v3/people_list.cpp | 340 +++++++++--- .../client/src/interface_v3/people_list.h | 6 + 3 files changed, 525 insertions(+), 338 deletions(-) diff --git a/code/ryzom/client/src/interface_v3/people_interraction.cpp b/code/ryzom/client/src/interface_v3/people_interraction.cpp index 91226657e..9164a78ea 100644 --- a/code/ryzom/client/src/interface_v3/people_interraction.cpp +++ b/code/ryzom/client/src/interface_v3/people_interraction.cpp @@ -90,7 +90,7 @@ static const sint PARTY_CHAT_SPAWN_DELTA = 20; // to avoid that all party chat a ////////////////////////////////// /** Display an error msg in the system info window, and also in the last window that triggered the command (so that the user is sure to see it) - */ + */ static void displayVisibleSystemMsg(const ucstring &msg, const string &cat = "CHK"); @@ -289,13 +289,13 @@ void CChatStdInput::registerListeningWindow(CChatWindow *cw) //=========================================================================================================== CPeopleInterraction::CPeopleInterraction() : Region(NULL), - Universe(NULL), - TeamChat(NULL), - GuildChat(NULL), - SystemInfo(NULL), - TellWindow(NULL), - DebugInfo(NULL), - CurrPartyChatID(0) + Universe(NULL), + TeamChat(NULL), + GuildChat(NULL), + SystemInfo(NULL), + TellWindow(NULL), + DebugInfo(NULL), + CurrPartyChatID(0) { for(uint i=0;isetMenu("ui:interface:base_chat_box_menu"); */ + chatDesc.FatherContainer = "ui:interface"; + chatDesc.Title = "uiTellWindow"; + chatDesc.Listener = NULL; + chatDesc.Savable = true; + chatDesc.Localize = true; + chatDesc.Id = "tell"; + chatDesc.ChatTemplate ="chat_no_eb_id"; + chatDesc.AHOnActive = "set"; + chatDesc.AHOnActiveParams = "dblink=UI:SAVE:ISDETACHED:TELL|value=1"; + chatDesc.AHOnDeactive = "set"; + chatDesc.AHOnDeactiveParams = "dblink=UI:SAVE:ISDETACHED:TELL|value=0"; + + TellWindow = getChatWndMgr().createChatWindow(chatDesc); + if (!TellWindow) return; + TellWindow->setMenu("ui:interface:base_chat_box_menu"); */ } //=========================================================================================================== @@ -826,13 +828,13 @@ class CHandlerUserChatActive : public IActionHandler CChatGroup::TGroupType m = PeopleInterraction.TheUserChat.Filter.getTargetGroup(); switch(m) { - default: - case CChatGroup::arround: - case CChatGroup::say: pUserBut->setHardText("uiFilterAround"); break; - case CChatGroup::region: pUserBut->setHardText("uiFilterRegion"); break; - case CChatGroup::universe: pUserBut->setHardText("uiFilterUniverse"); break; - case CChatGroup::team: pUserBut->setHardText("uiFilterTeam"); break; - case CChatGroup::guild: pUserBut->setHardText("uiFilterGuild"); break; + default: + case CChatGroup::arround: + case CChatGroup::say: pUserBut->setHardText("uiFilterAround"); break; + case CChatGroup::region: pUserBut->setHardText("uiFilterRegion"); break; + case CChatGroup::universe: pUserBut->setHardText("uiFilterUniverse"); break; + case CChatGroup::team: pUserBut->setHardText("uiFilterTeam"); break; + case CChatGroup::guild: pUserBut->setHardText("uiFilterGuild"); break; } pUserBut->getParent()->updateCoords(); pUserBut->updateCoords(); @@ -925,29 +927,29 @@ class CHandlerChatGroupFilter : public IActionHandler CChatGroup::TGroupType m = PeopleInterraction.TheUserChat.Filter.getTargetGroup(); switch(m) { - default: - case CChatGroup::arround: - case CChatGroup::say: pUserBut->setHardText("uiFilterAround"); break; - case CChatGroup::region: pUserBut->setHardText("uiFilterRegion"); break; - case CChatGroup::team: pUserBut->setHardText("uiFilterTeam"); break; - case CChatGroup::guild: pUserBut->setHardText("uiFilterGuild"); break; - case CChatGroup::universe: pUserBut->setHardText("uiFilterUniverse"); break; - case CChatGroup::dyn_chat: - uint32 index = PeopleInterraction.TheUserChat.Filter.getTargetDynamicChannelDbIndex(); - uint32 textId = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:DYN_CHAT:CHANNEL"+toString(index)+":NAME")->getValue32(); - ucstring title; - STRING_MANAGER::CStringManagerClient::instance()->getDynString(textId, title); - if (title.empty()) - { - // Dyn channel not available yet, so set to around - PeopleInterraction.TheUserChat.Filter.setTargetGroup(CChatGroup::arround); - pUserBut->setHardText("uiFilterAround"); - } - else - { - pUserBut->setHardText(title.toUtf8()); - } - break; + default: + case CChatGroup::arround: + case CChatGroup::say: pUserBut->setHardText("uiFilterAround"); break; + case CChatGroup::region: pUserBut->setHardText("uiFilterRegion"); break; + case CChatGroup::team: pUserBut->setHardText("uiFilterTeam"); break; + case CChatGroup::guild: pUserBut->setHardText("uiFilterGuild"); break; + case CChatGroup::universe: pUserBut->setHardText("uiFilterUniverse"); break; + case CChatGroup::dyn_chat: + uint32 index = PeopleInterraction.TheUserChat.Filter.getTargetDynamicChannelDbIndex(); + uint32 textId = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:DYN_CHAT:CHANNEL"+toString(index)+":NAME")->getValue32(); + ucstring title; + STRING_MANAGER::CStringManagerClient::instance()->getDynString(textId, title); + if (title.empty()) + { + // Dyn channel not available yet, so set to around + PeopleInterraction.TheUserChat.Filter.setTargetGroup(CChatGroup::arround); + pUserBut->setHardText("uiFilterAround"); + } + else + { + pUserBut->setHardText(title.toUtf8()); + } + break; } pUserBut->setActive(true); @@ -1252,8 +1254,8 @@ void CPeopleInterraction::askRemoveContact(uint peopleIndex, CPeopleList *pl) //================================================================================================================= void CPeopleInterraction::initContactLists( const std::vector &vFriendListName, - const std::vector &vFriendListOnline, - const std::vector &vIgnoreListName ) + const std::vector &vFriendListOnline, + const std::vector &vIgnoreListName ) { // clear the current lists if any @@ -1266,6 +1268,9 @@ void CPeopleInterraction::initContactLists( const std::vector &vFriendLi addContactInList(contactIdPool++, vFriendListName[i], vFriendListOnline[i], 0); for (uint i = 0; i < vIgnoreListName.size(); ++i) addContactInList(contactIdPool++, vIgnoreListName[i], ccs_offline, 1); + FriendList.readContactGroups(); + CPeopleList::TSortOrder order = (CPeopleList::TSortOrder)(NLGUI::CDBManager::getInstance()->getDbProp("UI:SAVE:CONTACT_LIST:SORT_ORDER")->getValue32()); + FriendList.sortEx(order); updateAllFreeTellerHeaders(); } @@ -1278,6 +1283,8 @@ void CPeopleInterraction::addContactInList(uint32 contactId, const ucstring &nam // remove the shard name if possible ucstring name= CEntityCL::removeShardFromName(nameIn); + + // add the contact to this list sint index = pl.getIndexFromName(name); // try to create if not found @@ -1477,7 +1484,7 @@ bool CPeopleInterraction::testValidPartyChatName(const ucstring &title) index = IgnoreList.getIndexFromName(title); if (index != -1) return false; // TODO_GAMEDEV server test for the name (not only local), & modify callers of this function - // The party chat should NOT have the name of a player + // The party chat should NOT have the name of a player // A player name is NOT valid if it is the same that a party chat name return true; } @@ -1547,14 +1554,14 @@ bool CPeopleInterraction::createNewPartyChat(const ucstring &title) { // popup the container /* - newPartyChat->getContainer()->setup(); - newPartyChat->getContainer()->setOpen(true); - newPartyChat->getContainer()->popupCurrentPos(); - newPartyChat->getContainer()->updateCoords(); - newPartyChat->getContainer()->center(); - newPartyChat->getContainer()->setX(newPartyChat->getContainer()->getX() + (sint32) (rand() % PARTY_CHAT_SPAWN_DELTA)); - newPartyChat->getContainer()->setY(newPartyChat->getContainer()->getY() + (sint32) (rand() % PARTY_CHAT_SPAWN_DELTA)); - newPartyChat->getContainer()->enableBlink(2); + newPartyChat->getContainer()->setup(); + newPartyChat->getContainer()->setOpen(true); + newPartyChat->getContainer()->popupCurrentPos(); + newPartyChat->getContainer()->updateCoords(); + newPartyChat->getContainer()->center(); + newPartyChat->getContainer()->setX(newPartyChat->getContainer()->getX() + (sint32) (rand() % PARTY_CHAT_SPAWN_DELTA)); + newPartyChat->getContainer()->setY(newPartyChat->getContainer()->getY() + (sint32) (rand() % PARTY_CHAT_SPAWN_DELTA)); + newPartyChat->getContainer()->enableBlink(2); */ CPartyChatInfo pci; @@ -1742,15 +1749,15 @@ bool CPeopleInterraction::loadUserChatsInfos(NLMISC::IStream &f) f.serialCheck(NELID("TAHC")); if (ver>=1) { -// CChatGroupWindow *pCGW = PeopleInterraction.getChatGroupWindow(); + // CChatGroupWindow *pCGW = PeopleInterraction.getChatGroupWindow(); sint32 index; f.serial(index); /* Yoyo: decide to always start with the default channel (user) activated - because complex (at this time, the buttons are not all active, must wait guild loading, UI:SAVE loading etc...) - Hence this doesn't work for anything but User and Sysinfo (if it is activated....) - NB: must still load the index for file format reason - //if (pCGW) pCGW->setTabIndex(index); - */ + because complex (at this time, the buttons are not all active, must wait guild loading, UI:SAVE loading etc...) + Hence this doesn't work for anything but User and Sysinfo (if it is activated....) + NB: must still load the index for file format reason + //if (pCGW) pCGW->setTabIndex(index); + */ f.serial(present); if (present) { @@ -2012,17 +2019,17 @@ public: if (list == &PeopleInterraction.TeamList) // check for good list { /* - const string msgName = "TEAM:SET_LEADER"; - CBitMemStream out; - if(GenericMsgHeaderMngr.pushNameToStream(msgName, out)) - { - uint8 teamMember = (uint8)(peopleIndex); - out.serial(teamMember); - NetMngr.push(out); - //nlinfo("impulseCallBack : %s %d sent", msgName.c_str(), teamMember); - } - else - nlwarning("command 'set_leader': unknown message named '%s'.", msgName.c_str()); + const string msgName = "TEAM:SET_LEADER"; + CBitMemStream out; + if(GenericMsgHeaderMngr.pushNameToStream(msgName, out)) + { + uint8 teamMember = (uint8)(peopleIndex); + out.serial(teamMember); + NetMngr.push(out); + //nlinfo("impulseCallBack : %s %d sent", msgName.c_str(), teamMember); + } + else + nlwarning("command 'set_leader': unknown message named '%s'.", msgName.c_str()); */ NLMISC::ICommand::execute("a setTeamLeader " + toString(peopleIndex), g_log); } @@ -2177,8 +2184,8 @@ public: void execute (CCtrlBase *pCaller, const std::string &sParams) { /** This msg may have been triggered from valid button or from the edit box itself, so retrieve - * the edit box from the enclosing group - */ + * the edit box from the enclosing group + */ // Get enclosing container to know in which people list we are if (pCaller) { @@ -2221,8 +2228,8 @@ public: CInterfaceManager *pIM = CInterfaceManager::getInstance(); /** This msg may have been triggered from valid button or from the edit box itself, so retrieve - * the edit box from the enclosing group - */ + * the edit box from the enclosing group + */ // Get enclosing container to know in which people list we are if (!LastFatherAddContactId.empty() && pCaller) { @@ -2292,13 +2299,13 @@ public: } switch(listIndex) { - case 0: - destList = &PeopleInterraction.IgnoreList; + case 0: + destList = &PeopleInterraction.IgnoreList; break; - case 1: - destList = &PeopleInterraction.FriendList; + case 1: + destList = &PeopleInterraction.FriendList; break; - default: nlwarning("Bad list index"); return; + default: nlwarning("Bad list index"); return; } PeopleInterraction.askMoveContact(peopleIndex, srcList, destList); @@ -2312,7 +2319,7 @@ uint lastPeopleIndexChangeGroup; class CHandlerChangeContactGroupBegin : public IActionHandler { public: - void execute (CCtrlBase * /* pCaller */, const std::string &sParams) + void execute (CCtrlBase * pCaller, const std::string &sParams) { // retrieve the index of the people CPeopleList *srcList; @@ -2321,18 +2328,18 @@ public: string groupName= getParam(sParams, "group"); CInterfaceGroup *gc = dynamic_cast(CWidgetManager::getInstance()->getElementFromId(groupName)); if (gc) - { - CGroupEditBox *geb = dynamic_cast(gc->getGroup("change_contact_group_eb:eb")); - geb->setInputString(ucstring("")); - } + { + CGroupEditBox *geb = dynamic_cast(gc->getGroup("change_contact_group_eb:eb")); + geb->setInputString(ucstring("")); + } CAHManager::getInstance()->runActionHandler("enter_modal", pCaller, sParams); } } }; -REGISTER_ACTION_HANDLER( CHandlerMoveContact, "change_contact_group_begin"); +REGISTER_ACTION_HANDLER( CHandlerChangeContactGroupBegin, "change_contact_group_begin"); //================================================================================================================= -// Add a contact to the list +// Change the group of a contact in the list class CHandlerChangeContactGroup : public IActionHandler { public: @@ -2343,26 +2350,20 @@ public: if (pCaller) { // Get the modal edit box - CGroupEditBox *geb = dynamic_cast(CWidgetManager::getInstance()->getElementFromId("ui:interface:change_contact_group_eb:eb")); - if (geb && !geb->getInputString().empty()) + CGroupEditBox *geb = dynamic_cast(CWidgetManager::getInstance()->getElementFromId("ui:interface:change_contact_group:change_contact_group_eb:eb")); + if (geb) { - // don't add if it is the player name - if (!ClientCfg.Local && (UserEntity->getEntityName() == geb->getInputString())) - { - displayVisibleSystemMsg(CI18N::get("uiCantAddYourSelfInContactList")); - } - else - { - PeopleInterraction.askAddContact(geb->getInputString(), peopleList); - geb->setInputString(ucstring("")); - } + + PeopleInterraction.FriendList.changeGroup(lastPeopleIndexChangeGroup, geb->getInputString()); geb->setInputString(ucstring("")); + CPeopleList::TSortOrder order = (CPeopleList::TSortOrder)(NLGUI::CDBManager::getInstance()->getDbProp("UI:SAVE:CONTACT_LIST:SORT_ORDER")->getValue32()); + PeopleInterraction.FriendList.sortEx(order); } } CAHManager::getInstance()->runActionHandler("leave_modal", pCaller, ""); } }; -REGISTER_ACTION_HANDLER( CHandlerAddContact, "change_contact_group"); +REGISTER_ACTION_HANDLER( CHandlerChangeContactGroup, "change_contact_group"); //================================================================================================================= class CHandlerSortContacts : public IActionHandler @@ -2428,7 +2429,7 @@ REGISTER_ACTION_HANDLER( CHandlerContactDirectChat, "contact_direct_chat"); //================================================================================================================= /** Menu to create a new party chat - */ + */ class CHandlerNewPartyChat : public IActionHandler { public: @@ -2462,7 +2463,7 @@ REGISTER_ACTION_HANDLER( CHandlerNewPartyChat, "new_party_chat"); //================================================================================================================= /** The name of a party chat has been validated - */ + */ class CHandlerValidatePartyChatName : public IActionHandler { void execute (CCtrlBase * /* pCaller */, const std::string &/* sParams */) @@ -2495,12 +2496,12 @@ REGISTER_ACTION_HANDLER(CHandlerValidatePartyChatName, "validate_party_chat_name //================================================================================================================= /** Menu to create a new party chat - */ + */ //================================================================================================================= /** Menu to remove a currenlty created party chat - */ + */ class CHandlerRemovePartyChat : public IActionHandler { void execute (CCtrlBase * /* pCaller */, const std::string &/* sParams */) @@ -2513,7 +2514,7 @@ REGISTER_ACTION_HANDLER( CHandlerRemovePartyChat, "remove_party_chat"); //================================================================================================================= /** TEMP : just create an 'invite' command in the 'around me' edit box - */ + */ class CHandlerPartyChatInvite : public IActionHandler { void execute (CCtrlBase * /* pCaller */, const std::string &/* sParams */) @@ -2539,12 +2540,12 @@ REGISTER_ACTION_HANDLER( CHandlerPartyChatInvite, "party_chat_invite" ); //================================================================================================================= /** Add all members of the team to the party chat - */ + */ class CHandlerAddAllTeamMembersToPartyChat : public IActionHandler { void execute (CCtrlBase * /* pCaller */, const std::string &/* sParams */) { -// CChatWindow *chat = getChatWndMgr().getChatWindowFromCaller(CWidgetManager::getInstance()->getCtrlLaunchingModal()); + // CChatWindow *chat = getChatWndMgr().getChatWindowFromCaller(CWidgetManager::getInstance()->getCtrlLaunchingModal()); // TODO GAMEDEV : add all team members } }; @@ -2552,12 +2553,12 @@ REGISTER_ACTION_HANDLER( CHandlerAddAllTeamMembersToPartyChat, "add_all_team_mem //================================================================================================================= /** Remove all members of the team to the party chat - */ + */ class CHandlerRemoveAllTeamMembersToPartyChat : public IActionHandler { void execute (CCtrlBase * /* pCaller */, const std::string &/* sParams */) { -// CChatWindow *chat = getChatWndMgr().getChatWindowFromCaller(CWidgetManager::getInstance()->getCtrlLaunchingModal()); + // CChatWindow *chat = getChatWndMgr().getChatWindowFromCaller(CWidgetManager::getInstance()->getCtrlLaunchingModal()); // TODO GAMEDEV : remove all team members } }; @@ -2565,12 +2566,12 @@ REGISTER_ACTION_HANDLER( CHandlerRemoveAllTeamMembersToPartyChat, "remove_all_te //================================================================================================================= /** Add all members of the guild to the party chat - */ + */ class CHandlerAddAllGuildMembersToPartyChat : public IActionHandler { void execute (CCtrlBase * /* pCaller */, const std::string &/* sParams */) { -// CChatWindow *chat = getChatWndMgr().getChatWindowFromCaller(CWidgetManager::getInstance()->getCtrlLaunchingModal()); + // CChatWindow *chat = getChatWndMgr().getChatWindowFromCaller(CWidgetManager::getInstance()->getCtrlLaunchingModal()); // TODO GAMEDEV : add all guild members } }; @@ -2578,12 +2579,12 @@ REGISTER_ACTION_HANDLER( CHandlerAddAllGuildMembersToPartyChat, "add_all_guild_m //================================================================================================================= /** Remove all members of the team to the party chat - */ + */ class CHandlerRemoveAllGuildMembersToPartyChat : public IActionHandler { void execute (CCtrlBase * /* pCaller */, const std::string &/* sParams */) { -// CChatWindow *chat = getChatWndMgr().getChatWindowFromCaller(CWidgetManager::getInstance()->getCtrlLaunchingModal()); + // CChatWindow *chat = getChatWndMgr().getChatWindowFromCaller(CWidgetManager::getInstance()->getCtrlLaunchingModal()); // TODO_GAMEDEV : remove all guild members } }; @@ -2595,8 +2596,8 @@ REGISTER_ACTION_HANDLER( CHandlerRemoveAllGuildMembersToPartyChat, "remove_all_g //================================================================================================================= /** Select the target on a filtered chat window - * This create a menu with the standard window (team, around me ...) + the party chat windows - */ + * This create a menu with the standard window (team, around me ...) + the party chat windows + */ class CHandlerSelectChatTarget : public IActionHandler { public: @@ -2659,7 +2660,7 @@ public: { CInterfaceManager *pIM = CInterfaceManager::getInstance(); cw = PeopleInterraction.TheUserChat.Window; -// CChatStdInput &ci = PeopleInterraction.ChatInput; + // CChatStdInput &ci = PeopleInterraction.ChatInput; CGroupMenu *pMenu = dynamic_cast(CWidgetManager::getInstance()->getElementFromId("ui:interface:user_chat_target_menu")); CViewTextMenu *pMenuAround = dynamic_cast(pMenu->getElement("ui:interface:user_chat_target_menu:around")); CViewTextMenu *pMenuRegion = dynamic_cast(pMenu->getElement("ui:interface:user_chat_target_menu:region")); @@ -2715,7 +2716,7 @@ REGISTER_ACTION_HANDLER( CHandlerSelectChatTarget, "select_chat_target"); //================================================================================================================= /** A target has been selected for a filtered chat - */ + */ class CHandlerChatTargetSelected : public IActionHandler { void execute (CCtrlBase * /* pCaller */, const std::string &sParams) @@ -2804,7 +2805,7 @@ REGISTER_ACTION_HANDLER( CHandlerChatTargetSelected, "chat_target_selected"); //================================================================================================================= /** If no more in team, leave team chat mode - */ + */ class CHandlerLeaveTeamChat : public IActionHandler { void execute (CCtrlBase * /* pCaller */, const std::string &/* sParams */) @@ -2829,7 +2830,7 @@ REGISTER_ACTION_HANDLER( CHandlerLeaveTeamChat, "leave_team_chat"); /** Create checkbox for a menu. - */ + */ static CInterfaceGroup *createMenuCheckBox(const std::string &onclickL, const std::string ¶msL, bool checked) { pair params [2]; @@ -2851,7 +2852,7 @@ static CInterfaceGroup *createMenuCheckBox(const std::string &onclickL, const st //================================================================================================================= /** Display a menu to select the source on a filtered chat - */ + */ class CHandlerSelectChatSource : public IActionHandler { void execute (CCtrlBase *pCaller, const std::string &/* sParams */) @@ -3033,7 +3034,7 @@ REGISTER_ACTION_HANDLER(CHandlerSelectChatSource, "select_chat_source"); //================================================================================================================= /** A new source has been selected / unselected from a filtered chat - */ + */ class CHandlerChatSourceSelected : public IActionHandler { void execute (CCtrlBase * /* pCaller */, const std::string &sParams) @@ -3057,10 +3058,10 @@ class CHandlerChatSourceSelected : public IActionHandler /*CCtrlBaseButton *button = dynamic_cast(pCaller); - if (button) - { - button->setPushed(!button->getPushed()); - }*/ + if (button) + { + button->setPushed(!button->getPushed()); + }*/ // GUILD if (nlstricmp(sParams, "guild") == 0) { @@ -3068,71 +3069,71 @@ class CHandlerChatSourceSelected : public IActionHandler else ci.Guild.addListeningWindow(cw); } else - // TEAM - if (nlstricmp(sParams, "team") == 0) - { - if (ci.Team.isListeningWindow(cw)) ci.Team.removeListeningWindow(cw); - else ci.Team.addListeningWindow(cw); - } - else - // AROUND ME - if (nlstricmp(sParams, "am") == 0) - { - if (ci.AroundMe.isListeningWindow(cw)) ci.AroundMe.removeListeningWindow(cw); - else ci.AroundMe.addListeningWindow(cw); - } - else - // REGION - if (nlstricmp(sParams, "region") == 0) - { - if (ci.Region.isListeningWindow(cw)) ci.Region.removeListeningWindow(cw); - else ci.Region.addListeningWindow(cw); - } - else - // UNIVERSE - if (nlstricmp(sParams, "universe") == 0) - { - if (ci.Universe.isListeningWindow(cw)) ci.Universe.removeListeningWindow(cw); - else ci.Universe.addListeningWindow(cw); - } - else - // TELL - if (nlstricmp(sParams, "tell") == 0) - { - if (ci.Tell.isListeningWindow(cw)) ci.Tell.removeListeningWindow(cw); - else ci.Tell.addListeningWindow(cw); - } - else - // SYSTEM INFOS - if (nlstricmp(sParams, "si") == 0) - { - if (ci.SystemInfo.isListeningWindow(cw)) ci.SystemInfo.removeListeningWindow(cw); - else ci.SystemInfo.addListeningWindow(cw); - } - else - // PARTY CHAT - if (fromString(sParams, partyChatID)) - { - std::vector &partyChats = PeopleInterraction.PartyChats; - for(uint k = 0; k < partyChats.size(); ++k) + // TEAM + if (nlstricmp(sParams, "team") == 0) { - if (partyChats[k].ID == (uint) partyChatID) + if (ci.Team.isListeningWindow(cw)) ci.Team.removeListeningWindow(cw); + else ci.Team.addListeningWindow(cw); + } + else + // AROUND ME + if (nlstricmp(sParams, "am") == 0) { - if (partyChats[k].Filter != NULL) + if (ci.AroundMe.isListeningWindow(cw)) ci.AroundMe.removeListeningWindow(cw); + else ci.AroundMe.addListeningWindow(cw); + } + else + // REGION + if (nlstricmp(sParams, "region") == 0) { - if (partyChats[k].Filter->isListeningWindow(cw)) partyChats[k].Filter->removeListeningWindow(partyChats[k].Window); - else partyChats[k].Filter->addListeningWindow(cw); + if (ci.Region.isListeningWindow(cw)) ci.Region.removeListeningWindow(cw); + else ci.Region.addListeningWindow(cw); } - } - } - } - else if (nlstricmp(sParams.substr(0, 3), "dyn") == 0) - { - uint8 i = 0; - fromString(sParams.substr(3), i); - if (ci.DynamicChat[i].isListeningWindow(cw)) ci.DynamicChat[i].removeListeningWindow(cw); - else ci.DynamicChat[i].addListeningWindow(cw); - } + else + // UNIVERSE + if (nlstricmp(sParams, "universe") == 0) + { + if (ci.Universe.isListeningWindow(cw)) ci.Universe.removeListeningWindow(cw); + else ci.Universe.addListeningWindow(cw); + } + else + // TELL + if (nlstricmp(sParams, "tell") == 0) + { + if (ci.Tell.isListeningWindow(cw)) ci.Tell.removeListeningWindow(cw); + else ci.Tell.addListeningWindow(cw); + } + else + // SYSTEM INFOS + if (nlstricmp(sParams, "si") == 0) + { + if (ci.SystemInfo.isListeningWindow(cw)) ci.SystemInfo.removeListeningWindow(cw); + else ci.SystemInfo.addListeningWindow(cw); + } + else + // PARTY CHAT + if (fromString(sParams, partyChatID)) + { + std::vector &partyChats = PeopleInterraction.PartyChats; + for(uint k = 0; k < partyChats.size(); ++k) + { + if (partyChats[k].ID == (uint) partyChatID) + { + if (partyChats[k].Filter != NULL) + { + if (partyChats[k].Filter->isListeningWindow(cw)) partyChats[k].Filter->removeListeningWindow(partyChats[k].Window); + else partyChats[k].Filter->addListeningWindow(cw); + } + } + } + } + else if (nlstricmp(sParams.substr(0, 3), "dyn") == 0) + { + uint8 i = 0; + fromString(sParams.substr(3), i); + if (ci.DynamicChat[i].isListeningWindow(cw)) ci.DynamicChat[i].removeListeningWindow(cw); + else ci.DynamicChat[i].addListeningWindow(cw); + } } }; REGISTER_ACTION_HANDLER( CHandlerChatSourceSelected, "chat_source_selected"); @@ -3242,80 +3243,80 @@ NLMISC_COMMAND(ignore, "add or remove a player from the ignore list", "") { - if (args.size() != 1) - { - displayVisibleSystemMsg(CI18N::get("uiPartyChatCmd")); - return true; - } - CPeopleInterraction &pi = PeopleInterraction; - ucstring title = args[0]; +if (args.size() != 1) +{ +displayVisibleSystemMsg(CI18N::get("uiPartyChatCmd")); +return true; +} +CPeopleInterraction &pi = PeopleInterraction; +ucstring title = args[0]; - if (!pi.testValidPartyChatName(title)) - { - displayVisibleSystemMsg(CI18N::get("uiInvalidPartyChatName")); - return true; - } +if (!pi.testValidPartyChatName(title)) +{ +displayVisibleSystemMsg(CI18N::get("uiInvalidPartyChatName")); +return true; +} - PeopleInterraction.createNewPartyChat(title); - return true; +PeopleInterraction.createNewPartyChat(title); +return true; } // Remove the party chat with the given name NLMISC_COMMAND(remove_party_chat, "Remove a party chat", "") { - if (args.size() != 1) - { - displayVisibleSystemMsg(CI18N::get("uiRemovePartyChatCmd")); - return true; - } - ucstring title = ucstring(args[0]); - CChatWindow *chat = getChatWndMgr().getChatWindow(title); - if (!chat) - { - displayVisibleSystemMsg(title + ucstring(" : ") + CI18N::get("uiBadPartyChatName")); - return true; - } - if (!PeopleInterraction.removePartyChat(chat)) - { - displayVisibleSystemMsg(title + ucstring(" : ") + CI18N::get("uiCantRemovePartyChat")); - return true; - } - return true; +if (args.size() != 1) +{ +displayVisibleSystemMsg(CI18N::get("uiRemovePartyChatCmd")); +return true; +} +ucstring title = ucstring(args[0]); +CChatWindow *chat = getChatWndMgr().getChatWindow(title); +if (!chat) +{ +displayVisibleSystemMsg(title + ucstring(" : ") + CI18N::get("uiBadPartyChatName")); +return true; +} +if (!PeopleInterraction.removePartyChat(chat)) +{ +displayVisibleSystemMsg(title + ucstring(" : ") + CI18N::get("uiCantRemovePartyChat")); +return true; +} +return true; } // Join a party chat whose name is known NLMISC_COMMAND(add_to_party_chat, "Join the given party chat", "") { - if (args.size() != 1) - { - displayVisibleSystemMsg(CI18N::get("uiAddPartyChatCmd")); - return true; - } - // TODO GAMEDEV : join the party chat - return true; +if (args.size() != 1) +{ +displayVisibleSystemMsg(CI18N::get("uiAddPartyChatCmd")); +return true; +} +// TODO GAMEDEV : join the party chat +return true; } // Invite someone in a party chat NLMISC_COMMAND(invite, "Invite someone to a party chat", " ") { - if (args.size() != 2) - { - displayVisibleSystemMsg(CI18N::get("uiInviteCmd")); - return true; - } - // TODO GAMEDEV : Send invite message to the server - // Check that the inviter has created the chat ? - // The people being invited should receive a popup to announce that he is being invited - return true; +if (args.size() != 2) +{ +displayVisibleSystemMsg(CI18N::get("uiInviteCmd")); +return true; +} +// TODO GAMEDEV : Send invite message to the server +// Check that the inviter has created the chat ? +// The people being invited should receive a popup to announce that he is being invited +return true; } */ diff --git a/code/ryzom/client/src/interface_v3/people_list.cpp b/code/ryzom/client/src/interface_v3/people_list.cpp index 92601ed32..ece5b5cc8 100644 --- a/code/ryzom/client/src/interface_v3/people_list.cpp +++ b/code/ryzom/client/src/interface_v3/people_list.cpp @@ -31,6 +31,7 @@ #include "chat_text_manager.h" #include "people_interraction.h" #include "../user_entity.h" +#include "nel/misc/o_xml.h" using namespace std; using namespace NLMISC; @@ -49,9 +50,9 @@ extern CClientChatManager ChatMngr; //================================================================== CPeopleList::CPeopleList() : _ChatWindow(NULL), - _ContactType(CPeopleListDesc::Unknown), - _CurrPeopleID(0), - _Savable(false) + _ContactType(CPeopleListDesc::Unknown), + _CurrPeopleID(0), + _Savable(false) { // Construct @@ -191,34 +192,41 @@ sint CPeopleList::getIndexFromContainerID(const std::string &id) const //================================================================== bool CPeopleList::sortExByContactId(const CPeople& a, const CPeople& b) { - return (a.ContactId < b.ContactId); + if (a.Group == b.Group) + return (a.ContactId < b.ContactId); + else + return (a.Group < b.Group); } //================================================================== bool CPeopleList::sortExByName(const CPeople& a, const CPeople& b) { - ucstring name_a = toUpper(a.getName()); - ucstring name_b = toUpper(b.getName()); - - return (name_a < name_b); + if (a.Group == b.Group) { + ucstring name_a = toUpper(a.getName()); + ucstring name_b = toUpper(b.getName()); + return (name_a < name_b); + } + else + return (a.Group < b.Group); } //================================================================== bool CPeopleList::sortExByOnline(const CPeople& a, const CPeople& b) { - ucstring name_a = toUpper(a.getName()); - ucstring name_b = toUpper(b.getName()); + if (a.Group == b.Group) { + ucstring name_a = toUpper(a.getName()); + ucstring name_b = toUpper(b.getName()); - // We want order: online/alpha, offworld/alpha, offline/alpha - if (a.Online == b.Online) - { - return (name_a < name_b); - } - else - { - // Compare online status - switch (a.Online) + // We want order: online/alpha, offworld/alpha, offline/alpha + if (a.Online == b.Online) + { + return (name_a < name_b); + } + else { + // Compare online status + switch (a.Online) + { case ccs_online: // a is > if a is online return true; @@ -232,11 +240,11 @@ bool CPeopleList::sortExByOnline(const CPeople& a, const CPeople& b) // b is always > if a is offline return false; break; + } } } - - // Should not get here so just return something - return true; + else + return (a.Group < b.Group); } //================================================================== @@ -245,29 +253,56 @@ void CPeopleList::sortEx(TSortOrder order) // remove all people from the father container if (!_BaseContainer) return; uint k; + for(k = 0; k < _Peoples.size(); ++k) { - _BaseContainer->detachContainer(_Peoples[k].Container); + CGroupContainer *parentContainer = _Peoples[k].Container->getProprietaryContainer(); + parentContainer->detachContainer(_Peoples[k].Container); + } + for (k = 0; k < _GroupContainers.size(); ++k) + { + if (_GroupContainers[k].second->getProprietaryContainer() != NULL) + _BaseContainer->detachContainer(_GroupContainers[k].second); } switch (order) { - default: - case sort_index: - std::sort(_Peoples.begin(), _Peoples.end(), CPeopleList::sortExByContactId); - break; - case sort_name: - std::sort(_Peoples.begin(), _Peoples.end(), CPeopleList::sortExByName); - break; + default: + case sort_index: + std::sort(_Peoples.begin(), _Peoples.end(), CPeopleList::sortExByContactId); + break; + case sort_name: + std::sort(_Peoples.begin(), _Peoples.end(), CPeopleList::sortExByName); + break; - case sort_online: - std::sort(_Peoples.begin(), _Peoples.end(), CPeopleList::sortExByOnline); - break; + case sort_online: + std::sort(_Peoples.begin(), _Peoples.end(), CPeopleList::sortExByOnline); + break; } + CGroupContainer *group = _BaseContainer; + ucstring groupName = ""; + uint groupIndex = 0; + for(k = 0; k < _Peoples.size(); ++k) { - _BaseContainer->attachContainer(_Peoples[k].Container); + bool newGroup = false; + if (k == 0) + { + newGroup = true; + } + while (groupIndex < _GroupContainers.size() && _GroupContainers[groupIndex].first != _Peoples[k].Group.toString()) + { + newGroup = true; + ++groupIndex; + } + if (newGroup && groupIndex < _GroupContainers.size()) + { + group = _GroupContainers[groupIndex].second; + groupName = _GroupContainers[groupIndex].first; + _BaseContainer->attachContainer(group); + } + group->attachContainer(_Peoples[k].Container); } } @@ -299,34 +334,34 @@ bool CPeopleList::isPeopleChatVisible(uint index) const return (_Peoples[index].Chat != NULL); } /* -bool CPeopleList::isPeopleWindowVisible(uint index) const -{ - if (index >= _Peoples.size()) - { - nlwarning("Bad index"); - return false; - } - if (!_Peoples[index].Container) return false; - if (_Peoples[index].Container->isOpen()) - { - CInterfaceGroup *ig = _Peoples[index].Container; - do - { - if (ig->isGroupContainer()) - { - if (!static_cast(ig)->isOpen()) break; - } - if (!ig->getActive()) break; - ig = ig->getParent(); - } - while(ig); - return ig == NULL; // all parent windows must be open & visible - } - else - { - return false; - } -} + bool CPeopleList::isPeopleWindowVisible(uint index) const + { + if (index >= _Peoples.size()) + { + nlwarning("Bad index"); + return false; + } + if (!_Peoples[index].Container) return false; + if (_Peoples[index].Container->isOpen()) + { + CInterfaceGroup *ig = _Peoples[index].Container; + do + { + if (ig->isGroupContainer()) + { + if (!static_cast(ig)->isOpen()) break; + } + if (!ig->getActive()) break; + ig = ig->getParent(); + } + while(ig); + return ig == NULL; // all parent windows must be open & visible + } + else + { + return false; + } + } */ //================================================================== @@ -354,12 +389,12 @@ sint CPeopleList::addPeople(const ucstring &name, uint teamMateIndex /*= 0*/) std::string templateName; switch (_ContactType) { - case CPeopleListDesc::Team: templateName = "mate_id"; break; - case CPeopleListDesc::Contact: templateName = "contact_id_friend"; break; - case CPeopleListDesc::Ignore: templateName = "contact_id_ignore"; break; - default: - nlwarning(" Unknown contact type"); - return -1; + case CPeopleListDesc::Team: templateName = "mate_id"; break; + case CPeopleListDesc::Contact: templateName = "contact_id_friend"; break; + case CPeopleListDesc::Ignore: templateName = "contact_id_ignore"; break; + default: + nlwarning(" Unknown contact type"); + return -1; break; } @@ -379,10 +414,10 @@ sint CPeopleList::addPeople(const ucstring &name, uint teamMateIndex /*= 0*/) gc->setSavable(false); // /*if (_ChatWindow) - { - _ChatWindow->getContainer()->attachContainer(gc); - } - else*/ + { + _ChatWindow->getContainer()->attachContainer(gc); + } + else*/ { _BaseContainer->attachContainer(gc); } @@ -415,8 +450,9 @@ void CPeopleList::removePeople(uint index) } else { - if (_BaseContainer) - _BaseContainer->detachContainer(_Peoples[index].Container); + CGroupContainer *parentContainer = _Peoples[index].Container->getProprietaryContainer(); + if (parentContainer) + parentContainer->detachContainer(_Peoples[index].Container); } CInterfaceManager *im = CInterfaceManager::getInstance(); CInterfaceGroup *pRoot = dynamic_cast(CWidgetManager::getInstance()->getElementFromId("ui:interface")); @@ -447,6 +483,150 @@ void CPeopleList::setContactId(uint index, uint32 contactId) _Peoples[index].ContactId = contactId; } +//================================================================== +void CPeopleList::changeGroup(uint index, const ucstring &groupName) +{ + if (index >= _Peoples.size()) + { + nlwarning(" bad index."); + return; + } + ucstring group = groupName; + if (group.toString() == "General") + group = ucstring(""); + _Peoples[index].Group = group; + + for (uint k = 0; k < _GroupContainers.size(); ++k) + { + if (_GroupContainers[k].first == group.toString()) + return; + } + + vector > properties; + properties.push_back(make_pair(string("posparent"), string("parent"))); + properties.push_back(make_pair(string("id"), _ContainerID + "_group_" + toString(_GroupContainers.size()))); + if (group.toString() == "") + properties.push_back(make_pair(string("title"), "General")); + else + properties.push_back(make_pair(string("title"), group.toString())); + CGroupContainer *gc = dynamic_cast(CWidgetManager::getInstance()->getParser()->createGroupInstance("people_list_group_header", "ui:interface", properties, false)); + + if (group.toString() == "") + gc->setUCTitle(ucstring("General")); + else + gc->setUCTitle(group.toString()); + gc->setSavable(false); + + CInterfaceGroup *pRoot = dynamic_cast(CWidgetManager::getInstance()->getElementFromId("ui:interface")); + pRoot->addGroup (gc); + _BaseContainer->attachContainer(gc); + + _GroupContainers.push_back(make_pair(group.toString(), gc)); + + std::sort(_GroupContainers.begin(), _GroupContainers.end()); +} + +//================================================================== +void CPeopleList::readContactGroups() +{ + _GroupContainers.clear(); + const std::string filename = CInterfaceManager::getInstance()->getSaveFileName("contactgroups", "xml"); + try + { + CIFile fd; + if (fd.open(CPath::lookup(filename))) + { + CIXml stream; + stream.init(fd); + + xmlKeepBlanksDefault(0); + xmlNodePtr root = stream.getRootNode(); + + if (!root) return; + + xmlNodePtr node = root->children; + uint nb = 0; + while (node) + { + CXMLAutoPtr propName = xmlGetProp(node, (xmlChar*)"name"); + CXMLAutoPtr propGroup = xmlGetProp(node, (xmlChar*)"group"); + if (propName && propGroup) + { + sint index = getIndexFromName(propName.str()); + if (index < _Peoples.size()) + { + _Peoples[index].Group = propGroup.str(); + if (_GroupContainers.empty() || _GroupContainers.back().first != propName.str()) { + vector > properties; + properties.push_back(make_pair(string("posparent"), string("parent"))); + properties.push_back(make_pair(string("id"), _ContainerID + "_group_" + toString(_GroupContainers.size()))); + if (propGroup.str() == "") + properties.push_back(make_pair(string("title"), "General")); + else + properties.push_back(make_pair(string("title"), propGroup.str())); + CInterfaceGroup *group = CWidgetManager::getInstance()->getParser()->createGroupInstance("people_list_group_header", "ui:interface", properties, false); + CGroupContainer *gc = dynamic_cast(group); + if (propGroup.str() == "") + gc->setUCTitle(ucstring("General")); + else + gc->setUCTitle(propGroup.str()); + gc->setSavable(false); + + CInterfaceGroup *pRoot = dynamic_cast(CWidgetManager::getInstance()->getElementFromId("ui:interface")); + pRoot->addGroup (gc); + _BaseContainer->attachContainer(gc); + + _GroupContainers.push_back(make_pair(propGroup.str(), gc)); + } + } + } + node = node->next; + nb++; + } + fd.close(); + } + std::sort(_GroupContainers.begin(), _GroupContainers.end()); + } + catch (const Exception &e) + { + nlwarning("Error while parsing xml file %s : %s", filename.c_str(), e.what()); + } +} + +//================================================================== +void CPeopleList::saveContactGroups() +{ + const std::string filename = CInterfaceManager::getInstance()->getSaveFileName("contactgroups", "xml"); + try + { + COFile fd; + if (fd.open(filename, false, false, true)) + { + COXml stream; + stream.init(&fd); + + xmlDocPtr doc = stream.getDocument(); + xmlNodePtr node = xmlNewDocNode(doc, NULL, (const xmlChar*)"contact_groups", NULL); + xmlDocSetRootElement(doc, node); + + for (uint k = 0; k < _Peoples.size(); ++k) + { + xmlNodePtr newNode = xmlNewChild(node, NULL, (const xmlChar*)"contact", NULL); + + xmlSetProp(newNode, (const xmlChar*)"name", (const xmlChar*)_Peoples[k].getName().toString().c_str()); + xmlSetProp(newNode, (const xmlChar*)"group", (const xmlChar*)_Peoples[k].Group.toString().c_str()); + } + stream.flush(); + fd.close(); + } + nlinfo("save %s", filename.c_str()); + } + catch (const Exception &e) + { + nlwarning("Error while writing the file %s : %s", filename.c_str(), e.what()); + } +} + //================================================================== void CPeopleList::displayLocalPlayerTell(const ucstring &receiver, uint index, const ucstring &msg,uint numBlinks /*=0*/) { @@ -617,12 +797,12 @@ void CPeopleList::setPeopleMenu(const std::string &menuName) } void CPeopleList::setPeopleMenuEx(const std::string &offlineUnblockedMenuName, - const std::string &onlineUnblockedMenuName, - const std::string &onlineAbroadUnblockedMenuName, - const std::string &offlineBockedMenuName, - const std::string &onlineBlockedMenuName, - const std::string &onlineAbroadBlockedMenuName - ) + const std::string &onlineUnblockedMenuName, + const std::string &onlineAbroadUnblockedMenuName, + const std::string &offlineBockedMenuName, + const std::string &onlineBlockedMenuName, + const std::string &onlineAbroadBlockedMenuName + ) { _PeopleMenuOfflineUnblocked = offlineUnblockedMenuName; _PeopleMenuOnlineUnblocked = onlineUnblockedMenuName; diff --git a/code/ryzom/client/src/interface_v3/people_list.h b/code/ryzom/client/src/interface_v3/people_list.h index 6845ce73a..682b1a6e5 100644 --- a/code/ryzom/client/src/interface_v3/people_list.h +++ b/code/ryzom/client/src/interface_v3/people_list.h @@ -110,6 +110,11 @@ public: void setContactId(uint index, uint32 contactId); sint getIndexFromContactId(uint32 contactId); + // For Friend Groups management + void changeGroup(uint index, const ucstring &groupName); + void readContactGroups(); + void saveContactGroups(); + /** Display a message for the given people * If the window is closed, it causes it to blink (and also the parent window) */ @@ -165,6 +170,7 @@ private: typedef std::vector TPeopleVect; private: CGroupContainerPtr _BaseContainer; + std::vector > > _GroupContainers; NLMISC::CRefPtr _ChatWindow; TPeopleVect _Peoples; CPeopleListDesc::TContactType _ContactType; From f96f0b41b9de2afcc335478d04463a51e23d4190 Mon Sep 17 00:00:00 2001 From: Sit Melai Date: Tue, 1 Sep 2020 18:41:45 +0200 Subject: [PATCH 219/236] Removed an unused variable and don't show groups anymore when there is only one --- code/ryzom/client/src/interface_v3/people_list.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/code/ryzom/client/src/interface_v3/people_list.cpp b/code/ryzom/client/src/interface_v3/people_list.cpp index ece5b5cc8..33d1c900e 100644 --- a/code/ryzom/client/src/interface_v3/people_list.cpp +++ b/code/ryzom/client/src/interface_v3/people_list.cpp @@ -281,9 +281,8 @@ void CPeopleList::sortEx(TSortOrder order) } CGroupContainer *group = _BaseContainer; - ucstring groupName = ""; uint groupIndex = 0; - + for(k = 0; k < _Peoples.size(); ++k) { bool newGroup = false; @@ -296,10 +295,9 @@ void CPeopleList::sortEx(TSortOrder order) newGroup = true; ++groupIndex; } - if (newGroup && groupIndex < _GroupContainers.size()) + if (newGroup && groupIndex < _GroupContainers.size() && _GroupContainers.size() > 1) { group = _GroupContainers[groupIndex].second; - groupName = _GroupContainers[groupIndex].first; _BaseContainer->attachContainer(group); } group->attachContainer(_Peoples[k].Container); @@ -556,7 +554,7 @@ void CPeopleList::readContactGroups() if (index < _Peoples.size()) { _Peoples[index].Group = propGroup.str(); - if (_GroupContainers.empty() || _GroupContainers.back().first != propName.str()) { + if (_GroupContainers.empty() || _GroupContainers.back().first != propGroup.str()) { vector > properties; properties.push_back(make_pair(string("posparent"), string("parent"))); properties.push_back(make_pair(string("id"), _ContainerID + "_group_" + toString(_GroupContainers.size()))); From 02732c124141d54a100a000ddb31772a2a93019e Mon Sep 17 00:00:00 2001 From: Sit Melai Date: Thu, 3 Sep 2020 13:14:50 +0200 Subject: [PATCH 220/236] Changes to fix compilation on some setups --- code/ryzom/client/src/interface_v3/people_list.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/code/ryzom/client/src/interface_v3/people_list.cpp b/code/ryzom/client/src/interface_v3/people_list.cpp index 33d1c900e..47806bf5f 100644 --- a/code/ryzom/client/src/interface_v3/people_list.cpp +++ b/code/ryzom/client/src/interface_v3/people_list.cpp @@ -546,8 +546,10 @@ void CPeopleList::readContactGroups() uint nb = 0; while (node) { - CXMLAutoPtr propName = xmlGetProp(node, (xmlChar*)"name"); - CXMLAutoPtr propGroup = xmlGetProp(node, (xmlChar*)"group"); + CXMLAutoPtr propName; + propName = (char*) xmlGetProp(node, (xmlChar*)"name"); + CXMLAutoPtr propGroup; + propGroup = (char*) xmlGetProp(node, (xmlChar*)"group"); if (propName && propGroup) { sint index = getIndexFromName(propName.str()); From 47bf9ecbc8e2eeb8cc4ce5787cfa3ec8c103f044 Mon Sep 17 00:00:00 2001 From: Sit Melai Date: Thu, 3 Sep 2020 21:12:10 +0200 Subject: [PATCH 221/236] Always create General group, so at first launch groups show directly when changed --- .../client/src/interface_v3/people_list.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/code/ryzom/client/src/interface_v3/people_list.cpp b/code/ryzom/client/src/interface_v3/people_list.cpp index 47806bf5f..c3f2cf4d7 100644 --- a/code/ryzom/client/src/interface_v3/people_list.cpp +++ b/code/ryzom/client/src/interface_v3/people_list.cpp @@ -528,6 +528,23 @@ void CPeopleList::changeGroup(uint index, const ucstring &groupName) void CPeopleList::readContactGroups() { _GroupContainers.clear(); + + // Create default group even if no groups defined + vector > properties; + properties.push_back(make_pair(string("posparent"), string("parent"))); + properties.push_back(make_pair(string("id"), _ContainerID + "_group_0")); + properties.push_back(make_pair(string("title"), "General")); + CInterfaceGroup *group = CWidgetManager::getInstance()->getParser()->createGroupInstance("people_list_group_header", "ui:interface", properties, false); + CGroupContainer *gc = dynamic_cast(group); + gc->setUCTitle(ucstring("General")); + gc->setSavable(false); + + CInterfaceGroup *pRoot = dynamic_cast(CWidgetManager::getInstance()->getElementFromId("ui:interface")); + pRoot->addGroup (gc); + _BaseContainer->attachContainer(gc); + + _GroupContainers.push_back(make_pair("", gc)); + const std::string filename = CInterfaceManager::getInstance()->getSaveFileName("contactgroups", "xml"); try { From 6b59fc0081699901a75f194b61ee0413fab614bb Mon Sep 17 00:00:00 2001 From: Nimetu Date: Sat, 15 Aug 2020 01:21:16 +0300 Subject: [PATCH 222/236] Fixed: ctrl+3 detected as KeyESCAPE when using keychar event --- code/nel/src/gui/widget_manager.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/nel/src/gui/widget_manager.cpp b/code/nel/src/gui/widget_manager.cpp index 864e4ef5b..a1da03b2e 100644 --- a/code/nel/src/gui/widget_manager.cpp +++ b/code/nel/src/gui/widget_manager.cpp @@ -2296,7 +2296,7 @@ namespace NLGUI // Hide menu if the key is pushed // if ((eventDesc.getKeyEventType() == CEventDescriptorKey::keydown) && !_ModalStack.empty() && !eventDesc.getKeyAlt() && !eventDesc.getKeyCtrl() && !eventDesc.getKeyShift()) // Hide menu (or popup menu) is ESCAPE pressed - if( eventDesc.getKeyEventType() == CEventDescriptorKey::keychar && eventDesc.getChar() == NLMISC::KeyESCAPE ) + if( eventDesc.getKeyEventType() == CEventDescriptorKey::keydown && eventDesc.getKey() == NLMISC::KeyESCAPE ) { if( hasModal() ) { @@ -2307,7 +2307,7 @@ namespace NLGUI } // Manage "quit window" If the Key is ESCAPE, no captureKeyboard - if( eventDesc.getKeyEventType() == CEventDescriptorKey::keychar && eventDesc.getChar() == NLMISC::KeyESCAPE ) + if( eventDesc.getKeyEventType() == CEventDescriptorKey::keydown && eventDesc.getKey() == NLMISC::KeyESCAPE ) { // Get the last escapable active top window. NB: this is ergonomically better. CInterfaceGroup *win= getLastEscapableTopWindow(); From 9532fc3a81ba2bc8f499af3cbcaf8d5e85a98d0b Mon Sep 17 00:00:00 2001 From: Nimetu Date: Thu, 10 Sep 2020 20:16:28 +0300 Subject: [PATCH 223/236] Fixed: mouse free look when using inverted mouse --- code/ryzom/client/src/events_listener.cpp | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/code/ryzom/client/src/events_listener.cpp b/code/ryzom/client/src/events_listener.cpp index 879bd5a2a..cfa9d2b3c 100644 --- a/code/ryzom/client/src/events_listener.cpp +++ b/code/ryzom/client/src/events_listener.cpp @@ -172,16 +172,12 @@ void CEventsListener::operator()(const CEvent& event) // Get in pixel space, centered uint32 drW, drH; Driver->getWindowSize(drW, drH); - float fX = mouseEvent->X; // from 0 to 1.0 - float fY = (ClientCfg.FreeLookInverted ? -mouseEvent->Y : mouseEvent->Y); - sint scX = (sint32)(fX * (float)drW) - ((sint32)drW >> 1); // in pixels, centered - sint scY = (sint32)(fY * (float)drH) - ((sint32)drH >> 1); + sint scX = (sint32)(mouseEvent->X * (float)drW) - ((sint32)drW >> 1); // in pixels, centered + sint scY = (sint32)(mouseEvent->Y * (float)drH) - ((sint32)drH >> 1); if (!s_MouseFreeLookReady) { - float pfX = _MouseX; - float pfY = (ClientCfg.FreeLookInverted ? -_MouseY : _MouseY); - sint pscX = (sint32)(pfX * (float)drW) - ((sint32)drW >> 1); // in pixels, centered - sint pscY = (sint32)(pfY * (float)drH) - ((sint32)drH >> 1); + sint pscX = (sint32)(_MouseX * (float)drW) - ((sint32)drW >> 1); // in pixels, centered + sint pscY = (sint32)(_MouseY * (float)drH) - ((sint32)drH >> 1); s_MouseFreeLookReady = true; s_MouseFreeLookLastX = pscX; s_MouseFreeLookLastY = pscY; @@ -199,13 +195,12 @@ void CEventsListener::operator()(const CEvent& event) } // Get delta since last center - sint scXd = scX - s_MouseFreeLookLastX; - sint scYd = scY - s_MouseFreeLookLastY; + s_MouseFreeLookFrameX += (scX - s_MouseFreeLookLastX); + s_MouseFreeLookFrameY += (scY - s_MouseFreeLookLastY) * (ClientCfg.FreeLookInverted ? -1 : 1); + s_MouseFreeLookLastX = scX; s_MouseFreeLookLastY = scY; - s_MouseFreeLookFrameX += scXd; - s_MouseFreeLookFrameY += scYd; // updateFreeLookPos is called in updateMouseSmoothing per frame // Center cursor From b7cbeeb2ae43b85e1d0bae450b03fe19e0b857e9 Mon Sep 17 00:00:00 2001 From: Sit Melai Date: Sun, 13 Sep 2020 02:00:41 +0200 Subject: [PATCH 224/236] Fixed grayed icons on second bar not draggable --- code/ryzom/client/src/interface_v3/dbctrl_sheet.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/ryzom/client/src/interface_v3/dbctrl_sheet.cpp b/code/ryzom/client/src/interface_v3/dbctrl_sheet.cpp index 56727f6d4..7b188742c 100644 --- a/code/ryzom/client/src/interface_v3/dbctrl_sheet.cpp +++ b/code/ryzom/client/src/interface_v3/dbctrl_sheet.cpp @@ -2875,7 +2875,7 @@ bool CDBCtrlSheet::handleEvent (const NLGUI::CEventDescriptor &event) } else { - validClic = isDraggable() && !isDragged() && ((!getItemWeared()&&!getGrayed()) || isShortCut()); + validClic = isDraggable() && !isDragged() && ((!getItemWeared()&&!getGrayed()) || isSPhraseId()); } } if (_Type == SheetType_Macro) From 6ccd8853db5e83b324664d1aec721c7e3a2a74d3 Mon Sep 17 00:00:00 2001 From: Nimetu Date: Sat, 19 Sep 2020 21:54:15 +0300 Subject: [PATCH 225/236] Fixed: setActive() did not invalidate table cell size. --- code/nel/src/gui/interface_element.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/code/nel/src/gui/interface_element.cpp b/code/nel/src/gui/interface_element.cpp index cf5646077..4a736314d 100644 --- a/code/nel/src/gui/interface_element.cpp +++ b/code/nel/src/gui/interface_element.cpp @@ -1168,6 +1168,8 @@ namespace NLGUI { _Active = state; invalidateCoords(); + // force invalidate CViewText/CGroupTable inner elements + invalidateContent(); } } From ae91cc4179f9c988cdc939e1bbe7d796c56bc873 Mon Sep 17 00:00:00 2001 From: Nimetu Date: Sat, 17 Oct 2020 12:35:10 +0300 Subject: [PATCH 226/236] Fixed: Ingame map search and search result tooltips for UTF8 strings --- code/ryzom/client/src/interface_v3/group_map.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/code/ryzom/client/src/interface_v3/group_map.cpp b/code/ryzom/client/src/interface_v3/group_map.cpp index dd5e5ae20..a7f326220 100644 --- a/code/ryzom/client/src/interface_v3/group_map.cpp +++ b/code/ryzom/client/src/interface_v3/group_map.cpp @@ -2472,7 +2472,8 @@ void CGroupMap::updateMatchedLandmarks() std::vector > params; params.clear(); params.push_back(std::pair("id", toString("lm%d", k))); - params.push_back(std::pair("tooltip", _MatchedLandmarks[k].Title.toUtf8())); + // ctrl base expects utf8 string to start with "u:" + params.push_back(std::pair("tooltip", "u:" + _MatchedLandmarks[k].Title.toUtf8())); params.push_back(std::pair("index", toString(k))); CInterfaceGroup *g = CWidgetManager::getInstance()->getParser()->createGroupInstance("lm_search_result", pL->getId(), params); @@ -2680,7 +2681,7 @@ void CGroupMap::setLandmarkFilter(const std::string &s) if (!s.empty()) { ucstring ucs; ucs.fromUtf8(s); - splitUCString(toLower(s), ucstring(" "), _LandmarkFilter); + splitUCString(toLower(ucs), ucstring(" "), _LandmarkFilter); } // recreate landmarks From 9f3250f4db11e875ea1210599da5cda8c082ce9d Mon Sep 17 00:00:00 2001 From: Nimetu Date: Tue, 10 Nov 2020 17:46:06 +0200 Subject: [PATCH 227/236] Fixed: patching single file with multiple version in a row. --- code/ryzom/client/src/login_patch.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/code/ryzom/client/src/login_patch.cpp b/code/ryzom/client/src/login_patch.cpp index 0a6b912dd..d087a847d 100644 --- a/code/ryzom/client/src/login_patch.cpp +++ b/code/ryzom/client/src/login_patch.cpp @@ -2967,7 +2967,7 @@ void CPatchThread::processFile (CPatchManager::SFileToPatch &rFTP) PatchSizeProgress += rFTP.PatcheSizes[j]; currentPatchedSize += rFTP.PatcheSizes[j]; } - + } if (tmpSourceName != DestinationName) { pPM->deleteFile(SourceName, false, false); // File can exists if bad BNP loading @@ -2981,7 +2981,6 @@ void CPatchThread::processFile (CPatchManager::SFileToPatch &rFTP) pPM->renameFile(tmpSourceName, DestinationName); } } - } } else { From 762962ef25963f3f1dae3ea2eb0b1a1af4c68af8 Mon Sep 17 00:00:00 2001 From: Nimetu Date: Tue, 10 Nov 2020 23:40:04 +0200 Subject: [PATCH 228/236] Fixed: Only download own platform exedll_.ref files --- code/ryzom/client/src/login_patch.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/code/ryzom/client/src/login_patch.cpp b/code/ryzom/client/src/login_patch.cpp index d087a847d..f21d84bb7 100644 --- a/code/ryzom/client/src/login_patch.cpp +++ b/code/ryzom/client/src/login_patch.cpp @@ -1280,6 +1280,19 @@ void CPatchManager::readDescFile(sint32 nVersion) CBNPFileSet &bnpFS = const_cast(DescFile.getFiles()); + // TODO: .ref files are expected to follow platform category naming (they are in 'main' category) + std::set::const_iterator it; + for(it = forceRemovePatchCategories.begin(); it != forceRemovePatchCategories.end(); ++it) + { + std::string name = *it; + std::string::size_type pos = name.find("_"); + if (pos != std::string::npos) + { + name = name.substr(pos+1) + "_.ref"; + bnpFS.removeFile(name); + } + } + for (cat = 0; cat < DescFile.getCategories().categoryCount();) { const CBNPCategory &bnpCat = DescFile.getCategories().getCategory(cat); From 9d7f2af1a7a1c107b4753d2ba14b6bd2daaa0eab Mon Sep 17 00:00:00 2001 From: Sit Melai Date: Fri, 23 Oct 2020 15:33:33 +0200 Subject: [PATCH 229/236] Fixed not correctly removing Group Containers when removing people (causing crash at char change) --- code/ryzom/client/src/interface_v3/people_list.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/code/ryzom/client/src/interface_v3/people_list.cpp b/code/ryzom/client/src/interface_v3/people_list.cpp index c3f2cf4d7..8728c0e77 100644 --- a/code/ryzom/client/src/interface_v3/people_list.cpp +++ b/code/ryzom/client/src/interface_v3/people_list.cpp @@ -804,7 +804,12 @@ void CPeopleList::removeAllPeoples() { _BaseContainer->removeAllContainers(); } + for (uint k = 0; k < _GroupContainers.size(); ++k) + { + _GroupContainers[k].second->removeAllContainers(); + } NLMISC::contReset(_Peoples); + NLMISC::contReset(_GroupContainers); } //================================================================== From e39cd0a8d392cf8a276085c11c73e4f638df9400 Mon Sep 17 00:00:00 2001 From: Nimetu Date: Mon, 7 Dec 2020 15:05:02 +0200 Subject: [PATCH 230/236] Add --url, --app options for client patcher --- code/CMakeLists.txt | 2 ++ code/config.h.cmake | 1 + .../tools/client/client_patcher/main.cpp | 27 ++++++++++++++++--- 3 files changed, 27 insertions(+), 3 deletions(-) diff --git a/code/CMakeLists.txt b/code/CMakeLists.txt index 3225dc1b8..af243a412 100644 --- a/code/CMakeLists.txt +++ b/code/CMakeLists.txt @@ -102,6 +102,7 @@ SET(RYZOM_CLIENT_CREATE_ACCOUNT_URL "https://open.ryzom.dev/ams/" CACHE STRING SET(RYZOM_CLIENT_EDIT_ACCOUNT_URL "https://open.ryzom.dev/ams/" CACHE STRING "Ryzom Client Edit Account URL") SET(RYZOM_CLIENT_FORGET_PASSWORD_URL "https://open.ryzom.dev/ams/" CACHE STRING "Ryzom Client Forget Password URL") SET(RYZOM_CLIENT_PATCH_URL "https://cdn.ryzom.dev/open/patch/" CACHE STRING "Ryzom Client Patch URL") +SET(RYZOM_CLIENT_APP_NAME "default") SET(RYZOM_WEBIG_MAIN_URL "https://open.ryzom.dev/" CACHE STRING "Ryzom Client WebIG Main URL") SET(RYZOM_WEBIG_TRUSTED_DOMAIN "open.ryzom.dev" CACHE STRING "Ryzom Client WebIG Trusted Domain") @@ -114,6 +115,7 @@ IF(WITH_RYZOM_LIVE) SET(RYZOM_CLIENT_EDIT_ACCOUNT_URL "https://account.ryzom.com/payment_profile/index.php") SET(RYZOM_CLIENT_FORGET_PASSWORD_URL "https://account.ryzom.com/payment_profile/lost_secure_password.php") SET(RYZOM_CLIENT_PATCH_URL "http://dl.ryzom.com/patch_live") + SET(RYZOM_CLIENT_APP_NAME "ryzom_live") SET(RYZOM_WEBIG_MAIN_URL "https://app.ryzom.com/") SET(RYZOM_WEBIG_TRUSTED_DOMAIN "app.ryzom.com") diff --git a/code/config.h.cmake b/code/config.h.cmake index fa4749cb2..fa6c456b9 100644 --- a/code/config.h.cmake +++ b/code/config.h.cmake @@ -37,6 +37,7 @@ #cmakedefine RYZOM_CLIENT_EDIT_ACCOUNT_URL "${RYZOM_CLIENT_EDIT_ACCOUNT_URL}" #cmakedefine RYZOM_CLIENT_FORGET_PASSWORD_URL "${RYZOM_CLIENT_FORGET_PASSWORD_URL}" #cmakedefine RYZOM_CLIENT_PATCH_URL "${RYZOM_CLIENT_PATCH_URL}" +#cmakedefine RYZOM_CLIENT_APP_NAME "${RYZOM_CLIENT_APP_NAME}" #cmakedefine RYZOM_WEBIG_MAIN_URL "${RYZOM_WEBIG_MAIN_URL}" #cmakedefine RYZOM_WEBIG_TRUSTED_DOMAIN "${RYZOM_WEBIG_TRUSTED_DOMAIN}" diff --git a/code/ryzom/tools/client/client_patcher/main.cpp b/code/ryzom/tools/client/client_patcher/main.cpp index 62937dd59..275881c15 100644 --- a/code/ryzom/tools/client/client_patcher/main.cpp +++ b/code/ryzom/tools/client/client_patcher/main.cpp @@ -191,7 +191,8 @@ struct CClientPatcherTranslations : public NLMISC::CI18N::ILoadProxy }; // hardcoded URL to not depend on external files -static const std::string PatchUrl = RYZOM_CLIENT_PATCH_URL; // "https://cdn.ryzom.dev/open/patch"; +static const std::string DefaultPatchUrl = RYZOM_CLIENT_PATCH_URL; // "https://cdn.ryzom.dev/open/patch"; +static const std::string DefaultAppName = RYZOM_CLIENT_APP_NAME; // "default" int main(int argc, char *argv[]) { @@ -204,6 +205,8 @@ int main(int argc, char *argv[]) Args.addArg("s", "source", "source", "Name of source file to xdelta with patch file"); Args.addArg("d", "destination", "destination", "Name of destination operation (patch or unpack)"); Args.addArg("u", "unpack", "unpack", "Name of bnp file to unpack"); + Args.addArg("", "url", "PatchUrl", "Patch server url, ie 'https://dl.ryzom.com/patch_live'"); + Args.addArg("", "app", "Application", "Patch application name for version file, ie 'ryzom_live' requests ryzom_live.version from PatchUrl"); if (!Args.parse(argc, argv)) return 1; @@ -269,14 +272,32 @@ int main(int argc, char *argv[]) // now translations are read, we don't need it anymore delete trans; + // create minimal client.cfg file in memory for patcher + { + CConfigFile::CVar patchUrl; + patchUrl.forceAsString(DefaultPatchUrl); + if (Args.haveLongArg("url") && !Args.getLongArg("url").empty()) + patchUrl.forceAsString(Args.getLongArg("url").front()); + + CConfigFile::CVar appName; + appName.forceAsString(DefaultAppName); + if (Args.haveLongArg("app") && !Args.getLongArg("app").empty()) + appName.forceAsString(Args.getLongArg("app").front()); + + ClientCfg.ConfigFile.insertVar("PatchUrl", patchUrl); + ClientCfg.ConfigFile.insertVar("Application", appName); + } + + // Args.displayVersion(); printf("\n"); printf("Checking %s files to patch...\n", convert(CI18N::get("TheSagaOfRyzom")).c_str()); - + printf("Using '%s/%s.version'\n", ClientCfg.ConfigFile.getVar("PatchUrl").asString().c_str(), + ClientCfg.ConfigFile.getVar("Application").asString().c_str()); // use PatchUrl vector patchURLs; - pPM->init(patchURLs, PatchUrl, ""); + pPM->init(patchURLs, ClientCfg.ConfigFile.getVar("PatchUrl").asString(), ""); pPM->startCheckThread(true /* include background patchs */); ucstring state; From 184582cfc9643789670d2ed8d6c34eb340375edd Mon Sep 17 00:00:00 2001 From: Nuno Date: Mon, 7 Dec 2020 16:39:12 +0100 Subject: [PATCH 231/236] Removed uiBotChatPhrase --- .../client/src/interface_v3/dbgroup_list_sheet_trade.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/code/ryzom/client/src/interface_v3/dbgroup_list_sheet_trade.cpp b/code/ryzom/client/src/interface_v3/dbgroup_list_sheet_trade.cpp index 4a7ef5701..618507ff5 100644 --- a/code/ryzom/client/src/interface_v3/dbgroup_list_sheet_trade.cpp +++ b/code/ryzom/client/src/interface_v3/dbgroup_list_sheet_trade.cpp @@ -257,7 +257,7 @@ void CDBGroupListSheetTrade::CSheetChildTrade::updateViewText(CDBGroupListSheetT case CDBCtrlSheet::Pact: text= CI18N::get("uiBotChatPact") + text; break; case CDBCtrlSheet::Skill: text= CI18N::get("uiBotChatSkill") + text; break; case CDBCtrlSheet::GuildFlag: text= CI18N::get("uiBotChatSkill") + text; break; - case CDBCtrlSheet::Phrase: text= CI18N::get("uiBotChatPhrase") + text; break; + case CDBCtrlSheet::Phrase: text= text; break; default: break; } @@ -536,12 +536,12 @@ bool CDBGroupListSheetTrade::CSheetChildTrade::isSheetValid(CDBGroupListSheetTex nlwarning("Brick %d has type %s", (int) k, BRICK_TYPE::toString(bs->getBrickType()).c_str()); } else - { + { nlwarning("Brick %d : not a brick sheet", (int) k); } } } - */ + */ if (phraseSheet) { @@ -563,7 +563,7 @@ bool CDBGroupListSheetTrade::CSheetChildTrade::isSheetValid(CDBGroupListSheetTex break; } } - + return true; From 7018a4439c27ed8e03e2b395040874b66485ca79 Mon Sep 17 00:00:00 2001 From: Nuno Date: Sun, 20 Dec 2020 11:36:48 +0100 Subject: [PATCH 232/236] Fixed getTargetVpcHex and getTargetVpc --- code/ryzom/client/src/interface_v3/lua_ihm_ryzom.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/ryzom/client/src/interface_v3/lua_ihm_ryzom.cpp b/code/ryzom/client/src/interface_v3/lua_ihm_ryzom.cpp index 8aa7af585..e49a7a106 100644 --- a/code/ryzom/client/src/interface_v3/lua_ihm_ryzom.cpp +++ b/code/ryzom/client/src/interface_v3/lua_ihm_ryzom.cpp @@ -3984,7 +3984,7 @@ std::string CLuaIHMRyzom::getTargetVpcHex() CEntityCL *target = getTargetEntity(); if (!target) return 0; - sint64 prop = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:Entities:E" + toString("%d", getTargetSlotNr()) + ":P" + toString("%d", CLFECOMMON::PROPERTY_VPB))->getValue64(); + sint64 prop = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:Entities:E" + toString("%d", getTargetSlotNr()) + ":P" + toString("%d", CLFECOMMON::PROPERTY_VPC))->getValue64(); return NLMISC::toString("%X", prop); } @@ -4016,7 +4016,7 @@ sint64 CLuaIHMRyzom::getTargetVpc() CEntityCL *target = getTargetEntity(); if (!target) return 0; - sint64 prop = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:Entities:E" + toString("%d", getTargetSlotNr()) + ":P" + toString("%d", CLFECOMMON::PROPERTY_VPB))->getValue64(); + sint64 prop = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:Entities:E" + toString("%d", getTargetSlotNr()) + ":P" + toString("%d", CLFECOMMON::PROPERTY_VPC))->getValue64(); return prop; } From 0b110c6a88f32960c197cff90256cec8141430ee Mon Sep 17 00:00:00 2001 From: Nuno Date: Mon, 21 Dec 2020 07:17:30 +0100 Subject: [PATCH 233/236] Fixed getTargetVpcHex and getTargetVpc --- .../client/src/interface_v3/lua_ihm_ryzom.cpp | 40 ++++++++++++++----- 1 file changed, 30 insertions(+), 10 deletions(-) diff --git a/code/ryzom/client/src/interface_v3/lua_ihm_ryzom.cpp b/code/ryzom/client/src/interface_v3/lua_ihm_ryzom.cpp index e49a7a106..602fe1abd 100644 --- a/code/ryzom/client/src/interface_v3/lua_ihm_ryzom.cpp +++ b/code/ryzom/client/src/interface_v3/lua_ihm_ryzom.cpp @@ -565,6 +565,7 @@ void CLuaIHMRyzom::RegisterRyzomFunctions(NLGUI::CLuaState &ls) LUABIND_FUNC(isDynStringAvailable), LUABIND_FUNC(isFullyPatched), LUABIND_FUNC(getSheetType), + LUABIND_FUNC(getSheetShape), LUABIND_FUNC(getSheetFamily), LUABIND_FUNC(getSheetName), LUABIND_FUNC(getFameIndex), @@ -3470,6 +3471,25 @@ std::string CLuaIHMRyzom::getSheetType(const std::string &sheet) } + if (!sheetPtr) + return ""; + + if (sheetPtr->type() == CEntitySheet::ITEM) + { + CItemSheet *sheet = (CItemSheet*)sheetPtr; + return sheet->getShape(); + } + else if (sheetPtr->type() == CEntitySheet::FAUNA) + { + CCharacterSheet *sheet = (CCharacterSheet*)(sheetPtr); + return sheet->Body.getItem(); + } + + return ""; +} + + + // *************************************************************************** std::string CLuaIHMRyzom::getSheetFamily(const std::string &sheet) { @@ -3879,42 +3899,42 @@ sint32 CLuaIHMRyzom::getPlayerLevel() // *************************************************************************** std::string CLuaIHMRyzom::getPlayerVpaHex() { - sint64 prop = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:Entities:E0:P" + toString("%d", CLFECOMMON::PROPERTY_VPA))->getValue64(); + uint64 prop = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:Entities:E0:P" + toString("%d", CLFECOMMON::PROPERTY_VPA))->getValue64(); return NLMISC::toString("%X", prop); } // *************************************************************************** std::string CLuaIHMRyzom::getPlayerVpbHex() { - sint64 prop = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:Entities:E0:P" + toString("%d", CLFECOMMON::PROPERTY_VPB))->getValue64(); + uint64 prop = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:Entities:E0:P" + toString("%d", CLFECOMMON::PROPERTY_VPB))->getValue64(); return NLMISC::toString("%X", prop); } // *************************************************************************** std::string CLuaIHMRyzom::getPlayerVpcHex() { - sint64 prop = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:Entities:E0:P" + toString("%d", CLFECOMMON::PROPERTY_VPB))->getValue64(); + uint64 prop = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:Entities:E0:P" + toString("%d", CLFECOMMON::PROPERTY_VPC))->getValue64(); return NLMISC::toString("%X", prop); } // *************************************************************************** sint64 CLuaIHMRyzom::getPlayerVpa() { - sint64 prop = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:Entities:E0:P" + toString("%d", CLFECOMMON::PROPERTY_VPA))->getValue64(); + uint64 prop = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:Entities:E0:P" + toString("%d", CLFECOMMON::PROPERTY_VPA))->getValue64(); return prop; } // *************************************************************************** sint64 CLuaIHMRyzom::getPlayerVpb() { - sint64 prop = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:Entities:E0:P" + toString("%d", CLFECOMMON::PROPERTY_VPB))->getValue64(); + uint64 prop = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:Entities:E0:P" + toString("%d", CLFECOMMON::PROPERTY_VPB))->getValue64(); return prop; } // *************************************************************************** sint64 CLuaIHMRyzom::getPlayerVpc() { - sint64 prop = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:Entities:E0:P" + toString("%d", CLFECOMMON::PROPERTY_VPB))->getValue64(); + uint64 prop = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:Entities:E0:P" + toString("%d", CLFECOMMON::PROPERTY_VPC))->getValue64(); return prop; } @@ -3964,7 +3984,7 @@ std::string CLuaIHMRyzom::getTargetVpaHex() CEntityCL *target = getTargetEntity(); if (!target) return 0; - sint64 prop = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:Entities:E" + toString("%d", getTargetSlotNr()) + ":P" + toString("%d", CLFECOMMON::PROPERTY_VPA))->getValue64(); + uint64 prop = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:Entities:E" + toString("%d", getTargetSlotNr()) + ":P" + toString("%d", CLFECOMMON::PROPERTY_VPA))->getValue64(); return NLMISC::toString("%X", prop); } @@ -3974,7 +3994,7 @@ std::string CLuaIHMRyzom::getTargetVpbHex() CEntityCL *target = getTargetEntity(); if (!target) return 0; - sint64 prop = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:Entities:E" + toString("%d", getTargetSlotNr()) + ":P" + toString("%d", CLFECOMMON::PROPERTY_VPB))->getValue64(); + uint64 prop = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:Entities:E" + toString("%d", getTargetSlotNr()) + ":P" + toString("%d", CLFECOMMON::PROPERTY_VPB))->getValue64(); return NLMISC::toString("%X", prop); } @@ -3984,7 +4004,7 @@ std::string CLuaIHMRyzom::getTargetVpcHex() CEntityCL *target = getTargetEntity(); if (!target) return 0; - sint64 prop = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:Entities:E" + toString("%d", getTargetSlotNr()) + ":P" + toString("%d", CLFECOMMON::PROPERTY_VPC))->getValue64(); + uint64 prop = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:Entities:E" + toString("%d", getTargetSlotNr()) + ":P" + toString("%d", CLFECOMMON::PROPERTY_VPC))->getValue64(); return NLMISC::toString("%X", prop); } @@ -3994,7 +4014,7 @@ sint64 CLuaIHMRyzom::getTargetVpa() CEntityCL *target = getTargetEntity(); if (!target) return 0; - sint64 prop = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:Entities:E" + toString("%d", getTargetSlotNr()) + ":P" + toString("%d", CLFECOMMON::PROPERTY_VPA))->getValue64(); + uint64 prop = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:Entities:E" + toString("%d", getTargetSlotNr()) + ":P" + toString("%d", CLFECOMMON::PROPERTY_VPA))->getValue64(); return prop; } From d23166ae49eadb4d7935502254de19fe4cf6508d Mon Sep 17 00:00:00 2001 From: Nuno Date: Mon, 21 Dec 2020 07:17:30 +0100 Subject: [PATCH 234/236] Fixed getTargetVpcHex and getTargetVpc --- .../client/src/interface_v3/lua_ihm_ryzom.cpp | 191 ++++++++++-------- 1 file changed, 108 insertions(+), 83 deletions(-) diff --git a/code/ryzom/client/src/interface_v3/lua_ihm_ryzom.cpp b/code/ryzom/client/src/interface_v3/lua_ihm_ryzom.cpp index e49a7a106..1d1b01684 100644 --- a/code/ryzom/client/src/interface_v3/lua_ihm_ryzom.cpp +++ b/code/ryzom/client/src/interface_v3/lua_ihm_ryzom.cpp @@ -565,6 +565,7 @@ void CLuaIHMRyzom::RegisterRyzomFunctions(NLGUI::CLuaState &ls) LUABIND_FUNC(isDynStringAvailable), LUABIND_FUNC(isFullyPatched), LUABIND_FUNC(getSheetType), + LUABIND_FUNC(getSheetShape), LUABIND_FUNC(getSheetFamily), LUABIND_FUNC(getSheetName), LUABIND_FUNC(getFameIndex), @@ -1245,7 +1246,7 @@ int CLuaIHMRyzom::getMousePos(CLuaState &ls) CTool::getMousePos(x, y); ls.push(x); ls.push(y); - + return 2; } @@ -1257,7 +1258,7 @@ int CLuaIHMRyzom::getMouseDown(CLuaState &ls) ls.push(down); ls.push(x); ls.push(y); - + return 3; } @@ -1266,11 +1267,11 @@ int CLuaIHMRyzom::getMouseMiddleDown(CLuaState &ls) sint32 x, y; bool down; CTool::getMouseMiddleDown(down, x, y); - + ls.push(down); ls.push(x); ls.push(y); - + return 3; } @@ -1279,11 +1280,11 @@ int CLuaIHMRyzom::getMouseRightDown(CLuaState &ls) sint32 x, y; bool down; CTool::getMouseRightDown(down, x, y); - + ls.push(down); ls.push(x); ls.push(y); - + return 3; } @@ -1294,10 +1295,10 @@ int CLuaIHMRyzom::getShapeIdAt(CLuaState &ls) CLuaIHM::checkArgCount(ls, funcName, 2); CLuaIHM::checkArgType(ls, funcName, 1, LUA_TNUMBER); CLuaIHM::checkArgType(ls, funcName, 2, LUA_TNUMBER); - + uint32 x = (uint32)ls.toInteger(1); - uint32 y = (uint32)ls.toInteger(2); - + uint32 y = (uint32)ls.toInteger(2); + uint32 w, h; CViewRenderer &viewRender = *CViewRenderer::getInstance(); viewRender.getScreenSize(w, h); @@ -1308,11 +1309,11 @@ int CLuaIHMRyzom::getShapeIdAt(CLuaState &ls) float cursX = (float)x/(float)w; float cursY = (float)y/(float)h; - + sint32 instance_idx; EntitiesMngr.getShapeInstanceUnderPos(cursX, cursY, instance_idx); ls.push(instance_idx); - + return 1; } @@ -1339,7 +1340,7 @@ int CLuaIHMRyzom::getGroundAtMouse(CLuaState &ls) worldViewRay.Up = camMatrix.getK().normed(); CVector sceneInter; CTool::TRayIntersectionType rayInterType = CTool::computeLandscapeRayIntersection(worldViewRay, sceneInter); - + ls.push(sceneInter.x); ls.push(sceneInter.y); ls.push(sceneInter.z); @@ -1367,7 +1368,7 @@ int CLuaIHMRyzom::moveCam(CLuaState &ls) float z = (float)ls.toNumber(3); CVector moves(x, y, z); UserEntity->setCameraMoves(moves); - + return 0; } @@ -1541,7 +1542,7 @@ int CLuaIHMRyzom::moveToTarget(CLuaState &ls) const std::string &url = ls.toString(1); CEntityCL *target = getTargetEntity(); if (!target) return 0; - + CLuaManager::getInstance().executeLuaScript("ArkTargetUrl = [["+url+"]]", 0); UserEntity->moveTo(UserEntity->selection(), 1.0, CUserEntity::OpenArkUrl); return 0; @@ -2180,7 +2181,7 @@ int CLuaIHMRyzom::addShape(CLuaState &ls) CLuaIHM::checkArgType(ls, funcName, 1, LUA_TSTRING); sint32 idx = -1; - + if (!Scene) { nlwarning("No scene available"); @@ -2189,7 +2190,7 @@ int CLuaIHMRyzom::addShape(CLuaState &ls) } string shape = ls.toString(1); - + float x = 0.0f, y = 0.0f, z = 0.0f; float scale = 1.0f; string context, url, skeleton, texture; @@ -2197,7 +2198,7 @@ int CLuaIHMRyzom::addShape(CLuaState &ls) bool transparency = false; bool collision = true; bool inIgZone = false; - + if (ls.getTop() >= 2) { CLuaIHM::checkArgType(ls, funcName, 2, LUA_TNUMBER); @@ -2223,14 +2224,14 @@ int CLuaIHMRyzom::addShape(CLuaState &ls) y = UserEntity->pos().y; z = UserEntity->pos().z; } - + CVector userDir = UserEntity->dir(); - + if (ls.getTop() >= 5) { CLuaIHM::checkArgType(ls, funcName, 5, LUA_TSTRING); string angle = ls.toString(5); - + if (angle != "user") { float a; @@ -2238,7 +2239,7 @@ int CLuaIHMRyzom::addShape(CLuaState &ls) userDir = CVector(sin(a), cos(a), 0.f); } } - + if (ls.getTop() >= 6) { CLuaIHM::checkArgType(ls, funcName, 6, LUA_TNUMBER); @@ -2250,19 +2251,19 @@ int CLuaIHMRyzom::addShape(CLuaState &ls) CLuaIHM::checkArgType(ls, funcName, 7, LUA_TBOOLEAN); collision = ls.toBoolean(7); } - + if (ls.getTop() >= 8) { CLuaIHM::checkArgType(ls, funcName, 8, LUA_TSTRING); context = ls.toString(8); } - + if (ls.getTop() >= 9) { CLuaIHM::checkArgType(ls, funcName, 9, LUA_TSTRING); url = ls.toString(9); } - + if (ls.getTop() >= 10) { CLuaIHM::checkArgType(ls, funcName, 10, LUA_TBOOLEAN); @@ -2274,25 +2275,25 @@ int CLuaIHMRyzom::addShape(CLuaState &ls) CLuaIHM::checkArgType(ls, funcName, 11, LUA_TBOOLEAN); transparency = ls.toBoolean(11); } - + if (ls.getTop() >= 12) { CLuaIHM::checkArgType(ls, funcName, 12, LUA_TSTRING); texture = ls.toString(12); } - + if (ls.getTop() >= 13) { CLuaIHM::checkArgType(ls, funcName, 13, LUA_TSTRING); skeleton = ls.toString(13); } - + if (ls.getTop() >= 14) { CLuaIHM::checkArgType(ls, funcName, 14, LUA_TBOOLEAN); inIgZone = ls.toBoolean(14); } - + CShapeInstanceReference instref = EntitiesMngr.createInstance(shape, CVector(x, y, z), context, url, collision, inIgZone, idx); UInstance instance = instref.Instance; @@ -2373,9 +2374,9 @@ int CLuaIHMRyzom::addShape(CLuaState &ls) instance.setPos(CVector(x, y, z)); instance.setRotQuat(dir.getRot()); } - + instance.setTransformMode(UTransformable::RotEuler); - + // if the shape is a particle system, additionnal parameters are user params UParticleSystemInstance psi; psi.cast (instance); @@ -2398,7 +2399,7 @@ int CLuaIHMRyzom::addShape(CLuaState &ls) } } }*/ - + UMovePrimitive *primitive = instref.Primitive; if (primitive) { @@ -2408,7 +2409,7 @@ int CLuaIHMRyzom::addShape(CLuaState &ls) primitive->setReactionType(UMovePrimitive::Slide); primitive->setTriggerType(UMovePrimitive::NotATrigger); primitive->setAbsorbtion(0); - + primitive->setPrimitiveType(UMovePrimitive::_2DOrientedBox); primitive->setSize((bbox.getMax().x - bbox.getMin().x)*scale, (bbox.getMax().y - bbox.getMin().y)*scale); primitive->setHeight((bbox.getMax().z - bbox.getMin().z)*scale); @@ -2416,10 +2417,10 @@ int CLuaIHMRyzom::addShape(CLuaState &ls) primitive->setCollisionMask(MaskColPlayer | MaskColNpc | MaskColDoor); primitive->setOcclusionMask(MaskColPlayer | MaskColNpc | MaskColDoor); primitive->setObstacle(true); - - + + primitive->setGlobalPosition(instance.getPos(), dynamicWI); - + primitive->insertInWorldImage(dynamicWI); } } @@ -2434,9 +2435,9 @@ int CLuaIHMRyzom::setupShape(CLuaState &ls) CLuaIHM::checkArgCount(ls, funcName, 2); CLuaIHM::checkArgType(ls, funcName, 1, LUA_TNUMBER); CLuaIHM::checkArgType(ls, funcName, 2, LUA_TTABLE); - + uint32 idx = (uint32)ls.toInteger(1); - + std::vector keys; std::vector values; CLuaObject params; @@ -2459,12 +2460,12 @@ int CLuaIHMRyzom::setupShape(CLuaState &ls) values.push_back(it.nextValue().toString()); keys.push_back(it.nextKey().toString()); } - + if (EntitiesMngr.setupInstance(idx, keys, values)) ls.push(1); else ls.pushNil(); - + return 1; } @@ -2476,15 +2477,15 @@ int CLuaIHMRyzom::moveShape(CLuaState &ls) CLuaIHM::checkArgType(ls, funcName, 2, LUA_TSTRING); CLuaIHM::checkArgType(ls, funcName, 3, LUA_TSTRING); CLuaIHM::checkArgType(ls, funcName, 4, LUA_TSTRING); - + uint32 idx = (uint32)ls.toInteger(1); - + CVector pos = EntitiesMngr.getInstancePos(idx); string x = ls.toString(2); string y = ls.toString(3); string z = ls.toString(4); - + float move_x = 0; float move_y = 0; float move_z = 0; @@ -2502,7 +2503,7 @@ int CLuaIHMRyzom::moveShape(CLuaState &ls) pos.x = move_x; } } - + if (!y.empty()) { if (y[0] == '+') @@ -2516,7 +2517,7 @@ int CLuaIHMRyzom::moveShape(CLuaState &ls) pos.y = move_y; } } - + if (!z.empty()) { if (z[0] == '+') @@ -2530,12 +2531,12 @@ int CLuaIHMRyzom::moveShape(CLuaState &ls) pos.z = move_z; } } - + if (EntitiesMngr.setInstancePos(idx, pos)) ls.push(1); else ls.pushNil(); - + return 1; } @@ -2547,9 +2548,9 @@ int CLuaIHMRyzom::rotateShape(CLuaState &ls) CLuaIHM::checkArgType(ls, funcName, 2, LUA_TSTRING); CLuaIHM::checkArgType(ls, funcName, 3, LUA_TSTRING); CLuaIHM::checkArgType(ls, funcName, 4, LUA_TSTRING); - + uint32 idx = (uint32)ls.toInteger(1); - + CVector rot = EntitiesMngr.getInstanceRot(idx); string x = ls.toString(2); @@ -2573,7 +2574,7 @@ int CLuaIHMRyzom::rotateShape(CLuaState &ls) rot.x = rot_x; } } - + if (!y.empty()) { if (y[0] == '+') @@ -2587,7 +2588,7 @@ int CLuaIHMRyzom::rotateShape(CLuaState &ls) rot.y = rot_y; } } - + if (!z.empty()) { if (z[0] == '+') @@ -2601,12 +2602,12 @@ int CLuaIHMRyzom::rotateShape(CLuaState &ls) rot.z = rot_z; } } - + if (EntitiesMngr.setInstanceRot(idx, rot)) ls.push(1); else ls.pushNil(); - + return 1; } @@ -2615,7 +2616,7 @@ int CLuaIHMRyzom::deleteShape(CLuaState &ls) const char* funcName = "deleteShape"; CLuaIHM::checkArgCount(ls, funcName, 1); CLuaIHM::checkArgType(ls, funcName, 1, LUA_TNUMBER); - + if (EntitiesMngr.deleteInstance((uint32)ls.toInteger(1))) ls.push(1); else @@ -2629,9 +2630,9 @@ int CLuaIHMRyzom::getShapePos(CLuaState &ls) const char* funcName = "getShapePos"; CLuaIHM::checkArgCount(ls, funcName, 1); CLuaIHM::checkArgType(ls, funcName, 1, LUA_TNUMBER); - + uint32 idx = (uint32)ls.toInteger(1); - + CVector pos = EntitiesMngr.getInstancePos(idx); ls.push(pos.x); @@ -2645,9 +2646,9 @@ int CLuaIHMRyzom::getShapeRot(CLuaState &ls) const char* funcName = "getShapeRot"; CLuaIHM::checkArgCount(ls, funcName, 1); CLuaIHM::checkArgType(ls, funcName, 1, LUA_TNUMBER); - + uint32 idx = (uint32)ls.toInteger(1); - + CVector rot = EntitiesMngr.getInstanceRot(idx); ls.push(rot.x); @@ -2661,11 +2662,11 @@ int CLuaIHMRyzom::getShapeScale(CLuaState &ls) const char* funcName = "getShapeScale"; CLuaIHM::checkArgCount(ls, funcName, 1); CLuaIHM::checkArgType(ls, funcName, 1, LUA_TNUMBER); - + uint32 idx = (uint32)ls.toInteger(1); - + CVector scale = EntitiesMngr.getInstanceScale(idx); - + ls.push(scale.x); ls.push(scale.y); ls.push(scale.z); @@ -2677,11 +2678,11 @@ int CLuaIHMRyzom::getShapeColPos(CLuaState &ls) const char* funcName = "getShapeColPos"; CLuaIHM::checkArgCount(ls, funcName, 1); CLuaIHM::checkArgType(ls, funcName, 1, LUA_TNUMBER); - + uint32 idx = (uint32)ls.toInteger(1); - + CVector pos = EntitiesMngr.getInstanceColPos(idx); - + ls.push(pos.x); ls.push(pos.y); ls.push(pos.z); @@ -2693,11 +2694,11 @@ int CLuaIHMRyzom::getShapeColScale(CLuaState &ls) const char* funcName = "getShapeColScale"; CLuaIHM::checkArgCount(ls, funcName, 1); CLuaIHM::checkArgType(ls, funcName, 1, LUA_TNUMBER); - + uint32 idx = (uint32)ls.toInteger(1); - + CVector scale = EntitiesMngr.getInstanceColScale(idx); - + ls.push(scale.x); ls.push(scale.y); ls.push(scale.z); @@ -2709,11 +2710,11 @@ int CLuaIHMRyzom::getShapeColOrient(CLuaState &ls) const char* funcName = "getShapeColOrient"; CLuaIHM::checkArgCount(ls, funcName, 1); CLuaIHM::checkArgType(ls, funcName, 1, LUA_TNUMBER); - + uint32 idx = (uint32)ls.toInteger(1); - + double orient = EntitiesMngr.getInstanceColOrient(idx); - + ls.push(orient); return 1; } @@ -3469,6 +3470,30 @@ std::string CLuaIHMRyzom::getSheetType(const std::string &sheet) return CEntitySheet::typeToString(sheetPtr->Type); } +// *************************************************************************** +std::string CLuaIHMRyzom::getSheetShape(const std::string &sheet) +{ + //H_AUTO(Lua_CLuaIHM_getSheetType) + const CEntitySheet *sheetPtr = SheetMngr.get(CSheetId(sheet)); + + if (!sheetPtr) + return ""; + + if (sheetPtr->type() == CEntitySheet::ITEM) + { + CItemSheet *sheet = (CItemSheet*)sheetPtr; + return sheet->getShape(); + } + else if (sheetPtr->type() == CEntitySheet::FAUNA) + { + CCharacterSheet *sheet = (CCharacterSheet*)(sheetPtr); + return sheet->Body.getItem(); + } + + return ""; +} + + // *************************************************************************** std::string CLuaIHMRyzom::getSheetFamily(const std::string &sheet) @@ -3481,7 +3506,7 @@ std::string CLuaIHMRyzom::getSheetFamily(const std::string &sheet) if (pIS) return ITEMFAMILY::toString(pIS->Family); } - + return ""; } @@ -3712,7 +3737,7 @@ float CLuaIHMRyzom::setChar3dDBfromVPX(const std::string &branch, const std::str cs.People = EGSPD::CPeople::fromString(people); SCharacter3DSetup::setupDBFromCharacterSummary(branch, cs); - + return cs.VisualPropC.PropertySubData.CharacterHeight; } @@ -3879,42 +3904,42 @@ sint32 CLuaIHMRyzom::getPlayerLevel() // *************************************************************************** std::string CLuaIHMRyzom::getPlayerVpaHex() { - sint64 prop = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:Entities:E0:P" + toString("%d", CLFECOMMON::PROPERTY_VPA))->getValue64(); + uint64 prop = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:Entities:E0:P" + toString("%d", CLFECOMMON::PROPERTY_VPA))->getValue64(); return NLMISC::toString("%X", prop); } // *************************************************************************** std::string CLuaIHMRyzom::getPlayerVpbHex() { - sint64 prop = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:Entities:E0:P" + toString("%d", CLFECOMMON::PROPERTY_VPB))->getValue64(); + uint64 prop = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:Entities:E0:P" + toString("%d", CLFECOMMON::PROPERTY_VPB))->getValue64(); return NLMISC::toString("%X", prop); } // *************************************************************************** std::string CLuaIHMRyzom::getPlayerVpcHex() { - sint64 prop = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:Entities:E0:P" + toString("%d", CLFECOMMON::PROPERTY_VPB))->getValue64(); + uint64 prop = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:Entities:E0:P" + toString("%d", CLFECOMMON::PROPERTY_VPC))->getValue64(); return NLMISC::toString("%X", prop); } // *************************************************************************** sint64 CLuaIHMRyzom::getPlayerVpa() { - sint64 prop = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:Entities:E0:P" + toString("%d", CLFECOMMON::PROPERTY_VPA))->getValue64(); + uint64 prop = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:Entities:E0:P" + toString("%d", CLFECOMMON::PROPERTY_VPA))->getValue64(); return prop; } // *************************************************************************** sint64 CLuaIHMRyzom::getPlayerVpb() { - sint64 prop = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:Entities:E0:P" + toString("%d", CLFECOMMON::PROPERTY_VPB))->getValue64(); + uint64 prop = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:Entities:E0:P" + toString("%d", CLFECOMMON::PROPERTY_VPB))->getValue64(); return prop; } // *************************************************************************** sint64 CLuaIHMRyzom::getPlayerVpc() { - sint64 prop = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:Entities:E0:P" + toString("%d", CLFECOMMON::PROPERTY_VPB))->getValue64(); + uint64 prop = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:Entities:E0:P" + toString("%d", CLFECOMMON::PROPERTY_VPC))->getValue64(); return prop; } @@ -3964,7 +3989,7 @@ std::string CLuaIHMRyzom::getTargetVpaHex() CEntityCL *target = getTargetEntity(); if (!target) return 0; - sint64 prop = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:Entities:E" + toString("%d", getTargetSlotNr()) + ":P" + toString("%d", CLFECOMMON::PROPERTY_VPA))->getValue64(); + uint64 prop = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:Entities:E" + toString("%d", getTargetSlotNr()) + ":P" + toString("%d", CLFECOMMON::PROPERTY_VPA))->getValue64(); return NLMISC::toString("%X", prop); } @@ -3974,7 +3999,7 @@ std::string CLuaIHMRyzom::getTargetVpbHex() CEntityCL *target = getTargetEntity(); if (!target) return 0; - sint64 prop = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:Entities:E" + toString("%d", getTargetSlotNr()) + ":P" + toString("%d", CLFECOMMON::PROPERTY_VPB))->getValue64(); + uint64 prop = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:Entities:E" + toString("%d", getTargetSlotNr()) + ":P" + toString("%d", CLFECOMMON::PROPERTY_VPB))->getValue64(); return NLMISC::toString("%X", prop); } @@ -3984,7 +4009,7 @@ std::string CLuaIHMRyzom::getTargetVpcHex() CEntityCL *target = getTargetEntity(); if (!target) return 0; - sint64 prop = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:Entities:E" + toString("%d", getTargetSlotNr()) + ":P" + toString("%d", CLFECOMMON::PROPERTY_VPC))->getValue64(); + uint64 prop = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:Entities:E" + toString("%d", getTargetSlotNr()) + ":P" + toString("%d", CLFECOMMON::PROPERTY_VPC))->getValue64(); return NLMISC::toString("%X", prop); } @@ -3994,7 +4019,7 @@ sint64 CLuaIHMRyzom::getTargetVpa() CEntityCL *target = getTargetEntity(); if (!target) return 0; - sint64 prop = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:Entities:E" + toString("%d", getTargetSlotNr()) + ":P" + toString("%d", CLFECOMMON::PROPERTY_VPA))->getValue64(); + uint64 prop = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:Entities:E" + toString("%d", getTargetSlotNr()) + ":P" + toString("%d", CLFECOMMON::PROPERTY_VPA))->getValue64(); return prop; } @@ -4172,12 +4197,12 @@ int CLuaIHMRyzom::addLandMark(CLuaState &ls) point.LeftClickParam = ls.toString(6); point.RightClickAction = ls.toString(7); point.RightClickParam = ls.toString(8); - + point.Color = CRGBA(255,255,255,255); if (ls.getTop() >= 9) CLuaIHM::pop(ls, point.Color); - + CGroupMap *pMap = dynamic_cast(CWidgetManager::getInstance()->getElementFromId("ui:interface:map:content:map_content:actual_map")); if (pMap != NULL) pMap->addArkPoint(point); From 79e65a6b9edc5f2ebfbf33f1ef2c3ec857bcda48 Mon Sep 17 00:00:00 2001 From: Nuno Date: Mon, 21 Dec 2020 07:19:30 +0100 Subject: [PATCH 235/236] Rollback bad commit --- .../client/src/interface_v3/lua_ihm_ryzom.cpp | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/code/ryzom/client/src/interface_v3/lua_ihm_ryzom.cpp b/code/ryzom/client/src/interface_v3/lua_ihm_ryzom.cpp index 37c57bf0c..1d1b01684 100644 --- a/code/ryzom/client/src/interface_v3/lua_ihm_ryzom.cpp +++ b/code/ryzom/client/src/interface_v3/lua_ihm_ryzom.cpp @@ -3495,25 +3495,6 @@ std::string CLuaIHMRyzom::getSheetShape(const std::string &sheet) - if (!sheetPtr) - return ""; - - if (sheetPtr->type() == CEntitySheet::ITEM) - { - CItemSheet *sheet = (CItemSheet*)sheetPtr; - return sheet->getShape(); - } - else if (sheetPtr->type() == CEntitySheet::FAUNA) - { - CCharacterSheet *sheet = (CCharacterSheet*)(sheetPtr); - return sheet->Body.getItem(); - } - - return ""; -} - - - // *************************************************************************** std::string CLuaIHMRyzom::getSheetFamily(const std::string &sheet) { From 269526e87f6d03684c3d311a9aa75f8cc8b781c9 Mon Sep 17 00:00:00 2001 From: Nuno Date: Tue, 5 Jan 2021 06:51:20 +0100 Subject: [PATCH 236/236] Fixed bad check of args --- code/ryzom/tools/client/client_patcher/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/ryzom/tools/client/client_patcher/main.cpp b/code/ryzom/tools/client/client_patcher/main.cpp index 275881c15..21fc58959 100644 --- a/code/ryzom/tools/client/client_patcher/main.cpp +++ b/code/ryzom/tools/client/client_patcher/main.cpp @@ -210,7 +210,7 @@ int main(int argc, char *argv[]) if (!Args.parse(argc, argv)) return 1; - if (Args.haveArg("p") && Args.haveArg("p") && Args.haveArg("p")) + if (Args.haveArg("p") && Args.haveArg("s") && Args.haveArg("d")) { string patchName = Args.getArg("p").front(); string sourceName = Args.getArg("s").front();