From 897adb9ca2f0cd67b92a398a42b9c9eebaa70c19 Mon Sep 17 00:00:00 2001 From: Curtis McEnroe Date: Fri, 24 Aug 2018 22:08:18 -0400 Subject: Separate 8, 9 and *, ( --- client.c | 30 +++++++++++++++++++++++------- 1 file changed, 23 insertions(+), 7 deletions(-) (limited to 'client.c') diff --git a/client.c b/client.c index c055028..ca67a84 100644 --- a/client.c +++ b/client.c @@ -263,10 +263,11 @@ static void colorFg(uint8_t fg) { static void colorBg(uint8_t bg) { input.color = (input.color & 0x0F) | (bg & 0x07) << 4; } -static void colorInvert(void) { - input.color = (input.color & 0x08) - | (input.color & 0x70) >> 4 - | (input.color & 0x07) << 4; + +static uint8_t colorInvert(uint8_t color) { + return (color & 0x08) + | (color & 0x70) >> 4 + | (color & 0x07) << 4; } static void cellCopy(void) { @@ -347,8 +348,8 @@ static void inputNormal(wchar_t ch) { break; case '^': colorBg(COLOR_CYAN); break; case '&': colorBg(COLOR_WHITE); - break; case '8': case '*': input.color ^= COLOR_BRIGHT; - break; case '9': case '(': colorInvert(); + break; case '8': input.color ^= COLOR_BRIGHT; + break; case '9': input.color = colorInvert(input.color); break; case '`': input.color = tile.colors[cellY][cellX]; break; case 'H': cellSwap(-1, 0); @@ -361,13 +362,28 @@ static void inputNormal(wchar_t ch) { break; case 'N': cellSwap( 1, 1); break; case 's': cellCopy(); + break; case 'x': cellCopy(); clientPut(copy.color, ' '); break; case 'p': clientPut(copy.color, copy.cell); - break; case 'x': cellCopy(); clientPut(copy.color, ' '); break; case '~': { + cellCopy(); clientPut(input.color, tile.cells[cellY][cellX]); clientMove(1, 0); } + break; case '*': { + clientPut( + tile.colors[cellY][cellX] ^ COLOR_BRIGHT, + tile.cells[cellY][cellX] + ); + clientMove(1, 0); + } + break; case '(': { + clientPut( + colorInvert(tile.colors[cellY][cellX]), + tile.cells[cellY][cellX] + ); + clientMove(1, 0); + } break; case CTRL('A'): { clientPut(tile.colors[cellY][cellX], tile.cells[cellY][cellX] + 1); -- cgit 1.4.1
path: root/doc/zlib/deflateGetDictionary.3 (unfollow)
Commit message (Collapse)Author
2022-04-20Set txt mtimes to source mtimesJune McEnroe
2022-04-20Make (pun) the dependencies make (pun) more senseJune McEnroe
2022-04-17Add HenchJune McEnroe
There are some truly horrifying and gruesome bits though.
2022-04-14Publish "Agency"June McEnroe
2022-04-13Swap dates so the difference is always positiveJune McEnroe
2022-04-04Update "Care"June McEnroe
2022-04-03Publish "Care"June McEnroe
2022-03-31Publish "Compassion"June McEnroe
2022-03-24Skip matches with ident chars on either sideJune McEnroe
This fixes, for example, where the link gets placed on static regex_t regex(const char *pattern, int flags) in title.c.
2022-03-24Add The Invisible Life of Addie LaRueJune McEnroe
So good, but so long. Reminded me of The Ten Thousand Doors of January at the beginning, and more of that N. K. Jemisin series about gods later. I like this interacting with gods and becoming something like one sort of thing. God, it took me a whole month (more?) to read and this is only my third book of the year :( I need some more novellas to read, but the other books I have from the library currently are also thick.
2022-03-22Source ~/.profile.local if it existsJune McEnroe
2022-03-18Publish "Addendum 2021"June McEnroe
2022-03-16Remove wcwidth portJune McEnroe
DYLD_FORCE_FLAT_NAMESPACE no longer exists in macOS 12 so this approach doesn't work anymore. Moved to <https://git.causal.agency/jorts/tree/wcwidth> and compiled into <https://git.causal.agency/jorts/tree/ncurses>.
2022-03-16Remove -j4 from ./PlanJune McEnroe
Plan learned to set this automatically!
2022-03-15Rewrite Linux install.sh for DebianJune McEnroe
2022-03-15Remove dashJune McEnroe