This commit is contained in:
Paul 2000-10-19 15:40:24 +00:00
parent fd06495937
commit 5803cd54f1
7 changed files with 14 additions and 11 deletions

View File

@ -93,9 +93,9 @@ char *Str="Sponge\nBob\nSquare\nPants";
}
/*****************************************************************************/
void CGameScene::think()
void CGameScene::think(int _frames)
{
for(int i=0;i<GameState::getFramesSinceLast();i++)
for(int i=0;i<_frames;i++)
{
X+=Dx; Y+=Dy;
if (X<0+64) {X=0+64; Dx=-Dx;}

View File

@ -21,7 +21,7 @@ public:
void init();
void shutdown();
void render();
void think();
void think(int _frames);
char *getSceneName() {return "Game";}

View File

@ -159,7 +159,7 @@ int svol=255;
VECTOR ppos;
int psp=0;
void CPaulScene::think()
void CPaulScene::think(int _frames)
{
int pad;
int sfxId=-1;

View File

@ -39,7 +39,7 @@ public:
void init();
void shutdown();
void render();
void think();
void think(int _frames);
char *getSceneName() {return"PaulsScene";}
};

View File

@ -62,7 +62,7 @@ void GameState::think()
}
}
ASSERT(s_currentScene);
s_currentScene->think();
s_currentScene->think(getFramesSinceLast());
}

View File

@ -30,7 +30,7 @@ public:
virtual void init()=0;
virtual void shutdown()=0;
virtual void render()=0;
virtual void think()=0;
virtual void think(int _frames)=0;
virtual char *getSceneName()=0;
protected:

View File

@ -89,13 +89,17 @@ void MainLoop()
{
while (1)
{
int frames;
frames=GameState::getFramesSinceLast();
GameState::think();
GameState::render();
CSoundMediator::think(GameState::getTimeSinceLast());
CSoundMediator::think(frames);
#ifdef __USER_paul__
s_paulScene.think();
s_paulScene.think(frames);
s_paulScene.render();
#endif
@ -120,8 +124,7 @@ void MainLoop()
if (PadGetDown(0) & PAD_START) SaveScreen(VidGetScreen()->Draw.clip);
#endif
// PKG - Moved vram viewer to SELECT on pad 2 for art dev machines
if (PadGetDown(0) & PAD_SELECT) VRamViewer();
if (PadGetDown(0) & PAD_SELECT) VRamViewer();
#endif
}
}