Vladimír Vondruš
a31ae86500
Of course there were tests that got never executed.
...
Yay!
7 years ago
Vladimír Vondruš
2149f7b869
Wrap all tests in unnamed namespaces.
...
This makes the compiler warn about test cases that aren't ever used,
which is a good thing.
7 years ago
Vladimír Vondruš
e6b7aa12fa
Updated copyright year.
7 years ago
Vladimír Vondruš
e74749043c
Animation: make it possible to advance() multiple players at once.
...
Just realized that <functional> is 22k in C++11 and 44k lines in C++17.
SAD. EXTREMELY.
8 years ago
Vladimír Vondruš
1234bc8c48
Animation: added Player::resume().
8 years ago
Vladimír Vondruš
0226ab26c4
Math: make one-dimensional range just from scalar types.
...
Since Range1D is now used all over Animation, the vector made it very
annoying to use. That's fixed now. This is a backwards-incompatible
change, but I don't expect the 1D range to be used much, mainly because
it was so shitty to use. Generic code that needs a vector can always
cast to it, like this:
Math::Vector<dimensions, T>{range.min()}
Test for the constructor from pair is no longer accepting pairs of 1D
vectors. I have no idea what I meant by that test case (it's testing the
same thing twice), so I removed one of these.
8 years ago
Vladimír Vondruš
d5fcfd82ec
Animation: pass Key to player callbacks by value, not as const&.
...
It was passed by value everywhere else, but not here. Weird. This is a
breaking change, you need to update all your callbacks from e.g.
[](const Float&, const Vector2&, T&) { ... }
to
[](Float, const Vector2&, T&) { ... }
Fortunately I caught this soon enough before the release, this would be
annoying to change later.
8 years ago
Vladimír Vondruš
adaeb21a4d
Animation: implemented Player:seekBy() / Player::seekTo().
8 years ago
Vladimír Vondruš
65b870dfc8
Animation: pausing animation should never result in a stopped state.
8 years ago
Vladimír Vondruš
d2914c78b4
Animation: test some more corner cases.
8 years ago
Vladimír Vondruš
c9f179c474
Animation: test the pause better.
...
Turns out I managed to test in a way that hides a bug since it gives out
the same value.
8 years ago
Vladimír Vondruš
de995059c6
Animation: make Player::elapsed() behave correctly after a "run out".
8 years ago
Vladimír Vondruš
8a71cb6415
Animation: added Player::elapsed().
...
It's not working exactly as it should yet, but the proper update
wouldn't apply so cleanly, so doing that in the next commit.
8 years ago
Vladimír Vondruš
ffe838a404
Animation: add an explanatory comment.
8 years ago
Vladimír Vondruš
4da2a2b503
Animation: fix XPASS on asm.js.
8 years ago
Vladimír Vondruš
ba08003d66
Animation: workaround so we're able to test with MSVC debug iterators on.
8 years ago
Vladimír Vondruš
7fc58ed112
Animation: work around an ICE involving std::chrono on MSVC 2017.
...
I lost two hours on pinpointing this one. Gah.
8 years ago
Vladimír Vondruš
fc454334ab
Animation: more MSVC fun!
8 years ago
Vladimír Vondruš
e323ea7f26
Animation: properly handle Player with empty duration.
...
Turns out with current design we can allow fun things even for empty
durations. I like this.
8 years ago
Vladimír Vondruš
156f21a165
Animation: GCC 4.7 WHAT ARE YOU DOING
8 years ago
Vladimír Vondruš
3df692f29a
Animation: added Player::addRawCallback().
...
Provides some further optimization opportunities.
8 years ago
Vladimír Vondruš
2adc4e8f59
Animation: implementation of the Player class.
8 years ago