From 7ee008e150bc5bcf76082d726f719ee0fdfda982 Mon Sep 17 00:00:00 2001 From: SulfurNitride Date: Wed, 11 Feb 2026 02:37:39 -0600 Subject: Fluorine Manager: full Linux port of Mod Organizer 2 Complete native Linux port with FUSE-based virtual filesystem, Proton/umu-run integration, and Flatpak packaging. Key features: - FUSE VFS replacing Windows USVFS (in-process + standalone helper for Flatpak) - Proton/GE-Proton/umu-run launcher with env var forwarding - Flatpak support (sandbox-aware VFS, NXM handler, umu-run) - Wine prefix management UI - Case-insensitive path resolution for Linux filesystems - QSettings-safe INI handling (avoids Bethesda INI corruption) - Portable instance support with auto-generated launcher scripts Co-Authored-By: Claude Opus 4.6 --- .../src/games/falloutnv/falloutnvsavegame.cpp | 77 ++++++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 libs/game_bethesda/src/games/falloutnv/falloutnvsavegame.cpp (limited to 'libs/game_bethesda/src/games/falloutnv/falloutnvsavegame.cpp') diff --git a/libs/game_bethesda/src/games/falloutnv/falloutnvsavegame.cpp b/libs/game_bethesda/src/games/falloutnv/falloutnvsavegame.cpp new file mode 100644 index 0000000..e6bbc2d --- /dev/null +++ b/libs/game_bethesda/src/games/falloutnv/falloutnvsavegame.cpp @@ -0,0 +1,77 @@ +#include "falloutnvsavegame.h" + +#include "gamefalloutnv.h" + +FalloutNVSaveGame::FalloutNVSaveGame(QString const& fileName, GameFalloutNV const* game) + : GamebryoSaveGame(fileName, game) +{ + FileWrapper file(getFilepath(), "FO3SAVEGAME"); + uint32_t width, height; + fetchInformationFields(file, width, height, m_SaveNumber, m_PCName, m_PCLevel, + m_PCLocation); +} + +void FalloutNVSaveGame::fetchInformationFields(FileWrapper& file, uint32_t& width, + uint32_t& height, + uint32_t& saveNumber, + QString& playerName, + unsigned short& playerLevel, + QString& playerLocation) const +{ + file.skip(); // Save header size + + file.skip(); // File version? + file.skip(); // Delimiter + + // A huge wodge of text with no length but a delimiter. Given the null bytes + // in it I presume it's fixed length (64 bytes + delim) but I have no + // definite spec + for (unsigned char ignore = 0; ignore != 0x7c;) { + file.read(ignore); // unknown + } + + file.setHasFieldMarkers(true); + file.setPluginString(GamebryoSaveGame::StringType::TYPE_BZSTRING); + + file.read(width); + file.read(height); + file.read(saveNumber); + file.read(playerName); + + QString whatthis; + file.read(whatthis); + + long level; + file.read(level); + playerLevel = level; + file.read(playerLocation); +} + +std::unique_ptr FalloutNVSaveGame::fetchDataFields() const +{ + FileWrapper file(getFilepath(), "FO3SAVEGAME"); + + std::unique_ptr fields = std::make_unique(); + + uint32_t width, height; + { + QString dummyName, dummyLocation; + unsigned short dummyLevel; + uint32_t dummySaveNumber; + + fetchInformationFields(file, width, height, dummySaveNumber, dummyName, dummyLevel, + dummyLocation); + } + + QString playtime; + file.read(playtime); + + fields->Screenshot = file.readImage(width, height, 256); + + file.skip(5); // unknown (1 byte), plugin size (4 bytes) + + file.setPluginString(GamebryoSaveGame::StringType::TYPE_BSTRING); + fields->Plugins = file.readPlugins(); + + return fields; +} -- cgit v1.3.1