refactor: header file for every module

This commit is contained in:
2026-09-19 13:11:53 +02:00
parent b26070a518
commit dda0d38e22
36 changed files with 968 additions and 272 deletions
+25
View File
@@ -0,0 +1,25 @@
#ifndef ENGINE_CONFIG_H
#define ENGINE_CONFIG_H
#include <stdbool.h>
#include <rini.h>
typedef struct {
char *path;
rini_data rini;
} Config;
void InitConfig(Config *config, const char *path);
int GetConfigInt(Config *config, const char *key);
int GetConfigIntOrDefault(Config *config, const char *key, int default_value);
const char *GetConfigString(Config *config, const char *key);
const char *GetConfigStringOrDefault(Config *config, const char *key, const char *default_value);
const char *GetConfigDescription(Config *config, const char *key);
int SetConfigInt(Config *config, const char *key, int value, const char *desc);
int SetConfigString(Config *config, const char *key, const char *text, const char *desc);
int SetConfigDescription(Config *config, const char *key, const char *desc);
int AddCommentLine(Config *config, const char *comment);
void SaveConfig(Config *config);
void CleanUpConfig(Config *config);
#endif