typedef struct KEYS { BOOL left_down ; /* TRUE if key is depressed */ BOOL right_down ; /* TRUE if key is depressed */ BOOL space_down ; /* TRUE if key is depressed */ } KEYS ; /* ------------------------------------------------------------ */ /* Function prototypes */ /* ------------------------------------------------------------ */ BOOL Blocked(int row, int col, int rot) ; BOOL HandleObject(KEYS *keys) ; BOOL On(int rot, int row, int col) ; void PaintObject(int row, int col, int rot, BOOL on, char clr) ; void Tone(int hertz) ; KEYS *GetKeys(void) ; /* ------------------------------------------------------------ */ /* Macros for assembling ascii code & attribute codes */ /* ------------------------------------------------------------ */ #define ATTB(fgd, bgd) (((bgd) << 4) | (fgd)) #define BLACK 0 #define WHITE 7 #define NORMAL ATTB(WHITE, BLACK) #define CELL(ch, att) (((att) << 8) | ch) #define EMPTY CELL(' ', NORMAL)