1
0
Fork 0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-12-23 01:59:43 +01:00

Rename tempBuffer to menuoffbuffer

In general, "temp" is a bad name because it could mean anything. In this
case the buffer isn't really temporary and it's only used for drawing
the menu with a certain offset, so I made it use a better name. But also
because I'm going to be adding temporary buffers so I don't want the
names to be confused.
This commit is contained in:
Misa 2023-01-02 11:19:08 -08:00
parent 0a51141720
commit e5d32c653b
4 changed files with 8 additions and 8 deletions

View file

@ -110,7 +110,7 @@ void Graphics::init(void)
m = 0;
linedelay = 0;
menubuffer = NULL;
tempBuffer = NULL;
menuoffbuffer = NULL;
warpbuffer = NULL;
warpbuffer_lerp = NULL;
footerbuffer = NULL;
@ -230,8 +230,8 @@ void Graphics::create_buffers(const SDL_PixelFormat* fmt)
titlebg.buffer_lerp = CREATE_SURFACE(SCREEN_WIDTH_PIXELS + 16, SCREEN_HEIGHT_PIXELS + 16);
SDL_SetSurfaceBlendMode(titlebg.buffer_lerp, SDL_BLENDMODE_NONE);
tempBuffer = CREATE_SURFACE(SCREEN_WIDTH_PIXELS, SCREEN_HEIGHT_PIXELS);
SDL_SetSurfaceBlendMode(tempBuffer, SDL_BLENDMODE_NONE);
menuoffbuffer = CREATE_SURFACE(SCREEN_WIDTH_PIXELS, SCREEN_HEIGHT_PIXELS);
SDL_SetSurfaceBlendMode(menuoffbuffer, SDL_BLENDMODE_NONE);
#undef CREATE_SURFACE
}
@ -252,7 +252,7 @@ void Graphics::destroy_buffers(void)
FREE_SURFACE(towerbg.buffer_lerp);
FREE_SURFACE(titlebg.buffer);
FREE_SURFACE(titlebg.buffer_lerp);
FREE_SURFACE(tempBuffer);
FREE_SURFACE(menuoffbuffer);
#undef FREE_SURFACE
}
@ -3255,7 +3255,7 @@ void Graphics::menuoffrender(void)
SDL_Rect offsetRect = {0, usethisoffset, backBuffer->w, backBuffer->h};
BlitSurfaceStandard(backBuffer, NULL, menubuffer, NULL);
BlitSurfaceStandard(tempBuffer, NULL, backBuffer, NULL);
BlitSurfaceStandard(menuoffbuffer, NULL, backBuffer, NULL);
BlitSurfaceStandard(menubuffer, NULL, backBuffer, &offsetRect);
gameScreen.UpdateScreen(backBuffer, NULL);

View file

@ -280,7 +280,7 @@ public:
SDL_Surface* backBuffer;
SDL_Surface* menubuffer;
SDL_Surface* foregroundBuffer;
SDL_Surface* tempBuffer;
SDL_Surface* menuoffbuffer;
SDL_Surface* warpbuffer;
SDL_Surface* warpbuffer_lerp;

View file

@ -3074,7 +3074,7 @@ static void mapmenuactionpress(const bool version2_2)
//Kill contents of offset render buffer, since we do that for some reason.
//This fixes an apparent frame flicker.
ClearSurface(graphics.tempBuffer);
ClearSurface(graphics.menuoffbuffer);
graphics.fademode = FADE_START_FADEOUT;
music.fadeout();
map.nexttowercolour();

View file

@ -1961,7 +1961,7 @@ void gamerender(void)
graphics.cutscenebars();
graphics.drawfade();
BlitSurfaceStandard(graphics.backBuffer, NULL, graphics.tempBuffer, NULL);
BlitSurfaceStandard(graphics.backBuffer, NULL, graphics.menuoffbuffer, NULL);
graphics.drawgui();
if (graphics.flipmode)