Skip to content

Conversation

@xezon
Copy link

@xezon xezon commented Nov 30, 2025

Merge with Rebase

This change implements a ESC button mapping to skip Campaign, Challenge and Score videos.

TODO

  • Also treat Score Screen
  • Replicate in Generals

@xezon xezon added Enhancement Is new feature or request Minor Severity: Minor < Major < Critical < Blocker Gen Relates to Generals ZH Relates to Zero Hour Input labels Nov 30, 2025
@xezon xezon changed the title feat(movie): Implement ESC button mapping to skip Compaign and Challenge intro videos feat(movie): Implement ESC button mapping to skip Campaign and Challenge intro videos Nov 30, 2025
@xezon
Copy link
Author

xezon commented Nov 30, 2025

This needs another revision.

@xezon xezon force-pushed the xezon/feat-skip-video branch 2 times, most recently from 3ca2ff3 to 02cb634 Compare November 30, 2025 14:20
@xezon xezon changed the title feat(movie): Implement ESC button mapping to skip Campaign and Challenge intro videos feat(movie): Implement ESC button mapping to skip Campaign, Challenge and Score videos Nov 30, 2025
@xezon
Copy link
Author

xezon commented Nov 30, 2025

Revised. I noticed there is also a movie playback in Score Screen, which apparently is used for End of Campaign videos. I made some changes to Keyboard class to allow consume raw keys from there. Tested in Campaign and Challenge. Worked.

@xezon xezon force-pushed the xezon/feat-skip-video branch 2 times, most recently from 1cbf8e4 to 5534024 Compare December 1, 2025 19:11
Copy link

@Skyaero42 Skyaero42 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The generals campaign video was also a loading screen. Does it work with that as well?

@xezon
Copy link
Author

xezon commented Dec 1, 2025

I do not understand the question. Is that unique to Generals?

@xezon xezon force-pushed the xezon/feat-skip-video branch from 5534024 to 6b7c19f Compare December 2, 2025 18:18
@xezon
Copy link
Author

xezon commented Dec 2, 2025

Replicated in Generals with minor conflicts

D:\Projects\TheSuperHackers\GeneralsGameCode>FOR /F "delims=" %b IN ('git merge-base --fork-point main') DO git diff %b  1>changes.patch

D:\Projects\TheSuperHackers\GeneralsGameCode>git diff 0410990457c9629481f793b8be053a9620eed035  1>changes.patch

D:\Projects\TheSuperHackers\GeneralsGameCode>git apply -p2 --directory=Generals --reject --whitespace=fix changes.patch
Checking patch Generals/Code/GameEngine/Include/GameClient/KeyDefs.h...
Checking patch Generals/Code/GameEngine/Include/GameClient/Keyboard.h...
Checking patch Generals/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/ScoreScreen.cpp...
Hunk #1 succeeded at 79 (offset -3 lines).
Hunk #2 succeeded at 638 (offset -94 lines).
Checking patch Generals/Code/GameEngine/Source/GameClient/GUI/Gadget/GadgetListBox.cpp...
Checking patch Generals/Code/GameEngine/Source/GameClient/GUI/LoadScreen.cpp...
error: while searching for:
#include "GameClient/GameText.h"
#include "GameClient/GameWindowManager.h"
#include "GameClient/GameWindowTransitions.h"
#include "GameClient/LoadScreen.h"
#include "GameClient/MapUtil.h"
#include "GameClient/Mouse.h"

error: patch failed: Generals/Code/GameEngine/Source/GameClient/GUI/LoadScreen.cpp:71
Hunk #2 succeeded at 487 (offset -44 lines).
error: while searching for:
                Int shiftedPercent = -FRAME_FUDGE_ADD + 1;
                while (m_videoStream->frameIndex() < m_videoStream->frameCount() - 1 )
                {
                        TheGameEngine->serviceWindowsOS();

                        if(!m_videoStream->isFrameReady())

error: patch failed: Generals/Code/GameEngine/Source/GameClient/GUI/LoadScreen.cpp:1050
Checking patch Generals/Code/GameEngine/Source/GameClient/Input/Keyboard.cpp...
Checking patch Generals/Code/GameEngine/Source/GameClient/MessageStream/HotKey.cpp...
Applied patch Generals/Code/GameEngine/Include/GameClient/KeyDefs.h cleanly.
Applied patch Generals/Code/GameEngine/Include/GameClient/Keyboard.h cleanly.
Applied patch Generals/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/ScoreScreen.cpp cleanly.
Applied patch Generals/Code/GameEngine/Source/GameClient/GUI/Gadget/GadgetListBox.cpp cleanly.
Applying patch Generals/Code/GameEngine/Source/GameClient/GUI/LoadScreen.cpp with 2 rejects...
Rejected hunk #1.
Hunk #2 applied cleanly.
Rejected hunk #3.
Applied patch Generals/Code/GameEngine/Source/GameClient/Input/Keyboard.cpp cleanly.
Applied patch Generals/Code/GameEngine/Source/GameClient/MessageStream/HotKey.cpp cleanly.

@xezon xezon force-pushed the xezon/feat-skip-video branch from 6b7c19f to 5bccbc9 Compare December 2, 2025 18:37
@Skyaero42
Copy link

Replicated in Generals with minor conflicts

I'll answer my own question, the 'satellite' video at the start of Generals missions are indeed skipable now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Enhancement Is new feature or request Gen Relates to Generals Input Minor Severity: Minor < Major < Critical < Blocker ZH Relates to Zero Hour

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature: Use ESC key to skip campaign (Bink) videos

2 participants