Added a quick-and-dirty way to customize highlight colors.

Currently experimental only, need some serious reworking.
This commit is contained in:
NovaRain
2015-07-29 16:07:26 +08:00
parent 03ddd2e12e
commit 6e1235147b
3 changed files with 30 additions and 16 deletions
+15 -9
View File
@@ -130,9 +130,14 @@ WindowScrollKey=0
;A key to press to toggle the highlighting of all items on the ground on the current map
ToggleItemHighlightsKey=42
;Enable to highlight containers as well as items
;Set to 1 to also highlight containers as well as items
HighlightContainers=0
;Change the highlight colors - NR: should reduce to only items and containers.
HighlightColorItems=0x10
HighlightColorMouseOver=0x10
HighlightColorContainers=0x4
;A key to press to reload your currently equipped weapon
ReloadWeaponKey=0
@@ -533,15 +538,15 @@ ControlCombat=0
;Set to 1 to stack empty identical weapons, no matter what type of ammo was loaded before
StackEmptyWeapons=0
; Fixes corrupting saves which cause Too Many Items Bug
;Prevents 'Too Many Items' bug from corrupting game saves
TooManyItemsBugFix=1
; Allow for 9 options (lines of text) to be displayed correctly in a dialog window
;Allows 9 options (lines of text) to be displayed correctly in a dialog window
DialogOptions9Lines=1
; Fix for minor visual glitch when picking up solo item from the top of inventory
; and there is multiple item stack at the bottom of inventory
; also fixes inability to reload weapon by dragging ammo from inventory to weapon that is in inventory too (not in hands)
;Set to 1 to fix a minor visual glitch when picking up a solo item from the top of inventory with a stack of multiple items at the bottom
;Also fixes the inability to reload weapons by dragging ammo onto weapons in the inventory list
InventoryDragIssuesFix=1
; Should fix Jet Antidote not working on NPCs
@@ -554,6 +559,7 @@ ArmorCorruptsNPCStatsFix=1
; Fixes bug when if you move to another map while NPC is unconscious, he will turn into a container
NPCTurnsIntoContainerFix=1
;XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
[Debugging]
;extra sfall configuration settings that can be used by the modders version of sfall
@@ -571,9 +577,9 @@ SkipCompatModeCheck=1
;Set to 1 to skip the executable file size check
SkipSizeCheck=0
;If you're testing changes to the fallout exe, you can override the crc that sfall looks for here
;you can use several hex values, separated by commas
; ExtraCRC=0x00000000,0x00000000
;If you're testing changes to the fallout exe, you can override the crc that sfall looks for here
;You can use several hex values, separated by commas
;ExtraCRC=0x00000000,0x00000000
;Set to 1 to stop fallout from deleting non readonly protos at startup
;Has pretty nasty side effects when saving/reloading, so don't use for regular gameplay
+11 -3
View File
@@ -123,6 +123,9 @@ static DWORD highlightingToggled=0;
static DWORD MotionSensorMode;
static BYTE toggleHighlightsKey;
static DWORD HighlightContainers = 0;
static DWORD Color_Items = 0x10; // yellow
static DWORD Color_MouseOver = 0x10; // yellow
static DWORD Color_Containers = 0x4; // light gray
static int idle;
static char HighlightFail1[128];
static char HighlightFail2[128];
@@ -886,12 +889,12 @@ loopObject:
jnz nextObject // Yes
test dword ptr [ecx+0x74], eax // Already outlined?
jnz nextObject // Yes
mov edx, 0x10 // yellow
mov edx, Color_Items // yellow
test byte ptr [ecx+0x25], dl // NoHighlight_ flag is set (is this a container)?
jz NoHighlight // No
cmp HighlightContainers, eax // Highlight containers?
je nextObject // No
mov edx, 0x4 // light gray
mov edx, Color_Containers // light gray
NoHighlight:
mov [ecx+0x74], edx
nextObject:
@@ -943,7 +946,7 @@ static void __declspec(naked) gmouse_bk_process_hook() {
jnz end
mov dword ptr [eax+0x74], 0
end:
mov edx, 0x40
mov edx, Color_MouseOver
jmp obj_outline_object_
}
}
@@ -969,6 +972,11 @@ void ScriptExtenderSetup() {
const bool AllowUnsafeScripting=false;
#endif
toggleHighlightsKey = GetPrivateProfileIntA("Input", "ToggleItemHighlightsKey", 0, ini);
Color_Items = GetPrivateProfileIntA("Input", "HighlightColorItems", 0x10, ini);
Color_MouseOver = GetPrivateProfileIntA("Input", "HighlightColorMouseOver", 0x10, ini);
Color_Containers = GetPrivateProfileIntA("Input", "HighlightColorContainers", 0x4, ini);
if (toggleHighlightsKey) {
MotionSensorMode = GetPrivateProfileIntA("Misc", "MotionScannerFlags", 1, ini);
HookCall(0x44B9BA, &gmouse_bk_process_hook);
+4 -4
View File
@@ -22,12 +22,12 @@
#define VERSION_MAJOR 3
#define VERSION_MINOR 6
#define VERSION_BUILD 3
#define VERSION_REV 0
#define VERSION_BUILD 999
#define VERSION_REV 5
#ifdef WIN2K
#define VERSION_STRING "3.6d win2k"
#define VERSION_STRING "3.7 pre win2k"
#else
#define VERSION_STRING "3.6d"
#define VERSION_STRING "3.7 pre"
#endif
#define CHECK_VAL (4)