mirror of
https://github.com/libretro/parallel-gx1.git
synced 2026-11-10 03:11:35 -10:00
Every JSON reader (Triforce card decks, dynamic input textures, graphics mods and their per-game profiles) now pulls its file through rjson from a VFS filestream and fills its structures as it parses, with no document tree in between. JsonUtil and the vendored picojson go away, as does the graphics mod serialization nothing called. Move and scale actions take their X, Y and Z straight from the parsed feature instead of re-reading a kept JSON value. rjson.c and rjson.h are imported unchanged from libretro-common.
46 lines
1.1 KiB
C++
46 lines
1.1 KiB
C++
// Copyright 2022 Dolphin Emulator Project
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
#pragma once
|
|
|
|
#include <map>
|
|
#include <string>
|
|
#include <string_view>
|
|
#include <vector>
|
|
|
|
#include "Common/CommonTypes.h"
|
|
|
|
struct GraphicsModConfig;
|
|
|
|
class GraphicsModGroupConfig
|
|
{
|
|
public:
|
|
explicit GraphicsModGroupConfig(std::string game_id);
|
|
~GraphicsModGroupConfig();
|
|
|
|
GraphicsModGroupConfig(const GraphicsModGroupConfig&);
|
|
GraphicsModGroupConfig(GraphicsModGroupConfig&&) noexcept;
|
|
|
|
GraphicsModGroupConfig& operator=(const GraphicsModGroupConfig&);
|
|
GraphicsModGroupConfig& operator=(GraphicsModGroupConfig&&) noexcept;
|
|
|
|
void Load();
|
|
|
|
void SetChangeCount(u32 change_count);
|
|
u32 GetChangeCount() const;
|
|
|
|
const std::vector<GraphicsModConfig>& GetMods() const;
|
|
std::vector<GraphicsModConfig>& GetMods();
|
|
|
|
GraphicsModConfig* GetMod(std::string_view absolute_path) const;
|
|
|
|
const std::string& GetGameID() const;
|
|
|
|
private:
|
|
std::string GetPath() const;
|
|
std::string m_game_id;
|
|
std::vector<GraphicsModConfig> m_graphics_mods;
|
|
std::map<std::string, GraphicsModConfig*, std::less<>> m_path_to_graphics_mod;
|
|
u32 m_change_count = 0;
|
|
};
|