This commit is contained in:
parent
c9cab419ec
commit
d6ee366bb7
3 changed files with 35 additions and 3 deletions
|
@ -295,6 +295,8 @@ int CConversation::s_textPageOffset;
|
|||
int CConversation::s_maxTextPageOffset;
|
||||
SpriteBank *CConversation::s_sprites;
|
||||
|
||||
int CConversation::s_ignoreNewlyPressedButtonsOnPadThisThink;
|
||||
|
||||
|
||||
static xmPlayingId s_playingSfxId;
|
||||
|
||||
|
@ -323,6 +325,8 @@ void CConversation::init()
|
|||
|
||||
s_sprites=new ("ConvoSprites") SpriteBank();
|
||||
s_sprites->load(SPRITES_SPRITES_SPR);
|
||||
|
||||
s_ignoreNewlyPressedButtonsOnPadThisThink=false;
|
||||
}
|
||||
|
||||
|
||||
|
@ -361,8 +365,11 @@ void CConversation::think(int _frames)
|
|||
s_currentState=STATE_ACTIVE;
|
||||
}
|
||||
|
||||
thinkText();
|
||||
thinkQuestion();
|
||||
if(!s_ignoreNewlyPressedButtonsOnPadThisThink)
|
||||
{
|
||||
thinkText();
|
||||
thinkQuestion();
|
||||
}
|
||||
|
||||
s_currentScript->run();
|
||||
if(s_currentScript->isFinished())
|
||||
|
@ -377,6 +384,8 @@ void CConversation::think(int _frames)
|
|||
}
|
||||
s_playingSfxId=CSoundMediator::playSfx(CSoundMediator::SFX_FRONT_END__OK);
|
||||
}
|
||||
|
||||
s_ignoreNewlyPressedButtonsOnPadThisThink=false;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -974,5 +983,16 @@ RECT CConversation::getTextRegion()
|
|||
return clipRegion;
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------------
|
||||
Function:
|
||||
Purpose:
|
||||
Params:
|
||||
Returns:
|
||||
---------------------------------------------------------------------- */
|
||||
void CConversation::ignoreNewlyPressedButtonsOnPadThisThink()
|
||||
{
|
||||
s_ignoreNewlyPressedButtonsOnPadThisThink=true;
|
||||
}
|
||||
|
||||
/*===========================================================================
|
||||
end */
|
||||
|
|
|
@ -57,6 +57,8 @@ public:
|
|||
static int getResponse();
|
||||
static RECT getTextRegion();
|
||||
|
||||
static void ignoreNewlyPressedButtonsOnPadThisThink();
|
||||
|
||||
|
||||
private:
|
||||
enum
|
||||
|
@ -170,6 +172,8 @@ private:
|
|||
static int s_maxTextPageOffset;
|
||||
static class SpriteBank *s_sprites;
|
||||
|
||||
static int s_ignoreNewlyPressedButtonsOnPadThisThink;
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -627,7 +627,15 @@ void CGameScene::think_playing(int _frames)
|
|||
|
||||
// Conversation think ( with pad debounce stuff.. )
|
||||
if(CConversation::isActive())m_player->ignoreNewlyPressedButtonsOnPadThisThink();
|
||||
CConversation::think(_frames);
|
||||
if(!m_pauseMenu->isActive())
|
||||
{
|
||||
CConversation::think(_frames);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Must be a better way to do this? :/
|
||||
CConversation::ignoreNewlyPressedButtonsOnPadThisThink();
|
||||
}
|
||||
|
||||
// Pause menu think ( with pad debounce stuff.. )
|
||||
if(m_pauseMenu->isActive())m_player->ignoreNewlyPressedButtonsOnPadThisThink();
|
||||
|
|
Loading…
Add table
Reference in a new issue