Mercurial > MadButterfly
comparison src/shift.c @ 1067:7b4e80ab671a openvg
merge from default branch
author | Thinker K.F. Li <thinker@codemud.net> |
---|---|
date | Wed, 01 Dec 2010 12:25:56 +0800 |
parents | 586e50f82c1f |
children |
comparison
equal
deleted
inserted
replaced
630:bd18951b51d5 | 1067:7b4e80ab671a |
---|---|
1 // -*- indent-tabs-mode: t; tab-width: 8; c-basic-offset: 4; -*- | |
2 // vim: sw=4:ts=8:sts=4 | |
1 #include <stdio.h> | 3 #include <stdio.h> |
2 #include <stdlib.h> | 4 #include <stdlib.h> |
3 #include <string.h> | 5 #include <string.h> |
4 #include "mb_animate.h" | 6 #include "mb_animate.h" |
5 | 7 |
43 mb_shift_t *shift = (mb_shift_t *)act; | 45 mb_shift_t *shift = (mb_shift_t *)act; |
44 mb_timeval_t diff; | 46 mb_timeval_t diff; |
45 coord_t *coord; | 47 coord_t *coord; |
46 float ratio; | 48 float ratio; |
47 | 49 |
48 | 50 |
49 MB_TIMEVAL_CP(&diff, now); | 51 MB_TIMEVAL_CP(&diff, now); |
50 MB_TIMEVAL_DIFF(&diff, &shift->start_time); | 52 MB_TIMEVAL_DIFF(&diff, &shift->start_time); |
51 ratio = comp_mb_timeval_ratio(&diff, shift->playing_time); | 53 ratio = comp_mb_timeval_ratio(&diff, shift->playing_time); |
52 | 54 |
53 coord = shift->coord; | 55 coord = shift->coord; |