📄 tetrislib.h
字号:
#ifndef TETRISLIB_H
#define TETRISLIB_H
// Call tetris_init at startup
void tetris_init(void);
// Call the handler with 100 Hz, for game update and graphics rendering
void tetris_handler(void);
// Modify brick moves the falling brick dx cubes and/or rotates
void tetris_modify_brick(unsigned char dx, unsigned char rot);
// tetris_speed defines the speed of the falling brick
extern unsigned char tetris_speed;
// Set these bitflags in tetris_mode for:
#define TETRIS_MODE_SPEEDUP 1 // falling brick speedup
#define TETRIS_MODE_GRAVITY 2 // for real gravity. If not set, naive gravity
extern unsigned char tetris_mode;
// Score keeping:
// Total number of lines zapped
extern unsigned short tetris_stats_lines;
// Number of zap-rounds
extern unsigned short tetris_stats_zapcount;
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -