36 lines
480 B
C
36 lines
480 B
C
|
#ifndef _BLOCK_H_
|
|||
|
#define _BLOCK_H_
|
|||
|
#include <stdlib.h>
|
|||
|
|
|||
|
#define MAX_X 8
|
|||
|
#define MAX_Y 8
|
|||
|
|
|||
|
|
|||
|
//<2F><> <20>ṹ<EFBFBD><E1B9B9>
|
|||
|
struct _dot
|
|||
|
{
|
|||
|
unsigned char x;
|
|||
|
unsigned char y;
|
|||
|
} ;
|
|||
|
typedef struct _dot Dot;
|
|||
|
|
|||
|
//<2F><> <20>ṹ<EFBFBD><E1B9B9>
|
|||
|
struct _group
|
|||
|
{
|
|||
|
unsigned char used;//ӵ<>еĵ<D0B5><C4B5><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
unsigned char len; //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڴ泤<DAB4><E6B3A4>
|
|||
|
Dot* list;
|
|||
|
};
|
|||
|
typedef struct _group Group;
|
|||
|
|
|||
|
void groupInit(Group g,unsigned char i)
|
|||
|
{
|
|||
|
retry:
|
|||
|
g.len=i;
|
|||
|
g.used=0;
|
|||
|
g.list=(Dot*)malloc(sizeof(Dot)*g.len);
|
|||
|
if(!g.list)
|
|||
|
goto retry;
|
|||
|
}
|
|||
|
|
|||
|
#endif
|