2019-08-17 14:40:58 -05:00
|
|
|
// Copyright 2019 Dolphin Emulator Project
|
2021-07-05 03:22:19 +02:00
|
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
2019-08-17 14:40:58 -05:00
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2025-01-25 21:49:32 -06:00
|
|
|
#include <map>
|
2019-08-17 14:40:58 -05:00
|
|
|
#include <string>
|
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
#include "Common/CommonTypes.h"
|
2021-02-14 21:20:47 -06:00
|
|
|
#include "InputCommon/DynamicInputTextures/DITData.h"
|
2025-01-25 21:49:32 -06:00
|
|
|
#include "InputCommon/ImageOperations.h"
|
2019-08-17 14:40:58 -05:00
|
|
|
|
2023-04-13 09:38:09 -04:00
|
|
|
namespace Common
|
|
|
|
{
|
|
|
|
class IniFile;
|
|
|
|
}
|
|
|
|
|
2021-02-14 20:47:00 -06:00
|
|
|
namespace InputCommon::DynamicInputTextures
|
2019-08-17 14:40:58 -05:00
|
|
|
{
|
2025-01-25 21:49:32 -06:00
|
|
|
// Output folder name to image name to image data
|
|
|
|
using OutputDetails = std::map<std::string, std::map<std::string, ImagePixelData>>;
|
2021-02-14 20:47:00 -06:00
|
|
|
class Configuration
|
2019-08-17 14:40:58 -05:00
|
|
|
{
|
|
|
|
public:
|
2023-06-17 19:38:15 -05:00
|
|
|
explicit Configuration(const std::string& json_path);
|
2021-02-14 20:47:00 -06:00
|
|
|
~Configuration();
|
2025-01-25 21:49:32 -06:00
|
|
|
void GenerateTextures(const Common::IniFile& file,
|
|
|
|
const std::vector<std::string>& controller_names,
|
|
|
|
OutputDetails* output) const;
|
2019-08-17 14:40:58 -05:00
|
|
|
|
|
|
|
private:
|
2025-01-25 21:49:32 -06:00
|
|
|
void GenerateTexture(const Common::IniFile& file,
|
|
|
|
const std::vector<std::string>& controller_names, const Data& texture_data,
|
|
|
|
OutputDetails* output) const;
|
2019-08-17 14:40:58 -05:00
|
|
|
|
2021-02-14 21:20:47 -06:00
|
|
|
std::vector<Data> m_dynamic_input_textures;
|
2019-08-17 14:40:58 -05:00
|
|
|
std::string m_base_path;
|
|
|
|
bool m_valid = true;
|
|
|
|
};
|
2021-02-14 20:47:00 -06:00
|
|
|
} // namespace InputCommon::DynamicInputTextures
|