diff --git a/artifacts/ddraw.ini b/artifacts/ddraw.ini index e837cbba..834ce434 100644 --- a/artifacts/ddraw.ini +++ b/artifacts/ddraw.ini @@ -232,6 +232,7 @@ DebugEditorKey=0 ;- disables playing the final movie/credits after the endgame slideshow ;- disables halving the weight for power armor items ;- endgame_movie script function plays movie 10 or 11 based on the player's gender before the credits +;- changes the world map music to '03wrldmp.acm' and the credits music to 'maybe.acm' Fallout1Behavior=0 ;Time limit in years. Must be between -3 and 13 diff --git a/sfall/FalloutEngine/Functions_def.h b/sfall/FalloutEngine/Functions_def.h index 5c4dc7f2..8f1496d6 100644 --- a/sfall/FalloutEngine/Functions_def.h +++ b/sfall/FalloutEngine/Functions_def.h @@ -98,12 +98,13 @@ WRAP_WATCOM_FUNC1(const char*, findCurrentProc, fo::Program*, program) // Return WRAP_WATCOM_FUNC1(long, folder_print_line, const char*, text) WRAP_WATCOM_FUNC1(long, FMtext_width, const char*, text) WRAP_WATCOM_FUNC1(long, game_get_global_var, long, globalVar) +WRAP_WATCOM_FUNC1(void, gdialogDisplayMsg, const char*, message) WRAP_WATCOM_FUNC0(long, get_input) // Searches for message ID in given message file and places result in result argument WRAP_WATCOM_FUNC3(const char*, getmsg, const fo::MessageList*, fileAddr, fo::MessageNode*, result, long, messageId) -WRAP_WATCOM_FUNC1(void, gdialogDisplayMsg, const char*, message) WRAP_WATCOM_FUNC1(void, gmouse_3d_set_mode, long, mode) WRAP_WATCOM_FUNC1(long, gmouse_set_cursor, long, picNum) +WRAP_WATCOM_FUNC0(void, grid_toggle) WRAP_WATCOM_FUNC1(long, gsound_background_volume_get_set, long, setVolume) WRAP_WATCOM_FUNC1(void, gsound_play_sfx_file, const char*, name) // Plays SFX sound with given name WRAP_WATCOM_FUNC1(fo::Window*, GNW_find, long, winRef) diff --git a/sfall/Modules/DebugEditor.cpp b/sfall/Modules/DebugEditor.cpp index 93fd2d33..3908baf6 100644 --- a/sfall/Modules/DebugEditor.cpp +++ b/sfall/Modules/DebugEditor.cpp @@ -547,7 +547,7 @@ void DebugEditor::KeyPressedHook(DWORD scanCode, bool pressed) { } if (mapGridToggleKey && scanCode == mapGridToggleKey && pressed && IsGameLoaded()) { - __asm call fo::funcoffs::grid_toggle_; + fo::func::grid_toggle(); fo::func::tile_refresh_display(); } } diff --git a/sfall/Modules/MiscPatches.cpp b/sfall/Modules/MiscPatches.cpp index 4bc904ef..a797a913 100644 --- a/sfall/Modules/MiscPatches.cpp +++ b/sfall/Modules/MiscPatches.cpp @@ -773,6 +773,8 @@ static void F1EngineBehaviorPatch() { BlockCall(0x4A4343); // disable playing the final movie/credits after the endgame slideshow SafeWrite8(0x477C71, CodeType::JumpShort); // disable halving the weight for power armor items HookCall(0x43F872, endgame_movie_hook); // play movie 10 or 11 based on the player's gender before the credits + SafeWrite32(0x4C2361, (DWORD)&"03wrldmp"); // change the world map music to 03wrldmp.acm + SafeWriteStr(0x501A40, "maybe"); // change the credits music to maybe.acm } } @@ -1057,6 +1059,14 @@ void MiscPatches::init() { HookCall(0x48A954, obj_move_to_tile_hook_redraw); HookCall(0x483726, map_check_state_hook_redraw); + // Increase the maximum value of the combat speed slider from 50 to 100 + const DWORD combatSpeedMaxAddr[] = { + 0x492120, 0x49212A, // UpdateThing_ + 0x493787, 0x493790 // RestoreSettings_ + }; + SafeWriteBatch(100, combatSpeedMaxAddr); + SafeWrite8(0x519B82, 0x59); // 100.0 + // Corrects the height of the black background for death screen subtitles if (!hrpIsEnabled) SafeWrite32(0x48134D, 38 - (640 * 3)); // main_death_scene_ (shift y-offset 2px up, w/o HRP) if (!hrpIsEnabled || hrpVersionValid) SafeWrite8(0x481345, 4); // main_death_scene_ diff --git a/sfall/Modules/QuestList.cpp b/sfall/Modules/QuestList.cpp index 47352c9a..56eb7743 100644 --- a/sfall/Modules/QuestList.cpp +++ b/sfall/Modules/QuestList.cpp @@ -481,7 +481,7 @@ static void __declspec(naked) quest_init_hook() { } } -void QuestListPatch() { +static void QuestListPatch() { MakeCall(0x4974E4, StartPipboy_hack); MakeCall(0x497173, pipboy_hack_action, 1); diff --git a/sfall/Modules/SubModules/WindowRender.cpp b/sfall/Modules/SubModules/WindowRender.cpp index 385215c7..a5358737 100644 --- a/sfall/Modules/SubModules/WindowRender.cpp +++ b/sfall/Modules/SubModules/WindowRender.cpp @@ -16,6 +16,8 @@ * along with this program. If not, see . */ +#include + #include "..\..\main.h" #include "..\..\FalloutEngine\Fallout2.h"