aboutsummaryrefslogtreecommitdiff
path: root/gtk.c
diff options
context:
space:
mode:
authorSimon Tatham <anakin@pobox.com>2005-05-18 09:04:47 +0000
committerSimon Tatham <anakin@pobox.com>2005-05-18 09:04:47 +0000
commit90e42d4cdedf999a5c996ff4ac1353ecee280ea5 (patch)
treead790b59cd1cc8b64ab0ef7492ec440f28763376 /gtk.c
parent1304e07d7460aee9994f05bb5dc718e157ca07d6 (diff)
downloadpuzzles-90e42d4cdedf999a5c996ff4ac1353ecee280ea5.zip
puzzles-90e42d4cdedf999a5c996ff4ac1353ecee280ea5.tar.gz
puzzles-90e42d4cdedf999a5c996ff4ac1353ecee280ea5.tar.bz2
puzzles-90e42d4cdedf999a5c996ff4ac1353ecee280ea5.tar.xz
Move the colour configuration into midend.c so that it becomes
cross-platform, and rename the environment variables so that they follow the puzzle name. Should allow a static environment configuration for each puzzle. Also introduced a <game>_PRESETS variable for people whose favourite configuration isn't on the Type menu by default. [originally from svn r5801]
Diffstat (limited to 'gtk.c')
-rw-r--r--gtk.c21
1 files changed, 3 insertions, 18 deletions
diff --git a/gtk.c b/gtk.c
index 6de9fcf..55bc179 100644
--- a/gtk.c
+++ b/gtk.c
@@ -1143,24 +1143,9 @@ static frontend *new_window(char *game_id, char **error)
fe->ncolours = ncolours;
fe->colours = snewn(ncolours, GdkColor);
for (i = 0; i < ncolours; i++) {
- /*
- * Just for Gareth: if you dislike any of the standard
- * colours, here's your chance to configure them in a
- * really hacky way.
- */
- char buf[80], *e;
- unsigned int r, g, b;
- sprintf(buf, "PUZZLE_COLOUR_%d", i);
- if ((e = getenv(buf)) != NULL &&
- sscanf(e, "%2x%2x%2x", &r, &g, &b) == 3) {
- fe->colours[i].red = r * 0x101;
- fe->colours[i].green = g * 0x101;
- fe->colours[i].blue = b * 0x101;
- } else {
- fe->colours[i].red = colours[i*3] * 0xFFFF;
- fe->colours[i].green = colours[i*3+1] * 0xFFFF;
- fe->colours[i].blue = colours[i*3+2] * 0xFFFF;
- }
+ fe->colours[i].red = colours[i*3] * 0xFFFF;
+ fe->colours[i].green = colours[i*3+1] * 0xFFFF;
+ fe->colours[i].blue = colours[i*3+2] * 0xFFFF;
}
success = snewn(ncolours, gboolean);
gdk_colormap_alloc_colors(fe->colmap, fe->colours, ncolours,