This commit is contained in:
parent
36925da8e6
commit
40abc1e120
10 changed files with 294 additions and 16 deletions
171
source/frontend/credits.cpp
Normal file
171
source/frontend/credits.cpp
Normal file
|
@ -0,0 +1,171 @@
|
|||
/*=========================================================================
|
||||
|
||||
credits.cpp
|
||||
|
||||
Author: PKG
|
||||
Created:
|
||||
Project: Spongebob
|
||||
Purpose:
|
||||
|
||||
Copyright (c) 2000 Climax Development Ltd
|
||||
|
||||
===========================================================================*/
|
||||
|
||||
|
||||
/*----------------------------------------------------------------------
|
||||
Includes
|
||||
-------- */
|
||||
|
||||
#include "frontend\credits.h"
|
||||
|
||||
#ifndef __GFX_SPRBANK_H__
|
||||
#include "gfx\sprbank.h"
|
||||
#endif
|
||||
|
||||
#ifndef __LOCALE_TEXTDBASE_H__
|
||||
#include "locale\textdbase.h"
|
||||
#endif
|
||||
|
||||
#ifndef __GFX_FADER_H__
|
||||
#include "gfx\fader.h"
|
||||
#endif
|
||||
|
||||
#ifndef __PRIM_HEADER__
|
||||
#include "gfx\prim.h"
|
||||
#endif
|
||||
|
||||
#ifndef __PAD_PADS_H__
|
||||
#include "pad\pads.h"
|
||||
#endif
|
||||
|
||||
|
||||
/* Std Lib
|
||||
------- */
|
||||
|
||||
/* Data
|
||||
---- */
|
||||
|
||||
#ifndef __SPR_FRONTEND_H__
|
||||
#include <frontend.h>
|
||||
#endif
|
||||
|
||||
|
||||
/*----------------------------------------------------------------------
|
||||
Tyepdefs && Defines
|
||||
------------------- */
|
||||
|
||||
/*----------------------------------------------------------------------
|
||||
Structure defintions
|
||||
-------------------- */
|
||||
|
||||
/*----------------------------------------------------------------------
|
||||
Function Prototypes
|
||||
------------------- */
|
||||
|
||||
/*----------------------------------------------------------------------
|
||||
Vars
|
||||
---- */
|
||||
|
||||
/*----------------------------------------------------------------------
|
||||
Function:
|
||||
Purpose:
|
||||
Params:
|
||||
Returns:
|
||||
---------------------------------------------------------------------- */
|
||||
void CFrontEndCredits::init()
|
||||
{
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------------
|
||||
Function:
|
||||
Purpose:
|
||||
Params:
|
||||
Returns:
|
||||
---------------------------------------------------------------------- */
|
||||
void CFrontEndCredits::shutdown()
|
||||
{
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------------
|
||||
Function:
|
||||
Purpose:
|
||||
Params:
|
||||
Returns:
|
||||
---------------------------------------------------------------------- */
|
||||
void CFrontEndCredits::select()
|
||||
{
|
||||
m_shuttingDown=false;
|
||||
CFader::setFadingIn();
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------------
|
||||
Function:
|
||||
Purpose:
|
||||
Params:
|
||||
Returns:
|
||||
---------------------------------------------------------------------- */
|
||||
void CFrontEndCredits::unselect()
|
||||
{
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------------
|
||||
Function:
|
||||
Purpose:
|
||||
Params:
|
||||
Returns:
|
||||
---------------------------------------------------------------------- */
|
||||
void CFrontEndCredits::render()
|
||||
{
|
||||
POLY_G4 *g4;
|
||||
|
||||
g4=GetPrimG4();
|
||||
setXYWH(g4,0,0,512,256);
|
||||
setRGB0(g4,99,50,50);
|
||||
setRGB1(g4,50,50,99);
|
||||
setRGB2(g4,50,99,50);
|
||||
setRGB3(g4,99,50,99);
|
||||
AddPrimToList(g4,1001);
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------------
|
||||
Function:
|
||||
Purpose:
|
||||
Params:
|
||||
Returns:
|
||||
---------------------------------------------------------------------- */
|
||||
void CFrontEndCredits::think(int _frames)
|
||||
{
|
||||
if(!m_shuttingDown)
|
||||
{
|
||||
if(PadGetDown(0)&(PAD_CROSS|PAD_START))
|
||||
{
|
||||
m_shuttingDown=true;
|
||||
CFader::setFadingOut();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------------
|
||||
Function:
|
||||
Purpose:
|
||||
Params:
|
||||
Returns:
|
||||
---------------------------------------------------------------------- */
|
||||
int CFrontEndCredits::isReadyToExit()
|
||||
{
|
||||
return !CFader::isFading()&&m_shuttingDown;
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------------
|
||||
Function:
|
||||
Purpose:
|
||||
Params:
|
||||
Returns:
|
||||
---------------------------------------------------------------------- */
|
||||
CFrontEndScene::FrontEndMode CFrontEndCredits::getNextMode()
|
||||
{
|
||||
return CFrontEndScene::MODE__MAIN_TITLES;
|
||||
}
|
||||
|
||||
/*===========================================================================
|
||||
end */
|
Loading…
Add table
Add a link
Reference in a new issue