summaryrefslogtreecommitdiffhomepage
path: root/include/rodeo.h
blob: 795d6f72a2fbde7ce0e2cbfc605ea1bdded56d32 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49

// -- internal --
// public
#include "rodeo_types.h"
#include "rodeo/input.h"
#include "rodeo/log.h"
#include "rodeo/common.h"
#include "rodeo/audio.h"
#include "rodeo/collision.h"
#include "rodeo/gfx.h"
#include "rodeo/window.h"
#include "rodeo/math.h"

// -- system --
#include <stdint.h>

/// --- Math ---

rodeo_color_RGBA8_t
rodeo_color_RGBAFloat_to_RGBA8(const rodeo_color_RGBAFloat_t color);

rodeo_color_RGBAFloat_t
rodeo_color_RGBA8_to_RGBAFloat(const rodeo_color_RGBA8_t color);

/// --- Core ---

void
rodeo_mainLoop_run(
	rodeo_mainLoop_function main_loop_func
);

void
rodeo_debug_text_draw(uint16_t x, uint16_t y, const char *format, ...);

// intialize all subsystems
void
rodeo_init(float width, float height, cstr window_name, uint32_t audio_channels);

// deintialize all subsystems
void
rodeo_deinit(void);

// macro to intialize/deinitialize all subsystems
#define \
mrodeo_do(width, height, window_name, audio_channels) \
	mrodeo_defer_do( \
		rodeo_init(width, height, window_name, audio_channels), \
		rodeo_deinit() \
	)