From 68dfdda40ef7660097fb6437beeccf47406c8db8 Mon Sep 17 00:00:00 2001 From: NotAdam Date: Mon, 14 Oct 2019 18:41:16 +1100 Subject: [PATCH 01/10] vs2019 support & dropping std::experimental::filesystem --- .appveyor.yml | 4 +-- CMakeSettings.json | 25 +++++++++++++----- README.md | 2 +- deps/datReader/Dat.cpp | 2 +- deps/datReader/Dat.h | 4 +-- deps/datReader/DatCat.cpp | 4 +-- deps/datReader/DatCat.h | 6 ++--- deps/datReader/ExdCat.h | 2 +- deps/datReader/ExdData.h | 4 +-- deps/datReader/File.cpp | 2 +- deps/datReader/File.h | 4 +-- deps/datReader/GameData.cpp | 12 ++++----- deps/datReader/GameData.h | 6 ++--- deps/datReader/Index.cpp | 2 +- deps/datReader/Index.h | 4 +-- deps/datReader/SqPack.cpp | 2 +- deps/datReader/SqPack.h | 4 +-- deps/watchdog/Watchdog.h | 6 ++--- src/api/main.cpp | 4 +-- src/common/Config/ConfigMgr.cpp | 5 ++-- src/common/Logging/Logger.cpp | 4 +-- src/dbm/DbManager.cpp | 4 +-- src/dbm/main.cpp | 12 ++++----- src/tools/action_parse/main.cpp | 4 +-- src/tools/event_object_parser/main.cpp | 4 +-- src/tools/exd_struct_gen/main.cpp | 4 +-- src/tools/exd_struct_test/main.cpp | 4 +-- src/tools/mob_parse/main.cpp | 26 +++++++++---------- .../nav_export/nav/TiledNavmeshGenerator.cpp | 4 +-- src/tools/nav_export/navmesh_exporter.h | 6 ++--- src/tools/nav_export/obj_exporter.h | 14 +++++----- .../pcb_reader/nav/TiledNavmeshGenerator.cpp | 4 +-- src/tools/pcb_reader/navmesh_exporter.h | 8 +++--- src/tools/pcb_reader/obj_exporter.h | 14 +++++----- src/tools/quest_parser/main.cpp | 4 +-- src/tools/questbattle_bruteforce/main.cpp | 4 +-- src/world/Navi/NaviProvider.cpp | 10 +++---- src/world/Script/ScriptLoader.cpp | 4 +-- src/world/Script/ScriptMgr.cpp | 2 +- src/world/Session.cpp | 4 +-- .../Housing/HousingInteriorTerritory.h | 2 +- 41 files changed, 128 insertions(+), 118 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index 70d4d921..6efb5007 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -1,5 +1,5 @@ os: - - Visual Studio 2017 + - Visual Studio 2019 configuration: - Debug @@ -20,7 +20,7 @@ before_build: - git submodule update --init - mkdir build - cd build - - cmake .. -G "Visual Studio 15 2017 Win64" + - cmake .. -G "Visual Studio 16 2019 Win64" - cmake --build . --target ALL_BUILD --config Release build_script: diff --git a/CMakeSettings.json b/CMakeSettings.json index 7a6006fe..cc894359 100644 --- a/CMakeSettings.json +++ b/CMakeSettings.json @@ -1,21 +1,32 @@ { // See https://go.microsoft.com//fwlink//?linkid=834763 for more information about this file. + "environments": [ + { + "BuildDir": "${env.USERPROFILE}\\CMakeBuilds\\${workspaceHash}\\build" + } + ], "configurations": [ { "name": "x64-Debug", - "generator": "Visual Studio 15 2017 Win64", + "generator": "Visual Studio 16 2019 Win64", "configurationType": "Debug", - "buildRoot": "${env.USERPROFILE}\\CMakeBuild\\${workspaceHash}\\build\\${name}", + "buildRoot": "${env.BuildDir}\\${name}", "cmakeCommandArgs": "-DCMAKE_BUILD_TYPE=\"Debug\"", - "buildCommandArgs": "-m -v:minimal" + "buildCommandArgs": "-m -v:minimal", + "inheritEnvironments": [ + "msvc_x64" + ] }, { "name": "x64-Release", - "generator": "Visual Studio 15 2017 Win64", + "generator": "Visual Studio 16 2019 Win64", "configurationType": "Release", - "buildRoot": "${env.USERPROFILE}\\CMakeBuild\\${workspaceHash}\\build\\${name}", - "cmakeCommandArgs": "", - "buildCommandArgs": "-m -v:minimal" + "buildRoot": "${env.BuildDir}\\${name}", + "cmakeCommandArgs": "-DCMAKE_BUILD_TYPE=\"RelWithDebInfo\"", + "buildCommandArgs": "-m -v:minimal", + "inheritEnvironments": [ + "msvc_x64" + ] } ] } diff --git a/README.md b/README.md index 582f4ebf..a133f5e0 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ Sapphire requires the following software: | *Name* | *Windows* | *Linux* | | ------ | --------- | ------- | -| CMake 3.0.2+ and C++17 capable compiler | [Visual Studio 2017](https://www.visualstudio.com/) | `gcc 7` and `g++ 7` or newer | +| CMake 3.0.2+ and C++17 capable compiler | [Visual Studio 2019](https://www.visualstudio.com/) | `gcc 8` and `g++ 8` or newer, alternatively, `clang 8` and `clang++ 8` or newer. | | MySQL Server 5.7 | [Official Site](https://dev.mysql.com/downloads/mysql/) | MySQL server from your distribution's package manager | Please check the [wiki](https://github.com/SapphireMordred/Sapphire/wiki) for detailed installation/build instructions for your OS. diff --git a/deps/datReader/Dat.cpp b/deps/datReader/Dat.cpp index 94812a09..5e12d5d1 100644 --- a/deps/datReader/Dat.cpp +++ b/deps/datReader/Dat.cpp @@ -140,7 +140,7 @@ namespace xiv namespace dat { -Dat::Dat( const std::experimental::filesystem::path& i_path, uint32_t i_nb ) : +Dat::Dat( const std::filesystem::path& i_path, uint32_t i_nb ) : SqPack( i_path ), m_num( i_nb ) { diff --git a/deps/datReader/Dat.h b/deps/datReader/Dat.h index 5311ab48..10693b3c 100644 --- a/deps/datReader/Dat.h +++ b/deps/datReader/Dat.h @@ -5,7 +5,7 @@ #include -#include +#include namespace xiv { @@ -18,7 +18,7 @@ class Dat : public SqPack { public: // Full path to the dat file - Dat( const std::experimental::filesystem::path& i_path, uint32_t i_nb ); + Dat( const std::filesystem::path& i_path, uint32_t i_nb ); virtual ~Dat(); // Retrieves a file given the offset in the dat file diff --git a/deps/datReader/DatCat.cpp b/deps/datReader/DatCat.cpp index 117c2b9b..2ce9566f 100644 --- a/deps/datReader/DatCat.cpp +++ b/deps/datReader/DatCat.cpp @@ -10,7 +10,7 @@ namespace xiv namespace dat { -Cat::Cat( const std::experimental::filesystem::path& basePath, uint32_t catNum, const std::string& name ) : +Cat::Cat( const std::filesystem::path& basePath, uint32_t catNum, const std::string& name ) : m_name( name ), m_catNum( catNum ), m_chunk( -1 ) @@ -30,7 +30,7 @@ Cat::Cat( const std::experimental::filesystem::path& basePath, uint32_t catNum, } } -Cat::Cat( const std::experimental::filesystem::path& basePath, uint32_t catNum, const std::string& name, uint32_t exNum, uint32_t chunk ) : +Cat::Cat( const std::filesystem::path& basePath, uint32_t catNum, const std::string& name, uint32_t exNum, uint32_t chunk ) : m_name( name ), m_catNum( catNum ), m_chunk( chunk ) diff --git a/deps/datReader/DatCat.h b/deps/datReader/DatCat.h index 1e1d0759..07878589 100644 --- a/deps/datReader/DatCat.h +++ b/deps/datReader/DatCat.h @@ -3,7 +3,7 @@ #include #include -#include +#include namespace xiv { namespace dat { @@ -19,14 +19,14 @@ public: // basePath: Path to the folder containingthe datfiles // catNum: The number of the category // name: The name of the category, empty if not known - Cat( const std::experimental::filesystem::path& basePath, uint32_t catNum, const std::string& name ); + Cat( const std::filesystem::path& basePath, uint32_t catNum, const std::string& name ); // basePath: Path to the folder containingthe datfiles // catNum: The number of the category // name: The name of the category, empty if not known // exNum: The number of the expansion to load from // chunk: The chunk to load from - Cat( const std::experimental::filesystem::path& basePath, uint32_t catNum, const std::string& name, uint32_t exNum, uint32_t chunk ); + Cat( const std::filesystem::path& basePath, uint32_t catNum, const std::string& name, uint32_t exNum, uint32_t chunk ); ~Cat(); // Returns .index of the category diff --git a/deps/datReader/ExdCat.h b/deps/datReader/ExdCat.h index af1090d8..e22ec036 100644 --- a/deps/datReader/ExdCat.h +++ b/deps/datReader/ExdCat.h @@ -4,7 +4,7 @@ #include #include -#include +#include #include "bparse.h" #include "Exd.h" diff --git a/deps/datReader/ExdData.h b/deps/datReader/ExdData.h index c6ca6170..15092d6e 100644 --- a/deps/datReader/ExdData.h +++ b/deps/datReader/ExdData.h @@ -5,7 +5,7 @@ #include #include -#include +#include namespace xiv { @@ -34,7 +34,7 @@ namespace xiv const Cat& get_category(const std::string& i_cat_name); // Export in csv in base flder i_ouput_path - void export_as_csvs(const std::experimental::filesystem::path& i_output_path); + void export_as_csvs(const std::filesystem::path& i_output_path); protected: // Lazy instantiation of category diff --git a/deps/datReader/File.cpp b/deps/datReader/File.cpp index 9559159d..c3413d5a 100644 --- a/deps/datReader/File.cpp +++ b/deps/datReader/File.cpp @@ -31,7 +31,7 @@ std::vector>& File::access_data_sections() return _data_sections; } -void File::exportToFile(const std::experimental::filesystem::path& i_path) const +void File::exportToFile(const std::filesystem::path& i_path) const { std::ofstream ofs( i_path.string(), std::ios_base::binary | std::ios_base::out ); for( auto& data_section : _data_sections ) diff --git a/deps/datReader/File.h b/deps/datReader/File.h index 1d09e78e..3ce77b4f 100644 --- a/deps/datReader/File.h +++ b/deps/datReader/File.h @@ -3,7 +3,7 @@ #include -#include +#include #include #include "bparse.h" @@ -43,7 +43,7 @@ namespace xiv const std::vector>& get_data_sections() const; std::vector>& access_data_sections(); - void exportToFile( const std::experimental::filesystem::path& i_path ) const; + void exportToFile( const std::filesystem::path& i_path ) const; protected: FileType _type; diff --git a/deps/datReader/GameData.cpp b/deps/datReader/GameData.cpp index 4b4a71e4..e3f36b6b 100644 --- a/deps/datReader/GameData.cpp +++ b/deps/datReader/GameData.cpp @@ -53,7 +53,7 @@ namespace xiv namespace dat { -GameData::GameData(const std::experimental::filesystem::path& path) try : +GameData::GameData(const std::filesystem::path& path) try : m_path(path) { int maxExLevel = 0; @@ -62,18 +62,18 @@ GameData::GameData(const std::experimental::filesystem::path& path) try : #ifdef _WIN32 static constexpr auto sep = "\\"; #else - static constexpr auto sep = std::experimental::filesystem::path::preferred_separator; + static constexpr auto sep = std::filesystem::path::preferred_separator; #endif // Determine which expansions are available - while( std::experimental::filesystem::exists( std::experimental::filesystem::path( m_path.string() + sep + "ex" + std::to_string( maxExLevel + 1 ) + sep + "ex" + std::to_string( maxExLevel + 1 ) + ".ver" ) ) ) + while( std::filesystem::exists( std::filesystem::path( m_path.string() + sep + "ex" + std::to_string( maxExLevel + 1 ) + sep + "ex" + std::to_string( maxExLevel + 1 ) + ".ver" ) ) ) { maxExLevel++; } // Iterate over the files in path - for( auto it = std::experimental::filesystem::directory_iterator( m_path.string() + "//ffxiv" ); it != std::experimental::filesystem::directory_iterator(); ++it ) + for( auto it = std::filesystem::directory_iterator( m_path.string() + "//ffxiv" ); it != std::filesystem::directory_iterator(); ++it ) { // Get the filename of the current element auto filename = it->path().filename().string(); @@ -99,14 +99,14 @@ GameData::GameData(const std::experimental::filesystem::path& path) try : { const std::string path = m_path.string() + sep + buildDatStr( "ex" + std::to_string( exNum ), cat_nb, exNum, 0, "win32", "index" ); - if( std::experimental::filesystem::exists( std::experimental::filesystem::path( path ) ) ) + if( std::filesystem::exists( std::filesystem::path( path ) ) ) { int chunkCount = 0; for(int chunkTest = 0; chunkTest < 256; chunkTest++ ) { - if( std::experimental::filesystem::exists( m_path.string() + sep + buildDatStr( "ex" + std::to_string( exNum ), cat_nb, exNum, chunkTest, "win32", "index" ) ) ) + if( std::filesystem::exists( m_path.string() + sep + buildDatStr( "ex" + std::to_string( exNum ), cat_nb, exNum, chunkTest, "win32", "index" ) ) ) { m_exCats[cat_nb].exNumToChunkMap[exNum].chunkToCatMap[chunkTest] = std::unique_ptr(); chunkCount++; diff --git a/deps/datReader/GameData.h b/deps/datReader/GameData.h index 2b64fafd..d44c9ac8 100644 --- a/deps/datReader/GameData.h +++ b/deps/datReader/GameData.h @@ -5,7 +5,7 @@ #include #include -#include +#include namespace xiv { @@ -21,7 +21,7 @@ class GameData { public: // This should be the path in which the .index/.datX files are located - GameData( const std::experimental::filesystem::path& path ); + GameData( const std::filesystem::path& path ); ~GameData(); static const std::string buildDatStr( const std::string folder, const int cat, const int exNum, const int chunk, const std::string platform, const std::string type ); @@ -61,7 +61,7 @@ protected: void createExCategory( uint32_t catNum ); // Path given to constructor, pointing to the folder with the .index/.datX files - const std::experimental::filesystem::path m_path; + const std::filesystem::path m_path; // Stored categories, indexed by their number, categories are instantiated and parsed individually when they are needed std::unordered_map> m_cats; diff --git a/deps/datReader/Index.cpp b/deps/datReader/Index.cpp index 92dfb5da..d1e11d89 100644 --- a/deps/datReader/Index.cpp +++ b/deps/datReader/Index.cpp @@ -56,7 +56,7 @@ namespace xiv namespace dat { -Index::Index(const std::experimental::filesystem::path& path) : +Index::Index(const std::filesystem::path& path) : SqPack( path ) { if( !m_handle ) diff --git a/deps/datReader/Index.h b/deps/datReader/Index.h index 0dc565b7..b7999ad5 100644 --- a/deps/datReader/Index.h +++ b/deps/datReader/Index.h @@ -5,7 +5,7 @@ #include -#include +#include namespace xiv { namespace dat { @@ -16,7 +16,7 @@ class Index : public SqPack { public: // Full path to the index file - Index( const std::experimental::filesystem::path& i_path ); + Index( const std::filesystem::path& i_path ); virtual ~Index(); // An entry in the hash table, representing a file in a given dat diff --git a/deps/datReader/SqPack.cpp b/deps/datReader/SqPack.cpp index ede929aa..ae2f0db0 100644 --- a/deps/datReader/SqPack.cpp +++ b/deps/datReader/SqPack.cpp @@ -51,7 +51,7 @@ namespace xiv namespace dat { - SqPack::SqPack( const std::experimental::filesystem::path& path ) : + SqPack::SqPack( const std::filesystem::path& path ) : // Open the file m_handle( path.string(), std::ios_base::in | std::ios_base::binary ) { diff --git a/deps/datReader/SqPack.h b/deps/datReader/SqPack.h index cc7feab3..5fcb1c36 100644 --- a/deps/datReader/SqPack.h +++ b/deps/datReader/SqPack.h @@ -3,7 +3,7 @@ #include -#include +#include #include "bparse.h" @@ -49,7 +49,7 @@ class SqPack public: // Full path to the sqpack file - SqPack( const std::experimental::filesystem::path& i_path ); + SqPack( const std::filesystem::path& i_path ); virtual ~SqPack(); protected: diff --git a/deps/watchdog/Watchdog.h b/deps/watchdog/Watchdog.h index d9f7aa25..e64a21f0 100644 --- a/deps/watchdog/Watchdog.h +++ b/deps/watchdog/Watchdog.h @@ -31,8 +31,8 @@ #include #include -#include -namespace ci { namespace fs = std::experimental::filesystem; } +#include +namespace ci { namespace fs = std::filesystem; } //! Exception for when Watchdog can't locate a file or parse the wildcard class WatchedFileSystemExc : public std::exception { @@ -319,7 +319,7 @@ protected: std::string mFilter; std::function mCallback; std::function&)> mListCallback; - std::map< std::string, std::experimental::filesystem::file_time_type > mModificationTimes; + std::map< std::string, std::filesystem::file_time_type > mModificationTimes; }; std::mutex mMutex; diff --git a/src/api/main.cpp b/src/api/main.cpp index 004233ba..78d02861 100644 --- a/src/api/main.cpp +++ b/src/api/main.cpp @@ -22,7 +22,7 @@ //Added for the default_resource example #include #include -#include +#include #include #include @@ -39,7 +39,7 @@ Sapphire::Db::DbWorkerPool< Sapphire::Db::ZoneDbConnection > g_charaDb; Sapphire::Data::ExdDataGenerated g_exdDataGen; Sapphire::Api::SapphireApi g_sapphireAPI; -namespace fs = std::experimental::filesystem; +namespace fs = std::filesystem; using namespace std; using namespace Sapphire; diff --git a/src/common/Config/ConfigMgr.cpp b/src/common/Config/ConfigMgr.cpp index 8b8823f2..e581a37c 100644 --- a/src/common/Config/ConfigMgr.cpp +++ b/src/common/Config/ConfigMgr.cpp @@ -1,9 +1,8 @@ #include "ConfigMgr.h" #include -#include -#include +#include -namespace fs = std::experimental::filesystem; +namespace fs = std::filesystem; using namespace Sapphire; using namespace Sapphire::Common; diff --git a/src/common/Logging/Logger.cpp b/src/common/Logging/Logger.cpp index 221f9291..4b37aba9 100644 --- a/src/common/Logging/Logger.cpp +++ b/src/common/Logging/Logger.cpp @@ -8,9 +8,9 @@ #include // #include -#include // or #include +#include // or #include -namespace fs = std::experimental::filesystem; +namespace fs = std::filesystem; void Sapphire::Logger::init( const std::string& logPath ) { diff --git a/src/dbm/DbManager.cpp b/src/dbm/DbManager.cpp index e39eedcd..4b7a7783 100644 --- a/src/dbm/DbManager.cpp +++ b/src/dbm/DbManager.cpp @@ -5,14 +5,14 @@ #include #include #include -#include +#include #include using namespace Sapphire; using namespace Sapphire::Common; -namespace fs = std::experimental::filesystem; +namespace fs = std::filesystem; DbManager::DbManager( const std::string& host, const std::string& database, const std::string& user, const std::string& pw, uint16_t port ) : m_host( host ), diff --git a/src/dbm/main.cpp b/src/dbm/main.cpp index 3eeebf2c..990f500d 100644 --- a/src/dbm/main.cpp +++ b/src/dbm/main.cpp @@ -3,14 +3,14 @@ #include #include #include -#include +#include #include #include #include Sapphire::Common::Util::CrashHandler crashHandler; -namespace filesys = std::experimental::filesystem; +namespace fs = std::filesystem; #include #include @@ -30,19 +30,19 @@ std::vector< std::string > getAllFilesInDir( const std::string& dirPath, try { // Check if given path exists and points to a directory - if( filesys::exists( dirPath ) && filesys::is_directory( dirPath ) ) + if( fs::exists( dirPath ) && fs::is_directory( dirPath ) ) { // Create a Recursive Directory Iterator object and points to the starting of directory - filesys::recursive_directory_iterator iter( dirPath ); + fs::recursive_directory_iterator iter( dirPath ); // Create a Recursive Directory Iterator object pointing to end. - filesys::recursive_directory_iterator end; + fs::recursive_directory_iterator end; // Iterate till end while( iter != end ) { // Check if current entry is a directory and if exists in skip list - if( filesys::is_directory( iter->path() ) && + if( fs::is_directory( iter->path() ) && ( std::find( dirSkipList.begin(), dirSkipList.end(), iter->path().filename() ) != dirSkipList.end() ) ) { // Skip the iteration of current directory pointed by iterator diff --git a/src/tools/action_parse/main.cpp b/src/tools/action_parse/main.cpp index aa40bdd1..8cbe3f6d 100644 --- a/src/tools/action_parse/main.cpp +++ b/src/tools/action_parse/main.cpp @@ -17,11 +17,11 @@ #include #include -#include +#include Sapphire::Data::ExdDataGenerated g_exdData; -namespace fs = std::experimental::filesystem; +namespace fs = std::filesystem; using namespace Sapphire; diff --git a/src/tools/event_object_parser/main.cpp b/src/tools/event_object_parser/main.cpp index a4d451a9..a9a66919 100644 --- a/src/tools/event_object_parser/main.cpp +++ b/src/tools/event_object_parser/main.cpp @@ -26,14 +26,14 @@ #include #include -#include +#include Sapphire::Common::Util::CrashHandler crashHandler; Sapphire::Data::ExdDataGenerated g_exdData; using namespace Sapphire; using namespace std::chrono_literals; -namespace fs = std::experimental::filesystem; +namespace fs = std::filesystem; // garbage to ignore models bool ignoreModels = false; diff --git a/src/tools/exd_struct_gen/main.cpp b/src/tools/exd_struct_gen/main.cpp index c418dd61..e0864520 100644 --- a/src/tools/exd_struct_gen/main.cpp +++ b/src/tools/exd_struct_gen/main.cpp @@ -11,7 +11,7 @@ #include #include #include -#include +#include #include @@ -22,7 +22,7 @@ using namespace Sapphire; -namespace fs = std::experimental::filesystem; +namespace fs = std::filesystem; Sapphire::Data::ExdDataGenerated g_exdData; bool skipUnmapped = true; diff --git a/src/tools/exd_struct_test/main.cpp b/src/tools/exd_struct_test/main.cpp index 88ad0d46..e2beba0e 100644 --- a/src/tools/exd_struct_test/main.cpp +++ b/src/tools/exd_struct_test/main.cpp @@ -22,7 +22,7 @@ #include -#include +#include Sapphire::Common::Util::CrashHandler crashHandler; @@ -31,7 +31,7 @@ xiv::dat::GameData* gameData = nullptr; using namespace Sapphire; -namespace fs = std::experimental::filesystem; +namespace fs = std::filesystem; //const std::string datLocation( "/opt/sapphire_3_15_0/bin/sqpack" ); const std::string datLocation( "/mnt/c/Program Files (x86)/Steam/steamapps/common/FINAL FANTASY XIV Online/game/sqpack" ); diff --git a/src/tools/mob_parse/main.cpp b/src/tools/mob_parse/main.cpp index e8598da0..7ed1966d 100644 --- a/src/tools/mob_parse/main.cpp +++ b/src/tools/mob_parse/main.cpp @@ -13,9 +13,9 @@ #include #include -#include +#include -namespace filesys = std::experimental::filesystem; +namespace fs = std::filesystem; #include #include @@ -138,19 +138,19 @@ std::vector< std::string > getAllFilesInDir( const std::string& dirPath, try { // Check if given path exists and points to a directory - if( filesys::exists( dirPath ) && filesys::is_directory( dirPath ) ) + if( fs::exists( dirPath ) && fs::is_directory( dirPath ) ) { // Create a Recursive Directory Iterator object and points to the starting of directory - filesys::recursive_directory_iterator iter( dirPath ); + fs::recursive_directory_iterator iter( dirPath ); // Create a Recursive Directory Iterator object pointing to end. - filesys::recursive_directory_iterator end; + fs::recursive_directory_iterator end; // Iterate till end while( iter != end ) { // Check if current entry is a directory and if exists in skip list - if( filesys::is_directory( iter->path() ) && + if( fs::is_directory( iter->path() ) && ( std::find( dirSkipList.begin(), dirSkipList.end(), iter->path().filename() ) != dirSkipList.end() ) ) { // Skip the iteration of current directory pointed by iterator @@ -212,17 +212,17 @@ int dumpSpawns() for( auto file : listOfFiles ) { - if( !filesys::is_directory( file ) ) + if( !fs::is_directory( file ) ) { auto pos = file.find_last_of( "\\" ); if( pos != std::string::npos ) { - auto pos = file.find_last_of( filesys::path::preferred_separator ); + auto pos = file.find_last_of( fs::path::preferred_separator ); if( pos != std::string::npos ) { auto str = file.substr( 0, pos ); - pos = str.find_last_of( filesys::path::preferred_separator ); + pos = str.find_last_of( fs::path::preferred_separator ); auto zone = str.substr( pos + 1 ); //Logger::info( zone ); @@ -399,17 +399,17 @@ int dumpTemplates() for( auto file : listOfFiles ) { - if( !filesys::is_directory( file ) ) + if( !fs::is_directory( file ) ) { auto pos = file.find_last_of( "\\" ); if( pos != std::string::npos ) { - auto pos = file.find_last_of( filesys::path::preferred_separator ); + auto pos = file.find_last_of( fs::path::preferred_separator ); if( pos != std::string::npos ) { auto str = file.substr( 0, pos ); - pos = str.find_last_of( filesys::path::preferred_separator ); + pos = str.find_last_of( fs::path::preferred_separator ); auto zone = str.substr( pos + 1 ); //Logger::info( zone ); @@ -434,7 +434,7 @@ int dumpTemplates() } - /* if( filesys::is_directory( file ) ) + /* if( fs::is_directory( file ) ) { auto pos = file.find_last_of( "\\" ); if( pos != std::string::npos ) diff --git a/src/tools/nav_export/nav/TiledNavmeshGenerator.cpp b/src/tools/nav_export/nav/TiledNavmeshGenerator.cpp index 0204910f..ad16bc21 100644 --- a/src/tools/nav_export/nav/TiledNavmeshGenerator.cpp +++ b/src/tools/nav_export/nav/TiledNavmeshGenerator.cpp @@ -1,11 +1,11 @@ #include "TiledNavmeshGenerator.h" -#include +#include #include #include -namespace fs = std::experimental::filesystem; +namespace fs = std::filesystem; inline unsigned int nextPow2( uint32_t v ) diff --git a/src/tools/nav_export/navmesh_exporter.h b/src/tools/nav_export/navmesh_exporter.h index 6035b552..642c404b 100644 --- a/src/tools/nav_export/navmesh_exporter.h +++ b/src/tools/nav_export/navmesh_exporter.h @@ -12,9 +12,9 @@ #include "obj_exporter.h" #include "nav/TiledNavmeshGenerator.h" -#include +#include -namespace fs = std::experimental::filesystem; +namespace fs = std::filesystem; class NavmeshExporter { @@ -23,7 +23,7 @@ public: { auto start = std::chrono::high_resolution_clock::now(); - static std::string currPath = std::experimental::filesystem::current_path().string(); + static std::string currPath = std::filesystem::current_path().string(); auto dir = fs::current_path().string() + "/pcb_export/" + zone.name + "/"; auto fileName = dir + zone.name; diff --git a/src/tools/nav_export/obj_exporter.h b/src/tools/nav_export/obj_exporter.h index b01ad970..fc7ddc99 100644 --- a/src/tools/nav_export/obj_exporter.h +++ b/src/tools/nav_export/obj_exporter.h @@ -3,7 +3,7 @@ #include #include -#include +#include #include #include @@ -16,7 +16,7 @@ class ObjExporter public: static std::string exportZone( const ExportedZone& zone ) { - static std::string currPath = std::experimental::filesystem::current_path().string(); + static std::string currPath = std::filesystem::current_path().string(); auto start = std::chrono::high_resolution_clock::now(); @@ -25,9 +25,9 @@ public: std::error_code e; - if( !std::experimental::filesystem::exists( dir, e ) ) + if( !std::filesystem::exists( dir, e ) ) { - if( !std::experimental::filesystem::create_directories( dir, e ) ) + if( !std::filesystem::create_directories( dir, e ) ) { printf( "Unable to create directory '%s'", ( dir ).c_str() ); return ""; @@ -59,7 +59,7 @@ public: static std::string exportGroup( const std::string& zoneName, const ExportedGroup& group ) { - static std::string currPath = std::experimental::filesystem::current_path().string(); + static std::string currPath = std::filesystem::current_path().string(); auto start = std::chrono::high_resolution_clock::now(); @@ -67,9 +67,9 @@ public: auto fileName = dir + group.name + ".obj"; std::error_code e; - if( !std::experimental::filesystem::exists( dir, e ) ) + if( !std::filesystem::exists( dir, e ) ) { - if( !std::experimental::filesystem::create_directories( dir, e ) ) + if( !std::filesystem::create_directories( dir, e ) ) { printf( "Unable to create directory '%s'", ( dir ).c_str() ); return ""; diff --git a/src/tools/pcb_reader/nav/TiledNavmeshGenerator.cpp b/src/tools/pcb_reader/nav/TiledNavmeshGenerator.cpp index c4423177..40b4ba62 100644 --- a/src/tools/pcb_reader/nav/TiledNavmeshGenerator.cpp +++ b/src/tools/pcb_reader/nav/TiledNavmeshGenerator.cpp @@ -1,11 +1,11 @@ #include "TiledNavmeshGenerator.h" -#include +#include #include #include -namespace fs = std::experimental::filesystem; +namespace fs = std::filesystem; inline unsigned int nextPow2( uint32_t v ) diff --git a/src/tools/pcb_reader/navmesh_exporter.h b/src/tools/pcb_reader/navmesh_exporter.h index 29e4cecd..ba890727 100644 --- a/src/tools/pcb_reader/navmesh_exporter.h +++ b/src/tools/pcb_reader/navmesh_exporter.h @@ -12,9 +12,9 @@ #include "obj_exporter.h" #include "nav/TiledNavmeshGenerator.h" -#include +#include -namespace fs = std::experimental::filesystem; +namespace fs = std::filesystem; class NavmeshExporter { @@ -23,7 +23,7 @@ public: { auto start = std::chrono::high_resolution_clock::now(); - static std::string currPath = std::experimental::filesystem::current_path().string(); + static std::string currPath = std::filesystem::current_path().string(); auto dir = fs::current_path().string() + "/pcb_export/" + zone.name + "/"; auto fileName = dir + zone.name; @@ -60,7 +60,7 @@ public: { auto start = std::chrono::high_resolution_clock::now(); - static std::string currPath = std::experimental::filesystem::current_path().string(); + static std::string currPath = std::filesystem::current_path().string(); auto dir = fs::current_path().string() + "/pcb_export/" + zoneName + "/"; diff --git a/src/tools/pcb_reader/obj_exporter.h b/src/tools/pcb_reader/obj_exporter.h index b01ad970..fc7ddc99 100644 --- a/src/tools/pcb_reader/obj_exporter.h +++ b/src/tools/pcb_reader/obj_exporter.h @@ -3,7 +3,7 @@ #include #include -#include +#include #include #include @@ -16,7 +16,7 @@ class ObjExporter public: static std::string exportZone( const ExportedZone& zone ) { - static std::string currPath = std::experimental::filesystem::current_path().string(); + static std::string currPath = std::filesystem::current_path().string(); auto start = std::chrono::high_resolution_clock::now(); @@ -25,9 +25,9 @@ public: std::error_code e; - if( !std::experimental::filesystem::exists( dir, e ) ) + if( !std::filesystem::exists( dir, e ) ) { - if( !std::experimental::filesystem::create_directories( dir, e ) ) + if( !std::filesystem::create_directories( dir, e ) ) { printf( "Unable to create directory '%s'", ( dir ).c_str() ); return ""; @@ -59,7 +59,7 @@ public: static std::string exportGroup( const std::string& zoneName, const ExportedGroup& group ) { - static std::string currPath = std::experimental::filesystem::current_path().string(); + static std::string currPath = std::filesystem::current_path().string(); auto start = std::chrono::high_resolution_clock::now(); @@ -67,9 +67,9 @@ public: auto fileName = dir + group.name + ".obj"; std::error_code e; - if( !std::experimental::filesystem::exists( dir, e ) ) + if( !std::filesystem::exists( dir, e ) ) { - if( !std::experimental::filesystem::create_directories( dir, e ) ) + if( !std::filesystem::create_directories( dir, e ) ) { printf( "Unable to create directory '%s'", ( dir ).c_str() ); return ""; diff --git a/src/tools/quest_parser/main.cpp b/src/tools/quest_parser/main.cpp index 0fa1a6f2..06d48373 100644 --- a/src/tools/quest_parser/main.cpp +++ b/src/tools/quest_parser/main.cpp @@ -6,7 +6,7 @@ #include #include -#include +#include #include #include @@ -21,7 +21,7 @@ #include Sapphire::Data::ExdDataGenerated g_exdDataGen; -namespace fs = std::experimental::filesystem; +namespace fs = std::filesystem; using namespace Sapphire; const std::string onTalkStr( diff --git a/src/tools/questbattle_bruteforce/main.cpp b/src/tools/questbattle_bruteforce/main.cpp index 37ecd51d..7aa34fbd 100644 --- a/src/tools/questbattle_bruteforce/main.cpp +++ b/src/tools/questbattle_bruteforce/main.cpp @@ -18,7 +18,7 @@ #include -#include +#include Sapphire::Common::Util::CrashHandler crashHandler; @@ -27,7 +27,7 @@ xiv::dat::GameData* gameData = nullptr; using namespace Sapphire; -namespace fs = std::experimental::filesystem; +namespace fs = std::filesystem; //const std::string datLocation( "/opt/sapphire_3_15_0/bin/sqpack" ); //const std::string datLocation( "/mnt/c/Program Files (x86)/Steam/steamapps/common/FINAL FANTASY XIV Online/game/sqpack" ); diff --git a/src/world/Navi/NaviProvider.cpp b/src/world/Navi/NaviProvider.cpp index 433a2408..fc05f9bf 100644 --- a/src/world/Navi/NaviProvider.cpp +++ b/src/world/Navi/NaviProvider.cpp @@ -16,7 +16,7 @@ #include #include #include -#include +#include Sapphire::World::Navi::NaviProvider::NaviProvider( const std::string& internalName, FrameworkPtr pFw ) : m_naviMesh( nullptr ), @@ -34,12 +34,12 @@ bool Sapphire::World::Navi::NaviProvider::init() { auto& cfg = m_pFw->get< Sapphire::World::ServerMgr >()->getConfig(); - auto meshesFolder = std::experimental::filesystem::path( cfg.navigation.meshPath ); - auto meshFolder = meshesFolder / std::experimental::filesystem::path( m_internalName ); + auto meshesFolder = std::filesystem::path( cfg.navigation.meshPath ); + auto meshFolder = meshesFolder / std::filesystem::path( m_internalName ); - if( std::experimental::filesystem::exists( meshFolder ) ) + if( std::filesystem::exists( meshFolder ) ) { - auto baseMesh = meshFolder / std::experimental::filesystem::path( m_internalName + ".nav" ); + auto baseMesh = meshFolder / std::filesystem::path( m_internalName + ".nav" ); if( !loadMesh( baseMesh.string() ) ) return false; diff --git a/src/world/Script/ScriptLoader.cpp b/src/world/Script/ScriptLoader.cpp index ab72f61f..ace591a8 100644 --- a/src/world/Script/ScriptLoader.cpp +++ b/src/world/Script/ScriptLoader.cpp @@ -5,11 +5,11 @@ #include #include "ServerMgr.h" -#include +#include #include "Framework.h" -namespace fs = std::experimental::filesystem; +namespace fs = std::filesystem; const std::string Sapphire::Scripting::ScriptLoader::getModuleExtension() { diff --git a/src/world/Script/ScriptMgr.cpp b/src/world/Script/ScriptMgr.cpp index 6557b326..fc0a7736 100644 --- a/src/world/Script/ScriptMgr.cpp +++ b/src/world/Script/ScriptMgr.cpp @@ -27,7 +27,7 @@ // enable the ambiguity fix for every platform to avoid #define nonsense #define WIN_AMBIGUITY_FIX -namespace fs = std::experimental::filesystem; +namespace fs = std::filesystem; Sapphire::Scripting::ScriptMgr::ScriptMgr( FrameworkPtr pFw ) : World::Manager::BaseManager( pFw ), diff --git a/src/world/Session.cpp b/src/world/Session.cpp index b1e2c615..273d20d0 100644 --- a/src/world/Session.cpp +++ b/src/world/Session.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include @@ -10,7 +10,7 @@ #include "Session.h" -namespace fs = std::experimental::filesystem; +namespace fs = std::filesystem; Sapphire::World::Session::Session( uint32_t sessionId, FrameworkPtr pFw ) : m_sessionId( sessionId ), diff --git a/src/world/Territory/Housing/HousingInteriorTerritory.h b/src/world/Territory/Housing/HousingInteriorTerritory.h index efc4860b..3ea97ae4 100644 --- a/src/world/Territory/Housing/HousingInteriorTerritory.h +++ b/src/world/Territory/Housing/HousingInteriorTerritory.h @@ -5,7 +5,7 @@ namespace Sapphire::World::Territory::Housing { - class HousingInteriorTerritory : public Territory + class HousingInteriorTerritory : public Sapphire::Territory { public: HousingInteriorTerritory( Common::LandIdent ident, uint16_t territoryTypeId, From 644125e831a38afd20e8e1048ab06532b0a91390 Mon Sep 17 00:00:00 2001 From: NotAdam Date: Mon, 14 Oct 2019 18:45:17 +1100 Subject: [PATCH 02/10] update travis config to use g++-8 --- .travis.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 375d4353..4c04e527 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,9 +14,10 @@ matrix: sources: - ubuntu-toolchain-r-test packages: - - g++-7 + - g++-8 env: - - MATRIX_EVAL="CC=gcc-7 && CXX=g++-7" + - MATRIX_EVAL="CC=gcc-8 && CXX=g++-8" + - CXX=g++-8 # Setup cache cache: From 913c2dbb84471aaac27c2df93f6e8b771916f684 Mon Sep 17 00:00:00 2001 From: NotAdam Date: Mon, 14 Oct 2019 18:50:55 +1100 Subject: [PATCH 03/10] set arch flag correctly --- .appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.appveyor.yml b/.appveyor.yml index 6efb5007..1413437f 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -20,7 +20,7 @@ before_build: - git submodule update --init - mkdir build - cd build - - cmake .. -G "Visual Studio 16 2019 Win64" + - cmake .. -G "Visual Studio 16 2019" -A Win64 - cmake --build . --target ALL_BUILD --config Release build_script: From 7ca3554730a106e72ae2371b7ee924f2b1bdb72e Mon Sep 17 00:00:00 2001 From: NotAdam Date: Mon, 14 Oct 2019 18:57:31 +1100 Subject: [PATCH 04/10] actually gets past cmake now --- .appveyor.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index 1413437f..ef08146f 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -20,8 +20,8 @@ before_build: - git submodule update --init - mkdir build - cd build - - cmake .. -G "Visual Studio 16 2019" -A Win64 - - cmake --build . --target ALL_BUILD --config Release + - cmake .. -G "Visual Studio 16 2019" -A x64 + - cmake --build . --target ALL_BUILD --config RelWithDebInfo build_script: - cd bin From e46096aad2f1d52b742b141f4c6bf3cf1243d288 Mon Sep 17 00:00:00 2001 From: NotAdam Date: Mon, 14 Oct 2019 19:12:17 +1100 Subject: [PATCH 05/10] should actually build now... hopefully... --- deps/mysqlConnector/Connection.cpp | 4 ++++ deps/mysqlConnector/Connection.h | 2 ++ src/api/PlayerMinimal.h | 5 +++-- src/common/Database/DbCommon.h | 2 ++ src/world/Linkshell/Linkshell.h | 2 ++ 5 files changed, 13 insertions(+), 2 deletions(-) diff --git a/deps/mysqlConnector/Connection.cpp b/deps/mysqlConnector/Connection.cpp index 9b317dc9..df6a28f0 100644 --- a/deps/mysqlConnector/Connection.cpp +++ b/deps/mysqlConnector/Connection.cpp @@ -4,6 +4,10 @@ #include "PreparedStatement.h" #include +#ifdef _MSC_VER + // fixes compile error when compiling with vs2019 + #include +#endif #include Mysql::Connection::Connection( std::shared_ptr< MySqlBase > pBase, diff --git a/deps/mysqlConnector/Connection.h b/deps/mysqlConnector/Connection.h index 1283ead5..43cc6e07 100644 --- a/deps/mysqlConnector/Connection.h +++ b/deps/mysqlConnector/Connection.h @@ -3,6 +3,8 @@ #include #include +#include + #include "MysqlCommon.h" typedef struct st_mysql MYSQL; diff --git a/src/api/PlayerMinimal.h b/src/api/PlayerMinimal.h index d51251c2..a5e41b7b 100644 --- a/src/api/PlayerMinimal.h +++ b/src/api/PlayerMinimal.h @@ -2,8 +2,9 @@ #define _PLAYERMINIMAL_H #include -#include -#include +#include +#include +#include namespace Sapphire::Api { diff --git a/src/common/Database/DbCommon.h b/src/common/Database/DbCommon.h index 89d537b6..d702ce72 100644 --- a/src/common/Database/DbCommon.h +++ b/src/common/Database/DbCommon.h @@ -1,6 +1,8 @@ #ifndef SAPPHIRE_DBCOMMON_H #define SAPPHIRE_DBCOMMON_H +#include + namespace Sapphire::Db { struct ConnectionInfo diff --git a/src/world/Linkshell/Linkshell.h b/src/world/Linkshell/Linkshell.h index 31d32717..b8b46079 100644 --- a/src/world/Linkshell/Linkshell.h +++ b/src/world/Linkshell/Linkshell.h @@ -3,6 +3,8 @@ #include #include +#include + namespace Sapphire { From 65678715f4a740ded78de73b8f59cbca730ad301 Mon Sep 17 00:00:00 2001 From: NotAdam Date: Sun, 26 Jan 2020 21:24:38 +1100 Subject: [PATCH 06/10] add actions submodule --- .gitmodules | 3 +++ CMakeLists.txt | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.gitmodules b/.gitmodules index a7b40f34..f8ad1744 100644 --- a/.gitmodules +++ b/.gitmodules @@ -7,3 +7,6 @@ [submodule "deps/recastnavigation"] path = deps/recastnavigation url = https://github.com/SapphireServer/recastnavigation +[submodule "deps/ffxiv-actions"] + path = deps/ffxiv-actions + url = https://github.com/SapphireServer/ffxiv-actions.git diff --git a/CMakeLists.txt b/CMakeLists.txt index f6a3419f..76160f3d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -13,7 +13,9 @@ add_custom_target( copy_runtime_files ALL COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/config ${CMAKE_BINARY_DIR}/bin/config COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/sql ${CMAKE_BINARY_DIR}/bin/sql COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/web ${CMAKE_BINARY_DIR}/bin/web - COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_SOURCE_DIR}/sql_import.sh ${CMAKE_BINARY_DIR}/bin/sql_import.sh ) + COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_SOURCE_DIR}/sql_import.sh ${CMAKE_BINARY_DIR}/bin/sql_import.sh + COMMAND ${CMAKE_COMMAND} -E remove_directory ${CMAKE_BINARY_DIR}/bin/data/actions + COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/deps/ffxiv-actions/actions ${CMAKE_BINARY_DIR}/bin/data/actions ) ###################################### # Dependencies and compiler settings # From a84de09bf12bcd14ae5e4ea8144e73c1386ada84 Mon Sep 17 00:00:00 2001 From: NotAdam Date: Sun, 2 Feb 2020 17:14:59 +1100 Subject: [PATCH 07/10] bit of cleanup and sqpack fix --- deps/datReader/SqPack.cpp | 122 +++++++++++++++++++------------------- 1 file changed, 62 insertions(+), 60 deletions(-) diff --git a/deps/datReader/SqPack.cpp b/deps/datReader/SqPack.cpp index ede929aa..bdcfe2fb 100644 --- a/deps/datReader/SqPack.cpp +++ b/deps/datReader/SqPack.cpp @@ -1,76 +1,78 @@ #include "SqPack.h" -namespace xiv { -namespace dat { - struct SqPackHeader - { - char magic[0x8]; - uint32_t zero; - uint32_t size; - uint32_t version; - uint32_t type; - }; +namespace xiv::dat { + enum PlatformId : + uint8_t + { + Win32, + PS3, + PS4 + }; - struct SqPackIndexHeader - { - uint32_t size; - uint32_t type; - }; -} -} -namespace xiv { -namespace utils { -namespace bparse { - template <> - inline void reorder(xiv::dat::SqPackHeader& i_struct) - { - for (int32_t i = 0; i < 0x8; ++i) - { - xiv::utils::bparse::reorder(i_struct.magic[i]); - } - xiv::utils::bparse::reorder(i_struct.zero); - xiv::utils::bparse::reorder(i_struct.size); - xiv::utils::bparse::reorder(i_struct.version); - xiv::utils::bparse::reorder(i_struct.type); - } + struct SqPackHeader + { + char magic[0x8]; + PlatformId platformId; + uint8_t padding0[3]; + uint32_t size; + uint32_t version; + uint32_t type; + }; - template <> - inline void reorder(xiv::dat::SqPackIndexHeader& i_struct) - { - xiv::utils::bparse::reorder(i_struct.size); - xiv::utils::bparse::reorder(i_struct.type); - } + struct SqPackIndexHeader + { + uint32_t size; + uint32_t type; + }; } + +namespace xiv::utils:: bparse +{ + template<> + inline void reorder< xiv::dat::SqPackHeader >( xiv::dat::SqPackHeader& i_struct ) + { + for( int32_t i = 0; i < 0x8; ++i ) + { + xiv::utils::bparse::reorder( i_struct.magic[ i ] ); + } + xiv::utils::bparse::reorder( i_struct.platformId ); + xiv::utils::bparse::reorder( i_struct.size ); + xiv::utils::bparse::reorder( i_struct.version ); + xiv::utils::bparse::reorder( i_struct.type ); + } + + template<> + inline void reorder< xiv::dat::SqPackIndexHeader >( xiv::dat::SqPackIndexHeader& i_struct ) + { + xiv::utils::bparse::reorder( i_struct.size ); + xiv::utils::bparse::reorder( i_struct.type ); + } } -}; using xiv::utils::bparse::extract; -namespace xiv -{ -namespace dat +namespace xiv::dat { - SqPack::SqPack( const std::experimental::filesystem::path& path ) : - // Open the file - m_handle( path.string(), std::ios_base::in | std::ios_base::binary ) - { - // Extract the header - extract( m_handle ); + // Open the file + SqPack::SqPack( const std::experimental::filesystem::path& path ) : + m_handle( path.string(), std::ios_base::in | std::ios_base::binary ) + { + // Extract the header + extract< SqPackHeader >( m_handle ); - // Skip until the IndexHeader the extract it - m_handle.seekg( 0x400 ); - extract( m_handle ); - } + // Skip until the IndexHeader the extract it + m_handle.seekg( 0x400 ); + extract< SqPackIndexHeader >( m_handle ); + } - SqPack::~SqPack() - { - } + SqPack::~SqPack() + { + } - void SqPack::isBlockValid( uint32_t i_offset, uint32_t i_size, const SqPackBlockHash& i_block_hash ) - { - // TODO - } + void SqPack::isBlockValid( uint32_t i_offset, uint32_t i_size, const SqPackBlockHash& i_block_hash ) + { + // TODO + } } -} From 81bbcbef2390e07a0b722215a8e345cf83b624bf Mon Sep 17 00:00:00 2001 From: collett Date: Sat, 8 Feb 2020 00:43:49 +0900 Subject: [PATCH 08/10] Fix #632. --- src/scripts/common/aethernet/Aetheryte.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/scripts/common/aethernet/Aetheryte.cpp b/src/scripts/common/aethernet/Aetheryte.cpp index cc5afb92..d7267d20 100644 --- a/src/scripts/common/aethernet/Aetheryte.cpp +++ b/src/scripts/common/aethernet/Aetheryte.cpp @@ -33,7 +33,7 @@ public: { player.playScene( eventId, 2, 0, [this]( Entity::Player& player, const Event::SceneResult& result ) { - if( result.param1 == 256 ) + if( result.param1 == 256 && result.param2 != 0 ) { player.teleport( result.param2, 2 ); } @@ -69,7 +69,7 @@ public: } else if( result.param1 == 512 ) // aethernet access { - if( result.param2 == 4 ) + if( result.param2 == 4 && result.param3 != 0 ) { player.teleport( result.param3, 2 ); } From 698db748f9a878cb4b8e40c7085209ccc40aa367 Mon Sep 17 00:00:00 2001 From: NotAdam Date: Sat, 8 Feb 2020 10:15:14 +1100 Subject: [PATCH 09/10] create data directory --- cmake/paths.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/cmake/paths.cmake b/cmake/paths.cmake index ab4ae84d..1df097aa 100644 --- a/cmake/paths.cmake +++ b/cmake/paths.cmake @@ -13,3 +13,4 @@ endif() # Create log folder file( MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/bin/log ) file( MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/bin/navi ) +file( MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/bin/data ) From 1170674f8c6cf980ef097acaf5511444cb82c06a Mon Sep 17 00:00:00 2001 From: NotAdam Date: Sat, 8 Feb 2020 10:22:03 +1100 Subject: [PATCH 10/10] fix faulty actions submodule --- deps/ffxiv-actions | 1 + 1 file changed, 1 insertion(+) create mode 160000 deps/ffxiv-actions diff --git a/deps/ffxiv-actions b/deps/ffxiv-actions new file mode 160000 index 00000000..dde9b5bb --- /dev/null +++ b/deps/ffxiv-actions @@ -0,0 +1 @@ +Subproject commit dde9b5bbfc7c0197de0b0b49b982a0ee9fe761ab