Untitled

 avatar
unknown
plain_text
10 months ago
63 kB
0
Indexable
#include<iostream>
#include<conio.h>
using namespace std;
void clean_and_draw_border(char x[][150], int r, int c)
{

	for (int i = 0; i < 200; i++)
	{
		for (int j = 0; j < 150; j++)
		{
			x[i][j] = ' ';
		}
	}
	for (int i = r; i < r + 50; i++)
	{
		x[i][0] = 186;
		x[i][149] = 186;

	}
	for (int i = 1; i < 150; i++)
	{
		x[r + 0][i] = 205;
		x[r + 2][i] = 205;
		x[r + 49][i] = 205;
	}
	x[r][0] = 201;
	x[r + 2][0] = 204;
	x[r + 49][0] = 200;
	x[r][149] = 187;
	x[r + 2][149] = 185;
	x[r + 49][149] = 188;

}
void cout_to_screen(char x[][150], int l, int r, int c)
{
	system("cls");
	if (l == 1)
	{
		for (int i = r; i < r + 50; i++)
		{
			for (int j = 0; j < 150; j++)
			{
				cout << x[i][j];
			}
			cout << endl;
		}
	}

}
void draw_stats(char x[][150], int hlr, int hlc, int r, int c, int reload, int herohearts)
{
	x[r + hlr][hlc] = 'H';
	x[r + hlr][hlc + 1] = 'E';
	x[r + hlr][hlc + 2] = 'A';
	x[r + hlr][hlc + 3] = 'L';
	x[r + hlr][hlc + 4] = 'T';
	x[r + hlr][hlc + 5] = 'H';
	x[r + hlr][hlc + 6] = '=';
	for (int i = 0; i < herohearts; i++)
	{
		x[r + hlr][hlc + 7 + i] = '0';
	}
	x[r + hlr][hlc + 12] = 'B';
	x[r + hlr][hlc + 13] = 'U';
	x[r + hlr][hlc + 14] = 'L';
	x[r + hlr][hlc + 15] = 'L';
	x[r + hlr][hlc + 16] = 'E';
	x[r + hlr][hlc + 17] = 'T';
	x[r + hlr][hlc + 18] = '=';
	if (reload == 5)
	{
		x[r + hlr][hlc + 19] = '5';
	}
	if (reload == 4)
	{
		x[r + hlr][hlc + 19] = '4';
	}
	if (reload == 3)
	{
		x[r + hlr][hlc + 19] = '3';
	}
	if (reload == 2)
	{
		x[r + hlr][hlc + 19] = '2';
	}
	if (reload == 1)
	{
		x[r + hlr][hlc + 19] = '1';
	}
	if (reload == 0)
	{
		x[r + hlr][hlc + 19] = '0';
	}
}
void draw_l1(char x[][150], int rl)
{
	for (int i = 1; i < 135; i++)
	{
		x[rl][i] = 205;
		x[rl + 1][i] = 178;
		x[rl + 2][i] = 178;
		x[rl + 3][i] = 205;
	}
	for (int i = 146; i < 149; i++)
	{
		x[rl][i] = 205;
		x[rl + 1][i] = 178;
		x[rl + 2][i] = 178;
		x[rl + 3][i] = 205;
	}
}
void draw_l2(char x[][150], int rl)
{
	for (int i = 148; i > 16; i--)
	{
		x[rl][i] = 205;
		x[rl + 1][i] = 178;
		x[rl + 2][i] = 178;
		x[rl + 3][i] = 205;
	}
	for (int i = 3; i >= 1; i--)
	{
		x[rl][i] = 205;
		x[rl + 1][i] = 178;
		x[rl + 2][i] = 178;
		x[rl + 3][i] = 205;
	}

}
void draw_l3(char x[][150], int rl)
{
	for (int i = 148; i > 25; i--)
	{
		x[rl][i] = 205;
		x[rl + 1][i] = 178;
		x[rl + 2][i] = 178;
		x[rl + 3][i] = 205;
	}
	for (int i = 12; i >= 1; i--)
	{
		x[rl][i] = 205;
		x[rl + 1][i] = 178;
		x[rl + 2][i] = 178;
		x[rl + 3][i] = 205;
	}

}
void draw_elevator(char x[][150], int celevator, int relevator)
{
	int r = relevator;
	for (int c = celevator; c > 12; c--)
	{
		x[r][c] = '-';
	}

}
void move_elevator(int& relevator, int& dir)
{
	if (dir == 1)
	{
		if (relevator + 1 == 150)
		{
			dir = -1;
		}
	}
	if (dir == -1)
	{
		if (relevator == 100)
		{
			dir = 1;
		}
	}
	relevator += dir;

}
void draw_ladder(char x[][150], int rladder, int cladder, int rl)
{
	for (int i = rladder; i < rl; i++)
	{
		x[i][135] = '|';
		x[i][146] = '|';
		for (int c = cladder + 1; c < 146; c++)
		{
			x[i][c] = '-';
		}

	}
}
void draw_ladder2(char x[][150], int rladder, int cladder, int rl)
{
	for (int i = rladder; i < rl; i++)
	{
		x[i][16] = '|';
		x[i][4] = '|';
		for (int c = cladder + 1; c < 16; c++)
		{
			x[i][c] = '-';
		}

	}
}
void draw_fire(char x[][150], int rfire, int cfire, int i)
{
	if (i % 2 == 0)
	{
		for (int i = cfire; i < 110; i += 4)
		{
			x[rfire - 1][i] = '(';
			x[rfire - 1][i + 1] = '_';
			x[rfire - 1][i + 2] = ',';
			x[rfire - 1][i + 3] = ')';
			x[rfire - 2][i + 1] = ')';
			x[rfire - 2][i + 2] = '(';
			x[rfire - 2][i + 3] = ',';
			x[rfire - 3][i + 2] = '.';
			x[rfire - 3][i + 1] = ')';
			x[rfire - 4][i + 2] = '(';
			x[rfire][i] = '^';
			x[rfire][i + 1] = '^';
			x[rfire][i + 2] = '^';
			x[rfire][i + 3] = '^';
		}
	}
	if (i % 2 != 0)
	{
		for (int i = cfire; i < 110; i += 4)
		{
			x[rfire - 1][i] = '(';
			x[rfire - 1][i + 1] = '_';
			x[rfire - 1][i + 2] = ',';
			x[rfire - 1][i + 3] = ')';
			x[rfire - 2][i + 1] = ')';
			x[rfire - 2][i + 2] = '(';
			x[rfire - 2][i + 3] = ',';
			x[rfire - 3][i + 2] = '(';
			x[rfire - 3][i + 1] = ',';
			x[rfire][i] = '^';
			x[rfire][i + 1] = '^';
			x[rfire][i + 2] = '^';
			x[rfire][i + 3] = '^';
		}
	}

}
void fire_kill_hero(char x[][150], int& rhero, int& chero)
{
	if (x[rhero + 1][chero] == ')' || x[rhero + 1][chero] == '(' || x[rhero + 1][chero] == '.' || x[rhero + 1][chero] == ',' || x[rhero + 1][chero + 1] == ')' || x[rhero + 1][chero + 1] == '(' || x[rhero + 1][chero + 1] == '.' || x[rhero + 1][chero + 1] == ',' || x[rhero + 1][chero + 7] == ')' || x[rhero + 1][chero + 7] == '(' || x[rhero + 1][chero + 7] == '.' || x[rhero + 1][chero + 7] == ',' || x[rhero + 1][chero + 8] == ')' || x[rhero + 1][chero + 8] == '(' || x[rhero + 1][chero + 8] == '.' || x[rhero + 1][chero + 8] == ',')
	{
		rhero = 24;
		chero = 2;
	}
}
void draw_slem(char x[][150], int rslem, int cslem)
{
	x[rslem][cslem] = 202;
	x[rslem - 1][cslem] = 201;
	x[rslem - 1][cslem + 1] = 205;
	x[rslem - 1][cslem + 2] = 205;
	x[rslem - 1][cslem + 3] = 205;
	x[rslem - 1][cslem + 4] = 188;
	x[rslem - 2][cslem + 4] = 201;
	x[rslem - 2][cslem + 5] = 205;
	x[rslem - 2][cslem + 6] = 205;
	x[rslem - 2][cslem + 7] = 205;
	x[rslem - 2][cslem + 8] = 188;
	x[rslem - 3][cslem + 8] = 201;
	x[rslem - 3][cslem + 9] = 205;
	x[rslem - 3][cslem + 10] = 205;
	x[rslem - 3][cslem + 10] = 205;
	x[rslem - 3][cslem + 11] = 188;
	x[rslem - 4][cslem + 11] = 201;
	x[rslem - 4][cslem + 12] = 205;
	x[rslem - 4][cslem + 13] = 205;
	x[rslem - 4][cslem + 14] = 187;
	for (int i = 3; i > 0; i--)
	{
		x[rslem - i][cslem + 14] = 186;

	}
	x[rslem][cslem + 14] = 202;
}
void draw_slem_2(char x[][150], int rslem, int cslem)
{
	x[rslem][cslem] = 202;
	x[rslem - 1][cslem] = 186;
	x[rslem - 2][cslem] = 186;
	x[rslem - 3][cslem] = 201;
	x[rslem - 3][cslem + 1] = 205;
	x[rslem - 3][cslem + 2] = 205;
	x[rslem - 3][cslem + 3] = 187;
	x[rslem - 2][cslem + 3] = 200;
	x[rslem - 2][cslem + 4] = 205;
	x[rslem - 2][cslem + 5] = 187;
	x[rslem - 1][cslem + 5] = 200;
	x[rslem - 1][cslem + 6] = 205;
	x[rslem - 1][cslem + 7] = 187;
	x[rslem][cslem + 7] = 202;
}
void draw_selim(char x[][150], int rselim, int cselim)
{
	x[rselim][cselim] = 200;
	x[rselim][cselim + 1] = 205;
	x[rselim][cselim + 2] = 205;
	x[rselim][cselim + 3] = 205;
	x[rselim][cselim + 4] = 205;
	x[rselim][cselim + 5] = 205;
	x[rselim][cselim + 6] = 205;
	x[rselim][cselim + 7] = 205;
	x[rselim][cselim + 8] = 205;
	x[rselim][cselim + 9] = 205;
	x[rselim][cselim + 10] = 205;
	x[rselim][cselim + 11] = 188;
	x[rselim - 1][cselim] = 201;
	x[rselim - 1][cselim + 1] = '=';
	x[rselim - 1][cselim + 2] = '=';
	x[rselim - 1][cselim + 3] = '=';
	x[rselim - 1][cselim + 4] = '=';
	x[rselim - 1][cselim + 5] = '=';
	x[rselim - 1][cselim + 6] = '=';
	x[rselim - 1][cselim + 7] = '=';
	x[rselim - 1][cselim + 8] = '=';
	x[rselim - 1][cselim + 9] = '=';
	x[rselim - 1][cselim + 10] = '=';
	x[rselim - 1][cselim + 11] = 187;
}
void move_hero_on_platform(char x[][150], int& dir, int& rhero, int& chero)
{

	if (x[rhero + 1][chero + 1] == '=' || x[rhero + 1][chero] == '=' || x[rhero + 1][chero + 2] == '=' || x[rhero + 1][chero + 3] == '=' || x[rhero + 1][chero + 4] == '=' || x[rhero + 1][chero + 5] == '=')
	{
		if (dir == 1)
		{
			chero++;
		}
		if (dir == -1)
		{
			chero--;
		}
	}
}
void move_selim(char x[][150], int& rselim, int& cselim, int& dirs)
{
	if (dirs == 1)
	{
		if (cselim + 5 == 110)
		{
			dirs = -1;
		}
	}
	if (dirs == -1)
	{
		if (cselim == 38)
		{
			dirs = 1;
		}
	}
	cselim += dirs;
}
void draw_zomie(char x[][150], int rzombie, int czombie, int dirz, int zombieh)
{
	if (zombieh > 0)
	{
		if (dirz == -1)
		{
			x[rzombie][czombie] = '|';
			x[rzombie][czombie - 1] = '\\';
			x[rzombie][czombie - 4] = '|';
			x[rzombie][czombie - 5] = '\\';
			x[rzombie - 1][czombie - 1] = '\\';
			x[rzombie - 1][czombie - 2] = '\\';
			x[rzombie - 1][czombie - 4] = '/';
			x[rzombie - 1][czombie - 5] = '/';
			x[rzombie - 2][czombie - 1] = '|';
			x[rzombie - 2][czombie - 2] = '|';
			x[rzombie - 2][czombie - 3] = '/';
			x[rzombie - 2][czombie - 4] = '/';
			x[rzombie - 2][czombie - 5] = '/';
			x[rzombie - 2][czombie - 6] = '|';
			x[rzombie - 2][czombie - 7] = '/';
			x[rzombie - 2][czombie - 8] = '|';
			x[rzombie - 3][czombie - 1] = '|';
			x[rzombie - 3][czombie - 5] = '/';
			x[rzombie - 3][czombie - 6] = '/';
			x[rzombie - 3][czombie - 7] = '/';
			x[rzombie - 3][czombie - 8] = '/';
			x[rzombie - 4][czombie - 1] = '|';
			x[rzombie - 4][czombie - 5] = '|';
			x[rzombie - 4][czombie - 6] = '|';
			x[rzombie - 4][czombie - 7] = '\\';
			x[rzombie - 5][czombie - 2] = '\\';
			x[rzombie - 5][czombie - 7] = '/';
			x[rzombie - 5][czombie - 8] = '\\';
			x[rzombie - 6][czombie - 3] = '\\';
			x[rzombie - 6][czombie - 8] = 232;
			x[rzombie - 6][czombie - 9] = '\\';
			x[rzombie - 7][czombie - 4] = '_';
			x[rzombie - 7][czombie - 5] = '\\';
			x[rzombie - 7][czombie - 9] = '/';
			x[rzombie - 8][czombie - 6] = '_';
			x[rzombie - 8][czombie - 7] = '_';
			x[rzombie - 8][czombie - 8] = '_';
			for (int i = 0; i < zombieh; i++)
			{
				x[rzombie - 9][czombie - 5 - i] = 254;
			}
		}
		if (dirz == 1)
		{
			x[rzombie][czombie] = '|';
			x[rzombie][czombie + 1] = '/';
			x[rzombie][czombie + 4] = '|';
			x[rzombie][czombie + 5] = '/';
			x[rzombie - 1][czombie + 1] = '/';
			x[rzombie - 1][czombie + 2] = '/';
			x[rzombie - 1][czombie + 4] = '/';
			x[rzombie - 1][czombie + 5] = '/';
			x[rzombie - 2][czombie + 1] = '|';
			x[rzombie - 2][czombie + 2] = '|';
			x[rzombie - 2][czombie + 3] = '\\';
			x[rzombie - 2][czombie + 4] = '\\';
			x[rzombie - 2][czombie + 5] = '\\';
			x[rzombie - 2][czombie + 6] = '|';
			x[rzombie - 2][czombie + 7] = '\\';
			x[rzombie - 2][czombie + 8] = '|';
			x[rzombie - 3][czombie + 1] = '|';
			x[rzombie - 3][czombie + 5] = '\\';
			x[rzombie - 3][czombie + 6] = '\\';
			x[rzombie - 3][czombie + 7] = '\\';
			x[rzombie - 3][czombie + 8] = '\\';
			x[rzombie - 4][czombie + 1] = '|';
			x[rzombie - 4][czombie + 5] = '|';
			x[rzombie - 4][czombie + 6] = '|';
			x[rzombie - 4][czombie + 7] = '\\';
			x[rzombie - 5][czombie + 2] = '/';
			x[rzombie - 5][czombie + 7] = '\\';
			x[rzombie - 5][czombie + 8] = '/';
			x[rzombie - 6][czombie + 3] = '/';
			x[rzombie - 6][czombie + 8] = 232;
			x[rzombie - 6][czombie + 9] = '/';
			x[rzombie - 7][czombie + 4] = '_';
			x[rzombie - 7][czombie + 5] = '/';
			x[rzombie - 7][czombie + 9] = '\\';
			x[rzombie - 8][czombie + 6] = '_';
			x[rzombie - 8][czombie + 7] = '_';
			x[rzombie - 8][czombie + 8] = '_';
			for (int i = 0; i < zombieh; i++)
			{
				x[rzombie - 9][czombie + 5 + i] = 254;

			}
		}
	}
}
void draw_hero(char x[][150], int rhero, int chero, int gunf, int direh)
{
	if (gunf == 0)
	{
		x[rhero][chero] = '(';
		x[rhero][chero + 1] = '_';
		x[rhero][chero + 2] = '_';
		x[rhero][chero + 3] = '|';
		x[rhero][chero + 5] = '|';
		x[rhero][chero + 7] = '_';
		x[rhero][chero + 6] = '_';
		x[rhero][chero + 8] = ')';
		x[rhero - 1][chero + 1] = '_';
		x[rhero - 1][chero + 2] = '|';
		x[rhero - 1][chero + 3] = '|';
		x[rhero - 1][chero + 5] = '|';
		x[rhero - 1][chero + 6] = '|';
		x[rhero - 1][chero + 7] = '_';
		x[rhero - 2][chero + 2] = '(';
		x[rhero - 2][chero + 3] = '|';
		x[rhero - 2][chero + 5] = '|';
		x[rhero - 2][chero + 6] = ')';
		x[rhero - 3][chero + 1] = '<';
		x[rhero - 3][chero + 2] = '|';
		x[rhero - 3][chero + 3] = '|';
		x[rhero - 3][chero + 4] = '^';
		x[rhero - 3][chero + 5] = '|';
		x[rhero - 3][chero + 6] = '|';
		x[rhero - 3][chero + 7] = '>';
		x[rhero - 4][chero] = '\\';
		x[rhero - 4][chero + 1] = '\\';
		x[rhero - 4][chero + 2] = '|';
		x[rhero - 4][chero + 3] = '=';
		x[rhero - 4][chero + 4] = '=';
		x[rhero - 4][chero + 5] = '=';
		x[rhero - 4][chero + 6] = '|';
		x[rhero - 4][chero + 7] = '/';
		x[rhero - 4][chero + 8] = '/';
		x[rhero - 5][chero] = '/';
		x[rhero - 5][chero + 1] = '/';
		x[rhero - 5][chero + 2] = '|';
		x[rhero - 5][chero + 4] = 237;
		x[rhero - 5][chero + 6] = '|';
		x[rhero - 5][chero + 7] = '\\';
		x[rhero - 5][chero + 8] = '\\';
		x[rhero - 6][chero + 1] = '_';
		x[rhero - 6][chero + 2] = '_';
		x[rhero - 6][chero + 4] = '_';
		x[rhero - 6][chero + 6] = '_';
		x[rhero - 6][chero + 7] = '_';
		x[rhero - 6][chero + 3] = '`';
		x[rhero - 6][chero + 5] = ',';
		x[rhero - 7][chero + 2] = '\\';
		x[rhero - 7][chero + 4] = '=';
		x[rhero - 7][chero + 6] = '/';
		x[rhero - 8][chero + 2] = '/';
		x[rhero - 8][chero + 3] = 'e';
		x[rhero - 8][chero + 5] = 'e';
		x[rhero - 8][chero + 6] = '\\';
		x[rhero - 9][chero + 3] = '.';
		x[rhero - 9][chero + 4] = '"';
		x[rhero - 9][chero + 5] = '.';
	}
	if (gunf == 1)
	{
		if (direh == 0)
		{
			x[rhero][chero] = '(';
			x[rhero][chero + 1] = '_';
			x[rhero][chero + 2] = '_';
			x[rhero][chero + 3] = '|';
			x[rhero][chero + 5] = '|';
			x[rhero][chero + 7] = '_';
			x[rhero][chero + 6] = '_';
			x[rhero][chero + 8] = ')';
			x[rhero - 1][chero + 1] = '_';
			x[rhero - 1][chero + 2] = '|';
			x[rhero - 1][chero + 3] = '|';
			x[rhero - 1][chero + 5] = '|';
			x[rhero - 1][chero + 6] = '|';
			x[rhero - 1][chero + 7] = '_';
			x[rhero - 2][chero + 2] = '(';
			x[rhero - 2][chero + 3] = '|';
			x[rhero - 2][chero + 5] = '|';
			x[rhero - 2][chero + 6] = ')';
			x[rhero - 3][chero + 1] = '<';
			x[rhero - 3][chero + 2] = '|';
			x[rhero - 3][chero + 3] = '|';
			x[rhero - 3][chero + 4] = '^';
			x[rhero - 3][chero + 5] = '|';
			x[rhero - 3][chero + 6] = '|';
			x[rhero - 4][chero] = '\\';
			x[rhero - 4][chero + 1] = '\\';
			x[rhero - 4][chero + 2] = '|';
			x[rhero - 4][chero + 3] = '=';
			x[rhero - 4][chero + 4] = '=';
			x[rhero - 4][chero + 5] = '=';
			x[rhero - 4][chero + 6] = '|';
			x[rhero - 5][chero] = '/';
			x[rhero - 5][chero + 1] = '/';
			for (int i = 0; i < 4; i++)
			{
				x[rhero - 5][chero + 7 + i] = '-';
			}
			x[rhero - 5][chero + 2] = '|';
			x[rhero - 5][chero + 4] = 237;
			x[rhero - 5][chero + 6] = '|';
			x[rhero - 6][chero + 1] = '_';
			x[rhero - 6][chero + 2] = '_';
			x[rhero - 6][chero + 4] = '_';
			x[rhero - 6][chero + 6] = '_';
			x[rhero - 6][chero + 7] = '_';
			x[rhero - 6][chero + 8] = '_';
			x[rhero - 6][chero + 9] = '_';
			x[rhero - 5][chero + 10] = '/';
			for (int i = 0; i < 1; i++)
			{
				x[rhero - 4][chero + 10 + i] = '"';
			}
			x[rhero - 5][chero + 11] = '/';
			for (int i = 0; i < 4; i++)
			{
				x[rhero - 6][chero + 11 + i] = '_';
			}
			x[rhero - 5][chero + 14] = 217;
			for (int i = 0; i < 2; i++)
			{
				x[rhero - 5][chero + 12 + i] = '-';
			}
			x[rhero - 6][chero + 3] = '`';
			x[rhero - 6][chero + 5] = ',';
			x[rhero - 7][chero + 2] = '\\';
			x[rhero - 7][chero + 4] = '=';
			x[rhero - 7][chero + 6] = '/';
			x[rhero - 8][chero + 2] = '/';
			x[rhero - 8][chero + 3] = 'e';
			x[rhero - 8][chero + 5] = 'e';
			x[rhero - 8][chero + 6] = '\\';
			x[rhero - 9][chero + 3] = '.';
			x[rhero - 9][chero + 4] = '"';
			x[rhero - 9][chero + 5] = '.';
		}
		if (direh == 1)
		{
			x[rhero][chero] = ')';
			x[rhero][chero - 1] = '_';
			x[rhero][chero - 2] = '_';
			x[rhero][chero - 3] = '|';
			x[rhero][chero - 5] = '|';
			x[rhero][chero - 7] = '_';
			x[rhero][chero - 6] = '_';
			x[rhero][chero - 8] = '(';
			x[rhero - 1][chero - 1] = '_';
			x[rhero - 1][chero - 2] = '|';
			x[rhero - 1][chero - 3] = '|';
			x[rhero - 1][chero - 5] = '|';
			x[rhero - 1][chero - 6] = '|';
			x[rhero - 1][chero - 7] = '_';
			x[rhero - 2][chero - 2] = ')';
			x[rhero - 2][chero - 3] = '|';
			x[rhero - 2][chero - 5] = '|';
			x[rhero - 2][chero - 6] = '(';
			x[rhero - 3][chero - 1] = '>';
			x[rhero - 3][chero - 2] = '|';
			x[rhero - 3][chero - 3] = '|';
			x[rhero - 3][chero - 4] = '^';
			x[rhero - 3][chero - 5] = '|';
			x[rhero - 3][chero - 6] = '|';
			x[rhero - 4][chero] = '/';
			x[rhero - 4][chero - 1] = '/';
			x[rhero - 4][chero - 2] = '|';
			x[rhero - 4][chero - 3] = '=';
			x[rhero - 4][chero - 4] = '=';
			x[rhero - 4][chero - 5] = '=';
			x[rhero - 4][chero - 6] = '|';
			x[rhero - 5][chero] = '\\';
			x[rhero - 5][chero - 1] = '\\';
			for (int i = 0; i < 4; i++)
			{
				x[rhero - 5][chero - 7 - i] = '-';
			}
			x[rhero - 5][chero - 2] = '|';
			x[rhero - 5][chero - 4] = 237;
			x[rhero - 5][chero - 6] = '|';
			x[rhero - 6][chero - 1] = '_';
			x[rhero - 6][chero - 2] = '_';
			x[rhero - 6][chero - 4] = '_';
			x[rhero - 6][chero - 6] = '_';
			x[rhero - 6][chero - 7] = '_';
			x[rhero - 6][chero - 8] = '_';
			x[rhero - 6][chero - 9] = '_';
			x[rhero - 5][chero - 10] = '\\';
			for (int i = 0; i < 1; i++)
			{
				x[rhero - 4][chero - 10 - i] = '"';
			}
			x[rhero - 5][chero - 11] = '\\';
			for (int i = 0; i < 4; i++)
			{
				x[rhero - 6][chero - 11 - i] = '_';
			}
			x[rhero - 5][chero - 14] = 217;
			for (int i = 0; i < 2; i++)
			{
				x[rhero - 5][chero - 12 - i] = '-';
			}
			x[rhero - 6][chero - 3] = '`';
			x[rhero - 6][chero - 5] = ',';
			x[rhero - 7][chero - 2] = '/';
			x[rhero - 7][chero - 4] = '=';
			x[rhero - 7][chero - 6] = '\\';
			x[rhero - 8][chero - 2] = '\\';
			x[rhero - 8][chero - 3] = 'a';
			x[rhero - 8][chero - 5] = 'a';
			x[rhero - 8][chero - 6] = '/';
			x[rhero - 9][chero - 3] = '.';
			x[rhero - 9][chero - 4] = '"';
			x[rhero - 9][chero - 5] = '.';
		}
	}
}
void move_hero(char x[][150], char dirh, int& rhero, int& chero, int& gunf, int fjump, int& r, int& direh, int jumpct)
{
	int posr = 7;
	int posc = 1;
	int flag = 1;
	if (dirh == 'd')
	{
		direh = 0;
		if (x[rhero][chero + 9] == ' ' || x[rhero][chero + 9] == '|' || x[rhero][chero + 9] == '-')
		{
			chero++;

		}

		if (x[rhero - 1][chero + 5] == 'O')
		{

			gunf = 1;
			x[6][10] = ' ';
		}
	}
	if (dirh == 'a')
	{
		if (x[rhero][chero - 9] == ' ' || x[rhero][chero - 9] == '|' || x[rhero][chero - 9] == '-')
		{
			chero--;

		}
		dirh = 1;
	}
	if (fjump == 0)
	{
		if (dirh == 'q')
		{
			if (jumpct > 0)
			{
				if (x[rhero - 10][chero - 2] == ' ' || x[rhero - 10][chero - 2] == '|' || x[rhero - 10][chero - 2] == '-')
				{
					rhero--;
					chero -= 2;
					if (r > 0)
					{
						r--;
					}
				}
			}
		}
		if (dirh == 'e')
		{
			if (jumpct > 0)
			{
				if (x[rhero - 10][chero + 6] == ' ' || x[rhero - 10][chero + 6] == '|' || x[rhero - 10][chero + 6] == '-')
				{

					rhero--;
					chero += 2;
					if (r > 0)
					{
						r--;
					}


				}
			}

		}
		if (dirh == 'w')
		{
			if (jumpct > 0)
			{
				if (x[rhero - 10][chero] == ' ')//|| x[rhero + 3][chero] == '-')
				{
					rhero--;
					if (r > 0)
					{
						r--;
					}

				}
			}

		}
	}
	if (dirh == 's')
	{
		if (x[rhero + 1][chero] == '-')
		{
			rhero++;
			if (r < 200)
			{
				r++;
			}
		}
	}

}
void _gravity(char x[][150], int& rhero, int& chero, int& fjump, int& r, int jumpct)
{
	if (x[rhero + 1][chero] == ' ' && x[rhero + 1][chero + 1] == ' ' && x[rhero + 1][chero + 2] == ' ')
	{
		if (jumpct == 0)
		{
			rhero++;
			r++;
			fjump = 0;
		}
	}
	if (x[rhero + 1][chero] != ' ' && x[rhero + 1][chero + 1] != ' ' && x[rhero + 1][chero + 2] != ' ')
	{
		fjump = 0;
	}

}
void move_zombie(char x[][150], int rzombie, int& czombie, int& dirz)
{
	if (dirz == 1)
	{
		if (czombie + 24 == 148)//||x[rzombie-7][czombie+10]!=' ')
		{
			dirz = -1;
		}
	}
	if (dirz == -1)
	{
		if (czombie == 20) //|| x[rzombie - 7][czombie - 10] != ' ')
		{
			dirz = 1;
		}
	}
	czombie += dirz;
}
void draw_laser_machine(char x[][150], int rlaser, int claser, int ctflag)
{
	if (ctflag == 1)
	{

		for (int i = 0; i < 2; i++)
		{
			x[rlaser][claser + i] = '_';
		}
		x[rlaser + 1][claser + 2] = '\\';
		x[rlaser + 1][claser + 3] = '_';
		x[rlaser + 2][claser + 4] = '|';
		x[rlaser + 2][claser + 5] = '_';
		for (int i = 0; i < 3; i++)
		{
			x[rlaser + 3 + i][claser + 6] = '|';
		}
		x[rlaser + 6][claser + 7] = '\\';
		x[rlaser + 7][claser + 8] = '\\';
		x[rlaser + 8][claser + 8] = '/';
		x[rlaser + 9][claser + 7] = '/';
		for (int i = 0; i < 3; i++)
		{
			x[rlaser + 10 + i][claser + 6] = '|';
		}
		x[rlaser + 12][claser + 5] = '_';
		x[rlaser + 13][claser + 4] = '|';
		x[rlaser + 13][claser + 3] = '_';
		x[rlaser + 14][claser + 2] = '/';
		for (int i = 0; i < 2; i++)
		{
			x[rlaser + 15][claser + i] = '_';
		}
	}
	if (ctflag == 0)
	{
		for (int i = 0; i < 2; i++)
		{
			x[rlaser][claser + i] = '_';
		}
		x[rlaser + 1][claser + 2] = '\\';
		x[rlaser + 1][claser + 3] = '_';
		x[rlaser + 2][claser + 4] = '|';
		x[rlaser + 2][claser + 5] = '_';
		for (int i = 0; i < 3; i++)
		{
			x[rlaser + 3 + i][claser + 6] = '|';
		}
		x[rlaser + 5][claser + 7] = '_';
		x[rlaser + 5][claser + 8] = '_';
		x[rlaser + 9][claser + 8] = '_';
		x[rlaser + 9][claser + 7] = '_';
		for (int i = 0; i < 3; i++)
		{
			x[rlaser + 10 + i][claser + 6] = '|';
		}
		x[rlaser + 12][claser + 5] = '_';
		x[rlaser + 13][claser + 4] = '|';
		x[rlaser + 13][claser + 3] = '_';
		x[rlaser + 14][claser + 2] = '/';
		for (int i = 0; i < 2; i++)
		{
			x[rlaser + 15][claser + i] = '_';
		}
	}
}
void draw_laser(char x[][150], int rlaser, int claser, int ctflag, int& ct)
{
	if (ctflag == 0)
	{
		for (int i = 0; i < 140; i++)
		{
			x[rlaser + 7][claser + i] = 183;
			x[rlaser + 8][claser + i] = 189;
		}
		ct++;
	}
}
void draw_traps(char x[][150], int rtraps, int ctraps, int ctflag)
{
	if (ctflag == 1)
	{
		for (int i = 0; i < 5; i++)
		{
			x[rtraps][ctraps + i] = 193;
		}
	}
}
void draw_enemy(char x[][150], int& enemyr, int& enemyc, int dire,int &enemyhealth)
{
	if (dire == -1)
	{
		x[enemyr - 1][enemyc - 1] = '(';
		for (int i = 0; i < 7; i++)
		{
			x[enemyr - 1][enemyc + i] = '0';
		}
		x[enemyr - 1][enemyc + 7] = ')';
		x[enemyr - 2][enemyc + 1] = '(';
		x[enemyr - 2][enemyc + 2] = '_';
		x[enemyr - 2][enemyc + 3] = '|';
		x[enemyr - 2][enemyc + 4] = '_';
		x[enemyr - 2][enemyc + 5] = ')';
		x[enemyr - 3][enemyc + 2] = '/';
		x[enemyr - 3][enemyc + 3] = '|';
		x[enemyr - 3][enemyc + 4] = '\\';
		x[enemyr - 4][enemyc + 2] = '_';
		x[enemyr - 4][enemyc + 1] = '\\';
		x[enemyr - 4][enemyc + 3] = 'I';
		x[enemyr - 4][enemyc + 4] = '_';
		x[enemyr - 4][enemyc + 5] = '/';
		x[enemyr - 5][enemyc + 1] = '____';
		x[enemyr - 5][enemyc + 2] = '_';
		x[enemyr - 5][enemyc + 4] = '____';
		x[enemyr - 5][enemyc + 5] = '__';
		x[enemyr - 5][enemyc + 3] = '.';
		x[enemyr - 5][enemyc] = '|';
		x[enemyr - 5][enemyc + 6] = '|';
		for (int i = 0; i < 7; i++)
		{
			x[enemyr - 6][enemyc + i] = '_';
		}
		x[enemyr - 6][enemyc - 1] = '\\';
		x[enemyr - 6][enemyc - 2] = '/';
		x[enemyr - 6][enemyc - 3] = '/';
		x[enemyr - 6][enemyc + 7] = '/';
		x[enemyr - 6][enemyc + 8] = '\\';
		x[enemyr - 6][enemyc + 9] = '\\';
		x[enemyr - 7][enemyc + 8] = '__';
		x[enemyr - 7][enemyc + 7] = '\\';
		x[enemyr - 7][enemyc + 9] = ')';
		x[enemyr - 7][enemyc - 1] = '/';
		x[enemyr - 7][enemyc - 2] = '__';
		x[enemyr - 7][enemyc - 3] = '(';
		for (int i = 0; i < 3; i++)
		{
			x[enemyr - 8][enemyc - 2 + i] = '_';
		}
		x[enemyr - 8][enemyc + 1] = '|';
		x[enemyr - 8][enemyc + 2] = '0';
		x[enemyr - 8][enemyc + 4] = '0';
		x[enemyr - 8][enemyc + 5] = '|';
		for (int i = 0; i < 3; i++)
		{
			x[enemyr - 8][enemyc + 6 + i] = '_';
		}
		x[enemyr - 9][enemyc + 5] = '.';
		x[enemyr - 9][enemyc + 1] = '.';
		x[enemyr - 9][enemyc + 2] = '`';
		x[enemyr - 10][enemyc + 3] = '__';
		x[enemyr - 9][enemyc + 4] = '`';
		x[enemyr - 5][enemyc + 8] = '<';
		x[enemyr - 5][enemyc + 10] = '>';
		x[enemyr - 4][enemyc + 8] = '/';
		x[enemyr - 4][enemyc + 9] = '/';
		x[enemyr - 3][enemyc + 8] = '^';
		x[enemyr - 3][enemyc + 9] = '^';
		x[enemyr - 5][enemyc - 3] = '/';
		x[enemyr - 5][enemyc - 4] = '\\';
		x[enemyr - 6][enemyc - 4] = '\\';
		x[enemyr - 6][enemyc - 5] = '\\';
		x[enemyr - 7][enemyc - 5] = ']';
		x[enemyr - 7][enemyc - 6] = '>';
	}
	if (dire == 1)
	{
		x[enemyr - 1][enemyc + 1] = ')';
		for (int i = 0; i < 7; i++)
		{
			x[enemyr - 1][enemyc - i] = '0';
		}
		x[enemyr - 1][enemyc - 7] = '(';
		x[enemyr - 2][enemyc - 1] = ')';
		x[enemyr - 2][enemyc - 2] = '_';
		x[enemyr - 2][enemyc - 3] = '|';
		x[enemyr - 2][enemyc - 4] = '_';
		x[enemyr - 2][enemyc - 5] = '(';
		x[enemyr - 3][enemyc - 2] = '\\';
		x[enemyr - 3][enemyc - 3] = '|';
		x[enemyr - 3][enemyc - 4] = '/';
		x[enemyr - 4][enemyc - 2] = '_';
		x[enemyr - 4][enemyc - 1] = '/';
		x[enemyr - 4][enemyc - 3] = 'I';
		x[enemyr - 4][enemyc - 4] = '_';
		x[enemyr - 4][enemyc - 5] = '\\';
		x[enemyr - 5][enemyc - 1] = '____';
		x[enemyr - 5][enemyc - 2] = '___';
		x[enemyr - 5][enemyc - 4] = '____';
		x[enemyr - 5][enemyc - 5] = '__';
		x[enemyr - 5][enemyc - 3] = '.';
		x[enemyr - 5][enemyc] = '|';
		x[enemyr - 5][enemyc - 6] = '|';
		for (int i = 0; i < 7; i++)
		{
			x[enemyr - 6][enemyc - i] = '_';
		}
		x[enemyr - 6][enemyc + 1] = '/';
		x[enemyr - 6][enemyc + 2] = '\\';
		x[enemyr - 6][enemyc + 3] = '\\';
		x[enemyr - 6][enemyc - 7] = '\\';
		x[enemyr - 6][enemyc - 8] = '/';
		x[enemyr - 6][enemyc - 9] = '/';
		x[enemyr - 7][enemyc - 8] = '__';
		x[enemyr - 7][enemyc - 7] = '/';
		x[enemyr - 7][enemyc - 9] = '(';
		x[enemyr - 7][enemyc + 1] = '\\';
		x[enemyr - 7][enemyc + 2] = '__';
		x[enemyr - 7][enemyc + 3] = ')';
		for (int i = 0; i < 3; i++)
		{
			x[enemyr - 8][enemyc + 2 - i] = '_';
		}
		x[enemyr - 8][enemyc - 1] = '|';
		x[enemyr - 8][enemyc - 2] = '0';
		x[enemyr - 8][enemyc - 4] = '0';
		x[enemyr - 8][enemyc - 5] = '|';
		for (int i = 0; i < 3; i++)
		{
			x[enemyr - 8][enemyc - 6 - i] = '_';
		}
		x[enemyr - 9][enemyc - 5] = '.';
		x[enemyr - 9][enemyc - 1] = '.';
		x[enemyr - 9][enemyc - 2] = '`';
		x[enemyr - 10][enemyc - 3] = '__';
		x[enemyr - 9][enemyc - 4] = '`';
		x[enemyr - 5][enemyc - 8] = '>';
		x[enemyr - 5][enemyc - 10] = '<';
		x[enemyr - 4][enemyc - 8] = '\\';
		x[enemyr - 4][enemyc - 9] = '\\';
		x[enemyr - 3][enemyc - 8] = '^';
		x[enemyr - 3][enemyc - 9] = '^';
		x[enemyr - 5][enemyc + 3] = '\\';
		x[enemyr - 5][enemyc + 4] = '/';
		x[enemyr - 6][enemyc + 4] = '/';
		x[enemyr - 6][enemyc + 5] = '/';
		x[enemyr - 7][enemyc + 5] = '[';
		x[enemyr - 7][enemyc + 6] = '<';
	}
}
void move_enemy(char x[][150], int& enemyr, int& enemyc, int& dire, int enemystop)
{
	if (enemystop == 0)
	{
		if (dire == 1)
		{
			if (enemyc == 130) //|| x[enemyr][enemyc + 5] != ' ')
			{
				dire = -1;
			}
		}
		if (dire == -1)
		{
			if (enemyc == 15)//|| x[enemyr][enemyc - 5] != ' ')
			{
				dire = 1;
			}
		}
		enemyc += dire;
	}
}
void draw_bullet(char x[][150], int& gunf, int& bulletf, int bullet[], int h, int gunct, int bullethit[], int b, int hit)
{
	if (bulletf == 1)
	{
		/*if (gunct < 5)
		{
		 x[bullet[b+i]][bullet[b + gunct+i]] = 'o';
		 i += 2;
		}*/
		for (int i = 0, j = 0; i < gunct * 2; i += 2, j++)
		{
			if (bullethit[j] == 0)
			{

				x[bullet[i]][bullet[i + 1]] = 'o';

			}
		}
	}
	/*
	if (bullethit[hit + 1] != 1)
	{
		if (gunct >= 2)
		{
			x[bullet[b + 2]][bullet[b + 3]] = 'o';
		}
	}
	if (bullethit[hit + 2] != 1)
	{
		if (gunct >= 3)
		{
			x[bullet[b + 4]][bullet[b + 5]] = 'o';
		}
	}
	if (bullethit[hit + 3] != 1)
	{
		if (gunct >= 4)
		{
			x[bullet[b + 6]][bullet[b + 7]] = 'o';
		}
	}
	if (bullethit[hit + 4] != 1)
	{
		if (gunct >= 5)
		{
			x[bullet[b + 8]][bullet[b + 9]] = 'o';
		}
	}
}*/
}
void move_bullet(char x[][150], int& bulletf, int bullet[], int gunct, int bullethit[], int direh, int bulletmove[], int b, int hit)
{
	if (direh == 0)
	{
		if (bulletf == 1)
		{


			for (int i = 0, j = 0; i < gunct * 2; i += 2, j++)
			{
				if (bullethit[j] == 0)
				{
					if (x[bullet[i]][bullet[i + 1]] == ' ')
					{
						bullet[i + 1] = bullet[i + 1] + bulletmove[j];
					}
					else
					{
						bullethit[j] = 1;
					}

				}
			}
		}
	}


	if (direh == 1)
	{
		if (bulletf == 1)
		{


			for (int i = 0, j = 0; i < gunct * 2; i += 2, j++)
			{
				if (bullethit[j] == 0)
				{
					if (x[bullet[i]][bullet[i + 1]] == ' ')
					{
						bullet[i + 1] = bullet[i + 1] + bulletmove[j];
					}
					else
					{
						bullethit[j] = 1;
					}

				}
			}
		}
	}
	/*	if (gunct >= 1)
		{
			//if (x[bullet[b + 0]][bullet[b + 1]] == ' ')
			//{
			//	bullet[b + 0] = bullet[b + 1] + bulletmove[hit + 0];
			//}
			//else
			//{
				bullethit[hit + 0] = 1;
			}
		}
		if (gunct >= 2)
		{
			if (x[bullet[b + 2]][bullet[b + 3]] == ' ')
			{
				bullet[b + 3] = bullet[b + 3] + bulletmove[hit + 1];
			}
			else
			{
				bullethit[hit + 1] = 1;
			}
		}
		if (gunct >= 3)
		{
			if (x[bullet[b + 4]][bullet[b + 5]] == ' ')
			{
				bullet[b + 5] = bullet[b + 5] + bulletmove[hit + 2];
			}
			else
			{
				bullethit[hit + 2] = 1;
			}
		}
		if (gunct >= 4)
		{
			if (x[bullet[b + 6]][bullet[b + 7]] == ' ')
			{
				bullet[b + 7] = bullet[b + 7] + bulletmove[hit + 3];
			}
			else
			{
				bullethit[hit + 3] = 1;
			}
		}
		if (gunct >= 5)
		{
			if (x[bullet[b + 8]][bullet[b + 9]] == ' ')
			{
				bullet[b + 9] = bullet[b + 9] + bulletmove[hit + 4];
			}
			else
			{
				bullethit[hit + 4] = 1;
			}
		}*/


		/*	}
		}*/
		/*if (direh == 1)
		{
			if (bulletf == 1)
			{
				if (gunct >= 1)
				{
					if (x[bullet[b + 0]][bullet[b + 1]] == ' ')
					{
						bullet[b + 1] = bullet[b + 1] + bulletmove[hit + 0];
					}
					else
					{
						bullethit[hit + 0] = 1;
					}
				}
				if (gunct >= 2)
				{
					if (x[bullet[b + 2]][bullet[b + 3]] == ' ')
					{
						bullet[3] = bullet[3] + bulletmove[hit + 1];
					}
					else
					{
						bullethit[hit + 1] = 1;
					}
				}
				if (gunct >= 3)
				{
					if (x[bullet[b + 4]][bullet[b + 5]] == ' ')
					{
						bullet[b + 5] = bullet[b + 5] + bulletmove[hit + 2];
					}
					else
					{
						bullethit[hit + 2] = 1;
					}
				}
				if (gunct >= 4)
				{
					if (x[bullet[b + 6]][bullet[b + 7]] == ' ')
					{
						bullet[b + 7] = bullet[b + 7] + bulletmove[hit + 3];
					}
					else
					{
						bullethit[hit + 3] = 1;
					}
				}
				if (gunct >= 5)
				{
					if (x[bullet[b + 8]][bullet[b + 9]] == ' ')
					{
						bullet[b + 9] = bullet[b + 9] + bulletmove[hit + 4];
					}
					else
					{
						bullethit[hit + 4] = 1;
					}
				}


			}
		}*/
}
void bullet_kill_zombie(char x[][150], int czombie, int rzombie, int& zhealth, int rhero)
{
	if (rhero == rzombie)
	{
		if (x[rzombie - 5][czombie + 9] == 'o' || x[rzombie - 4][czombie] == 'o')
		{
			zhealth--;
		}
		if (x[rzombie - 5][czombie + 9] == 'o' || x[rzombie - 4][czombie] == 'o')
		{
			zhealth--;
		}
	}

}
void draw_bat(char x[][150], int rbat, int cbat, int dirb)
{
	if (dirb == -1)
	{
		x[rbat][cbat] = '"';
		x[rbat][cbat + 1] = '-';
		x[rbat][cbat + 2] = '`';
		x[rbat - 1][cbat] = ',';
		x[rbat - 1][cbat + 1] = ',';
		x[rbat - 1][cbat + 2] = '/';
		x[rbat - 1][cbat + 3] = '.';
		x[rbat - 1][cbat + 4] = '`';
		x[rbat - 1][cbat - 1] = '\\';
		x[rbat - 1][cbat - 2] = '`';
		x[rbat - 2][cbat - 2] = '_';
		x[rbat - 2][cbat + 3] = '_';
		x[rbat - 2][cbat + 4] = '_';
	}
	if (dirb == 1)
	{
		x[rbat][cbat] = '"';
		x[rbat][cbat - 1] = '-';
		x[rbat][cbat - 2] = '`';
		x[rbat - 1][cbat] = ',';
		x[rbat - 1][cbat - 1] = ',';
		x[rbat - 1][cbat - 2] = '\\';
		x[rbat - 1][cbat - 3] = '.';
		x[rbat - 1][cbat - 4] = '`';
		x[rbat - 1][cbat + 1] = '/';
		x[rbat - 1][cbat + 2] = '`';
		x[rbat - 2][cbat + 2] = '_';
		x[rbat - 2][cbat - 3] = '_';
		x[rbat - 2][cbat - 4] = '_';
	}
}
void move_bat(int& cbat, int& dirb)
{
	if (dirb == 1)
	{
		if (cbat == 130)
		{
			dirb = -1;
		}
	}
	if (dirb == -1)
	{
		if (cbat == 15)
		{
			dirb = 1;
		}
	}
	cbat += dirb;
}
void draw_final_boss(char x[][150], int rfinalboss, int cfinalboss, int finalbossflag)
{
	if (finalbossflag == 0)
	{
		x[rfinalboss][cfinalboss] = ')';
		x[rfinalboss][cfinalboss - 1] = '\\';
		x[rfinalboss - 1][cfinalboss - 2] = '_';
		x[rfinalboss - 2][cfinalboss - 3] = '_';
		x[rfinalboss - 1][cfinalboss - 4] = '_';
		x[rfinalboss - 2][cfinalboss - 5] = '|';
		x[rfinalboss - 3][cfinalboss - 4] = '(';
		x[rfinalboss - 3][cfinalboss - 3] = '_';
		x[rfinalboss - 2][cfinalboss - 2] = '\\';
		x[rfinalboss - 2][cfinalboss - 1] = '\\';
		x[rfinalboss - 2][cfinalboss] = '/';
		x[rfinalboss - 2][cfinalboss + 1] = '\\';
		x[rfinalboss - 1][cfinalboss + 2] = '_';
		x[rfinalboss - 2][cfinalboss + 3] = '_';
		x[rfinalboss - 1][cfinalboss + 4] = '_';
		x[rfinalboss - 2][cfinalboss + 5] = '_';
		x[rfinalboss - 1][cfinalboss + 6] = '_';
		x[rfinalboss - 2][cfinalboss + 7] = '|';
		x[rfinalboss - 3][cfinalboss + 6] = '\\';
		x[rfinalboss - 4][cfinalboss + 5] = '|';
		x[rfinalboss - 5][cfinalboss + 5] = '\\';
		x[rfinalboss - 5][cfinalboss + 4] = '"';
		x[rfinalboss - 6][cfinalboss + 5] = '/';
		x[rfinalboss - 7][cfinalboss + 6] = '/';
		x[rfinalboss - 8][cfinalboss + 7] = '|';
		x[rfinalboss - 8][cfinalboss + 4] = '/';
		x[rfinalboss - 7][cfinalboss + 3] = '|';
		x[rfinalboss - 6][cfinalboss + 3] = ',';
		x[rfinalboss - 10][cfinalboss + 7] = '_';
		x[rfinalboss - 10][cfinalboss + 6] = '_';
		x[rfinalboss - 10][cfinalboss + 5] = '_';
		x[rfinalboss - 10][cfinalboss + 8] = '`';
		x[rfinalboss - 11][cfinalboss + 9] = '/';
		x[rfinalboss - 11][cfinalboss + 8] = '`';
		x[rfinalboss - 11][cfinalboss + 7] = ',';
		x[rfinalboss - 12][cfinalboss + 9] = '\\';
		x[rfinalboss - 12][cfinalboss + 8] = '\\';
		x[rfinalboss - 12][cfinalboss + 7] = '`';
		x[rfinalboss - 13][cfinalboss + 8] = '.';
		x[rfinalboss - 13][cfinalboss + 7] = '_';
		x[rfinalboss - 13][cfinalboss + 6] = '_';
		x[rfinalboss - 13][cfinalboss + 5] = '-';
		x[rfinalboss - 13][cfinalboss + 4] = '.';
		x[rfinalboss - 12][cfinalboss + 3] = '/';
		x[rfinalboss - 11][cfinalboss + 3] = '\\';
		x[rfinalboss - 10][cfinalboss + 4] = '~';
		x[rfinalboss - 12][cfinalboss + 5] = '/';
		x[rfinalboss - 11][cfinalboss + 5] = '`';
		x[rfinalboss - 14][cfinalboss + 5] = '|';
		x[rfinalboss - 15][cfinalboss + 4] = '\\';
		x[rfinalboss - 16][cfinalboss + 3] = '_';
		x[rfinalboss - 16][cfinalboss + 2] = '_';
		x[rfinalboss - 16][cfinalboss + 1] = '_';
		x[rfinalboss - 16][cfinalboss] = '_';
		x[rfinalboss - 16][cfinalboss - 1] = '_';
		x[rfinalboss - 15][cfinalboss - 2] = '/';
		x[rfinalboss - 14][cfinalboss - 3] = '|';
		x[rfinalboss - 13][cfinalboss - 3] = '|';
		x[rfinalboss - 12][cfinalboss - 3] = '/';
		x[rfinalboss - 14][cfinalboss - 2] = '_';
		x[rfinalboss - 14][cfinalboss - 1] = '(';
		x[rfinalboss - 14][cfinalboss] = ')';
		x[rfinalboss - 15][cfinalboss + 1] = '_';
		x[rfinalboss - 14][cfinalboss + 2] = ']';
		x[rfinalboss - 13][cfinalboss - 2] = '_';
		x[rfinalboss - 13][cfinalboss - 1] = '_';
		x[rfinalboss - 13][cfinalboss] = '_';
		x[rfinalboss - 13][cfinalboss + 1] = '_';
		x[rfinalboss - 13][cfinalboss + 2] = '_';
		x[rfinalboss - 13][cfinalboss - 4] = '-';
		x[rfinalboss - 13][cfinalboss - 5] = '.';
		x[rfinalboss - 12][cfinalboss - 6] = '/';
		x[rfinalboss - 11][cfinalboss - 6] = '\\';
		x[rfinalboss - 10][cfinalboss - 6] = ',';
		x[rfinalboss - 10][cfinalboss - 5] = '`';
		x[rfinalboss - 10][cfinalboss - 4] = '-';
		x[rfinalboss - 11][cfinalboss - 4] = '(';
		x[rfinalboss - 10][cfinalboss - 3] = '\\';
		x[rfinalboss - 10][cfinalboss - 4] = '/';
		x[rfinalboss - 10][cfinalboss - 2] = ')';
		x[rfinalboss - 10][cfinalboss - 1] = '"';
		x[rfinalboss - 10][cfinalboss] = '|';
		x[rfinalboss - 10][cfinalboss + 1] = '"';
		x[rfinalboss - 9][cfinalboss - 2] = '|';
		x[rfinalboss - 9][cfinalboss - 1] = '-';
		x[rfinalboss - 9][cfinalboss + 1] = '-';
		x[rfinalboss - 8][cfinalboss - 3] = '[';
		x[rfinalboss - 8][cfinalboss - 2] = '-';
		x[rfinalboss - 8][cfinalboss - 1] = '-';
		x[rfinalboss - 8][cfinalboss] = '-';
		x[rfinalboss - 8][cfinalboss + 1] = '-';
		x[rfinalboss - 9][cfinalboss + 2] = '.';
		x[rfinalboss - 8][cfinalboss + 1] = '.';
		x[rfinalboss - 7][cfinalboss] = '.';
		x[rfinalboss - 6][cfinalboss - 1] = '.';
		x[rfinalboss - 6][cfinalboss - 2] = '_';
		x[rfinalboss - 6][cfinalboss - 3] = '.';
		x[rfinalboss - 6][cfinalboss - 4] = '\\';
		x[rfinalboss - 5][cfinalboss - 4] = '(';
		x[rfinalboss - 5][cfinalboss - 3] = '-';
		x[rfinalboss - 5][cfinalboss - 2] = '.';
		x[rfinalboss - 6][cfinalboss - 1] = '"';
		x[rfinalboss - 7][cfinalboss] = '-';
		x[rfinalboss - 8][cfinalboss + 1] = '.';
		x[rfinalboss - 9][cfinalboss + 2] = '`';
		x[rfinalboss - 10][cfinalboss + 3] = '.';
		x[rfinalboss - 6][cfinalboss - 3] = '/';
		x[rfinalboss - 7][cfinalboss - 4] = '\\';
		x[rfinalboss - 7][cfinalboss - 5] = '\\';
		x[rfinalboss - 6][cfinalboss - 4] = '\\';
		x[rfinalboss - 8][cfinalboss - 5] = '\\';
		x[rfinalboss - 8][cfinalboss - 6] = '\\';
		x[rfinalboss - 9][cfinalboss - 6] = '\\';
		x[rfinalboss - 9][cfinalboss - 7] = '/';
		x[rfinalboss - 9][cfinalboss - 8] = '\\';
		x[rfinalboss - 10][cfinalboss - 9] = '\\';
		x[rfinalboss - 11][cfinalboss - 10] = '\\';
		x[rfinalboss - 12][cfinalboss - 10] = '|';
		x[rfinalboss - 12][cfinalboss - 11] = '/';
		x[rfinalboss - 12][cfinalboss - 12] = '_';
		x[rfinalboss - 12][cfinalboss - 13] = '_';
		x[rfinalboss - 12][cfinalboss - 14] = '_';
		x[rfinalboss - 12][cfinalboss - 15] = '_';
		x[rfinalboss - 12][cfinalboss - 16] = '\\';
		x[rfinalboss - 13][cfinalboss - 16] = '|';
		x[rfinalboss - 14][cfinalboss - 16] = '/';
		x[rfinalboss - 15][cfinalboss - 15] = '/';
		x[rfinalboss - 16][cfinalboss - 15] = '(';
		x[rfinalboss - 16][cfinalboss - 14] = '/';
		x[rfinalboss - 17][cfinalboss - 14] = '_';
		x[rfinalboss - 18][cfinalboss - 13] = '/';
		x[rfinalboss - 18][cfinalboss - 7] = '\\';
		x[rfinalboss - 16][cfinalboss - 7] = '/';
		x[rfinalboss - 15][cfinalboss - 8] = '/';
		x[rfinalboss - 14][cfinalboss - 9] = '/';
		x[rfinalboss - 19][cfinalboss - 13] = '.';
		x[rfinalboss - 19][cfinalboss - 12] = '_';
		x[rfinalboss - 19][cfinalboss - 11] = '_';
		x[rfinalboss - 19][cfinalboss - 10] = '_';
		x[rfinalboss - 19][cfinalboss - 9] = '_';
		x[rfinalboss - 19][cfinalboss - 8] = '_';
		x[rfinalboss - 19][cfinalboss - 8] = '.';
		x[rfinalboss - 9][cfinalboss - 6] = '\\';
		x[rfinalboss - 10][cfinalboss - 7] = '\\';
		x[rfinalboss - 11][cfinalboss - 8] = '\\';
		x[rfinalboss - 12][cfinalboss - 8] = ')';
		x[rfinalboss - 9][cfinalboss - 7] = '\\';
		x[rfinalboss - 10][cfinalboss - 8] = '\\';
		x[rfinalboss - 11][cfinalboss - 9] = '\\';
		x[rfinalboss - 12][cfinalboss - 9] = '"';
		x[rfinalboss - 13][cfinalboss - 9] = '-';
		x[rfinalboss - 14][cfinalboss - 10] = '\\';
		x[rfinalboss - 14][cfinalboss - 11] = '\\';
	}
}
void draw_final_boss_down(char x[][150], int rfinalbossdown, int cfinalbossdown, int finalbossflag)
{
	if (finalbossflag == 1)
	{
		x[rfinalbossdown][cfinalbossdown] = '|';
		x[rfinalbossdown - 1][cfinalbossdown] = '|';
		x[rfinalbossdown - 2][cfinalbossdown] = '[';
		x[rfinalbossdown - 5][cfinalbossdown] = ',';
		x[rfinalbossdown - 5][cfinalbossdown + 1] = '-';
		x[rfinalbossdown - 5][cfinalbossdown + 2] = '`';
		x[rfinalbossdown][cfinalbossdown + 1] = '_';
		x[rfinalbossdown - 1][cfinalbossdown + 2] = '_';
		x[rfinalbossdown - 1][cfinalbossdown + 3] = '\\';
		x[rfinalbossdown][cfinalbossdown + 4] = '_';
		x[rfinalbossdown - 1][cfinalbossdown + 5] = '_';
		x[rfinalbossdown][cfinalbossdown + 6] = '_';
		x[rfinalbossdown - 1][cfinalbossdown + 7] = '_';
		x[rfinalbossdown][cfinalbossdown + 8] = '_';
		x[rfinalbossdown][cfinalbossdown + 9] = '|';
		x[rfinalbossdown - 1][cfinalbossdown + 9] = '|';
		x[rfinalbossdown - 2][cfinalbossdown + 8] = '\\';
		x[rfinalbossdown - 3][cfinalbossdown + 7] = ']';
		x[rfinalbossdown - 4][cfinalbossdown + 6] = '\\';
		x[rfinalbossdown - 3][cfinalbossdown + 6] = '-';
		x[rfinalbossdown - 2][cfinalbossdown + 6] = '`';
		x[rfinalbossdown - 2][cfinalbossdown + 5] = '_';
		x[rfinalbossdown - 2][cfinalbossdown + 4] = '_';
		x[rfinalbossdown - 2][cfinalbossdown + 3] = '.';
		x[rfinalbossdown - 4][cfinalbossdown + 3] = '_';
		x[rfinalbossdown - 2][cfinalbossdown + 2] = '-';
		x[rfinalbossdown - 2][cfinalbossdown + 1] = '-';
		x[rfinalbossdown - 3][cfinalbossdown + 1] = '-';
		x[rfinalbossdown - 4][cfinalbossdown - 1] = '\\';
		x[rfinalbossdown - 5][cfinalbossdown - 2] = '_';
		x[rfinalbossdown - 5][cfinalbossdown - 3] = '_';
		x[rfinalbossdown - 5][cfinalbossdown - 4] = '_';
		x[rfinalbossdown - 5][cfinalbossdown - 5] = '_';
		x[rfinalbossdown - 5][cfinalbossdown - 6] = ',';
		x[rfinalbossdown - 5][cfinalbossdown - 7] = '_';
		x[rfinalbossdown - 5][cfinalbossdown - 8] = '_';
		x[rfinalbossdown - 6][cfinalbossdown - 8] = '/';
		x[rfinalbossdown - 8][cfinalbossdown - 9] = '/';
		x[rfinalbossdown - 8][cfinalbossdown - 5] = '-';
		x[rfinalbossdown - 8][cfinalbossdown - 6] = '-';
		x[rfinalbossdown - 8][cfinalbossdown - 4] = '-';
		x[rfinalbossdown - 8][cfinalbossdown - 3] = '-';
		x[rfinalbossdown - 7][cfinalbossdown - 2] = '"';
		x[rfinalbossdown - 7][cfinalbossdown - 3] = '/';
		x[rfinalbossdown - 7][cfinalbossdown - 4] = '_';
		x[rfinalbossdown - 7][cfinalbossdown - 5] = ')';
		x[rfinalbossdown - 6][cfinalbossdown - 5] = ',';
		x[rfinalbossdown - 6][cfinalbossdown - 6] = '-';
		x[rfinalbossdown - 7][cfinalbossdown - 9] = ',';
		x[rfinalbossdown - 7][cfinalbossdown - 10] = '`';
		x[rfinalbossdown - 8][cfinalbossdown - 8] = '`';
		x[rfinalbossdown - 8][cfinalbossdown - 7] = '-';
		x[rfinalbossdown - 9][cfinalbossdown - 10] = '\\';
		x[rfinalbossdown - 10][cfinalbossdown - 10] = '/';
		x[rfinalbossdown - 11][cfinalbossdown - 9] = '.';
		x[rfinalbossdown - 11][cfinalbossdown - 8] = '_';
		x[rfinalbossdown - 11][cfinalbossdown - 7] = '/';
		x[rfinalbossdown - 12][cfinalbossdown - 6] = '_';
		x[rfinalbossdown - 12][cfinalbossdown - 5] = '_';
		x[rfinalbossdown - 12][cfinalbossdown - 4] = '_';
		x[rfinalbossdown - 12][cfinalbossdown - 3] = '_';
		x[rfinalbossdown - 12][cfinalbossdown - 3] = '_';
		x[rfinalbossdown - 12][cfinalbossdown - 2] = '_';
		x[rfinalbossdown - 11][cfinalbossdown - 1] = '\\';
		x[rfinalbossdown - 10][cfinalbossdown - 1] = '-';
		x[rfinalbossdown - 9][cfinalbossdown] = '|';
		x[rfinalbossdown - 8][cfinalbossdown - 8] = '`';
		x[rfinalbossdown - 9][cfinalbossdown - 8] = '|';
		x[rfinalbossdown - 9][cfinalbossdown - 7] = '_';
		x[rfinalbossdown - 9][cfinalbossdown - 6] = '(';
		x[rfinalbossdown - 9][cfinalbossdown - 5] = ')';
		x[rfinalbossdown - 10][cfinalbossdown - 4] = '-';
		x[rfinalbossdown - 9][cfinalbossdown - 3] = '`]';
		x[rfinalbossdown - 10][cfinalbossdown - 8] = '|';
		x[rfinalbossdown - 6][cfinalbossdown - 9] = '_';
		x[rfinalbossdown - 4][cfinalbossdown - 10] = '"';
		x[rfinalbossdown - 4][cfinalbossdown - 11] = '-';
		x[rfinalbossdown - 4][cfinalbossdown - 12] = '"';
		x[rfinalbossdown - 4][cfinalbossdown - 13] = '-';
		x[rfinalbossdown - 4][cfinalbossdown - 14] = ',';
		x[rfinalbossdown - 4][cfinalbossdown - 15] = '_';
		x[rfinalbossdown - 4][cfinalbossdown - 16] = '_';
		x[rfinalbossdown - 4][cfinalbossdown - 17] = '_';
		x[rfinalbossdown - 4][cfinalbossdown - 18] = ',';
		x[rfinalbossdown - 3][cfinalbossdown - 19] = '-';
		x[rfinalbossdown - 3][cfinalbossdown - 20] = ',';
		x[rfinalbossdown - 2][cfinalbossdown - 21] = '|';
		x[rfinalbossdown - 1][cfinalbossdown - 22] = '|';
		x[rfinalbossdown - 1][cfinalbossdown - 23] = '_';
		x[rfinalbossdown - 1][cfinalbossdown - 24] = '_';
		x[rfinalbossdown - 1][cfinalbossdown - 25] = '_';
		x[rfinalbossdown - 1][cfinalbossdown - 26] = '|';
		x[rfinalbossdown - 1][cfinalbossdown - 27] = '\\';
		x[rfinalbossdown - 2][cfinalbossdown - 27] = ';';
		x[rfinalbossdown - 2][cfinalbossdown - 28] = '(';
		x[rfinalbossdown - 3][cfinalbossdown - 27] = '|';
		x[rfinalbossdown - 4][cfinalbossdown - 26] = '/';
		x[rfinalbossdown - 5][cfinalbossdown - 25] = '-';
		x[rfinalbossdown - 5][cfinalbossdown - 24] = '-';
		x[rfinalbossdown - 4][cfinalbossdown - 23] = '|';
		x[rfinalbossdown - 4][cfinalbossdown - 22] = '_';
		x[rfinalbossdown - 4][cfinalbossdown - 21] = '-';
		x[rfinalbossdown - 4][cfinalbossdown - 20] = '"';
		x[rfinalbossdown - 4][cfinalbossdown - 19] = '-';
		x[rfinalbossdown - 4][cfinalbossdown - 18] = '"';
		x[rfinalbossdown - 5][cfinalbossdown - 17] = '_';
		x[rfinalbossdown - 5][cfinalbossdown - 16] = ',';
		x[rfinalbossdown - 5][cfinalbossdown - 15] = '-';
		x[rfinalbossdown - 6][cfinalbossdown - 14] = ',';
		x[rfinalbossdown - 6][cfinalbossdown - 13] = '_';
		x[rfinalbossdown - 6][cfinalbossdown - 13] = '_';
		x[rfinalbossdown - 6][cfinalbossdown - 12] = '_';
		x[rfinalbossdown - 6][cfinalbossdown - 11] = '"';
		x[rfinalbossdown - 6][cfinalbossdown - 10] = '-';
		x[rfinalbossdown - 6][cfinalbossdown + 5] = '_';
		x[rfinalbossdown - 6][cfinalbossdown + 6] = '_';
		x[rfinalbossdown - 6][cfinalbossdown + 6] = '`';
		x[rfinalbossdown - 7][cfinalbossdown + 7] = '/';
		x[rfinalbossdown - 8][cfinalbossdown + 7] = '\\';
		x[rfinalbossdown - 9][cfinalbossdown + 6] = '.';
		x[rfinalbossdown - 9][cfinalbossdown + 5] = '_';
		x[rfinalbossdown - 9][cfinalbossdown + 4] = '_';
		x[rfinalbossdown - 9][cfinalbossdown + 3] = '_';
		x[rfinalbossdown - 9][cfinalbossdown + 2] = '.';
		x[rfinalbossdown - 8][cfinalbossdown + 1] = '/';
		x[rfinalbossdown - 8][cfinalbossdown + 3] = '/';
		x[rfinalbossdown - 7][cfinalbossdown + 3] = '`';
		x[rfinalbossdown - 7][cfinalbossdown + 4] = ',';
		x[rfinalbossdown - 7][cfinalbossdown + 4] = ',';
		x[rfinalbossdown - 7][cfinalbossdown + 5] = '"';
		x[rfinalbossdown - 8][cfinalbossdown + 5] = '\\';
		x[rfinalbossdown - 7][cfinalbossdown + 1] = '\\';
		x[rfinalbossdown - 6][cfinalbossdown + 2] = '`';
		x[rfinalbossdown - 6][cfinalbossdown + 3] = ';';
	}

}
void draw_bat_throw_rock(char x[][150], int rrock, int crock)
{
		x[rrock][crock] = '(';
		x[rrock][crock + 1] = ')';
}
void bat_throw_rock(char x[][150], int& rrock,int &crock,int &rockflag, int &rbat, int &cbat,int &rockflag2)
{
	if (rockflag == 0)
	{
		if (x[rrock + 1][crock] == ' ')
		{
			rrock += 2;
		}
	}
	if (x[rrock + 1][crock] != ' ' || x[rrock + 2][crock] != ' ')
	{
		rockflag++;
	}
	if (rockflag == 1)
	{
		rrock = rbat;
		crock = cbat;
		rockflag2 = 0;
	}
}
void move_hero_on_elevator(char x[][150], int& rhero, int& chero, int direle)
{
	if (x[rhero + 1][chero] == '-' || x[rhero + 1][chero + 2] == '-' || x[rhero + 1][chero + 3] == '-' || x[rhero + 1][chero + 4] == '-' || x[rhero + 1][chero + 5] == '-' || x[rhero + 1][chero + 6] == '-')
	{
		rhero += direle;
	}
}
void hero_die_from_zombie(char x[][150], int& rhero, int& chero, int& r)
{
	if (x[rhero - 5][chero - 15] == '/')
	{
		rhero = 24;
		chero = 130;
		r = 0;
	}
}
void draw_robot_fire_bullet(char x[][150], int renemy, int cenemy, int dire, int& rbullet, int& cbullet, int robotflag)
{
	if (dire == -1)
	{
		if (robotflag == 0)
		{
			rbullet = renemy - 7;
			cbullet = cenemy - 7;
			x[rbullet][cbullet] = '~';
		}
	}
}
void move_robot_bullet(char x[][150], int& rbulletr, int& cbulletr, int& robotflag)
{
	if (x[rbulletr - 1][cbulletr - 1] == ' ')
	{
		rbulletr--;
		cbulletr--;
		robotflag = 1;
	}
	if (x[rbulletr - 1][cbulletr - 1] != ' ')
	{
		robotflag = 0;
	}
}
void hero_kill_robot(char x[][150], int enemyr, int enemyc, int& enemyhealth)
{
	if (x[enemyr - 6][enemyc - 7] == 'o' || x[enemyr - 6][enemyc - 8] == 'o' || x[enemyr - 6][enemyc - 6] == 'o')
	{
		enemyhealth--;
	}
}
void activate_final_boss(int& rhero, int& chero, int finalbossr, int finalbossc, int& finalbossflag, int& herohearts)
{
	if (chero == 108 && rhero == 149)
	{
		finalbossflag = 1;
		rhero = 149;
		chero = 5;
		herohearts--;
	}
	else
	{
		finalbossflag = 0;
	}
}
void hero_die_from_rock(char x[][150], int rhero, int chero, int& herohearts)
{
	if (x[rhero - 10][chero + 4] == '(' || x[rhero - 10][chero + 4] == ')' || x[rhero - 11][chero + 4] == '(' || x[rhero - 11][chero + 4] == ')')
	{
		herohearts--;
	}
}
void draw_platform2(char x[][150], int rplatform, int cplatform)
{
	x[rplatform][cplatform] = 200;
	for (int i = 0; i < 8; i++)
	{
		x[rplatform][cplatform + 1 + i] = 205;
	}
	x[rplatform][cplatform + 9] = 188;
	x[rplatform - 1][cplatform] = 201;
	for (int i = 0; i < 8; i++)
	{
		x[rplatform - 1][cplatform + 1 + i] = 205;
	}
	x[rplatform - 1][cplatform + 9] = 187;
}
void laser_kill_hero(char x[][150], int& rhero, int& chero, int& polr, int& ctflag)
{
	if (rhero == 99)
	{
		if (ctflag == 0)
		{
			    if (chero > 0 && chero < 140)
				{
					rhero = 100;
					chero = 140;
				}
		}
	}
}
void draw_bomb_machine(char x[][150], int rmachine, int cmachine)
{
	x[rmachine][cmachine] = '|';
	for (int i = 0; i < 3; i++)
	{
		x[rmachine][cmachine + 1 + i] = '_';
	}
	x[rmachine + 1][cmachine + 4] = '/';
	for (int i = 0; i < 3; i++)
	{
		x[rmachine][cmachine + 8 + i] = '_';
	}
	x[rmachine + 1][cmachine + 8] = '\\';
	x[rmachine][cmachine + 11] = '|';

}
void draw_throw_bomb(char x[][150], int& rbomb, int& cbomb)
{
	x[rbomb + 1][cbomb + 5] = '(';
	x[rbomb + 1][cbomb + 6] = '_';
	x[rbomb + 1][cbomb + 6] = '_';
	x[rbomb + 1][cbomb + 6] = '_';
	x[rbomb + 1][cbomb + 7] = ')';
}
void move_bomb(char x[][150], int& rbomb, int& cbomb, int& bombtimer, int& rmachine, int& cmachine, int& bombtimer2)
{
	if (bombtimer == 0)
	{
		if (x[rbomb + 1][cbomb] == ' ')
		{
			rbomb += 2;
		}
	}
	if (x[rbomb + 1][cbomb] != ' ' || x[rbomb + 2][cbomb] != ' ')
	{
		bombtimer++;
	}
	if (bombtimer == 1)
	{
		rbomb = rmachine;
		cbomb = cmachine;
		bombtimer2 = 0;
	}
}
void bomb_kill_hero(char x[][150], int &rbomb, int &cbomb, int &rhero, int &chero, int &fbomb)
{
	if (rhero == 149)
	{
		fbomb = 1;
	}
	if (fbomb == 1)
	{
		if (x[rhero - 10][chero+4] == '_' || x[rhero - 10][chero+4] == '(' || x[rhero - 10][chero+4] == ')'|| x[rhero - 11][chero + 4] == '_' || x[rhero - 11][chero + 4] == '(' || x[rhero - 11][chero + 4] == ')'|| x[rhero - 9][chero + 4] == '_' || x[rhero - 9][chero + 4] == '(' || x[rhero - 9][chero + 4] == ')')
		{
			rhero = 149;
			chero =8;
		}
	}
}
void gun_up(char x[][150],int rgunz,int cgunz,int &gunpf,int&gunf,int &rhero, int &chero)
{
	if (gunpf==0)
	{
		if (gunf=0)
		{
			x[rgunz][cgunz] = 0;
		}
	}
	if (x[rgunz][cgunz-1]!=' ')
	{
		gunf = 2;
		x[rgunz][cgunz] = ' ';
	}
}
void draw_tube(char x[][150],int &rfinal,int &cfinal)
{
	x[rfinal][cfinal] = 179;
	x[rfinal+1][cfinal] = 179;
	x[rfinal+2][cfinal] = 179;
	x[rfinal+3][cfinal] = 179;
	x[rfinal+4][cfinal] = 179;
	x[rfinal+5][cfinal] = 179;
	x[rfinal+6][cfinal] = 179;
	x[rfinal+7][cfinal] = 179;
	x[rfinal+8][cfinal] = 179;
	x[rfinal+9][cfinal] = 179;
	x[rfinal+10][cfinal] = 179;
	x[rfinal+11][cfinal] = 179;
	x[rfinal + 12][cfinal] = 179;
	x[rfinal][cfinal + 9] = 179;
	x[rfinal+1][cfinal + 9] = 179;
	x[rfinal+2][cfinal + 9] = 179;
	x[rfinal+3][cfinal + 9] = 179;
	x[rfinal+4][cfinal + 9] = 179;
	x[rfinal+5][cfinal + 9] = 179;
	x[rfinal+6][cfinal + 9] = 179;
	x[rfinal+7][cfinal + 9] = 179;
	x[rfinal+8][cfinal + 9] = 179;
	x[rfinal+9][cfinal + 9] = 179;
	x[rfinal+10][cfinal + 9] = 179;
	x[rfinal+11][cfinal + 9] = 179;
	x[rfinal + 12][cfinal + 9] = 179;
}
void go_to_final(char x[][150],int &rhero,int &chero,int &r,int &c)
{
	if (rhero==149)
	{
		if (chero==135|| chero == 136 || chero == 137 || chero == 138 || chero == 139 || chero == 140 || chero == 141 || chero == 142 || chero == 142 || chero == 143 || chero == 144)
		{
			r = 150;
			rhero=199;
			chero = 40;
		}
	}
}
void main()
{
	char x[200][150];
	int l = 1;
	int r = 150;
	int c = 0;
	int rfinal=137;
	int cfinal=135;
	int hlr = 1;
	int hlc = 5;
	int rl = 25;
	int rl2 = 50;
	int rl3 = 75;
	int rl4 = 100;
	int rl5 = 150;
	int polr = 80;
	int bombtimer = 0;
	int bombtimer2 = 1;
	int bombtimer3 = 1;
	int bombtimer4 = 1;
	int bombtimer5 = 1;
	int bombtimer6 = 1;
	int bombtimer7 = 1;
	int bombtimer8 = 1;
	int bombtimer9 = 1;
	int bombtimer10 = 1;
	int bombtimer11 = 1;
	int rmachine = 103;
	int cmachine = 225;
	int rmachine2 = 103;
	int cmachine2 = 237;
	int rmachine3 = 103;
	int cmachine3 = 249;
	int rmachine4 = 103;
	int cmachine4 = 261;
	int rmachine5 = 103;
	int cmachine5 = 273;
	int rmachine6 = 103;
	int cmachine6 = 285;
	int rmachine7 = 103;
	int cmachine7 = 213;
	int rmachine8 = 103;
	int cmachine8 = 201;
	int rmachine9 = 103;
	int cmachine9 = 189;
	int rmachine10 = 103;
	int cmachine10 = 178;
	int rmachine11 = 103;
	int cmachine11 = 165;
	int rbomb = 103;
	int cbomb = 225;
	int rbomb2 = 103;
	int cbomb2 = 237;
	int rbomb3 = 103;
	int cbomb3 = 249;
	int rbomb4 = 103;
	int cbomb4 = 261;
	int rbomb5 = 103;
	int cbomb5 = 273;
	int rbomb6 = 103;
	int cbomb6 = 285;
	int rbomb7 = 103;
	int cbomb7 = 213;
	int rbomb8 = 103;
	int cbomb8 = 201;
	int rbomb9 = 103;
	int cbomb9 = 189;
	int rbomb10 = 103;
	int cbomb10 = 177;
	int rbomb11 = 103;
	int cbomb11 = 165;
	int rladder = 26;
	int cladder = 135;
	int rladder2 = 51;
	int cladder2 = 4;
	int rladder3 = 76;
	int cladder3 = 135;
	int rfire = 25;
	int cfire = 45;
	int rtraps1 = 100;
	int ctraps1 = 100;
	int rtraps2 = 100;
	int ctraps2 = 90;
	int rtraps3 = 100;
	int ctraps3 = 80;
	int rtraps4 = 100;
	int ctraps4 = 70;
	int rtraps5 = 100;
	int ctraps5 = 60;
	int rtraps6 = 100;
	int ctraps6 = 50;
	int enemyr = 75;
	int enemyc = 75;
	int rslem = 25;
	int cslem = 30;
	int rslem2 = 25;
	int cslem2 = 113;
	int rlaser = 85;
	int claser = 1;
	int rselim = 20;
	int cselim = 44;
	int dirs = 1;
	int rzombie = 49;
	int czombie = 50;
	int rzombie2 = 49;
	int czombie2 = 20;
	int rzombie3 = 49;
	int czombie3 = 80;
	int dirz1 = -1;






	int rhero = 100;
	int chero = 0;
	int gunf = 1;
	int direh = 0;
	int fjump = 0;
	int ctflag = 0;
	int jumpct = 0;
	int ct = 50;
	char dirh;
	int dire = -1;
	int enemystop = 0;
	int bulletf = 0;
	int bullet[1000];
	int bullet2[1000];
	int gunct = 0;
	int bullethit[500];
	int enemyhealth = 6;
	for (int m = 0; m < 500; m++)
	{
		bullethit[m] = 0;
	}
	int bullethit2[500];
	for (int m = 0; m < 500; m++)
	{
		bullethit2[m] = 0;
	}
	int bulletmove[500];
	int bulletmove2[500];
	int b = 0;
	int hit = 0;
	int h = 0;
	int h2 = 0;
	int reload = 5;
	int p = 0;
	int p2 = 0;
	int zombieh1 = 4;
	int zombieh2 = 4;
	int zombieh3 = 4;
	int dirz2 = 1;
	int dirz3 = 1;
	int rbat = 170;
	int cbat = 50;
	int rbat2 = 175;
	int cbat2 = 60;
	int rbat3 = 170;
	int cbat3 = 70;
	int rbat4 = 175;
	int cbat4 = 80;
	int rbat5 = 170;
	int cbat5 = 90;
	int rbat6 = 175;
	int cbat6 = 100;
	int rbat7 = 170;
	int cbat7 = 110;
	int dirb = -1;
	int rfinalboss = 199;
	int cfinalboss = 135;
	int finalbossflag = 0;
	int rockflag = 0;
	int rockflag2 = 1;
	int rockflag3 = 1;
	int rockflag4 = 1;
	int rockflag5 = 1;
	int rockflag6 = 1;
	int rockflag7 = 1;
	int rockflag8 = 1;
	int rrock=171;
	int crock=50;
	int rrock2=176;
	int crock2=60;
	int rrock3=171;
	int crock3=70;
	int rrock4 = 176;
	int crock4 = 80;
	int rrock5 = 171;
	int crock5 = 90;
	int rrock6 = 176;
	int crock6 = 100;
	int rrock7 = 176;
	int crock7 = 110;
	int relevator = 100;
	int celevator = 25;
	int direle = 1;
	int rbulletr = 0;
	int cbulletr = 0;
	int robotflag = 0;
	int herohearts = 5;
	int rplatform = 137;
	int cplatform = 28;
	int rplatform2 = 140;
	int cplatform2 = 40;
	int rplatform3= 137;
	int cplatform3= 52;
	int rplatform4 = 140;
	int cplatform4 = 64;
	int rplatform5 = 137;
	int cplatform5 = 76;
	int rplatform6 = 140;
	int cplatform6 = 88;
	int rplatform7 = 137;
	int cplatform7 = 100;
	int rplatform8 = 140;
	int cplatform8 = 112;
	int rplatform9 = 137;
	int cplatform9 = 124;
	int fbomb = 0;
	int rgunz = 139;
	int cgunz = 87;
	int gunff = 0;
	int gunpff = 0;
	for (int;;)
	{
		for (int i = 0; !_kbhit(); i++)
		{
			if (ct == 50)
			{
				ctflag = 1;
			}
			if (ct == 0)
			{
				ctflag = 0;
			}
			if (ctflag == 1)
			{
				ct--;
			}
			if (jumpct > 0)
			{
				jumpct--;
			}
			if (rockflag == 0)
			{
				rrock = rbat + 1;
				crock = cbat;
				rockflag = 1;
			}
			if (rhero == 74)
			{
				if (chero == enemyc - 60)
				{
					enemystop = 1;
				}
			}
			clean_and_draw_border(x, r, c);
			draw_stats(x, hlr, hlc, r, c, reload, herohearts);
			draw_l1(x, rl);
			draw_l2(x, rl2);
			draw_l1(x, rl3);
			draw_l3(x, rl4);
			draw_l1(x, rl5);
			gun_up(x, rgunz, cgunz, gunpff, gunff, rhero, chero);
			draw_tube(x, rfinal, cfinal);
			go_to_final(x, rhero, chero, r, c);
			draw_elevator(x, celevator, relevator);
			move_elevator(relevator, direle);
			move_hero_on_elevator(x, rhero, chero, direle);
			draw_ladder(x, rladder, cladder, rl2);
			draw_ladder2(x, rladder2, cladder2, rl3);
			draw_ladder(x, rladder3, cladder3, rl4);
			draw_fire(x, rfire, cfire, i);
			draw_slem(x, rslem, cslem);
			draw_slem_2(x, rslem2, cslem2);
			draw_selim(x, rselim, cselim);
			move_selim(x, rselim, cselim, dirs);
			draw_zomie(x, rzombie, czombie, dirz1, zombieh1);
			move_zombie(x, rzombie, czombie, dirz1);
			draw_zomie(x, rzombie2, czombie2, dirz2, zombieh2);
			move_zombie(x, rzombie2, czombie2, dirz2);
			draw_zomie(x, rzombie3, czombie3, dirz3, zombieh3);
			move_zombie(x, rzombie3, czombie3, dirz3);
			draw_hero(x, rhero, chero, gunf, direh);
			_gravity(x, rhero, chero, fjump, r, jumpct);
			fire_kill_hero(x, rhero, chero);
			move_hero_on_platform(x, dirs, rhero, chero);
			move_enemy(x, enemyr, enemyc, dire, enemystop);
			draw_laser_machine(x, rlaser, claser, ctflag);
			draw_laser(x, rlaser, claser, ctflag, ct);
			draw_traps(x, rtraps1, ctraps1, ctflag);
			draw_traps(x, rtraps2, ctraps2, ctflag);
			draw_traps(x, rtraps3, ctraps3, ctflag);
			draw_traps(x, rtraps4, ctraps4, ctflag);
			draw_traps(x, rtraps5, ctraps5, ctflag);
			draw_traps(x, rtraps6, ctraps6, ctflag);
			draw_bomb_machine(x, rmachine, cmachine);
			draw_bomb_machine(x, rmachine2, cmachine2);
			draw_bomb_machine(x, rmachine3, cmachine3);
			draw_bomb_machine(x, rmachine4, cmachine4);
			draw_bomb_machine(x, rmachine5, cmachine5);
			draw_bomb_machine(x, rmachine6, cmachine6);
			draw_bomb_machine(x, rmachine7, cmachine7);
			draw_bomb_machine(x, rmachine8, cmachine8);
			draw_bomb_machine(x, rmachine9, cmachine9);
			draw_bomb_machine(x, rmachine10, cmachine10);
			draw_throw_bomb(x, rbomb, cbomb);
			move_bomb(x, rbomb, cbomb, bombtimer, rmachine, cmachine, bombtimer2);
			draw_throw_bomb(x, rbomb2, cbomb2);
			move_bomb(x, rbomb2, cbomb2, bombtimer2, rmachine2, cmachine2, bombtimer3);
			draw_throw_bomb(x, rbomb3, cbomb3);
			move_bomb(x, rbomb3, cbomb3, bombtimer3, rmachine3, cmachine3, bombtimer4);
			draw_throw_bomb(x, rbomb4, cbomb4);
			move_bomb(x, rbomb4, cbomb4, bombtimer4, rmachine4, cmachine4, bombtimer5);
			draw_throw_bomb(x, rbomb5, cbomb5);
			move_bomb(x, rbomb5, cbomb5, bombtimer5, rmachine5, cmachine5, bombtimer6);
			draw_throw_bomb(x, rbomb6, cbomb6);
			move_bomb(x, rbomb6, cbomb6, bombtimer6, rmachine6, cmachine6, bombtimer7);
			draw_throw_bomb(x, rbomb7, cbomb7);
			move_bomb(x, rbomb7, cbomb7, bombtimer7, rmachine7, cmachine7, bombtimer8);
			draw_throw_bomb(x, rbomb8, cbomb8);
			move_bomb(x, rbomb8, cbomb8, bombtimer8, rmachine8, cmachine8, bombtimer9);
			draw_throw_bomb(x, rbomb9, cbomb9);
			move_bomb(x, rbomb9, cbomb9, bombtimer9, rmachine9, cmachine9, bombtimer10);
			draw_throw_bomb(x, rbomb10, cbomb10);
			move_bomb(x, rbomb10, cbomb10, bombtimer10, rmachine10, cmachine10, bombtimer11);
			draw_enemy(x, enemyr, enemyc, dire, enemyhealth);
			move_bullet(x, bulletf, bullet, gunct, bullethit, direh, bulletmove, b, hit);
			draw_bullet(x, gunf, bulletf, bullet, h, gunct, bullethit, b, hit);
			bullet_kill_zombie(x, czombie, rzombie, zombieh1, rhero);
			bullet_kill_zombie(x, czombie2, rzombie2, zombieh2, rhero);
			bullet_kill_zombie(x, czombie3, rzombie3, zombieh3, rhero);
			draw_bat(x, rbat, cbat, dirb);
			move_bat(cbat, dirb);
			draw_bat(x, rbat2, cbat2, dirb);
			move_bat(cbat2, dirb);
			draw_bat(x, rbat3, cbat3, dirb);
			move_bat(cbat3, dirb);
			draw_bat(x, rbat4, cbat4, dirb);
			move_bat(cbat4, dirb);
			draw_bat(x, rbat5, cbat5, dirb);
			move_bat(cbat5, dirb);
			draw_bat(x, rbat6, cbat6, dirb);
			move_bat(cbat6, dirb);
			draw_bat(x, rbat7, cbat7, dirb);
			move_bat(cbat7, dirb);
			draw_bat_throw_rock(x, rrock, crock);
			bat_throw_rock(x, rrock, crock,rockflag, rbat, cbat,rockflag2);
			draw_bat_throw_rock(x, rrock2, crock2);
			bat_throw_rock(x, rrock2, crock2,rockflag2, rbat2, cbat2,rockflag3);
			draw_bat_throw_rock(x, rrock3, crock3);
			bat_throw_rock(x, rrock3, crock3, rockflag3, rbat3, cbat3, rockflag4);
			draw_bat_throw_rock(x, rrock4, crock4);
			bat_throw_rock(x, rrock4, crock4, rockflag4, rbat4, cbat4, rockflag5);
			draw_bat_throw_rock(x, rrock5, crock5);
			bat_throw_rock(x, rrock5, crock5, rockflag5, rbat5, cbat5, rockflag6);
			draw_bat_throw_rock(x, rrock6, crock6);
			bat_throw_rock(x, rrock6, crock6, rockflag6, rbat6, cbat6, rockflag7);
			draw_bat_throw_rock(x, rrock7, crock7);
			bat_throw_rock(x, rrock7, crock7, rockflag7, rbat7, cbat7, rockflag8);
			draw_final_boss(x, rfinalboss, cfinalboss, finalbossflag);
			draw_final_boss_down(x, rfinalboss, cfinalboss, finalbossflag);
			hero_die_from_zombie(x, rhero, chero, r);
			draw_robot_fire_bullet(x, enemyr, enemyc, dire, rbulletr, cbulletr, robotflag);
			move_robot_bullet(x, rbulletr, cbulletr, robotflag);
			activate_final_boss(rhero, chero, rfinalboss, cfinalboss, finalbossflag, herohearts);
			bomb_kill_hero(x,rbomb,cbomb,rhero,chero,fbomb);
			hero_kill_robot(x, enemyr, enemyc, enemyhealth);
			hero_die_from_rock(x, rhero, chero, herohearts);
			draw_platform2(x, rplatform, cplatform);
			draw_platform2(x, rplatform2, cplatform2);
			draw_platform2(x, rplatform3, cplatform3);
			draw_platform2(x, rplatform4, cplatform4);
			draw_platform2(x, rplatform5, cplatform5);
			draw_platform2(x, rplatform6, cplatform6);
			draw_platform2(x, rplatform7, cplatform7);
			draw_platform2(x, rplatform8, cplatform8);
			draw_platform2(x, rplatform9, cplatform9);
			laser_kill_hero(x,rhero,chero,polr,ctflag);
			if (jumpct > 0)
			{
				move_hero(x, dirh, rhero, chero, gunf, fjump, r, direh, jumpct);
			}
			cout_to_screen(x, l, r, c);
		}
		dirh = _getch();
		if (dirh == 'w')
		{
			jumpct = 5;
		}
		if (dirh == 'q')
		{
			jumpct = 5;
		}
		if (dirh == 'e')
		{
			jumpct = 5;
		}
		if (dirh == 'a')
		{
			direh = 1;
		}
		if (dirh == 'd')
		{
			direh = 0;
		}
		if (dirh == 'f')
		{
			//if (reload > 0)
			//{
			if (gunf == 1)
			{
				gunct++;
				bulletf = 1;
				reload--;
				if (direh == 0)
				{
					bullet[b + h] = rhero - 5;
					h++;
					bullet[b + h] = chero + 15;
					h++;
					bulletmove[hit + p] = 3;
					p++;
				}
				if (direh == 1)
				{
					bullet[b + h] = rhero - 5;
					h++;
					bullet[b + h] = chero - 15;
					h++;
					bulletmove[hit + p] = -3;
					p++;
				}
			}
			//}
		}
		if (dirh == 'g')
		{
			if (gunf == 2)
			{
				gunct++;
				bulletf = 1;
				reload--;
				if (direh == 0)
				{
					bullet2[h2] = rhero - 5;
					h++;
					bullet2[h2] = chero + 15;
					h++;
					bulletmove2[hit + p2] = 3;
					p2++;
				}
				if (direh == 1)
				{
					bullet2[h2] = rhero - 5;
					h++;
					bullet2[h2] = chero - 15;
					h++;
					bulletmove2[hit + p] = -3;
					p++;
				}
			}
		}
		if (dirh == 'r')
		{
			reload = 5;
			b = b + 10;
			hit = hit + 5;
			gunct = 0;
			p = 0;
			h = 0;
		}
		draw_bullet(x, gunf, bulletf, bullet, h, gunct, bullethit, b, hit);
		move_hero(x, dirh, rhero, chero, gunf, fjump, r, direh, jumpct);
		draw_hero(x, rhero, chero, gunf, direh);
	}

}
Editor is loading...
Leave a Comment