SBSPSS/source/game/game.cpp

68 lines
1.5 KiB
C++
Raw Normal View History

2000-08-29 21:54:22 +02:00
/**********************/
/*** Main Game File ***/
/**********************/
#include "system\global.h"
#include "fileio\fileio.h"
#include "pad\pads.h"
#include "system\vid.h"
#include "gfx\prim.h"
#include "utils\utils.h"
#include "game\game.h"
#include "system\gstate.h"
#include "gfx\font.h"
#include "gfx\fdata.h"
/*****************************************************************************/
FontBank *CGameScene::s_genericFont;
/*****************************************************************************/
CGameScene GameScene;
/*****************************************************************************/
// Note, do not load any data in this function
void CGameScene::Init()
{
s_genericFont=new ("CGameScene::Init") FontBank();
s_genericFont->initialise( &standardFont );
2000-08-29 22:16:17 +02:00
s_genericFont->setColour( 255, 255 , 0 );
VidSetClearScreen(1);
2000-08-29 21:54:22 +02:00
}
/*****************************************************************************/
void CGameScene::Shutdown()
{
}
/*****************************************************************************/
2000-08-29 22:16:17 +02:00
int X=512/2;
int Y=256/2;
int Dx=+7;
int Dy=-3;
2000-08-29 21:54:22 +02:00
void CGameScene::Render()
{
2000-08-29 22:16:17 +02:00
char *Str="Sponge\nBob\nSquare\nPants";
X+=Dx; Y+=Dy;
if (X<0+64) {X=0+64; Dx=-Dx;}
if (X>512-64) {X=512-64; Dx=-Dx;}
if (Y<0+64) {Y=0+64; Dy=-Dy;}
if (Y>256-64) {Y=256-64; Dy=-Dy;}
s_genericFont->print(X,Y,(u8*)Str);
2000-08-29 21:54:22 +02:00
}
/*****************************************************************************/
bool CGameScene::Control()
{
return 1;
}
/*****************************************************************************/