Sync with libloot v0.26.1

Aside from adding GameType::oblivionRemastered and its usage, this is almost entirely about moving C++ files and tests around.
This commit is contained in:
Oliver Hamlet
2025-05-02 17:56:49 +01:00
parent f1186e4c08
commit eabc7a5d85
52 changed files with 1100 additions and 184 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
#include "api/convert.h"
#include "api/exception.h"
#include "api/exception/exception.h"
namespace loot {
// To public types
+1 -1
View File
@@ -2,7 +2,7 @@
#include "api/database.h"
#include "api/convert.h"
#include "api/exception.h"
#include "api/exception/exception.h"
namespace loot {
Database::Database(::rust::Box<loot::rust::Database>&& database) :
@@ -1,4 +1,4 @@
#include "api/exception.h"
#include "api/exception/exception.h"
#include <charconv>
+5 -1
View File
@@ -2,7 +2,7 @@
#include "api/game.h"
#include "api/convert.h"
#include "api/exception.h"
#include "api/exception/exception.h"
namespace {
loot::GameType convert(loot::rust::GameType gameType) {
@@ -29,6 +29,8 @@ loot::GameType convert(loot::rust::GameType gameType) {
return loot::GameType::starfield;
case loot::rust::GameType::OpenMW:
return loot::GameType::openmw;
case loot::rust::GameType::OblivionRemastered:
return loot::GameType::oblivionRemastered;
default:
throw std::logic_error("Unsupported GameType value");
}
@@ -58,6 +60,8 @@ loot::rust::GameType convert(loot::GameType gameType) {
return loot::rust::GameType::Starfield;
case loot::GameType::openmw:
return loot::rust::GameType::OpenMW;
case loot::GameType::oblivionRemastered:
return loot::rust::GameType::OblivionRemastered;
default:
throw std::logic_error("Unsupported GameType value");
}
+1 -1
View File
@@ -22,7 +22,7 @@ public:
GameType GetType() const override;
std::vector<std::filesystem::path> GetAdditionalDataPaths() const;
std::vector<std::filesystem::path> GetAdditionalDataPaths() const override;
void SetAdditionalDataPaths(
const std::vector<std::filesystem::path>& additionalDataPaths) override;
+2 -4
View File
@@ -4,7 +4,7 @@
#include <typeinfo>
#include "api/convert.h"
#include "api/exception.h"
#include "api/exception/exception.h"
namespace loot {
Plugin::Plugin(::rust::Box<loot::rust::Plugin> plugin) :
@@ -101,9 +101,7 @@ bool Plugin::DoRecordsOverlap(const PluginInterface& plugin) const {
return plugin_->do_records_overlap(*otherPlugin.plugin_);
} catch (std::bad_cast&) {
throw std::invalid_argument(
"Tried to check if records overlapped with a different concrete type "
"implementing PluginInterface");
return false;
} catch (const ::rust::Error& e) {
std::rethrow_exception(mapError(e));
}
+2 -2
View File
@@ -13,12 +13,12 @@ BLOCK "040904b0"
BEGIN
VALUE "CompanyName", "LOOT"
VALUE "FileDescription", "Library providing LOOT's core functionality"
VALUE "FileVersion", "0.26.0"
VALUE "FileVersion", "0.26.1"
VALUE "InternalName", "loot"
VALUE "LegalCopyright", "Copyright (C) 2013-2022 Oliver Hamlet"
VALUE "OriginalFilename", "loot.dll"
VALUE "ProductName", "LOOT"
VALUE "ProductVersion", "0.26.0"
VALUE "ProductVersion", "0.26.1"
END
END
BLOCK "VarFileInfo"