Skip to content

Commit

Permalink
No commit message
Browse files Browse the repository at this point in the history
  • Loading branch information
Paul committed Apr 17, 2001
1 parent 6453e16 commit e560dec
Show file tree
Hide file tree
Showing 8 changed files with 71 additions and 81 deletions.
2 changes: 2 additions & 0 deletions makefile.gaz
Expand Up @@ -88,6 +88,8 @@ fileio_src := fileio \
frontend_src := credits \
demomode \
frontend \
fmvthq \
fmvintro \
maintitl \
options \
scrollbg \
Expand Down
6 changes: 3 additions & 3 deletions source/frontend/fmvintro.cpp
Expand Up @@ -16,7 +16,7 @@
Includes
-------- */

#include "frontend\fmvthq.h"
#include "frontend\fmvintro.h"

#ifndef __FMV_HEADER__
#include "fmv\fmv.h"
Expand Down Expand Up @@ -60,7 +60,7 @@
Params:
Returns:
---------------------------------------------------------------------- */
bool fmvPerFrameFunc()
static bool fmvPerFrameFunc()
{
PadUpdate();
if(PadGetDown(0)&(PAD_START|PAD_CROSS))
Expand All @@ -79,7 +79,7 @@ bool fmvPerFrameFunc()
---------------------------------------------------------------------- */
void CFrontEndFMVIntro::select()
{
FMV_play(FMV_THQ,&fmvPerFrameFunc);
FMV_play(FMV_INTRO,&fmvPerFrameFunc);
}

/*----------------------------------------------------------------------
Expand Down
66 changes: 5 additions & 61 deletions source/frontend/fmvthq.cpp
Expand Up @@ -54,45 +54,21 @@
Vars
---- */

static bool s_finished;


/*----------------------------------------------------------------------
Function:
Purpose:
Params:
Returns:
---------------------------------------------------------------------- */
bool fmvPerFrameFunc()
static bool fmvPerFrameFunc()
{
PadUpdate();
if(PadGetDown(0)&(PAD_START|PAD_CROSS))
{
PadUpdate();
s_finished=true;
return true;
}
return s_finished;
}


/*----------------------------------------------------------------------
Function:
Purpose:
Params:
Returns:
---------------------------------------------------------------------- */
void CFrontEndFMVTHQ::init()
{
}

/*----------------------------------------------------------------------
Function:
Purpose:
Params:
Returns:
---------------------------------------------------------------------- */
void CFrontEndFMVTHQ::shutdown()
{
return false;
}

/*----------------------------------------------------------------------
Expand All @@ -103,39 +79,7 @@ void CFrontEndFMVTHQ::shutdown()
---------------------------------------------------------------------- */
void CFrontEndFMVTHQ::select()
{
s_finished=false;
FMV_play(FMV_THQ,&fmvPerFrameFunc);
s_finished=true;
}

/*----------------------------------------------------------------------
Function:
Purpose:
Params:
Returns:
---------------------------------------------------------------------- */
void CFrontEndFMVTHQ::unselect()
{
}

/*----------------------------------------------------------------------
Function:
Purpose:
Params:
Returns:
---------------------------------------------------------------------- */
void CFrontEndFMVTHQ::render()
{
}

/*----------------------------------------------------------------------
Function:
Purpose:
Params:
Returns:
---------------------------------------------------------------------- */
void CFrontEndFMVTHQ::think(int _frames)
{
}

/*----------------------------------------------------------------------
Expand All @@ -146,7 +90,7 @@ void CFrontEndFMVTHQ::think(int _frames)
---------------------------------------------------------------------- */
int CFrontEndFMVTHQ::isReadyToExit()
{
return s_finished;
return true;
}

/*----------------------------------------------------------------------
Expand All @@ -157,7 +101,7 @@ int CFrontEndFMVTHQ::isReadyToExit()
---------------------------------------------------------------------- */
CFrontEndScene::FrontEndMode CFrontEndFMVTHQ::getNextMode()
{
return CFrontEndScene::MODE__MAIN_TITLES;
return CFrontEndScene::MODE__FMV_INTRO;
}

/*===========================================================================
Expand Down
10 changes: 0 additions & 10 deletions source/frontend/fmvthq.h
Expand Up @@ -37,20 +37,10 @@
class CFrontEndFMVTHQ : public CFrontEndMode
{
public:
void init();
void shutdown();
void select();
void unselect();
void render();
void think(int _frames);

int isReadyToExit();
CFrontEndScene::FrontEndMode getNextMode();


private:
int m_shuttingDown;

};


Expand Down
24 changes: 23 additions & 1 deletion source/frontend/frontend.cpp
Expand Up @@ -26,6 +26,14 @@
#include "frontend\maintitl.h"
#endif

#ifndef __FRONTEND_FMVTHQ_H__
#include "frontend\fmvthq.h"
#endif

#ifndef __FRONTEND_FMVINTRO_H__
#include "frontend\fmvintro.h"
#endif

#ifndef __FRONTEND_OPTIONS_H__
#include "frontend\options.h"
#endif
Expand Down Expand Up @@ -90,6 +98,8 @@
Vars
---- */

static CFrontEndFMVTHQ s_frontEndFMVTHQ;
static CFrontEndFMVIntro s_frontEndFMVIntro;
static CFrontEndMainTitles s_frontEndModeMainTitles;
static CFrontEndOptions s_frontEndModeOptions;
static CFrontEndStart s_frontEndStart;
Expand All @@ -98,6 +108,8 @@ static CFrontEndCredits s_frontEndCredits;

CFrontEndMode *CFrontEndScene::s_modeCodes[]=
{
&s_frontEndFMVTHQ, // MODE__FMV_THQ
&s_frontEndFMVIntro, // MODE__FMV_INTRO
&s_frontEndModeMainTitles, // MODE__MAIN_TITLES
&s_frontEndModeOptions, // MODE__GAME_OPTIONS
&s_frontEndStart, // MODE__CHOOSE_SLOT
Expand All @@ -119,6 +131,8 @@ CFrontEndScene FrontEndScene;
SpriteBank *m_sprites;
FontBank *m_font;

static int s_runOnce=false;


/*----------------------------------------------------------------------
Function:
Expand All @@ -138,7 +152,15 @@ void CFrontEndScene::init()
#if defined(__USER_art__) || defined(__USER_sbart__)
setMode(MODE__CHOOSE_SLOT);
#else
setMode(MODE__MAIN_TITLES);
if(s_runOnce)
{
setMode(MODE__FMV_INTRO);
}
else
{
s_runOnce=true;
setMode(MODE__FMV_THQ);
}
#endif

m_sprites=new ("MainTitle Sprites") SpriteBank();
Expand Down
14 changes: 8 additions & 6 deletions source/frontend/frontend.h
Expand Up @@ -39,6 +39,8 @@ class CFrontEndScene : public CScene
public:
typedef enum
{
MODE__FMV_THQ,
MODE__FMV_INTRO,
MODE__MAIN_TITLES,
MODE__GAME_OPTIONS,
MODE__CHOOSE_SLOT,
Expand Down Expand Up @@ -85,12 +87,12 @@ class CFrontEndScene : public CScene
class CFrontEndMode
{
public:
virtual void init()=0;
virtual void shutdown()=0;
virtual void select()=0;
virtual void unselect()=0;
virtual void render()=0;
virtual void think(int _frames)=0;
virtual void init() {;}
virtual void shutdown() {;}
virtual void select() {;}
virtual void unselect() {;}
virtual void render() {;}
virtual void think(int _frames) {;}

virtual int isReadyToExit()=0;
virtual CFrontEndScene::FrontEndMode getNextMode()=0;
Expand Down
2 changes: 2 additions & 0 deletions source/frontend/maintitl.cpp
Expand Up @@ -357,10 +357,12 @@ void CFrontEndMainTitles::think(int _frames)
m_demoTimeout+=_frames;
if(m_demoTimeout>DEMO_TIMEOUT_IN_SECONDS*GameState::getOneSecondInFrames())
{
/*
CFader::setFadingOut();
m_mode=MODE__GOTO_DEMO;
if(m_mainMenu->isSelected())
m_mainMenu->unselect();
*/
}
}
else
Expand Down
28 changes: 28 additions & 0 deletions users/paul/spongebob project/spongebob project.dsp

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit e560dec

Please sign in to comment.