//==============================================================================
//
// Snake
// -----
// http://www.masterspace.biz/andreschnabel/
// 2006 by André Schnabel (thefrogs@web.de)
//
//==============================================================================

// splash.c

#include "splash.h"
#include "utils.h"

void ShowSplash(void)
{
	boolean splashDone = false;
	SDL_Surface *splashImg;
	char buildstr[256];
	
	strcpy(buildstr, "Build: ");
	strcat(buildstr, __DATE__ " " __TIME__);
	
	splashImg = LoadImage("splash.bmp", false);
	
	SDL_BlitSurface(splashImg, NULL, screen, NULL);		
	DrawText(buildstr, 10, 10, &fontBlack);		
	SysFlip();
	
	do
	{
		SysInput();
		
		if(keys[SDLK_RETURN])
		{
			keys[SDLK_RETURN] = false;
			splashDone = true;
		}		
	}
	while(!splashDone && !done);
	
	SDL_FreeSurface(splashImg);
}
