comparison src/X_main.c @ 873:881efcd8a18f abs_n_rel_center

Merge from default branch
author Thinker K.F. Li <thinker@codemud.net>
date Fri, 24 Sep 2010 16:06:42 +0800
parents e6c107b2e271
children 4f4abce1b5df
comparison
equal deleted inserted replaced
862:3ce9daa9558b 873:881efcd8a18f
208 XFlush(display); 208 XFlush(display);
209 209
210 tman = mb_tman_new(); 210 tman = mb_tman_new();
211 if(tman) { 211 if(tman) {
212 /* Prepare an animation program. */ 212 /* Prepare an animation program. */
213 progm = mb_progm_new(10, &rdman); 213 progm = mb_progm_new(30, &rdman);
214 214
215 MB_TIMEVAL_SET(&start, 0, 0); 215 MB_TIMEVAL_SET(&start, 0, 0);
216 MB_TIMEVAL_SET(&playing, 1, 0); 216 MB_TIMEVAL_SET(&playing, 1, 0);
217 word = mb_progm_next_word(progm, &start, &playing); 217 word = mb_progm_next_word(progm, &start, &playing);
218 218
232 word = mb_progm_next_word(progm, &start, &playing); 232 word = mb_progm_next_word(progm, &start, &playing);
233 233
234 act = mb_shift_new(0, -20, coord1, word); 234 act = mb_shift_new(0, -20, coord1, word);
235 act = mb_shift_new(0, 20, coord2, word); 235 act = mb_shift_new(0, 20, coord2, word);
236 act = mb_chgcolor_new(0, 0, 1, 0.5, fill1, word); 236 act = mb_chgcolor_new(0, 0, 1, 0.5, fill1, word);
237 act = mb_chgcolor_new(1, 0, 0, 0.5, fill2, word);
238 act = mb_visibility_new(VIS_VISIBLE, coord3, word);
239
240 MB_TIMEVAL_SET(&start, 5, 0);
241 MB_TIMEVAL_SET(&playing, 2, 0);
242 word = mb_progm_next_word(progm, &start, &playing);
243
244 act = mb_shift_new(0, 20, coord1, word);
245 act = mb_shift_new(0, -20, coord2, word);
246 act = mb_chgcolor_new(1, 0, 0, 1, fill1, word);
247 act = mb_chgcolor_new(0, 0, 1, 1, fill2, word);
248 act = mb_visibility_new(VIS_HIDDEN, coord3, word);
249
250 MB_TIMEVAL_SET(&start, 7, 0);
251 MB_TIMEVAL_SET(&playing, 2, 0);
252 word = mb_progm_next_word(progm, &start, &playing);
253
254 act = mb_shift_new(0, -20, coord1, word);
255 act = mb_shift_new(0, 20, coord2, word);
256 act = mb_chgcolor_new(0, 1, 0, 0.5, fill1, word);
257 act = mb_chgcolor_new(1, 0, 0, 0.5, fill2, word);
258 act = mb_visibility_new(VIS_VISIBLE, coord3, word);
259
260 MB_TIMEVAL_SET(&start, 9, 0);
261 MB_TIMEVAL_SET(&playing, 2, 0);
262 word = mb_progm_next_word(progm, &start, &playing);
263
264 act = mb_shift_new(0, 20, coord1, word);
265 act = mb_shift_new(0, -20, coord2, word);
266 act = mb_chgcolor_new(0, 0, 1, 1, fill1, word);
267 act = mb_chgcolor_new(1, 0, 0, 1, fill2, word);
268 act = mb_visibility_new(VIS_HIDDEN, coord3, word);
269
270 MB_TIMEVAL_SET(&start, 11, 0);
271 MB_TIMEVAL_SET(&playing, 2, 0);
272 word = mb_progm_next_word(progm, &start, &playing);
273
274 act = mb_shift_new(0, -20, coord1, word);
275 act = mb_shift_new(0, 20, coord2, word);
276 act = mb_chgcolor_new(0, 1, 0, 0.5, fill1, word);
277 act = mb_chgcolor_new(1, 0, 0, 0.5, fill2, word);
278 act = mb_visibility_new(VIS_VISIBLE, coord3, word);
279
280 MB_TIMEVAL_SET(&start, 13, 0);
281 MB_TIMEVAL_SET(&playing, 2, 0);
282 word = mb_progm_next_word(progm, &start, &playing);
283
284 act = mb_shift_new(0, 20, coord1, word);
285 act = mb_shift_new(0, -20, coord2, word);
286 act = mb_chgcolor_new(0, 0, 1, 1, fill1, word);
287 act = mb_chgcolor_new(1, 0, 0, 1, fill2, word);
288 act = mb_visibility_new(VIS_HIDDEN, coord3, word);
289
290 MB_TIMEVAL_SET(&start, 15, 0);
291 MB_TIMEVAL_SET(&playing, 2, 0);
292 word = mb_progm_next_word(progm, &start, &playing);
293
294 act = mb_shift_new(0, -20, coord1, word);
295 act = mb_shift_new(0, 20, coord2, word);
296 act = mb_chgcolor_new(0, 1, 0, 0.5, fill1, word);
297 act = mb_chgcolor_new(1, 0, 0, 0.5, fill2, word);
298 act = mb_visibility_new(VIS_VISIBLE, coord3, word);
299
300 MB_TIMEVAL_SET(&start, 17, 0);
301 MB_TIMEVAL_SET(&playing, 2, 0);
302 word = mb_progm_next_word(progm, &start, &playing);
303
304 act = mb_shift_new(0, 20, coord1, word);
305 act = mb_shift_new(0, -20, coord2, word);
306 act = mb_chgcolor_new(0, 0, 1, 1, fill1, word);
307 act = mb_chgcolor_new(1, 0, 0, 1, fill2, word);
308 act = mb_visibility_new(VIS_HIDDEN, coord3, word);
309
310 MB_TIMEVAL_SET(&start, 19, 0);
311 MB_TIMEVAL_SET(&playing, 2, 0);
312 word = mb_progm_next_word(progm, &start, &playing);
313
314 act = mb_shift_new(0, -20, coord1, word);
315 act = mb_shift_new(0, 20, coord2, word);
316 act = mb_chgcolor_new(0, 1, 0, 0.5, fill1, word);
317 act = mb_chgcolor_new(1, 0, 0, 0.5, fill2, word);
318 act = mb_visibility_new(VIS_VISIBLE, coord3, word);
319
320 MB_TIMEVAL_SET(&start, 21, 0);
321 MB_TIMEVAL_SET(&playing, 2, 0);
322 word = mb_progm_next_word(progm, &start, &playing);
323
324 act = mb_shift_new(0, 20, coord1, word);
325 act = mb_shift_new(0, -20, coord2, word);
326 act = mb_chgcolor_new(0, 0, 1, 1, fill1, word);
327 act = mb_chgcolor_new(1, 0, 0, 1, fill2, word);
328 act = mb_visibility_new(VIS_HIDDEN, coord3, word);
329
330 MB_TIMEVAL_SET(&start, 23, 0);
331 MB_TIMEVAL_SET(&playing, 2, 0);
332 word = mb_progm_next_word(progm, &start, &playing);
333
334 act = mb_shift_new(0, -20, coord1, word);
335 act = mb_shift_new(0, 20, coord2, word);
336 act = mb_chgcolor_new(0, 1, 0, 0.5, fill1, word);
337 act = mb_chgcolor_new(1, 0, 0, 0.5, fill2, word);
338 act = mb_visibility_new(VIS_VISIBLE, coord3, word);
339
340 MB_TIMEVAL_SET(&start, 25, 0);
341 MB_TIMEVAL_SET(&playing, 2, 0);
342 word = mb_progm_next_word(progm, &start, &playing);
343
344 act = mb_shift_new(0, 20, coord1, word);
345 act = mb_shift_new(0, -20, coord2, word);
346 act = mb_chgcolor_new(0, 0, 1, 1, fill1, word);
347 act = mb_chgcolor_new(1, 0, 0, 1, fill2, word);
348 act = mb_visibility_new(VIS_HIDDEN, coord3, word);
349
350 MB_TIMEVAL_SET(&start, 27, 0);
351 MB_TIMEVAL_SET(&playing, 2, 0);
352 word = mb_progm_next_word(progm, &start, &playing);
353
354 act = mb_shift_new(0, -20, coord1, word);
355 act = mb_shift_new(0, 20, coord2, word);
356 act = mb_chgcolor_new(0, 1, 0, 0.5, fill1, word);
357 act = mb_chgcolor_new(1, 0, 0, 0.5, fill2, word);
358 act = mb_visibility_new(VIS_VISIBLE, coord3, word);
359
360 MB_TIMEVAL_SET(&start, 29, 0);
361 MB_TIMEVAL_SET(&playing, 2, 0);
362 word = mb_progm_next_word(progm, &start, &playing);
363
364 act = mb_shift_new(0, 20, coord1, word);
365 act = mb_shift_new(0, -20, coord2, word);
366 act = mb_chgcolor_new(0, 0, 1, 1, fill1, word);
367 act = mb_chgcolor_new(1, 0, 0, 1, fill2, word);
368 act = mb_visibility_new(VIS_HIDDEN, coord3, word);
369
370 MB_TIMEVAL_SET(&start, 31, 0);
371 MB_TIMEVAL_SET(&playing, 2, 0);
372 word = mb_progm_next_word(progm, &start, &playing);
373
374 act = mb_shift_new(0, -20, coord1, word);
375 act = mb_shift_new(0, 20, coord2, word);
376 act = mb_chgcolor_new(0, 1, 0, 0.5, fill1, word);
377 act = mb_chgcolor_new(1, 0, 0, 0.5, fill2, word);
378 act = mb_visibility_new(VIS_VISIBLE, coord3, word);
379
380 MB_TIMEVAL_SET(&start, 33, 0);
381 MB_TIMEVAL_SET(&playing, 2, 0);
382 word = mb_progm_next_word(progm, &start, &playing);
383
384 act = mb_shift_new(0, 20, coord1, word);
385 act = mb_shift_new(0, -20, coord2, word);
386 act = mb_chgcolor_new(0, 0, 1, 1, fill1, word);
387 act = mb_chgcolor_new(1, 0, 0, 1, fill2, word);
388 act = mb_visibility_new(VIS_HIDDEN, coord3, word);
389
390 MB_TIMEVAL_SET(&start, 35, 0);
391 MB_TIMEVAL_SET(&playing, 2, 0);
392 word = mb_progm_next_word(progm, &start, &playing);
393
394 act = mb_shift_new(0, -20, coord1, word);
395 act = mb_shift_new(0, 20, coord2, word);
396 act = mb_chgcolor_new(0, 1, 0, 0.5, fill1, word);
237 act = mb_chgcolor_new(1, 0, 0, 0.5, fill2, word); 397 act = mb_chgcolor_new(1, 0, 0, 0.5, fill2, word);
238 act = mb_visibility_new(VIS_VISIBLE, coord3, word); 398 act = mb_visibility_new(VIS_VISIBLE, coord3, word);
239 399
240 /* Start playing the program. */ 400 /* Start playing the program. */
241 gettimeofday(&tv, NULL); 401 gettimeofday(&tv, NULL);