Skip to content

Commit

Permalink
scct: indicators fix
Browse files Browse the repository at this point in the history
- fixes #1571
  • Loading branch information
ThirteenAG committed Jul 4, 2024
1 parent 3f254b7 commit e04087e
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 10 deletions.
4 changes: 2 additions & 2 deletions includes/LED/LEDEffects.h
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ class LEDEffects
LogiLedSetTargetDevice(LOGI_DEVICETYPE_PERKEY_RGB);
auto& arr = dead ? keysCardiogramDead : keysCardiogram;
static auto TIMERA = Timer();
static auto counter = 0;
static size_t counter = 0;
auto interval = 5 * arr.size();

if (TIMERA >= interval)
Expand All @@ -436,7 +436,7 @@ class LEDEffects
LogiLedSetTargetDevice(LOGI_DEVICETYPE_PERKEY_RGB);
auto& arr = dead ? keysCardiogramNumpadDead : keysCardiogramNumpad;
static auto TIMERB = Timer();
static auto counter = 0;
static size_t counter = 0;
auto interval = 150 * arr.size();

if (TIMERB >= interval)
Expand Down
27 changes: 19 additions & 8 deletions source/SplinterCellChaosTheory.WidescreenFix/dllmain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ FLTColor gColor = { 0 };
uint32_t bLightSyncRGB;
float* __cdecl FGetHSV(float* dest, uint8_t H, uint8_t S, uint8_t V, uint32_t unk)
{
bool bChangeColor = false;
if ((H == 0x41 && S == 0xC8) || (H == 0x2C && S == 0xCC) || (H == 0x00 && S == 0xFF && V == 0xFF))
{
auto unk_ptr = unk + 20;
Expand All @@ -129,20 +130,21 @@ float* __cdecl FGetHSV(float* dest, uint8_t H, uint8_t S, uint8_t V, uint32_t un
uint32_t unk_val = *(uint32_t*)(unk_ptr);
if (unk_val == 862 ||unk_val == 879 || unk_val == 881 || unk_val == 875)
{
bChangeColor = true;
if (!gColor.empty())
{
dest[0] = gColor.R;
dest[1] = gColor.G;
dest[2] = gColor.B;
dest[3] = 1.0f;
return dest;
}
if (gBlacklistIndicators)
{
dest[0] *= gVisibility;
dest[1] *= gVisibility;
dest[2] *= gVisibility;
dest[3] *= gVisibility;

if (gBlacklistIndicators)
{
dest[0] *= gVisibility;
dest[1] *= gVisibility;
dest[2] *= gVisibility;
dest[3] *= gVisibility;
}
return dest;
}
}
Expand Down Expand Up @@ -200,6 +202,15 @@ float* __cdecl FGetHSV(float* dest, uint8_t H, uint8_t S, uint8_t V, uint32_t un
dest[1] = g;
dest[2] = b;
dest[3] = a;

if (bChangeColor && gBlacklistIndicators)
{
dest[0] *= gVisibility;
dest[1] *= gVisibility;
dest[2] *= gVisibility;
dest[3] *= gVisibility;
}

return dest;
}

Expand Down

0 comments on commit e04087e

Please sign in to comment.