Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- global script noF6
- {
- void run()
- {
- int quit = 0; int deathframe; bool cur_selection;
- while(Link->HP > 0)
- {
- Waitdraw(); Waitframe();
- }
- while(!quit)
- {
- //Set game music to a silent MIDI.
- Link->HP = 1;
- Link->Invisible = true;
- Link->CollDetection = false;
- //Clean up screen objects
- if ( Screen->NumNPCs() )
- {
- for ( int q = Screen->NumNPCs(); q > 0; --q )
- { npc n = Screen->LoadNPC(q); Remove(n); }
- }
- if ( Screen->NumLWeapons() )
- {
- for ( int q = Screen->NumLWeapons(); q > 0; --q )
- { lweapon n = Screen->LoadLWeapon(q); Remove(n); }
- }
- if ( Screen->NumEWeapons() )
- {
- for ( int q = Screen->NumEWeapons(); q > 0; --q )
- { eweapon n = Screen->LoadEWeapon(q); Remove(n); }
- }
- if ( Screen->NumItems() )
- {
- for ( int q = Screen->NumItems(); q > 0; --q )
- { item n = Screen->LoadItem(q); Remove(n); }
- }
- //clear all ffcs
- for ( int q = 1; q < 33; ++q )
- {
- ffc f = Screen->LoadFFC(q);
- f->Data = 0; f->Script = 0;
- }
- //Do Link Death animation
- if ( deathframe == 0 ) Game->PlaySound(SFX_LINKDEATH);
- while ( ++deathframe < MAX_DEATHFRAME )
- {
- //spin Link around by drawing his tiles, then make the wink out.
- Waitdraw(); Waitframe();
- }
- // GAME OVER SCREEN
- //Play game over midi.
- //Draw black background with Quad()
- //Draw text SAVE / DON'T SAVE
- //Draw cursor, with SAVE as the default.
- cur_selection = true;
- if ( Link->PressDown || Link->PressUp )
- {
- cur_selection = !cur_selection; //flip its state
- Game->PlaySound(SFX_GAMEOVERSCREEN_CURSOR);
- }
- if ( Link->PressStart )
- {
- Link->PressStart = false; Link->InputStart = false;
- Game->PlaySound(SFX_GAMEOVERSCREEN_SELECTION);
- if ( cur_selection ) quit = 1;
- else quit = 2; //no save
- }
- Waitdraw(); Waitframe();
- }
- if ( quit == 1 )
- {
- Game->Save();
- Game->End();
- }
- else Game->End();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement