C++ [项目] 愤怒的小鸟 支持Dev-C++5.11版本(务必调为英文输入法),基本操作看游戏里的介绍,怎么做的……懒得说,能看懂就看注释,没有的自己猜,如果你很固执……私我吧。

现在才发现C++游戏的支持率这么高,那就发几篇吧

零、前情提要

此篇为

制作,由于他没有CSDN,于是由我代发

一、基本介绍

        支持Dev-C++5.11版本(务必调为英文输入法),基本操作看游戏里的介绍,怎么做的……懒得说,能看懂就看注释,没有的自己猜,如果你很固执……私我吧

二、代码部分

#include 
#include 
#include 
#include 
#include 
using namespace std;
const double pi = 3.1415926536;
int toint (float a) {
	return ((int) (a * 10 + 5)) / 10;
}
void Color (int a) {
 if (a == 0 || a == 14 || a == 20) {
 	SetConsoleTextAttribute (GetStdHandle (STD_OUTPUT_HANDLE),
	FOREGROUND_INTENSITY|FOREGROUND_RED|FOREGROUND_GREEN|FOREGROUND_BLUE);
	} else if (a == 1 || a == 12) {
	SetConsoleTextAttribute (GetStdHandle (STD_OUTPUT_HANDLE),
	FOREGROUND_INTENSITY|FOREGROUND_GREEN|FOREGROUND_BLUE);
	} else if (a == 2) {
	SetConsoleTextAttribute (GetStdHandle (STD_OUTPUT_HANDLE),
	FOREGROUND_INTENSITY|FOREGROUND_GREEN);
	} else if (a == 3) {
	SetConsoleTextAttribute (GetStdHandle (STD_OUTPUT_HANDLE),
	FOREGROUND_INTENSITY|FOREGROUND_RED|FOREGROUND_BLUE);
	} else if (a == 4 || a == 11) {
	SetConsoleTextAttribute (GetStdHandle (STD_OUTPUT_HANDLE),
	FOREGROUND_INTENSITY|FOREGROUND_RED);
	} else if (a == 5 || a == 13) {
	SetConsoleTextAttribute (GetStdHandle (STD_OUTPUT_HANDLE),
	FOREGROUND_INTENSITY|FOREGROUND_RED|FOREGROUND_GREEN);
	} else if (a == 7) {
	SetConsoleTextAttribute (GetStdHandle (STD_OUTPUT_HANDLE),
	FOREGROUND_GREEN|FOREGROUND_BLUE);
	} else if (a == 15) {
	SetConsoleTextAttribute (GetStdHandle (STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY);
	} else if (a == 16) {
	SetConsoleTextAttribute (GetStdHandle (STD_OUTPUT_HANDLE), FOREGROUND_GREEN);
	} else if (a == 17) {
	SetConsoleTextAttribute (GetStdHandle (STD_OUTPUT_HANDLE), FOREGROUND_RED);
	} else if (a == 8) {
	SetConsoleTextAttribute (GetStdHandle (STD_OUTPUT_HANDLE), FOREGROUND_RED|FOREGROUND_GREEN|FOREGROUND_BLUE);
	} else if (a == 6) {
	SetConsoleTextAttribute (GetStdHandle (STD_OUTPUT_HANDLE),
	FOREGROUND_INTENSITY|FOREGROUND_BLUE);
	} else if (a == 9) {
	SetConsoleTextAttribute (GetStdHandle (STD_OUTPUT_HANDLE),
	FOREGROUND_INTENSITY|FOREGROUND_RED|BACKGROUND_RED|BACKGROUND_GREEN);
	}
}
void SetPos (float x, float y) {
 int xx = toint (x), yy = toint (y);
 COORD pos;
	pos.X = yy * 2;
	pos.Y = xx;
	SetConsoleCursorPosition (GetStdHandle (STD_OUTPUT_HANDLE), pos);
}
struct node {
 int W, W2, S, mS;
 float X, Y;
 float vx, vy;
 float ax, ay;
 bool go, boom;
} blt[100001], pig[100001], boo[100001];
int T, yX, yY, Xy, put, K, K2, Sle, What;
int Bot, Pit, Blt, Pig, Sco, pigk, scok;
int m[41][41];
void Cout (int a, int x, int y) {
 if (a == 1) {
 	SetPos (x, y);
	Color (5);
	cout 

如果觉得不错就点个赞吧

作者:liyuxi_shuijiao_ya原文地址:https://blog.csdn.net/ab603803/article/details/143150853

%s 个评论

要回复文章请先登录注册