home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2002 November
/
Chip_2002-11_cd1.bin
/
oddech
/
orbital
/
orbital.exe
/
src
/
logoscreen.cpp
< prev
next >
Wrap
C/C++ Source or Header
|
2002-07-14
|
2KB
|
68 lines
///////////////////////////////////////////////
//
// Snipe2d ludum dare 48h compo entry
//
// Jari Komppa aka Sol
// http://iki.fi/sol
//
///////////////////////////////////////////////
// License
///////////////////////////////////////////////
//
// This software is provided 'as-is', without any express or implied
// warranty. In no event will the authors be held liable for any damages
// arising from the use of this software.
//
// Permission is granted to anyone to use this software for any purpose,
// including commercial applications, and to alter it and redistribute it
// freely, subject to the following restrictions:
//
// 1. The origin of this software must not be misrepresented; you must not
// claim that you wrote the original software. If you use this software
// in a product, an acknowledgment in the product documentation would be
// appreciated but is not required.
// 2. Altered source versions must be plainly marked as such, and must not be
// misrepresented as being the original software.
// 3. This notice may not be removed or altered from any source distribution.
//
// (eg. same as ZLIB license)
//
///////////////////////////////////////////////
//
// Houses are taken from a satellite picture of glasgow.
//
// The sources are a mess, as I didn't even try to do anything
// really organized here.. and hey, it's a 48h compo =)
//
#include "snipe2d.h"
void logoscreen()
{
SDL_Surface *logoscreen = SDL_LoadBMP("logoscreen.bmp");
SDL_BlitSurface(logoscreen, NULL, gScreen, NULL);
SDL_UpdateRect(gScreen, 0, 0, 640, 480);
init();
int go = 0;
int startTick = GetTickCount();
while (!go)
{
SDL_Event event;
while ( SDL_PollEvent(&event) )
{
switch (event.type)
{
case SDL_KEYUP:
if (event.key.keysym.sym == SDLK_ESCAPE)
exit(0);
break;
case SDL_MOUSEBUTTONUP:
if ((GetTickCount() - startTick) > 500)
go = 1;
break;
case SDL_QUIT:
exit(0);
}
}
}
SDL_FreeSurface(logoscreen);
}