Add big font (hackily, for now)

This commit is contained in:
Pyrex 2023-09-06 15:40:12 -07:00
parent ea013b6c15
commit af13df1c7b
3 changed files with 12 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

View File

@ -10,4 +10,5 @@ class Font {
static const Font small =
Font("assets/images/fonts/font_small.png", 1, 1, 16, 16);
static const Font normal = Font("assets/images/fonts/font.png", 1, 2, 32, 8);
static const Font big = Font("assets/images/fonts/font_big.png", 2, 2, 32, 8);
}

View File

@ -29,6 +29,17 @@ class Terminal {
tiles[Terminal.width * (x + 2)].content =
Content(Font.small.imageName, c % 16, c ~/ 16);
}
for (final (x, c) in toCp437String("BEWARE OF THE BAT!").indexed) {
tiles[2 * x + 4 + Terminal.width * 4].content =
Content(Font.big.imageName, 2 * (c % 32), 2 * (c ~/ 32));
tiles[2 * x + 4 + Terminal.width * 5].content =
Content(Font.big.imageName, 2 * (c % 32), 2 * (c ~/ 32) + 1);
tiles[2 * x + 1 + 4 + Terminal.width * 4].content =
Content(Font.big.imageName, 2 * (c % 32) + 1, 2 * (c ~/ 32));
tiles[2 * x + 1 + 4 + Terminal.width * 5].content =
Content(Font.big.imageName, 2 * (c % 32) + 1, 2 * (c ~/ 32) + 1);
}
}
CustomPaint toWidget(BuildContext context) {