Skip to content

Commit e1e509a

Browse files
committed
Engine: fixed incorrect text color being set for Sierra-style speech
1 parent 025ee13 commit e1e509a

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

Engine/ac/display.cpp

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -277,25 +277,24 @@ Bitmap *create_textual_image(const char *text, const DisplayTextLooks &look, col
277277
{
278278
// Textual overlay purposed for character speech
279279
int ttxleft = 0, ttxtop = paddingScaled, oriwid = wii - padding * 2;
280-
int drawBackground = 0;
280+
bool draw_background = false;
281281

282282
DisplayTextLooks fix_look = look;
283283
if (use_speech_textwindow)
284284
{
285-
drawBackground = 1;
285+
draw_background = true;
286286
}
287287
else if (use_thought_gui)
288288
{
289289
// make it treat it as drawing inside a window now
290290
fix_look.Style = kDisplayTextStyle_TextWindow;
291-
drawBackground = 1;
291+
draw_background = true;
292292
}
293293

294-
if (drawBackground)
294+
if (draw_background)
295295
{
296-
text_color = GUI::GetStandardColorForBitmap(15); // use fixed standard color here
297296
draw_text_window_and_bar(&text_window_ds, wantFreeScreenop, topbar, disp,
298-
&ttxleft, &ttxtop, &adjustedXX, &adjustedYY, &wii, &text_color, 0, usingGui);
297+
&ttxleft, &ttxtop, &adjustedXX, &adjustedYY, &wii, nullptr, usingGui);
299298
}
300299
{
301300
}
@@ -333,7 +332,7 @@ Bitmap *create_textual_image(const char *text, const DisplayTextLooks &look, col
333332
{
334333
// Textual overlay purposed for the standard message box
335334
int xoffs, yoffs, oriwid = wii - padding * 2;
336-
text_color = GUI::GetStandardColorForBitmap(15); // use fixed standard color here
335+
text_color = GUI::GetStandardColorForBitmap(15); // use fixed standard color here (may be adjusted inside draw_text_window)
337336
draw_text_window_and_bar(&text_window_ds, wantFreeScreenop, topbar, disp, &xoffs, &yoffs, &adjustedXX, &adjustedYY, &wii, &text_color);
338337
text_color = text_window_ds->GetCompatibleColor(text_color);
339338

0 commit comments

Comments
 (0)