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)
commit40c5807413858127b5b80e124bf60a5ed0f20bbf
treef135d9faa1197257d364c67f8aa3caa76e1d1d1d
parentfcfc0701535b3816c8cb6e5a898f965f1a6b4523
parent45786f657e4c80773e04e4cb4586f96b5fdc0caa
Merge: gamnit: misc fixes

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>