Make fast path using FillRect() when opaque

FillRect() is similar enough to memset when blending isn't used, so the
game will take a fast path drawing the roomname background when the
background is opaque.
This commit is contained in:
Info Teddy
2020-01-24 23:30:51 -08:00
committed by Ethan Lee
parent 2f85c2a8dc
commit 2709de9cf0
3 changed files with 10 additions and 12 deletions

View File

@@ -127,6 +127,7 @@ int main(int argc, char *argv[])
SDL_SetSurfaceBlendMode(graphics.backBuffer, SDL_BLENDMODE_NONE);
graphics.footerbuffer = SDL_CreateRGBSurface(SDL_SWSURFACE, 320, 10, 32, fmt->Rmask, fmt->Gmask, fmt->Bmask, fmt->Amask);
SDL_SetSurfaceBlendMode(graphics.footerbuffer, SDL_BLENDMODE_BLEND);
SDL_SetSurfaceAlphaMod(graphics.footerbuffer, 127);
FillRect(graphics.footerbuffer, SDL_MapRGB(fmt, 0, 0, 0));
graphics.Makebfont();