/******************************************************************************/
#include "stdafx.h"
#include "Main.h"
/******************************************************************************/
Bool InitIntro()
{
return true;
}
void ShutIntro()
{
}
/******************************************************************************/
Bool UpdateIntro()
{
if(StateActive->time()>3 || Kb.bp(KB_ESC))StateSelectServer.set(1.0f);
return true;
}
/******************************************************************************/
static Flt Alpha(Flt blend_in_start, Flt blend_in_end, Flt blend_out_start, Flt blend_out_end)
{
Flt t=StateActive->time();
return (t<=blend_in_end) ? LerpRS(blend_in_start, blend_in_end , t)
: LerpRS(blend_out_end , blend_out_start, t);
}
/******************************************************************************/
void DrawIntro()
{
D.clear();
//logo
Images("gfx/logo/titre2.gfx");
//
{
Flt alpha=Alpha(3,4,8,9);
TextDS tds; tds.scale*=1.4f; tds.color=ColorAlpha(tds.color,alpha);
D.text(tds, 0, 0.4f, "Creer par Kreathyon");
D.text(tds, 0, 0.3f, "www.excalinox.info/PSulfuria/");
}
//logo
Images("gfx/logo/titre2.gfx");
// Press any key..
{
TextDS tds; tds.scale*=1.2f; tds.color=ColorAlpha(tds.color, Alpha(10,11,0,-1)*Lerp(0.5f, 1.0f, Abs(1-Frac(StateActive->time(), 2))));
D.text(tds, 0, -0.8f, "Appuyez sur une touche");
}
}
/******************************************************************************/
State StateIntro(UpdateIntro, DrawIntro, InitIntro, ShutIntro);
/******************************************************************************/