summaryrefslogtreecommitdiff
path: root/examples/sound.c
diff options
context:
space:
mode:
authorKonAki <konaki@anokonaki.org>2026-10-10 13:13:44 +0800
committerKonAki <konaki@anokonaki.org>2026-10-10 13:13:44 +0800
commitabb3a17eb2bafe548830ce2ba5e53ac7b2d9c705 (patch)
tree8230752a130afbdab0b552b53b3bd069d716e7f4 /examples/sound.c
parentaab2471465341563543f269e8af18a65495c22d1 (diff)
add ui example, soften example colors
Diffstat (limited to 'examples/sound.c')
-rw-r--r--examples/sound.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/examples/sound.c b/examples/sound.c
index f61ec06..588d298 100644
--- a/examples/sound.c
+++ b/examples/sound.c
@@ -275,36 +275,36 @@ static void draw(kon_program_t *program, kon_framebuffer_t *game, void *user)
char text[96];
int i, ex, ez, bar;
- kon_clearFramebuffer(game, 0xFF14161C);
+ kon_clearFramebuffer(game, 0xFF1B1826);
/* the range of the hum, full volume inside the small ring and nothing outside the big one */
- kon_drawCircle(game, 320, 180, (int)(2.0f * SCALE), 0xFF2A2E3A);
- kon_drawCircle(game, 320, 180, (int)(22.0f * SCALE), 0xFF2A2E3A);
+ kon_drawCircle(game, 320, 180, (int)(2.0f * SCALE), 0xFF3A3558);
+ kon_drawCircle(game, 320, 180, (int)(22.0f * SCALE), 0xFF3A3558);
for (i = 0; i < 8; i++) {
if (state->pings[i][2] <= 0.0f) continue;
- kon_drawCircle(game, 320 + (int)((state->pings[i][0] - state->listenerX) * SCALE), 180 + (int)((state->pings[i][1] - state->listenerZ) * SCALE), (int)((1.0f - state->pings[i][2]) * 40.0f), 0xFF6A7FD0);
+ kon_drawCircle(game, 320 + (int)((state->pings[i][0] - state->listenerX) * SCALE), 180 + (int)((state->pings[i][1] - state->listenerZ) * SCALE), (int)((1.0f - state->pings[i][2]) * 40.0f), 0xFFF3DDA0);
}
ex = 320 + (int)(cosf(state->angle) * 10.0f * SCALE);
ez = 180 + (int)(sinf(state->angle) * 10.0f * SCALE);
- kon_fillCircle(game, ex, ez, 6, 0xFFE0903A);
- kon_fillCircle(game, 320, 180, 5, 0xFF5CD06A);
- kon_drawLine(game, 320, 180, 320, 164, 0xFF5CD06A);
+ kon_fillCircle(game, ex, ez, 6, 0xFFF2A7C3);
+ kon_fillCircle(game, 320, 180, 5, 0xFF8FD3C8);
+ kon_drawLine(game, 320, 180, 320, 164, 0xFF8FD3C8);
if (state->mic) {
bar = (int)(kon_micLevel(state->mic) * 4.0f * 200.0f);
if (bar > 200) bar = 200;
- kon_drawRectangle(game, 10, 340, 201, 9, 0xFF8890A0);
- kon_fillRectangle(game, 11, 341, bar, 7, kon_micTalking(state->mic) ? 0xFF5CD06A : 0xFF6A7FD0);
+ kon_drawRectangle(game, 10, 340, 201, 9, 0xFF9A93B3);
+ kon_fillRectangle(game, 11, 341, bar, 7, kon_micTalking(state->mic) ? 0xFF8FD3C8 : 0xFFF3DDA0);
}
if (program->font) {
snprintf(text, sizeof text, "playing %d peak %.2f", kon_audioPlayingCount(state->audio), kon_audioPeak(state->audio));
- kon_drawText(game, program->font, 10, 20, text, 0xFFE0E0E0);
- kon_drawText(game, program->font, 10, 36, "arrows move, click thump, space beep, 1 2 0 music, m r mic", 0xFF8890A0);
- if (state->mic) kon_drawText(game, program->font, 220, 348, kon_micTalking(state->mic) ? "talking" : "quiet", 0xFFE0E0E0);
- else kon_drawText(game, program->font, 10, 348, "no mic", 0xFF8890A0);
+ kon_drawText(game, program->font, 10, 20, text, 0xFFE4DDF0);
+ kon_drawText(game, program->font, 10, 36, "arrows move, click thump, space beep, 1 2 0 music, m r mic", 0xFF9A93B3);
+ if (state->mic) kon_drawText(game, program->font, 220, 348, kon_micTalking(state->mic) ? "talking" : "quiet", 0xFFE4DDF0);
+ else kon_drawText(game, program->font, 10, 348, "no mic", 0xFF9A93B3);
}
}