diff options
| author | realtradam <[email protected]> | 2023-03-26 04:19:40 -0400 |
|---|---|---|
| committer | realtradam <[email protected]> | 2023-03-26 04:19:40 -0400 |
| commit | 6a0ef52763cee6e6d7c631516461e0600d9a2da1 (patch) | |
| tree | 551a58a654a08c37a44bba2d3616b214d045a02f /include | |
| parent | 4670ac42a773ea97157f71d78687f79d6ba3c1d9 (diff) | |
| download | RodeoKit-6a0ef52763cee6e6d7c631516461e0600d9a2da1.tar.gz RodeoKit-6a0ef52763cee6e6d7c631516461e0600d9a2da1.zip | |
hmm
Diffstat (limited to 'include')
| -rw-r--r-- | include/rodeo.h | 28 | ||||
| -rw-r--r-- | include/rodeo_types.h | 39 |
2 files changed, 53 insertions, 14 deletions
diff --git a/include/rodeo.h b/include/rodeo.h index b67970c..1adb258 100644 --- a/include/rodeo.h +++ b/include/rodeo.h @@ -3,7 +3,7 @@ // public #include "rodeo_types.h" -// system +// -- system -- #include <stdbool.h> #include <stdio.h> #include <stdint.h> @@ -38,8 +38,14 @@ 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); -int32_t -rodeo_random_simple_get(void); +void +rodeo_random_seed_set(uint64_t seed); + +double +rodeo_random_double_get(void); + +uint64_t +rodeo_random_uint64_get(void); /// --- Core --- @@ -60,14 +66,20 @@ mrodeo_window_do( \ void rodeo_window_init( - int screen_height, - int screen_width, - char* title + uint16_t screen_height, + uint16_t screen_width, + rodeo_string_t title ); void rodeo_window_deinit(void); +uint16_t +rodeo_screen_width_get(void); + +uint16_t +rodeo_screen_height_get(void); + #define \ mrodeo_frame_do( \ state \ @@ -108,8 +120,8 @@ rodeo_texture_2d_default_get(void); rodeo_texture_2d_t rodeo_texture_2d_create_from_RGBA8( - const uint32_t width, - const uint32_t height, + const uint16_t width, + const uint16_t height, const uint8_t memory[] ); diff --git a/include/rodeo_types.h b/include/rodeo_types.h index 18c3691..a75da40 100644 --- a/include/rodeo_types.h +++ b/include/rodeo_types.h @@ -8,7 +8,8 @@ typedef struct irodeo_texture_internal_t irodeo_texture_internal_t; typedef irodeo_texture_internal_t *rodeo_texture_internal_p; -typedef union +typedef +union { struct { float red; @@ -20,7 +21,8 @@ typedef union } rodeo_color_RGBAFloat_t; -typedef union +typedef +union { struct { @@ -35,7 +37,8 @@ typedef union rodeo_color_RGBA8_t; -typedef struct +typedef +struct { float x; float y; @@ -55,7 +58,8 @@ typedef void (*rodeo_mainLoop_function)(void); -typedef struct +typedef +struct { float x; float y; @@ -64,7 +68,8 @@ typedef struct } rodeo_rectangle_t; -typedef struct +typedef +struct { rodeo_texture_internal_p internal_texture; uint32_t width; @@ -95,7 +100,8 @@ typedef union { /// --- Log --- -typedef enum +typedef +enum { rodeo_logLevel_info, rodeo_logLevel_warning, @@ -107,4 +113,25 @@ typedef void (*rodeo_log_function)(rodeo_string_t text); +typedef +union +{ + struct { + float x; + float y; + }; + float array[2]; +} +rodeo_vector2_t; +typedef +union +{ + struct { + float x; + float y; + float z; + }; + float array[3]; +} +rodeo_vector3_t; |
