mirror of
https://github.com/sfall-team/sfall.git
synced 2026-07-27 16:52:34 -07:00
Fixed garbled colors when SkipOpeningMovies=1
(ref. fallout2-ce/fallout2-ce#372)
This commit is contained in:
@@ -515,11 +515,20 @@ static __declspec(naked) void op_play_gmovie_hack() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static __declspec(naked) void gnw_main_hook() {
|
||||||
|
__asm {
|
||||||
|
mov eax, FO_VAR_black_palette;
|
||||||
|
call fo::funcoffs::palette_set_to_;
|
||||||
|
jmp fo::funcoffs::main_menu_create_;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void SkipOpeningMoviesPatch() {
|
void SkipOpeningMoviesPatch() {
|
||||||
int skipOpening = IniReader::GetConfigInt("Misc", "SkipOpeningMovies", 0);
|
int skipOpening = IniReader::GetConfigInt("Misc", "SkipOpeningMovies", 0);
|
||||||
if (skipOpening) {
|
if (skipOpening) {
|
||||||
dlogr("Skipping opening movies.", DL_INIT);
|
dlogr("Skipping opening movies.", DL_INIT);
|
||||||
SafeWrite16(0x4809C7, 0x1CEB); // jmps 0x4809E5
|
SafeWrite16(0x4809C7, 0x1CEB); // jmp 0x4809E5
|
||||||
|
HookCall(0x4809E5, gnw_main_hook); // fade out to black before the main menu
|
||||||
if (skipOpening == 2) BlockCall(0x4426A1); // game_splash_screen_
|
if (skipOpening == 2) BlockCall(0x4426A1); // game_splash_screen_
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user