PR_BOR8 -> PR_FULLBOR, border8 -> full_border

This commit is contained in:
mothbeanie
2023-11-15 16:11:32 -08:00
committed by Misa Elizabeth Kai
parent 947d716be6
commit 94ece095ed
3 changed files with 12 additions and 12 deletions

View File

@@ -78,7 +78,7 @@ struct PrintFlags
Font* font_sel;
uint8_t brightness;
bool border;
bool border8;
bool full_border;
bool align_cen;
bool align_right;
bool cjk_low;
@@ -769,13 +769,13 @@ static PrintFlags decode_print_flags(uint32_t flags)
pf.font_sel = fontsel_to_font(FLAG_PART(3, 5));
pf.brightness = ~FLAG_PART(8, 8) & 0xff;
pf.border = flags & PR_BOR;
pf.border8 = flags & PR_BOR8;
pf.full_border = flags & PR_FULLBOR;
pf.align_cen = flags & PR_CEN;
pf.align_right = flags & PR_RIGHT;
pf.cjk_low = flags & PR_CJK_LOW;
pf.cjk_high = flags & PR_CJK_HIGH;
if (pf.border8)
if (pf.full_border)
{
pf.border = false;
}
@@ -1230,14 +1230,14 @@ void print(
}
}
if (pf.border8)
if (pf.full_border)
{
static const int offsets[8][2] = { {0,-1}, {-1,0}, {1,0}, {0,1}, {-1,-1}, {1,1}, {-1,1}, {1,-1} };
for (int offset = 0; offset < 8; offset++)
{
print(
flags & ~PR_BOR8 & ~PR_CEN & ~PR_RIGHT,
flags & ~PR_FULLBOR & ~PR_CEN & ~PR_RIGHT,
x + offsets[offset][0] * pf.scale,
y + offsets[offset][1] * pf.scale,
text,
@@ -1329,10 +1329,10 @@ int print_wrap(
flags &= ~PR_BOR;
}
if (pf.border8 && (r | g | b) != 0)
if (pf.full_border && (r | g | b) != 0)
{
print_wrap(flags, x, y, text, 0, 0, 0, linespacing, maxwidth);
flags &= ~PR_BOR8;
flags &= ~PR_FULLBOR;
}
// This could fit 64 non-BMP characters onscreen, should be plenty