Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ///////////////////////////////
- /// Title Screen FFC ///
- /// for Zelda Classic v2.55 ///
- /// 11th November, 2018 ///
- /// By: ZoriaRPG ///
- //////////////////////////////////////////////////////////////////////////////
- /// This script is used to run a title screen, using FFCs, and uses one ///
- /// FFC to establish the functions of the title screen, which begins the ///
- /// game by pressing the START button, as one might expect to happen in ///
- /// games that actually *have* a START button. ///
- /// ///
- /// You may change the button to suit your game, by replacing ImputStart ///
- /// with the desired input, such as InputEx1, if you want a game to start ///
- /// by pressing SELECT, such as a few Kusoge titles do, that I can recall. ///
- /// ///
- /// Set to 'Run at Sceen init' in FFC Flags! ///
- // On the screen where you run this, be sure to set 'Link is Invisible' ///
- /// in Screen Flags. ///
- //////////////////////////////////////////////////////////////////////////////
- /// ............... ///
- /// FFC ARGUMENTS ///
- /// ............... ///
- ///---------------------------{ D0: Start SFX }----------------------------///
- /// D0: SFX to play when the player presses 'START'. ///
- /// Set fron Quest->Audio->SFX Data. ///
- ///---------------------------{ D1: Delay Time }---------------------------///
- /// D1: Length of time, between pressing start, and the game starting. ///
- /// Time this to match your SFX, where 60 = 1-second. ///
- /// (240, would therefore be four-seconds, and is my default value.) ///
- ///----------------------{ D2/D3: Warp Destinations }----------------------///
- /// D2: If using a direct warp, set this to the DMAP number for the warp ///
- /// (not the'Map' number, but the 'DMAP' number), stating at 0. ///
- /// D3: If using direct warps, set this to the screen number for the ///
- /// warp destination. This will use WARP RETURN 'A'. ///
- ///------------------------{ D4: Secret Warp Mode }------------------------///
- /// D4: If you are going to use a SENSITIVE WARP tile, placed under the ///
- /// player, to control the warp (and thus, control fade effects), then ///
- /// set this to a value of '1' (or greater). Set warp destinations from ///
- /// Screen->Tilewarp, and set your tile warp combo in Screen->Secrets, as ///
- /// SECRET TILE 0, then place Flag-16 over where te player is caged on ///
- /// your title screen. ///
- //////////////////////////////////////////////////////////////////////////////
- //////////////
- /// Params ///
- //////////////////////////////////////////////////////////////////////////////
- /// ///
- /// D0: The sound to play. WIll use SOUND if this is < 1. ///
- /// D1: The timer value (delay) after pressing START, before exiting. ///
- /// D1: If this is < 1, then the constant value TIMER will be assigned ///
- /// D1: to it. ///
- /// D2: The destination DMap to use when exiting the splash screen, if we ///
- /// D2: aren't using secrets to do it. ///
- /// D3: The destination Screen to use when exiting the splash screen, if ///
- /// D3: we aren't using secrets to do it. ///
- /// D4: If we are using screen secrets to warp, set this to 1. ///
- /// D4: Otherwise, set it to 0 for a scripted warp. ///
- //////////////////////////////////////////////////////////////////////////////
- typedef const int define;
- typedef const int config;
- ffc script title
- {
- int RAM[3] = { 0, 0, 0 };
- define SPLASH = 0; //Has splash been seen in the past.
- define TIMER = 1;
- define WAITING = 2;
- define PRESSED = 3;
- config SOUND = 63;
- config TIMERVALUE = 100;
- config SECRETS = 1;
- void run(int sfx, int timevalue, int dmap, int screen, int secrets)
- {
- Link->InputStart = false; //present subscreen from falling.
- if ( timevalue < 1 ) timerValue = TIMERVALUE;
- if ( sfx < 1 ) sfx = SOUND;
- while(RAM[WAITING])
- { //The main while loop.
- if ( !RAM[SPLASH] )
- {
- RAM[SPLASH] = 1;
- }
- if (Link->InputStart)
- {
- //Is the player presses START
- Link->InputStart = false; //Keep subscreen from falling.
- RAM[PRESSED] = 1; //Initiate countdown timer.
- Audio->PlaySound(sfx); //Play SFX set in D0.
- }
- if(RAM[PRESSED])
- { //Run Timer
- --timevalue;
- //Timer counds up, until it reaches amount set in D1.
- }
- if(timeValue <= 0)
- { //if timer is equal to, or greater than value of D1.
- if ( secrets > 0 )
- { //If D4 is set to 1 or higher...
- Screen->TriggerSecrets(); //Trigger secret combos. Use this if using a warp combo.
- }
- else
- { //If D4 is set to 0, and we are using direct warps...
- Link->Warp(dmap, screen); //Warp Link to te DMAP set in D2, and the screen set in D3, using Warp Return A.
- }
- }
- Waitframe(); //Pause, to cycle the loop.
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement