From d1e9bdc284d77bbbe6b6c870ec259a3e1716edeb Mon Sep 17 00:00:00 2001 From: Misa Date: Fri, 3 Mar 2023 15:25:15 -0800 Subject: [PATCH] Rename `tempTexture` to `menuoffTexture` I'm going to soon be creating an actually temporary texture, so having two textures named "temp" would get confusing. This is also a good chance to correct the name of this texture, because it's not really temporary, but it's used for map menu animation rendering. --- desktop_version/src/Graphics.cpp | 10 +++++----- desktop_version/src/Graphics.h | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/desktop_version/src/Graphics.cpp b/desktop_version/src/Graphics.cpp index cf3e06d3..1e56e603 100644 --- a/desktop_version/src/Graphics.cpp +++ b/desktop_version/src/Graphics.cpp @@ -110,7 +110,7 @@ void Graphics::init(void) gameplayTexture = NULL; menuTexture = NULL; ghostTexture = NULL; - tempTexture = NULL; + menuoffTexture = NULL; backgroundTexture = NULL; foregroundTexture = NULL; towerbg = TowerBG(); @@ -188,7 +188,7 @@ void Graphics::create_buffers(void) gameplayTexture = CREATE_TEXTURE; menuTexture = CREATE_TEXTURE; ghostTexture = CREATE_TEXTURE; - tempTexture = CREATE_TEXTURE; + menuoffTexture = CREATE_TEXTURE; foregroundTexture = CREATE_TEXTURE; backgroundTexture = CREATE_SCROLL_TEXTURE; towerbg.texture = CREATE_SCROLL_TEXTURE; @@ -205,7 +205,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, tempTexture); + VVV_freefunc(SDL_DestroyTexture, menuoffTexture); VVV_freefunc(SDL_DestroyTexture, foregroundTexture); VVV_freefunc(SDL_DestroyTexture, backgroundTexture); } @@ -3180,7 +3180,7 @@ void Graphics::screenshake(void) ApplyFilter(); } - set_render_target(tempTexture); + set_render_target(menuoffTexture); set_blendmode(SDL_BLENDMODE_NONE); clear(); @@ -3202,7 +3202,7 @@ void Graphics::screenshake(void) set_blendmode(SDL_BLENDMODE_NONE); clear(); - copy_texture(tempTexture, NULL, NULL, 0, NULL, flipmode ? SDL_FLIP_VERTICAL : SDL_FLIP_NONE); + copy_texture(menuoffTexture, NULL, NULL, 0, NULL, flipmode ? SDL_FLIP_VERTICAL : SDL_FLIP_NONE); } void Graphics::updatescreenshake(void) diff --git a/desktop_version/src/Graphics.h b/desktop_version/src/Graphics.h index 450d831a..9c530be5 100644 --- a/desktop_version/src/Graphics.h +++ b/desktop_version/src/Graphics.h @@ -308,7 +308,7 @@ public: bool notextoutline; SDL_Texture* gameTexture; - SDL_Texture* tempTexture; + SDL_Texture* menuoffTexture; SDL_Texture* gameplayTexture; SDL_Texture* menuTexture; SDL_Texture* ghostTexture;