This repository has been archived on 2024-01-06. You can view files and clone it, but cannot push or open issues or pull requests.
justhomework/MCU/MCU_REAL _FINAL/block.h

36 lines
480 B
C
Raw Normal View History

#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