summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/main.c b/src/main.c
index 95f2628..006057e 100644
--- a/src/main.c
+++ b/src/main.c
@@ -11,7 +11,6 @@ int main([[maybe_unused]] int argc, [[maybe_unused]] char **argv) {
.height=cfg.display_height,
.scale=3,
.target_fps=cfg.fps,
- .mixer=0,
.basepath=argv[1]) == 0);
defer(TZR_Quit);
TZR_ToggleFullscreen();
@@ -72,6 +71,9 @@ static void _setup_input() {
}
static int _main_loop([[maybe_unused]] void *udata) {
+ //if (TZR_GetTick() == 0)
+ // TZR_PlayMusic("res/bgm.wav", -1);
+
g_update();
if (TZR_IsKeyPressed(SDL_SCANCODE_ESCAPE) ||
TZR_IsKeyPressed(SDL_SCANCODE_CAPSLOCK))
@@ -82,7 +84,12 @@ static int _main_loop([[maybe_unused]] void *udata) {
TZR_DrawClear();
vec2 v = v2(cfg.tile_width, 0);
- const f32 r = (float)(TZR_GetTick() % 768) / 256;
+ static f32 or = 0.01;
+ if ((TZR_GetTick() + 15) / 30 % 2 == 0)
+ or += 0.01;
+ else
+ or -= 0.01;
+ const auto r = sinf(or * 14) / 12;
TZR_BlendMode(SDL_BLENDMODE_MUL);
{