| 445 | } |
| 446 | |
| 447 | static void drawCharacterSprite(RenderTarget& rt, int32_t codepoint, TextDrawInfo& info) |
| 448 | { |
| 449 | int32_t characterWidth = FontSpriteGetCodepointWidth(info.fontStyle, codepoint); |
| 450 | auto sprite = FontSpriteGetCodepointSprite(info.fontStyle, codepoint); |
| 451 | |
| 452 | if (!info.textDrawFlags.has(TextDrawFlag::noDraw)) |
| 453 | { |
| 454 | auto screenCoords = info.current; |
| 455 | if (info.textDrawFlags.has(TextDrawFlag::yOffsetEffect)) |
| 456 | { |
| 457 | screenCoords.y += *info.yOffset++; |
| 458 | } |
| 459 | |
| 460 | PaletteIndex palette[8]{}; |
| 461 | palette[1] = info.palette.fill; |
| 462 | palette[2] = info.palette.sunnyOutline; |
| 463 | palette[3] = info.palette.shadowOutline; |
| 464 | |
| 465 | PaletteMap paletteMap(palette); |
| 466 | GfxDrawGlyph(rt, sprite, screenCoords, paletteMap); |
| 467 | } |
| 468 | |
| 469 | info.current.x += characterWidth; |
| 470 | } |
| 471 | |
| 472 | static void drawStringRawSprite(RenderTarget& rt, std::string_view text, TextDrawInfo& info) |
| 473 | { |
no test coverage detected