I have been trying to hack the fuzzyflakes screensaver so that it'll change the color of the flakes to white when a specific color (the color #A9D691) is chosen. I can't seem to figure out exactly how to do that (I'm a bit of a noob to this stuff).
I have looked at the code and it appears that the colors of the flakes are set near the end of the FuzzyFlakesInit()
function, right about here:
Flake.ForeColor = FuzzyFlakesColorResource(Flake.Colors.Fore);
Flake.BackColor = FuzzyFlakesColorResource(Flake.Colors.Back);
Flake.BordColor = FuzzyFlakesColorResource(Flake.Colors.Bord);
Flake.GCValues.foreground = Flake.ForeColor;
Flake.GCValues.background = Flake.BackColor;
What I'm trying to do is first check to see if the specific color is set and if so set the Flake.Colors.Fore
variable to white. I have tried using code such as this:
if (flake->Colors.Fore == (char) "#A9D691") {
flake->ForeColor = FuzzyFlakesColorResource(flake, "white");
} else {
flake->ForeColor = FuzzyFlakesColorResource(flake, flake->Colors.Fore);
}
flake->BackColor = FuzzyFlakesColorResource(flake, flake->Colors.Back);
flake->BordColor = FuzzyFlakesColorResource(flake, flake->Colors.Bord);
Sadly a simple hack like that doesn't work. So I don't know if I'll have to convert "#A9D691" to something else or what, since the FuzzyFlakesColorHelper()
function seems to already set these variables.