1
0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-06-25 22:18:30 +02:00

Rename menuoffTexture to tempShakeTexture

It turns out this texture is only used as a temporary texture to draw
the screen with an offset before rendering it to the output target.

I thought it was used for drawing the map menu animation, but that was
only true of `tempBuffer`, and is no longer true of the new render
system.
This commit is contained in:
Misa 2023-03-20 17:05:57 -07:00
parent 371404f393
commit 64874065eb
2 changed files with 6 additions and 6 deletions

View File

@ -110,7 +110,7 @@ void Graphics::init(void)
gameplayTexture = NULL;
menuTexture = NULL;
ghostTexture = NULL;
menuoffTexture = NULL;
tempShakeTexture = NULL;
backgroundTexture = NULL;
foregroundTexture = NULL;
towerbg = TowerBG();
@ -191,7 +191,7 @@ void Graphics::create_buffers(void)
gameplayTexture = CREATE_TEXTURE;
menuTexture = CREATE_TEXTURE;
ghostTexture = CREATE_TEXTURE;
menuoffTexture = CREATE_TEXTURE;
tempShakeTexture = CREATE_TEXTURE;
foregroundTexture = CREATE_TEXTURE;
backgroundTexture = CREATE_SCROLL_TEXTURE;
tempScrollingTexture = CREATE_SCROLL_TEXTURE;
@ -209,7 +209,7 @@ void Graphics::destroy_buffers(void)
VVV_freefunc(SDL_DestroyTexture, gameplayTexture);
VVV_freefunc(SDL_DestroyTexture, menuTexture);
VVV_freefunc(SDL_DestroyTexture, ghostTexture);
VVV_freefunc(SDL_DestroyTexture, menuoffTexture);
VVV_freefunc(SDL_DestroyTexture, tempShakeTexture);
VVV_freefunc(SDL_DestroyTexture, foregroundTexture);
VVV_freefunc(SDL_DestroyTexture, backgroundTexture);
VVV_freefunc(SDL_DestroyTexture, tempScrollingTexture);
@ -3161,7 +3161,7 @@ void Graphics::screenshake(void)
ApplyFilter(tempFilterSrc, tempFilterDest);
}
set_render_target(menuoffTexture);
set_render_target(tempShakeTexture);
set_blendmode(SDL_BLENDMODE_NONE);
clear();
@ -3183,7 +3183,7 @@ void Graphics::screenshake(void)
set_blendmode(SDL_BLENDMODE_NONE);
clear();
copy_texture(menuoffTexture, NULL, NULL, 0, NULL, flipmode ? SDL_FLIP_VERTICAL : SDL_FLIP_NONE);
copy_texture(tempShakeTexture, NULL, NULL, 0, NULL, flipmode ? SDL_FLIP_VERTICAL : SDL_FLIP_NONE);
}
void Graphics::updatescreenshake(void)

View File

@ -308,7 +308,7 @@ public:
bool notextoutline;
SDL_Texture* gameTexture;
SDL_Texture* menuoffTexture;
SDL_Texture* tempShakeTexture;
SDL_Texture* gameplayTexture;
SDL_Texture* menuTexture;
SDL_Texture* ghostTexture;