summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--games/pacman/pacman-graphic.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/games/pacman/pacman-graphic.c b/games/pacman/pacman-graphic.c
index d2eff4a..d9b4ba8 100644
--- a/games/pacman/pacman-graphic.c
+++ b/games/pacman/pacman-graphic.c
@@ -63,14 +63,14 @@ pacman_graphic_draw (GameGraphic *graphic, cairo_t *cr)
mouth_direction + 2 * GAME_PI - mouth_open * GAME_PI / 4);
cairo_line_to (cr, 0.5, 0.5);
cairo_fill_preserve (cr);
- cairo_set_source_rgb (cr, 0.0, 0.0, 0.0);
+
+ if (game_color_to_gray (&pacman->color) <= 0.5)
+ cairo_set_source_rgb (cr, 1.0, 1.0, 1.0);
+ else
+ cairo_set_source_rgb (cr, 0.0, 0.0, 0.0);
cairo_set_line_width (cr, 0.06);
- cairo_stroke_preserve (cr);
- cairo_set_source_rgb (cr, 1.0, 1.0, 1.0);
- cairo_set_line_width (cr, 0.02);
cairo_stroke (cr);
/* eye */
- cairo_set_source_rgb (cr, 0.0, 0.0, 0.0);
cairo_arc (cr, eye_x, eye_y, 0.05, 0.0, 2 * GAME_PI);
cairo_fill (cr);
}