C++#include <bits/stdc++.h>
#include<stdlib.h>
#include<stdio.h>
#include<time.h>
#include<string.h>
#include<windows.h>
#include<conio.h>
#include<fstream>
#include<winsock.h>
#define LL long long
#define lL unsigned long long
#define ui unsigned
#define F(i, j, k) for (int i = j;i <= k;i++)
#define RF(i, j, k) for (int i = j;i >= k;i--)
#define line(n) for (int i = 1;i <= n;i++) cout << endl
#define space(i) cout << setw(i)
#define alt(x) MessageBox(NULL, x, name, MB_YESNO | MB_ICONINFORMATION)
#define OK(x) MessageBox(NULL, x, name, MB_OK)
#define SC(i) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), i)
#define Rt IDYES
#define Wr IDNO
#define Nocan say("开发中.......\n"), pa
#define cls system("cls")
#define pa system("pause")
#define add(x, y) stract(x, y);
using namespace std;
int sdtime = 20, sz = 10;
char filename[100] = "JNTM V0.0.1.txt";
char name[100] = "JNTM", place[100][100];
typedef BOOL (WINAPI *PROCSETCONSOLEFONT)(HANDLE, DWORD);
PROCSETCONSOLEFONT SetConsoleFont;
struct dot{
int x, y, f;
};
POINT Windowpos(){
POINT pt;
GetCursorPos(&pt);
HWND h=GetForegroundWindow();
ScreenToClient(h,&pt);
pt.x/=8;
pt.y/=16;
return pt;
}
void setsaid(){
system("cls");
printf("1.慢 2.超慢 3.正常 4.快 5.超快 6.极速\n");
int k;
cin >> k;
sdtime = abs(k - 6) * 10;
}
int rd(int x){
return rand() % x;
}
void hide(){
HANDLE h_GAME = GetStdHandle(STD_OUTPUT_HANDLE);
CONSOLE_CURSOR_INFO cursor_info;
GetConsoleCursorInfo(h_GAME,&cursor_info);
cursor_info.bVisible=false;
SetConsoleCursorInfo(h_GAME,&cursor_info);
}
void show()
{
HANDLE h_GAME =GetStdHandle(STD_OUTPUT_HANDLE);
CONSOLE_CURSOR_INFO cursor_info;
GetConsoleCursorInfo(h_GAME,&cursor_info);
cursor_info.bVisible=true;
SetConsoleCursorInfo(h_GAME,&cursor_info);
}
int toint(float a){return ((int)(a*10+5))/10;}
void gotoxy(float x,float y){int xx=toint(x),yy=toint(y);COORD pos;pos.X=xx*2,pos.Y=yy;SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE),pos);}
bool ctrlmouse(int cmaa,int cmbb,int cmcc,int cmdd){
int mouse;
mouse=GetAsyncKeyState(VK_LBUTTON)&0x8000;
POINT pt=Windowpos();
for(int i=cmaa;i<=cmbb;i++)
for(int j=cmcc;j<=cmdd;j++)
if(pt.y==i && pt.x==j && mouse) return true;
return false;
}
void mouseyi(){
int flag = 0;
hide();
for (int i = 1;i <= 10;i++){
POINT mouse;
bool k = GetCursorPos(&mouse);
int x = mouse.x, y = mouse.y;
if (x < 0) x = 0;if (y < 0) y = 0;
int xx = x / 128, yy = (y + 1) / 72;
for (int i = 0;i <= 10;i++){
for (int j = 0;j <= 10;j++)
if (i == yy and j == xx) cout << ".";
else cout << " ";
cout << endl;
}
cls;
}
}
void say(string s){
for (int i = 0;i < s.size();i++){
putchar(s[i]);
Sleep(sdtime);
}
}
void cl(){
gotoxy(0, 0);
F(i, 0, 100){
F(j, 0, 100) cout << setw(200);
cout << endl;
}
gotoxy(0, 0);
}
void init(){
gotoxy(5, 5);
sdtime = 50;
SC(9);say("量子霸主\n ");
Print
SC(4);say("Quantum ");
SC(11);say("Hegemon");
SC(10);system("cls");
}
int main()
{
srand((unsigned long long)time(NULL));
init();
return 0;
}