realball.h
来自「一个在tc3.0下面写的棋类游戏 很经典 值得好好研究」· C头文件 代码 · 共 59 行
H
59 行
#ifndef __REALBALL_H
#define __REALBALL_H
/*----------------------------------------------------------------------*/
typedef struct BALL{
int x,y,oldx,oldy;
int vx,vy;
int radius;
int color;
struct BALL *next;
void *buf;
void *oldbuf;
int attribute;
} BALL;
typedef struct Blocks{
int x,y,height,width;
void *buf;
unsigned int treasure;
unsigned int thick;
unsigned int active;
} BLOCKS;
typedef struct Border{
int x,y,oldx;
int width,length,height;
void *buf;
void *oldbuf;
}BORDER;
typedef struct USER{
int life;
long score;
int attribute; /*attribute 0: normalball, 1 slowball,2 quick ball,... */
int round;
}USER;
typedef struct Treasure{
int x,y,oldx,oldy,width,height;
int vx,vy;
int treasure;
void *buf;
void *oldbuf;
struct Treasure *next;
}TREASURE;
int paint_ball(BALL *,USER *);
int paint_treasure(TREASURE *,BORDER *);
void paint_border(BORDER *);
void paint_blocks();
void initblocks(int);
void loadpictures();
void freemem_realball();
void set_screen();
void show_score();
void show_life();
int play();
int pause();
int realball();
#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?