SBSPSS/source/backend/gameover.h

121 lines
2.4 KiB
C
Raw Normal View History

2001-01-11 20:40:55 +01:00
/*=========================================================================
gameover.h
Author: PKG
Created:
Project: Spongebob
Purpose:
Copyright (c) 2001 Climax Development Ltd
===========================================================================*/
#ifndef __BACKEND_GAMEOVER_H__
#define __BACKEND_GAMEOVER_H__
/*----------------------------------------------------------------------
Includes
-------- */
#ifndef __SYSTEM_GSTATE_H__
#include "system\gstate.h"
#endif
/* Std Lib
------- */
/*----------------------------------------------------------------------
Tyepdefs && Defines
------------------- */
/*----------------------------------------------------------------------
Structure defintions
-------------------- */
class CGameOverScene: public CScene
{
public:
void init();
void shutdown();
void render();
void think(int _frames);
int readyToShutdown();
2001-05-31 23:17:33 +02:00
char *getSceneName() {return"GameOver/Continue";}
2001-01-11 20:40:55 +01:00
private:
2001-05-31 23:17:33 +02:00
typedef enum
{
STATE__CONTINUE,
STATE__CONTINUE_TIMED_OUT,
STATE__GAME_OVER,
2001-07-11 18:15:44 +02:00
STATE__SPEECH_BEFORE_EXITING_TO_GAME,
2001-06-04 23:54:14 +02:00
STATE__EXITING_TO_GAME,
STATE__EXITING_TO_FRONT_END,
2001-05-31 23:17:33 +02:00
} GAMEOVER_STATE;
// Continue
enum
{
CONTINUE_STROBE_SPEED=75,
CONTINUE_FONT_SCALE=100,
CONTINUE_FONT_BASE_SIZE=400,
2001-06-04 23:54:14 +02:00
COUNTDOWN_TIME_SECOND_LENGTH=100, // Each 'second' on the countdown lasts this long
2001-05-31 23:17:33 +02:00
};
void initContinue();
void thinkContinue(int _frames);
void renderContinue();
int m_continueFontOffset;
int m_continueFontSin;
int m_continueTimer;
// Game over
2001-06-04 23:54:14 +02:00
enum
{
GAMEOVER_FONT_SCALE=511,
GAMEOVER_FONT_GROWSPEED=150,
GAMEOVER_FONT_GROWSPACING=900,
GAMEOVER_FONT_MAXSIN=1500,
};
2001-05-31 23:17:33 +02:00
void initGameOver();
void thinkGameOver(int _frames);
void renderGameOver();
2001-06-04 23:54:14 +02:00
int m_gameOverTimer;
int m_finishedGrowingText;
2001-05-31 23:17:33 +02:00
GAMEOVER_STATE m_state;
class ScalableFontBank *m_font;
int m_readyToExit;
unsigned char *m_image;
2001-01-11 20:40:55 +01:00
2001-07-11 18:15:44 +02:00
int m_hasPlayedFirstSpeech;
int m_hasPlayedSecondSpeech;
2001-07-11 22:05:02 +02:00
class CActorGfx *m_anotherGfx,*m_patrickGfx;
2001-07-11 18:15:44 +02:00
int m_animFrame;
2001-01-11 20:40:55 +01:00
};
/*----------------------------------------------------------------------
Globals
------- */
extern CGameOverScene GameOverScene;
/*----------------------------------------------------------------------
Functions
--------- */
/*---------------------------------------------------------------------- */
#endif /* __BACKEND_GAMEOVER_H__ */
/*===========================================================================
end */