Skip to content

Commit 23a33e4

Browse files
committed
SpeedrunHelper: Adjust AGameStateController behaviour for Fun%
1 parent 4273144 commit 23a33e4

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

SDK/BYSpeedrunHelper/Source/ABYSpeedrunHelper.cpp

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,20 @@ class ABYSpeedrunHelper : public AModInstance
253253
DWORD dwOldProtection;
254254
VirtualProtect( ABikeRaceMicroGame::ms_aVariants, sizeof( ABikeRaceMicroGame::Variant ) * ABikeRaceMicroGame::NUM_VARIANTS, PAGE_EXECUTE_READWRITE, &dwOldProtection );
255255

256+
{
257+
// Remove screen fade out
258+
VirtualProtect( (void*)0x0042A3A0, 6, PAGE_EXECUTE_READWRITE, &dwOldProtection );
259+
for ( TINT i = 0; i < 6; i++ ) *(TCHAR*)( 0x0042A3A0 + i ) = '\x90';
260+
261+
// Remove game state controller input ignore flag
262+
VirtualProtect( (void*)0x004293E2, 7, PAGE_EXECUTE_READWRITE, &dwOldProtection );
263+
for ( TINT i = 0; i < 7; i++ ) *(TCHAR*)( 0x004293E2 + i ) = '\x90';
264+
265+
// Rewrite flag check in game state controller update code
266+
VirtualProtect( (void*)0x0042a7ca, 1, PAGE_EXECUTE_READWRITE, &dwOldProtection );
267+
*(TCHAR*)( 0x0042a7ca ) = '\x02';
268+
}
269+
256270
// For Fun&% category reduce number of laps in the bike race mini game
257271
for ( TSIZE i = 0; i < ABikeRaceMicroGame::NUM_VARIANTS; i++ )
258272
{

0 commit comments

Comments
 (0)