-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Hues.mul in cedserver, cleanup and more logging
- Loading branch information
Showing
5 changed files
with
72 additions
and
62 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
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
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
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,19 @@ | ||
namespace CentrED; | ||
|
||
public static class HueProvider | ||
{ | ||
public static bool GetHueCount(string huePath, out int hueCount) | ||
{ | ||
if (File.Exists(huePath)) | ||
{ | ||
using var file = File.Open(huePath, FileMode.Open, FileAccess.Read, FileShare.Read); | ||
//Header + 8 entries * (colortable + tablestart + tableend + name) | ||
int groupSize = 4 + 8 * (32 * 2 + 2 + 2 + 20); | ||
int entrycount = (int)file.Length / groupSize; | ||
hueCount = entrycount * 8; | ||
return true; | ||
} | ||
hueCount = 3000; | ||
return false; | ||
} | ||
} |
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