2008-08-07 14:26:07 +02:00
|
|
|
/****************************************************************************
|
2008-12-11 18:38:29 +01:00
|
|
|
* legal.c
|
2008-08-07 14:26:07 +02:00
|
|
|
*
|
2008-12-12 16:38:04 +01:00
|
|
|
* legal informations screen
|
2008-12-11 18:38:29 +01:00
|
|
|
*
|
|
|
|
* code by Softdev (2006), Eke-Eke (2007,2008)
|
2008-08-07 14:26:07 +02:00
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
2008-12-11 18:38:29 +01:00
|
|
|
*
|
2008-08-07 14:26:07 +02:00
|
|
|
***************************************************************************/
|
|
|
|
|
2008-12-11 18:38:29 +01:00
|
|
|
|
2008-08-07 14:26:07 +02:00
|
|
|
#include "shared.h"
|
|
|
|
#include "font.h"
|
2009-04-15 17:33:51 +02:00
|
|
|
#include "menu.h"
|
2009-03-30 09:05:34 +02:00
|
|
|
|
2009-04-20 00:31:08 +02:00
|
|
|
#include "intro_pcm.h"
|
|
|
|
#include <asndlib.h>
|
|
|
|
|
2008-08-07 14:26:07 +02:00
|
|
|
/*
|
|
|
|
* This is the legal stuff - which must be shown at program startup
|
|
|
|
* Any derivative work MUST include the same textual output.
|
|
|
|
*
|
|
|
|
* In other words, play nice and give credit where it's due.
|
|
|
|
*/
|
|
|
|
void legal ()
|
|
|
|
{
|
|
|
|
int ypos = 64;
|
2009-04-15 17:33:51 +02:00
|
|
|
gx_texture *texture;
|
2008-08-07 14:26:07 +02:00
|
|
|
|
2009-04-15 17:33:51 +02:00
|
|
|
gxClearScreen((GXColor)BLACK);
|
2009-03-30 15:08:01 +02:00
|
|
|
|
2008-08-07 14:26:07 +02:00
|
|
|
WriteCentre (ypos, "Genesis Plus Sega Mega Drive Emulator (v1.2a)");
|
|
|
|
ypos += fheight;
|
|
|
|
WriteCentre (ypos, "(C) 1999 - 2003 Charles MacDonald");
|
|
|
|
ypos += fheight;
|
|
|
|
WriteCentre (ypos, "This is free software, and you are welcome to");
|
|
|
|
ypos += fheight;
|
|
|
|
WriteCentre (ypos, "redistribute it under the conditions of the");
|
|
|
|
ypos += fheight;
|
|
|
|
WriteCentre (ypos, "GNU GENERAL PUBLIC LICENSE Version 2");
|
|
|
|
ypos += fheight;
|
|
|
|
WriteCentre (ypos, "Additionally, the developers of this port");
|
|
|
|
ypos += fheight;
|
|
|
|
WriteCentre (ypos, "disclaims all copyright interests in the ");
|
|
|
|
ypos += fheight;
|
|
|
|
WriteCentre (ypos, "Nintendo Gamecube Porting code.");
|
|
|
|
ypos += fheight;
|
|
|
|
WriteCentre (ypos, "You are free to use it as you wish.");
|
2009-02-22 20:57:41 +01:00
|
|
|
ypos += 2*fheight;
|
2008-08-07 14:26:07 +02:00
|
|
|
|
2009-05-01 14:56:48 +02:00
|
|
|
texture= gxTextureOpenPNG(Bg_intro_c4_png,0);
|
2009-03-30 15:08:01 +02:00
|
|
|
if (texture)
|
|
|
|
{
|
2009-04-15 17:33:51 +02:00
|
|
|
gxDrawTexture(texture, (640-texture->width)/2, ypos, texture->width, texture->height,255);
|
2009-03-30 15:08:01 +02:00
|
|
|
ypos += texture->height + 2 * fheight;
|
|
|
|
if (texture->data) free(texture->data);
|
|
|
|
free(texture);
|
|
|
|
}
|
2008-08-07 14:26:07 +02:00
|
|
|
|
2009-04-15 17:33:51 +02:00
|
|
|
gxSetScreen ();
|
2009-04-07 01:01:19 +02:00
|
|
|
sleep (1);
|
2009-04-23 03:01:07 +02:00
|
|
|
GXColor color = {0x66,0x99,0xcc,0xff};
|
|
|
|
FONT_writeCenter("Press any button to skip intro",fheight,0,640,ypos,color);
|
2009-04-15 17:33:51 +02:00
|
|
|
gxSetScreen ();
|
2009-04-05 20:20:43 +02:00
|
|
|
int count = 100;
|
|
|
|
while (count > 0)
|
|
|
|
{
|
|
|
|
count--;
|
|
|
|
VIDEO_WaitVSync();
|
2009-04-15 17:33:51 +02:00
|
|
|
if (m_input.keys) return;
|
2009-04-05 20:20:43 +02:00
|
|
|
}
|
2009-02-22 20:57:41 +01:00
|
|
|
|
2009-04-15 17:33:51 +02:00
|
|
|
gxClearScreen((GXColor)BLACK);
|
2009-05-01 14:56:48 +02:00
|
|
|
texture = gxTextureOpenPNG(Bg_intro_c1_png,0);
|
2009-03-30 15:08:01 +02:00
|
|
|
if (texture)
|
|
|
|
{
|
2009-04-15 17:33:51 +02:00
|
|
|
gxDrawTexture(texture, (640-texture->width)/2, (480-texture->height)/2, texture->width, texture->height,255);
|
2009-03-30 15:08:01 +02:00
|
|
|
if (texture->data) free(texture->data);
|
|
|
|
free(texture);
|
|
|
|
}
|
|
|
|
|
2009-04-15 17:33:51 +02:00
|
|
|
gxSetScreen ();
|
2009-02-28 18:49:31 +01:00
|
|
|
sleep (1);
|
2009-02-22 20:57:41 +01:00
|
|
|
|
2009-04-15 17:33:51 +02:00
|
|
|
gxClearScreen((GXColor)WHITE);
|
2009-05-01 14:56:48 +02:00
|
|
|
texture = gxTextureOpenPNG(Bg_intro_c2_png,0);
|
2009-03-30 15:08:01 +02:00
|
|
|
if (texture)
|
|
|
|
{
|
2009-04-15 17:33:51 +02:00
|
|
|
gxDrawTexture(texture, (640-texture->width)/2, (480-texture->height)/2, texture->width, texture->height,255);
|
2009-03-30 15:08:01 +02:00
|
|
|
if (texture->data) free(texture->data);
|
|
|
|
free(texture);
|
|
|
|
}
|
|
|
|
|
2009-04-15 17:33:51 +02:00
|
|
|
gxSetScreen ();
|
2009-02-28 18:49:31 +01:00
|
|
|
sleep (1);
|
2009-02-22 20:57:41 +01:00
|
|
|
|
2009-04-15 17:33:51 +02:00
|
|
|
gxClearScreen((GXColor)BLACK);
|
2009-05-01 14:56:48 +02:00
|
|
|
texture = gxTextureOpenPNG(Bg_intro_c3_png,0);
|
2009-03-30 15:08:01 +02:00
|
|
|
if (texture)
|
|
|
|
{
|
2009-04-15 17:33:51 +02:00
|
|
|
gxDrawTexture(texture, (640-texture->width)/2, (480-texture->height)/2, texture->width, texture->height,255);
|
2009-03-30 15:08:01 +02:00
|
|
|
if (texture->data) free(texture->data);
|
|
|
|
free(texture);
|
|
|
|
}
|
|
|
|
|
2009-04-15 17:33:51 +02:00
|
|
|
gxSetScreen ();
|
2009-04-20 00:31:08 +02:00
|
|
|
ASND_Init();
|
|
|
|
ASND_Pause(0);
|
|
|
|
int voice = ASND_GetFirstUnusedVoice();
|
|
|
|
ASND_SetVoice(voice,VOICE_MONO_16BIT,44100,0,(u8 *)intro_pcm,intro_pcm_size,200,200,NULL);
|
2009-02-28 18:49:31 +01:00
|
|
|
sleep (2);
|
2009-04-20 00:31:08 +02:00
|
|
|
ASND_Pause(1);
|
|
|
|
ASND_End();
|
2008-08-07 14:26:07 +02:00
|
|
|
}
|