From 4058975ce9713ac8c30ac03d2fac2870e423aa05 Mon Sep 17 00:00:00 2001 From: Misa Date: Sat, 3 Jun 2023 15:29:02 -0700 Subject: [PATCH] Use enums for sound effects This adds an anonymous enum for sound effects and replaces all calls to music.playef that use integer literals. This is not a named enum (that can be used for strict typechecking) because sound effect IDs are essentially part of the API of the game - many custom levels use these numbers. This is just to make the source code more readable without needing a comment to denote what number is what sound. --- desktop_version/src/Editor.cpp | 38 +-- desktop_version/src/Entity.cpp | 26 +- desktop_version/src/Game.cpp | 114 ++++----- desktop_version/src/Input.cpp | 436 ++++++++++++++++---------------- desktop_version/src/KeyPoll.cpp | 2 +- desktop_version/src/Logic.cpp | 32 +-- desktop_version/src/Music.h | 32 +++ desktop_version/src/Script.cpp | 22 +- 8 files changed, 367 insertions(+), 335 deletions(-) diff --git a/desktop_version/src/Editor.cpp b/desktop_version/src/Editor.cpp index e6617d65..aadd5030 100644 --- a/desktop_version/src/Editor.cpp +++ b/desktop_version/src/Editor.cpp @@ -2402,20 +2402,20 @@ static void editormenuactionpress(void) map.nexttowercolour(); break; } - music.playef(11); + music.playef(Sound_VIRIDIAN); break; case Menu::ed_settings: switch (game.currentmenuoption) { case 0: //Change level description stuff - music.playef(11); + music.playef(Sound_VIRIDIAN); game.createmenu(Menu::ed_desc); map.nexttowercolour(); break; case 1: //Enter script editormode - music.playef(11); + music.playef(Sound_VIRIDIAN); ed.state = EditorState_SCRIPTS; ed.substate = EditorSubState_MAIN; @@ -2431,13 +2431,13 @@ static void editormenuactionpress(void) ed.lines_visible = 200 / font::height(PR_FONT_LEVEL); break; case 2: - music.playef(11); + music.playef(Sound_VIRIDIAN); game.createmenu(Menu::ed_music); map.nexttowercolour(); if(cl.levmusic>0) music.play(cl.levmusic); break; case 3: - music.playef(11); + music.playef(Sound_VIRIDIAN); game.ghostsenabled = !game.ghostsenabled; break; case 4: @@ -2460,7 +2460,7 @@ static void editormenuactionpress(void) break; case 6: /* Game options */ - music.playef(11); + music.playef(Sound_VIRIDIAN); game.gamestate = TITLEMODE; game.ingame_titlemode = true; game.ingame_editormode = true; @@ -2469,7 +2469,7 @@ static void editormenuactionpress(void) DEFER_CALLBACK(nextbgcolor); break; default: - music.playef(11); + music.playef(Sound_VIRIDIAN); game.createmenu(Menu::ed_quit); map.nexttowercolour(); break; @@ -2501,10 +2501,10 @@ static void editormenuactionpress(void) music.haltdasmusik(); } - music.playef(11); + music.playef(Sound_VIRIDIAN); break; case 2: - music.playef(11); + music.playef(Sound_VIRIDIAN); music.fadeout(); game.returnmenu(); map.nexttowercolour(); @@ -2527,14 +2527,14 @@ static void editormenuactionpress(void) break; case 1: //Quit without saving - music.playef(11); + music.playef(Sound_VIRIDIAN); music.fadeout(); graphics.fademode = FADE_START_FADEOUT; graphics.backgrounddrawn = false; break; case 2: //Go back to editor - music.playef(11); + music.playef(Sound_VIRIDIAN); game.returnmenu(); map.nexttowercolour(); break; @@ -2553,7 +2553,7 @@ static void editormenuactionpress(void) loc::new_level_font = cl.level_font_name; } font::set_level_font(cl.level_font_name.c_str()); - music.playef(11); + music.playef(Sound_VIRIDIAN); game.returnmenu(); map.nexttowercolour(); game.savestatsandsettings_menu(); @@ -2931,7 +2931,7 @@ void editorinput(void) if (escape_pressed) { // We're just in draw mode, so go to the settings menu - music.playef(11); + music.playef(Sound_VIRIDIAN); ed.state = EditorState_MENU; ed.substate = EditorSubState_MAIN; game.createmenu(Menu::ed_settings); @@ -3238,7 +3238,7 @@ void editorinput(void) if (escape_pressed) { bool esc_from_font = false; - music.playef(11); + music.playef(Sound_VIRIDIAN); if (game.currentmenuname == Menu::ed_settings) { @@ -3288,7 +3288,7 @@ void editorinput(void) key.disabletextentry(); ed.current_text_mode = TEXT_NONE; - music.playef(11); + music.playef(Sound_VIRIDIAN); } if (enter_pressed) @@ -3309,7 +3309,7 @@ void editorinput(void) { if (escape_pressed) { - music.playef(11); + music.playef(Sound_VIRIDIAN); ed.state = EditorState_MENU; ed.substate = EditorSubState_MAIN; } @@ -3348,7 +3348,7 @@ void editorinput(void) if (key.keymap[SDLK_BACKSPACE] && !ed.backspace_held && !script.customscripts.empty()) { ed.backspace_held = true; - music.playef(2); + music.playef(Sound_CRY); ed.remove_script(script.customscripts[(script.customscripts.size() - 1) - ed.selected_script].name); } @@ -3380,7 +3380,7 @@ void editorinput(void) key.keybuffer = ed.script_buffer[ed.script_cursor_y]; ed.script_cursor_x = UTF8_total_codepoints(ed.script_buffer[ed.script_cursor_y].c_str()); - music.playef(11); + music.playef(Sound_VIRIDIAN); } } break; @@ -3390,7 +3390,7 @@ void editorinput(void) // Script editor! if (escape_pressed) { - music.playef(11); + music.playef(Sound_VIRIDIAN); ed.substate = EditorSubState_MAIN; // Alright, now re-add the script. diff --git a/desktop_version/src/Entity.cpp b/desktop_version/src/Entity.cpp index 87174604..43b9d902 100644 --- a/desktop_version/src/Entity.cpp +++ b/desktop_version/src/Entity.cpp @@ -2575,7 +2575,7 @@ bool entityclass::updateentities( int i ) entities[i].state = 2; entities[i].onentity = 0; - music.playef(7); + music.playef(Sound_DISAPPEAR); } else if (entities[i].state == 2) { @@ -2621,7 +2621,7 @@ bool entityclass::updateentities( int i ) entities[i].life = 4; entities[i].state = 2; entities[i].onentity = 0; - music.playef(6); + music.playef(Sound_CRUMBLE); } else if (entities[i].state == 2) { @@ -2658,7 +2658,7 @@ bool entityclass::updateentities( int i ) //wait for collision if (entities[i].state == 1) { - music.playef(4); + music.playef(Sound_COIN); if (INBOUNDS_ARR(entities[i].para, collect)) { collect[(int) entities[i].para] = true; @@ -2678,13 +2678,13 @@ bool entityclass::updateentities( int i ) if (game.intimetrial) { - music.playef(25); + music.playef(Sound_NEWRECORD); } else { game.setstate(1000); if(music.currentsong!=-1) music.silencedasmusik(); - music.playef(3); + music.playef(Sound_TRINKET); if (game.trinkets() > game.stat_trinkets && !map.custommode) { game.stat_trinkets = game.trinkets(); @@ -2711,7 +2711,7 @@ bool entityclass::updateentities( int i ) entities[i].colour = 5; entities[i].onentity = 0; game.savepoint = entities[i].para; - music.playef(5); + music.playef(Sound_CHECKPOINT); game.savex = entities[i].xp - 4; @@ -2756,7 +2756,7 @@ bool entityclass::updateentities( int i ) entities[i].state = 2; - music.playef(8); + music.playef(Sound_GRAVITYLINE); game.gravitycontrol = (game.gravitycontrol + 1) % 2; game.totalflips++; int temp = getplayer(); @@ -2798,7 +2798,7 @@ bool entityclass::updateentities( int i ) //Depending on the room the warp point is in, teleport to a new location! entities[i].onentity = 0; //play a sound or somefink - music.playef(10); + music.playef(Sound_TELEPORT); game.teleport = true; game.edteleportent = i; @@ -3150,7 +3150,7 @@ bool entityclass::updateentities( int i ) { entities[i].colour = 5; entities[i].onentity = 0; - music.playef(17); + music.playef(Sound_TERMINALTOUCH); entities[i].state = 0; } @@ -3327,14 +3327,14 @@ bool entityclass::updateentities( int i ) if (game.intimetrial) { - music.playef(27); + music.playef(Sound_RESCUE); } else { game.setstate(1010); //music.haltdasmusik(); if(music.currentsong!=-1) music.silencedasmusik(); - music.playef(27); + music.playef(Sound_RESCUE); } return disableentity(i); @@ -3346,7 +3346,7 @@ bool entityclass::updateentities( int i ) //if inactive, activate! if (entities[i].tile == 1) { - music.playef(18); + music.playef(Sound_GAMESAVED); entities[i].tile = 2; entities[i].colour = 101; if(!game.intimetrial && !game.nodeathmode) @@ -4841,7 +4841,7 @@ void entityclass::collisioncheck(int i, int j, bool scm /*= false*/) { if (entityhlinecollide(i, j)) { - music.playef(8); + music.playef(Sound_GRAVITYLINE); game.gravitycontrol = (game.gravitycontrol + 1) % 2; game.totalflips++; if (game.gravitycontrol == 0) diff --git a/desktop_version/src/Game.cpp b/desktop_version/src/Game.cpp index fef6cade..2c68c8d6 100644 --- a/desktop_version/src/Game.cpp +++ b/desktop_version/src/Game.cpp @@ -1110,7 +1110,7 @@ void Game::updatestate(void) if(INBOUNDS_VEC(i, obj.entities) && obj.entities[i].tile == 0) { obj.entities[i].tile = 144; - music.playef(2); + music.playef(Sound_CRY); } setstate(0); break; @@ -1509,7 +1509,7 @@ void Game::updatestate(void) break; case 50: - music.playef(15); + music.playef(Sound_VIOLET); graphics.createtextbox(loc::gettext("Help! Can anyone hear this message?"), 5, 8, TEXT_COLOUR("purple")); graphics.textboxcommsrelay(); graphics.textboxtimer(60); @@ -1517,7 +1517,7 @@ void Game::updatestate(void) setstatedelay(100); break; case 51: - music.playef(15); + music.playef(Sound_VIOLET); graphics.createtextbox(loc::gettext("Verdigris? Are you out there? Are you ok?"), 5, 8, TEXT_COLOUR("purple")); graphics.textboxcommsrelay(); graphics.textboxtimer(60); @@ -1525,7 +1525,7 @@ void Game::updatestate(void) setstatedelay(100); break; case 52: - music.playef(15); + music.playef(Sound_VIOLET); graphics.createtextbox(loc::gettext("Please help us! We've crashed and need assistance!"), 5, 8, TEXT_COLOUR("purple")); graphics.textboxcommsrelay(); graphics.textboxtimer(60); @@ -1533,7 +1533,7 @@ void Game::updatestate(void) setstatedelay(100); break; case 53: - music.playef(15); + music.playef(Sound_VIOLET); graphics.createtextbox(loc::gettext("Hello? Anyone out there?"), 5, 8, TEXT_COLOUR("purple")); graphics.textboxcommsrelay(); graphics.textboxtimer(60); @@ -1541,7 +1541,7 @@ void Game::updatestate(void) setstatedelay(100); break; case 54: - music.playef(15); + music.playef(Sound_VIOLET); graphics.createtextbox(loc::gettext("This is Doctor Violet from the D.S.S. Souleye! Please respond!"), 5, 8, TEXT_COLOUR("purple")); graphics.textboxcommsrelay(); graphics.textboxtimer(60); @@ -1549,7 +1549,7 @@ void Game::updatestate(void) setstatedelay(100); break; case 55: - music.playef(15); + music.playef(Sound_VIOLET); graphics.createtextbox(loc::gettext("Please... Anyone..."), 5, 8, TEXT_COLOUR("purple")); graphics.textboxcommsrelay(); graphics.textboxtimer(60); @@ -1557,7 +1557,7 @@ void Game::updatestate(void) setstatedelay(100); break; case 56: - music.playef(15); + music.playef(Sound_VIOLET); graphics.createtextbox(loc::gettext("Please be alright, everyone..."), 5, 8, TEXT_COLOUR("purple")); graphics.textboxcommsrelay(); graphics.textboxtimer(60); @@ -1668,7 +1668,7 @@ void Game::updatestate(void) obj.removetrigger(85); //Init final stretch incstate(); - music.playef(9); + music.playef(Sound_FLASH); music.play(Music_POSITIVEFORCE); obj.flags[72] = true; @@ -1761,7 +1761,7 @@ void Game::updatestate(void) if (INBOUNDS_VEC(i, obj.entities) && obj.entities[i].onroof > 0 && gravitycontrol == 1) { gravitycontrol = 0; - music.playef(1); + music.playef(Sound_UNFLIP); } if (INBOUNDS_VEC(i, obj.entities) && obj.entities[i].onground > 0) { @@ -1787,14 +1787,14 @@ void Game::updatestate(void) graphics.createtextbox("Captain! I've been so worried!", 60, 90, 164, 255, 164); graphics.textboxprintflags(PR_FONT_8X8); incstate(); - music.playef(12); + music.playef(Sound_VERDIGRIS); } break; case 104: graphics.createtextbox("I'm glad you're ok!", 135, 152, TEXT_COLOUR("cyan")); graphics.textboxprintflags(PR_FONT_8X8); incstate(); - music.playef(11); + music.playef(Sound_VIRIDIAN); graphics.textboxactive(); break; case 106: @@ -1804,7 +1804,7 @@ void Game::updatestate(void) graphics.addline("around in circles..."); graphics.textboxprintflags(PR_FONT_8X8); incstate(); - music.playef(2); + music.playef(Sound_CRY); graphics.textboxactive(); int i = obj.getcompanion(); if (INBOUNDS_VEC(i, obj.entities)) @@ -1819,7 +1819,7 @@ void Game::updatestate(void) graphics.addline("teleporter key!"); graphics.textboxprintflags(PR_FONT_8X8); incstate(); - music.playef(11); + music.playef(Sound_VIRIDIAN); graphics.textboxactive(); break; case 110: @@ -1834,7 +1834,7 @@ void Game::updatestate(void) graphics.createtextbox("Follow me!", 185, 154, TEXT_COLOUR("cyan")); graphics.textboxprintflags(PR_FONT_8X8); incstate(); - music.playef(11); + music.playef(Sound_VIRIDIAN); graphics.textboxactive(); } @@ -1891,7 +1891,7 @@ void Game::updatestate(void) if (INBOUNDS_VEC(i, obj.entities) && obj.entities[i].onground > 0 && gravitycontrol == 0) { gravitycontrol = 1; - music.playef(1); + music.playef(Sound_UNFLIP); } if (INBOUNDS_VEC(i, obj.entities) && obj.entities[i].onroof > 0) { @@ -1916,7 +1916,7 @@ void Game::updatestate(void) graphics.createtextbox("Captain! You're ok!", 60-10, 90-40, TEXT_COLOUR("yellow")); graphics.textboxprintflags(PR_FONT_8X8); incstate(); - music.playef(14); + music.playef(Sound_VITELLARY); break; } case 124: @@ -1925,7 +1925,7 @@ void Game::updatestate(void) graphics.addline("I can't get it to go anywhere..."); graphics.textboxprintflags(PR_FONT_8X8); incstate(); - music.playef(2); + music.playef(Sound_CRY); graphics.textboxactive(); break; } @@ -1933,7 +1933,7 @@ void Game::updatestate(void) graphics.createtextbox("I can help with that!", 125, 152-40, TEXT_COLOUR("cyan")); graphics.textboxprintflags(PR_FONT_8X8); incstate(); - music.playef(11); + music.playef(Sound_VIRIDIAN); graphics.textboxactive(); break; case 128: @@ -1941,7 +1941,7 @@ void Game::updatestate(void) graphics.addline("codex for our ship!"); graphics.textboxprintflags(PR_FONT_8X8); incstate(); - music.playef(11); + music.playef(Sound_VIRIDIAN); graphics.textboxactive(); break; @@ -1950,7 +1950,7 @@ void Game::updatestate(void) graphics.createtextbox("Yey! Let's go home!", 60-30, 90-35, TEXT_COLOUR("yellow")); graphics.textboxprintflags(PR_FONT_8X8); incstate(); - music.playef(14); + music.playef(Sound_VITELLARY); graphics.textboxactive(); int i = obj.getcompanion(); if (INBOUNDS_VEC(i, obj.entities)) @@ -1971,7 +1971,7 @@ void Game::updatestate(void) case 200: //Init final stretch incstate(); - music.playef(9); + music.playef(Sound_FLASH); obj.flags[72] = true; screenshake = 10; @@ -2229,7 +2229,7 @@ void Game::updatestate(void) setstatedelay(15); flashlight = 5; screenshake = 90; - music.playef(9); + music.playef(Sound_FLASH); break; case 2501: //Activating a teleporter 2 @@ -2238,7 +2238,7 @@ void Game::updatestate(void) flashlight = 5; screenshake = 0; //we're done here! - music.playef(10); + music.playef(Sound_TELEPORT); break; case 2502: { @@ -2346,7 +2346,7 @@ void Game::updatestate(void) graphics.createtextbox("Hello?", 125+24, 152-20, TEXT_COLOUR("cyan")); graphics.textboxprintflags(PR_FONT_8X8); incstate(); - music.playef(11); + music.playef(Sound_VIRIDIAN); graphics.textboxactive(); break; case 2512: @@ -2355,7 +2355,7 @@ void Game::updatestate(void) graphics.createtextbox("Is anyone there?", 125+8, 152-24, TEXT_COLOUR("cyan")); graphics.textboxprintflags(PR_FONT_8X8); incstate(); - music.playef(11); + music.playef(Sound_VIRIDIAN); graphics.textboxactive(); break; case 2514: @@ -2374,28 +2374,28 @@ void Game::updatestate(void) setstatedelay(30); flashlight = 5; screenshake = 90; - music.playef(9); + music.playef(Sound_FLASH); break; case 3001: //Activating a teleporter 2 incstate(); setstatedelay(15); flashlight = 5; - music.playef(9); + music.playef(Sound_FLASH); break; case 3002: //Activating a teleporter 2 incstate(); setstatedelay(15); flashlight = 5; - music.playef(9); + music.playef(Sound_FLASH); break; case 3003: //Activating a teleporter 2 incstate(); setstatedelay(15); flashlight = 5; - music.playef(9); + music.playef(Sound_FLASH); break; case 3004: //Activating a teleporter 2 @@ -2404,7 +2404,7 @@ void Game::updatestate(void) flashlight = 5; screenshake = 0; //we're done here! - music.playef(10); + music.playef(Sound_TELEPORT); break; case 3005: { @@ -3058,7 +3058,7 @@ void Game::updatestate(void) setstatedelay(30); flashlight = 5; screenshake = 90; - music.playef(9); + music.playef(Sound_FLASH); break; } case 3512: @@ -3066,21 +3066,21 @@ void Game::updatestate(void) incstate(); setstatedelay(15); flashlight = 5; - music.playef(9); + music.playef(Sound_FLASH); break; case 3513: //Activating a teleporter 2 incstate(); setstatedelay(15); flashlight = 5; - music.playef(9); + music.playef(Sound_FLASH); break; case 3514: //Activating a teleporter 2 incstate(); setstatedelay(15); flashlight = 5; - music.playef(9); + music.playef(Sound_FLASH); break; case 3515: { @@ -3098,7 +3098,7 @@ void Game::updatestate(void) } //we're done here! - music.playef(10); + music.playef(Sound_TELEPORT); setstatedelay(60); break; } @@ -3158,7 +3158,7 @@ void Game::updatestate(void) statedelay = 10; flashlight = 5; screenshake = 10; - music.playef(9); + music.playef(Sound_FLASH); break; case 4001: //Activating a teleporter 2 @@ -3167,7 +3167,7 @@ void Game::updatestate(void) flashlight = 5; screenshake = 0; //we're done here! - music.playef(10); + music.playef(Sound_TELEPORT); break; case 4002: { @@ -3203,7 +3203,7 @@ void Game::updatestate(void) setstatedelay(15); flashlight = 5; screenshake = 90; - music.playef(9); + music.playef(Sound_FLASH); break; case 4011: //Activating a teleporter 2 @@ -3211,7 +3211,7 @@ void Game::updatestate(void) setstatedelay(0); flashlight = 5; screenshake = 0; - music.playef(10); + music.playef(Sound_TELEPORT); break; case 4012: { @@ -3334,7 +3334,7 @@ void Game::updatestate(void) setstatedelay(15); flashlight = 5; screenshake = 90; - music.playef(9); + music.playef(Sound_FLASH); break; case 4021: //Activating a teleporter 2 @@ -3342,7 +3342,7 @@ void Game::updatestate(void) setstatedelay(0); flashlight = 5; screenshake = 0; - music.playef(10); + music.playef(Sound_TELEPORT); break; case 4022: { @@ -3447,7 +3447,7 @@ void Game::updatestate(void) setstatedelay(15); flashlight = 5; screenshake = 90; - music.playef(9); + music.playef(Sound_FLASH); break; case 4031: //Activating a teleporter 2 @@ -3455,7 +3455,7 @@ void Game::updatestate(void) setstatedelay(0); flashlight = 5; screenshake = 0; - music.playef(10); + music.playef(Sound_TELEPORT); break; case 4032: { @@ -3560,7 +3560,7 @@ void Game::updatestate(void) setstatedelay(15); flashlight = 5; screenshake = 90; - music.playef(9); + music.playef(Sound_FLASH); break; case 4041: //Activating a teleporter 2 @@ -3568,7 +3568,7 @@ void Game::updatestate(void) setstatedelay(0); flashlight = 5; screenshake = 0; - music.playef(10); + music.playef(Sound_TELEPORT); break; case 4042: { @@ -3678,7 +3678,7 @@ void Game::updatestate(void) setstatedelay(15); flashlight = 5; screenshake = 90; - music.playef(9); + music.playef(Sound_FLASH); break; case 4051: //Activating a teleporter 2 @@ -3686,7 +3686,7 @@ void Game::updatestate(void) setstatedelay(0); flashlight = 5; screenshake = 0; - music.playef(10); + music.playef(Sound_TELEPORT); break; case 4052: { @@ -3796,7 +3796,7 @@ void Game::updatestate(void) setstatedelay(15); flashlight = 5; screenshake = 90; - music.playef(9); + music.playef(Sound_FLASH); break; case 4061: //Activating a teleporter 2 @@ -3804,7 +3804,7 @@ void Game::updatestate(void) setstatedelay(0); flashlight = 5; screenshake = 0; - music.playef(10); + music.playef(Sound_TELEPORT); break; case 4062: { @@ -3912,7 +3912,7 @@ void Game::updatestate(void) setstatedelay(15); flashlight = 5; screenshake = 90; - music.playef(9); + music.playef(Sound_FLASH); break; case 4071: //Activating a teleporter 2 @@ -3920,7 +3920,7 @@ void Game::updatestate(void) setstatedelay(0); flashlight = 5; screenshake = 0; - music.playef(10); + music.playef(Sound_TELEPORT); break; case 4072: { @@ -4025,7 +4025,7 @@ void Game::updatestate(void) setstatedelay(15); flashlight = 5; screenshake = 90; - music.playef(9); + music.playef(Sound_FLASH); break; case 4081: //Activating a teleporter 2 @@ -4033,7 +4033,7 @@ void Game::updatestate(void) setstatedelay(0); flashlight = 5; screenshake = 0; - music.playef(10); + music.playef(Sound_TELEPORT); break; case 4082: { @@ -4138,7 +4138,7 @@ void Game::updatestate(void) setstatedelay(15); flashlight = 5; screenshake = 90; - music.playef(9); + music.playef(Sound_FLASH); break; case 4091: //Activating a teleporter 2 @@ -4146,7 +4146,7 @@ void Game::updatestate(void) setstatedelay(0); flashlight = 5; screenshake = 0; - music.playef(10); + music.playef(Sound_TELEPORT); break; case 4092: { @@ -5040,7 +5040,7 @@ void Game::deathsequence(void) music.nicefade = false; } deathcounts++; - music.playef(2); + music.playef(Sound_CRY); if (INBOUNDS_VEC(i, obj.entities) && !noflashingmode) { obj.entities[i].invis = true; diff --git a/desktop_version/src/Input.cpp b/desktop_version/src/Input.cpp index 0e929cb8..25172a32 100644 --- a/desktop_version/src/Input.cpp +++ b/desktop_version/src/Input.cpp @@ -49,7 +49,7 @@ static void updatebuttonmappings(int bind) if (!dupe) { game.controllerButton_flip.push_back(i); - music.playef(11); + music.playef(Sound_VIRIDIAN); } for (j = 0; j < game.controllerButton_map.size(); j += 1) { @@ -94,7 +94,7 @@ static void updatebuttonmappings(int bind) if (!dupe) { game.controllerButton_map.push_back(i); - music.playef(11); + music.playef(Sound_VIRIDIAN); } for (j = 0; j < game.controllerButton_flip.size(); j += 1) { @@ -139,7 +139,7 @@ static void updatebuttonmappings(int bind) if (!dupe) { game.controllerButton_esc.push_back(i); - music.playef(11); + music.playef(Sound_VIRIDIAN); } for (j = 0; j < game.controllerButton_flip.size(); j += 1) { @@ -184,7 +184,7 @@ static void updatebuttonmappings(int bind) if (!dupe) { game.controllerButton_restart.push_back(i); - music.playef(11); + music.playef(Sound_VIRIDIAN); } for (j = 0; j < game.controllerButton_flip.size(); j += 1) { @@ -229,7 +229,7 @@ static void updatebuttonmappings(int bind) if (!dupe) { game.controllerButton_interact.push_back(i); - music.playef(11); + music.playef(Sound_VIRIDIAN); } for (j = 0; j < game.controllerButton_flip.size(); j += 1) { @@ -273,13 +273,13 @@ static void toggleflipmode(void) game.savestatsandsettings_menu(); if (graphics.setflipmode) { - music.playef(18); + music.playef(Sound_GAMESAVED); game.screenshake = 10; game.flashlight = 5; } else { - music.playef(11); + music.playef(Sound_VIRIDIAN); } } @@ -369,7 +369,7 @@ static void menuactionpress(void) { if (game.menutestmode) { - music.playef(6); + music.playef(Sound_CRUMBLE); Menu::MenuName nextmenu = (Menu::MenuName) (game.currentmenuname + 1); game.returnmenu(); game.createmenu(nextmenu); @@ -415,13 +415,13 @@ static void menuactionpress(void) if (!game.save_exists() && !game.anything_unlocked()) { //No saves exist, just start a new game - music.playef(11); + music.playef(Sound_VIRIDIAN); startmode(Start_MAINGAME); } else { //Bring you to the normal playmenu - music.playef(11); + music.playef(Sound_VIRIDIAN); game.createmenu(Menu::play); map.nexttowercolour(); } @@ -430,33 +430,33 @@ static void menuactionpress(void) #if !defined(NO_CUSTOM_LEVELS) case 1: //Bring you to the normal playmenu - music.playef(11); + music.playef(Sound_VIRIDIAN); game.createmenu(Menu::playerworlds); map.nexttowercolour(); break; #endif case 2: //Options - music.playef(11); + music.playef(Sound_VIRIDIAN); game.createmenu(Menu::options); map.nexttowercolour(); break; case 3: //Translator - music.playef(11); + music.playef(Sound_VIRIDIAN); game.createmenu(Menu::translator_main); map.nexttowercolour(); break; #if !defined(MAKEANDPLAY) case 4: //Credits - music.playef(11); + music.playef(Sound_VIRIDIAN); game.createmenu(Menu::credits); map.nexttowercolour(); break; #endif case 5: - music.playef(11); + music.playef(Sound_VIRIDIAN); game.createmenu(Menu::youwannaquit); map.nexttowercolour(); break; @@ -469,12 +469,12 @@ static void menuactionpress(void) const bool nextlastoptions = cl.ListOfMetaData.size() > 8; if(game.currentmenuoption==(int)game.menuoptions.size()-1){ //go back to menu - music.playef(11); + music.playef(Sound_VIRIDIAN); game.returnmenu(); map.nexttowercolour(); }else if(nextlastoptions && game.currentmenuoption==(int)game.menuoptions.size()-2){ //previous page - music.playef(11); + music.playef(Sound_VIRIDIAN); if(game.levelpage==0){ game.levelpage=(cl.ListOfMetaData.size()-1)/8; }else{ @@ -485,7 +485,7 @@ static void menuactionpress(void) map.nexttowercolour(); }else if(nextlastoptions && game.currentmenuoption==(int)game.menuoptions.size()-3){ //next page - music.playef(11); + music.playef(Sound_VIRIDIAN); if((size_t) ((game.levelpage*8)+8) >= cl.ListOfMetaData.size()){ game.levelpage=0; }else{ @@ -497,7 +497,7 @@ static void menuactionpress(void) }else{ //Ok, launch the level! //PLAY CUSTOM LEVEL HOOK - music.playef(11); + music.playef(Sound_VIRIDIAN); game.playcustomlevel=(game.levelpage*8)+game.currentmenuoption; game.customleveltitle=cl.ListOfMetaData[game.playcustomlevel].title; game.customlevelfilename=cl.ListOfMetaData[game.playcustomlevel].filename; @@ -518,20 +518,20 @@ static void menuactionpress(void) switch (game.currentmenuoption) { case 0: //continue save - music.playef(11); + music.playef(Sound_VIRIDIAN); startmode(Start_CUSTOM_QUICKSAVE); break; case 1: - music.playef(11); + music.playef(Sound_VIRIDIAN); startmode(Start_CUSTOM); break; case 2: - music.playef(11); + music.playef(Sound_VIRIDIAN); game.createmenu(Menu::deletequicklevel); map.nexttowercolour(); break; default: - music.playef(11); + music.playef(Sound_VIRIDIAN); game.returnmenu(); map.nexttowercolour(); break; @@ -542,7 +542,7 @@ static void menuactionpress(void) switch (game.currentmenuoption) { default: - music.playef(11); + music.playef(Sound_VIRIDIAN); game.returnmenu(); break; case 1: @@ -550,7 +550,7 @@ static void menuactionpress(void) game.returntomenu(Menu::levellist); game.flashlight = 5; game.screenshake = 15; - music.playef(23); + music.playef(Sound_DESTROY); break; } map.nexttowercolour(); @@ -565,7 +565,7 @@ static void menuactionpress(void) { case 0: - music.playef(11); + music.playef(Sound_VIRIDIAN); game.levelpage=0; cl.getDirectoryData(); game.loadcustomlevelstats(); //Should only load a file if it's needed @@ -579,7 +579,7 @@ static void menuactionpress(void) #if !defined(NO_EDITOR) case 1: //LEVEL EDITOR HOOK - music.playef(11); + music.playef(Sound_VIRIDIAN); startmode(Start_EDITOR); ed.filename=""; break; @@ -589,22 +589,22 @@ static void menuactionpress(void) if (FILESYSTEM_openDirectoryEnabled() && FILESYSTEM_openDirectory(FILESYSTEM_getUserLevelDirectory())) { - music.playef(11); + music.playef(Sound_VIRIDIAN); SDL_MinimizeWindow(gameScreen.m_window); } else { - music.playef(2); + music.playef(Sound_CRY); } break; case OFFSET+3: - music.playef(11); + music.playef(Sound_VIRIDIAN); game.createmenu(Menu::confirmshowlevelspath); map.nexttowercolour(); break; case OFFSET+4: //back - music.playef(11); + music.playef(Sound_VIRIDIAN); game.returnmenu(); map.nexttowercolour(); break; @@ -615,7 +615,7 @@ static void menuactionpress(void) case Menu::confirmshowlevelspath: { int prevmenuoption = game.currentmenuoption; /* returnmenu destroys this */ - music.playef(11); + music.playef(Sound_VIRIDIAN); game.returnmenu(); map.nexttowercolour(); if (prevmenuoption == 1) @@ -625,12 +625,12 @@ static void menuactionpress(void) break; } case Menu::showlevelspath: - music.playef(11); + music.playef(Sound_VIRIDIAN); game.returntomenu(Menu::playerworlds); map.nexttowercolour(); break; case Menu::errornostart: - music.playef(11); + music.playef(Sound_VIRIDIAN); game.createmenu(Menu::mainmenu); map.nexttowercolour(); break; @@ -641,7 +641,7 @@ static void menuactionpress(void) if (game.currentmenuoption == offset + 0 && !gameScreen.isForcedFullscreen()) { processed = true; - music.playef(11); + music.playef(Sound_VIRIDIAN); gameScreen.toggleFullScreen(); } if (gameScreen.isForcedFullscreen()) @@ -651,7 +651,7 @@ static void menuactionpress(void) if (game.currentmenuoption == offset + 1) { processed = true; - music.playef(11); + music.playef(Sound_VIRIDIAN); gameScreen.toggleScalingMode(); game.savestatsandsettings_menu(); } @@ -661,13 +661,13 @@ static void menuactionpress(void) // resize to nearest multiple if (gameScreen.isWindowed) { - music.playef(11); + music.playef(Sound_VIRIDIAN); gameScreen.ResizeToNearestMultiple(); game.savestatsandsettings_menu(); } else { - music.playef(2); + music.playef(Sound_CRY); } } if (gameScreen.isForcedFullscreen()) @@ -677,7 +677,7 @@ static void menuactionpress(void) if (game.currentmenuoption == offset + 3) { processed = true; - music.playef(11); + music.playef(Sound_VIRIDIAN); gameScreen.toggleLinearFilter(); game.savestatsandsettings_menu(); } @@ -685,7 +685,7 @@ static void menuactionpress(void) { processed = true; //change smoothing - music.playef(11); + music.playef(Sound_VIRIDIAN); gameScreen.badSignalEffect= !gameScreen.badSignalEffect; game.savestatsandsettings_menu(); } @@ -693,14 +693,14 @@ static void menuactionpress(void) { processed = true; //toggle vsync - music.playef(11); + music.playef(Sound_VIRIDIAN); gameScreen.toggleVSync(); game.savestatsandsettings_menu(); } if (!processed) { //back - music.playef(11); + music.playef(Sound_VIRIDIAN); game.returnmenu(); map.nexttowercolour(); } @@ -711,11 +711,11 @@ static void menuactionpress(void) { case 0: //bye! - music.playef(2); + music.playef(Sound_CRY); startmode(Start_QUIT); break; default: - music.playef(11); + music.playef(Sound_VIRIDIAN); game.returnmenu(); map.nexttowercolour(); } @@ -725,13 +725,13 @@ static void menuactionpress(void) { case 0: //back - music.playef(11); + music.playef(Sound_VIRIDIAN); game.returnmenu(); map.nexttowercolour(); break; default: map.invincibility = !map.invincibility; - music.playef(11); + music.playef(Sound_VIRIDIAN); game.returnmenu(); map.nexttowercolour(); game.savestatsandsettings_menu(); @@ -744,28 +744,28 @@ static void menuactionpress(void) case 0: //back game.slowdown = 30; - music.playef(11); + music.playef(Sound_VIRIDIAN); game.returnmenu(); map.nexttowercolour(); game.savestatsandsettings_menu(); break; case 1: game.slowdown = 24; - music.playef(11); + music.playef(Sound_VIRIDIAN); game.returnmenu(); map.nexttowercolour(); game.savestatsandsettings_menu(); break; case 2: game.slowdown = 18; - music.playef(11); + music.playef(Sound_VIRIDIAN); game.returnmenu(); map.nexttowercolour(); game.savestatsandsettings_menu(); break; case 3: game.slowdown = 12; - music.playef(11); + music.playef(Sound_VIRIDIAN); game.returnmenu(); map.nexttowercolour(); game.savestatsandsettings_menu(); @@ -777,20 +777,20 @@ static void menuactionpress(void) { case 0: // Glitchrunner mode - music.playef(11); + music.playef(Sound_VIRIDIAN); game.createmenu(Menu::setglitchrunner); game.currentmenuoption = GlitchrunnerMode_get(); map.nexttowercolour(); break; case 1: /* Input delay */ - music.playef(11); + music.playef(Sound_VIRIDIAN); game.inputdelay = !game.inputdelay; game.savestatsandsettings_menu(); break; case 2: /* Interact button toggle */ - music.playef(11); + music.playef(Sound_VIRIDIAN); game.separate_interact = !game.separate_interact; game.savestatsandsettings_menu(); break; @@ -798,17 +798,17 @@ static void menuactionpress(void) // toggle fake load screen game.skipfakeload = !game.skipfakeload; game.savestatsandsettings_menu(); - music.playef(11); + music.playef(Sound_VIRIDIAN); break; case 4: // toggle in game timer game.showingametimer = !game.showingametimer; game.savestatsandsettings_menu(); - music.playef(11); + music.playef(Sound_VIRIDIAN); break; default: //back - music.playef(11); + music.playef(Sound_VIRIDIAN); game.returnmenu(); map.nexttowercolour(); break; @@ -816,7 +816,7 @@ static void menuactionpress(void) break; case Menu::setglitchrunner: GlitchrunnerMode_set((enum GlitchrunnerMode) game.currentmenuoption); - music.playef(11); + music.playef(Sound_VIRIDIAN); game.returnmenu(); game.savestatsandsettings_menu(); map.nexttowercolour(); @@ -828,23 +828,23 @@ static void menuactionpress(void) // toggle unfocus pause game.disablepause = !game.disablepause; game.savestatsandsettings_menu(); - music.playef(11); + music.playef(Sound_VIRIDIAN); break; case 1: /* toggle unfocus music pause */ game.disableaudiopause = !game.disableaudiopause; game.savestatsandsettings_menu(); - music.playef(11); + music.playef(Sound_VIRIDIAN); break; case 2: // toggle translucent roomname BG graphics.translucentroomname = !graphics.translucentroomname; game.savestatsandsettings_menu(); - music.playef(11); + music.playef(Sound_VIRIDIAN); break; default: //back - music.playef(11); + music.playef(Sound_VIRIDIAN); game.returnmenu(); map.nexttowercolour(); break; @@ -857,7 +857,7 @@ static void menuactionpress(void) accessibilityoffset = 1; if (game.currentmenuoption == 0) { //unlock play options - music.playef(11); + music.playef(Sound_VIRIDIAN); game.createmenu(Menu::unlockmenu); map.nexttowercolour(); } @@ -876,11 +876,11 @@ static void menuactionpress(void) map.invincibility = !map.invincibility; game.savestatsandsettings_menu(); } - music.playef(11); + music.playef(Sound_VIRIDIAN); } else { - music.playef(2); + music.playef(Sound_CRY); map.invincibility = false; } } @@ -890,11 +890,11 @@ static void menuactionpress(void) { game.createmenu(Menu::setslowdown); map.nexttowercolour(); - music.playef(11); + music.playef(Sound_VIRIDIAN); } else { - music.playef(2); + music.playef(Sound_CRY); game.slowdown = 30; } } @@ -904,7 +904,7 @@ static void menuactionpress(void) game.savestatsandsettings_menu(); graphics.towerbg.tdrawback = true; graphics.titlebg.tdrawback = true; - music.playef(11); + music.playef(Sound_VIRIDIAN); } else if (game.currentmenuoption == accessibilityoffset + 3) { //disable screeneffects @@ -912,23 +912,23 @@ static void menuactionpress(void) game.savestatsandsettings_menu(); if (!game.noflashingmode) { - music.playef(18); + music.playef(Sound_GAMESAVED); game.screenshake = 10; game.flashlight = 5; } else { - music.playef(11); + music.playef(Sound_VIRIDIAN); } } else if (game.currentmenuoption == accessibilityoffset + 4) { //disable text outline graphics.notextoutline = !graphics.notextoutline; game.savestatsandsettings_menu(); - music.playef(11); + music.playef(Sound_VIRIDIAN); } else if (game.currentmenuoption == accessibilityoffset + 5) { //back - music.playef(11); + music.playef(Sound_VIRIDIAN); game.returnmenu(); map.nexttowercolour(); } @@ -967,40 +967,40 @@ static void menuactionpress(void) if (game.currentmenuoption == gameplayoptionsoffset + 0) { //Toggle 30+ FPS - music.playef(11); + music.playef(Sound_VIRIDIAN); game.over30mode = !game.over30mode; game.savestatsandsettings_menu(); } else if (game.currentmenuoption == gameplayoptionsoffset + 1) { //Speedrunner options - music.playef(11); + music.playef(Sound_VIRIDIAN); game.createmenu(Menu::speedrunneroptions); map.nexttowercolour(); } else if (game.currentmenuoption == gameplayoptionsoffset + 2) { //Advanced options - music.playef(11); + music.playef(Sound_VIRIDIAN); game.createmenu(Menu::advancedoptions); map.nexttowercolour(); } else if (game.currentmenuoption == gameplayoptionsoffset + 3) { //Clear Data - music.playef(11); + music.playef(Sound_VIRIDIAN); game.createmenu(Menu::cleardatamenu); map.nexttowercolour(); } else if (game.currentmenuoption == gameplayoptionsoffset + 4) { - music.playef(11); + music.playef(Sound_VIRIDIAN); game.createmenu(Menu::clearcustomdatamenu); map.nexttowercolour(); } else if (game.currentmenuoption == gameplayoptionsoffset + 5) { //return to previous menu - music.playef(11); + music.playef(Sound_VIRIDIAN); game.returnmenu(); map.nexttowercolour(); } @@ -1012,37 +1012,37 @@ static void menuactionpress(void) { case 0: //gameplay options - music.playef(11); + music.playef(Sound_VIRIDIAN); game.createmenu(Menu::gameplayoptions); map.nexttowercolour(); break; case 1: //graphic options - music.playef(11); + music.playef(Sound_VIRIDIAN); game.createmenu(Menu::graphicoptions); map.nexttowercolour(); break; case 2: /* Audio options */ - music.playef(11); + music.playef(Sound_VIRIDIAN); game.createmenu(Menu::audiooptions); map.nexttowercolour(); break; case 3: //gamepad options - music.playef(11); + music.playef(Sound_VIRIDIAN); game.createmenu(Menu::controller); map.nexttowercolour(); break; case 4: //accessibility options - music.playef(11); + music.playef(Sound_VIRIDIAN); game.createmenu(Menu::accessibility); map.nexttowercolour(); break; case 5: //language options - music.playef(11); + music.playef(Sound_VIRIDIAN); loc::loadlanguagelist(); game.createmenu(Menu::language); game.currentmenuoption = loc::languagelist_curlang; @@ -1050,7 +1050,7 @@ static void menuactionpress(void) break; default: /* Return */ - music.playef(11); + music.playef(Sound_VIRIDIAN); if (game.ingame_titlemode) { game.returntoingame(); @@ -1068,7 +1068,7 @@ static void menuactionpress(void) { case 0: case 1: - music.playef(11); + music.playef(Sound_VIRIDIAN); if (game.slidermode == SLIDER_NONE) { initvolumeslider(game.currentmenuoption); @@ -1086,7 +1086,7 @@ static void menuactionpress(void) /* Toggle MMMMMM */ music.usingmmmmmm = !music.usingmmmmmm; - music.playef(11); + music.playef(Sound_VIRIDIAN); if (music.currentsong > -1) { music.play(music.currentsong); @@ -1100,12 +1100,12 @@ static void menuactionpress(void) /* Return */ game.returnmenu(); map.nexttowercolour(); - music.playef(11); + music.playef(Sound_VIRIDIAN); } break; case Menu::language: { - music.playef(11); + music.playef(Sound_VIRIDIAN); bool show_title = !loc::lang_set; @@ -1137,13 +1137,13 @@ static void menuactionpress(void) { case 0: // translator options - music.playef(11); + music.playef(Sound_VIRIDIAN); game.createmenu(Menu::translator_options); map.nexttowercolour(); break; case 1: // maintenance - music.playef(11); + music.playef(Sound_VIRIDIAN); game.createmenu(Menu::translator_maintenance); map.nexttowercolour(); break; @@ -1152,17 +1152,17 @@ static void menuactionpress(void) if (FILESYSTEM_openDirectoryEnabled() && FILESYSTEM_openDirectory(FILESYSTEM_getUserMainLangDirectory())) { - music.playef(11); + music.playef(Sound_VIRIDIAN); SDL_MinimizeWindow(gameScreen.m_window); } else { - music.playef(2); + music.playef(Sound_CRY); } break; default: // return - music.playef(11); + music.playef(Sound_VIRIDIAN); game.returnmenu(); map.nexttowercolour(); break; @@ -1173,25 +1173,25 @@ static void menuactionpress(void) { case 0: // language statistics - music.playef(11); + music.playef(Sound_VIRIDIAN); game.createmenu(Menu::translator_options_stats); map.nexttowercolour(); break; case 1: // translate room names - music.playef(11); + music.playef(Sound_VIRIDIAN); roomname_translator::set_enabled(!roomname_translator::enabled); game.savestatsandsettings_menu(); break; case 2: // explore game - music.playef(11); + music.playef(Sound_VIRIDIAN); game.createmenu(Menu::translator_options_exploregame); map.nexttowercolour(); break; case 3: // menu test - music.playef(18); + music.playef(Sound_GAMESAVED); game.menutestmode = true; game.createmenu((Menu::MenuName) 0); map.nexttowercolour(); @@ -1200,11 +1200,11 @@ static void menuactionpress(void) // cutscene test if (loc::lang == "en") { - music.playef(2); + music.playef(Sound_CRY); } else { - music.playef(11); + music.playef(Sound_VIRIDIAN); game.cutscenetest_menu_page = 0; loc::populate_testable_script_ids(); game.createmenu(Menu::translator_options_cutscenetest); @@ -1213,14 +1213,14 @@ static void menuactionpress(void) break; case 5: // limits check - music.playef(11); + music.playef(Sound_VIRIDIAN); loc::local_limits_check(); game.createmenu(Menu::translator_options_limitscheck); map.nexttowercolour(); break; default: // return - music.playef(11); + music.playef(Sound_VIRIDIAN); game.returnmenu(); map.nexttowercolour(); break; @@ -1233,25 +1233,25 @@ static void menuactionpress(void) // next if (loc::limitscheck_current_overflow < loc::text_overflows.size()) { - music.playef(11); + music.playef(Sound_VIRIDIAN); loc::limitscheck_current_overflow++; } break; default: // return - music.playef(11); + music.playef(Sound_VIRIDIAN); game.returnmenu(); map.nexttowercolour(); break; } break; case Menu::translator_options_stats: - music.playef(11); + music.playef(Sound_VIRIDIAN); game.returnmenu(); map.nexttowercolour(); break; case Menu::translator_options_exploregame: - music.playef(11); + music.playef(Sound_VIRIDIAN); switch (game.currentmenuoption) { case 0: @@ -1299,7 +1299,7 @@ static void menuactionpress(void) if (game.currentmenuoption == (int)game.menuoptions.size()-4) { // next page - music.playef(11); + music.playef(Sound_VIRIDIAN); if ((size_t) ((game.cutscenetest_menu_page*14)+14) >= loc::testable_script_ids.size()) { game.cutscenetest_menu_page = 0; @@ -1315,7 +1315,7 @@ static void menuactionpress(void) else if (game.currentmenuoption == (int)game.menuoptions.size()-3) { // previous page - music.playef(11); + music.playef(Sound_VIRIDIAN); if (game.cutscenetest_menu_page == 0) { game.cutscenetest_menu_page = (loc::testable_script_ids.size()-1)/14; @@ -1337,7 +1337,7 @@ static void menuactionpress(void) else if (game.currentmenuoption == (int)game.menuoptions.size()-1) { // go back to menu - music.playef(11); + music.playef(Sound_VIRIDIAN); game.returnmenu(); map.nexttowercolour(); } @@ -1349,7 +1349,7 @@ static void menuactionpress(void) } break; case Menu::translator_maintenance: - music.playef(11); + music.playef(Sound_VIRIDIAN); switch (game.currentmenuoption) { case 0: @@ -1377,7 +1377,7 @@ static void menuactionpress(void) break; case Menu::translator_maintenance_sync: { - music.playef(11); + music.playef(Sound_VIRIDIAN); bool sync_success = true; if (game.currentmenuoption == 0) { @@ -1393,7 +1393,7 @@ static void menuactionpress(void) break; } case Menu::translator_error_setlangwritedir: - music.playef(11); + music.playef(Sound_VIRIDIAN); game.returnmenu(); map.nexttowercolour(); break; @@ -1403,48 +1403,48 @@ static void menuactionpress(void) case 0: //unlock 1 game.unlock[9] = true; game.unlocknotify[9] = true; - music.playef(11); + music.playef(Sound_VIRIDIAN); game.createmenu(Menu::unlockmenutrials, true); game.savestatsandsettings_menu(); break; case 1: //unlock 2 game.unlock[10] = true; game.unlocknotify[10] = true; - music.playef(11); + music.playef(Sound_VIRIDIAN); game.createmenu(Menu::unlockmenutrials, true); game.savestatsandsettings_menu(); break; case 2: //unlock 3 game.unlock[11] = true; game.unlocknotify[11] = true; - music.playef(11); + music.playef(Sound_VIRIDIAN); game.createmenu(Menu::unlockmenutrials, true); game.savestatsandsettings_menu(); break; case 3: //unlock 4 game.unlock[12] = true; game.unlocknotify[12] = true; - music.playef(11); + music.playef(Sound_VIRIDIAN); game.createmenu(Menu::unlockmenutrials, true); game.savestatsandsettings_menu(); break; case 4: //unlock 5 game.unlock[13] = true; game.unlocknotify[13] = true; - music.playef(11); + music.playef(Sound_VIRIDIAN); game.createmenu(Menu::unlockmenutrials, true); game.savestatsandsettings_menu(); break; case 5: //unlock 6 game.unlock[14] = true; game.unlocknotify[14] = true; - music.playef(11); + music.playef(Sound_VIRIDIAN); game.createmenu(Menu::unlockmenutrials, true); game.savestatsandsettings_menu(); break; case 6: //back //back - music.playef(11); + music.playef(Sound_VIRIDIAN); game.returnmenu(); map.nexttowercolour(); break; @@ -1455,13 +1455,13 @@ static void menuactionpress(void) { case 0: //unlock time trials separately... - music.playef(11); + music.playef(Sound_VIRIDIAN); game.createmenu(Menu::unlockmenutrials); map.nexttowercolour(); break; case 1: //unlock intermissions - music.playef(11); + music.playef(Sound_VIRIDIAN); game.unlock[16] = true; game.unlocknotify[16] = true; game.unlock[6] = true; @@ -1471,7 +1471,7 @@ static void menuactionpress(void) break; case 2: //unlock no death mode - music.playef(11); + music.playef(Sound_VIRIDIAN); game.unlock[17] = true; game.unlocknotify[17] = true; game.createmenu(Menu::unlockmenu, true); @@ -1479,7 +1479,7 @@ static void menuactionpress(void) break; case 3: //unlock flip mode - music.playef(11); + music.playef(Sound_VIRIDIAN); game.unlock[18] = true; game.unlocknotify[18] = true; game.createmenu(Menu::unlockmenu, true); @@ -1487,14 +1487,14 @@ static void menuactionpress(void) break; case 4: //unlock jukebox - music.playef(11); + music.playef(Sound_VIRIDIAN); game.stat_trinkets = 20; game.createmenu(Menu::unlockmenu, true); game.savestatsandsettings_menu(); break; case 5: //unlock secret lab - music.playef(11); + music.playef(Sound_VIRIDIAN); game.unlock[8] = true; game.unlocknotify[8] = true; game.createmenu(Menu::unlockmenu, true); @@ -1502,7 +1502,7 @@ static void menuactionpress(void) break; default: //back - music.playef(11); + music.playef(Sound_VIRIDIAN); game.returnmenu(); map.nexttowercolour(); break; @@ -1513,19 +1513,19 @@ static void menuactionpress(void) { case 0: //next page - music.playef(11); + music.playef(Sound_VIRIDIAN); game.createmenu(Menu::credits2, true); map.nexttowercolour(); break; case 1: //last page - music.playef(11); + music.playef(Sound_VIRIDIAN); game.createmenu(Menu::credits6, true); map.nexttowercolour(); break; default: //back - music.playef(11); + music.playef(Sound_VIRIDIAN); game.returnmenu(); map.nexttowercolour(); break; @@ -1536,19 +1536,19 @@ static void menuactionpress(void) { case 0: //next page - music.playef(11); + music.playef(Sound_VIRIDIAN); game.createmenu(Menu::credits25, true); map.nexttowercolour(); break; case 1: //previous page - music.playef(11); + music.playef(Sound_VIRIDIAN); game.createmenu(Menu::credits, true); map.nexttowercolour(); break; case 2: //back - music.playef(11); + music.playef(Sound_VIRIDIAN); game.returnmenu(); map.nexttowercolour(); break; @@ -1559,19 +1559,19 @@ static void menuactionpress(void) { case 0: //next page - music.playef(11); + music.playef(Sound_VIRIDIAN); game.createmenu(Menu::credits3, true); map.nexttowercolour(); break; case 1: //previous page - music.playef(11); + music.playef(Sound_VIRIDIAN); game.createmenu(Menu::credits2, true); map.nexttowercolour(); break; default: //back - music.playef(11); + music.playef(Sound_VIRIDIAN); game.returnmenu(); map.nexttowercolour(); break; @@ -1582,7 +1582,7 @@ static void menuactionpress(void) { case 0: //next page - music.playef(11); + music.playef(Sound_VIRIDIAN); game.current_credits_list_index += 9; if (game.current_credits_list_index >= (int)SDL_arraysize(Credits::superpatrons)) @@ -1601,7 +1601,7 @@ static void menuactionpress(void) break; case 1: //previous page - music.playef(11); + music.playef(Sound_VIRIDIAN); game.current_credits_list_index -= 9; if (game.current_credits_list_index < 0) @@ -1620,7 +1620,7 @@ static void menuactionpress(void) break; default: //back - music.playef(11); + music.playef(Sound_VIRIDIAN); game.current_credits_list_index = 0; game.returnmenu(); map.nexttowercolour(); @@ -1632,7 +1632,7 @@ static void menuactionpress(void) { case 0: //next page - music.playef(11); + music.playef(Sound_VIRIDIAN); game.current_credits_list_index += 14; if (game.current_credits_list_index >= (int)SDL_arraysize(Credits::patrons)) @@ -1651,7 +1651,7 @@ static void menuactionpress(void) break; case 1: //previous page - music.playef(11); + music.playef(Sound_VIRIDIAN); game.current_credits_list_index -= 14; if (game.current_credits_list_index < 0) @@ -1670,7 +1670,7 @@ static void menuactionpress(void) break; default: //back - music.playef(11); + music.playef(Sound_VIRIDIAN); game.current_credits_list_index = 0; game.returnmenu(); map.nexttowercolour(); @@ -1682,7 +1682,7 @@ static void menuactionpress(void) { case 0: //next page - music.playef(11); + music.playef(Sound_VIRIDIAN); game.current_credits_list_index += 9; if (game.current_credits_list_index >= (int)SDL_arraysize(Credits::githubfriends)) @@ -1701,7 +1701,7 @@ static void menuactionpress(void) break; case 1: //previous page - music.playef(11); + music.playef(Sound_VIRIDIAN); game.current_credits_list_index -= 9; if (game.current_credits_list_index < 0) @@ -1720,7 +1720,7 @@ static void menuactionpress(void) break; default: //back - music.playef(11); + music.playef(Sound_VIRIDIAN); game.current_credits_list_index = 0; game.returnmenu(); map.nexttowercolour(); @@ -1732,20 +1732,20 @@ static void menuactionpress(void) { case 0: //first page - music.playef(11); + music.playef(Sound_VIRIDIAN); game.createmenu(Menu::credits, true); map.nexttowercolour(); break; case 1: //previous page - music.playef(11); + music.playef(Sound_VIRIDIAN); game.current_credits_list_index = SDL_arraysize(Credits::githubfriends) - 1 - (SDL_arraysize(Credits::githubfriends)-1)%9; game.createmenu(Menu::credits5, true); map.nexttowercolour(); break; default: //back - music.playef(11); + music.playef(Sound_VIRIDIAN); game.returnmenu(); map.nexttowercolour(); break; @@ -1764,52 +1764,52 @@ static void menuactionpress(void) if (!game.save_exists()) { //You have no saves but have something unlocked, or you couldn't have gotten here - music.playef(11); + music.playef(Sound_VIRIDIAN); startmode(Start_MAINGAME); } else if (game.telesummary == "") { //You at least have a quicksave, or you couldn't have gotten here - music.playef(11); + music.playef(Sound_VIRIDIAN); startmode(Start_MAINGAME_QUICKSAVE); } else if (game.quicksummary == "") { //You at least have a telesave, or you couldn't have gotten here - music.playef(11); + music.playef(Sound_VIRIDIAN); startmode(Start_MAINGAME_TELESAVE); } else { //go to a menu! - music.playef(11); + music.playef(Sound_VIRIDIAN); game.loadsummary(); //Prepare save slots to display game.createmenu(Menu::continuemenu); } } else if (game.currentmenuoption == 1 && game.unlock[8]) { - music.playef(11); + music.playef(Sound_VIRIDIAN); startmode(Start_SECRETLAB); } else if (game.currentmenuoption == sloffset+2) { //play modes - music.playef(11); + music.playef(Sound_VIRIDIAN); game.createmenu(Menu::playmodes); map.nexttowercolour(); } else if (game.currentmenuoption == sloffset+3 && game.save_exists()) { //newgame - music.playef(11); + music.playef(Sound_VIRIDIAN); game.createmenu(Menu::newgamewarning); map.nexttowercolour(); } else if (game.currentmenuoption == sloffset+ngoffset+4) { //back - music.playef(11); + music.playef(Sound_VIRIDIAN); game.returnmenu(); map.nexttowercolour(); } @@ -1820,14 +1820,14 @@ static void menuactionpress(void) { case 0: //yep - music.playef(11); + music.playef(Sound_VIRIDIAN); startmode(Start_MAINGAME); game.deletequick(); game.deletetele(); break; default: //back - music.playef(11); + music.playef(Sound_VIRIDIAN); game.returnmenu(); map.nexttowercolour(); break; @@ -1839,7 +1839,7 @@ static void menuactionpress(void) { case 0: key.sensitivity++; - music.playef(11); + music.playef(Sound_VIRIDIAN); if(key.sensitivity > 4) { key.sensitivity = 0; @@ -1848,7 +1848,7 @@ static void menuactionpress(void) break; case 6: - music.playef(11); + music.playef(Sound_VIRIDIAN); game.returnmenu(); map.nexttowercolour(); break; @@ -1859,11 +1859,11 @@ static void menuactionpress(void) { case 0: //back - music.playef(11); + music.playef(Sound_VIRIDIAN); break; default: //yep - music.playef(23); + music.playef(Sound_DESTROY); game.deletequick(); game.deletetele(); game.deletestats(); @@ -1879,12 +1879,12 @@ static void menuactionpress(void) switch (game.currentmenuoption) { default: - music.playef(11); + music.playef(Sound_VIRIDIAN); break; case 1: game.deletecustomlevelstats(); FILESYSTEM_deleteLevelSaves(); - music.playef(23); + music.playef(Sound_DESTROY); game.flashlight = 5; game.screenshake = 15; break; @@ -1895,20 +1895,20 @@ static void menuactionpress(void) case Menu::playmodes: if (game.currentmenuoption == 0 && !game.nocompetitive_unless_translator()) //go to the time trial menu { - music.playef(11); + music.playef(Sound_VIRIDIAN); game.createmenu(Menu::timetrials); map.nexttowercolour(); } else if (game.currentmenuoption == 1 && game.unlock[16]) { //intermission mode menu - music.playef(11); + music.playef(Sound_VIRIDIAN); game.createmenu(Menu::intermissionmenu); map.nexttowercolour(); } else if (game.currentmenuoption == 2 && game.unlock[17] && !game.nocompetitive()) //start a game in no death mode { - music.playef(11); + music.playef(Sound_VIRIDIAN); game.createmenu(Menu::startnodeathmode); map.nexttowercolour(); } @@ -1919,30 +1919,30 @@ static void menuactionpress(void) else if (game.currentmenuoption == 4) { //back - music.playef(11); + music.playef(Sound_VIRIDIAN); game.returnmenu(); map.nexttowercolour(); } else { - //Can't do yet! play sad sound - music.playef(2); + //Can't do yet! + music.playef(Sound_CRY); } break; case Menu::startnodeathmode: switch (game.currentmenuoption) { case 0: //start no death mode, disabling cutscenes - music.playef(11); + music.playef(Sound_VIRIDIAN); startmode(Start_NODEATHMODE_NOCUTSCENES); break; case 1: - music.playef(11); + music.playef(Sound_VIRIDIAN); startmode(Start_NODEATHMODE_WITHCUTSCENES); break; case 2: //back - music.playef(11); + music.playef(Sound_VIRIDIAN); game.returnmenu(); map.nexttowercolour(); break; @@ -1952,16 +1952,16 @@ static void menuactionpress(void) switch (game.currentmenuoption) { case 0: - music.playef(11); + music.playef(Sound_VIRIDIAN); startmode(Start_MAINGAME_TELESAVE); break; case 1: - music.playef(11); + music.playef(Sound_VIRIDIAN); startmode(Start_MAINGAME_QUICKSAVE); break; case 2: //back - music.playef(11); + music.playef(Sound_VIRIDIAN); game.returnmenu(); map.nexttowercolour(); break; @@ -1971,18 +1971,18 @@ static void menuactionpress(void) switch (game.currentmenuoption) { case 0: - music.playef(11); + music.playef(Sound_VIRIDIAN); game.createmenu(Menu::playint1); map.nexttowercolour(); break; case 1: - music.playef(11); + music.playef(Sound_VIRIDIAN); game.createmenu(Menu::playint2); map.nexttowercolour(); break; case 2: //back - music.playef(11); + music.playef(Sound_VIRIDIAN); game.returnmenu(); map.nexttowercolour(); break; @@ -1992,24 +1992,24 @@ static void menuactionpress(void) switch (game.currentmenuoption) { case 0: - music.playef(11); + music.playef(Sound_VIRIDIAN); startmode(Start_INTERMISSION1_VITELLARY); break; case 1: - music.playef(11); + music.playef(Sound_VIRIDIAN); startmode(Start_INTERMISSION1_VERMILION); break; case 2: - music.playef(11); + music.playef(Sound_VIRIDIAN); startmode(Start_INTERMISSION1_VERDIGRIS); break; case 3: - music.playef(11); + music.playef(Sound_VIRIDIAN); startmode(Start_INTERMISSION1_VICTORIA); break; case 4: //back - music.playef(11); + music.playef(Sound_VIRIDIAN); game.returnmenu(); map.nexttowercolour(); break; @@ -2019,24 +2019,24 @@ static void menuactionpress(void) switch (game.currentmenuoption) { case 0: - music.playef(11); + music.playef(Sound_VIRIDIAN); startmode(Start_INTERMISSION2_VITELLARY); break; case 1: - music.playef(11); + music.playef(Sound_VIRIDIAN); startmode(Start_INTERMISSION2_VERMILION); break; case 2: - music.playef(11); + music.playef(Sound_VIRIDIAN); startmode(Start_INTERMISSION2_VERDIGRIS); break; case 3: - music.playef(11); + music.playef(Sound_VIRIDIAN); startmode(Start_INTERMISSION2_VICTORIA); break; case 4: //back - music.playef(11); + music.playef(Sound_VIRIDIAN); game.returnmenu(); map.nexttowercolour(); break; @@ -2044,7 +2044,7 @@ static void menuactionpress(void) break; case Menu::gameover2: //back - music.playef(11); + music.playef(Sound_VIRIDIAN); music.play(Music_PRESENTINGVVVVVV); game.returntomenu(Menu::playmodes); map.nexttowercolour(); @@ -2055,52 +2055,52 @@ static void menuactionpress(void) case Menu::unlockintermission: case Menu::unlockflipmode: //back - music.playef(11); + music.playef(Sound_VIRIDIAN); game.createmenu(Menu::play, true); map.nexttowercolour(); break; case Menu::timetrials: if (game.currentmenuoption == 0 && game.unlock[9]) { - music.playef(11); + music.playef(Sound_VIRIDIAN); startmode(Start_TIMETRIAL_SPACESTATION1); } else if (game.currentmenuoption == 1 && game.unlock[10]) { - music.playef(11); + music.playef(Sound_VIRIDIAN); startmode(Start_TIMETRIAL_LABORATORY); } else if (game.currentmenuoption == 2 && game.unlock[11]) { - music.playef(11); + music.playef(Sound_VIRIDIAN); startmode(Start_TIMETRIAL_TOWER); } else if (game.currentmenuoption == 3 && game.unlock[12]) { - music.playef(11); + music.playef(Sound_VIRIDIAN); startmode(Start_TIMETRIAL_SPACESTATION2); } else if (game.currentmenuoption == 4 && game.unlock[13]) { - music.playef(11); + music.playef(Sound_VIRIDIAN); startmode(Start_TIMETRIAL_WARPZONE); } else if (game.currentmenuoption == 5 && game.unlock[14]) { - music.playef(11); + music.playef(Sound_VIRIDIAN); startmode(Start_TIMETRIAL_FINALLEVEL); } else if (game.currentmenuoption == 6) { //back - music.playef(11); + music.playef(Sound_VIRIDIAN); game.returnmenu(); map.nexttowercolour(); } else { - //Can't do yet! play sad sound - music.playef(2); + //Can't do yet! + music.playef(Sound_CRY); } break; case Menu::timetrialcomplete3: @@ -2108,14 +2108,14 @@ static void menuactionpress(void) { case 0: //back - music.playef(11); + music.playef(Sound_VIRIDIAN); music.play(Music_PRESENTINGVVVVVV); game.returntomenu(Menu::timetrials); map.nexttowercolour(); break; case 1: /* Replay time trial */ - music.playef(11); + music.playef(Sound_VIRIDIAN); startmode((enum StartMode) (game.timetriallevel + Start_FIRST_TIMETRIAL)); break; } @@ -2123,7 +2123,7 @@ static void menuactionpress(void) case Menu::gamecompletecontinue: case Menu::nodeathmodecomplete2: music.play(Music_PRESENTINGVVVVVV); - music.playef(11); + music.playef(Sound_VIRIDIAN); game.returnmenu(); map.nexttowercolour(); break; @@ -2132,13 +2132,13 @@ static void menuactionpress(void) { game.silence_settings_error = true; } - music.playef(11); + music.playef(Sound_VIRIDIAN); game.returnmenu(); map.nexttowercolour(); break; case Menu::errorloadinglevel: case Menu::warninglevellist: - music.playef(11); + music.playef(Sound_VIRIDIAN); game.returnmenu(); map.nexttowercolour(); break; @@ -2215,7 +2215,7 @@ void titleinput(void) key.controllerButtonDown() ) { updatebuttonmappings(game.currentmenuoption); - music.playef(11); + music.playef(Sound_VIRIDIAN); game.savestatsandsettings_menu(); return; } @@ -2232,7 +2232,7 @@ void titleinput(void) } else { - music.playef(11); + music.playef(Sound_VIRIDIAN); } if (game.menutestmode) { @@ -2364,7 +2364,7 @@ void titleinput(void) { game.menustart = true; music.play(Music_PRESENTINGVVVVVV); - music.playef(18); + music.playef(Sound_GAMESAVED); game.screenshake = 10; game.flashlight = 5; } @@ -2716,7 +2716,7 @@ void gameinput(void) obj.entities[e].ay = -3; } } - music.playef(0); + music.playef(Sound_FLIP); game.jumppressed = 0; game.totalflips++; } @@ -2732,7 +2732,7 @@ void gameinput(void) obj.entities[e].ay = 3; } } - music.playef(1); + music.playef(Sound_UNFLIP); game.jumppressed = 0; game.totalflips++; } @@ -2941,7 +2941,7 @@ void mapinput(void) { graphics.resumegamemode = true; } - music.playef(11); + music.playef(Sound_VIRIDIAN); } } else @@ -3048,7 +3048,7 @@ static void mapmenuactionpress(const bool version2_2) { game.flashlight = 5; game.screenshake = 10; - music.playef(18); + music.playef(Sound_GAMESAVED); game.savetime = game.timestring(); game.savearea = map.currentarea(map.area(game.roomx, game.roomy)); @@ -3074,7 +3074,7 @@ static void mapmenuactionpress(const bool version2_2) case 10: //return to pause menu - music.playef(11); + music.playef(Sound_VIRIDIAN); game.menupage = 32; break; case 11: @@ -3088,13 +3088,13 @@ static void mapmenuactionpress(const bool version2_2) game.fadetomenu = true; game.fadetomenudelay = 19; } - music.playef(11); + music.playef(Sound_VIRIDIAN); break; case 20: //return to game graphics.resumegamemode = true; - music.playef(11); + music.playef(Sound_VIRIDIAN); break; case 21: //quit to menu @@ -3106,16 +3106,16 @@ static void mapmenuactionpress(const bool version2_2) game.fadetolab = true; game.fadetolabdelay = 19; } - music.playef(11); + music.playef(Sound_VIRIDIAN); break; case 30: // Return to game graphics.resumegamemode = true; - music.playef(11); + music.playef(Sound_VIRIDIAN); break; case 31: // Graphic options and game options - music.playef(11); + music.playef(Sound_VIRIDIAN); game.gamestate = TITLEMODE; graphics.flipmode = false; game.ingame_titlemode = true; @@ -3129,7 +3129,7 @@ static void mapmenuactionpress(const bool version2_2) break; case 32: // Go to quit prompt - music.playef(11); + music.playef(Sound_VIRIDIAN); game.menupage = 10; break; } @@ -3182,7 +3182,7 @@ void teleporterinput(void) // Close teleporter menu graphics.resumegamemode = true; } - music.playef(11); + music.playef(Sound_VIRIDIAN); } } else diff --git a/desktop_version/src/KeyPoll.cpp b/desktop_version/src/KeyPoll.cpp index 84d0a901..7da97080 100644 --- a/desktop_version/src/KeyPoll.cpp +++ b/desktop_version/src/KeyPoll.cpp @@ -172,7 +172,7 @@ void KeyPoll::Poll(void) { /* Reload language files */ loc::loadtext(false); - music.playef(4); + music.playef(Sound_COIN); } BUTTONGLYPHS_keyboard_set_active(true); diff --git a/desktop_version/src/Logic.cpp b/desktop_version/src/Logic.cpp index 17e8c855..1d1af26c 100644 --- a/desktop_version/src/Logic.cpp +++ b/desktop_version/src/Logic.cpp @@ -31,11 +31,11 @@ void titlelogic(void) } else if (game.menudest == Menu::gameover2) { - music.playef(11); + music.playef(Sound_VIRIDIAN); } else if (game.menudest == Menu::timetrialcomplete3) { - music.playef(3); + music.playef(Sound_TRINKET); } game.createmenu(game.menudest, true); } @@ -187,7 +187,7 @@ void gamelogic(void) game.alarmdelay--; if (game.alarmdelay <= 0) { - music.playef(19); + music.playef(Sound_ALARM); game.alarmdelay = 20; } } @@ -204,7 +204,7 @@ void gamelogic(void) { obj.entities[i].tile = 144; } - music.playef(2); + music.playef(Sound_CRY); } if (obj.upset > 301) obj.upset = 301; } @@ -446,7 +446,7 @@ void gamelogic(void) game.swnrecord = game.swntimer; if (game.swnmessage == 0) { - music.playef(25); + music.playef(Sound_NEWRECORD); game.savestatsandsettings(); } game.swnmessage = 1; @@ -589,7 +589,7 @@ void gamelogic(void) game.unlockAchievement("vvvvvvsupgrav5"); game.swnbestrank = 1; game.swnmessage = 2+30; - music.playef(26); + music.playef(Sound_TROPHY); } } else if (game.swntimer >= 300 && game.swnrank == 1) @@ -600,7 +600,7 @@ void gamelogic(void) game.unlockAchievement("vvvvvvsupgrav10"); game.swnbestrank = 2; game.swnmessage = 2+30; - music.playef(26); + music.playef(Sound_TROPHY); } } else if (game.swntimer >= 450 && game.swnrank == 2) @@ -611,7 +611,7 @@ void gamelogic(void) game.unlockAchievement("vvvvvvsupgrav15"); game.swnbestrank = 3; game.swnmessage = 2+30; - music.playef(26); + music.playef(Sound_TROPHY); } } else if (game.swntimer >= 600 && game.swnrank == 3) @@ -622,7 +622,7 @@ void gamelogic(void) game.unlockAchievement("vvvvvvsupgrav20"); game.swnbestrank = 4; game.swnmessage = 2+30; - music.playef(26); + music.playef(Sound_TROPHY); } } else if (game.swntimer >= 900 && game.swnrank == 4) @@ -633,7 +633,7 @@ void gamelogic(void) game.unlockAchievement("vvvvvvsupgrav30"); game.swnbestrank = 5; game.swnmessage = 2+30; - music.playef(26); + music.playef(Sound_TROPHY); } } else if (game.swntimer >= 1800 && game.swnrank == 5) @@ -644,7 +644,7 @@ void gamelogic(void) game.unlockAchievement("vvvvvvsupgrav60"); game.swnbestrank = 6; game.swnmessage = 2+30; - music.playef(26); + music.playef(Sound_TROPHY); } } } @@ -753,9 +753,9 @@ void gamelogic(void) { game.hascontrol = false; } - if(game.timetrialcountdown == 120) music.playef(21); - if(game.timetrialcountdown == 90) music.playef(21); - if(game.timetrialcountdown == 60) music.playef(21); + if(game.timetrialcountdown == 120) music.playef(Sound_COUNTDOWN); + if(game.timetrialcountdown == 90) music.playef(Sound_COUNTDOWN); + if(game.timetrialcountdown == 60) music.playef(Sound_COUNTDOWN); if (game.timetrialcountdown == 30) { switch(game.timetriallevel) @@ -779,7 +779,7 @@ void gamelogic(void) music.play(Music_PREDESTINEDFATEREMIX); break; } - music.playef(22); + music.playef(Sound_GO); } } @@ -794,7 +794,7 @@ void gamelogic(void) { obj.entities[i].tile = 144; } - music.playef(2); + music.playef(Sound_CRY); } } } diff --git a/desktop_version/src/Music.h b/desktop_version/src/Music.h index 9be0fb9b..2a75ec08 100644 --- a/desktop_version/src/Music.h +++ b/desktop_version/src/Music.h @@ -31,6 +31,38 @@ enum Music_PREDESTINEDFATEREMIX = 15 }; +enum +{ + Sound_FLIP = 0, + Sound_UNFLIP = 1, + Sound_CRY = 2, + Sound_TRINKET = 3, + Sound_COIN = 4, + Sound_CHECKPOINT = 5, + Sound_CRUMBLE = 6, + Sound_DISAPPEAR = 7, + Sound_GRAVITYLINE = 8, + Sound_FLASH = 9, + Sound_TELEPORT = 10, + Sound_VIRIDIAN = 11, + Sound_VERDIGRIS = 12, + Sound_VICTORIA = 13, + Sound_VITELLARY = 14, + Sound_VIOLET = 15, + Sound_VERMILION = 16, + Sound_TERMINALTOUCH = 17, + Sound_GAMESAVED = 18, + Sound_ALARM = 19, + Sound_TERMINALTEXT = 20, + Sound_COUNTDOWN = 21, + Sound_GO = 22, + Sound_DESTROY = 23, + Sound_COMBINE = 24, + Sound_NEWRECORD = 25, + Sound_TROPHY = 26, + Sound_RESCUE = 27 +}; + class musicclass { public: diff --git a/desktop_version/src/Script.cpp b/desktop_version/src/Script.cpp index e0d593c1..ed0b510c 100644 --- a/desktop_version/src/Script.cpp +++ b/desktop_version/src/Script.cpp @@ -1095,39 +1095,39 @@ void scriptclass::run(void) { if (words[1] == "player") { - music.playef(11); + music.playef(Sound_VIRIDIAN); } else if (words[1] == "cyan") { - music.playef(11); + music.playef(Sound_VIRIDIAN); } else if (words[1] == "red") { - music.playef(16); + music.playef(Sound_VERMILION); } else if (words[1] == "green") { - music.playef(12); + music.playef(Sound_VERDIGRIS); } else if (words[1] == "yellow") { - music.playef(14); + music.playef(Sound_VITELLARY); } else if (words[1] == "blue") { - music.playef(13); + music.playef(Sound_VICTORIA); } else if (words[1] == "purple") { - music.playef(15); + music.playef(Sound_VIOLET); } else if (words[1] == "cry") { - music.playef(2); + music.playef(Sound_CRY); } else if (words[1] == "terminal") { - music.playef(20); + music.playef(Sound_TERMINALTEXT); } } else if (words[0] == "blackout") @@ -1749,7 +1749,7 @@ void scriptclass::run(void) else if (words[0] == "foundtrinket") { music.silencedasmusik(); - music.playef(3); + music.playef(Sound_TRINKET); size_t trinket = ss_toi(words[1]); if (trinket < SDL_arraysize(obj.collect)) @@ -1805,7 +1805,7 @@ void scriptclass::run(void) } else if (words[0] == "foundlab") { - music.playef(3); + music.playef(Sound_TRINKET); graphics.textboxremovefast();