diff --git a/.gitignore b/.gitignore index c771c3e..951e7bd 100644 --- a/.gitignore +++ b/.gitignore @@ -52,4 +52,4 @@ Module.symvers Mkfile.old dkms.conf -/ui48 +/ui4x diff --git a/Makefile b/Makefile index 065acdb..a055650 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ # Makefile -TARGETS = ui48 +TARGETS = ui4x VERSION_MAJOR = 0 VERSION_MINOR = 0 PATCHLEVEL = 0 @@ -9,12 +9,12 @@ PKG_CONFIG ?= pkg-config MAKEFLAGS +=-j$(NUM_CORES) -l$(NUM_CORES) -DOTOS = src/ui48_config.o \ - src/ui48_emulator.o \ - src/ui48_sdl2.o \ - src/ui48_ncurses.o \ - src/ui48_common.o \ - src/ui48_main.o +DOTOS = src/ui4x_config.o \ + src/ui4x_emulator.o \ + src/ui4x_sdl2.o \ + src/ui4x_ncurses.o \ + src/ui4x_common.o \ + src/ui4x_main.o cc-option = $(shell if $(CC) $(1) -c -x c /dev/null -o /dev/null > /dev/null 2>&1; \ then echo $(1); fi) @@ -68,7 +68,7 @@ LIBS = -lm \ all: $(TARGETS) -ui48: $(DOTOS) +ui4x: $(DOTOS) # Binaries $(TARGETS): diff --git a/src/ui48_bitmaps_big_font.h b/src/ui4x_bitmaps_big_font.h similarity index 100% rename from src/ui48_bitmaps_big_font.h rename to src/ui4x_bitmaps_big_font.h diff --git a/src/ui48_bitmaps_misc.h b/src/ui4x_bitmaps_misc.h similarity index 100% rename from src/ui48_bitmaps_misc.h rename to src/ui4x_bitmaps_misc.h diff --git a/src/ui48_bitmaps_small_font.h b/src/ui4x_bitmaps_small_font.h similarity index 63% rename from src/ui48_bitmaps_small_font.h rename to src/ui4x_bitmaps_small_font.h index 4308510..e0cf6cd 100644 --- a/src/ui48_bitmaps_small_font.h +++ b/src/ui4x_bitmaps_small_font.h @@ -330,94 +330,94 @@ static unsigned char lcurly_bits[] = { 0x18, 0x04, 0x04, 0x02, 0x04, 0x04, 0x18 #define rcurly_height 7 static unsigned char rcurly_bits[] = { 0x03, 0x04, 0x04, 0x08, 0x04, 0x04, 0x03 }; -#define sqr_gx_width 11 -#define sqr_gx_height 13 -static unsigned char sqr_gx_bits[] = { 0x00, 0x03, 0x80, 0x04, 0x00, 0x04, 0x00, 0x02, 0x00, 0x01, 0x80, 0x07, 0x00, - 0x00, 0x66, 0x00, 0x14, 0x00, 0x08, 0x00, 0x14, 0x00, 0x53, 0x00, 0x21, 0x00 }; +#define sqr_48gx_width 11 +#define sqr_48gx_height 13 +static unsigned char sqr_48gx_bits[] = { 0x00, 0x03, 0x80, 0x04, 0x00, 0x04, 0x00, 0x02, 0x00, 0x01, 0x80, 0x07, 0x00, + 0x00, 0x66, 0x00, 0x14, 0x00, 0x08, 0x00, 0x14, 0x00, 0x53, 0x00, 0x21, 0x00 }; -#define root_gx_width 18 -#define root_gx_height 15 -static unsigned char root_gx_bits[] = { 0x66, 0x00, 0x00, 0x14, 0x00, 0x00, 0x08, 0x00, 0x00, 0x14, 0x00, 0x00, 0x53, 0xfe, 0x03, - 0x21, 0x02, 0x02, 0x00, 0x02, 0x00, 0x00, 0x99, 0x00, 0x00, 0x91, 0x00, 0x10, 0x91, 0x00, - 0xa0, 0x50, 0x00, 0xc0, 0x60, 0x00, 0x80, 0x20, 0x00, 0x00, 0x14, 0x00, 0x00, 0x0c, 0x00 }; +#define root_48gx_width 18 +#define root_48gx_height 15 +static unsigned char root_48gx_bits[] = { 0x66, 0x00, 0x00, 0x14, 0x00, 0x00, 0x08, 0x00, 0x00, 0x14, 0x00, 0x00, 0x53, 0xfe, 0x03, + 0x21, 0x02, 0x02, 0x00, 0x02, 0x00, 0x00, 0x99, 0x00, 0x00, 0x91, 0x00, 0x10, 0x91, 0x00, + 0xa0, 0x50, 0x00, 0xc0, 0x60, 0x00, 0x80, 0x20, 0x00, 0x00, 0x14, 0x00, 0x00, 0x0c, 0x00 }; -#define pow10_gx_width 13 -#define pow10_gx_height 12 -static unsigned char pow10_gx_bits[] = { 0x00, 0x12, 0x00, 0x0c, 0x00, 0x04, 0x00, 0x0a, 0x00, 0x09, 0x32, 0x00, - 0x4b, 0x00, 0x4a, 0x00, 0x4a, 0x00, 0x4a, 0x00, 0x4a, 0x00, 0x32, 0x00 }; +#define pow10_48gx_width 13 +#define pow10_48gx_height 12 +static unsigned char pow10_48gx_bits[] = { 0x00, 0x12, 0x00, 0x0c, 0x00, 0x04, 0x00, 0x0a, 0x00, 0x09, 0x32, 0x00, + 0x4b, 0x00, 0x4a, 0x00, 0x4a, 0x00, 0x4a, 0x00, 0x4a, 0x00, 0x32, 0x00 }; -#define exp_gx_width 13 -#define exp_gx_height 12 -static unsigned char exp_gx_bits[] = { 0x00, 0xfb, 0x00, 0xf6, 0x00, 0xe6, 0x00, 0xf6, 0x80, 0xed, 0x18, 0xe0, - 0x36, 0xe0, 0x36, 0xe0, 0x1f, 0xe0, 0x03, 0xe0, 0x13, 0xe0, 0x0e, 0xe0 }; -#define parens_gx_width 20 -#define parens_gx_height 12 -static unsigned char parens_gx_bits[] = { 0x0c, 0x00, 0x03, 0x06, 0x00, 0x06, 0x06, 0x00, 0x06, 0x03, 0x00, 0x0c, - 0x03, 0x00, 0x0c, 0x03, 0x00, 0x0c, 0x03, 0x00, 0x0c, 0x03, 0x00, 0x0c, - 0x03, 0x00, 0x0c, 0x06, 0x00, 0x06, 0x06, 0x00, 0x06, 0x0c, 0x00, 0x03 }; +#define exp_48gx_width 13 +#define exp_48gx_height 12 +static unsigned char exp_48gx_bits[] = { 0x00, 0xfb, 0x00, 0xf6, 0x00, 0xe6, 0x00, 0xf6, 0x80, 0xed, 0x18, 0xe0, + 0x36, 0xe0, 0x36, 0xe0, 0x1f, 0xe0, 0x03, 0xe0, 0x13, 0xe0, 0x0e, 0xe0 }; +#define parens_48gx_width 20 +#define parens_48gx_height 12 +static unsigned char parens_48gx_bits[] = { 0x0c, 0x00, 0x03, 0x06, 0x00, 0x06, 0x06, 0x00, 0x06, 0x03, 0x00, 0x0c, + 0x03, 0x00, 0x0c, 0x03, 0x00, 0x0c, 0x03, 0x00, 0x0c, 0x03, 0x00, 0x0c, + 0x03, 0x00, 0x0c, 0x06, 0x00, 0x06, 0x06, 0x00, 0x06, 0x0c, 0x00, 0x03 }; -#define hash_gx_width 8 -#define hash_gx_height 12 -static unsigned char hash_gx_bits[] = { 0x00, 0x00, 0x48, 0x48, 0xfe, 0x24, 0x24, 0x7f, 0x12, 0x12, 0x00, 0x00 }; +#define hash_48gx_width 8 +#define hash_48gx_height 12 +static unsigned char hash_48gx_bits[] = { 0x00, 0x00, 0x48, 0x48, 0xfe, 0x24, 0x24, 0x7f, 0x12, 0x12, 0x00, 0x00 }; -#define bracket_gx_width 12 -#define bracket_gx_height 12 -static unsigned char bracket_gx_bits[] = { 0x0f, 0x0f, 0x03, 0x0c, 0x03, 0x0c, 0x03, 0x0c, 0x03, 0x0c, 0x03, 0x0c, - 0x03, 0x0c, 0x03, 0x0c, 0x03, 0x0c, 0x03, 0x0c, 0x03, 0x0c, 0x0f, 0x0f }; +#define bracket_48gx_width 12 +#define bracket_48gx_height 12 +static unsigned char bracket_48gx_bits[] = { 0x0f, 0x0f, 0x03, 0x0c, 0x03, 0x0c, 0x03, 0x0c, 0x03, 0x0c, 0x03, 0x0c, + 0x03, 0x0c, 0x03, 0x0c, 0x03, 0x0c, 0x03, 0x0c, 0x03, 0x0c, 0x0f, 0x0f }; -#define under_gx_width 10 -#define under_gx_height 12 -static unsigned char under_gx_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x03, 0xff, 0x03 }; +#define under_48gx_width 10 +#define under_48gx_height 12 +static unsigned char under_48gx_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x03, 0xff, 0x03 }; -#define prog_gx_width 24 -#define prog_gx_height 12 -static unsigned char prog_gx_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0xc3, 0x18, - 0x8c, 0x81, 0x31, 0xc6, 0x00, 0x63, 0x63, 0x00, 0xc6, 0xc6, 0x00, 0x63, - 0x8c, 0x81, 0x31, 0x18, 0xc3, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; +#define prog_48gx_width 24 +#define prog_48gx_height 12 +static unsigned char prog_48gx_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0xc3, 0x18, + 0x8c, 0x81, 0x31, 0xc6, 0x00, 0x63, 0x63, 0x00, 0xc6, 0xc6, 0x00, 0x63, + 0x8c, 0x81, 0x31, 0x18, 0xc3, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; -#define quote_gx_width 12 -#define quote_gx_height 12 -static unsigned char quote_gx_bits[] = { 0x05, 0x0a, 0x05, 0x0a, 0x05, 0x0a, 0x05, 0x0a, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; +#define quote_48gx_width 12 +#define quote_48gx_height 12 +static unsigned char quote_48gx_bits[] = { 0x05, 0x0a, 0x05, 0x0a, 0x05, 0x0a, 0x05, 0x0a, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; -#define curly_gx_width 14 -#define curly_gx_height 12 -static unsigned char curly_gx_bits[] = { 0x0c, 0x0c, 0x06, 0x18, 0x06, 0x18, 0x06, 0x18, 0x06, 0x18, 0x03, 0x30, - 0x06, 0x18, 0x06, 0x18, 0x06, 0x18, 0x06, 0x18, 0x06, 0x18, 0x0c, 0x0c }; +#define curly_48gx_width 14 +#define curly_48gx_height 12 +static unsigned char curly_48gx_bits[] = { 0x0c, 0x0c, 0x06, 0x18, 0x06, 0x18, 0x06, 0x18, 0x06, 0x18, 0x03, 0x30, + 0x06, 0x18, 0x06, 0x18, 0x06, 0x18, 0x06, 0x18, 0x06, 0x18, 0x0c, 0x0c }; -#define colon_gx_width 8 -#define colon_gx_height 12 -static unsigned char colon_gx_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0xc3, 0xc3, 0x00, 0x00, 0xc3, 0xc3, 0x00 }; +#define colon_48gx_width 8 +#define colon_48gx_height 12 +static unsigned char colon_48gx_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0xc3, 0xc3, 0x00, 0x00, 0xc3, 0xc3, 0x00 }; -#define angle_gx_width 12 -#define angle_gx_height 12 -static unsigned char angle_gx_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x80, 0x01, 0xc0, 0x00, 0xe0, 0x01, - 0xb0, 0x03, 0x18, 0x03, 0x0c, 0x03, 0x06, 0x03, 0xff, 0x0f, 0xff, 0x0f }; +#define angle_48gx_width 12 +#define angle_48gx_height 12 +static unsigned char angle_48gx_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x80, 0x01, 0xc0, 0x00, 0xe0, 0x01, + 0xb0, 0x03, 0x18, 0x03, 0x0c, 0x03, 0x06, 0x03, 0xff, 0x0f, 0xff, 0x0f }; -#define pi_gx_width 10 -#define pi_gx_height 12 -static unsigned char pi_gx_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xfe, 0x03, 0xff, 0x01, - 0xcc, 0x00, 0xcc, 0x00, 0xcc, 0x00, 0xcc, 0x00, 0xcc, 0x00, 0xcc, 0x00 }; +#define pi_48gx_width 10 +#define pi_48gx_height 12 +static unsigned char pi_48gx_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xfe, 0x03, 0xff, 0x01, + 0xcc, 0x00, 0xcc, 0x00, 0xcc, 0x00, 0xcc, 0x00, 0xcc, 0x00, 0xcc, 0x00 }; -#define nl_gx_width 18 -#define nl_gx_height 12 -static unsigned char nl_gx_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xc0, 0x00, 0x03, 0xf0, 0x00, 0x03, - 0xfc, 0x00, 0x03, 0xff, 0xff, 0x03, 0xff, 0xff, 0x03, 0xfc, 0x00, 0x00, - 0xf0, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; +#define nl_48gx_width 18 +#define nl_48gx_height 12 +static unsigned char nl_48gx_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xc0, 0x00, 0x03, 0xf0, 0x00, 0x03, + 0xfc, 0x00, 0x03, 0xff, 0xff, 0x03, 0xff, 0xff, 0x03, 0xfc, 0x00, 0x00, + 0xf0, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; -#define comma_gx_width 3 -#define comma_gx_height 12 -static unsigned char comma_gx_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x07, 0x07, 0x04, 0x04, 0x02 }; +#define comma_48gx_width 3 +#define comma_48gx_height 12 +static unsigned char comma_48gx_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x07, 0x07, 0x04, 0x04, 0x02 }; -#define arrow_gx_width 18 -#define arrow_gx_height 12 -static unsigned char arrow_gx_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x3c, 0x00, - 0x00, 0xfc, 0x00, 0xff, 0xff, 0x03, 0xff, 0xff, 0x03, 0x00, 0xfc, 0x00, - 0x00, 0x3c, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; +#define arrow_48gx_width 18 +#define arrow_48gx_height 12 +static unsigned char arrow_48gx_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x3c, 0x00, + 0x00, 0xfc, 0x00, 0xff, 0xff, 0x03, 0xff, 0xff, 0x03, 0x00, 0xfc, 0x00, + 0x00, 0x3c, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; -#define equal_gx_width 8 -#define equal_gx_height 12 -static unsigned char equal_gx_bits[] = { 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00 }; +#define equal_48gx_width 8 +#define equal_48gx_height 12 +static unsigned char equal_48gx_bits[] = { 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00 }; #endif /* _UI48_BITMAPS_SMALL_FONT_H 1 */ diff --git a/src/ui48_common.c b/src/ui4x_common.c similarity index 82% rename from src/ui48_common.c rename to src/ui4x_common.c index 82833e0..c5240c1 100644 --- a/src/ui48_common.c +++ b/src/ui4x_common.c @@ -1,139 +1,139 @@ #include -#include "ui48_common.h" -#include "ui48_inner.h" -#include "ui48_sdl2.h" -#include "ui48_ncurses.h" +#include "ui4x_common.h" +#include "ui4x_inner.h" +#include "ui4x_sdl2.h" +#include "ui4x_ncurses.h" letter_t small_font[ 128 ] = { - {0, 0, 0 }, - {nl_gx_width, nl_gx_height, nl_gx_bits }, /* \x01 == \n gx */ - {comma_gx_width, comma_gx_height, comma_gx_bits }, /* \x02 == comma gx */ - {arrow_gx_width, arrow_gx_height, arrow_gx_bits }, /* \x03 == \-> gx */ - {equal_gx_width, equal_gx_height, equal_gx_bits }, /* \x04 == equal gx */ - {pi_gx_width, pi_gx_height, pi_gx_bits }, /* \x05 == pi gx */ - {arrow_width, arrow_height, arrow_bits }, /* \x06 == left arrow */ - {diff_width, diff_height, diff_bits }, /* \x07 == differential */ - {integral_width, integral_height, integral_bits }, /* \x08 == integral */ - {sigma_width, sigma_height, sigma_bits }, /* \x09 == sigma */ - {sqr_width, sqr_height, sqr_bits }, /* \x0a == sqr */ - {root_width, root_height, root_bits }, /* \x0b == root */ - {pow10_width, pow10_height, pow10_bits }, /* \x0c == pow10 */ - {exp_width, exp_height, exp_bits }, /* \x0d == exp */ - {prog_width, prog_height, prog_bits }, /* \x0e == << >> */ - {string_width, string_height, string_bits }, /* \x0f == " " */ - {nl_width, nl_height, nl_bits }, /* \x10 == New Line # 16 */ - {pi_width, pi_height, pi_bits }, /* \x11 == pi */ - {angle_width, angle_height, angle_bits }, /* \x12 == angle */ - {sqr_gx_width, sqr_gx_height, sqr_gx_bits }, /* \x13 == sqr gx */ - {root_gx_width, root_gx_height, root_gx_bits }, /* \x14 == root gx */ - {pow10_gx_width, pow10_gx_height, pow10_gx_bits }, /* \x15 == pow10 gx */ - {exp_gx_width, exp_gx_height, exp_gx_bits }, /* \x16 == exp gx */ - {parens_gx_width, parens_gx_height, parens_gx_bits }, /* \x17 == ( ) gx */ - {hash_gx_width, hash_gx_height, hash_gx_bits }, /* \x18 == # gx */ - {bracket_gx_width, bracket_gx_height, bracket_gx_bits }, /* \x19 == [] gx */ - {under_gx_width, under_gx_height, under_gx_bits }, /* \x1a == _ gx */ - {prog_gx_width, prog_gx_height, prog_gx_bits }, /* \x1b == << >> gx */ - {quote_gx_width, quote_gx_height, quote_gx_bits }, /* \x1c == " " gx */ - {curly_gx_width, curly_gx_height, curly_gx_bits }, /* \x1d == {} gx */ - {colon_gx_width, colon_gx_height, colon_gx_bits }, /* \x1e == :: gx */ - {angle_gx_width, angle_gx_height, angle_gx_bits }, /* \x1f == angle gx */ - {blank_width, blank_height, blank_bits }, /* # 32 */ - {0, 0, 0 }, - {0, 0, 0 }, - {hash_width, hash_height, hash_bits }, - {0, 0, 0 }, - {0, 0, 0 }, - {0, 0, 0 }, - {0, 0, 0 }, - {lbrace_width, lbrace_height, lbrace_bits }, - {rbrace_width, rbrace_height, rbrace_bits }, - {0, 0, 0 }, - {0, 0, 0 }, - {comma_width, comma_height, comma_bits }, - {0, 0, 0 }, - {0, 0, 0 }, - {slash_width, slash_height, slash_bits }, - {zero_width, zero_height, zero_bits }, /* # 48 */ - {one_width, one_height, one_bits }, - {two_width, two_height, two_bits }, - {three_width, three_height, three_bits }, - {four_width, four_height, four_bits }, - {five_width, five_height, five_bits }, - {six_width, six_height, six_bits }, - {seven_width, seven_height, seven_bits }, - {eight_width, eight_height, eight_bits }, - {nine_width, nine_height, nine_bits }, - {small_colon_width, small_colon_height, small_colon_bits}, - {0, 0, 0 }, - {0, 0, 0 }, - {equal_width, equal_height, equal_bits }, - {0, 0, 0 }, - {0, 0, 0 }, - {0, 0, 0 }, /* # 64 */ - {A_width, A_height, A_bits }, - {B_width, B_height, B_bits }, - {C_width, C_height, C_bits }, - {D_width, D_height, D_bits }, - {E_width, E_height, E_bits }, - {F_width, F_height, F_bits }, - {G_width, G_height, G_bits }, - {H_width, H_height, H_bits }, - {I_width, I_height, I_bits }, - {J_width, J_height, J_bits }, - {K_width, K_height, K_bits }, - {L_width, L_height, L_bits }, - {M_width, M_height, M_bits }, - {N_width, N_height, N_bits }, - {O_width, O_height, O_bits }, - {P_width, P_height, P_bits }, /* # 80 */ - {Q_width, Q_height, Q_bits }, - {R_width, R_height, R_bits }, - {S_width, S_height, S_bits }, - {T_width, T_height, T_bits }, - {U_width, U_height, U_bits }, - {V_width, V_height, V_bits }, - {W_width, W_height, W_bits }, - {X_width, X_height, X_bits }, - {Y_width, Y_height, Y_bits }, - {Z_width, Z_height, Z_bits }, - {lbracket_width, lbracket_height, lbracket_bits }, - {0, 0, 0 }, - {rbracket_width, rbracket_height, rbracket_bits }, - {0, 0, 0 }, - {under_width, under_height, under_bits }, - {0, 0, 0 }, /* # 96 */ - {0, 0, 0 }, /* a */ - {0, 0, 0 }, /* b */ - {0, 0, 0 }, /* c */ - {d_width, d_height, d_bits }, - {e_width, e_height, e_bits }, - {0, 0, 0 }, /* f */ - {0, 0, 0 }, /* g */ - {0, 0, 0 }, /* h */ - {i_width, i_height, i_bits }, - {0, 0, 0 }, /* j */ - {0, 0, 0 }, /* k */ - {0, 0, 0 }, /* l */ - {0, 0, 0 }, /* m */ - {0, 0, 0 }, /* n */ - {0, 0, 0 }, /* o */ - {p_width, p_height, p_bits }, - {0, 0, 0 }, /* q */ - {r_width, r_height, r_bits }, - {s_width, s_height, s_bits }, - {t_width, t_height, t_bits }, - {0, 0, 0 }, /* u */ - {v_width, v_height, v_bits }, - {w_width, w_height, w_bits }, - {0, 0, 0 }, /* x */ - {y_width, y_height, y_bits }, - {0, 0, 0 }, /* z */ - {lcurly_width, lcurly_height, lcurly_bits }, - {0, 0, 0 }, - {rcurly_width, rcurly_height, rcurly_bits }, - {0, 0, 0 }, - {0, 0, 0 }, /* 127 */ + {0, 0, 0 }, + {nl_48gx_width, nl_48gx_height, nl_48gx_bits }, /* \x01 == \n gx */ + {comma_48gx_width, comma_48gx_height, comma_48gx_bits }, /* \x02 == comma gx */ + {arrow_48gx_width, arrow_48gx_height, arrow_48gx_bits }, /* \x03 == \-> gx */ + {equal_48gx_width, equal_48gx_height, equal_48gx_bits }, /* \x04 == equal gx */ + {pi_48gx_width, pi_48gx_height, pi_48gx_bits }, /* \x05 == pi gx */ + {arrow_width, arrow_height, arrow_bits }, /* \x06 == left arrow */ + {diff_width, diff_height, diff_bits }, /* \x07 == differential */ + {integral_width, integral_height, integral_bits }, /* \x08 == integral */ + {sigma_width, sigma_height, sigma_bits }, /* \x09 == sigma */ + {sqr_width, sqr_height, sqr_bits }, /* \x0a == sqr */ + {root_width, root_height, root_bits }, /* \x0b == root */ + {pow10_width, pow10_height, pow10_bits }, /* \x0c == pow10 */ + {exp_width, exp_height, exp_bits }, /* \x0d == exp */ + {prog_width, prog_height, prog_bits }, /* \x0e == << >> */ + {string_width, string_height, string_bits }, /* \x0f == " " */ + {nl_width, nl_height, nl_bits }, /* \x10 == New Line # 16 */ + {pi_width, pi_height, pi_bits }, /* \x11 == pi */ + {angle_width, angle_height, angle_bits }, /* \x12 == angle */ + {sqr_48gx_width, sqr_48gx_height, sqr_48gx_bits }, /* \x13 == sqr gx */ + {root_48gx_width, root_48gx_height, root_48gx_bits }, /* \x14 == root gx */ + {pow10_48gx_width, pow10_48gx_height, pow10_48gx_bits }, /* \x15 == pow10 gx */ + {exp_48gx_width, exp_48gx_height, exp_48gx_bits }, /* \x16 == exp gx */ + {parens_48gx_width, parens_48gx_height, parens_48gx_bits }, /* \x17 == ( ) gx */ + {hash_48gx_width, hash_48gx_height, hash_48gx_bits }, /* \x18 == # gx */ + {bracket_48gx_width, bracket_48gx_height, bracket_48gx_bits}, /* \x19 == [] gx */ + {under_48gx_width, under_48gx_height, under_48gx_bits }, /* \x1a == _ gx */ + {prog_48gx_width, prog_48gx_height, prog_48gx_bits }, /* \x1b == << >> gx */ + {quote_48gx_width, quote_48gx_height, quote_48gx_bits }, /* \x1c == " " gx */ + {curly_48gx_width, curly_48gx_height, curly_48gx_bits }, /* \x1d == {} gx */ + {colon_48gx_width, colon_48gx_height, colon_48gx_bits }, /* \x1e == :: gx */ + {angle_48gx_width, angle_48gx_height, angle_48gx_bits }, /* \x1f == angle gx */ + {blank_width, blank_height, blank_bits }, /* # 32 */ + {0, 0, 0 }, + {0, 0, 0 }, + {hash_width, hash_height, hash_bits }, + {0, 0, 0 }, + {0, 0, 0 }, + {0, 0, 0 }, + {0, 0, 0 }, + {lbrace_width, lbrace_height, lbrace_bits }, + {rbrace_width, rbrace_height, rbrace_bits }, + {0, 0, 0 }, + {0, 0, 0 }, + {comma_width, comma_height, comma_bits }, + {0, 0, 0 }, + {0, 0, 0 }, + {slash_width, slash_height, slash_bits }, + {zero_width, zero_height, zero_bits }, /* # 48 */ + {one_width, one_height, one_bits }, + {two_width, two_height, two_bits }, + {three_width, three_height, three_bits }, + {four_width, four_height, four_bits }, + {five_width, five_height, five_bits }, + {six_width, six_height, six_bits }, + {seven_width, seven_height, seven_bits }, + {eight_width, eight_height, eight_bits }, + {nine_width, nine_height, nine_bits }, + {small_colon_width, small_colon_height, small_colon_bits }, + {0, 0, 0 }, + {0, 0, 0 }, + {equal_width, equal_height, equal_bits }, + {0, 0, 0 }, + {0, 0, 0 }, + {0, 0, 0 }, /* # 64 */ + {A_width, A_height, A_bits }, + {B_width, B_height, B_bits }, + {C_width, C_height, C_bits }, + {D_width, D_height, D_bits }, + {E_width, E_height, E_bits }, + {F_width, F_height, F_bits }, + {G_width, G_height, G_bits }, + {H_width, H_height, H_bits }, + {I_width, I_height, I_bits }, + {J_width, J_height, J_bits }, + {K_width, K_height, K_bits }, + {L_width, L_height, L_bits }, + {M_width, M_height, M_bits }, + {N_width, N_height, N_bits }, + {O_width, O_height, O_bits }, + {P_width, P_height, P_bits }, /* # 80 */ + {Q_width, Q_height, Q_bits }, + {R_width, R_height, R_bits }, + {S_width, S_height, S_bits }, + {T_width, T_height, T_bits }, + {U_width, U_height, U_bits }, + {V_width, V_height, V_bits }, + {W_width, W_height, W_bits }, + {X_width, X_height, X_bits }, + {Y_width, Y_height, Y_bits }, + {Z_width, Z_height, Z_bits }, + {lbracket_width, lbracket_height, lbracket_bits }, + {0, 0, 0 }, + {rbracket_width, rbracket_height, rbracket_bits }, + {0, 0, 0 }, + {under_width, under_height, under_bits }, + {0, 0, 0 }, /* # 96 */ + {0, 0, 0 }, /* a */ + {0, 0, 0 }, /* b */ + {0, 0, 0 }, /* c */ + {d_width, d_height, d_bits }, + {e_width, e_height, e_bits }, + {0, 0, 0 }, /* f */ + {0, 0, 0 }, /* g */ + {0, 0, 0 }, /* h */ + {i_width, i_height, i_bits }, + {0, 0, 0 }, /* j */ + {0, 0, 0 }, /* k */ + {0, 0, 0 }, /* l */ + {0, 0, 0 }, /* m */ + {0, 0, 0 }, /* n */ + {0, 0, 0 }, /* o */ + {p_width, p_height, p_bits }, + {0, 0, 0 }, /* q */ + {r_width, r_height, r_bits }, + {s_width, s_height, s_bits }, + {t_width, t_height, t_bits }, + {0, 0, 0 }, /* u */ + {v_width, v_height, v_bits }, + {w_width, w_height, w_bits }, + {0, 0, 0 }, /* x */ + {y_width, y_height, y_bits }, + {0, 0, 0 }, /* z */ + {lcurly_width, lcurly_height, lcurly_bits }, + {0, 0, 0 }, + {rcurly_width, rcurly_height, rcurly_bits }, + {0, 0, 0 }, + {0, 0, 0 }, /* 127 */ }; letter_t big_font[ 128 ] = { @@ -267,7 +267,7 @@ letter_t big_font[ 128 ] = { {0, 0, 0 } }; -color_t colors_sx[ NB_COLORS ] = { +color_t colors_48sx[ NB_COLORS ] = { { /* #ffffff */ .name = "white", @@ -470,7 +470,7 @@ color_t colors_sx[ NB_COLORS ] = { }, }; -color_t colors_gx[ NB_COLORS ] = { +color_t colors_48gx[ NB_COLORS ] = { { /* #FFFFFF */ .name = "white", @@ -673,7 +673,7 @@ color_t colors_gx[ NB_COLORS ] = { }, }; -button_t buttons_sx[ NB_KEYS ] = { +button_t buttons_48sx[ NB_KEYS ] = { {.name = "A", .x = 0, .y = 0, @@ -1468,7 +1468,7 @@ button_t buttons_sx[ NB_KEYS ] = { .sub = 0 }, }; -button_t buttons_gx[ NB_KEYS ] = { +button_t buttons_48gx[ NB_KEYS ] = { {.name = "A", .x = 0, .y = 0, diff --git a/src/ui48_common.h b/src/ui4x_common.h similarity index 95% rename from src/ui48_common.h rename to src/ui4x_common.h index 6cd00f8..6a6cb3d 100644 --- a/src/ui48_common.h +++ b/src/ui4x_common.h @@ -1,7 +1,7 @@ #ifndef _UI48_COMMON_H #define _UI48_COMMON_H 1 -#include "ui48_config.h" +#include "ui4x_config.h" /*************************************************/ /* public API: if it's there it's used elsewhere */ diff --git a/src/ui48_config.c b/src/ui4x_config.c similarity index 98% rename from src/ui48_config.c rename to src/ui4x_config.c index 3f25c91..20b47c2 100644 --- a/src/ui48_config.c +++ b/src/ui4x_config.c @@ -10,10 +10,10 @@ #include -#include "ui48_config.h" +#include "ui4x_config.h" static config_t config = { - .progname = ( char* )"ui48", + .progname = ( char* )"ui4x", .model = MODEL_48GX, .verbose = false, diff --git a/src/ui48_config.h b/src/ui4x_config.h similarity index 100% rename from src/ui48_config.h rename to src/ui4x_config.h diff --git a/src/ui48_emulator.c b/src/ui4x_emulator.c similarity index 97% rename from src/ui48_emulator.c rename to src/ui4x_emulator.c index fa0222b..065db74 100644 --- a/src/ui48_emulator.c +++ b/src/ui4x_emulator.c @@ -1,5 +1,5 @@ -#include "ui48_config.h" -#include "ui48_emulator.h" +#include "ui4x_config.h" +#include "ui4x_emulator.h" static config_t config; diff --git a/src/ui48_emulator.h b/src/ui4x_emulator.h similarity index 98% rename from src/ui48_emulator.h rename to src/ui4x_emulator.h index 8969978..6a6190a 100644 --- a/src/ui48_emulator.h +++ b/src/ui4x_emulator.h @@ -3,7 +3,7 @@ #include -#include "ui48_config.h" +#include "ui4x_config.h" // Keys #define HPKEY_A 0 diff --git a/src/ui48_inner.h b/src/ui4x_inner.h similarity index 87% rename from src/ui48_inner.h rename to src/ui4x_inner.h index 2d0954e..4a155a5 100644 --- a/src/ui48_inner.h +++ b/src/ui4x_inner.h @@ -1,11 +1,11 @@ #ifndef _UI48_INNER_H #define _UI48_INNER_H 1 -#include "ui48_emulator.h" +#include "ui4x_emulator.h" -#include "ui48_bitmaps_misc.h" -#include "ui48_bitmaps_small_font.h" -#include "ui48_bitmaps_big_font.h" +#include "ui4x_bitmaps_misc.h" +#include "ui4x_bitmaps_small_font.h" +#include "ui4x_bitmaps_big_font.h" // Colors /* SX GX */ @@ -75,11 +75,11 @@ typedef struct button_t { extern letter_t small_font[ 128 ]; extern letter_t big_font[ 128 ]; -extern color_t colors_sx[ NB_COLORS ]; -extern color_t colors_gx[ NB_COLORS ]; +extern color_t colors_48sx[ NB_COLORS ]; +extern color_t colors_48gx[ NB_COLORS ]; -extern button_t buttons_sx[ NB_KEYS ]; -extern button_t buttons_gx[ NB_KEYS ]; +extern button_t buttons_48sx[ NB_KEYS ]; +extern button_t buttons_48gx[ NB_KEYS ]; #define small_ascent 8 #define small_descent 4 diff --git a/src/ui48_main.c b/src/ui4x_main.c similarity index 96% rename from src/ui48_main.c rename to src/ui4x_main.c index f437092..9937a9e 100644 --- a/src/ui48_main.c +++ b/src/ui4x_main.c @@ -5,8 +5,8 @@ #include #include -#include "ui48_emulator.h" -#include "ui48_common.h" +#include "ui4x_emulator.h" +#include "ui4x_common.h" #define UI_REFRESH_RATE_Hz 64 diff --git a/src/ui48_ncurses.c b/src/ui4x_ncurses.c similarity index 98% rename from src/ui48_ncurses.c rename to src/ui4x_ncurses.c index 9465deb..6acddca 100644 --- a/src/ui48_ncurses.c +++ b/src/ui4x_ncurses.c @@ -14,13 +14,13 @@ #include -#include "ui48_config.h" -#include "ui48_emulator.h" -#include "ui48_common.h" -#include "ui48_inner.h" +#include "ui4x_config.h" +#include "ui4x_emulator.h" +#include "ui4x_common.h" +#include "ui4x_inner.h" -#define COLORS ( config.model == MODEL_48GX ? colors_gx : colors_sx ) -#define BUTTONS ( config.model == MODEL_48GX ? buttons_gx : buttons_sx ) +#define COLORS ( config.model == MODEL_48GX ? colors_48gx : colors_48sx ) +#define BUTTONS ( config.model == MODEL_48GX ? buttons_48gx : buttons_48sx ) #define LCD_OFFSET_X 1 #define LCD_OFFSET_Y 1 diff --git a/src/ui48_ncurses.h b/src/ui4x_ncurses.h similarity index 100% rename from src/ui48_ncurses.h rename to src/ui4x_ncurses.h diff --git a/src/ui48_sdl2.c b/src/ui4x_sdl2.c similarity index 99% rename from src/ui48_sdl2.c rename to src/ui4x_sdl2.c index cd30677..341703d 100644 --- a/src/ui48_sdl2.c +++ b/src/ui4x_sdl2.c @@ -2,13 +2,13 @@ #include -#include "ui48_config.h" -#include "ui48_emulator.h" -#include "ui48_common.h" -#include "ui48_inner.h" +#include "ui4x_config.h" +#include "ui4x_emulator.h" +#include "ui4x_common.h" +#include "ui4x_inner.h" -#define COLORS ( config.model == MODEL_48GX ? colors_gx : colors_sx ) -#define BUTTONS ( config.model == MODEL_48GX ? buttons_gx : buttons_sx ) +#define COLORS ( config.model == MODEL_48GX ? colors_48gx : colors_48sx ) +#define BUTTONS ( config.model == MODEL_48GX ? buttons_48gx : buttons_48sx ) #define KEYBOARD_HEIGHT ( BUTTONS[ LAST_HPKEY ].y + BUTTONS[ LAST_HPKEY ].h ) #define KEYBOARD_WIDTH ( BUTTONS[ LAST_HPKEY ].x + BUTTONS[ LAST_HPKEY ].w ) diff --git a/src/ui48_sdl2.h b/src/ui4x_sdl2.h similarity index 100% rename from src/ui48_sdl2.h rename to src/ui4x_sdl2.h