diff options
| author | realtradam <[email protected]> | 2023-06-16 01:18:13 -0400 |
|---|---|---|
| committer | realtradam <[email protected]> | 2023-06-16 01:18:13 -0400 |
| commit | a47cc44ef7191d03f8ca1b8d4e6b9dd34fba1807 (patch) | |
| tree | f7e358545f5043df20695d0cf51dcf8caa10cb12 /src/rodeo.c | |
| parent | 425516a9c53183179c43517f1b6501a790378a05 (diff) | |
| download | RodeoKit-a47cc44ef7191d03f8ca1b8d4e6b9dd34fba1807.tar.gz RodeoKit-a47cc44ef7191d03f8ca1b8d4e6b9dd34fba1807.zip | |
matrix math wrapper as well as various refactors for consistant and cleaner code
Diffstat (limited to 'src/rodeo.c')
| -rw-r--r-- | src/rodeo.c | 47 |
1 files changed, 20 insertions, 27 deletions
diff --git a/src/rodeo.c b/src/rodeo.c index 4699f86..4131bc5 100644 --- a/src/rodeo.c +++ b/src/rodeo.c @@ -3,31 +3,36 @@ // public #include "rodeo.h" #include "rodeo_types.h" -// private -#include "rodeo_internal.h" -#include "rodeo_internal_types.h" // -- external -- #if __EMSCRIPTEN__ #include <emscripten/emscripten.h> #endif -#include "SDL.h" -#include "SDL_image.h" -#include "SDL_mixer.h" -#include "SDL_syswm.h" -#include "SDL.h" #include "bgfx/c99/bgfx.h" -/*#define CGLM_FORCE_LEFT_HANDED*/ -#define CGLM_FORCE_DEPTH_ZERO_TO_ONE -/*#define CGLM_CLIPSPACE_INCLUDE_ALL*/ -#include "cglm/cglm.h" -#include "stc/crandom.h" // -- system -- #include <time.h> #include <inttypes.h> -static irodeo_state_t state = {0}; +// intialize all subsystems +void +rodeo_init(float width, float height, cstr window_name, uint32_t audio_channels) +{ + rodeo_window_init((uint32_t)width, (uint32_t)height, window_name); + rodeo_math_rng_init(); + rodeo_audio_init(audio_channels); + rodeo_gfx_init(width, height); +} + +// deintialize all subsystems +void +rodeo_deinit(void) +{ + rodeo_window_deinit(); + rodeo_math_rng_deinit(); + rodeo_audio_deinit(); + rodeo_gfx_deinit(); +} void rodeo_mainLoop_run( @@ -45,7 +50,7 @@ rodeo_mainLoop_run( } void -rodeo_debug_text_draw(u_int16_t x, u_int16_t y, const char *format, ...) +rodeo_debug_text_draw(uint16_t x, uint16_t y, const char *format, ...) { mrodeo_vargs_do(format) { @@ -53,15 +58,3 @@ rodeo_debug_text_draw(u_int16_t x, u_int16_t y, const char *format, ...) } } -void -irodeo_random_seed_set(stc64_t seed) -{ - state.random_seed = seed; -} - -stc64_t* -irodeo_random_seed_get(void) -{ - return &state.random_seed; -} - |
