|
- #ifndef IZ_CONFIG_H
- #define IZ_CONFIG_H
-
- #include <stdio.h>
- #include <stdlib.h>
-
- #if _WIN64
- #include <windows.h>
- #include <fileapi.h>
- #endif
-
- #include "../adapter/framework/IZ_keyboard.h"
-
- #include "../core/IZ_constants.h"
- #include "../logging/IZ_log.h"
- #include "../input/IZ_action.h"
-
- #include "IZ_config_mapping.h"
- #include "IZ_config_pool.h"
- #include "IZ_config_window.h"
-
- /**
- * File path of the configuration file.
- */
- static const char* IZ_CONFIG_FILE_PATH = "config.ini";
-
- /**
- * Structure that defines the application's internal configuration.
- */
- typedef struct {
- /**
- * Window configuration.
- */
- IZ_ConfigWindow window;
- /**
- * Pool configuration.
- */
- IZ_ConfigPool pool;
- /**
- * Keyboard and joystick mappings for each controllable agent.
- */
- IZ_ConfigMapping mapping[IZ_MAX_PLAYERS];
- } IZ_Config;
-
- /**
- * Writes the configuration to a file.
- * @param config The pointer to the configuration data.
- * @param filename The filename of the destination file.
- * @return Result code of the operation.
- */
- unsigned int IZ_ConfigSave(IZ_Config* config, const char* filename);
-
- /**
- * Reads the configuration from a file.
- * @param config The pointer to the configuration data.
- * @param filename The filename of the destination file.
- * @return Error message, or NULL if there are no errors.
- */
- unsigned int IZ_ConfigLoad(IZ_Config* config, const char* filename);
-
- #endif
|