Add new custom bitmap glyphs, and change load positions

This commit is contained in:
Aaron Culliney 2015-04-18 14:50:02 -07:00
parent dcd0207525
commit 592c80344f
5 changed files with 247 additions and 23 deletions

View File

@ -728,8 +728,8 @@ static void _load_interface_fonts(void) {
video_loadfont_int(0x80,0x40,ucase_glyphs); video_loadfont_int(0x80,0x40,ucase_glyphs);
video_loadfont_int(0xC0,0x20,ucase_glyphs); video_loadfont_int(0xC0,0x20,ucase_glyphs);
video_loadfont_int(0xE0,0x20,lcase_glyphs); video_loadfont_int(0xE0,0x20,lcase_glyphs);
video_loadfont_int(0x80,11,interface_glyphs);
video_loadfont_int(MOUSETEXT_BEGIN,0x20,mousetext_glyphs); video_loadfont_int(MOUSETEXT_BEGIN,0x20,mousetext_glyphs);
video_loadfont_int(ICONTEXT_BEGIN,0x20,interface_glyphs);
} }
void interface_plotChar(uint8_t *fb, int fb_pix_width, int col, int row, interface_colorscheme_t cs, uint8_t c) { void interface_plotChar(uint8_t *fb, int fb_pix_width, int col, int row, interface_colorscheme_t cs, uint8_t c) {

View File

@ -143,7 +143,7 @@ const unsigned char mousetext_glyphs[256] =
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01
}; };
const unsigned char interface_glyphs[88] = const unsigned char interface_glyphs[256] =
{ {
0x00, 0x00, 0x00, 0x00, 0x78, 0x08, 0x08, 0x08, 0x00, 0x00, 0x00, 0x00, 0x78, 0x08, 0x08, 0x08,
0x00, 0x00, 0x00, 0x00, 0x0f, 0x08, 0x08, 0x08, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x08, 0x08, 0x08,
@ -155,5 +155,26 @@ const unsigned char interface_glyphs[88] =
0x08, 0x08, 0x08, 0x08, 0x0f, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x0f, 0x08, 0x08, 0x08,
0x00, 0x00, 0x00, 0x00, 0x7f, 0x08, 0x08, 0x08, 0x00, 0x00, 0x00, 0x00, 0x7f, 0x08, 0x08, 0x08,
0x08, 0x08, 0x08, 0x08, 0x7f, 0x00, 0x00, 0x00, 0x08, 0x08, 0x08, 0x08, 0x7f, 0x00, 0x00, 0x00,
0x08, 0x08, 0x08, 0x08, 0x7f, 0x08, 0x08, 0x08 0x08, 0x08, 0x08, 0x08, 0x7f, 0x08, 0x08, 0x08,
0x00, 0x7e, 0x02, 0x02, 0x02, 0x42, 0x22, 0x22,
0x00, 0x7f, 0x40, 0x20, 0x40, 0x43, 0x44, 0x44,
0x22, 0x42, 0x02, 0x02, 0x02, 0x02, 0x7e, 0x00,
0x44, 0x43, 0x40, 0x41, 0x41, 0x41, 0x7e, 0x00,
0x1c, 0x24, 0x04, 0x3e, 0x22, 0x22, 0x2a, 0x3e,
0x01, 0x01, 0x01, 0x11, 0x31, 0x7f, 0x30, 0x10,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
}; };

View File

@ -1,10 +1,10 @@
; Font master file ; Font master file
; ;
; This file gives the font used for the Apple Text modes and interface ; This file gives the font used for the Apple Text modes and interface
; screens. Inverse and Flashing characters are generated within the program ; screens. Inverse and Flashing characters are generated within the program
; ;
; "ucase_glyphs" contains the ASCII glyphs 64--95 (mostly uppercase ; "ucase_glyphs" contains the ASCII glyphs 64--95 (mostly uppercase
; letters), followed by 32--63 (numbers and punctuation). Although backwards ; letters), followed by 32--63 (numbers and punctuation). Although backwards
; this is most convienent for generating the Apple character set. ; this is most convienent for generating the Apple character set.
; ;
; "lcase_glyphs" contains the remaining ASCII glyphs 96-128, mostly lowercase ; "lcase_glyphs" contains the remaining ASCII glyphs 96-128, mostly lowercase
@ -12,8 +12,7 @@
; ;
; "mousetext_glyphs" contains the Enhanced //e MouseText glyphs ; "mousetext_glyphs" contains the Enhanced //e MouseText glyphs
; ;
; "interface_glyphs" contains extra chars used for the control menus, ; "interface_glyphs" contains extra chars used for the interface menus and mesages
; presently just box-drawing.
; ;
; Arranged by Michael Deutschmann ; Arranged by Michael Deutschmann
; (the font itself presumably originated with Apple, but bitmap fonts are not ; (the font itself presumably originated with Apple, but bitmap fonts are not
@ -1174,8 +1173,8 @@
#...... #......
#...... #......
#...... #......
=interface_glyphs,11 =interface_glyphs,32
: 0 : 0x00
....... .......
....... .......
....... .......
@ -1184,7 +1183,7 @@
...#... ...#...
...#... ...#...
...#... ...#...
: 1 : 0x01
....... .......
....... .......
....... .......
@ -1193,7 +1192,7 @@
...#... ...#...
...#... ...#...
...#... ...#...
: 2 : 0x02
...#... ...#...
...#... ...#...
...#... ...#...
@ -1202,7 +1201,7 @@
....... .......
....... .......
....... .......
: 3 : 0x03
...#... ...#...
...#... ...#...
...#... ...#...
@ -1211,7 +1210,7 @@
....... .......
....... .......
....... .......
: 4 : 0x04
...#... ...#...
...#... ...#...
...#... ...#...
@ -1220,7 +1219,7 @@
...#... ...#...
...#... ...#...
...#... ...#...
: 5 : 0x05
....... .......
....... .......
....... .......
@ -1229,7 +1228,7 @@
....... .......
....... .......
....... .......
: 6 : 0x06
...#... ...#...
...#... ...#...
...#... ...#...
@ -1238,7 +1237,7 @@
...#... ...#...
...#... ...#...
...#... ...#...
: 7 : 0x07
...#... ...#...
...#... ...#...
...#... ...#...
@ -1247,7 +1246,7 @@
...#... ...#...
...#... ...#...
...#... ...#...
: 8 : 0x08
....... .......
....... .......
....... .......
@ -1256,7 +1255,7 @@
...#... ...#...
...#... ...#...
...#... ...#...
: 9 : 0x09
...#... ...#...
...#... ...#...
...#... ...#...
@ -1265,7 +1264,7 @@
....... .......
....... .......
....... .......
: 10 : 0x0A
...#... ...#...
...#... ...#...
...#... ...#...
@ -1274,3 +1273,196 @@
...#... ...#...
...#... ...#...
...#... ...#...
; ----------------------- disk icon quad
: 0x0B
.......
.######
.#.....
.#.....
.#.....
.#....#
.#...#.
.#...#.
: 0x0C
.......
#######
......#
.....#.
......#
##....#
..#...#
..#...#
: 0x0D
.#...#.
.#....#
.#.....
.#.....
.#.....
.#.....
.######
.......
: 0x0E
..#...#
##....#
......#
#.....#
#.....#
#.....#
.######
.......
; ----------------------- unlock icon
: 0x0F
..###..
..#..#.
..#....
.#####.
.#...#.
.#...#.
.#.#.#.
.#####.
; ----------------------- reverse return arrow
: 0x10
#......
#......
#......
#...#..
#...##.
#######
....##.
....#..
; -----------------------
: 0x11
.......
.......
.......
.......
.......
.......
.......
.......
: 0x12
.......
.......
.......
.......
.......
.......
.......
.......
: 0x13
.......
.......
.......
.......
.......
.......
.......
.......
: 0x14
.......
.......
.......
.......
.......
.......
.......
.......
: 0x15
.......
.......
.......
.......
.......
.......
.......
.......
: 0x16
.......
.......
.......
.......
.......
.......
.......
.......
: 0x17
.......
.......
.......
.......
.......
.......
.......
.......
: 0x18
.......
.......
.......
.......
.......
.......
.......
.......
: 0x19
.......
.......
.......
.......
.......
.......
.......
.......
: 0x1A
.......
.......
.......
.......
.......
.......
.......
.......
: 0x1B
.......
.......
.......
.......
.......
.......
.......
.......
: 0x1C
.......
.......
.......
.......
.......
.......
.......
.......
: 0x1D
.......
.......
.......
.......
.......
.......
.......
.......
: 0x1E
.......
.......
.......
.......
.......
.......
.......
.......
: 0x1F
.......
.......
.......
.......
.......
.......
.......
.......

View File

@ -24,7 +24,7 @@ bool (*interface_onTouchEvent)(interface_touch_event_t action, int pointer_count
// 2015/04/12 : This was legacy code for rendering the menu interfaces on desktop Linux. Portions here are resurrected // 2015/04/12 : This was legacy code for rendering the menu interfaces on desktop Linux. Portions here are resurrected
// to render HUD messages on desktop and mobile. Nothing special or pretty here, but has "just worked" for 20+ years ;-) // to render HUD messages on desktop and mobile. Nothing special or pretty here, but has "just worked" for 20+ years ;-)
#define IsGraphic(c) ((c) == '|' || (((unsigned char)c) >= 0x80 && ((unsigned char)c) <= 0x8A)) #define IsGraphic(c) ((c) == '|' || (((unsigned char)c) >= ICONTEXT_BEGIN && ((unsigned char)c) <= ICONTEXT_MENU_END))
#define IsInside(x,y) ((x) >= 0 && (x) <= xlen-1 && (y) >= 0 && (y) <= ylen-1) #define IsInside(x,y) ((x) >= 0 && (x) <= xlen-1 && (y) >= 0 && (y) <= ylen-1)
// Draws special interface menu "characters" // Draws special interface menu "characters"
@ -106,7 +106,7 @@ static void _convert_screen_graphics(char *screen, const int x, const int y, con
} }
if (found_glyph) { if (found_glyph) {
*(screen + y*(xlen+1) + x) = 0x80 + k; *(screen + y*(xlen+1) + x) = ICONTEXT_BEGIN + k;
} }
} }

View File

@ -170,6 +170,17 @@ uint8_t floating_bus_hibit(const bool hibit);
#define MOUSETEXT_OPENAPPLE (MOUSETEXT_BEGIN + 0x01) #define MOUSETEXT_OPENAPPLE (MOUSETEXT_BEGIN + 0x01)
#define MOUSETEXT_CLOSEDAPPLE (MOUSETEXT_BEGIN + 0x00) #define MOUSETEXT_CLOSEDAPPLE (MOUSETEXT_BEGIN + 0x00)
#define ICONTEXT_BEGIN 0xB0
#define ICONTEXT_MENU_BEGIN ICONTEXT_BEGIN
#define ICONTEXT_MENU_END (ICONTEXT_MENU_BEGIN+0x0A)
#define ICONTEXT_DISK_UL (ICONTEXT_BEGIN+0x0B)
#define ICONTEXT_DISK_UR (ICONTEXT_BEGIN+0x0C)
#define ICONTEXT_DISK_LL (ICONTEXT_BEGIN+0x0D)
#define ICONTEXT_DISK_LR (ICONTEXT_BEGIN+0x0E)
#define ICONTEXT_UNLOCK (ICONTEXT_BEGIN+0x0F)
#define ICONTEXT_GOTO (ICONTEXT_BEGIN+0x10)
#define COLOR_BLACK 0 #define COLOR_BLACK 0
#define COLOR_DARK_RED 35 #define COLOR_DARK_RED 35