feat: read network config from JSON

This commit is contained in:
2025-12-28 16:44:54 +08:00
parent 2d43b73e57
commit 19698996cd
6 changed files with 46 additions and 8 deletions

View File

@@ -80,7 +80,14 @@ struct Viewport {
SDL_FRect dst{};
};
struct NetworkConfig {
int port = 12345;
int maxPlayers = 2;
std::string serverIP = "127.0.0.1";
};
struct Config {
WindowConfig window;
RenderConfig render;
NetworkConfig network;
};