Good, good
This commit is contained in:
parent
b7d2ea6bfa
commit
a0e19b3ce4
1 changed files with 2 additions and 4 deletions
|
@ -4,8 +4,6 @@
|
|||
#include <hexagram/anim.h>
|
||||
|
||||
void hexagram_anim_init(hexagram_anim *anim) {
|
||||
anim->current = 0;
|
||||
|
||||
gettimeofday(&anim->start, NULL);
|
||||
}
|
||||
|
||||
|
@ -28,7 +26,7 @@ static inline size_t stop_index(hexagram_anim *anim, double offset) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
int hexagram_anim_step(hexagram_anim *anim, cairo_t *bg, cairo_t *fg) {
|
||||
int hexagram_anim_step(hexagram_anim *anim) {
|
||||
struct timeval tv;
|
||||
double offset = 0.0, interval, progress;
|
||||
size_t i, a;
|
||||
|
@ -48,7 +46,7 @@ int hexagram_anim_step(hexagram_anim *anim, cairo_t *bg, cairo_t *fg) {
|
|||
continue;
|
||||
}
|
||||
|
||||
if (interval < offset + duration) {
|
||||
if (interval <= offset + duration) {
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue