我给你顶,还用fish给你着色
ti.h
#define _ln 24
#define _col 16
#define _px_per_block 8
#ifndef _null
#define _null (void *)0
#endif
extern int get_matrix_block(char ln,char col);
extern void step();
extern void move_left();
extern void move_right();
extern void init();
extern void rotate();
extern void new_block();
extern void drop();
/*blocks
0 1 2 3 4 5 6 7 8 9 10
x xx x x x xxxxx xx xx x x xxx
x xx xx xx xx xx xx xxx xx x
x x x x x
x
x
*/
const char _block[11][5][5]={
{
{0,0,1,0,0},
{0,0,1,0,0},
{0,0,1,0,0},
{0,0,1,0,0},
{0,0,1,0,0}
},
{
{0,0,0,0,0},
{0,0,0,0,0},
{0,0,0,0,0},
{0,0,1,1,0},
{0,0,1,1,0}
},
{
{0,0,0,0,0},
{0,0,0,0,0},
{0,0,1,0,0},
{0,0,1,1,0},
{0,0,0,1,0}
},
{
{0,0,0,0,0},
{0,0,0,0,0},
{0,0,0,1,0},
{0,0,1,1,0},
{0,0,1,0,0}
},
{
{0,0,0,0,0},
{0,0,0,0,0},
{0,0,1,0,0},
{0,0,1,1,0},
{0,0,1,0,0}
},
{
{0,0,0,0,0},
{0,0,0,0,0},
{1,1,1,1,1},
{0,0,0,0,0},
{0,0,0,0,0}
},
{
{0,0,0,0,0},
{0,0,0,0,0},
{0,0,0,0,0},
{0,0,1,1,0},
{0,1,1,0,0}
},
{
{0,0,0,0,0},
{0,0,0,0,0},
{0,0,0,0,0},
{0,1,1,0,0},
{0,0,1,1,0}
},
{
{0,0,0,0,0},
{0,0,0,0,0},
{0,0,0,0,0},
{0,0,1,0,0},
{0,1,1,1,0}
},
{
{0,0,0,0,0},
{0,0,0,0,0},
{0,0,1,0,0},
{0,1,1,0,0},
{0,0,1,0,0}
},
{
{0,0,0,0,0},
{0,0,0,0,0},
{0,0,0,0,0},
{0,1,1,1,0},
{0,0,1,0,0}
}
};