audio_set() -> audio_set_parameter(), with string based convention
This commit is contained in:
@ -15,13 +15,8 @@ TWN_API void audio_play(const char *path,
|
||||
float volume, /* default: 1.0f, range: 0.0f to 1.0f */
|
||||
float panning); /* default: 0.0f, range: -1.0 to 1.0f */
|
||||
|
||||
typedef enum {
|
||||
AUDIO_PARAM_REPEAT,
|
||||
AUDIO_PARAM_VOLUME,
|
||||
AUDIO_PARAM_PANNING,
|
||||
} AudioParam;
|
||||
|
||||
TWN_API void audio_set(const char *channel, AudioParam param, float value);
|
||||
/* possible parameter options: "volume", "panning", "repeat" */
|
||||
TWN_API void audio_set_parameter(const char *channel, const char *parameter, float value);
|
||||
|
||||
/* TODO */
|
||||
// TWN_API bool audio_ended(const char *channel);
|
||||
|
@ -37,12 +37,12 @@ TWN_API int draw_text_width(char const *string,
|
||||
int height_px, /* TODO: make optional */
|
||||
char const *font);
|
||||
|
||||
TWN_API void draw_9slice(char const *texture_path,
|
||||
int texture_w,
|
||||
int texture_h,
|
||||
int border_thickness,
|
||||
Rect rect,
|
||||
Color color); /* TODO: make optional */
|
||||
TWN_API void draw_nine_slice(char const *texture_path,
|
||||
int texture_w,
|
||||
int texture_h,
|
||||
int border_thickness,
|
||||
Rect rect,
|
||||
Color color); /* TODO: make optional */
|
||||
|
||||
/* pushes a textured 3d triangle onto the render queue */
|
||||
/* vertices are in absolute coordinates, relative to world origin */
|
||||
|
@ -1,7 +1,9 @@
|
||||
#ifndef TWN_ENGINE_API_H
|
||||
#define TWN_ENGINE_API_H
|
||||
|
||||
#if defined(__WIN32)
|
||||
#if defined(TWN_NOT_C)
|
||||
#define TWN_API
|
||||
#elif defined(__WIN32)
|
||||
#define TWN_API __declspec(dllexport)
|
||||
#else
|
||||
#define TWN_API __attribute__((visibility("default")))
|
||||
|
Reference in New Issue
Block a user