libtcod 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,225 +1,225 @@
1
- module TCOD
2
- class Color
3
- # default colors
4
- # grey levels
5
- BLACK=Color.rgb(0,0,0)
6
- DARKEST_GREY=Color.rgb(31,31,31)
7
- DARKER_GREY=Color.rgb(63,63,63)
8
- DARK_GREY=Color.rgb(95,95,95)
9
- GREY=Color.rgb(127,127,127)
10
- LIGHT_GREY=Color.rgb(159,159,159)
11
- LIGHTER_GREY=Color.rgb(191,191,191)
12
- LIGHTEST_GREY=Color.rgb(223,223,223)
13
- DARKEST_GRAY=Color.rgb(31,31,31)
14
- DARKER_GRAY=Color.rgb(63,63,63)
15
- DARK_GRAY=Color.rgb(95,95,95)
16
- GRAY=Color.rgb(127,127,127)
17
- LIGHT_GRAY=Color.rgb(159,159,159)
18
- LIGHTER_GRAY=Color.rgb(191,191,191)
19
- LIGHTEST_GRAY=Color.rgb(223,223,223)
20
- WHITE=Color.rgb(255,255,255)
21
-
22
- # sepia
23
- DARKEST_SEPIA=Color.rgb(31,24,15)
24
- DARKER_SEPIA=Color.rgb(63,50,31)
25
- DARK_SEPIA=Color.rgb(94,75,47)
26
- SEPIA=Color.rgb(127,101,63)
27
- LIGHT_SEPIA=Color.rgb(158,134,100)
28
- LIGHTER_SEPIA=Color.rgb(191,171,143)
29
- LIGHTEST_SEPIA=Color.rgb(222,211,195)
30
-
31
- #standard colors
32
- RED=Color.rgb(255,0,0)
33
- FLAME=Color.rgb(255,63,0)
34
- ORANGE=Color.rgb(255,127,0)
35
- AMBER=Color.rgb(255,191,0)
36
- YELLOW=Color.rgb(255,255,0)
37
- LIME=Color.rgb(191,255,0)
38
- CHARTREUSE=Color.rgb(127,255,0)
39
- GREEN=Color.rgb(0,255,0)
40
- SEA=Color.rgb(0,255,127)
41
- TURQUOISE=Color.rgb(0,255,191)
42
- CYAN=Color.rgb(0,255,255)
43
- SKY=Color.rgb(0,191,255)
44
- AZURE=Color.rgb(0,127,255)
45
- BLUE=Color.rgb(0,0,255)
46
- HAN=Color.rgb(63,0,255)
47
- VIOLET=Color.rgb(127,0,255)
48
- PURPLE=Color.rgb(191,0,255)
49
- FUCHSIA=Color.rgb(255,0,255)
50
- MAGENTA=Color.rgb(255,0,191)
51
- PINK=Color.rgb(255,0,127)
52
- CRIMSON=Color.rgb(255,0,63)
53
-
54
- # dark colors
55
- DARK_RED=Color.rgb(191,0,0)
56
- DARK_FLAME=Color.rgb(191,47,0)
57
- DARK_ORANGE=Color.rgb(191,95,0)
58
- DARK_AMBER=Color.rgb(191,143,0)
59
- DARK_YELLOW=Color.rgb(191,191,0)
60
- DARK_LIME=Color.rgb(143,191,0)
61
- DARK_CHARTREUSE=Color.rgb(95,191,0)
62
- DARK_GREEN=Color.rgb(0,191,0)
63
- DARK_SEA=Color.rgb(0,191,95)
64
- DARK_TURQUOISE=Color.rgb(0,191,143)
65
- DARK_CYAN=Color.rgb(0,191,191)
66
- DARK_SKY=Color.rgb(0,143,191)
67
- DARK_AZURE=Color.rgb(0,95,191)
68
- DARK_BLUE=Color.rgb(0,0,191)
69
- DARK_HAN=Color.rgb(47,0,191)
70
- DARK_VIOLET=Color.rgb(95,0,191)
71
- DARK_PURPLE=Color.rgb(143,0,191)
72
- DARK_FUCHSIA=Color.rgb(191,0,191)
73
- DARK_MAGENTA=Color.rgb(191,0,143)
74
- DARK_PINK=Color.rgb(191,0,95)
75
- DARK_CRIMSON=Color.rgb(191,0,47)
76
-
77
- # darker colors
78
- DARKER_RED=Color.rgb(127,0,0)
79
- DARKER_FLAME=Color.rgb(127,31,0)
80
- DARKER_ORANGE=Color.rgb(127,63,0)
81
- DARKER_AMBER=Color.rgb(127,95,0)
82
- DARKER_YELLOW=Color.rgb(127,127,0)
83
- DARKER_LIME=Color.rgb(95,127,0)
84
- DARKER_CHARTREUSE=Color.rgb(63,127,0)
85
- DARKER_GREEN=Color.rgb(0,127,0)
86
- DARKER_SEA=Color.rgb(0,127,63)
87
- DARKER_TURQUOISE=Color.rgb(0,127,95)
88
- DARKER_CYAN=Color.rgb(0,127,127)
89
- DARKER_SKY=Color.rgb(0,95,127)
90
- DARKER_AZURE=Color.rgb(0,63,127)
91
- DARKER_BLUE=Color.rgb(0,0,127)
92
- DARKER_HAN=Color.rgb(31,0,127)
93
- DARKER_VIOLET=Color.rgb(63,0,127)
94
- DARKER_PURPLE=Color.rgb(95,0,127)
95
- DARKER_FUCHSIA=Color.rgb(127,0,127)
96
- DARKER_MAGENTA=Color.rgb(127,0,95)
97
- DARKER_PINK=Color.rgb(127,0,63)
98
- DARKER_CRIMSON=Color.rgb(127,0,31)
99
-
100
- # darkest colors
101
- DARKEST_RED=Color.rgb(63,0,0)
102
- DARKEST_FLAME=Color.rgb(63,15,0)
103
- DARKEST_ORANGE=Color.rgb(63,31,0)
104
- DARKEST_AMBER=Color.rgb(63,47,0)
105
- DARKEST_YELLOW=Color.rgb(63,63,0)
106
- DARKEST_LIME=Color.rgb(47,63,0)
107
- DARKEST_CHARTREUSE=Color.rgb(31,63,0)
108
- DARKEST_GREEN=Color.rgb(0,63,0)
109
- DARKEST_SEA=Color.rgb(0,63,31)
110
- DARKEST_TURQUOISE=Color.rgb(0,63,47)
111
- DARKEST_CYAN=Color.rgb(0,63,63)
112
- DARKEST_SKY=Color.rgb(0,47,63)
113
- DARKEST_AZURE=Color.rgb(0,31,63)
114
- DARKEST_BLUE=Color.rgb(0,0,63)
115
- DARKEST_HAN=Color.rgb(15,0,63)
116
- DARKEST_VIOLET=Color.rgb(31,0,63)
117
- DARKEST_PURPLE=Color.rgb(47,0,63)
118
- DARKEST_FUCHSIA=Color.rgb(63,0,63)
119
- DARKEST_MAGENTA=Color.rgb(63,0,47)
120
- DARKEST_PINK=Color.rgb(63,0,31)
121
- DARKEST_CRIMSON=Color.rgb(63,0,15)
122
-
123
- # light colors
124
- LIGHT_RED=Color.rgb(255,114,114)
125
- LIGHT_FLAME=Color.rgb(255,149,114)
126
- LIGHT_ORANGE=Color.rgb(255,184,114)
127
- LIGHT_AMBER=Color.rgb(255,219,114)
128
- LIGHT_YELLOW=Color.rgb(255,255,114)
129
- LIGHT_LIME=Color.rgb(219,255,114)
130
- LIGHT_CHARTREUSE=Color.rgb(184,255,114)
131
- LIGHT_GREEN=Color.rgb(114,255,114)
132
- LIGHT_SEA=Color.rgb(114,255,184)
133
- LIGHT_TURQUOISE=Color.rgb(114,255,219)
134
- LIGHT_CYAN=Color.rgb(114,255,255)
135
- LIGHT_SKY=Color.rgb(114,219,255)
136
- LIGHT_AZURE=Color.rgb(114,184,255)
137
- LIGHT_BLUE=Color.rgb(114,114,255)
138
- LIGHT_HAN=Color.rgb(149,114,255)
139
- LIGHT_VIOLET=Color.rgb(184,114,255)
140
- LIGHT_PURPLE=Color.rgb(219,114,255)
141
- LIGHT_FUCHSIA=Color.rgb(255,114,255)
142
- LIGHT_MAGENTA=Color.rgb(255,114,219)
143
- LIGHT_PINK=Color.rgb(255,114,184)
144
- LIGHT_CRIMSON=Color.rgb(255,114,149)
145
-
146
- #lighter colors
147
- LIGHTER_RED=Color.rgb(255,165,165)
148
- LIGHTER_FLAME=Color.rgb(255,188,165)
149
- LIGHTER_ORANGE=Color.rgb(255,210,165)
150
- LIGHTER_AMBER=Color.rgb(255,232,165)
151
- LIGHTER_YELLOW=Color.rgb(255,255,165)
152
- LIGHTER_LIME=Color.rgb(232,255,165)
153
- LIGHTER_CHARTREUSE=Color.rgb(210,255,165)
154
- LIGHTER_GREEN=Color.rgb(165,255,165)
155
- LIGHTER_SEA=Color.rgb(165,255,210)
156
- LIGHTER_TURQUOISE=Color.rgb(165,255,232)
157
- LIGHTER_CYAN=Color.rgb(165,255,255)
158
- LIGHTER_SKY=Color.rgb(165,232,255)
159
- LIGHTER_AZURE=Color.rgb(165,210,255)
160
- LIGHTER_BLUE=Color.rgb(165,165,255)
161
- LIGHTER_HAN=Color.rgb(188,165,255)
162
- LIGHTER_VIOLET=Color.rgb(210,165,255)
163
- LIGHTER_PURPLE=Color.rgb(232,165,255)
164
- LIGHTER_FUCHSIA=Color.rgb(255,165,255)
165
- LIGHTER_MAGENTA=Color.rgb(255,165,232)
166
- LIGHTER_PINK=Color.rgb(255,165,210)
167
- LIGHTER_CRIMSON=Color.rgb(255,165,188)
168
-
169
- # lightest colors
170
- LIGHTEST_RED=Color.rgb(255,191,191)
171
- LIGHTEST_FLAME=Color.rgb(255,207,191)
172
- LIGHTEST_ORANGE=Color.rgb(255,223,191)
173
- LIGHTEST_AMBER=Color.rgb(255,239,191)
174
- LIGHTEST_YELLOW=Color.rgb(255,255,191)
175
- LIGHTEST_LIME=Color.rgb(239,255,191)
176
- LIGHTEST_CHARTREUSE=Color.rgb(223,255,191)
177
- LIGHTEST_GREEN=Color.rgb(191,255,191)
178
- LIGHTEST_SEA=Color.rgb(191,255,223)
179
- LIGHTEST_TURQUOISE=Color.rgb(191,255,239)
180
- LIGHTEST_CYAN=Color.rgb(191,255,255)
181
- LIGHTEST_SKY=Color.rgb(191,239,255)
182
- LIGHTEST_AZURE=Color.rgb(191,223,255)
183
- LIGHTEST_BLUE=Color.rgb(191,191,255)
184
- LIGHTEST_HAN=Color.rgb(207,191,255)
185
- LIGHTEST_VIOLET=Color.rgb(223,191,255)
186
- LIGHTEST_PURPLE=Color.rgb(239,191,255)
187
- LIGHTEST_FUCHSIA=Color.rgb(255,191,255)
188
- LIGHTEST_MAGENTA=Color.rgb(255,191,239)
189
- LIGHTEST_PINK=Color.rgb(255,191,223)
190
- LIGHTEST_CRIMSON=Color.rgb(255,191,207)
191
-
192
- # desaturated colors
193
- DESATURATED_RED=Color.rgb(127,63,63)
194
- DESATURATED_FLAME=Color.rgb(127,79,63)
195
- DESATURATED_ORANGE=Color.rgb(127,95,63)
196
- DESATURATED_AMBER=Color.rgb(127,111,63)
197
- DESATURATED_YELLOW=Color.rgb(127,127,63)
198
- DESATURATED_LIME=Color.rgb(111,127,63)
199
- DESATURATED_CHARTREUSE=Color.rgb(95,127,63)
200
- DESATURATED_GREEN=Color.rgb(63,127,63)
201
- DESATURATED_SEA=Color.rgb(63,127,95)
202
- DESATURATED_TURQUOISE=Color.rgb(63,127,111)
203
- DESATURATED_CYAN=Color.rgb(63,127,127)
204
- DESATURATED_SKY=Color.rgb(63,111,127)
205
- DESATURATED_AZURE=Color.rgb(63,95,127)
206
- DESATURATED_BLUE=Color.rgb(63,63,127)
207
- DESATURATED_HAN=Color.rgb(79,63,127)
208
- DESATURATED_VIOLET=Color.rgb(95,63,127)
209
- DESATURATED_PURPLE=Color.rgb(111,63,127)
210
- DESATURATED_FUCHSIA=Color.rgb(127,63,127)
211
- DESATURATED_MAGENTA=Color.rgb(127,63,111)
212
- DESATURATED_PINK=Color.rgb(127,63,95)
213
- DESATURATED_CRIMSON=Color.rgb(127,63,79)
214
-
215
- # metallic
216
- BRASS=Color.rgb(191,151,96)
217
- COPPER=Color.rgb(197,136,124)
218
- GOLD=Color.rgb(229,191,0)
219
- SILVER=Color.rgb(203,203,203)
220
-
221
- # miscellaneous
222
- CELADON=Color.rgb(172,255,175)
223
- PEACH=Color.rgb(255,159,127)
224
- end
225
- end
1
+ module TCOD
2
+ class Color
3
+ # default colors
4
+ # grey levels
5
+ BLACK=Color.rgb(0,0,0)
6
+ DARKEST_GREY=Color.rgb(31,31,31)
7
+ DARKER_GREY=Color.rgb(63,63,63)
8
+ DARK_GREY=Color.rgb(95,95,95)
9
+ GREY=Color.rgb(127,127,127)
10
+ LIGHT_GREY=Color.rgb(159,159,159)
11
+ LIGHTER_GREY=Color.rgb(191,191,191)
12
+ LIGHTEST_GREY=Color.rgb(223,223,223)
13
+ DARKEST_GRAY=Color.rgb(31,31,31)
14
+ DARKER_GRAY=Color.rgb(63,63,63)
15
+ DARK_GRAY=Color.rgb(95,95,95)
16
+ GRAY=Color.rgb(127,127,127)
17
+ LIGHT_GRAY=Color.rgb(159,159,159)
18
+ LIGHTER_GRAY=Color.rgb(191,191,191)
19
+ LIGHTEST_GRAY=Color.rgb(223,223,223)
20
+ WHITE=Color.rgb(255,255,255)
21
+
22
+ # sepia
23
+ DARKEST_SEPIA=Color.rgb(31,24,15)
24
+ DARKER_SEPIA=Color.rgb(63,50,31)
25
+ DARK_SEPIA=Color.rgb(94,75,47)
26
+ SEPIA=Color.rgb(127,101,63)
27
+ LIGHT_SEPIA=Color.rgb(158,134,100)
28
+ LIGHTER_SEPIA=Color.rgb(191,171,143)
29
+ LIGHTEST_SEPIA=Color.rgb(222,211,195)
30
+
31
+ #standard colors
32
+ RED=Color.rgb(255,0,0)
33
+ FLAME=Color.rgb(255,63,0)
34
+ ORANGE=Color.rgb(255,127,0)
35
+ AMBER=Color.rgb(255,191,0)
36
+ YELLOW=Color.rgb(255,255,0)
37
+ LIME=Color.rgb(191,255,0)
38
+ CHARTREUSE=Color.rgb(127,255,0)
39
+ GREEN=Color.rgb(0,255,0)
40
+ SEA=Color.rgb(0,255,127)
41
+ TURQUOISE=Color.rgb(0,255,191)
42
+ CYAN=Color.rgb(0,255,255)
43
+ SKY=Color.rgb(0,191,255)
44
+ AZURE=Color.rgb(0,127,255)
45
+ BLUE=Color.rgb(0,0,255)
46
+ HAN=Color.rgb(63,0,255)
47
+ VIOLET=Color.rgb(127,0,255)
48
+ PURPLE=Color.rgb(191,0,255)
49
+ FUCHSIA=Color.rgb(255,0,255)
50
+ MAGENTA=Color.rgb(255,0,191)
51
+ PINK=Color.rgb(255,0,127)
52
+ CRIMSON=Color.rgb(255,0,63)
53
+
54
+ # dark colors
55
+ DARK_RED=Color.rgb(191,0,0)
56
+ DARK_FLAME=Color.rgb(191,47,0)
57
+ DARK_ORANGE=Color.rgb(191,95,0)
58
+ DARK_AMBER=Color.rgb(191,143,0)
59
+ DARK_YELLOW=Color.rgb(191,191,0)
60
+ DARK_LIME=Color.rgb(143,191,0)
61
+ DARK_CHARTREUSE=Color.rgb(95,191,0)
62
+ DARK_GREEN=Color.rgb(0,191,0)
63
+ DARK_SEA=Color.rgb(0,191,95)
64
+ DARK_TURQUOISE=Color.rgb(0,191,143)
65
+ DARK_CYAN=Color.rgb(0,191,191)
66
+ DARK_SKY=Color.rgb(0,143,191)
67
+ DARK_AZURE=Color.rgb(0,95,191)
68
+ DARK_BLUE=Color.rgb(0,0,191)
69
+ DARK_HAN=Color.rgb(47,0,191)
70
+ DARK_VIOLET=Color.rgb(95,0,191)
71
+ DARK_PURPLE=Color.rgb(143,0,191)
72
+ DARK_FUCHSIA=Color.rgb(191,0,191)
73
+ DARK_MAGENTA=Color.rgb(191,0,143)
74
+ DARK_PINK=Color.rgb(191,0,95)
75
+ DARK_CRIMSON=Color.rgb(191,0,47)
76
+
77
+ # darker colors
78
+ DARKER_RED=Color.rgb(127,0,0)
79
+ DARKER_FLAME=Color.rgb(127,31,0)
80
+ DARKER_ORANGE=Color.rgb(127,63,0)
81
+ DARKER_AMBER=Color.rgb(127,95,0)
82
+ DARKER_YELLOW=Color.rgb(127,127,0)
83
+ DARKER_LIME=Color.rgb(95,127,0)
84
+ DARKER_CHARTREUSE=Color.rgb(63,127,0)
85
+ DARKER_GREEN=Color.rgb(0,127,0)
86
+ DARKER_SEA=Color.rgb(0,127,63)
87
+ DARKER_TURQUOISE=Color.rgb(0,127,95)
88
+ DARKER_CYAN=Color.rgb(0,127,127)
89
+ DARKER_SKY=Color.rgb(0,95,127)
90
+ DARKER_AZURE=Color.rgb(0,63,127)
91
+ DARKER_BLUE=Color.rgb(0,0,127)
92
+ DARKER_HAN=Color.rgb(31,0,127)
93
+ DARKER_VIOLET=Color.rgb(63,0,127)
94
+ DARKER_PURPLE=Color.rgb(95,0,127)
95
+ DARKER_FUCHSIA=Color.rgb(127,0,127)
96
+ DARKER_MAGENTA=Color.rgb(127,0,95)
97
+ DARKER_PINK=Color.rgb(127,0,63)
98
+ DARKER_CRIMSON=Color.rgb(127,0,31)
99
+
100
+ # darkest colors
101
+ DARKEST_RED=Color.rgb(63,0,0)
102
+ DARKEST_FLAME=Color.rgb(63,15,0)
103
+ DARKEST_ORANGE=Color.rgb(63,31,0)
104
+ DARKEST_AMBER=Color.rgb(63,47,0)
105
+ DARKEST_YELLOW=Color.rgb(63,63,0)
106
+ DARKEST_LIME=Color.rgb(47,63,0)
107
+ DARKEST_CHARTREUSE=Color.rgb(31,63,0)
108
+ DARKEST_GREEN=Color.rgb(0,63,0)
109
+ DARKEST_SEA=Color.rgb(0,63,31)
110
+ DARKEST_TURQUOISE=Color.rgb(0,63,47)
111
+ DARKEST_CYAN=Color.rgb(0,63,63)
112
+ DARKEST_SKY=Color.rgb(0,47,63)
113
+ DARKEST_AZURE=Color.rgb(0,31,63)
114
+ DARKEST_BLUE=Color.rgb(0,0,63)
115
+ DARKEST_HAN=Color.rgb(15,0,63)
116
+ DARKEST_VIOLET=Color.rgb(31,0,63)
117
+ DARKEST_PURPLE=Color.rgb(47,0,63)
118
+ DARKEST_FUCHSIA=Color.rgb(63,0,63)
119
+ DARKEST_MAGENTA=Color.rgb(63,0,47)
120
+ DARKEST_PINK=Color.rgb(63,0,31)
121
+ DARKEST_CRIMSON=Color.rgb(63,0,15)
122
+
123
+ # light colors
124
+ LIGHT_RED=Color.rgb(255,114,114)
125
+ LIGHT_FLAME=Color.rgb(255,149,114)
126
+ LIGHT_ORANGE=Color.rgb(255,184,114)
127
+ LIGHT_AMBER=Color.rgb(255,219,114)
128
+ LIGHT_YELLOW=Color.rgb(255,255,114)
129
+ LIGHT_LIME=Color.rgb(219,255,114)
130
+ LIGHT_CHARTREUSE=Color.rgb(184,255,114)
131
+ LIGHT_GREEN=Color.rgb(114,255,114)
132
+ LIGHT_SEA=Color.rgb(114,255,184)
133
+ LIGHT_TURQUOISE=Color.rgb(114,255,219)
134
+ LIGHT_CYAN=Color.rgb(114,255,255)
135
+ LIGHT_SKY=Color.rgb(114,219,255)
136
+ LIGHT_AZURE=Color.rgb(114,184,255)
137
+ LIGHT_BLUE=Color.rgb(114,114,255)
138
+ LIGHT_HAN=Color.rgb(149,114,255)
139
+ LIGHT_VIOLET=Color.rgb(184,114,255)
140
+ LIGHT_PURPLE=Color.rgb(219,114,255)
141
+ LIGHT_FUCHSIA=Color.rgb(255,114,255)
142
+ LIGHT_MAGENTA=Color.rgb(255,114,219)
143
+ LIGHT_PINK=Color.rgb(255,114,184)
144
+ LIGHT_CRIMSON=Color.rgb(255,114,149)
145
+
146
+ #lighter colors
147
+ LIGHTER_RED=Color.rgb(255,165,165)
148
+ LIGHTER_FLAME=Color.rgb(255,188,165)
149
+ LIGHTER_ORANGE=Color.rgb(255,210,165)
150
+ LIGHTER_AMBER=Color.rgb(255,232,165)
151
+ LIGHTER_YELLOW=Color.rgb(255,255,165)
152
+ LIGHTER_LIME=Color.rgb(232,255,165)
153
+ LIGHTER_CHARTREUSE=Color.rgb(210,255,165)
154
+ LIGHTER_GREEN=Color.rgb(165,255,165)
155
+ LIGHTER_SEA=Color.rgb(165,255,210)
156
+ LIGHTER_TURQUOISE=Color.rgb(165,255,232)
157
+ LIGHTER_CYAN=Color.rgb(165,255,255)
158
+ LIGHTER_SKY=Color.rgb(165,232,255)
159
+ LIGHTER_AZURE=Color.rgb(165,210,255)
160
+ LIGHTER_BLUE=Color.rgb(165,165,255)
161
+ LIGHTER_HAN=Color.rgb(188,165,255)
162
+ LIGHTER_VIOLET=Color.rgb(210,165,255)
163
+ LIGHTER_PURPLE=Color.rgb(232,165,255)
164
+ LIGHTER_FUCHSIA=Color.rgb(255,165,255)
165
+ LIGHTER_MAGENTA=Color.rgb(255,165,232)
166
+ LIGHTER_PINK=Color.rgb(255,165,210)
167
+ LIGHTER_CRIMSON=Color.rgb(255,165,188)
168
+
169
+ # lightest colors
170
+ LIGHTEST_RED=Color.rgb(255,191,191)
171
+ LIGHTEST_FLAME=Color.rgb(255,207,191)
172
+ LIGHTEST_ORANGE=Color.rgb(255,223,191)
173
+ LIGHTEST_AMBER=Color.rgb(255,239,191)
174
+ LIGHTEST_YELLOW=Color.rgb(255,255,191)
175
+ LIGHTEST_LIME=Color.rgb(239,255,191)
176
+ LIGHTEST_CHARTREUSE=Color.rgb(223,255,191)
177
+ LIGHTEST_GREEN=Color.rgb(191,255,191)
178
+ LIGHTEST_SEA=Color.rgb(191,255,223)
179
+ LIGHTEST_TURQUOISE=Color.rgb(191,255,239)
180
+ LIGHTEST_CYAN=Color.rgb(191,255,255)
181
+ LIGHTEST_SKY=Color.rgb(191,239,255)
182
+ LIGHTEST_AZURE=Color.rgb(191,223,255)
183
+ LIGHTEST_BLUE=Color.rgb(191,191,255)
184
+ LIGHTEST_HAN=Color.rgb(207,191,255)
185
+ LIGHTEST_VIOLET=Color.rgb(223,191,255)
186
+ LIGHTEST_PURPLE=Color.rgb(239,191,255)
187
+ LIGHTEST_FUCHSIA=Color.rgb(255,191,255)
188
+ LIGHTEST_MAGENTA=Color.rgb(255,191,239)
189
+ LIGHTEST_PINK=Color.rgb(255,191,223)
190
+ LIGHTEST_CRIMSON=Color.rgb(255,191,207)
191
+
192
+ # desaturated colors
193
+ DESATURATED_RED=Color.rgb(127,63,63)
194
+ DESATURATED_FLAME=Color.rgb(127,79,63)
195
+ DESATURATED_ORANGE=Color.rgb(127,95,63)
196
+ DESATURATED_AMBER=Color.rgb(127,111,63)
197
+ DESATURATED_YELLOW=Color.rgb(127,127,63)
198
+ DESATURATED_LIME=Color.rgb(111,127,63)
199
+ DESATURATED_CHARTREUSE=Color.rgb(95,127,63)
200
+ DESATURATED_GREEN=Color.rgb(63,127,63)
201
+ DESATURATED_SEA=Color.rgb(63,127,95)
202
+ DESATURATED_TURQUOISE=Color.rgb(63,127,111)
203
+ DESATURATED_CYAN=Color.rgb(63,127,127)
204
+ DESATURATED_SKY=Color.rgb(63,111,127)
205
+ DESATURATED_AZURE=Color.rgb(63,95,127)
206
+ DESATURATED_BLUE=Color.rgb(63,63,127)
207
+ DESATURATED_HAN=Color.rgb(79,63,127)
208
+ DESATURATED_VIOLET=Color.rgb(95,63,127)
209
+ DESATURATED_PURPLE=Color.rgb(111,63,127)
210
+ DESATURATED_FUCHSIA=Color.rgb(127,63,127)
211
+ DESATURATED_MAGENTA=Color.rgb(127,63,111)
212
+ DESATURATED_PINK=Color.rgb(127,63,95)
213
+ DESATURATED_CRIMSON=Color.rgb(127,63,79)
214
+
215
+ # metallic
216
+ BRASS=Color.rgb(191,151,96)
217
+ COPPER=Color.rgb(197,136,124)
218
+ GOLD=Color.rgb(229,191,0)
219
+ SILVER=Color.rgb(203,203,203)
220
+
221
+ # miscellaneous
222
+ CELADON=Color.rgb(172,255,175)
223
+ PEACH=Color.rgb(255,159,127)
224
+ end
225
+ end
@@ -1,46 +1,80 @@
1
- module TCOD
2
- class Console
3
- attr_accessor :width, :height
4
-
5
- def self.root
6
- @root ||= TCOD.nsole.new(0, 0, true)
7
- end
8
-
9
- def initialize(w, h, root=False)
10
- if root
11
- @ptr = nil
12
- else
13
- @width = w
14
- @height = w
15
- @ptr = TCOD.console_new(w, h)
16
- end
17
- end
18
-
19
- def self.init_root(width, height, title, fullscreen=false, renderer=RENDERER_SDL)
20
- TCOD.console_init_root(width, height, title, fullscreen, renderer)
21
- root.width = width
22
- root.height = height
23
- root
24
- end
25
-
26
- def window_closed?
27
- TCOD.console_is_window_closed
28
- end
29
-
30
- def set_default_foreground(color)
31
- TCOD.console_set_default_foreground(@ptr, color)
32
- end
33
-
34
- def put_char(x, y, c, flag=BKGND_DEFAULT)
35
- TCOD.console_put_char(@ptr, x, y, c.ord, flag)
36
- end
37
-
38
- def flush
39
- TCOD.console_flush
40
- end
41
-
42
- def wait_for_keypress(flush=false)
43
- TCOD.console_wait_for_keypress(flush)
44
- end
45
- end
46
- end
1
+ module TCOD
2
+ class Console
3
+ attr_accessor :width, :height, :ptr
4
+
5
+ def self.root
6
+ @root ||= TCOD::Console.new(0, 0, true)
7
+ end
8
+
9
+ def initialize(w, h, root=false)
10
+ if root
11
+ @ptr = nil
12
+ else
13
+ @width = w
14
+ @height = w
15
+ @ptr = TCOD.console_new(w, h)
16
+ end
17
+ end
18
+
19
+ def init_root(width, height, title, fullscreen=false, renderer=RENDERER_SDL)
20
+ TCOD.console_init_root(width, height, title, fullscreen, renderer)
21
+ Console.root.width = width
22
+ Console.root.height = height
23
+ end
24
+
25
+ def set_window_title(title); TCOD.console_set_window_title(title); end
26
+ def set_fullscreen(bool); TCOD.console_set_fullscreen(bool); end
27
+ def is_fullscreen?; TCOD.console_is_fullscreen; end
28
+ def window_closed?; TCOD.console_is_window_closed; end
29
+ def set_custom_font(fontFile, flags, nb_char_horiz=0, nb_char_vertic=0)
30
+ TCOD.console_set_custom_font(fontFile, flags, nb_char_horiz, nb_char_vertic)
31
+ end
32
+ def map_ascii_code_to_font(asciiCode, fontCharX, fontCharY)
33
+ TCOD.console_map_ascii_code_to_font(asciiCode.ord, fontCharX, fontCharY)
34
+ end
35
+ def map_ascii_codes_to_font(asciiCode, nbCodes, fontCharX, fontCharY)
36
+ TCOD.console_map_ascii_code_to_font(asciiCode.ord, nbCodes, fontCharX, fontCharY)
37
+ end
38
+
39
+
40
+ def set_default_background(color); TCOD.console_set_default_background(@ptr, color); end
41
+ def set_default_foreground(color); TCOD.console_set_default_foreground(@ptr, color); end
42
+ def clear; TCOD.console_clear(@ptr); end
43
+
44
+ def put_char(x, y, c, flag=BKGND_DEFAULT)
45
+ TCOD.console_put_char(@ptr, x, y, c.ord, flag)
46
+ end
47
+ def put_char_ex(x, y, c, foreground, background)
48
+ TCOD.console_put_char_ex(@ptr, x, y, c.ord, foreground, background)
49
+ end
50
+ def set_background_flag(bkgnd_flag)
51
+ TCOD.console_set_background_flag(@ptr, bkgnd_flag)
52
+ end
53
+ def set_alignment(alignment)
54
+ TCOD.console_set_alignment(@ptr, alignment)
55
+ end
56
+ def print(x, y, fmt, *args)
57
+ TCOD.console_print(@ptr, x, y, fmt, *args)
58
+ end
59
+ def print_ex(x, y, bkgnd_flag, alignment, fmt, *args)
60
+ TCOD.console_print_ex(@ptr, x, y, bkgnd_flag, alignment, fmt, *args)
61
+ end
62
+ def print_rect(x, y, w, h, fmt, *args)
63
+ TCOD.console_print_rect(@ptr, x, y, w, h, fmt, *args)
64
+ end
65
+ def print_rect_ex(x, y, w, h, bkgnd_flag, alignment, fmt, *args)
66
+ TCOD.console_print_rect_ex(@ptr, x, y, w, h, bkgnf_flag, alignment, fmt, *args)
67
+ end
68
+
69
+ def flush; TCOD.console_flush; end
70
+
71
+ def check_for_keypress(flags=TCOD::KEY_PRESSED); TCOD.console_check_for_keypress(flags); end
72
+ def wait_for_keypress(flush=false); TCOD.console_wait_for_keypress(flush); end
73
+ def key_pressed?(keycode); TCOD.console_is_key_pressed(keycode); end
74
+
75
+ def blit(src, xSrc, ySrc, wSrc, hSrc, xDst, yDst, foregroundAlpha=1.0, backgroundAlpha=1.0)
76
+ TCOD.console_blit(src.ptr, xSrc, ySrc, wSrc, hSrc, @ptr, xDst, yDst, foregroundAlpha, backgroundAlpha)
77
+ end
78
+
79
+ end
80
+ end