37 lines
No EOL
559 B
C
37 lines
No EOL
559 B
C
#ifndef _BLOCK_H_
|
|
#define _BLOCK_H_
|
|
|
|
#include <stdlib.h>
|
|
#include <string.h>
|
|
#include "button.h"
|
|
|
|
#define MAX_X 8
|
|
#define MAX_Y 12
|
|
|
|
enum BLK_TP {none,two_h,two_v,three_l,three_r,three_h,three_v,four};
|
|
//µã ½á¹¹Ìå
|
|
struct _dot
|
|
{
|
|
unsigned char x;
|
|
unsigned char y;
|
|
} ;
|
|
typedef struct _dot Dot;
|
|
|
|
//¿é ½á¹¹Ìå
|
|
struct _group
|
|
{
|
|
enum BLK_TP type; //ÀàÐÍ
|
|
Dot mother;
|
|
};
|
|
typedef struct _group Group;
|
|
|
|
void blockInit();
|
|
void blockDestroy();
|
|
|
|
void genPiece();
|
|
void dropPiece();
|
|
void drawBlock();
|
|
void moveLeftPiece();
|
|
void moveRightPiece();
|
|
void judgeBlock();
|
|
#endif |