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;
|
int CConversation::s_maxTextPageOffset;
|
||||||
SpriteBank *CConversation::s_sprites;
|
SpriteBank *CConversation::s_sprites;
|
||||||
|
|
||||||
|
int CConversation::s_ignoreNewlyPressedButtonsOnPadThisThink;
|
||||||
|
|
||||||
|
|
||||||
static xmPlayingId s_playingSfxId;
|
static xmPlayingId s_playingSfxId;
|
||||||
|
|
||||||
|
@ -323,6 +325,8 @@ void CConversation::init()
|
||||||
|
|
||||||
s_sprites=new ("ConvoSprites") SpriteBank();
|
s_sprites=new ("ConvoSprites") SpriteBank();
|
||||||
s_sprites->load(SPRITES_SPRITES_SPR);
|
s_sprites->load(SPRITES_SPRITES_SPR);
|
||||||
|
|
||||||
|
s_ignoreNewlyPressedButtonsOnPadThisThink=false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -361,8 +365,11 @@ void CConversation::think(int _frames)
|
||||||
s_currentState=STATE_ACTIVE;
|
s_currentState=STATE_ACTIVE;
|
||||||
}
|
}
|
||||||
|
|
||||||
thinkText();
|
if(!s_ignoreNewlyPressedButtonsOnPadThisThink)
|
||||||
thinkQuestion();
|
{
|
||||||
|
thinkText();
|
||||||
|
thinkQuestion();
|
||||||
|
}
|
||||||
|
|
||||||
s_currentScript->run();
|
s_currentScript->run();
|
||||||
if(s_currentScript->isFinished())
|
if(s_currentScript->isFinished())
|
||||||
|
@ -377,6 +384,8 @@ void CConversation::think(int _frames)
|
||||||
}
|
}
|
||||||
s_playingSfxId=CSoundMediator::playSfx(CSoundMediator::SFX_FRONT_END__OK);
|
s_playingSfxId=CSoundMediator::playSfx(CSoundMediator::SFX_FRONT_END__OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
s_ignoreNewlyPressedButtonsOnPadThisThink=false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -974,5 +983,16 @@ RECT CConversation::getTextRegion()
|
||||||
return clipRegion;
|
return clipRegion;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------
|
||||||
|
Function:
|
||||||
|
Purpose:
|
||||||
|
Params:
|
||||||
|
Returns:
|
||||||
|
---------------------------------------------------------------------- */
|
||||||
|
void CConversation::ignoreNewlyPressedButtonsOnPadThisThink()
|
||||||
|
{
|
||||||
|
s_ignoreNewlyPressedButtonsOnPadThisThink=true;
|
||||||
|
}
|
||||||
|
|
||||||
/*===========================================================================
|
/*===========================================================================
|
||||||
end */
|
end */
|
||||||
|
|
|
@ -57,6 +57,8 @@ public:
|
||||||
static int getResponse();
|
static int getResponse();
|
||||||
static RECT getTextRegion();
|
static RECT getTextRegion();
|
||||||
|
|
||||||
|
static void ignoreNewlyPressedButtonsOnPadThisThink();
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
enum
|
enum
|
||||||
|
@ -170,6 +172,8 @@ private:
|
||||||
static int s_maxTextPageOffset;
|
static int s_maxTextPageOffset;
|
||||||
static class SpriteBank *s_sprites;
|
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.. )
|
// Conversation think ( with pad debounce stuff.. )
|
||||||
if(CConversation::isActive())m_player->ignoreNewlyPressedButtonsOnPadThisThink();
|
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.. )
|
// Pause menu think ( with pad debounce stuff.. )
|
||||||
if(m_pauseMenu->isActive())m_player->ignoreNewlyPressedButtonsOnPadThisThink();
|
if(m_pauseMenu->isActive())m_player->ignoreNewlyPressedButtonsOnPadThisThink();
|
||||||
|
|
Loading…
Add table
Reference in a new issue