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

Deduplicate font::print for activity zone prompts

There were two print calls, one for the transparent case, and one for
a regular textbox. The print calls were nearly the same except for the
color, and for some reason the transparent case didn't have PR_CJK_LOW
(that one is on me).
This commit is contained in:
Dav999-v 2023-02-21 03:05:45 +01:00 committed by Misa Elizabeth Kai
parent 28e9df7f47
commit a320ee3b4d

View file

@ -2222,17 +2222,13 @@ void gamerender(void)
game.activity_lastprompt.c_str()
);
uint8_t text_r, text_g, text_b;
if (game.activity_r == 0 && game.activity_g == 0 && game.activity_b == 0)
{
font::print(
game.activity_print_flags | PR_BRIGHTNESS(act_alpha*255) | PR_CEN,
-1,
game.activity_y + 12,
final_string,
196,
196,
255 - help.glow
);
text_r = 196;
text_g = 196;
text_b = 255 - help.glow;
}
else
{
@ -2245,17 +2241,22 @@ void gamerender(void)
game.activity_g*act_alpha,
game.activity_b*act_alpha
);
text_r = game.activity_r;
text_g = game.activity_g;
text_b = game.activity_b;
}
font::print(
game.activity_print_flags | PR_BRIGHTNESS(act_alpha*255) | PR_CJK_LOW | PR_CEN,
-1,
game.activity_y + 12,
final_string,
game.activity_r,
game.activity_g,
game.activity_b
text_r,
text_g,
text_b
);
}
}
if (obj.trophytext > 0 || obj.oldtrophytext > 0)
{