Go to the source code of this file.
Macros | |
| #define | TEXT_CANVAS_PIXEL_HEIGHT 32 |
| #define | SCREEN_TILE_ROWS 20 |
| #define | SCREEN_TILE_COLUMNS 30 |
Functions | |
| static __inline__ void | UiText_SetCanvasPixel (u32 windowHeight, u32 x, u32 tileY, u32 doubledPixelRow, u8 *canvas, u32 repeatedColor) |
| Sets one pixel in the column-major text canvas. | |
| s32 | UiText_DrawGlyphArm (struct UiWindow *window, u32 character, u32 x, u32 y, const u8 *font) |
| Draws one character into a window's text canvas with its top-left corner at pixel (x, y) of the window's interior, and returns how far the text advances. | |
| void | Tile_BuildMetatiles (u16 *scanlineBounds, u16 *frameTiles) |
| Builds the hardware window's horizontal extent for each of the screen's 160 scanlines from frameTiles in the UI tilemap (32 tiles a row, 30 shown). | |
| #define TEXT_CANVAS_PIXEL_HEIGHT 32 |
Definition at line 10 of file glyph_arm.c.
Referenced by UiText_DrawGlyphArm().
| #define SCREEN_TILE_ROWS 20 |
Definition at line 11 of file glyph_arm.c.
Referenced by Tile_BuildMetatiles().
| #define SCREEN_TILE_COLUMNS 30 |
Definition at line 12 of file glyph_arm.c.
Referenced by Tile_BuildMetatiles(), and UiText_DrawGlyphArm().
|
static |
Sets one pixel in the column-major text canvas.
windowHeight includes the two frame rows; doubledPixelRow is twice the row within a tile. repeatedColor holds the colour index in all four nibbles.
Definition at line 24 of file glyph_arm.c.
Referenced by UiText_DrawGlyphArm(), and UiText_SetCanvasPixel().
Draws one character into a window's text canvas with its top-left corner at pixel (x, y) of the window's interior, and returns how far the text advances.
With font set, the character comes from that small font: the 10-row, 1bpp kana and numeral font in Japanese, or an 8x8 two-colour font elsewhere. With no font, it comes from the main font (gUiText_Glyphs, and in Japanese gUiText_KanjiGlyphs for codes from 256), drawn in four passes: the first three draw an outline in colour 5 (offset left, right and down when the window has UI_WINDOW_OUTLINED_TEXT) and the last draws the glyph itself in colour 1. In Japanese, kana marks (codes 222 and 223) sit over the previous character and advance by 0.
Definition at line 49 of file glyph_arm.c.
Referenced by UiText_DrawGlyph(), and UiText_DrawGlyphArm().
Builds the hardware window's horizontal extent for each of the screen's 160 scanlines from frameTiles in the UI tilemap (32 tiles a row, 30 shown).
Each scanline gets (left << 8) | right, the WINxH format, written to the second halfword of its pair in scanlineBounds. A row without a frame gets 0. The rounded corner tiles trim the first or last scanline of a row by one pixel on that side, so the window follows the frame's rounded corners.
Definition at line 288 of file glyph_arm.c.
Referenced by Tile_BuildMetatiles(), and UiWindow_FillFromScene().