adding Nonlinear Circuits (#180)

This commit is contained in:
dreamer 2022-02-26 17:25:29 +01:00 committed by GitHub
parent 3b9ecb114f
commit 991867b9cb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 86 additions and 0 deletions

View file

@ -265,6 +265,20 @@ static const struct {
{ "/kocmoc/res/SKF.svg", {}, -1 },
{ "/kocmoc/res/SVF.svg", {}, -1 },
{ "/kocmoc/res/TRG.svg", {}, -1 },
// CC0-1.0
{ "/nonlinearcircuits/res/NLC - 4seq.svg", {}, -1 },
{ "/nonlinearcircuits/res/NLC - 8 BIT CIPHER.svg", {}, -1 },
{ "/nonlinearcircuits/res/BOOLs2.svg", {}, -1 },
{ "/nonlinearcircuits/res/NLC - DIVIDE & CONQUER.svg", {}, -1 },
{ "/nonlinearcircuits/res/NLC - DIVINE CMOS.svg", {}, -1 },
{ "/nonlinearcircuits/res/DoubleNeuronRef.svg", {}, -1 },
{ "/nonlinearcircuits/res/NLC - GENiE.svg", {}, -1 },
{ "/nonlinearcircuits/res/LetsSplosh.svg", {}, -1 },
{ "/nonlinearcircuits/res/NLC - NEURON.svg", {}, -1 },
{ "/nonlinearcircuits/res/NLC - NUMBERWANG.svg", {}, -1 },
{ "/nonlinearcircuits/res/NLC - SEGUE.svg", {}, -1 },
{ "/nonlinearcircuits/res/squid-axon-papernoise-panel2.svg", {}, -1 },
{ "/nonlinearcircuits/res/NLC - STATUES.svg", {}, -1 },
// GPL-3.0-or-later
{ "/PathSet/res/AstroVibe.svg", {}, -1 },
{ "/PathSet/res/IceTray.svg", {}, -1 },
@ -365,6 +379,29 @@ static inline bool invertPaint(NSVGshape* const shape, NSVGpaint& paint, const c
}
}
// Special case for Nonlinear Circuits
if (svgFileToInvert != nullptr && std::strncmp(svgFileToInvert, "/nonlinearcircuits/", 19) == 0)
{
switch (paint.color)
{
case 0xff9a7900:
case 0xff96782c:
case 0xff6a07ae:
case 0xffcf8044:
case 0xff2ac6ba:
case 0xff5ba85c:
case 0xffa97b00:
case 0xff9f7a00:
case 0xffff7300:
case 0xffa47b00:
case 0xffb09423:
return false;
case 0xffffffff:
paint.color = 0x00000000;
return true;
}
}
// Special case for PathSet colors
if (svgFileToInvert != nullptr && std::strncmp(svgFileToInvert, "/PathSet/", 9) == 0)
{