这次0.0.78快照版程序更新:
1.运行更加顺畅
2.解决了C键卡顿的bug
3.采用批量输出
4.重点:解决了运行开始突然闪退的bug
我用的是VC6.0,需要下载EasyX Graphics Library for C++
上代码:(源码,本新手肝出来的)
#include <graphics.h>
#include <time.h>
#include <conio.h>
#include <iostream>
#include <stdio.h>
#include <windows.h>
#define MAXSTAR 30 // ÐÇÐÇ×ÜÊý
#define KEY_DOWN(VK_NONAME) ((GetAsyncKeyState(VK_NONAME) & 0x8000) ? 1:0)
struct STAR
{
double x;
int y;
double step;
int color;
};
STAR star[MAXSTAR];
// ³õʼ»¯ÐÇÐÇ
void InitStar(int i)
{
star[i].x = 0;
star[i].y = rand() % 480;
star[i].step = (rand() % 5000) / 1000.0 + 1;
star[i].color = (int)(star[i].step * 255 / 6.0 + 0.5); // ËÙ¶ÈÔ½¿ì£¬ÑÕÉ«Ô½ÁÁ
star[i].color = RGB(star[i].color, star[i].co