mirror of
https://github.com/dongdigua/dongdigua.github.io
synced 2024-11-23 23:53:10 +08:00
remove tetris patch here
This commit is contained in:
parent
982919bbd6
commit
ff7dbffbb1
@ -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;
|
@ -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 <tab> | insert a tab |
|
||||
|
||||
https://www.masteringemacs.org/article/fun-games-in-emacs
|
||||
|
||||
|
@ -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:
|
||||
|
@ -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:<a href=https://dongdigua.github.io/code/bsd_tetris_add_reverse_rotate.patch type=text/plain>add reverse rotation to BSD Tetris</a>@@
|
||||
** [[https://github.com/dongdigua/tetris-custom][Add some useful feature in BSD Tetris]]
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: tetris
|
||||
:END:
|
||||
|
Loading…
Reference in New Issue
Block a user