summaryrefslogtreecommitdiff
path: root/examples/sinewave.c
diff options
context:
space:
mode:
authorMitya Selivanov <automainint@guattari.tech>2025-02-14 17:30:28 +0100
committerMitya Selivanov <automainint@guattari.tech>2025-02-14 17:30:28 +0100
commit7d92468a5d298ec6dd6455482ff0521efecf9541 (patch)
treea060fa81ed5b9187f8b98178582f7abbca69e29f /examples/sinewave.c
parent9eb170e70a7be9ed418152ad1b679473fbe0c35a (diff)
downloadreduced_system_layer-7d92468a5d298ec6dd6455482ff0521efecf9541.zip
Adjust wasm code and examples for new features
Diffstat (limited to 'examples/sinewave.c')
-rw-r--r--examples/sinewave.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/examples/sinewave.c b/examples/sinewave.c
index 0c33803..d5072da 100644
--- a/examples/sinewave.c
+++ b/examples/sinewave.c
@@ -9,11 +9,11 @@ b8 ui_button(f64 x, f64 y, f64 width, f64 height) {
b8 is_pressed = has_cursor && g_platform.key_down[BUTTON_LEFT];
if (is_pressed)
- fill_rectangle(RGB(1.f, 1.f, 1.f), x, y, width, height);
+ fill_rectangle((vec4_f32) { 1.f, 1.f, 1.f, 1.f }, (Box) { x, y, width, height });
else if (has_cursor)
- fill_rectangle(RGB(.8f, .8f, 0.f), x, y, width, height);
+ fill_rectangle((vec4_f32) { .8f, .8f, 0.f, 1.f }, (Box) { x, y, width, height });
else
- fill_rectangle(RGB(.8f, .8f, .2f), x, y, width, height);
+ fill_rectangle((vec4_f32) { .8f, .8f, .2f, 1.f }, (Box) { x, y, width, height });
return has_cursor && g_platform.key_pressed[BUTTON_LEFT];
}
@@ -22,7 +22,7 @@ void update_and_render_frame(void) {
i32 num_events = handle_main_window_events();
if (num_events > 0) {
- fill_rectangle(RGB(.1f, .1f, .1f), 0, 0, g_platform.frame_width, g_platform.frame_height);
+ fill_rectangle((vec4_f32) { .1f, .1f, .1f, 1.f }, (Box) { 0, 0, g_platform.frame_width, g_platform.frame_height });
if (ui_button(100, 100, 200, 200))
queue_primary_sound(0, PRIMARY_SOUND_SAMPLE_RATE, frames);