mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-01-30 18:04:09 +03:00
Move analogue mode filter update logic to fixed-timestep loop
Otherwise if the analogue filter is scrolling, it'll scroll by REALLY fast.
This commit is contained in:
@@ -315,11 +315,9 @@ void BlitSurfaceColoured(
|
||||
|
||||
int scrollamount = 0;
|
||||
bool isscrolling = 0;
|
||||
SDL_Surface* ApplyFilter( SDL_Surface* _src )
|
||||
{
|
||||
SDL_Surface* _ret = SDL_CreateRGBSurface(_src->flags, _src->w, _src->h, 32,
|
||||
_src->format->Rmask, _src->format->Gmask, _src->format->Bmask, _src->format->Amask);
|
||||
|
||||
void UpdateFilter()
|
||||
{
|
||||
if (rand() % 4000 < 8)
|
||||
{
|
||||
isscrolling = true;
|
||||
@@ -334,6 +332,12 @@ SDL_Surface* ApplyFilter( SDL_Surface* _src )
|
||||
isscrolling = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
SDL_Surface* ApplyFilter( SDL_Surface* _src )
|
||||
{
|
||||
SDL_Surface* _ret = SDL_CreateRGBSurface(_src->flags, _src->w, _src->h, 32,
|
||||
_src->format->Rmask, _src->format->Gmask, _src->format->Bmask, _src->format->Amask);
|
||||
|
||||
int redOffset = rand() % 4;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user