diff --git a/code/bsd_tetris_add_reverse_rotate.patch b/code/bsd_tetris_add_reverse_rotate.patch deleted file mode 100644 index 95b4e30..0000000 --- a/code/bsd_tetris_add_reverse_rotate.patch +++ /dev/null @@ -1,81 +0,0 @@ -diff --git a/tetris.c b/tetris.c -index 59b6173..84352f5 100644 ---- a/tetris.c -+++ b/tetris.c -@@ -53,7 +53,7 @@ - #include "screen.h" - #include "tetris.h" - --#define NUMKEYS 6 -+#define NUMKEYS 7 - - cell board[B_SIZE]; - int Rows, Cols; -@@ -170,7 +170,7 @@ main(int argc, char *argv[]) - if (pledge("stdio rpath wpath cpath tty unveil", NULL) == -1) - err(1, "pledge"); - -- keys = "jkl pq"; -+ keys = "hjkl pq"; - - classic = showpreview = 0; - while ((ch = getopt(argc, argv, "ck:l:ps")) != -1) -@@ -226,9 +226,9 @@ main(int argc, char *argv[]) - } - - snprintf(key_msg, sizeof key_msg, --"%s - left %s - rotate %s - right %s - drop %s - pause %s - quit", -+"%s - left %s - ccw %s - cw %s - right %s - drop %s - pause %s - quit", - key_write[0], key_write[1], key_write[2], key_write[3], -- key_write[4], key_write[5]); -+ key_write[4], key_write[5], key_write[6]); - - (void)signal(SIGINT, onintr); - scr_init(); -@@ -286,11 +286,11 @@ main(int argc, char *argv[]) - /* - * Handle command keys. - */ -- if (c == keys[5]) { -+ if (c == keys[6]) { - /* quit */ - break; - } -- if (c == keys[4]) { -+ if (c == keys[5]) { - static char msg[] = - "paused - press RETURN to continue"; - -@@ -313,21 +313,28 @@ main(int argc, char *argv[]) - continue; - } - if (c == keys[1]) { -- /* turn */ -- const struct shape *new = &shapes[ -- classic? curshape->rotc : curshape->rot]; -+ /* turn ccw */ -+ const struct shape *new = &shapes[curshape->rot]; - - if (fits_in(new, pos)) - curshape = new; - continue; - } - if (c == keys[2]) { -+ /* turn cw */ -+ const struct shape *new = &shapes[curshape->rotc]; -+ -+ if (fits_in(new, pos)) -+ curshape = new; -+ continue; -+ } -+ if (c == keys[3]) { - /* move right */ - if (fits_in(curshape, pos + 1)) - pos++; - continue; - } -- if (c == keys[3]) { -+ if (c == keys[4]) { - /* move to bottom */ - while (fits_in(curshape, pos + B_COLS)) { - pos += B_COLS; diff --git a/org/cheatsheet.org b/org/cheatsheet.org index 58d8961..b60a320 100644 --- a/org/cheatsheet.org +++ b/org/cheatsheet.org @@ -62,16 +62,17 @@ https://orgmode.org/worg/dev/org-export-reference.html *Bold* /italic/ _underline_ +strikethrough+ ~code~ =verbatim= ** normal -| key | usage | -|---------+---------------------| -| M-% | 替换 | -| M-; | 区域切换注释 | -| C-x C-; | 行切换注释 | -| C-y | paste to minibuffer | -| M-&/! | async/shell command | -| C-M-\ | indent-region | -| M-y | past previous | -| C-x ^ | enlarge-window | +| key | usage | +|-----------+---------------------| +| M-% | 替换 | +| M-; | 区域切换注释 | +| C-x C-; | 行切换注释 | +| C-y | paste to minibuffer | +| M-&/! | async/shell command | +| C-M-\ | indent-region | +| M-y | past previous | +| C-x ^ | enlarge-window | +| C-q | insert a tab | https://www.masteringemacs.org/article/fun-games-in-emacs diff --git a/org/internet_collections.org b/org/internet_collections.org index 254b67e..9f1faf9 100644 --- a/org/internet_collections.org +++ b/org/internet_collections.org @@ -361,6 +361,7 @@ inspiration: Veritasium *** [[https://youtu.be/nfF91Z6fqGk][CMD 登录B站]] *** [[https://youtu.be/crnEygp4C6g][Jeff Geerling: FINALLY! A GPU works on the Raspberry Pi!]] *** [[https://youtu.be/jlPaby7suOc][Every Clojure Talk Ever]] +*** [[https://youtu.be/CnbVCNIh1NA][Fructure: A Structured Editing Engine in Racket]] *** [[https://youtu.be/Fq9chEBQMFE][what if I try to malloc too much memory]] *** [[https://youtu.be/zJ-8DZhzBEE][what your favourite pl says about you]] *** [[https://youtu.be/9vXKvku6y5A][ArcaOS: Modern OS/2]] @@ -481,6 +482,7 @@ Huwawei NB! ** [[https://marc.info/?l=openbsd-tech&m=167374666324119&w=2][openbsd-tech: xonly on amd64: testing wanted]] ** [[https://lists.freebsd.org/pipermail/freebsd-current/2003-July/006889.html][freebsd : Annoucning DragonFly BSD!]] ** [[https://minnie.tuhs.org/pipermail/tuhs/2022-April/025643.html][TUHS: Sad News - we last two wonderful people in the past few weeks]] +** [[https://lore.kernel.org/lkml/63efd7ab.170a0220.3442b.6609@mx.google.com/][Linus: If you cannot explain a merge, then JUST DON'T DO IT]] * Other :PROPERTIES: diff --git a/org/whatif_openbsd.org b/org/whatif_openbsd.org index 3e76180..805f8d3 100644 --- a/org/whatif_openbsd.org +++ b/org/whatif_openbsd.org @@ -285,7 +285,7 @@ iwx0 at pci0 dev 20 function 3 "Intel Wi-Fi 6 AX201" rev 0x20, msix ** [[./bbs_gbk_utf8.org][支线任务: 中文 BBS GBK 转 UTF8]] -** @@html:add reverse rotation to BSD Tetris@@ +** [[https://github.com/dongdigua/tetris-custom][Add some useful feature in BSD Tetris]] :PROPERTIES: :CUSTOM_ID: tetris :END: