Olympe Engine 2.0
2D Game Engine with ECS Architecture
Loading...
Searching...
No Matches
InputConfigLoader.h
Go to the documentation of this file.
1/*
2Olympe Engine V2 - 2026
3Input Configuration Loader
4
5Loads input configuration from JSON files including:
6- Input profiles
7- Action maps
8- Device assignments
9- User overrides
10*/
11
12#pragma once
13
14#include "InputDevice.h"
15#include <string>
16#include "third_party/nlohmann/json.hpp"
17
19
21public:
22 InputConfigLoader() = default;
23 ~InputConfigLoader() = default;
24
25 // Singleton access
28 return instance;
29 }
30
31 // Load complete input configuration
32 bool LoadInputConfig(const std::string& path);
33
34 // Load olympe-config.json for engine settings
35 bool LoadEngineConfig(const std::string& path);
36
37 // Override specific profiles from user config
38 bool LoadProfileOverride(const std::string& path);
39
40 // Save current configuration
41 bool SaveInputConfig(const std::string& path);
42
43private:
44 // Parsing helpers
45 bool ParseProfiles(const json& j);
46 bool ParseActionMaps(const json& j);
47 bool ParseGlobalSettings(const json& j);
48 bool ParseDefaultAssignments(const json& j);
49
51 SDL_Scancode ParseKeyName(const std::string& keyName);
52
53 // Logging
54 int m_logLevel = 2; // 0=error, 1=warning, 2=info, 3=debug
55};
56
nlohmann::json json
ComponentTypeID GetComponentTypeID_Static()
Definition ECS_Entity.h:56
~InputConfigLoader()=default
SDL_Scancode ParseKeyName(const std::string &keyName)
static InputConfigLoader & Get()
bool SaveInputConfig(const std::string &path)
bool ParseDefaultAssignments(const json &j)
InputBinding ParseInputBinding(const json &j)
bool ParseGlobalSettings(const json &j)
bool ParseProfiles(const json &j)
bool LoadInputConfig(const std::string &path)
bool LoadProfileOverride(const std::string &path)
InputConfigLoader()=default
bool ParseActionMaps(const json &j)
bool LoadEngineConfig(const std::string &path)
nlohmann::json json