Add logo to autoplay

This commit is contained in:
Lucas S. Vieira 2024-11-25 03:28:00 -03:00
parent a7d8c2308d
commit 1e8aa5a323
5 changed files with 24 additions and 1 deletions

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.6 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Before After
Before After

View file

@ -20,6 +20,7 @@ void font_flush();
void font_draw_big(const char *text, int16_t vx, int16_t vy);
void font_draw_sm(const char *text, int16_t vx, int16_t vy);
void font_draw_hg(const char *text, int16_t vx, int16_t vy);
void font_draw_logo(int16_t vx, int16_t vy, uint16_t w, uint16_t h);
uint16_t font_measurew_big(const char *text);
uint16_t font_measurew_sm(const char *text);

View file

@ -151,7 +151,7 @@ static uint8_t glyph_info_hg[] = {
0xff, 0, 0, 0,
0xff, 0, 0, 0,
0, 84, 23, 32, // * (ACT text)
0, 84, 23, 32, // * (ACT text)
// Next symbols do not exist
0xff, 0, 0, 0, // .
0xff, 0, 0, 0, // :
@ -204,6 +204,22 @@ _draw_glyph(
sort_prim(sprt, OTZ_LAYER_HUD);
}
void
font_draw_logo(
int16_t vx, int16_t vy,
uint16_t w, uint16_t h)
{
POLY_FT4 *poly = get_next_prim();
setPolyFT4(poly);
setRGB0(poly, font_color[0], font_color[1], font_color[2]);
increment_prim(sizeof(POLY_FT4));
setXYWH(poly, vx, vy, w, h);
setUVWH(poly, 0, 195, 160, 60);
poly->tpage = getTPage(font_mode & 0x3, 1, 960, 256);
poly->clut = getClut(0, 490);
sort_prim(poly, OTZ_LAYER_HUD);
}
uint16_t
_font_measurew_generic(const char *text,
const uint8_t ws_w,

View file

@ -391,6 +391,12 @@ screen_level_draw(void *d)
}
}
// Demo HUD. Only when playing AutoDemo!
if(level_mode == LEVEL_MODE_DEMO) {
// Uses HUD layer to draw!
font_draw_logo(20, SCREEN_YRES - 65, 120, 45);
}
// Heads-up display
if(!debug_mode && (level_mode != LEVEL_MODE_DEMO)) {
font_set_color(