diff --git a/CMakeLists.txt b/CMakeLists.txt index fc318c9..5d28def 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -63,6 +63,7 @@ endif() # Specify directories # include_directories( + "${CMAKE_HOME_DIRECTORY}/subprojects" "${CMAKE_HOME_DIRECTORY}/subprojects/SDL/include" "${CMAKE_HOME_DIRECTORY}/dependencies/SDL2_image" "${CMAKE_HOME_DIRECTORY}/dependencies/SDL2_image/include" @@ -94,6 +95,7 @@ if (IZ_PLATFORM STREQUAL "WINDOWS") "${CMAKE_HOME_DIRECTORY}/subprojects/portmidi/build/Release" "${CMAKE_HOME_DIRECTORY}/dependencies/libwebsockets/build/lib/Release" "${CMAKE_HOME_DIRECTORY}/dependencies/openssl/${IZ_PROJECT_ARCH}/lib" + "${CMAKE_HOME_DIRECTORY}/subprojects/ini-config/build" ) if (NOT ${CMAKE_BUILD_TYPE} STREQUAL "Debug") set(IZ_EXECUTABLE_TYPE WIN32) @@ -142,6 +144,10 @@ add_executable( subprojects/ini-config/subprojects/minIni/dev/minIni.c subprojects/ini-config/ini-config.h subprojects/ini-config/ini-config.c + subprojects/ini-config/types/int.h + subprojects/ini-config/types/int.c + subprojects/ini-config/types/string.h + subprojects/ini-config/types/string.c subprojects/midi-utils/midi-utils.h subprojects/midi-utils/midi-utils.c ${IZ_GETOPT_DEPENDENCIES} @@ -346,6 +352,10 @@ add_executable( subprojects/ini-config/subprojects/minIni/dev/minIni.c subprojects/ini-config/ini-config.h subprojects/ini-config/ini-config.c + subprojects/ini-config/types/int.h + subprojects/ini-config/types/int.c + subprojects/ini-config/types/string.h + subprojects/ini-config/types/string.c src/packages/log/IZ_intercept.h src/packages/log/IZ_intercept.c src/packages/server/main.c @@ -386,6 +396,10 @@ add_executable( subprojects/ini-config/subprojects/minIni/dev/minIni.c subprojects/ini-config/ini-config.h subprojects/ini-config/ini-config.c + subprojects/ini-config/types/int.h + subprojects/ini-config/types/int.c + subprojects/ini-config/types/string.h + subprojects/ini-config/types/string.c src/packages/common/IZ_common.h src/packages/asset-inv/main.c ) diff --git a/assets_src/gfx/characters-izanagi.cdr b/assets_src/gfx/characters-izanagi.cdr index 89f7a09..480d9b5 100644 Binary files a/assets_src/gfx/characters-izanagi.cdr and b/assets_src/gfx/characters-izanagi.cdr differ diff --git a/src/packages/config/IZ_config_guid.h b/src/packages/config/IZ_config_guid.h index 4603a0e..e24e5ac 100644 --- a/src/packages/config/IZ_config_guid.h +++ b/src/packages/config/IZ_config_guid.h @@ -4,10 +4,7 @@ #include #include -void INI_ConfigLoadGuid(INI_ConfigItem*, const char*); -INI_ConfigSaveItemResult INI_ConfigSaveGuid(INI_ConfigItem*, const char*); -void INI_ConfigOverrideGuid(INI_ConfigItem*, uint8_t, const char*[]); - +INI_CONFIG_DECLARE_TYPE(Guid); #define INI_CONFIG_TYPE_GUID (INI_ConfigType) { \ .size = sizeof(SDL_GUID), \ .load = INI_ConfigLoadGuid, \ diff --git a/src/packages/game/IZ_app.c b/src/packages/game/IZ_app.c index 1673256..6186f76 100644 --- a/src/packages/game/IZ_app.c +++ b/src/packages/game/IZ_app.c @@ -38,7 +38,7 @@ IZ_AppInitializeResult IZ_AppInitialize(struct IZ_App* app, u8 argc, const char* if ((cmdline_buffer = INI_ConfigGetCommandlineOption(argc, argv, "-c"))) { IZ_memcpy(config_path, 128, cmdline_buffer, 128); } else { - INI_ConfigGetDefaultPath(config_path, 128); + IZ_ConfigGetDefaultPath(config_path, 128); } u32 flags = ( diff --git a/src/packages/game/IZ_app_config.c b/src/packages/game/IZ_app_config.c index e1c9033..9ec3ead 100644 --- a/src/packages/game/IZ_app_config.c +++ b/src/packages/game/IZ_app_config.c @@ -1,6 +1,6 @@ #include "IZ_app_config.h" -void INI_ConfigGetDefaultPath(char* config_path, size_t string_size) { +void IZ_ConfigGetDefaultPath(char* config_path, size_t string_size) { //#ifdef IZ_DEBUG const char* config_path_dir = SDL_GetBasePath(); //#else diff --git a/src/packages/game/IZ_app_config.h b/src/packages/game/IZ_app_config.h index 0890e38..bdd9bef 100644 --- a/src/packages/game/IZ_app_config.h +++ b/src/packages/game/IZ_app_config.h @@ -6,4 +6,6 @@ #include "IZ_subsystem.h" #include "../stdinc/IZ_string.h" +void IZ_ConfigGetDefaultPath(char*, size_t); + #endif diff --git a/src/packages/game/input/IZ_joystick.h b/src/packages/game/input/IZ_joystick.h index 4490552..e159ca7 100644 --- a/src/packages/game/input/IZ_joystick.h +++ b/src/packages/game/input/IZ_joystick.h @@ -5,6 +5,7 @@ #include #include #include +#include #include "../../config/IZ_config_guid.h" #include "../../common/IZ_common.h" #include "../../stdinc/IZ_string.h" diff --git a/src/packages/game/input/IZ_keyboard.h b/src/packages/game/input/IZ_keyboard.h index e76c302..718f37a 100644 --- a/src/packages/game/input/IZ_keyboard.h +++ b/src/packages/game/input/IZ_keyboard.h @@ -4,6 +4,7 @@ #include #include #include +#include #include "../../stdinc/IZ_string.h" #include "../../stdinc/IZ_stdlib.h" #include "IZ_action.h" diff --git a/src/packages/game/input/IZ_midi.h b/src/packages/game/input/IZ_midi.h index c0cd955..536058f 100644 --- a/src/packages/game/input/IZ_midi.h +++ b/src/packages/game/input/IZ_midi.h @@ -6,6 +6,7 @@ #include #include +#include #include "../../stdinc/IZ_string.h" #include "../../stdinc/IZ_stdlib.h" #include "IZ_action.h" diff --git a/src/packages/net/IZ_net_client.c b/src/packages/net/IZ_net_client.c index e7d44a8..c371a08 100644 --- a/src/packages/net/IZ_net_client.c +++ b/src/packages/net/IZ_net_client.c @@ -52,7 +52,7 @@ void IZ_NetClientInitializeConfigItems(INI_ConfigItem config_items[]) { main_section_name = malloc(sizeof(char) * 64); sprintf(main_section_name, "Network.%d", player_index); config_items[3 + player_index] = (INI_ConfigItem) { - INI_CONFIG_TYPE_FNS_STRING(32), + INI_CONFIG_TYPE_STRING(32), main_section_name, "Username", NULL, diff --git a/src/packages/net/IZ_net_client.h b/src/packages/net/IZ_net_client.h index 01d36b1..03df062 100644 --- a/src/packages/net/IZ_net_client.h +++ b/src/packages/net/IZ_net_client.h @@ -3,6 +3,8 @@ #include #include +#include +#include #include "../common/IZ_common.h" #include "../game/input/IZ_action.h" diff --git a/src/packages/net/IZ_net_server.c b/src/packages/net/IZ_net_server.c index 0a91c71..1aedc96 100644 --- a/src/packages/net/IZ_net_server.c +++ b/src/packages/net/IZ_net_server.c @@ -6,7 +6,7 @@ bool IZ_NetServerIsValidPort(u16 port) { static INI_ConfigItem net_server_config_items[] = { { - INI_CONFIG_TYPE_FNS_STRING(64), + INI_CONFIG_TYPE_STRING(64), "Network", "Name", "-n", @@ -16,7 +16,7 @@ static INI_ConfigItem net_server_config_items[] = { NULL, }, { - INI_CONFIG_TYPE_FNS_STRING(128), + INI_CONFIG_TYPE_STRING(128), "Network", "Motd", "-m", diff --git a/src/packages/net/IZ_net_server.h b/src/packages/net/IZ_net_server.h index 6410861..dc38809 100644 --- a/src/packages/net/IZ_net_server.h +++ b/src/packages/net/IZ_net_server.h @@ -2,6 +2,8 @@ #define IZ_NET_SERVER_H #include +#include +#include #include "../common/IZ_common.h" #include "../stdinc/IZ_string.h" #include "core/IZ_websocket.h" diff --git a/src/packages/server/IZ_app.c b/src/packages/server/IZ_app.c index 1cd7a34..097028d 100644 --- a/src/packages/server/IZ_app.c +++ b/src/packages/server/IZ_app.c @@ -23,7 +23,7 @@ IZ_ProcedureResult IZ_AppInitialize(IZ_App *app, u8 argc, const char **argv) { if ((cmdline_buffer = INI_ConfigGetCommandlineOption(argc, argv, "-c"))) { IZ_memcpy(config_path, 128, cmdline_buffer, 128); } else { - INI_ConfigGetDefaultPath(config_path, 128); + IZ_ConfigGetDefaultPath(config_path, 128); } if (IZ_NetServerInitialize(&app->net_state, app, config_path, argc, argv)) { diff --git a/src/packages/server/IZ_app_config.c b/src/packages/server/IZ_app_config.c index 9fe81c3..3be5587 100644 --- a/src/packages/server/IZ_app_config.c +++ b/src/packages/server/IZ_app_config.c @@ -1,6 +1,6 @@ #include "IZ_app_config.h" -void INI_ConfigGetDefaultPath(char* config_path, size_t string_size) { +void IZ_ConfigGetDefaultPath(char* config_path, size_t string_size) { //#ifdef IZ_DEBUG const char* config_path_dir = SDL_GetBasePath(); //#else diff --git a/src/packages/server/IZ_app_config.h b/src/packages/server/IZ_app_config.h index 675e1cc..b567873 100644 --- a/src/packages/server/IZ_app_config.h +++ b/src/packages/server/IZ_app_config.h @@ -6,4 +6,6 @@ #include "../stdinc/IZ_string.h" #include "IZ_subsystem.h" +void IZ_ConfigGetDefaultPath(char*, size_t); + #endif diff --git a/src/packages/server/db/IZ_repo.c b/src/packages/server/db/IZ_repo.c index 2d656fb..63e1226 100644 --- a/src/packages/server/db/IZ_repo.c +++ b/src/packages/server/db/IZ_repo.c @@ -2,7 +2,7 @@ static INI_ConfigItem repo_config_items[] = { { - INI_CONFIG_TYPE_FNS_STRING(64), + INI_CONFIG_TYPE_STRING(64), "Database", "Path", "-d", diff --git a/src/packages/server/db/IZ_repo.h b/src/packages/server/db/IZ_repo.h index a36b80a..76ac3b4 100644 --- a/src/packages/server/db/IZ_repo.h +++ b/src/packages/server/db/IZ_repo.h @@ -3,6 +3,7 @@ #include #include +#include #include #include #include "../../common/IZ_common.h" diff --git a/subprojects/ini-config b/subprojects/ini-config index 482c2fa..b5007a8 160000 --- a/subprojects/ini-config +++ b/subprojects/ini-config @@ -1 +1 @@ -Subproject commit 482c2faf41a8dd2c2a65acf0c41649d310dba3c8 +Subproject commit b5007a86c4c9db88427362a9cda53ce8315cbfbd diff --git a/subprojects/midi-utils b/subprojects/midi-utils index d0f60f9..002f128 160000 --- a/subprojects/midi-utils +++ b/subprojects/midi-utils @@ -1 +1 @@ -Subproject commit d0f60f929957eaa817270784f036ae72d9dbdebe +Subproject commit 002f128a0532826811f6c30029e5567e38acf3c3