Prev: B253 Up: Map Next: B2BE
B2B6: Play the menu tune once per visit
Used by the routine at menu_loop.
The menu loop calls this every time round. $5BD1 remembers that the tune has been played, so it plays only the first time; start_menu clears the flag with the rest of the game's variables, so it plays again after the next game. Falls into play_audio_until_keypress.
Input
DE the tune
play_audio_wait_key B2B6 LD HL,$5BD1 played already?
B2B9 LD A,(HL)
B2BA AND A
B2BB RET NZ
B2BC SET 0,(HL) not again until the variables are next cleared
Prev: B253 Up: Map Next: B2BE