move and combine option macro headers from public interface
This commit is contained in:
parent
d90bf4cbe2
commit
6bd3afe9b2
@ -2,7 +2,6 @@
|
||||
#define TWN_AUDIO_H
|
||||
|
||||
#include "twn_engine_api.h"
|
||||
#include "twn_option.h"
|
||||
|
||||
#include <stdbool.h>
|
||||
|
||||
@ -23,6 +22,8 @@ TWN_API void audio_parameter(const char *channel, const char *parameter, float v
|
||||
|
||||
#ifndef TWN_NOT_C
|
||||
|
||||
#include "src/twn_option_c.h"
|
||||
|
||||
typedef struct PlayAudioArgs {
|
||||
char *path;
|
||||
|
||||
|
@ -1,8 +0,0 @@
|
||||
#ifndef TWN_CONCATENATE_H
|
||||
#define TWN_CONCATENATE_H
|
||||
|
||||
#define m_concatenate(p_a, p_b) m_concatenate_(p_a, p_b)
|
||||
#define m_concatenate_(p_a, p_b) m_concatenate__(p_a, p_b)
|
||||
#define m_concatenate__(p_a, p_b) p_a##p_b
|
||||
|
||||
#endif
|
@ -2,7 +2,6 @@
|
||||
#define TWN_DRAW_H
|
||||
|
||||
#include "twn_types.h"
|
||||
#include "twn_option.h"
|
||||
#include "twn_engine_api.h"
|
||||
|
||||
#include <stdbool.h>
|
||||
@ -118,6 +117,8 @@ TWN_API void draw_model(const char *model,
|
||||
|
||||
#ifndef TWN_NOT_C
|
||||
|
||||
#include "src/twn_option_c.h"
|
||||
|
||||
typedef struct DrawSpriteArgs {
|
||||
char const *texture;
|
||||
Rect rect;
|
||||
|
@ -1,9 +0,0 @@
|
||||
#ifndef TWN_VARARGCOUNT_H
|
||||
#define TWN_VARARGCOUNT_H
|
||||
|
||||
#define m_narg(...) m_narg_(__VA_ARGS__, m_rseq_n_())
|
||||
#define m_narg_(...) m_arg_n_(__VA_ARGS__)
|
||||
#define m_arg_n_(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, N, ...) N
|
||||
#define m_rseq_n_() 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0
|
||||
|
||||
#endif
|
@ -6,7 +6,7 @@
|
||||
#include "twn_textures_c.h"
|
||||
#include "twn_types_c.h"
|
||||
#include "twn_text_c.h"
|
||||
#include "twn_option.h"
|
||||
#include "twn_option_c.h"
|
||||
#include "twn_deferred_commands.h"
|
||||
|
||||
#include <SDL2/SDL.h>
|
||||
|
@ -4,7 +4,7 @@
|
||||
#include "twn_util.h"
|
||||
#include "twn_util_c.h"
|
||||
#include "twn_textures_c.h"
|
||||
#include "twn_option.h"
|
||||
#include "twn_option_c.h"
|
||||
|
||||
#include <stb_ds.h>
|
||||
|
||||
|
@ -1,11 +1,17 @@
|
||||
#ifndef TWN_OPTION_H
|
||||
#define TWN_OPTION_H
|
||||
|
||||
#include "twn_concatenate.h"
|
||||
#include "twn_varargcount.h"
|
||||
|
||||
#include <stdbool.h>
|
||||
|
||||
#define m_narg(...) m_narg_(__VA_ARGS__, m_rseq_n_())
|
||||
#define m_narg_(...) m_arg_n_(__VA_ARGS__)
|
||||
#define m_arg_n_(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, N, ...) N
|
||||
#define m_rseq_n_() 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0
|
||||
|
||||
#define m_concatenate(p_a, p_b) m_concatenate_(p_a, p_b)
|
||||
#define m_concatenate_(p_a, p_b) m_concatenate__(p_a, p_b)
|
||||
#define m_concatenate__(p_a, p_b) p_a##p_b
|
||||
|
||||
/* usage example:
|
||||
*
|
||||
* struct result {
|
Loading…
Reference in New Issue
Block a user