#include "zcommon.acs"

bool interrupt = false;
int songLength = 23;

SCRIPT 01 OPEN
{
	SetFont("OPENING");
	SetHudSize(320, 200, 0);
  	HudMessage(s:"A"; HUDMSG_PLAIN, 3, 0, 160.0, 100.0, 0.0);
	AmbientSound("LOGO", 127);
	delay(256);
	
	SetMusic("STORY");
	SetFont("E1STORY1");
  	HudMessage(s:"A"; HUDMSG_PLAIN, 3, 0, 160.0, 100.0, 0.0);
	SetFont("CONFONT");
	HudMessage(s:"In the charcoal galaxy there is a world called Akhet.  The people there prospered, gifted by their patron goddess with warmth and nourishment.  They never knew strife.  That is, until the reign of King Dogpoop 2.";
		HUDMSG_TYPEON, 1, CR_TAN, 0.5, 0.5, 5.0, 0.1, 100.0);
	
	delay(songLength*35);
	SetMusic("STORY_RP");
	//delay(1024 - (songLength*35));
	SetFont("E1STORY2");
  	HudMessage(s:"A"; HUDMSG_PLAIN, 3, 0, 160.0, 100.0, 0.0);
	SetFont("CONFONT");
	HudMessage(s:"Dogpoop 2 was the kind of leader who devoted all the manpower and resources available to building enormous monuments dedicated to his visage and the well-being of his people was an afterthought.  Even worse, he captured and enslaved people from planet Semitus because his own people weren't sufficient enough for the job.  But eventually the Semites revolted and escaped Dogpoop 2's cruel dictatorship and in the crossfire destroyed the one thing he cared about more than himself: his only son.  In days the king vanished without a trace.";
		HUDMSG_TYPEON, 1, CR_TAN, 0.5, 0.5, 5.0, 0.1, 100.0);
		
	delay(2176);
	SetFont("E1STORY3");
  	HudMessage(s:"A"; HUDMSG_PLAIN, 3, 0, 160.0, 100.0, 0.0);
	SetFont("CONFONT");
	HudMessage(s:"Soon after the king's disappearance, Akhet was attacked by the Romule Empire led by the king of the freaks.  They were defenseless against the assault.";
		HUDMSG_TYPEON, 1, CR_TAN, 0.5, 0.5, 5.0, 0.1, 100.0);
		
	delay(768);
	SetFont("E1STORY4");
  	HudMessage(s:"A"; HUDMSG_PLAIN, 3, 0, 160.0, 100.0, 0.0);
	SetFont("CONFONT");
	HudMessage(s:"A plan was concocted to evacuate what's left of the population to planet Potassium in the distant Pastel Galaxy.  Potassium's solar system was surrounded by a vapor called bad plot that killed romules who breathed it, but was harmless to any other species.  Many got left behind and the Romules transformed Akhet into a tourist attraction.";
		HUDMSG_TYPEON, 1, CR_TAN, 0.5, 0.5, 5.0, 0.1, 100.0);
	
	delay(1280);
	SetFont("E1STORY5");
  	HudMessage(s:"A"; HUDMSG_PLAIN, 3, 0, 160.0, 100.0, 0.0);
	SetFont("CONFONT");
	HudMessage(s:"The Akhets began a new life and established their home on Potassium for the next two generations.  The environment was similar to that of Akhet, so adjusting wasn't hard.  They made cities to honor the home they left behind, such as New Thebes, New Cairo, and New Memphis.";
		HUDMSG_TYPEON, 1, CR_TAN, 0.5, 0.5, 5.0, 0.1, 100.0);
		
	/*
	delay(1024);
	SetFont("E1STORY5");
  	HudMessage(s:"A"; HUDMSG_PLAIN, 3, 0, 160.0, 100.0, 0.0);
	SetFont("CONFONT");
	HudMessage(s:"The Akhets began a new life on Potassium free of Dogpoop 2's rule.  One of Dogpoop 2's former advisors, Black Licorice, began a strange study and conducted unusual experiments involving innocent people.  He was banished to Lactose, Potassium's moon, and life on Potassium continued peacefully.";
		HUDMSG_TYPEON, 1, CR_TAN, 0.5, 0.5, 5.0, 0.1, 100.0);
	
	*/
	/*
	delay(1280);
	SetFont("E1STORY6");
  	HudMessage(s:"A"; HUDMSG_PLAIN, 3, 0, 160.0, 100.0, 0.0);
	SetFont("CONFONT");
	HudMessage(s:"A new generation was born, among them were Caramel and Molasses, who met where true love is always found: in kindergarten.  They grew up, married, and started a family of their own.";
		HUDMSG_TYPEON, 1, CR_TAN, 0.5, 0.5, 5.0, 0.1, 100.0);

	delay(768);
	SetFont("E1STORY7");
  	HudMessage(s:"A"; HUDMSG_PLAIN, 3, 0, 160.0, 100.0, 0.0);
	SetFont("CONFONT");
	HudMessage(s:"On the day of the birth of their second child, Aset, the goddess of the Akhet people, visited the oven system.  Black Licorice saw her coming and captured her to use her power.  Before he sealed her, she sent a part of her essence to Potassium.  It went to Caramel and Molasses's home, and the key to her power was locked inside their children.";
		HUDMSG_TYPEON, 1, CR_TAN, 0.5, 0.5, 5.0, 0.1, 100.0);
	*/
	
	delay(1152);
	SetFont("E1STORY8");
  	HudMessage(s:"A"; HUDMSG_PLAIN, 3, 0, 160.0, 100.0, 0.0);
	SetFont("CONFONT");
	HudMessage(s:"One day, a bird-like figure appeared at a humble, secluded home in the southern marshlands.  Two siblings, Square and Sine, went to see what it was.  He told them his name was Crepe and he came bearing a message for them.  He was the son of Aset, the patron goddess of the Akhets.  He told them that they, like him, were gifted by her at birth and they were demigods.";
		HUDMSG_TYPEON, 1, CR_TAN, 0.5, 0.5, 5.0, 0.1, 100.0);
		
	delay(1408);
	HudMessage(s:"He warned them that Lord Bananabread, a breadmonster from neighboring planet Fiber, had landed on Potassium and was planning a hostile takeover for the breadmonsters to colonize the world.  He had convinced the native inhabitants that Akhets were a danger to the world and offered to give them back what was lost of their ancestral land if they helped him get rid of the Akhets.  He made a deal with the lord of the underworld, Blackjack, to take away his mortality so Lord Bananabread could be invincible.";
		HUDMSG_TYPEON, 1, CR_TAN, 0.5, 0.5, 5.0, 0.1, 100.0);
		
	delay(1920);
	HudMessage(s:"Crepe told them that only Demigods could enter the underworld and live to come back, and he taught them how to use some of the divine powers they were given at birth.  They were the only ones who could bear the weight of this task if their race had any chance to survive this threat.  Crepe told them that to find the entrance to the underworld, they should seek out a man named Dr. Specific residing in the Mango Mountains to the northwest.  He would know how to get them there in haste.";
		HUDMSG_TYPEON, 1, CR_TAN, 0.5, 0.5, 5.0, 0.1, 100.0);
		
	/*
	delay(940);
	SetFont("E1STORY8");
  	HudMessage(s:"A"; HUDMSG_PLAIN, 3, 0, 160.0, 100.0, 0.0);
	SetFont("CONFONT");
	HudMessage(s:"Almost 20 years have passed since then.  These children, Square and Sine, now adults, found a strange being in their presence outside their home.  It was a humanoid bird-like figure.  He said he was Crepe, a Demigod hero from a faraway world.  He was not really there, only a shadow of his form was being projected to them.  He told Square and Sine that like himself, they were demigods, and they shared the same mother, Aset.";
		HUDMSG_TYPEON, 1, CR_TAN, 0.5, 0.5, 5.0, 0.1, 100.0);
		
	delay(1536);
	HudMessage(s:"He warned them of a breadmonster named Lord Bananabread that has come to claim territory on Potassium.  On Potassium's sister planet Fiber, the gorgons and the breadmonsters have long waged the Gorgon-Breadmonster wars.  The breadmonsters were kicked off the planet and with nowhere else to go, their leaders turned to Potassium to reform their empire.  However, there is not enough room for the Akhets, the breadmonsters, and the entire rest of the ecosystem, and a breadmonster expansion on potassium would lead to an ecological disaster that would wipe out what's left of the Akhet race.  Aset is the mother of their people, so Crepe sympathized with them, but he couldn't travel there to help them.  He counted on the two demigods to use their powers to save their people and Potassium.";
		HUDMSG_TYPEON, 1, CR_TAN, 0.5, 0.5, 5.0, 0.1, 100.0);
		
	delay(3072);
	HudMessage(s:"But it won't be easy.  Lord Bananabread made a deal with Blackjack, lord of the Potassium underworld, to hide his mortality so Lord Bananabread cannot be killed.  Square and Sine must traverse the underworld to retrieve his mortality and return to stop Lord Bananabread.  But nobody knows where to find the underworld.  Crepe knew of one person that could help.  Dr. Speciffic, a Midgardian Scientiffic Genius, was doing research on Potassium at the time.  He should know the layout of the entire world, and also has teleportation devices to send people across vast distances instantaneously.  Crepe told them that he is residing in a laboratory he built in the Mango Mountains to the northwest.";
		HUDMSG_TYPEON, 1, CR_TAN, 0.5, 0.5, 5.0, 0.1, 100.0);
	
	*/
	
	delay(1792);
	SetFont("E1STORY9");
  	HudMessage(s:"A"; HUDMSG_PLAIN, 3, 0, 160.0, 100.0, 0.0);
	SetFont("CONFONT");
	HudMessage(s:"Saying goodbye to Mom and Dad and filling Spot's water dish one last time, Square and Sine set off to the Mango Mountains for an incredible journey they won't soon forget.";
		HUDMSG_TYPEON, 1, CR_TAN, 0.5, 0.5, 5.0, 0.1, 100.0);

	delay(896);
	HudMessage(s:"";
		HUDMSG_TYPEON, 1, CR_TAN, 0.5, 0.5, 5.0, 0.1, 100.0);
	SetMusic("D_DM2TTL");
	Do
	{
		SetFont("TITLEPIC");
  		HudMessage(s:"A"; HUDMSG_PLAIN, 3, 0, 160.0, 100.0, 0.0);
		delay(512);
		SetFont("CREDIT");
  		HudMessage(s:"A"; HUDMSG_PLAIN, 3, 0, 160.0, 100.0, 0.0);
		delay(512);
	}
	until (interrupt == true);
	//ACS_EXECUTE(2,0,0,0,0);
}

SCRIPT 02 (VOID)
{
	SetFont("TITLEPIC");
  	HudMessage(s:"A"; HUDMSG_PLAIN, 3, 0, 160.0, 100.0, 0.0);
	delay(512);
	SetFont("CREDIT");
  	HudMessage(s:"A"; HUDMSG_PLAIN, 3, 0, 160.0, 100.0, 0.0);
	delay(512);
	restart;
}