|
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 e
Length: 1218 (0x4c2) Types: TextFile Names: »erase_horiz.c«
└─⟦b20c6495f⟧ Bits:30007238 EUUGD18: Wien-båndet, efterår 1987 └─⟦this⟧ »EUUGD18/General/Tetris/erase_horiz.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 ** */ /* Tetris: erase_horiz.c */ /* */ /* Upon being called by check_horiz() this function updates the */ /* window array to erase the completed horizontal row. */ /* It also increments the level for every tenth row that is eaten. */ #include "tetris.h" erase_horiz(row) int row; { int i,j; if (row>2) for(i=row-1; i>1; i--) for(j=35; j<45; j++) window1[i+1][j] = window1[i][j]; for(j=35; j<45; j++) window1[2][j] = ' '; csr_draw(2,35,row,44); move(1,65); printc("lines: %3.3d", ++lines); if(lines && !(lines % 10) && ((lines/10) > level)) { move(2,65); printc("level: %2.2d", ++level); next->color = '0' + (level % 10); set_level(); } csr_draw(1,65,2,79); }