示例#1
0
/* MAIN FUNCTION */
int main(){
    initialize_game();
    load_images();
    play_menu_sound();
    set_initial_values();
    
    welcome_screen();
	return 0;
}END_OF_MAIN()
示例#2
0
文件: intro.c 项目: arvidfm/fiend
void show_poem(void)
{
  char text1[] = "That is not dead which can eternal lie";
	char text2[] = "And with strange aeons even death may die";
	
	int end=0;
	int time=0;


	
	float alpha1=0;
	float alpha2=0;

	float x1,y1,x2,y2;


	speed_counter = 0;

	x1 = 0;
	y1 = 220;
	x2 = 0;
	y2 = 260;
	while(!key[KEY_ESC] && !end)
	{
		
		while(speed_counter>0)
		{
			
			time++;
			if(time==5)
				play_menu_sound("gong",0);
			if(time<200)
			{
				alpha1+=0.5;
			}
			else if(time<600)
			{
				alpha1+=0.5;
				alpha2+=0.7;
			
			}
			else if(time<800)
			{
				alpha1-=1.6;
				alpha2-=1.6;
			}
			else
			{
				end=1;
			}

			if(alpha1>255)alpha1=255;
			if(alpha1<0)alpha1=0;
			if(alpha2>255)alpha2=255;
			if(alpha2<0)alpha2=0;

	
			speed_counter--;
		}
		clear(virt);
		textout_ex(virt,font_avalon2->dat,text1, x1,y1,makecol(alpha1,alpha1,alpha1), -1);
		textout_ex(virt,font_avalon2->dat,text2, x2,y2,makecol(alpha2,alpha2,alpha2), -1);
	
		blit(virt,screen,0,0,80,0,480,480);
	}

}
示例#3
0
文件: intro.c 项目: arvidfm/fiend
void show_ending(void)
{
	char *story_text[30] = {"You wake up in an hospital bed.",
							"A nurse stands beside you.",
							"She says there was a forest fire.", 
							"She says you where the only one alive.",
							"",
							"You know that is not true.",
							"",
							"Your master is with you.",
							"You are one with him now.",
							"The cermony brought you two together.",
							"",
							"Suddenly you feel an urge for human flesh.",
							"",
							"Politly you ask the nurse to come closer...",
							"",
							"END"};
	int end=0;
	int time=0;
	
	int i;

	float alpha=0;
	float a_add=1;
	
	int row=0;

	
	speed_counter = 0;

	alpha = 0;
	a_add=2.5;

	clear(virt);
	
	stop_all_sounds();
	stop_fiend_music();
	
	play_menu_sound("heartbeat",0);

	if(fiend_show_intro)
	{
		while(strcmp(story_text[row],"END")!=0)
		{
		
			while(speed_counter>0)
			{
				
				time++;

			
				if(time%240==0)
				{
					play_menu_sound("heartbeat",0);
					row++;
					if(strcmp(story_text[row],"")==0)row++;
					alpha=0;
				}
			
				alpha+=a_add;
				if(alpha>255)alpha=255;
				if(alpha<0)alpha=0;
			
	
				speed_counter--;
			}
		
			clear(virt);

			textout_ex(virt,font_avalon2->dat,story_text[row], 0,row*25,makecol(alpha,alpha,alpha), -1);

			for(i=0;i<row;i++)
			{
				textout_ex(virt,font_avalon2->dat,story_text[i], 0,i*25,makecol(255,255,255), -1);
			}
			//textout(virt,font_avalon2->dat,text, x2,y2,makecol(alpha2,alpha2,alpha2));
	
			blit(virt,screen,0,0,80,0,480,480);
		}
	

		while(time<310 && !key[KEY_ESC])
		{
			
			while(speed_counter>0)
			{
			
				time++;
			
	
				speed_counter--;
			}
		
		}
	}
	
	end =0;

	alpha = 255;
	
	while(!end)
	{
		
		while(speed_counter>0)
		{
			
			time++;

			if(time>200)alpha-=0.5;

			if(alpha==0)end=1;
			
			if(alpha>255)alpha=255;
			if(alpha<0)alpha=0;
		
			
	
			speed_counter--;
		}
		
		clear(virt);

		textout_centre_ex(virt,font_arial->dat,"T H E   E N D",240,220,makecol(alpha,alpha,alpha), -1);

		blit(virt,screen,0,0,80,0,480,480);
	}


}