1
0
mirror of https://github.com/blupi-games/planetblupi synced 2024-12-30 10:15:36 +01:00

Add a boolean for starting the recorder

It's not usable for now.
This commit is contained in:
Mathieu Schroeter 2017-08-14 21:59:03 +02:00
parent 733b6b7b1a
commit d5acf3822b
2 changed files with 5 additions and 10 deletions

View File

@ -1551,6 +1551,7 @@ CEvent::CEvent ()
m_bDemoPlay = false;
m_pDemoBuffer = nullptr;
m_pDemoSDLBuffer = nullptr;
m_bStartRecording = false;
m_demoTime = 0;
m_keymod = 0;
m_posHelpButton = {-1, -1};
@ -2946,17 +2947,10 @@ bool CEvent::ChangePhase (Uint32 phase)
if (phase == EV_PHASE_INIT)
m_demoTime = 0;
if (
phase == EV_PHASE_PLAY && !m_bDemoPlay &&
GetPhysicalWorld () >= 150 && // mission spéciale démo ?
GetPhysicalWorld () < 200)
{
DemoRecStart (); // début enregistrement
}
if (phase == EV_PHASE_PLAY && !m_bDemoPlay && m_bStartRecording)
DemoRecStart (); // start recording
if (phase != EV_PHASE_PLAY)
{
DemoRecStop (); // stoppe l'enregistrement d'une démo
}
DemoRecStop (); // stop recording
m_pDecor->UndoClose (); // libère le buffer undo

View File

@ -251,6 +251,7 @@ protected:
bool m_bDemoPlay;
DemoEvent * m_pDemoBuffer;
DemoSDLEvent * m_pDemoSDLBuffer;
bool m_bStartRecording;
Uint32 m_demoTime;
size_t m_demoIndex;
size_t m_demoEnd;