|
DataMuseum.dkPresents historical artifacts from the history of: DKUUG/EUUG Conference tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about DKUUG/EUUG Conference tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - downloadIndex: T r
Length: 1474 (0x5c2) Types: TextFile Names: »redefine.c«
└─⟦b20c6495f⟧ Bits:30007238 EUUGD18: Wien-båndet, efterår 1987 └─⟦this⟧ »EUUGD18/General/Tetris/redefine.c«
/* ** written by adam margulies vespa@ssyx.ucsc.edu ** {...}!ucbvax!ucscc!ssyx!vespa ** ** permission is granted to freely distribute this code provided that you: ** ** 1) don't charge for it ** 2) leave my name and header on it ** 3) clearly document your changes and place your name on them ** */ /* redefine.c ** ** allows redefinition of keys */ #include "tetris.h" void redefine() { char c; int i; save_screen(0,0,23,79); clear(0,0,23,79); mvaddstr(10,10,"Redefining keys. . ."); move(12,15); printc("move left: %c", key->left); move(13,15); printc("move right: %c", key->right); move(14,15); printc("rotate ccw: %c", key->rotleft); move(15,15); printc("rotate cw: %c", key->rotright); move(16,15); printc("drop: %c", key->drop); move(17,15); printc("toggle next block: %c", key->togdisp); move(18,15); printc("toggle shadowing: %c", key->togshad); csr_draw(0,0,23,79); for(i=12; i<19; i++) { mvaddch(i,38,'?'); csr_draw(i,38,i,38); c = getchar(); mvaddch(i,38,c); csr_draw(i,38,i,38); switch(i) { case 12: key->left = c; break; case 13: key->right = c; break; case 14: key->rotleft = c; break; case 15: key->rotright = c; break; case 16: key->drop = c; break; case 17: key->togdisp = c; break; case 18: key->togshad = c; } } restore_screen(0,0,23,79); csr_draw(0,0,23,79); }