mirror of
https://github.com/sfall-team/sfall.git
synced 2026-07-27 16:52:34 -07:00
Added OutlineColor option to set the color of outlines for items/containers.
This commit is contained in:
+12
-3
@@ -98,7 +98,7 @@ ReverseMouseButtons=0
|
|||||||
BackgroundKeyboard=0
|
BackgroundKeyboard=0
|
||||||
BackgroundMouse=0
|
BackgroundMouse=0
|
||||||
|
|
||||||
;XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
;XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
||||||
|
|
||||||
;The modifier key you have to hold down to change any speed settings
|
;The modifier key you have to hold down to change any speed settings
|
||||||
;Set to 0 if you don't want to use a modifier key, or a DX scancode otherwise
|
;Set to 0 if you don't want to use a modifier key, or a DX scancode otherwise
|
||||||
@@ -131,16 +131,25 @@ WindowScrollKey=0
|
|||||||
ToggleItemHighlightsKey=42
|
ToggleItemHighlightsKey=42
|
||||||
|
|
||||||
;Set to 1 to also highlight containers
|
;Set to 1 to also highlight containers
|
||||||
;Set to 2 for purple outlines
|
|
||||||
HighlightContainers=0
|
HighlightContainers=0
|
||||||
|
|
||||||
|
;Set the color of outlines, available colors:
|
||||||
|
;0x01 - glowing red
|
||||||
|
;0x02 - red
|
||||||
|
;0x04 - grey
|
||||||
|
;0x08 - glowing green
|
||||||
|
;0x10 - bright yellow
|
||||||
|
;0x20 - dark yellow
|
||||||
|
;0x40 - purple
|
||||||
|
OutlineColor=0x10
|
||||||
|
|
||||||
;A key to press to reload your currently equipped weapon
|
;A key to press to reload your currently equipped weapon
|
||||||
ReloadWeaponKey=0
|
ReloadWeaponKey=0
|
||||||
|
|
||||||
;A key to press to open a debug game editor
|
;A key to press to open a debug game editor
|
||||||
DebugEditorKey=0
|
DebugEditorKey=0
|
||||||
|
|
||||||
;XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
;XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
||||||
[Misc]
|
[Misc]
|
||||||
|
|
||||||
;Time limit in years. Must be between -3 and 13
|
;Time limit in years. Must be between -3 and 13
|
||||||
|
|||||||
+10
-18
@@ -386,11 +386,11 @@ static void InitOpcodeMetaTable() {
|
|||||||
|
|
||||||
typedef void (_stdcall *regOpcodeProc)(WORD opcode,void* ptr);
|
typedef void (_stdcall *regOpcodeProc)(WORD opcode,void* ptr);
|
||||||
|
|
||||||
static DWORD highlightingToggled=0;
|
static DWORD highlightingToggled = 0;
|
||||||
static DWORD MotionSensorMode;
|
static DWORD MotionSensorMode;
|
||||||
static BYTE toggleHighlightsKey;
|
static BYTE toggleHighlightsKey;
|
||||||
static DWORD HighlightContainers;
|
static DWORD highlightContainers = 0;
|
||||||
static DWORD Color_Containers;
|
static int outlineColor = 0x10;
|
||||||
static int idle;
|
static int idle;
|
||||||
static char HighlightFail1[128];
|
static char HighlightFail1[128];
|
||||||
static char HighlightFail2[128];
|
static char HighlightFail2[128];
|
||||||
@@ -1104,19 +1104,18 @@ loopObject:
|
|||||||
mov eax, [ecx+0x20]
|
mov eax, [ecx+0x20]
|
||||||
and eax, 0xF000000
|
and eax, 0xF000000
|
||||||
sar eax, 0x18
|
sar eax, 0x18
|
||||||
test eax, eax // This object is an item?
|
test eax, eax // Is this an item?
|
||||||
jnz nextObject // No
|
jnz nextObject // No
|
||||||
cmp dword ptr [ecx+0x7C], eax // Owned by someone?
|
cmp dword ptr [ecx+0x7C], eax // Owned by someone?
|
||||||
jnz nextObject // Yes
|
jnz nextObject // Yes
|
||||||
test dword ptr [ecx+0x74], eax // Already outlined?
|
test dword ptr [ecx+0x74], eax // Already outlined?
|
||||||
jnz nextObject // Yes
|
jnz nextObject // Yes
|
||||||
mov edx, 0x10 // yellow
|
test byte ptr [ecx+0x25], 0x10 // Is NoHighlight_ flag set (is this a container)?
|
||||||
test byte ptr [ecx+0x25], dl // NoHighlight_ flag is set (is this a container)?
|
|
||||||
jz NoHighlight // No
|
jz NoHighlight // No
|
||||||
cmp HighlightContainers, eax // Highlight containers?
|
cmp highlightContainers, eax // Highlight containers?
|
||||||
je nextObject // No
|
je nextObject // No
|
||||||
mov edx, Color_Containers // NR: should be set to yellow or purple later
|
|
||||||
NoHighlight:
|
NoHighlight:
|
||||||
|
mov edx, outlineColor
|
||||||
mov [ecx+0x74], edx
|
mov [ecx+0x74], edx
|
||||||
nextObject:
|
nextObject:
|
||||||
call obj_find_next_at_
|
call obj_find_next_at_
|
||||||
@@ -1178,16 +1177,9 @@ void ScriptExtenderSetup() {
|
|||||||
toggleHighlightsKey = GetPrivateProfileIntA("Input", "ToggleItemHighlightsKey", 0, ini);
|
toggleHighlightsKey = GetPrivateProfileIntA("Input", "ToggleItemHighlightsKey", 0, ini);
|
||||||
if (toggleHighlightsKey) {
|
if (toggleHighlightsKey) {
|
||||||
MotionSensorMode = GetPrivateProfileIntA("Misc", "MotionScannerFlags", 1, ini);
|
MotionSensorMode = GetPrivateProfileIntA("Misc", "MotionScannerFlags", 1, ini);
|
||||||
HighlightContainers = GetPrivateProfileIntA("Input", "HighlightContainers", 0, ini);
|
highlightContainers = GetPrivateProfileIntA("Input", "HighlightContainers", 0, ini);
|
||||||
switch (HighlightContainers) {
|
outlineColor = GetPrivateProfileIntA("Input", "OutlineColor", 0x10, ini);
|
||||||
case 1:
|
if (outlineColor < 1) outlineColor = 0x40;
|
||||||
Color_Containers = 0x10; // yellow
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
Color_Containers = 0x40; // purple
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
//HookCall(0x44B9BA, &gmouse_bk_process_hook);
|
|
||||||
HookCall(0x44BD1C, &obj_remove_outline_hook);
|
HookCall(0x44BD1C, &obj_remove_outline_hook);
|
||||||
HookCall(0x44E559, &obj_remove_outline_hook);
|
HookCall(0x44E559, &obj_remove_outline_hook);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user