mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-01-30 01:48:15 +03:00
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:
@@ -3447,16 +3447,15 @@ void editorrender( KeyPoll& key, Graphics& dwgfx, Game& game, mapclass& map, ent
|
||||
{
|
||||
if(ed.roomnamehide<12) ed.roomnamehide++;
|
||||
}
|
||||
dwgfx.footerrect.y = 230+ed.roomnamehide;
|
||||
if (dwgfx.translucentroomname)
|
||||
{
|
||||
SDL_SetSurfaceAlphaMod(dwgfx.footerbuffer, 127);
|
||||
SDL_BlitSurface(dwgfx.footerbuffer, NULL, dwgfx.backBuffer, &dwgfx.footerrect);
|
||||
}
|
||||
else
|
||||
{
|
||||
SDL_SetSurfaceAlphaMod(dwgfx.footerbuffer, 255);
|
||||
FillRect(dwgfx.backBuffer, 0,230+ed.roomnamehide,320,10, dwgfx.getRGB(0,0,0));
|
||||
}
|
||||
dwgfx.footerrect.y = 230+ed.roomnamehide;
|
||||
SDL_BlitSurface(dwgfx.footerbuffer, NULL, dwgfx.backBuffer, &dwgfx.footerrect);
|
||||
dwgfx.bprint(5,231+ed.roomnamehide,ed.level[ed.levx+(ed.maxwidth*ed.levy)].roomname, 196, 196, 255 - help.glow, true);
|
||||
dwgfx.bprint(4, 222, "SPACE ^ SHIFT ^", 196, 196, 255 - help.glow, false);
|
||||
dwgfx.bprint(268,222, "("+help.String(ed.levx+1)+","+help.String(ed.levy+1)+")",196, 196, 255 - help.glow, false);
|
||||
|
||||
Reference in New Issue
Block a user