
文章插图
作者 | ixRic
责编 | 郭芮
出品 | CSDN博客
我终于决定还是把这个放出来 。
这是我在纪中颓废的时候写的 。
视频在这:
https://v.youku.com/v_show/id_XNDQxMTQwNDA3Mg==.html
【调度中心控制台 机场控制台游戏】

文章插图
具体信息主界面上都有写 。
按空格暂停 , 建议暂停后再升级属性 。
记录最高分的文件进行了加密 。
有boss(上面视频2分47秒) 。
挺好玩的 。
可能有bug , 不想改了 , 整体体验不错就行了 。
更多控制台操作可以看之前写的鼠标操作的文章(
https://blog.csdn.net/C20190102/article/details/79301667) , 也可以直接在这个上面复制 。
MinGW编译无错误 , 只有lld输出的几个警告 。

文章插图
只有一个文件 , 没有任何其他的东西 。
可以直接扒下来编译 。
一开始写的时候打了很多注释 , 后来就不想打了 。
大家凑合着看吧 , 不清楚的就评论 , 如果我还记得到就答一下哈 。
对了 , 为了防止暂停作弊 , 暂停过后开始时鼠标会回到飞机的位置 。
这个代码我一个人可能总共肝了20多个小时 , 如果你能帮我改得更有趣 , bug更少的话可以找我 。
更多内容看代码:
#include<set>
#include<cmath>
#include<ctime>
#include<cstdio>
#include<cstdlib>
#include<vector>
#include<windows.h>
#include<algorithm>
#include<iostream>
#include<conio.h>
#include<fstream>
using namespace std;
#define fblack 0
#define fblue 1
#define fgreen 2
#define fcyan 3
#define fred 4
#define fpurple 5
#define fyellow 6
#define fwhite 7
#define fgray 8
#define flight 8
#define bblack 0
#define bblue 16
#define bgreen 32
#define bcyan 48
#define bfred 64
#define bpurple 80
#define byellow 96
#define bwhite 112
#define bgray 128
#define blight 128
#define dirkey -32
#define upkey 72
#define downkey 80
#define leftkey 75
#define rightkey 77
#define wclear system("cls")
#define KEY_DOWN(VK_NONAME) ((GetAsyncKeyState(VK_NONAME) & 0x8000) ? 1:0)
#define LL long long
void flash(int times){
while(times--){
system("color 08");
Sleep(300);
system("color 80");
Sleep(300);
}
//Sleep(1000);
system("color 08");
}
void HindCursor{
HANDLE handle=GetStdHandle(STD_OUTPUT_HANDLE);
CONSOLE_CURSOR_INFO CursorInfo;
GetConsoleCursorInfo(handle,&CursorInfo);
CursorInfo.bVisible=false;
SetConsoleCursorInfo(handle,&CursorInfo);
}
struct Button{
int x,y,color;
const char *name;
int len;
};
void GetPos(POINT &pt){
HWND hwnd=GetForegroundWindow;
GetCursorPos(&pt);
ScreenToClient(hwnd,&pt);
pt.y=pt.y/16,pt.x=pt.x/8;
swap(pt.x,pt.y);
}
void color(int a){
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),a);
}
void gto(int x,int y){
COORD pos;pos.X=y;pos.Y=x;
SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE),pos);
}
Button NewButton(int x,int y,int color,const char *name){
Button t;
t.x=x,t.y=y,t.name=name;
t.color=color;
t.len=strlen(name);
return t;
}
bool Preserve(Button A){
gto(A.x,A.y),color(A.color),printf("%s",A.name);
POINT pt;
GetPos(pt);
if(pt.x==A.x&&(pt.y>=A.y&&pt.y<=A.y+A.len)){
- 顺玩游戏 顺网游戏中心
- windows7网络和共享中心打不开 win7系统网络和共享中心打不开
- 森林控制台代码能给好友使用吗 森林控制台作弊码大全
- 汤尼简介 汤尼国际语言中心培训
- 广州汽车维修培训中心 广州汽车维修专业学校
- 天津流浪猫狗收容中心 天津狗狗网
- 英雄联盟头像领取中心 LOL领取头像
- 阿里巴巴将与俄罗斯出口中心联合推出俄产品对华出口项目
- 亚马逊电话 400 卓越亚马逊客服中心电话
- 12306铁路客户服务电话 全国铁路客户服务中心 12306官网
特别声明:本站内容均来自网友提供或互联网,仅供参考,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
