mirror of
https://github.com/sfall-team/sfall.git
synced 2026-07-27 16:52:34 -07:00
Added an option to skip loading game settings from a saved game (from Mr.Stalin)
Minor edits to ddraw.ini.
This commit is contained in:
+5
-2
@@ -76,7 +76,6 @@ Use32BitHeadGraphics=0
|
||||
AllowDShowMovies=0
|
||||
|
||||
;Fade effect time length percentage modifier
|
||||
;Default is 100. Larger values make it slower, smaller values make it faster
|
||||
FadeMultiplier=100
|
||||
|
||||
;XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
||||
@@ -142,7 +141,7 @@ ReloadWeaponKey=0
|
||||
|
||||
;A key to hold down to let you move/drop a whole stack of items at once without the 'Move Items' window
|
||||
;Set to 0 if you don't want to use a modifier key, or a DX scancode otherwise
|
||||
ItemFastMoveKey=0x1d
|
||||
ItemFastMoveKey=29
|
||||
|
||||
;Set to 1 to skip the 'Move Items' window when taking items from containers or corpses and not holding down ItemFastMoveKey
|
||||
;Requires ItemFastMoveKey to be enabled
|
||||
@@ -632,6 +631,10 @@ DisplaySwiftLearnerExp=1
|
||||
;Set to 1 to display party member's current level/AC/addict flag on the combat control panel
|
||||
PartyMemberExtraInfo=0
|
||||
|
||||
;Set to 1 to skip loading game settings from a saved game, except for the game/combat difficulty settings
|
||||
;Set to 2 to also skip loading the game/combat difficulty settings
|
||||
SkipLoadingGameSettings=0
|
||||
|
||||
;Set to 1 to prevent the inventory/loot/automap interfaces from being placed on top of other script-created windows
|
||||
InterfaceDontMoveOnTop=0
|
||||
|
||||
|
||||
@@ -1059,7 +1059,7 @@ void Graphics::init() {
|
||||
Graphics::mode = 0;
|
||||
}
|
||||
if (Graphics::mode == 4 || Graphics::mode == 5) {
|
||||
dlog("Applying dx9 graphics patch.", DL_INIT);
|
||||
dlog("Applying DX9 graphics patch.", DL_INIT);
|
||||
#define _DLL_NAME "d3dx9_43.dll"
|
||||
HMODULE h = LoadLibraryEx(_DLL_NAME, 0, LOAD_LIBRARY_AS_DATAFILE);
|
||||
if (!h) {
|
||||
|
||||
@@ -855,6 +855,21 @@ void KeepWeaponSelectModePatch() {
|
||||
}
|
||||
}
|
||||
|
||||
void SkipLoadingGameSettingsPatch() {
|
||||
int skipLoading = GetConfigInt("Misc", "SkipLoadingGameSettings", 0);
|
||||
if (skipLoading) {
|
||||
dlog("Applying skip loading game settings from a saved game patch.", DL_INIT);
|
||||
BlockCall(0x493421);
|
||||
SafeWrite8(0x4935A8, 0x1F);
|
||||
SafeWrite32(0x4935AB, 0x90901B75);
|
||||
CodeData PatchData;
|
||||
if (skipLoading == 2) SafeWriteBatch<CodeData>(PatchData, {0x49341C, 0x49343B});
|
||||
SafeWriteBatch<CodeData>(PatchData, {0x493450, 0x493465, 0x49347A, 0x49348F, 0x4934A4, 0x4934B9, 0x4934CE, 0x4934E3,
|
||||
0x4934F8, 0x49350D, 0x493522, 0x493547, 0x493558, 0x493569, 0x49357A});
|
||||
dlogr(" Done", DL_INIT);
|
||||
}
|
||||
}
|
||||
|
||||
void InterfaceDontMoveOnTopPatch() {
|
||||
if (GetConfigInt("Misc", "InterfaceDontMoveOnTop", 0)) {
|
||||
dlog("Applying InterfaceDontMoveOnTop patch.", DL_INIT);
|
||||
@@ -953,6 +968,8 @@ void MiscPatches::init() {
|
||||
|
||||
DisplaySecondWeaponRangePatch();
|
||||
KeepWeaponSelectModePatch();
|
||||
|
||||
SkipLoadingGameSettingsPatch();
|
||||
InterfaceDontMoveOnTopPatch();
|
||||
}
|
||||
|
||||
|
||||
@@ -29,6 +29,12 @@ public:
|
||||
void exit() override;
|
||||
};
|
||||
|
||||
#pragma pack(1)
|
||||
struct CodeData {
|
||||
DWORD dd = 0x0024548D;
|
||||
BYTE db = 0x90;
|
||||
};
|
||||
|
||||
extern bool npcAutoLevelEnabled;
|
||||
|
||||
void _stdcall SetMapMulti(float d);
|
||||
|
||||
Reference in New Issue
Block a user