From 9d2185a518842f05347a7442c934fd018acf4d19 Mon Sep 17 00:00:00 2001 From: Nick Gasson Date: Sat, 21 Jun 2008 20:40:09 +0100 Subject: [PATCH] Dummy dream bubble generator --- src/bubblegen.c | 5 +++++ src/display_cow.c | 7 +++++++ 2 files changed, 12 insertions(+) diff --git a/src/bubblegen.c b/src/bubblegen.c index 8b06c2a..4f3e68b 100644 --- a/src/bubblegen.c +++ b/src/bubblegen.c @@ -171,6 +171,11 @@ static int bubble_content_top() return CORNER_RADIUS; } +GdkPixbuf *make_dream_bubble(const char *file, int *p_width, int *p_height) +{ + return NULL; +} + GdkPixbuf *make_text_bubble(char *text, int *p_width, int *p_height) { bubble_t bubble; diff --git a/src/display_cow.c b/src/display_cow.c index b641d9e..8295256 100644 --- a/src/display_cow.c +++ b/src/display_cow.c @@ -35,6 +35,7 @@ #include "i18n.h" GdkPixbuf *make_text_bubble(char *text, int *p_width, int *p_height); +GdkPixbuf *make_dream_bubble(const char *file, int *p_width, int *p_height); #define TICK_TIMEOUT 100 #define BUBBLE_XOFFSET 5 // Distance from cow to bubble @@ -198,6 +199,12 @@ static void normal_setup(const char *text, bool debug) static void dream_setup(const char *file, bool debug) { debug_msg("Dreaming file: %s\n", file); + + // TODO: calculate display time + xcowsay.display_time = 10000; + + xcowsay.bubble_pixbuf = make_dream_bubble(file, &xcowsay.bubble_width, + &xcowsay.bubble_height); } void display_cow(bool debug, const char *text, bool run_main, cowmode_t mode) -- 2.39.2