forked from julianperrott/WowClassicGrindBot
-
-
Notifications
You must be signed in to change notification settings - Fork 137
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SharedLib: NpcNameFinder: Sliced into multiple files. DetermineNpcs: …
…early return. PopulateLines: Parallel.For body only captures local variables. Using Interlocked.Add for incrementing 'i'
- Loading branch information
Showing
6 changed files
with
142 additions
and
163 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,17 @@ | ||
namespace SharedLib.NpcFinder; | ||
|
||
public readonly struct LineSegment | ||
public readonly record struct LineSegment | ||
{ | ||
public readonly int XStart; | ||
public readonly int X; | ||
public readonly int Y; | ||
public readonly int XEnd; | ||
public readonly int XCenter; | ||
|
||
public readonly int XStart => X & 0xFFFF; | ||
public readonly int XEnd => X >> 16; | ||
public readonly int XCenter => XStart + ((XEnd - XStart) / 2); | ||
|
||
public LineSegment(int xStart, int xEnd, int y) | ||
{ | ||
this.XStart = xStart; | ||
this.Y = y; | ||
this.XEnd = xEnd; | ||
XCenter = XStart + ((XEnd - XStart) / 2); | ||
X = (xEnd << 16) | (xStart & 0xFFFF); | ||
Y = y; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
namespace SharedLib.NpcFinder; | ||
|
||
public static class NpcNameColors | ||
{ | ||
public const byte fBase = 230; | ||
|
||
public const byte fE_R = fBase; | ||
public const byte fE_G = 0; | ||
public const byte fE_B = 0; | ||
|
||
public const byte fF_R = 0; | ||
public const byte fF_G = fBase; | ||
public const byte fF_B = 0; | ||
|
||
public const byte fN_R = fBase; | ||
public const byte fN_G = fBase; | ||
public const byte fN_B = 0; | ||
|
||
public const byte fuzzCorpse = 18; | ||
public const byte fC_RGB = 128; | ||
|
||
public const byte sE_R = 240; | ||
public const byte sE_G = 35; | ||
public const byte sE_B = 35; | ||
|
||
public const byte sF_R = 0; | ||
public const byte sF_G = 250; | ||
public const byte sF_B = 0; | ||
|
||
public const byte sN_R = 250; | ||
public const byte sN_G = 250; | ||
public const byte sN_B = 0; | ||
|
||
public const byte sNamePlate_N = 254; | ||
|
||
public const byte sNamePlate_H_R = 254; | ||
public const byte sNamePlate_H_G = 254; | ||
public const byte sNamePlate_H_B = 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.