block.h

来自「这是老早前学生时代用TurboC++3.0写的dos程序」· C头文件 代码 · 共 63 行

H
63 行
字号
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <bios.h>
#include <dos.h>
#include <graphics.h>

#define BLOCKWIDTH 20
#define CLEARMARK 10
#define WRITEMARK 11
#define SETWIDTH 4
#define SETLENGTH 4
#define PLAYWIDTH 19
#define PLAYLENGTH 12
#define LEFT 0
#define RIGHT 1

#define HISCORE_X 500
#define HISCORE_Y 42
#define TIME_X 450
#define TIME_Y 142
#define LEVER_X 470
#define LEVER_Y 92
#define SCORE_X 470
#define SCORE_Y 192
#define LINE_X 450
#define LINE_Y 242
#define NORMAL_X 476
#define NORMAL_Y 292

#define ESC 0x1b
#define ENTER 0x0d
#define ARROW_UP 0x48
#define ARROW_DOWN 0x50
#define ARROW_LEFT 0x4b
#define ARROW_RIGHT 0x4d
#define PAGE_UP 0x49
#define PAGE_DOWN 0x51

#define TYPELENGTH 8

#define SETVIEW_X 450
#define SETVIEW_Y 370
#define PLAYVIEW_X 60
#define PLAYVIEW_Y 30

#define DTIME 1400
#define DELAY 200

struct block{
	      int x;
	      int y;
	      struct block *next;
	    };
typedef struct block BNODE;

typedef struct{
		char name[9];
		long int order;
		struct time playtime;
	      }ORDER;

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?