Mercurial > MadButterfly
comparison src/X_main.c @ 58:1ca417f741f1
-
author | Thinker K.F. Li <thinker@branda.to> |
---|---|
date | Sun, 10 Aug 2008 21:32:42 +0800 |
parents | ab028c9f0930 |
children | 9ab15ebc9061 |
comparison
equal
deleted
inserted
replaced
57:ab028c9f0930 | 58:1ca417f741f1 |
---|---|
203 | 203 |
204 XFlush(display); | 204 XFlush(display); |
205 | 205 |
206 tman = mb_tman_new(); | 206 tman = mb_tman_new(); |
207 if(tman) { | 207 if(tman) { |
208 /* Prepare an animation program. */ | |
208 progm = mb_progm_new(10, &rdman); | 209 progm = mb_progm_new(10, &rdman); |
209 | 210 |
210 MB_TIMEVAL_SET(&start, 0, 0); | 211 MB_TIMEVAL_SET(&start, 0, 0); |
211 MB_TIMEVAL_SET(&playing, 1, 0); | 212 MB_TIMEVAL_SET(&playing, 1, 0); |
212 word = mb_progm_next_word(progm, &start, &playing); | 213 word = mb_progm_next_word(progm, &start, &playing); |
230 act = mb_shift_new(0, 20, coord2, word); | 231 act = mb_shift_new(0, 20, coord2, word); |
231 act = mb_chgcolor_new(0, 0, 1, 0.5, fill1, word); | 232 act = mb_chgcolor_new(0, 0, 1, 0.5, fill1, word); |
232 act = mb_chgcolor_new(1, 0, 0, 0.5, fill2, word); | 233 act = mb_chgcolor_new(1, 0, 0, 0.5, fill2, word); |
233 act = mb_visibility_new(VIS_VISIBLE, coord3, word); | 234 act = mb_visibility_new(VIS_VISIBLE, coord3, word); |
234 | 235 |
236 /* Start playing the program. */ | |
235 gettimeofday(&tv, NULL); | 237 gettimeofday(&tv, NULL); |
236 MB_TIMEVAL_SET(&mbtv, tv.tv_sec, tv.tv_usec); | 238 MB_TIMEVAL_SET(&mbtv, tv.tv_sec, tv.tv_usec); |
237 mb_progm_start(progm, tman, &mbtv); | 239 mb_progm_start(progm, tman, &mbtv); |
238 | 240 |
239 handle_connection(display, tman, &rdman, w, h); | 241 handle_connection(display, tman, &rdman, w, h); |