mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2024-12-23 01:59:43 +01:00
PR_BOR8 -> PR_FULLBOR, border8 -> full_border
This commit is contained in:
parent
947d716be6
commit
94ece095ed
3 changed files with 12 additions and 12 deletions
|
@ -78,7 +78,7 @@ struct PrintFlags
|
||||||
Font* font_sel;
|
Font* font_sel;
|
||||||
uint8_t brightness;
|
uint8_t brightness;
|
||||||
bool border;
|
bool border;
|
||||||
bool border8;
|
bool full_border;
|
||||||
bool align_cen;
|
bool align_cen;
|
||||||
bool align_right;
|
bool align_right;
|
||||||
bool cjk_low;
|
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.font_sel = fontsel_to_font(FLAG_PART(3, 5));
|
||||||
pf.brightness = ~FLAG_PART(8, 8) & 0xff;
|
pf.brightness = ~FLAG_PART(8, 8) & 0xff;
|
||||||
pf.border = flags & PR_BOR;
|
pf.border = flags & PR_BOR;
|
||||||
pf.border8 = flags & PR_BOR8;
|
pf.full_border = flags & PR_FULLBOR;
|
||||||
pf.align_cen = flags & PR_CEN;
|
pf.align_cen = flags & PR_CEN;
|
||||||
pf.align_right = flags & PR_RIGHT;
|
pf.align_right = flags & PR_RIGHT;
|
||||||
pf.cjk_low = flags & PR_CJK_LOW;
|
pf.cjk_low = flags & PR_CJK_LOW;
|
||||||
pf.cjk_high = flags & PR_CJK_HIGH;
|
pf.cjk_high = flags & PR_CJK_HIGH;
|
||||||
|
|
||||||
if (pf.border8)
|
if (pf.full_border)
|
||||||
{
|
{
|
||||||
pf.border = false;
|
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} };
|
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++)
|
for (int offset = 0; offset < 8; offset++)
|
||||||
{
|
{
|
||||||
print(
|
print(
|
||||||
flags & ~PR_BOR8 & ~PR_CEN & ~PR_RIGHT,
|
flags & ~PR_FULLBOR & ~PR_CEN & ~PR_RIGHT,
|
||||||
x + offsets[offset][0] * pf.scale,
|
x + offsets[offset][0] * pf.scale,
|
||||||
y + offsets[offset][1] * pf.scale,
|
y + offsets[offset][1] * pf.scale,
|
||||||
text,
|
text,
|
||||||
|
@ -1329,10 +1329,10 @@ int print_wrap(
|
||||||
flags &= ~PR_BOR;
|
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);
|
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
|
// This could fit 64 non-BMP characters onscreen, should be plenty
|
||||||
|
|
|
@ -45,7 +45,7 @@
|
||||||
#define PR_FONT_IDX(idx) ((SDL_clamp(idx, 0, 28) + 3) << 3) /* use given font index */
|
#define PR_FONT_IDX(idx) ((SDL_clamp(idx, 0, 28) + 3) << 3) /* use given font index */
|
||||||
#define PR_BRIGHTNESS(value) /* use this brightness 0-255 for the text (accounts for button glyphs correctly) */\
|
#define PR_BRIGHTNESS(value) /* use this brightness 0-255 for the text (accounts for button glyphs correctly) */\
|
||||||
(((~SDL_clamp((int)(value), 0, 255) & 0xff) << 8))
|
(((~SDL_clamp((int)(value), 0, 255) & 0xff) << 8))
|
||||||
#define PR_BOR8 (1 << 16) /* draw a black border around the text, filling in the corners (for the map legend) */
|
#define PR_FULLBOR (1 << 16) /* draw a black border around the text, filling in the corners (for the map legend) */
|
||||||
#define PR_BOR (1 << 17) /* draw a black border around the text (was bprint/bigbprint) */
|
#define PR_BOR (1 << 17) /* draw a black border around the text (was bprint/bigbprint) */
|
||||||
#define PR_LEFT (0 << 18) /* default, left-align text/place at x coordinate */
|
#define PR_LEFT (0 << 18) /* default, left-align text/place at x coordinate */
|
||||||
#define PR_CEN (1 << 18) /* center-align text relative to X (X is center) or to screen if X == -1 */
|
#define PR_CEN (1 << 18) /* center-align text relative to X (X is center) or to screen if X == -1 */
|
||||||
|
|
|
@ -2574,11 +2574,11 @@ static void rendermaplegend(void)
|
||||||
{
|
{
|
||||||
if (map.showteleporters && map.isexplored(map.teleporters[i].x, map.teleporters[i].y))
|
if (map.showteleporters && map.isexplored(map.teleporters[i].x, map.teleporters[i].y))
|
||||||
{
|
{
|
||||||
font::print(PR_FONT_8X8 | PR_BOR8, data.legendxoff + (map.teleporters[i].x * 12 * data.zoom), data.legendyoff + (map.teleporters[i].y * 9 * data.zoom), "💿", 171, 255, 252);
|
font::print(PR_FONT_8X8 | PR_FULLBOR, data.legendxoff + (map.teleporters[i].x * 12 * data.zoom), data.legendyoff + (map.teleporters[i].y * 9 * data.zoom), "💿", 171, 255, 252);
|
||||||
}
|
}
|
||||||
else if (map.showtargets && !map.isexplored(map.teleporters[i].x, map.teleporters[i].y))
|
else if (map.showtargets && !map.isexplored(map.teleporters[i].x, map.teleporters[i].y))
|
||||||
{
|
{
|
||||||
font::print(PR_FONT_8X8 | PR_BOR8, data.legendxoff + (map.teleporters[i].x * 12 * data.zoom), data.legendyoff + (map.teleporters[i].y * 9 * data.zoom), "❓", 64, 64, 64);
|
font::print(PR_FONT_8X8 | PR_FULLBOR, data.legendxoff + (map.teleporters[i].x * 12 * data.zoom), data.legendyoff + (map.teleporters[i].y * 9 * data.zoom), "❓", 64, 64, 64);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2588,7 +2588,7 @@ static void rendermaplegend(void)
|
||||||
{
|
{
|
||||||
if (!obj.collect[i])
|
if (!obj.collect[i])
|
||||||
{
|
{
|
||||||
font::print(PR_FONT_8X8 | PR_BOR8, data.legendxoff + (map.shinytrinkets[i].x * 12 * data.zoom), data.legendyoff + (map.shinytrinkets[i].y * 9 * data.zoom), "🪙", 254, 252, 58);
|
font::print(PR_FONT_8X8 | PR_FULLBOR, data.legendxoff + (map.shinytrinkets[i].x * 12 * data.zoom), data.legendyoff + (map.shinytrinkets[i].y * 9 * data.zoom), "🪙", 254, 252, 58);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3213,7 +3213,7 @@ void teleporterrender(void)
|
||||||
|
|
||||||
if (game.useteleporter && (help.slowsine % 16 > 8 || game.noflashingmode))
|
if (game.useteleporter && (help.slowsine % 16 > 8 || game.noflashingmode))
|
||||||
{
|
{
|
||||||
font::print(PR_FONT_8X8 | PR_BOR8, data.legendxoff + data.xoff + (telex * 12 * data.zoom), data.legendyoff + data.yoff + (teley * 9 * data.zoom), "💿", 255, 0, 0);
|
font::print(PR_FONT_8X8 | PR_FULLBOR, data.legendxoff + data.xoff + (telex * 12 * data.zoom), data.legendyoff + data.yoff + (teley * 9 * data.zoom), "💿", 255, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
graphics.cutscenebars();
|
graphics.cutscenebars();
|
||||||
|
|
Loading…
Reference in a new issue