Rev 1897 | Rev 2009 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1897 | Rev 1924 | ||
---|---|---|---|
Line 101... | Line 101... | ||
101 | 101 | ||
102 | 102 | ||
103 | struct colorer_t { |
103 | struct colorer_t { |
104 | enum {TOP, BOTTOM, BLEND, RANDOM}; |
104 | enum {TOP, BOTTOM, BLEND, RANDOM}; |
105 | static const char* s_schemes []; |
105 | static const char* s_schemes []; |
106 | #define maxs 4
|
106 | #define maxs_ 4
|
107 | #define maxs_1 (maxs - 1)
|
107 | #define maxs__1 (maxs_ - 1)
|
108 | int i; |
108 | int i; |
109 | get_color* schemes[maxs]; |
109 | get_color* schemes[maxs_]; |
110 | color& operator() () { |
110 | color& operator() () { |
111 | get_color& gci = *schemes[i]; |
111 | get_color& gci = *schemes[i]; |
112 | return gci (); |
112 | return gci (); |
113 | }
|
113 | }
|
114 | colorer_t& operator+= (int ds) { |
114 | colorer_t& operator+= (int ds) { |
115 | i += ds; |
115 | i += ds; |
116 | wrap (0, i, maxs_1); |
116 | wrap (0, i, maxs__1); |
117 | return *this; |
117 | return *this; |
118 | }
|
118 | }
|
119 | const char* get_scheme_name () { |
119 | const char* get_scheme_name () { |
120 | return s_schemes[i]; |
120 | return s_schemes[i]; |
121 | }
|
121 | }
|