color(112),gto(A.x,A.y),printf("%s",A.name);
if(KEY_DOWN(MOUSE_MOVED)) return 1;
}
return 0;
}
pair<int,int> GetXY{
HANDLE hStdout;
CONSOLE_SCREEN_BUFFER_INFO pBuffer;
hStdout = GetStdHandle(STD_OUTPUT_HANDLE);
GetConsoleScreenBufferInfo(hStdout, &pBuffer);
return make_pair(pBuffer.dwCursorPosition.Y,pBuffer.dwCursorPosition.X);
}
template <typename T>void Tprint(int Nx,int Ny,int Color,T a){
int x=GetXY.first,y=GetXY.second;
gto(Nx,Ny),color(Color),cout<<a;
gto(x,y);
}
void ColorPrint{
for(int i=0;i<256;i++)
color(i),printf("%d\n",i);
}
void SetWindow(const char *name,int c,int w){
char str[30];
sprintf(str,"title %s",name);
system(str);
sprintf(str,"mode con cols=%d lines=%d",w,c);
system(str);
}
void SetWindow(const char *name,int c,int w,int x,int y){
SetConsoleTitle(name);
HWND hwnd;
hwnd=GetForegroundWindow;
SetWindowPos(hwnd,HWND_TOP,y,x,w*8,c*16,SWP_SHOWWINDOW);
}
int read{
color(fwhite+flight);
int x=0,f=1;char c=getchar;
while(c<\'0\'||c>\'9\'){if(c==\'-\')f=-1;c=getchar;}
while(c>=\'0\'&&c<=\'9\'){x=x*10+c-\'0\';c=getchar;}
return x*f;
}
#define TP Tprint
#define WINDOWC 45
#define WINDOWW 55
#define INF 0x3f3f3f3f
#define OC fwhite+flight+bblack //original color
bool InRange(int x){
return x>=0&&x<=WINDOWC;
}
int BossFlag;
int OwnShotTimes,OwnLoseBlood,OwnShotOnTimes;
int MoneyFlash,ScoreFlash;
const int ConstNewDy[4]={-1,0,1};
#define MAX_BULLET_TYPE_NUM 3
const int ConstBulletColor[MAX_BULLET_TYPE_NUM+5]={0,fyellow,fred+flight,fred+flight,fblue+flight,fred+bwhite};
const char ConstBulletShape[MAX_BULLET_TYPE_NUM+5]={0,\'*\',\'*\',\'O\',\'|\',\'%\'};
const int ConstBulletDamage[MAX_BULLET_TYPE_NUM+5]={0,50,80,500,20,300};
/*Move 1 block every 100-Speed ms*/
const int ConstBulletSpeed[MAX_BULLET_TYPE_NUM+5]={0,50,30,10,80,20};
/*The color of the full block in the blood line*/
const int ConstBloodColor[4]={0,fred,fyellow,fgreen};
#define MAX_BOSS_NUM 10
const int ConstBossFullBlood[MAX_BOSS_NUM+5]={0,1000,3000,5000,10000,30000,50000,100000,300000,500000,1000000};
const int ConstBossShotSpeed[MAX_BOSS_NUM+5][2]={{0,0},{30,-3900},{30,-3400},{50,-2900},{50,-2400},{70,-1900},{70,-1400},{90,-900},{90,-400},{100,-400},{100,-400}};
const int ConstBossStopCD[MAX_BOSS_NUM+5]={0,3200,3400,3600,3800,4000,4200,4400,4600,4800,5000};
const int ConstBossStopTime[MAX_BOSS_NUM+5]={0,3000,2800,2600,2400,2200,2000,1800,1600,1400,1200};
const int ConstBossMoveSpeed[MAX_BOSS_NUM+5]={0,800,800,800,850,850,850,900,900,900,950};
const int ConstBossScore[MAX_BOSS_NUM+5]={0,10000,20000,40000,80000,160000,320000,640000,1280000,2560000,5120000};
const int ConstBossMoney[MAX_BOSS_NUM+5]={0,100,200,500,1000,2000,5000,8000,10000,20000,50000};
const int ConstBossNeedScore[MAX_BOSS_NUM+5]={0,500,1000,1500,2000,2500,3000,3500,4000,4500,5000};
struct Bullet{
int isExist;
int x,y,Type;
int dx,dy,LastBulletRefreshTime;
Bullet{LastBulletRefreshTime=-INF;}
Bullet(int isExist_,int x_,int y_,int Type_,int dx_,int dy_):
isExist(isExist_),x(x_),y(y_),Type(Type_),dx(dx_),dy(dy_){}
};
void MoveBullet(Bullet&);
/*We must use Bullet*, or we can\'t change the data(position of the bullet) in the set*/
set<Bullet*> Ammo;
void BulletsRefresh{
vector<set<Bullet*>::iterator> Throw;
for(set<Bullet*>::iterator it=Ammo.begin;it!=Ammo.end;it++){
Bullet *New=*it;
MoveBullet(*New);
/*We can\'t erase it right away*/
if(!New->isExist)
Throw.push_back(it);
}
for(int i=0;i<int(Throw.size);i++)
Ammo.erase(Throw[i]);
}
int BEGINTIME;
int UFOAddBlood,UFOAddShotSpeed,UFOAddMoveSpeed,Added;
struct UFO{
/*
Shape of the UFO:
0000/0000
@@@
(OOO)
- 顺玩游戏 顺网游戏中心
- windows7网络和共享中心打不开 win7系统网络和共享中心打不开
- 森林控制台代码能给好友使用吗 森林控制台作弊码大全
- 汤尼简介 汤尼国际语言中心培训
- 广州汽车维修培训中心 广州汽车维修专业学校
- 天津流浪猫狗收容中心 天津狗狗网
- 英雄联盟头像领取中心 LOL领取头像
- 阿里巴巴将与俄罗斯出口中心联合推出俄产品对华出口项目
- 亚马逊电话 400 卓越亚马逊客服中心电话
- 12306铁路客户服务电话 全国铁路客户服务中心 12306官网
特别声明:本站内容均来自网友提供或互联网,仅供参考,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
