objects/oScreen/keypress_F1.gml
From spelunky.gmk, Spelunky Classic 1.1's source, © 2008, 2009 Derek Yu and Mossmouth, LLC, shown whole under the Spelunky User License v1.1b. Extracted by spelunky.ai's tools, an unofficial fan project, one file per script or event; the // ==== lines are the extractor's, naming each action of the event. Some scripts are others' work that Derek Yu credits in the source's readme.txt: Martin Piecyk's platform engine, ChevyRay's view scaling scripts and tsg1zzn's Super Sound System.
oScreen's keypress F1 event, 19 lines of GML.
if (paused and global.plife > 0 and isLevel()){ instance_activate_all(); paused = false; with oPlayer1 { if (facing == 18) xVel = -3; else xVel = 3; yVel = -6; global.plife = -99; } if (SS_IsSoundPlaying(global.musTitle)) SS_SetSoundVol(global.musTitle, 10000); if (SS_IsSoundPlaying(global.musCave)) SS_SetSoundVol(global.musCave, 10000); if (SS_IsSoundPlaying(global.musLush)) SS_SetSoundVol(global.musLush, 10000); if (SS_IsSoundPlaying(global.musTemple)) SS_SetSoundVol(global.musTemple, 10000); if (SS_IsSoundPlaying(global.musBoss)) SS_SetSoundVol(global.musBoss, 10000); stopAllMusic();}