diff options
Diffstat (limited to 'pd/src/g_template.c')
-rw-r--r-- | pd/src/g_template.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/pd/src/g_template.c b/pd/src/g_template.c index 05cede66..b2b359d3 100644 --- a/pd/src/g_template.c +++ b/pd/src/g_template.c @@ -1082,6 +1082,7 @@ static void curve_activate(t_gobj *z, t_glist *glist, /* fill in later */ } +#if 0 static int rangecolor(int n) /* 0 to 9 in 5 steps */ { int n2 = n/2; /* 0 to 4 */ @@ -1089,6 +1090,15 @@ static int rangecolor(int n) /* 0 to 9 in 5 steps */ if (ret > 255) ret = 255; return (ret); } +#endif + +static int rangecolor(int n) /* 0 to 9 in 5 steps */ +{ + int n2 = (n == 9 ? 8 : n); /* 0 to 8 */ + int ret = (n2 << 5); /* 0 to 256 in 9 steps */ + if (ret > 255) ret = 255; + return (ret); +} static void numbertocolor(int n, char *s) { |