pcc32应用2


#include <stdio.h>
#include <stdlib.h>
#include <pcc32.h>

#define MAP_WIDTH   40
#define MAP_HEIGHT  30

int main()
{
	static char LogoMap[8][64] =
	{
		"■   ■ ■ ■■■■■ ■■■■■ ■■■■■ ■■■■ ",
		"■   ■ ■   ■     ■   ■     ■   ■",
		"■   ■ ■   ■     ■   ■     ■   ■",
		"■■■■■ ■   ■     ■   ■■■■■ ■■■■ ",
		"■   ■ ■   ■     ■   ■     ■ ■  ",
		"■   ■ ■   ■     ■   ■     ■  ■ ",
		"■   ■ ■   ■     ■   ■■■■■ ■   ■",
		"                               "
	};
	int width = 31, height = 7;
	int x = (MAP_WIDTH - width) / 2;
	int miny = 0, maxy = (MAP_HEIGHT + height) / 2;
	int r, y;
	fixConsoleSize(MAP_WIDTH * 2, MAP_HEIGHT);
	setTextColor(LIGHT_GREEN);
	for (r = 0;r < 7;r++)
	{
		for (y = miny; y < maxy - r; y++)
		{
			gotoTextPos(x*2, y);
			puts(LogoMap[6-r]);
			delayMS(30);
			if(y < maxy - r - 1)
			{
				gotoTextPos(x*2, y);
				puts(LogoMap[7]);
			}
		}
	}
	jkGetKey();
	return 0;
}


posted @ 2012-12-01 10:40  N3verL4nd  阅读(128)  评论(0编辑  收藏  举报