mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-01-29 17:38:16 +03:00
Fix filter/screenshake/flash update order
In 2.2, at render time, the game rendered screenshakes and flashes if their timers were above 0, and then decremented them afterwards. The game would also update the analogue filter right before rendering it, too. In 2.3, this was changed so the flash and screenshake timers were unified, and also done at the end of the frame - right before rendering happened. This resulted in 1-frame flashes and screenshakes not rendering at all. The other changes in this patchset don't fix this either. The analogue filter was also in the wrong order, but that is less of an issue than flashes and screenshakes. So, what I've done is made the flash and screenshake timers update right before the loop switches over to rendering, and only decrements them when we switch back to fixed functions (after rendering). The analogue filter is also updated right before rendering as well. This restores 1-frame flashes and screenshakes, as well as restores the correct order of analogue filter updates.
This commit is contained in:
@@ -156,6 +156,8 @@ public:
|
||||
|
||||
void render(void);
|
||||
void renderwithscreeneffects(void);
|
||||
void renderfixedpre(void);
|
||||
void renderfixedpost(void);
|
||||
|
||||
bool Hitest(SDL_Surface* surface1, point p1, SDL_Surface* surface2, point p2);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user