diff --git a/include/twn_config.h b/include/twn_config.h deleted file mode 100644 index 818a476..0000000 --- a/include/twn_config.h +++ /dev/null @@ -1,25 +0,0 @@ -#ifndef TWN_CONFIG_H -#define TWN_CONFIG_H - -/* TODO: consider if it's still necessary to keep these in one place */ - -#define PACKAGE_EXTENSION "btw" - -#define TICKS_PER_SECOND_DEFAULT 60 - -#define BASE_RENDER_WIDTH_DEFAULT 640 -#define BASE_RENDER_HEIGHT_DEFAULT 360 - -#define TEXTURE_ATLAS_SIZE_DEFAULT 2048 -#define TEXTURE_ATLAS_BIT_DEPTH 32 -#define TEXTURE_ATLAS_FORMAT SDL_PIXELFORMAT_RGBA32 - -#define KEYBIND_SLOTS_DEFAULT 3 - -#define AUDIO_FREQUENCY 48000 - -#define TEXT_FONT_TEXTURE_SIZE_DEFAULT 2048 -#define TEXT_FONT_OVERSAMPLING_DEFAULT 4 -#define TEXT_FONT_FILTERING_DEFAULT TEXTURE_FILTER_LINEAR - -#endif diff --git a/include/twn_input.h b/include/twn_input.h index 2c4ac6b..87b8952 100644 --- a/include/twn_input.h +++ b/include/twn_input.h @@ -1,7 +1,6 @@ #ifndef TWN_INPUT_H #define TWN_INPUT_H -#include "twn_config.h" #include "twn_types.h" #include "twn_engine_api.h" #include "twn_control.h" diff --git a/src/rendering/twn_gl_15_rendering.c b/src/rendering/twn_gl_15_rendering.c index 35fe2c0..5b8c2b1 100644 --- a/src/rendering/twn_gl_15_rendering.c +++ b/src/rendering/twn_gl_15_rendering.c @@ -1,7 +1,6 @@ #include "twn_draw_c.h" #include "twn_util.h" #include "twn_util_c.h" -#include "twn_config.h" #include "twn_engine_context_c.h" #include "twn_text_c.h" diff --git a/src/rendering/twn_text.c b/src/rendering/twn_text.c index 71d0676..2a13bb8 100644 --- a/src/rendering/twn_text.c +++ b/src/rendering/twn_text.c @@ -1,7 +1,6 @@ #include "twn_draw_c.h" #include "twn_draw.h" #include "twn_util.h" -#include "twn_config.h" #include "twn_engine_context_c.h" #include diff --git a/src/rendering/twn_text_c.h b/src/rendering/twn_text_c.h index 16e53c3..f73648e 100644 --- a/src/rendering/twn_text_c.h +++ b/src/rendering/twn_text_c.h @@ -12,6 +12,10 @@ #define ASCII_END 128 #define NUM_DISPLAY_ASCII ((ASCII_END - ASCII_START) + 1) +#define TEXT_FONT_TEXTURE_SIZE_DEFAULT 2048 +#define TEXT_FONT_OVERSAMPLING_DEFAULT 4 +#define TEXT_FONT_FILTERING_DEFAULT TEXTURE_FILTER_LINEAR + typedef struct FontData { stbtt_packedchar char_data[NUM_DISPLAY_ASCII]; diff --git a/src/twn_audio.c b/src/twn_audio.c index ffd08a9..c8d53c2 100644 --- a/src/twn_audio.c +++ b/src/twn_audio.c @@ -1,5 +1,4 @@ #include "twn_audio_c.h" -#include "twn_config.h" #include "twn_engine_context_c.h" #include "twn_util.h" diff --git a/src/twn_audio_c.h b/src/twn_audio_c.h index 1f3fb9b..cc3fa76 100644 --- a/src/twn_audio_c.h +++ b/src/twn_audio_c.h @@ -13,6 +13,9 @@ #include +#define AUDIO_FREQUENCY 48000 + + typedef enum AudioFileType { AUDIO_FILE_TYPE_OGG, AUDIO_FILE_TYPE_XM, diff --git a/src/twn_camera.c b/src/twn_camera.c index f1c2785..e658ec3 100644 --- a/src/twn_camera.c +++ b/src/twn_camera.c @@ -1,5 +1,4 @@ #include "twn_camera.h" -#include "twn_config.h" #include "twn_vec.h" #include "twn_engine_context_c.h" diff --git a/src/twn_input_c.h b/src/twn_input_c.h index a96c704..c30ec5f 100644 --- a/src/twn_input_c.h +++ b/src/twn_input_c.h @@ -7,6 +7,9 @@ #include +#define KEYBIND_SLOTS_DEFAULT 3 + + union ButtonCode { SDL_Scancode scancode; SDL_Keycode keycode; diff --git a/src/twn_loop.c b/src/twn_loop.c index 28b2820..7bbc9fc 100644 --- a/src/twn_loop.c +++ b/src/twn_loop.c @@ -22,6 +22,10 @@ #include +#define TICKS_PER_SECOND_DEFAULT 60 +#define PACKAGE_EXTENSION "btw" + + static int event_callback(void *userdata, SDL_Event *event) { (void)userdata; diff --git a/src/twn_textures.c b/src/twn_textures.c index d3fa9e7..77ad865 100644 --- a/src/twn_textures.c +++ b/src/twn_textures.c @@ -1,5 +1,4 @@ #include "twn_textures_c.h" -#include "twn_config.h" #include "twn_util.h" #include "twn_util_c.h" #include "twn_engine_context_c.h" diff --git a/src/twn_textures_c.h b/src/twn_textures_c.h index e5781df..c76a8c6 100644 --- a/src/twn_textures_c.h +++ b/src/twn_textures_c.h @@ -11,6 +11,11 @@ #include +#define TEXTURE_ATLAS_SIZE_DEFAULT 2048 +#define TEXTURE_ATLAS_BIT_DEPTH 32 +#define TEXTURE_ATLAS_FORMAT SDL_PIXELFORMAT_RGBA32 + + typedef struct Texture { Rect srcrect; /* position in atlas */ SDL_Surface *data; /* original image data */