Rename files in order to prepare for extraction for publishing subsystems independently.feature/data-structs
@@ -60,8 +60,8 @@ add_executable( | |||||
src/packages/game/input/IZ_joystick.h | src/packages/game/input/IZ_joystick.h | ||||
src/packages/game/input/IZ_keyboard.c | src/packages/game/input/IZ_keyboard.c | ||||
src/packages/game/input/IZ_keyboard.h | src/packages/game/input/IZ_keyboard.h | ||||
src/packages/game/IZ_config.c | |||||
src/packages/game/IZ_config.h | |||||
src/packages/game/config/IZ_config.c | |||||
src/packages/game/config/IZ_config.h | |||||
src/packages/game/geometry/IZ_point2d.c | src/packages/game/geometry/IZ_point2d.c | ||||
src/packages/game/geometry/IZ_point2d.h | src/packages/game/geometry/IZ_point2d.h | ||||
src/packages/game/geometry/IZ_vector2d.c | src/packages/game/geometry/IZ_vector2d.c | ||||
@@ -90,7 +90,7 @@ add_executable( | |||||
src/packages/game/util/IZ_midi.h | src/packages/game/util/IZ_midi.h | ||||
src/packages/game/net/core/IZ_websocket.h | src/packages/game/net/core/IZ_websocket.h | ||||
src/packages/game/net/core/IZ_websocket.c | src/packages/game/net/core/IZ_websocket.c | ||||
src/packages/game/net/IZ_net.c src/packages/game/net/IZ_net.h src/packages/game/net/IZ_app.c src/packages/game/net/IZ_app.h src/packages/game/output/video/IZ_app.c src/packages/game/output/video/IZ_app.h src/packages/game/IZ_subsystem.h src/packages/game/input/IZ_app.c src/packages/game/input/IZ_app.h) | |||||
src/packages/game/net/IZ_net.c src/packages/game/net/IZ_net.h src/packages/game/IZ_app_net.c src/packages/game/IZ_app_net.h src/packages/game/IZ_app_video.c src/packages/game/IZ_app_video.h src/packages/game/IZ_subsystem.h src/packages/game/IZ_app_input.c src/packages/game/IZ_app_input.h src/packages/game/IZ_app_config.c src/packages/game/IZ_app_config.h) | |||||
target_link_libraries( | target_link_libraries( | ||||
game | game | ||||
@@ -130,7 +130,7 @@ add_executable( | |||||
__mocks__/SDL_stdinc.mock.h | __mocks__/SDL_stdinc.mock.h | ||||
__mocks__/portmidi.mock.h | __mocks__/portmidi.mock.h | ||||
src/packages/game/IZ_config.h | |||||
src/packages/game/config/IZ_config.h | |||||
src/packages/game/input/IZ_keyboard.h | src/packages/game/input/IZ_keyboard.h | ||||
src/packages/game/input/IZ_keyboard.c | src/packages/game/input/IZ_keyboard.c | ||||
@@ -157,7 +157,7 @@ add_executable( | |||||
__mocks__/SDL_stdinc.mock.h | __mocks__/SDL_stdinc.mock.h | ||||
__mocks__/SDL_render.mock.h | __mocks__/SDL_render.mock.h | ||||
src/packages/game/IZ_config.h | |||||
src/packages/game/config/IZ_config.h | |||||
src/packages/game/output/video/IZ_video.h | src/packages/game/output/video/IZ_video.h | ||||
src/packages/game/output/video/IZ_video.c | src/packages/game/output/video/IZ_video.c | ||||
@@ -3,10 +3,11 @@ | |||||
#include <SDL.h> | #include <SDL.h> | ||||
#include <libwebsockets.h> | #include <libwebsockets.h> | ||||
#include "IZ_app_config.h" | |||||
#include "memory/IZ_pool.h" | #include "memory/IZ_pool.h" | ||||
#include "input/IZ_app.h" | |||||
#include "net/IZ_app.h" | |||||
#include "output/video/IZ_app.h" | |||||
#include "IZ_app_input.h" | |||||
#include "IZ_app_net.h" | |||||
#include "IZ_app_video.h" | |||||
typedef enum { | typedef enum { | ||||
IZ_APP_RUN_RESULT_OK, | IZ_APP_RUN_RESULT_OK, | ||||
@@ -0,0 +1,12 @@ | |||||
#include "IZ_app_config.h" | |||||
void IZ_ConfigGetDefaultPath(const char* config_path, size_t string_size) { | |||||
#ifdef IZ_DEBUG | |||||
const char* config_path_dir = SDL_GetBasePath(); | |||||
#else | |||||
const char* config_path_dir = SDL_GetPrefPath("Modal Studios", IZ_APP_NAME); | |||||
#endif | |||||
memcpy_s(config_path, string_size, config_path_dir, 128); | |||||
strcat_s(config_path, string_size, "config-game.ini"); | |||||
} |
@@ -0,0 +1,8 @@ | |||||
#ifndef IZ_APP_CONFIG_H | |||||
#define IZ_APP_CONFIG_H | |||||
#include "SDL_filesystem.h" | |||||
#include "IZ_subsystem.h" | |||||
#include "config/IZ_config.h" | |||||
#endif |
@@ -1,4 +1,4 @@ | |||||
#include "IZ_app.h" | |||||
#include "IZ_app_input.h" | |||||
IZ_ProcedureResult IZ_AppHandleSDLEvents(struct IZ_App* app) { | IZ_ProcedureResult IZ_AppHandleSDLEvents(struct IZ_App* app) { | ||||
SDL_Event e; | SDL_Event e; |
@@ -0,0 +1,8 @@ | |||||
#ifndef IZ_APP_INPUT_H | |||||
#define IZ_APP_INPUT_H | |||||
#include "IZ_subsystem.h" | |||||
IZ_ProcedureResult IZ_AppHandleInputEvents(struct IZ_App*); | |||||
#endif |
@@ -1,4 +1,4 @@ | |||||
#include "IZ_app.h" | |||||
#include "IZ_app_net.h" | |||||
void IZ_AppHandleNetworkingInboundBinaryEvents(struct IZ_App* app, void* binary_raw, size_t len) { | void IZ_AppHandleNetworkingInboundBinaryEvents(struct IZ_App* app, void* binary_raw, size_t len) { | ||||
u8* binary = binary_raw; | u8* binary = binary_raw; |
@@ -1,8 +1,8 @@ | |||||
#ifndef IZ_NET_APP_H | |||||
#define IZ_NET_APP_H | |||||
#ifndef IZ_APP_NET_H | |||||
#define IZ_APP_NET_H | |||||
#include "IZ_net.h" | |||||
#include "../IZ_subsystem.h" | |||||
#include "net/IZ_net.h" | |||||
#include "IZ_subsystem.h" | |||||
typedef enum { | typedef enum { | ||||
IZ_MESSAGE_KIND_ACTION_SYNC = 0, | IZ_MESSAGE_KIND_ACTION_SYNC = 0, |
@@ -1,4 +1,4 @@ | |||||
#include "IZ_app.h" | |||||
#include "IZ_app_video.h" | |||||
void IZ_VideoUpdateForDebugTicks(IZ_VideoState* video_state, uint64_t ticks) { | void IZ_VideoUpdateForDebugTicks(IZ_VideoState* video_state, uint64_t ticks) { | ||||
SDL_SetRenderDrawColor(video_state->renderer, 0x00, 0xff, 0xff, 0xff); | SDL_SetRenderDrawColor(video_state->renderer, 0x00, 0xff, 0xff, 0xff); |
@@ -0,0 +1,9 @@ | |||||
#ifndef IZ_APP_VIDEO_H | |||||
#define IZ_APP_VIDEO_H | |||||
#include "output/video/IZ_video.h" | |||||
#include "IZ_subsystem.h" | |||||
void IZ_VideoUpdate(IZ_VideoState*); | |||||
#endif |
@@ -1,16 +1,5 @@ | |||||
#include "IZ_config.h" | #include "IZ_config.h" | ||||
void IZ_ConfigGetDefaultPath(const char* config_path, size_t string_size) { | |||||
#ifdef IZ_DEBUG | |||||
const char* config_path_dir = SDL_GetBasePath(); | |||||
#else | |||||
const char* config_path_dir = SDL_GetPrefPath("Modal Studios", IZ_APP_NAME); | |||||
#endif | |||||
memcpy_s(config_path, string_size, config_path_dir, 128); | |||||
strcat_s(config_path, string_size, "config-game.ini"); | |||||
} | |||||
const char* IZ_ConfigGetCommandlineOption(u8 argc, const char* argv[], const char* val) { | const char* IZ_ConfigGetCommandlineOption(u8 argc, const char* argv[], const char* val) { | ||||
size_t n = strlen(val); | size_t n = strlen(val); | ||||
int c = argc; | int c = argc; |
@@ -1,11 +1,10 @@ | |||||
#ifndef IZ_CONFIG_H | #ifndef IZ_CONFIG_H | ||||
#define IZ_CONFIG_H | #define IZ_CONFIG_H | ||||
#include <SDL_filesystem.h> | |||||
#include <string.h> | #include <string.h> | ||||
#include <minIni.h> | |||||
#include <stdlib.h> | #include <stdlib.h> | ||||
#include "IZ_common.h" | |||||
#include <minIni.h> | |||||
#include "../IZ_common.h" | |||||
typedef enum { | typedef enum { | ||||
IZ_CONFIG_TYPE_VOID, | IZ_CONFIG_TYPE_VOID, |
@@ -1,8 +0,0 @@ | |||||
#ifndef IZ_INPUT_APP_H | |||||
#define IZ_INPUT_APP_H | |||||
#include "../IZ_subsystem.h" | |||||
IZ_ProcedureResult IZ_AppHandleInputEvents(struct IZ_App*); | |||||
#endif |
@@ -4,7 +4,7 @@ | |||||
#include <minIni.h> | #include <minIni.h> | ||||
#include <SDL_thread.h> | #include <SDL_thread.h> | ||||
#include "../IZ_common.h" | #include "../IZ_common.h" | ||||
#include "../IZ_config.h" | |||||
#include "../config/IZ_config.h" | |||||
#include "../input/IZ_action.h" | #include "../input/IZ_action.h" | ||||
#include "core/IZ_websocket.h" | #include "core/IZ_websocket.h" | ||||
#include "svc/IZ_wsclient.h" | #include "svc/IZ_wsclient.h" | ||||
@@ -1,9 +0,0 @@ | |||||
#ifndef IZ_VIDEO_APP_H | |||||
#define IZ_VIDEO_APP_H | |||||
#include "IZ_video.h" | |||||
#include "../../IZ_subsystem.h" | |||||
void IZ_VideoUpdate(IZ_VideoState*); | |||||
#endif |
@@ -8,7 +8,7 @@ | |||||
#include "../../input/IZ_input.h" | #include "../../input/IZ_input.h" | ||||
#include "../../net/IZ_net.h" | #include "../../net/IZ_net.h" | ||||
#include "../../IZ_common.h" | #include "../../IZ_common.h" | ||||
#include "../../IZ_config.h" | |||||
#include "../../config/IZ_config.h" | |||||
#define MAX_ACTIVE_SPRITES 32 | #define MAX_ACTIVE_SPRITES 32 | ||||
@@ -8,7 +8,6 @@ | |||||
#define IZ_DEFAULT_MOTD "" | #define IZ_DEFAULT_MOTD "" | ||||
typedef struct { | typedef struct { | ||||
u16 port; | u16 port; | ||||
char name[64]; | char name[64]; | ||||