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.
This commit is contained in:
Misa
2023-06-03 15:29:02 -07:00
parent cdeca65be7
commit 4058975ce9
8 changed files with 367 additions and 335 deletions

View File

@@ -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);