mirror of
https://github.com/pevans/erc-c.git
synced 2024-10-30 21:26:54 +00:00
Add inverse font
This commit is contained in:
parent
4a4fd93d9d
commit
6069ab4d1b
@ -270,10 +270,14 @@ typedef struct {
|
||||
vm_screen *screen;
|
||||
|
||||
/*
|
||||
* This is the system font (the only font the Apple II knows about,
|
||||
* really); anywhere we render text, we have to use this font.
|
||||
* Here are the system and inverse fonts. The system font is the
|
||||
* normal (I suppose?) bitmap font for all text on the Apple II. The
|
||||
* inverse font is the system font, but with black inversed to
|
||||
* white. Both fonts also contain the so-called "MouseText"
|
||||
* glyphs--or, at least, my interpretation of them.
|
||||
*/
|
||||
vm_bitfont *sysfont;
|
||||
vm_bitfont *invfont;
|
||||
|
||||
/*
|
||||
* This is the mode in which we must interpret graphics. This will
|
||||
|
@ -11,6 +11,7 @@ typedef struct {
|
||||
vm_8bit apple2_sys_rom[APPLE2_SYSROM_SIZE];
|
||||
vm_8bit apple2_peripheral_rom[APPLE2_PERIPHERAL_SIZE];
|
||||
vm_8bit apple2_sysfont[APPLE2_SYSFONT_SIZE];
|
||||
vm_8bit apple2_invfont[APPLE2_SYSFONT_SIZE];
|
||||
} objstore;
|
||||
|
||||
extern bool objstore_ready();
|
||||
@ -23,5 +24,6 @@ extern void objstore_clear();
|
||||
OBJSTORE_DECL(apple2_peripheral_rom);
|
||||
OBJSTORE_DECL(apple2_sys_rom);
|
||||
OBJSTORE_DECL(apple2_sysfont);
|
||||
OBJSTORE_DECL(apple2_invfont);
|
||||
|
||||
#endif
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -53,6 +53,7 @@ apple2_create(int width, int height)
|
||||
mach->aux = NULL;
|
||||
mach->main = NULL;
|
||||
mach->sysfont = NULL;
|
||||
mach->invfont = NULL;
|
||||
mach->screen = NULL;
|
||||
mach->drive1 = NULL;
|
||||
mach->drive2 = NULL;
|
||||
@ -137,7 +138,12 @@ apple2_create(int width, int height)
|
||||
APPLE2_SYSFONT_SIZE,
|
||||
7, 8, // 7 pixels wide, 8 pixels tall
|
||||
0x7f); // 7-bit values only
|
||||
if (mach->sysfont == NULL) {
|
||||
mach->invfont = vm_bitfont_create(mach->screen,
|
||||
objstore_apple2_invfont(),
|
||||
APPLE2_SYSFONT_SIZE,
|
||||
7, 8,
|
||||
0x7f);
|
||||
if (mach->sysfont == NULL || mach->invfont == NULL) {
|
||||
apple2_free(mach);
|
||||
log_critical("Could not initialize apple2: bad font");
|
||||
return NULL;
|
||||
|
@ -96,3 +96,4 @@ objstore_ready()
|
||||
OBJSTORE_DEFN(apple2_peripheral_rom); // ignore docblock
|
||||
OBJSTORE_DEFN(apple2_sys_rom); // ignore docblock
|
||||
OBJSTORE_DEFN(apple2_sysfont); // ignore docblock
|
||||
OBJSTORE_DEFN(apple2_invfont); // ignore docblock
|
||||
|
@ -15,7 +15,10 @@ data = 'hope'
|
||||
# in objstore.h
|
||||
data += file_data('./data/apple2.rom') # Internal ROM ($C000..$FFFF)
|
||||
data += file_data('./data/peripheral.rom') # $C000..$CFFF
|
||||
|
||||
# The apple2 fonts
|
||||
data += file_data('./fonts/apple2-system.bmp')
|
||||
data += file_data('./fonts/apple2-inverse.bmp')
|
||||
|
||||
# Let's not keep calling len(data) since we know it won't change over our
|
||||
# iterations
|
||||
|
Loading…
Reference in New Issue
Block a user