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:
parent
0a51141720
commit
e5d32c653b
4 changed files with 8 additions and 8 deletions
|
@ -110,7 +110,7 @@ void Graphics::init(void)
|
||||||
m = 0;
|
m = 0;
|
||||||
linedelay = 0;
|
linedelay = 0;
|
||||||
menubuffer = NULL;
|
menubuffer = NULL;
|
||||||
tempBuffer = NULL;
|
menuoffbuffer = NULL;
|
||||||
warpbuffer = NULL;
|
warpbuffer = NULL;
|
||||||
warpbuffer_lerp = NULL;
|
warpbuffer_lerp = NULL;
|
||||||
footerbuffer = 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);
|
titlebg.buffer_lerp = CREATE_SURFACE(SCREEN_WIDTH_PIXELS + 16, SCREEN_HEIGHT_PIXELS + 16);
|
||||||
SDL_SetSurfaceBlendMode(titlebg.buffer_lerp, SDL_BLENDMODE_NONE);
|
SDL_SetSurfaceBlendMode(titlebg.buffer_lerp, SDL_BLENDMODE_NONE);
|
||||||
|
|
||||||
tempBuffer = CREATE_SURFACE(SCREEN_WIDTH_PIXELS, SCREEN_HEIGHT_PIXELS);
|
menuoffbuffer = CREATE_SURFACE(SCREEN_WIDTH_PIXELS, SCREEN_HEIGHT_PIXELS);
|
||||||
SDL_SetSurfaceBlendMode(tempBuffer, SDL_BLENDMODE_NONE);
|
SDL_SetSurfaceBlendMode(menuoffbuffer, SDL_BLENDMODE_NONE);
|
||||||
|
|
||||||
#undef CREATE_SURFACE
|
#undef CREATE_SURFACE
|
||||||
}
|
}
|
||||||
|
@ -252,7 +252,7 @@ void Graphics::destroy_buffers(void)
|
||||||
FREE_SURFACE(towerbg.buffer_lerp);
|
FREE_SURFACE(towerbg.buffer_lerp);
|
||||||
FREE_SURFACE(titlebg.buffer);
|
FREE_SURFACE(titlebg.buffer);
|
||||||
FREE_SURFACE(titlebg.buffer_lerp);
|
FREE_SURFACE(titlebg.buffer_lerp);
|
||||||
FREE_SURFACE(tempBuffer);
|
FREE_SURFACE(menuoffbuffer);
|
||||||
|
|
||||||
#undef FREE_SURFACE
|
#undef FREE_SURFACE
|
||||||
}
|
}
|
||||||
|
@ -3255,7 +3255,7 @@ void Graphics::menuoffrender(void)
|
||||||
SDL_Rect offsetRect = {0, usethisoffset, backBuffer->w, backBuffer->h};
|
SDL_Rect offsetRect = {0, usethisoffset, backBuffer->w, backBuffer->h};
|
||||||
|
|
||||||
BlitSurfaceStandard(backBuffer, NULL, menubuffer, NULL);
|
BlitSurfaceStandard(backBuffer, NULL, menubuffer, NULL);
|
||||||
BlitSurfaceStandard(tempBuffer, NULL, backBuffer, NULL);
|
BlitSurfaceStandard(menuoffbuffer, NULL, backBuffer, NULL);
|
||||||
BlitSurfaceStandard(menubuffer, NULL, backBuffer, &offsetRect);
|
BlitSurfaceStandard(menubuffer, NULL, backBuffer, &offsetRect);
|
||||||
|
|
||||||
gameScreen.UpdateScreen(backBuffer, NULL);
|
gameScreen.UpdateScreen(backBuffer, NULL);
|
||||||
|
|
|
@ -280,7 +280,7 @@ public:
|
||||||
SDL_Surface* backBuffer;
|
SDL_Surface* backBuffer;
|
||||||
SDL_Surface* menubuffer;
|
SDL_Surface* menubuffer;
|
||||||
SDL_Surface* foregroundBuffer;
|
SDL_Surface* foregroundBuffer;
|
||||||
SDL_Surface* tempBuffer;
|
SDL_Surface* menuoffbuffer;
|
||||||
SDL_Surface* warpbuffer;
|
SDL_Surface* warpbuffer;
|
||||||
SDL_Surface* warpbuffer_lerp;
|
SDL_Surface* warpbuffer_lerp;
|
||||||
|
|
||||||
|
|
|
@ -3074,7 +3074,7 @@ static void mapmenuactionpress(const bool version2_2)
|
||||||
|
|
||||||
//Kill contents of offset render buffer, since we do that for some reason.
|
//Kill contents of offset render buffer, since we do that for some reason.
|
||||||
//This fixes an apparent frame flicker.
|
//This fixes an apparent frame flicker.
|
||||||
ClearSurface(graphics.tempBuffer);
|
ClearSurface(graphics.menuoffbuffer);
|
||||||
graphics.fademode = FADE_START_FADEOUT;
|
graphics.fademode = FADE_START_FADEOUT;
|
||||||
music.fadeout();
|
music.fadeout();
|
||||||
map.nexttowercolour();
|
map.nexttowercolour();
|
||||||
|
|
|
@ -1961,7 +1961,7 @@ void gamerender(void)
|
||||||
|
|
||||||
graphics.cutscenebars();
|
graphics.cutscenebars();
|
||||||
graphics.drawfade();
|
graphics.drawfade();
|
||||||
BlitSurfaceStandard(graphics.backBuffer, NULL, graphics.tempBuffer, NULL);
|
BlitSurfaceStandard(graphics.backBuffer, NULL, graphics.menuoffbuffer, NULL);
|
||||||
|
|
||||||
graphics.drawgui();
|
graphics.drawgui();
|
||||||
if (graphics.flipmode)
|
if (graphics.flipmode)
|
||||||
|
|
Loading…
Reference in a new issue