#include "include/bgt_compat.nvgt" #include "include/sound_pool.nvgt" sound_pool p(30); #include "src/constants.nvgt" #include "src/speech_history.nvgt" #include "src/text_reader.nvgt" #include "src/quests/bat_invasion_game.nvgt" #include "src/quests/catch_the_boomerang_game.nvgt" #include "src/quests/enchanted_melody_game.nvgt" #include "src/quests/escape_from_hel_game.nvgt" #include "src/quests/skeletal_bard_game.nvgt" void quest_menu_background_tick() { // No world state to tick in the minigame test menu. } void quest_boomerang_hit_sound() { p.play_stationary("sounds/player_male_damage.ogg", false); } void run_minigame_menu() { speak_with_history("Minigames menu.", true); int selection = 0; string[] options = {"Bat Invasion", "Catch the Boomerang", "Enchanted Melody", "Escape from Hel", "Skeletal Bard", "Exit"}; speak_with_history(options[selection], true); while (true) { wait(5); if (key_pressed(KEY_ESCAPE)) { exit(); } if (key_pressed(KEY_DOWN)) { selection++; if (selection >= options.length()) selection = 0; speak_with_history(options[selection], true); } if (key_pressed(KEY_UP)) { selection--; if (selection < 0) selection = options.length() - 1; speak_with_history(options[selection], true); } if (key_pressed(KEY_RETURN)) { if (selection == 0) run_bat_invasion(); else if (selection == 1) run_catch_the_boomerang(); else if (selection == 2) run_enchanted_melody(); else if (selection == 3) run_escape_from_hel(); else if (selection == 4) run_skeletal_bard(); else exit(); show_window("Minigames"); speak_with_history("Minigames menu.", true); speak_with_history(options[selection], true); } } } void main() { p.volume_step = AUDIO_VOLUME_STEP / float(AUDIO_TILE_SCALE); p.pan_step = AUDIO_PAN_STEP; show_window("Minigames"); run_minigame_menu(); }