diff --git a/artifacts/config_files/Perks.ini b/artifacts/config_files/Perks.ini index 22232654..c20e1dc7 100644 --- a/artifacts/config_files/Perks.ini +++ b/artifacts/config_files/Perks.ini @@ -28,7 +28,7 @@ WeaponHandlingBonus=3 ;############################################################################## [Perks] -;Set to 1 to enable modifications to perks +;Set to 1 to enable the modifications for perks Enable=0 ;Name=The name of the perk (max 63 characters) @@ -125,7 +125,7 @@ Skill5Mod=0 ;############################################################################## [Traits] -;Set to 1 to enable modifications to traits +;Set to 1 to enable the modifications for traits Enable=0 ;This is a modification to trait 0 diff --git a/artifacts/ddraw.ini b/artifacts/ddraw.ini index 2d595094..a3e51579 100644 --- a/artifacts/ddraw.ini +++ b/artifacts/ddraw.ini @@ -399,7 +399,7 @@ CorpseDeleteTime=6 ProcessorIdle=-1 ;Set to 1 if using the hero appearance mod -;Set to 2 for backward compatibility with old scripts that manually fix obj_art_fid script function for dude_obj +;Set to 2 for backward compatibility with scripts that manually fix obj_art_fid/art_change_fid_num script functions for dude_obj ;You can add AppChCrt.frm and AppChEdt.frm files to art\intrface\ to set a custom background for the character screen EnableHeroAppearanceMod=0 diff --git a/sfall/Modules/BugFixes.cpp b/sfall/Modules/BugFixes.cpp index 7766d97d..5daf22c8 100644 --- a/sfall/Modules/BugFixes.cpp +++ b/sfall/Modules/BugFixes.cpp @@ -394,7 +394,7 @@ nextArmor: call fo::funcoffs::inven_worn_; test eax, eax; jz noArmor; - and byte ptr [eax + flags+3], ~Worn >> 24; // Unset flag of equipped armor + and byte ptr [eax][flags + 3], ~Worn >> 24; // Unset flag of equipped armor jmp nextArmor; noArmor: mov eax, esi; @@ -410,7 +410,7 @@ nextArmor: call fo::funcoffs::inven_worn_; test eax, eax; jz end; - and byte ptr [eax + flags+3], ~Worn >> 24; // Unset flag of equipped armor + and byte ptr [eax][flags + 3], ~Worn >> 24; // Unset flag of equipped armor jmp nextArmor; end: retn; @@ -448,7 +448,7 @@ dudeFix: test eax, eax; jz equipped; // no armor // additionally check flag of equipped armor for dude - test byte ptr [eax + flags+3], Worn >> 24; + test byte ptr [eax][flags + 3], Worn >> 24; jnz equipped; xor eax, eax; equipped: @@ -459,11 +459,11 @@ equipped: static void __declspec(naked) obj_drop_hook() { __asm { - test byte ptr [edx + flags+3], (Worn | Right_Hand | Left_Hand) >> 24; + test byte ptr [edx][flags + 3], (Worn | Right_Hand | Left_Hand) >> 24; jz skipHook; call InvenUnwield_HookDrop; // run HOOK_INVENWIELD before dropping item skipHook: - test byte ptr [edx + flags+3], Worn >> 24; + test byte ptr [edx][flags + 3], Worn >> 24; jnz fixArmorStat; jmp fo::funcoffs::obj_remove_from_inven_; fixArmorStat: diff --git a/sfall/Modules/MainMenu.cpp b/sfall/Modules/MainMenu.cpp index a3c03044..954bf94a 100644 --- a/sfall/Modules/MainMenu.cpp +++ b/sfall/Modules/MainMenu.cpp @@ -126,7 +126,8 @@ void MainMenu::init() { if (OverrideColour & 0xFF) { OverrideColour &= 0x00FF00FF; OverrideColour |= 0x06000000; - SafeWrite32(0x481748, (DWORD)&OverrideColour); + unsigned char flags = static_cast((OverrideColour & 0xFF0000) >> 16); + if (!(flags & 1)) SafeWrite32(0x481748, (DWORD)&OverrideColour); } OverrideColour2 = GetConfigInt("Misc", "MainMenuBigFontColour", 0) & 0xFF; if (OverrideColour2) SafeWrite32(0x481906, (DWORD)&OverrideColour2);