diff options
Diffstat (limited to 'game.c')
-rw-r--r-- | game.c | 15 |
1 files changed, 11 insertions, 4 deletions
@@ -3,6 +3,7 @@ #include "game.h" #include "input.h" #include "platform.h" +#include "sound.h" #include "sprite.h" #include "standard.h" #include "systems.h" @@ -18,6 +19,8 @@ void gameplay_new(Game* game) { init_player(&world->player, world); init_waver(&world->waver); world->gmemory = gmemory_max; + + set_song(song_main); } void gameplay_next_wave(Game* game) { @@ -68,6 +71,8 @@ static void menu_init(Game* game) { font = get_default_font(); + set_song(song_menu); + init_menu(&game->menu, game); menu_add(&game->menu, "Play", menu_start, font); menu_add(&game->menu, "Credits", menu_credits, font); @@ -266,7 +271,6 @@ static void credits_init(Game* game) { } static void credits_update(Game* game) { - Colour colour; const BM_Font* font; font = get_default_font(); @@ -282,7 +286,7 @@ static void credits_update(Game* game) { rfont_text(font, 0, 10, "Design: quou"); rfont_text(font, 0, 20, "Sound: quou"); rfont_text(font, 0, 30, "Graphics: quou"); - rfont_text(font, 0, 40, "Music: drummyfish"); + rfont_text(font, 0, 20, "Music: tejeez"); rfont_text(font, 0, 50, "Source Code: git.quou.xyz"); } @@ -293,6 +297,8 @@ static void dead_init(Game* game) { const BM_Font* font; Menu* menu; + set_song(song_dead); + menu = &game->menu; font = get_default_font(); init_menu(menu, game); @@ -324,11 +330,12 @@ static void dead_update(Game* game) { "Out of Memory" ); } else if (world->oom == -1) { - rfont_text( + rfont_text_col( font, renderer_w / 2 - 35, game->menu.y - 15, - "You win" + "YOU WIN", + make_colour(0xc00000, 255) ); } else { rfont_text( |