10#define TEXT_CANVAS_PIXEL_HEIGHT 32
11#define SCREEN_TILE_ROWS 20
12#define SCREEN_TILE_COLUMNS 30
25 u32 doubledPixelRow,
u8 *canvas,
31 (
u16 *)(((
u32)canvas + (((x >> 3) * (windowHeight - 2) + tileY) << 5)) |
32 ((doubledPixelRow | ((x & 7) >> 2)) << 1));
33 pixelMask = 15 << ((x & 3) << 2);
34 *pixelHalfword = (*pixelHalfword & ~pixelMask) | (pixelMask & repeatedColor);
54#if (LANGUAGE == LANGUAGE_JAPANESE) || (LANGUAGE == LANGUAGE_ENGLISH)
61#if (LANGUAGE == LANGUAGE_ENGLISH)
64#if (LANGUAGE == LANGUAGE_JAPANESE)
71#if (LANGUAGE == LANGUAGE_ENGLISH)
73 glyphIndex = character - 32;
75 windowHeight = window->
height;
76#if (LANGUAGE == LANGUAGE_ENGLISH)
81#if (LANGUAGE == LANGUAGE_JAPANESE) || (LANGUAGE == LANGUAGE_ENGLISH)
82 if (character <= 255 || (font !=
NULL && character - 222 <= 1))
84 if (character <= 255 || font !=
NULL)
97#if (LANGUAGE == LANGUAGE_JAPANESE)
103 if (character - 222 <= 1) {
110 source = font + character * 10;
126 tileY = (
y + row) >> 3;
128 rowLine = ((
y + row) & 7) << 1;
147 source = font + character * 32;
148 foregroundColor = 0x1111;
149 secondaryColor = 0x3333;
151#if (LANGUAGE == LANGUAGE_ENGLISH)
166 tileY = (
y + row) >> 3;
167 rowLine = ((
y + row) & 7) << 1;
169 if ((column & 1) != 0)
173 if ((bits & 13) == 1) {
174 color = secondaryColor;
175 if ((bits & 15) == 1)
176 color = foregroundColor;
196 glyphWidth = *glyphRows++;
198#if (LANGUAGE == LANGUAGE_JAPANESE)
204 glyphWidth = *glyphRows;
208#if (LANGUAGE == LANGUAGE_JAPANESE) || (LANGUAGE == LANGUAGE_ENGLISH)
209 if (character - 222 <= 1) {
214 advance = glyphWidth;
218 for (outlinePass = 0; outlinePass <= 3; outlinePass++) {
222 const u16 *nextGlyphRow;
224 if (outlinePass == 3)
229 if (outlinePass <= 1) {
230 if (outlinePass == 1)
234 }
else if (outlinePass == 2) {
243 nextGlyphRow = glyphRows + 1;
252 tileY = (
y + row) >> 3;
253 rowLine = ((
y + row) & 7) << 1;
268 bits = *nextGlyphRow++;
275#if (LANGUAGE == LANGUAGE_JAPANESE) || (LANGUAGE == LANGUAGE_ENGLISH)
298 s32 horizontalBounds;
303 topLeft = bottomLeft;
304 bottomRight = bottomLeft;
306 topRight = bottomRight;
307 foundLeftEdge = bottomRight;
308 tileColumn = bottomRight;
311 u16 tile = *frameTiles++;
317 if (foundLeftEdge == 0) {
320 left = tileColumn * 8;
324 topRight = bottomLeft + 7;
329 left = tileColumn * 8;
332 bottomLeft = left + 1;
334 bottomRight = left + 7;
339#if LANGUAGE != LANGUAGE_JAPANESE
342 left = tileColumn * 8;
345 topLeft = bottomLeft;
347 topRight = bottomRight;
353 right = tileColumn * 8 + 8;
354 topRight = tileColumn * 8 + 7;
358 right = tileColumn * 8 + 8;
360 bottomRight = tileColumn * 8 + 7;
364#if LANGUAGE != LANGUAGE_JAPANESE
367 bottomRight = tileColumn * 8 + 8;
369 topRight = bottomRight;
376 horizontalBounds = topRight + (topLeft << 8);
377 *scanlineBounds++ = horizontalBounds;
378 horizontalBounds = right + (left << 8);
380 *scanlineBounds++ = horizontalBounds;
382 *scanlineBounds++ = horizontalBounds;
384 *scanlineBounds++ = horizontalBounds;
387 *scanlineBounds++ = horizontalBounds;
389 *scanlineBounds++ = horizontalBounds;
391 *scanlineBounds++ = horizontalBounds;
392 horizontalBounds = bottomRight + (bottomLeft << 8);
394 *scanlineBounds++ = horizontalBounds;
The edition's language, for C to compare (LANGUAGE == LANGUAGE_GERMAN).
Font glyphs and their palettes.
const struct FontGlyph gUiText_Glyphs[]
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,...
#define TEXT_CANVAS_PIXEL_HEIGHT
void Tile_BuildMetatiles(u16 *scanlineBounds, u16 *frameTiles)
Builds the hardware window's horizontal extent for each of the screen's 160 scanlines from frameTiles...
#define SCREEN_TILE_COLUMNS
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.
The screen blend's globals and the graphics routines.
const u8 gUiText_GlyphWidths[]
A window: a framed rectangle of the tilemap with its sprite outputs, its opening or closing animation...
u16 flags
UI_WINDOW_ flags; 0 once closing or free.
The kanji glyphs and the text marks drawn with characters.
const u8 gUiText_KanjiGlyphs[]
The integer types, TRUE, UNUSED and the fixed-address macros.
UiWindow, a window's work, and marking its tilemap rows for transfer.
@ UI_WINDOW_OUTLINED_TEXT
the canvas text gets an outline