From: Ben Harris Date: Mon, 23 Sep 2024 13:36:32 +0000 (+0100) Subject: Complicate the macro that generates contiguous mosaic graphics X-Git-Tag: bedstead-002.007~7 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~bjharris/git?a=commitdiff_plain;h=5abc741345cc724a28e168f8dc3a490e6edf3865;p=bedstead.git Complicate the macro that generates contiguous mosaic graphics It's now inkvoked the same way as the one that generates separated graphics, which means those invocations can fit into eight fewer lines. --- diff --git a/bedstead.c b/bedstead.c index dd2f213..31c07c0 100644 --- a/bedstead.c +++ b/bedstead.c @@ -480,23 +480,15 @@ static struct glyph { {{000,000,021,021,021,017,001,000,000}, U(0447) }, /* che */ /* Mosaic graphics common to all versions */ -#define M(x, u) { {x}, U(u), MOS6 } - /* space */ M(0x01, 1FB00), M(0x02, 1FB01), M(0x03, 1FB02), - M(0x04, 1FB03), M(0x05, 1FB04), M(0x06, 1FB05), M(0x07, 1FB06), - M(0x08, 1FB07), M(0x09, 1FB08), M(0x0a, 1FB09), M(0x0b, 1FB0A), - M(0x0c, 1FB0B), M(0x0d, 1FB0C), M(0x0e, 1FB0D), M(0x0f, 1FB0E), - M(0x10, 1FB0F), M(0x11, 1FB10), M(0x12, 1FB11), M(0x13, 1FB12), - M(0x14, 1FB13), /* lfblock */ M(0x16, 1FB14), M(0x17, 1FB15), - M(0x18, 1FB16), M(0x19, 1FB17), M(0x1a, 1FB18), M(0x1b, 1FB19), - M(0x1c, 1FB1A), M(0x1d, 1FB1B), M(0x1e, 1FB1C), M(0x1f, 1FB1D), - M(0x20, 1FB1E), M(0x21, 1FB1F), M(0x22, 1FB20), M(0x23, 1FB21), - M(0x24, 1FB22), M(0x25, 1FB23), M(0x26, 1FB24), M(0x27, 1FB25), - M(0x28, 1FB26), M(0x29, 1FB27), /* rtblock */ M(0x2b, 1FB28), - M(0x2c, 1FB29), M(0x2d, 1FB2A), M(0x2e, 1FB2B), M(0x2f, 1FB2C), - M(0x30, 1FB2D), M(0x31, 1FB2E), M(0x32, 1FB2F), M(0x33, 1FB30), - M(0x34, 1FB31), M(0x35, 1FB32), M(0x36, 1FB33), M(0x37, 1FB34), - M(0x38, 1FB35), M(0x39, 1FB36), M(0x3a, 1FB37), M(0x3b, 1FB38), - M(0x3c, 1FB39), M(0x3d, 1FB3A), M(0x3e, 1FB3B), /* block */ +#define M(u) { {0x ## u * 21 / 20 + 1}, U(1FB ## u), MOS6 } + /* */ M(00), M(01), M(02), M(03), M(04), M(05), M(06), + M(07), M(08), M(09), M(0A), M(0B), M(0C), M(0D), M(0E), + M(0F), M(10), M(11), M(12), M(13), M(14), M(15), + M(16), M(17), M(18), M(19), M(1A), M(1B), M(1C), M(1D), + M(1E), M(1F), M(20), M(21), M(22), M(23), M(24), M(25), + M(26), M(27), M(28), M(29), M(2A), M(2B), M(2C), + M(2D), M(2E), M(2F), M(30), M(31), M(32), M(33), M(34), + M(35), M(36), M(37), M(38), M(39), M(3A), M(3B), #undef M {{0x15}, 0x258c, "lfblock", MOS6 }, {{0x2a}, 0x2590, "rtblock", MOS6 },