From 64874065ebbb3e4a0492c73e963074c5c94463a3 Mon Sep 17 00:00:00 2001 From: Misa Date: Mon, 20 Mar 2023 17:05:57 -0700 Subject: [PATCH] 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. --- 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 5f29f4c3..7d1dea60 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; - 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) diff --git a/desktop_version/src/Graphics.h b/desktop_version/src/Graphics.h index acb15126..c9032633 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* menuoffTexture; + SDL_Texture* tempShakeTexture; SDL_Texture* gameplayTexture; SDL_Texture* menuTexture; SDL_Texture* ghostTexture;