Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Core/GameEngine/Include/GameClient/Intro.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ class Intro
void update();
void draw();

Bool skipCurrentIntroStage();
Bool isDone() const { return m_currentState == IntroState_Done; }

private:
Expand Down
27 changes: 24 additions & 3 deletions Core/GameEngine/Source/GameClient/Intro.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,32 @@ void Intro::draw()
}
}

Bool Intro::skipCurrentIntroStage()
{
// Aborts waits, stops movies and skips waiting states

Bool isSkipping = !isDone();

m_waitUntilMs = 0;

switch (m_currentState)
{
case IntroState_EALogoMovie:
case IntroState_SizzleMovie:
TheDisplay->stopMovie();
enterNextState();
break;

case IntroState_TheSuperHackers:
enterNextState();
break;
}
Comment thread
xezon marked this conversation as resolved.

return isSkipping;
}

void Intro::doEALogoMovie()
{
TheWritableGlobalData->m_allowExitOutOfMovies = FALSE;
if (TheGameLODManager && TheGameLODManager->didMemPass())
TheDisplay->playMovie("EALogoMovie");
else
Expand Down Expand Up @@ -221,7 +244,6 @@ void Intro::doTheSuperHackers()

void Intro::doSizzleMovie()
{
TheWritableGlobalData->m_allowExitOutOfMovies = TRUE;
if (TheGameLODManager && TheGameLODManager->didMemPass())
TheDisplay->playMovie("Sizzle");
else
Expand All @@ -231,7 +253,6 @@ void Intro::doSizzleMovie()
void Intro::doPostIntro()
{
TheWritableGlobalData->m_breakTheMovie = TRUE;
TheWritableGlobalData->m_allowExitOutOfMovies = TRUE;
}

void Intro::doAsyncWait(UnsignedInt milliseconds)
Expand Down
16 changes: 11 additions & 5 deletions Core/GameEngine/Source/GameClient/MessageStream/WindowXlat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@

// USER INCLUDES //////////////////////////////////////////////////////////////
#include "Common/MessageStream.h"
#include "GameClient/GameClient.h"
#include "GameClient/GameWindowManager.h"
#include "GameClient/WindowXlat.h"
#include "GameClient/Shell.h"
Expand Down Expand Up @@ -318,12 +319,17 @@
// If we're in a movie, we want to be able to escape out of it
if(returnCode != WIN_INPUT_USED
&& (key == KEY_ESC)
&& (BitIsSet( state, KEY_STATE_UP ))
&& TheDisplay->isMoviePlaying()
&& TheGlobalData->m_allowExitOutOfMovies == TRUE )
&& (BitIsSet( state, KEY_STATE_UP )) )
{
TheDisplay->stopMovie();
returnCode = WIN_INPUT_USED;
if (TheGameClient->skipCurrentIntroStage())

Check failure on line 324 in Core/GameEngine/Source/GameClient/MessageStream/WindowXlat.cpp

View workflow job for this annotation

GitHub Actions / Build Generals / vc6-profile+t+e

'skipCurrentIntroStage' : is not a member of 'GameClient'

Check failure on line 324 in Core/GameEngine/Source/GameClient/MessageStream/WindowXlat.cpp

View workflow job for this annotation

GitHub Actions / Build Generals / vc6+t+e

'skipCurrentIntroStage' : is not a member of 'GameClient'

Check failure on line 324 in Core/GameEngine/Source/GameClient/MessageStream/WindowXlat.cpp

View workflow job for this annotation

GitHub Actions / Build Generals / vc6-debug+t+e

'skipCurrentIntroStage' : is not a member of 'GameClient'

Check failure on line 324 in Core/GameEngine/Source/GameClient/MessageStream/WindowXlat.cpp

View workflow job for this annotation

GitHub Actions / Build Generals / win32-debug+t+e

'skipCurrentIntroStage': is not a member of 'GameClient'

Check failure on line 324 in Core/GameEngine/Source/GameClient/MessageStream/WindowXlat.cpp

View workflow job for this annotation

GitHub Actions / Build Generals / win32+t+e

'skipCurrentIntroStage': is not a member of 'GameClient'

Check failure on line 324 in Core/GameEngine/Source/GameClient/MessageStream/WindowXlat.cpp

View workflow job for this annotation

GitHub Actions / Build Generals / win32-profile+t+e

'skipCurrentIntroStage': is not a member of 'GameClient'
Comment thread
xezon marked this conversation as resolved.
{
returnCode = WIN_INPUT_USED;
}
else if (TheDisplay->isMoviePlaying())
{
TheDisplay->stopMovie();
returnCode = WIN_INPUT_USED;
}
}

// TheSuperHackers @bugfix If the input is disabled, then only allow the ESC button to get through.
Expand Down
1 change: 0 additions & 1 deletion GeneralsMD/Code/GameEngine/Include/Common/GlobalData.h
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,6 @@ class GlobalData : public SubsystemInterface
Bool m_shellMapOn; ///< User can set the shell map not to load
Bool m_playIntro; ///< Flag to say if we're to play the intro or not
Bool m_playSizzle; ///< Flag to say whether we play the sizzle movie after the logo movie.
Bool m_allowExitOutOfMovies; ///< flag to allow exit out of movies only after the Intro has played

Bool m_loadScreenRender; ///< flag to disallow rendering of almost everything during a loadscreen

Expand Down
2 changes: 2 additions & 0 deletions GeneralsMD/Code/GameEngine/Include/GameClient/GameClient.h
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,8 @@ class GameClient : public SubsystemInterface,
void incrementRenderedObjectCount() { m_renderedObjectCount++; }
virtual void notifyTerrainObjectMoved(Object *obj) = 0;

Bool skipCurrentIntroStage();

static Bool isMovieAbortRequested();

protected:
Expand Down
1 change: 0 additions & 1 deletion GeneralsMD/Code/GameEngine/Source/Common/GlobalData.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1014,7 +1014,6 @@ GlobalData::GlobalData()
m_shellMapOn =TRUE;
m_playIntro = TRUE;
m_playSizzle = TRUE;
m_allowExitOutOfMovies = FALSE;
m_loadScreenRender = FALSE;

m_keyboardDefaultScrollFactor = m_keyboardScrollFactor = 0.5f;
Expand Down
11 changes: 10 additions & 1 deletion GeneralsMD/Code/GameEngine/Source/GameClient/GameClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -748,6 +748,15 @@ void GameClient::step()
TheDisplay->step();
}

Bool GameClient::skipCurrentIntroStage()
{
if (m_intro != nullptr)
{
return m_intro->skipCurrentIntroStage();
}
return false;
}

Bool GameClient::isMovieAbortRequested()
{
if (TheGameEngine)
Expand All @@ -760,7 +769,7 @@ Bool GameClient::isMovieAbortRequested()
{
TheKeyboard->UPDATE();
KeyboardIO *io = TheKeyboard->findKey(KEY_ESC, KeyboardIO::STATUS_UNUSED);
if (io && BitIsSet(io->state, KEY_STATE_DOWN))
if (io && BitIsSet(io->state, KEY_STATE_UP))
{
io->setUsed();
return TRUE;
Expand Down
Loading