#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

