This commit is contained in:
parent
fd06495937
commit
5803cd54f1
7 changed files with 14 additions and 11 deletions
|
@ -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;
|
X+=Dx; Y+=Dy;
|
||||||
if (X<0+64) {X=0+64; Dx=-Dx;}
|
if (X<0+64) {X=0+64; Dx=-Dx;}
|
||||||
|
|
|
@ -21,7 +21,7 @@ public:
|
||||||
void init();
|
void init();
|
||||||
void shutdown();
|
void shutdown();
|
||||||
void render();
|
void render();
|
||||||
void think();
|
void think(int _frames);
|
||||||
char *getSceneName() {return "Game";}
|
char *getSceneName() {return "Game";}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -159,7 +159,7 @@ int svol=255;
|
||||||
VECTOR ppos;
|
VECTOR ppos;
|
||||||
int psp=0;
|
int psp=0;
|
||||||
|
|
||||||
void CPaulScene::think()
|
void CPaulScene::think(int _frames)
|
||||||
{
|
{
|
||||||
int pad;
|
int pad;
|
||||||
int sfxId=-1;
|
int sfxId=-1;
|
||||||
|
|
|
@ -39,7 +39,7 @@ public:
|
||||||
void init();
|
void init();
|
||||||
void shutdown();
|
void shutdown();
|
||||||
void render();
|
void render();
|
||||||
void think();
|
void think(int _frames);
|
||||||
char *getSceneName() {return"PaulsScene";}
|
char *getSceneName() {return"PaulsScene";}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -62,7 +62,7 @@ void GameState::think()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ASSERT(s_currentScene);
|
ASSERT(s_currentScene);
|
||||||
s_currentScene->think();
|
s_currentScene->think(getFramesSinceLast());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -30,7 +30,7 @@ public:
|
||||||
virtual void init()=0;
|
virtual void init()=0;
|
||||||
virtual void shutdown()=0;
|
virtual void shutdown()=0;
|
||||||
virtual void render()=0;
|
virtual void render()=0;
|
||||||
virtual void think()=0;
|
virtual void think(int _frames)=0;
|
||||||
virtual char *getSceneName()=0;
|
virtual char *getSceneName()=0;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
|
@ -89,13 +89,17 @@ void MainLoop()
|
||||||
{
|
{
|
||||||
while (1)
|
while (1)
|
||||||
{
|
{
|
||||||
|
int frames;
|
||||||
|
|
||||||
|
frames=GameState::getFramesSinceLast();
|
||||||
|
|
||||||
GameState::think();
|
GameState::think();
|
||||||
GameState::render();
|
GameState::render();
|
||||||
|
|
||||||
CSoundMediator::think(GameState::getTimeSinceLast());
|
CSoundMediator::think(frames);
|
||||||
|
|
||||||
#ifdef __USER_paul__
|
#ifdef __USER_paul__
|
||||||
s_paulScene.think();
|
s_paulScene.think(frames);
|
||||||
s_paulScene.render();
|
s_paulScene.render();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -120,7 +124,6 @@ void MainLoop()
|
||||||
if (PadGetDown(0) & PAD_START) SaveScreen(VidGetScreen()->Draw.clip);
|
if (PadGetDown(0) & PAD_START) SaveScreen(VidGetScreen()->Draw.clip);
|
||||||
#endif
|
#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
|
#endif
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue