|
71 | 71 | #include "GameClient/GameText.h" |
72 | 72 | #include "GameClient/GameWindowManager.h" |
73 | 73 | #include "GameClient/GameWindowTransitions.h" |
| 74 | +#include "GameClient/Keyboard.h" |
74 | 75 | #include "GameClient/LoadScreen.h" |
75 | 76 | #include "GameClient/MapUtil.h" |
76 | 77 | #include "GameClient/Mouse.h" |
@@ -170,6 +171,22 @@ void LoadScreen::update( Int percent ) |
170 | 171 | setFPMode(); |
171 | 172 | } |
172 | 173 |
|
| 174 | +Bool LoadScreen::canSkipVideo() |
| 175 | +{ |
| 176 | + if (TheKeyboard != NULL) |
| 177 | + { |
| 178 | + TheKeyboard->UPDATE(); |
| 179 | + for (KeyboardIO *key = TheKeyboard->getFirstKey(); key->key != KEY_NONE; ++key) |
| 180 | + { |
| 181 | + if (key->key == KEY_ESC && BitIsSet(key->state, KEY_STATE_UP)) |
| 182 | + { |
| 183 | + return true; |
| 184 | + } |
| 185 | + } |
| 186 | + } |
| 187 | + return false; |
| 188 | +} |
| 189 | + |
173 | 190 |
|
174 | 191 | // SinglePlayerLoadScreen Class /////////////////////////////////////////////// |
175 | 192 | //----------------------------------------------------------------------------- |
@@ -533,6 +550,10 @@ void SinglePlayerLoadScreen::init( GameInfo *game ) |
533 | 550 | Int shiftedPercent = -FRAME_FUDGE_ADD + 1; |
534 | 551 | while (m_videoStream->frameIndex() < m_videoStream->frameCount() - 1 ) |
535 | 552 | { |
| 553 | + // TheSuperHackers @feature User can now skip video by pressing ESC |
| 554 | + if (canSkipVideo()) |
| 555 | + break; |
| 556 | + |
536 | 557 | TheGameEngine->serviceWindowsOS(); |
537 | 558 |
|
538 | 559 | if(!m_videoStream->isFrameReady()) |
@@ -1053,6 +1074,10 @@ void ChallengeLoadScreen::init( GameInfo *game ) |
1053 | 1074 | Int shiftedPercent = -FRAME_FUDGE_ADD + 1; |
1054 | 1075 | while (m_videoStream->frameIndex() < m_videoStream->frameCount() - 1 ) |
1055 | 1076 | { |
| 1077 | + // TheSuperHackers @feature User can now skip video by pressing ESC |
| 1078 | + if (canSkipVideo()) |
| 1079 | + break; |
| 1080 | + |
1056 | 1081 | TheGameEngine->serviceWindowsOS(); |
1057 | 1082 |
|
1058 | 1083 | if(!m_videoStream->isFrameReady()) |
|
0 commit comments