Merge: gamnit: misc fixes
authorJean Privat <jean@pryen.org>
Wed, 2 Aug 2017 13:30:28 +0000 (09:30 -0400)
committerJean Privat <jean@pryen.org>
Wed, 2 Aug 2017 13:30:28 +0000 (09:30 -0400)
Fix various bugs and issues related to gamnit :

* Expose the previously private class `SpriteSet` for clients to access `time` and set `time_mod` (as intended).
* Fix two bugs with animations: a div by zero in the shader that hid non-animated sprites on Android (a div by zero never crashes, but the return value is unspecified in OpenGL ES 2.0), and an array out of bounds error when an animation has a single frame.
* Cache `GamnitDisplay::aspect_ratio` as it appears to be a performance bottleneck.
* Fix the virtual gamepad not being interactive in Asteronits.
* `UICamera::camera_to_ui` returns a `Point3d` that can be used directly as a `Sprite::center`.

Pull-Request: #2532
Reviewed-by: Jean Privat <jean@pryen.org>


No differences found