Untitled

 avatar
unknown
plain_text
a year ago
23 kB
4
Indexable
#include <iostream>
#include <conio.h>
using namespace std;
void ClearAndDrawFixedObject(char X[][1330], int rWelcome, int cWelcome)
{
    for (int r = 0; r < 64; r++)
    {
        for (int c = 0; c < 1330; c++)
        {
            X[r][c] = ' ';
        }
    }
}
void CoutMatToScreen(char X[][1330])
{
    system("cls");
    for (int i = 0; i < 3000000; i++)
    {

    }

    for (int r = 0; r < 64; r++)
    {
        for (int c = 0; c < 420; c++)
        {
            cout << X[r][c];
        }
        cout << endl;
    }

}
void frame(char x[][1330], int& rWelcome, int& cWelcome)
{
    for (int c = 0; c < 418; c++)
    {
        x[0][c] = 220;
        x[63][c] = 220;
    }
    for (int r = 0; r < 63; r++)
    {
        x[r][0] = 219;
        x[r][1329] = 219;

    }
}
void Welcome(char x[][1330])
{
    int cfp = 40, rfp = 10;

    for (int i = cfp; i < cfp + 3; i++)
    {
        x[rfp][i] = 196;
    }
    x[rfp + 1][cfp] = 92;
    x[rfp + 1][cfp + 3] = 92;
    x[rfp + 2][cfp + 1] = 92;
    x[rfp + 2][cfp + 4] = 92;
    x[rfp + 3][cfp + 2] = 92;
    x[rfp + 3][cfp + 5] = 92;
    x[rfp + 4][cfp + 3] = 92;
    x[rfp + 4][cfp + 6] = 92;
    x[rfp + 5][cfp + 4] = 92;
    x[rfp + 5][cfp + 7] = 92;
    x[rfp + 6][cfp + 5] = 92;
    for (int i = cfp + 7; i <= cfp + 9; i++)
    {
        x[rfp + 7][i] = 196;
    }
    x[rfp + 5][cfp + 8] = 47;
    x[rfp + 5][cfp + 11] = 47;
    x[rfp + 4][cfp + 9] = 47;
    x[rfp + 4][cfp + 12] = 47;
    x[rfp + 3][cfp + 10] = 47;
    x[rfp + 3][cfp + 13] = 47;
    x[rfp + 2][cfp + 11] = 47;
    x[rfp + 2][cfp + 14] = 47;
    x[rfp + 1][cfp + 12] = 47;
    x[rfp][cfp + 13] = 196;
    x[rfp][cfp + 14] = 196;
    x[rfp][cfp + 15] = 196;
    x[rfp][cfp + 16] = 196;
    x[rfp + 1][cfp + 17] = 92;
    x[rfp + 2][cfp + 15] = 92;
    x[rfp + 2][cfp + 18] = 92;
    x[rfp + 3][cfp + 16] = 92;
    x[rfp + 3][cfp + 19] = 92;
    x[rfp + 4][cfp + 17] = 92;
    x[rfp + 4][cfp + 20] = 92;
    x[rfp + 5][cfp + 18] = 92;
    x[rfp + 5][cfp + 21] = 92;
    x[rfp + 6][cfp + 19] = 92;
    x[rfp + 5][cfp + 22] = 47;
    x[rfp + 5][cfp + 25] = 47;
    x[rfp + 7][cfp + 20] = 196;
    x[rfp + 7][cfp + 21] = 196;
    x[rfp + 7][cfp + 22] = 196;
    x[rfp + 6][cfp + 24] = 47;
    x[rfp + 4][cfp + 23] = 47;
    x[rfp + 4][cfp + 26] = 47;
    x[rfp + 3][cfp + 24] = 47;
    x[rfp + 3][cfp + 27] = 47;
    x[rfp + 2][cfp + 25] = 47;
    x[rfp + 2][cfp + 28] = 47;
    x[rfp + 1][cfp + 26] = 47;
    x[rfp + 1][cfp + 29] = 47;
    x[rfp][cfp + 27] = 196;
    x[rfp][cfp + 28] = 196;
    x[rfp][cfp + 29] = 196;
    for (int i = rfp + 1; i <= rfp + 6; i++)
    {
        x[i][cfp + 34] = 179;
    }
    for (int i = rfp + 2; i <= rfp + 5; i++)
    {
        x[i][cfp + 36] = 179;
    }
    for (int i = cfp + 37; i <= cfp + 40; i++)
    {
        x[rfp + 3][i] = 196;
    }
    x[rfp + 3][cfp + 36] = ' ';
    x[rfp + 4][cfp + 36] = ' ';
    x[rfp + 3][cfp + 41] = 58;
    x[rfp + 4][cfp + 41] = 58;
    for (int i = cfp + 37; i <= cfp + 40; i++)
    {
        x[rfp + 4][i] = 196;
    }
    for (int i = cfp + 35; i <= cfp + 40; i++)
    {
        x[rfp][i] = 196;
    }
    for (int i = cfp + 37; i <= cfp + 40; i++)
    {
        x[rfp + 1][i] = 196;
    }
    x[rfp][cfp + 41] = 58;
    x[rfp + 1][cfp + 41] = 58;
    for (int i = cfp + 37; i <= cfp + 40; i++)
    {
        x[rfp + 6][i] = 196;
    }
    for (int i = cfp + 35; i <= cfp + 40; i++)
    {
        x[rfp + 7][i] = 196;
    }
    x[rfp + 6][cfp + 41] = 58;
    x[rfp + 7][cfp + 41] = 58;
    x[rfp + 6][cfp + 10] = 47;
    x[rfp][cfp + 47] = 196;
    x[rfp][cfp + 48] = 196;
    for (int i = rfp + 1; i < rfp + 7; i++)
    {
        x[i][cfp + 46] = 179;
    }
    for (int i = rfp + 1; i <= rfp + 5; i++)
    {
        x[i][cfp + 49] = 179;
    }
    for (int i = cfp + 50; i < cfp + 55; i++)
    {
        x[rfp + 6][i] = 196;
    }
    for (int i = cfp + 47; i < cfp + 55; i++)
    {
        x[rfp + 7][i] = 196;
    }
    x[rfp + 6][cfp + 55] = 58;
    x[rfp + 7][cfp + 55] = 58;
    for (int i = cfp + 61; i < cfp + 67; i++)
    {
        x[rfp][i] = 196;
    }
    for (int i = rfp + 1; i < rfp + 7; i++)
    {
        x[i][cfp + 60] = 179;
    }
    for (int i = rfp + 2; i < rfp + 6; i++)
    {
        x[i][cfp + 63] = 179;
    }
    x[rfp][cfp + 67] = 58;
    for (int i = cfp + 64; i < cfp + 67; i++)
    {
        x[rfp + 1][i] = 196;
    }
    x[rfp + 1][cfp + 67] = 58;
    for (int i = cfp + 64; i < cfp + 67; i++)
    {
        x[rfp + 6][i] = 196;
    }
    x[rfp + 6][cfp + 67] = 58;
    for (int i = cfp + 61; i < cfp + 67; i++)
    {
        x[rfp + 7][i] = 196;
    }
    x[rfp + 7][cfp + 67] = 58;
    for (int i = rfp + 1; i < rfp + 7; i++)
    {
        x[i][cfp + 72] = 179;
    }
    for (int i = rfp + 1; i < rfp + 7; i++)
    {
        x[i][cfp + 79] = 179;
    }
    for (int i = cfp + 73; i <= cfp + 78; i++)
    {
        x[rfp][i] = 196;
    }
    for (int i = cfp + 75; i <= cfp + 76; i++)
    {
        x[rfp + 2][i] = 196;
    }
    for (int i = cfp + 75; i <= cfp + 76; i++)
    {
        x[rfp + 5][i] = 196;
    }
    for (int i = rfp + 3; i < rfp + 5; i++)
    {
        x[i][cfp + 77] = 179;
    }
    for (int i = rfp + 3; i < rfp + 5; i++)
    {
        x[i][cfp + 74] = 179;
    }
    for (int i = cfp + 73; i <= cfp + 78; i++)
    {
        x[rfp + 7][i] = 196;
    }
    // m
    for (int i = cfp + 85; i <= cfp + 86; i++)
    {
        x[rfp + 7][i] = 196;
    }
    for (int i = cfp + 85; i <= cfp + 86; i++)
    {
        x[rfp][i] = 196;
    }
    for (int i = rfp + 1; i < rfp + 7; i++)
    {
        x[i][cfp + 84] = 179;
    }
    for (int i = rfp + 1; i <= rfp + 2; i++)
    {
        x[i][cfp + 87] = 179;
    }
    for (int i = cfp + 88; i <= cfp + 96; i++)
    {
        x[rfp + 3][i] = 196;
    }
    for (int i = rfp + 4; i <= rfp + 6; i++)
    {
        x[i][cfp + 97] = 179;
    }
    for (int i = rfp + 5; i <= rfp + 6; i++)
    {
        x[i][cfp + 95] = 179;
    }
    for (int i = rfp + 4; i <= rfp + 6; i++)
    {
        x[i][cfp + 90] = 179;
    }
    for (int i = rfp + 5; i <= rfp + 6; i++)
    {
        x[i][cfp + 92] = 179;
    }
    for (int i = cfp + 96; i <= cfp + 96; i++)
    {
        x[rfp + 7][i] = 196;
    }
    for (int i = cfp + 88; i <= cfp + 94; i++)
    {
        x[rfp + 4][i] = 196;
    }
    for (int i = rfp + 5; i <= rfp + 6; i++)
    {
        x[i][cfp + 87] = 179;
    }
    x[rfp + 4][cfp + 91] = ' ';
    x[rfp + 4][cfp + 92] = ' ';
    x[rfp + 4][cfp + 90] = ' ';
    x[rfp + 7][cfp + 91] = 196;
    // E
    for (int i = rfp + 1; i <= rfp + 6; i++)
    {
        x[i][cfp + 103] = 179;
    }
    for (int i = rfp + 2; i <= rfp + 5; i++)
    {
        x[i][cfp + 105] = 179;
    }
    for (int i = cfp + 106; i <= cfp + 109; i++)
    {
        x[rfp + 3][i] = 196;
    }
    x[rfp + 3][cfp + 105] = ' ';
    x[rfp + 4][cfp + 105] = ' ';
    x[rfp + 3][cfp + 110] = 58;
    x[rfp + 4][cfp + 110] = 58;
    for (int i = cfp + 106; i <= cfp + 109; i++)
    {
        x[rfp + 4][i] = 196;
    }
    for (int i = cfp + 104; i <= cfp + 109; i++)
    {
        x[rfp][i] = 196;
    }
    for (int i = cfp + 106; i <= cfp + 109; i++)
    {
        x[rfp + 1][i] = 196;
    }
    x[rfp][cfp + 110] = 58;
    x[rfp + 1][cfp + 110] = 58;
    for (int i = cfp + 106; i <= cfp + 109; i++)
    {
        x[rfp + 6][i] = 196;
    }
    for (int i = cfp + 104; i <= cfp + 109; i++)
    {
        x[rfp + 7][i] = 196;
    }
    x[rfp + 6][cfp + 110] = 58;
}

void MoveHero(int& rHero, int& cHero, char UserDes, char x[][1330])
{
    if (UserDes == 'w')
    {
        rHero -= 5;
    }
    if (UserDes == 's')
    {
        rHero += 5;
    }
    if (UserDes == 'a')
    {
        cHero -= 5;

    }
    if (UserDes == 'd')
    {
        cHero += 5;
    }
}
void clear(char X[][1330])
{
    for (int r = 0; r < 64; r++)
    {
        for (int c = 0; c < 420; c++)
        {
            X[r][c] = ' ';
        }
    }
}
void ersemhero(char x[][1330], int rhero, int chero)
{
    x[rhero][chero + 1] = 79;
    x[rhero][chero + 3] = 79;
    x[rhero - 1][chero + 1] = 179;
    x[rhero - 1][chero + 3] = 179;
    x[rhero - 2][chero + 1] = 47;
    x[rhero - 2][chero + 3] = 92;
    x[rhero - 3][chero + 2] = 95;
    //////////////legs
    x[rhero - 3][chero + 1] = 92;
    x[rhero - 3][chero + 3] = 47;
    x[rhero - 4][chero] = 61;
    x[rhero - 4][chero + 1] = 61;
    x[rhero - 4][chero + 2] = 61;
    x[rhero - 4][chero + 3] = 61;
    x[rhero - 4][chero + 4] = 39;
    x[rhero - 4][chero + 5] = 61;
    x[rhero - 4][chero + 6] = 179;
    x[rhero - 3][chero + 6] = 217;
    x[rhero - 5][chero + 6] = 191;
    /////////////////////gun pos
    x[rhero - 4][chero + 7] = 240;
    //////////////////////

    x[rhero - 4][chero - 1] = 40;
    x[rhero - 4][chero - 2] = 204;
    x[rhero - 5][chero + 1] = 47;
    x[rhero - 5][chero + 3] = 92;
    x[rhero - 5][chero] = 45;
    x[rhero - 6][chero + 2] = 95;
    x[rhero - 6][chero + 3] = 47;
    x[rhero - 6][chero + 1] = 92;
    x[rhero - 7][chero] = 95;
    x[rhero - 7][chero + 1] = 95;
    x[rhero - 7][chero + 2] = 95;
    x[rhero - 7][chero + 3] = 95;
    x[rhero - 7][chero + 4] = 95;
    x[rhero - 7][chero - 1] = 47;
    x[rhero - 7][chero + 5] = 92;
    x[rhero - 8][chero] = 95;
    x[rhero - 8][chero + 1] = 47;
    x[rhero - 9][chero + 2] = 95;
    x[rhero - 8][chero + 3] = 92;

}
void ersmselem(char x[][1330], int rselem, int cselem) {
        x[rselem][cselem] = '|';
        x[rselem][cselem + 1] = '|';
        x[rselem][cselem + 2] = '_';
        x[rselem][cselem + 3] = '_';
        x[rselem][cselem + 4] = '_';
        x[rselem][cselem + 5] = '_';
        x[rselem][cselem + 6] = '_';
        x[rselem][cselem +7 ] = '|';
        x[rselem][cselem +8] = '|';
        ////////
        x[rselem+1][cselem] = '|';
        x[rselem+1][cselem + 1] = '|';
        x[rselem+1][cselem + 2] = '_';
        x[rselem+1][cselem + 3] = '_';
        x[rselem+1][cselem + 4] = '_';
        x[rselem+1][cselem + 5] = '_';
        x[rselem+1][cselem + 6] = '_';
        x[rselem+1][cselem + 7] = '|';
        x[rselem+1][cselem + 8] = '|';
        //////////
        x[rselem+2][cselem] = '|';
        x[rselem+2][cselem + 1] = '|';
        x[rselem+2][cselem + 2] = '_';
        x[rselem+2][cselem + 3] = '_';
        x[rselem+2][cselem + 4] = '_';
        x[rselem+2][cselem + 5] = '_';
        x[rselem+2][cselem + 6] = '_';
        x[rselem+2][cselem + 7] = '|';
        x[rselem+2][cselem + 8] = '|';
        ////////////
        x[rselem+3][cselem] = '|';
        x[rselem+3][cselem + 1] = '|';
        x[rselem+3][cselem + 2] = '_';
        x[rselem+3][cselem + 3] = '_';
        x[rselem+3][cselem + 4] = '_';
        x[rselem+3][cselem + 5] = '_';
        x[rselem+3][cselem + 6] = '_';
        x[rselem+3][cselem + 7] = '|';
        x[rselem+3][cselem + 8] = '|';
        /////////////
        x[rselem+4][cselem] = '|';
        x[rselem+4][cselem + 1] = '|';
        x[rselem+4][cselem + 2] = '_';
        x[rselem+4][cselem + 3] = '_';
        x[rselem+4][cselem + 4] = '_';
        x[rselem+4][cselem + 5] = '_';
        x[rselem+4][cselem + 6] = '_';
        x[rselem+4][cselem + 7] = '|';
        x[rselem+4][cselem + 8] = '|';
     //////////
        x[rselem+5][cselem] = '|';
        x[rselem+5][cselem + 1] = '|';
        x[rselem+5][cselem + 2] = '_';
        x[rselem+5][cselem + 3] = '_';
        x[rselem+5][cselem + 4] = '_';
        x[rselem+5][cselem + 5] = '_';
        x[rselem+5][cselem + 6] = '_';
        x[rselem+5][cselem + 7] = '|';
        x[rselem+5][cselem + 8] = '|';
 /////////
        x[rselem+6][cselem] = '|';
        x[rselem+6][cselem+1] = '|';
        x[rselem+6][cselem + 2] = '_';
        x[rselem+6][cselem + 3] = '_';
        x[rselem+6][cselem + 4] = '_';
        x[rselem+6][cselem + 5] = '_';
        x[rselem+6][cselem + 6] = '_';
        x[rselem+6][cselem + 7] = '|';
        x[rselem+6][cselem + 8] = '|';
        ///////////////
        x[rselem+7][cselem] = '|';
        x[rselem+7][cselem + 1] = '|';
        x[rselem+7][cselem + 2] = '_';
        x[rselem+7][cselem + 3] = '_';
        x[rselem+7][cselem + 4] = '_';
        x[rselem+7][cselem + 5] = '_';
        x[rselem+7][cselem + 6] = '_';
        x[rselem+7][cselem + 7] ='|';
        x[rselem+7][cselem + 8] = '|';
        /////////////
        x[rselem+8][cselem] = '|';
        x[rselem+8][cselem + 1] = '|';
        x[rselem+8][cselem + 2] = '_';
        x[rselem+8][cselem + 3] = '_';
        x[rselem+8][cselem + 4] = '_';
        x[rselem+8][cselem + 5] = '_';
        x[rselem+8][cselem + 6] = '_';
        x[rselem+8][cselem +7 ] = '|';
        x[rselem+8][cselem +8] = '|';
        /////////////
        x[rselem+9][cselem] = '|';
        x[rselem+9][cselem + 1] = '|';
        x[rselem+9][cselem + 2] = '_';
        x[rselem+9][cselem + 3] = '_';
        x[rselem+9][cselem + 4] = '_';
        x[rselem+9][cselem + 5] = '_';
        x[rselem+9][cselem + 6] = '_';
        x[rselem+9][cselem + 7] = '|';
        x[rselem+9][cselem + 8] = '|';
        ///////
        
        x[rselem+10][cselem] = '|';
        x[rselem+10][cselem + 1] = '|';
        x[rselem+10][cselem + 2] = '_';
        x[rselem+10][cselem + 3] = '_';
        x[rselem+10][cselem + 4] = '_';
        x[rselem+10][cselem + 5] = '_';
        x[rselem+10][cselem + 6] = '_';
        x[rselem+10][cselem + 7] = '|';
        x[rselem+10][cselem + 8] = '|';
        
}
void drawEnemy1(int renm, int cenm, char X[][1330]) {
    X[renm][cenm] = ' ';
    X[renm][cenm + 1] = ' ';
    X[renm][cenm + 2] = ' ';
    X[renm][cenm + 3] = ' ';
    X[renm][cenm + 4] = ' ';
    X[renm][cenm + 5] = ' ';
    X[renm][cenm + 6] = '_';
    X[renm][cenm + 7] = '_';
    //////////////////////
    X[renm + 1][cenm] = ' ';
    X[renm + 1][cenm + 1] = ' ';
    X[renm + 1][cenm + 2] = ' ';
    X[renm + 1][cenm + 3] = '_';
    X[renm + 1][cenm + 4] = '_';
    X[renm + 1][cenm + 5] = '-';
    X[renm + 1][cenm + 6] = '-';
    X[renm + 1][cenm + 7] = '-';
    X[renm + 1][cenm + 8] = '-';
    X[renm + 1][cenm + 9] = '_';
    X[renm + 1][cenm + 10] = '_';
    ////////////////////////
    X[renm + 2][cenm] = ' ';
    X[renm + 2][cenm + 1] = ' ';
    X[renm + 2][cenm + 2] = '{';
    X[renm + 2][cenm + 3] = ' ';
    X[renm + 2][cenm + 4] = ' ';
    X[renm + 2][cenm + 5] = 'q';
    X[renm + 2][cenm + 6] = ' ';
    X[renm + 2][cenm + 7] = 'q';
    X[renm + 2][cenm + 8] = ' ';
    X[renm + 2][cenm + 9] = ' ';
    X[renm + 2][cenm + 10] = ' ';
    X[renm + 2][cenm + 11] = '}';
    /////////////////////////
    X[renm + 3][cenm] = '_';
    X[renm + 3][cenm + 1] = '_';
    X[renm + 3][cenm + 2] = '{';
    X[renm + 3][cenm + 3] = '_';
    X[renm + 3][cenm + 4] = '_';
    X[renm + 3][cenm + 5] = '|';
    X[renm + 3][cenm + 6] = '|';
    X[renm + 3][cenm + 7] = '_';
    X[renm + 3][cenm + 8] = '_';
    X[renm + 3][cenm + 9] = '_';
    X[renm + 3][cenm + 10] = '_';
    X[renm + 3][cenm + 11] = '}';
    //////////////////////////
    X[renm + 4][cenm] = 92;
    X[renm + 4][cenm + 1] = ' ';
    X[renm + 4][cenm + 2] = 92;
    X[renm + 4][cenm + 3] = '/';
    X[renm + 4][cenm + 4] = ' ';
    X[renm + 4][cenm + 5] = '|';
    X[renm + 4][cenm + 6] = '|';
    X[renm + 4][cenm + 7] = ' ';
    X[renm + 4][cenm + 8] = ' ';
    X[renm + 4][cenm + 9] = 92;
    ////////////////////////////
    X[renm + 5][cenm] = ' ';
    X[renm + 5][cenm + 1] = 92;
    X[renm + 5][cenm + 2] = '_';
    X[renm + 5][cenm + 3] = '|';
    X[renm + 5][cenm + 4] = ' ';
    X[renm + 5][cenm + 5] = '-';
    X[renm + 5][cenm + 6] = ' ';
    X[renm + 5][cenm + 7] = ' ';
    X[renm + 5][cenm + 8] = 92;
    X[renm + 5][cenm + 9] = ' ';
    X[renm + 5][cenm + 10] = 92;
    ////////////////////////////
    X[renm + 6][cenm] = ' ';
    X[renm + 6][cenm + 1] = ' ';
    X[renm + 6][cenm + 2] = ' ';
    X[renm + 6][cenm + 3] = '|';
    X[renm + 6][cenm + 4] = ' ';
    X[renm + 6][cenm + 5] = ' ';
    X[renm + 6][cenm + 6] = ' ';
    X[renm + 6][cenm + 7] = ' ';
    X[renm + 6][cenm + 8] = '/';
    X[renm + 6][cenm + 9] = '_';
    X[renm + 6][cenm + 10] = '/';
    X[renm + 6][cenm + 11] = '/';
    //////////////////////////
    X[renm + 7][cenm] = ' ';
    X[renm + 7][cenm + 1] = ' ';
    X[renm + 7][cenm + 2] = ' ';
    X[renm + 7][cenm + 3] = '|';
    X[renm + 7][cenm + 4] = '=';
    X[renm + 7][cenm + 5] = ' ';
    X[renm + 7][cenm + 6] = '=';
    X[renm + 7][cenm + 7] = ' ';
    X[renm + 7][cenm + 8] = '=';
    X[renm + 7][cenm + 9] = '|';
    //////////////////////////
    X[renm + 8][cenm] = ' ';
    X[renm + 8][cenm + 1] = ' ';
    X[renm + 8][cenm + 2] = ' ';
    X[renm + 8][cenm + 3] = 39;
    X[renm + 8][cenm + 4] = '-';
    X[renm + 8][cenm + 5] = '-';
    X[renm + 8][cenm + 6] = '-';
    X[renm + 8][cenm + 7] = '-';
    X[renm + 8][cenm + 8] = '-';
    X[renm + 8][cenm + 9] = 39;
    /////////////////////////
    X[renm + 9][cenm] = ' ';
    X[renm + 9][cenm + 1] = ' ';
    X[renm + 9][cenm + 2] = ' ';
    X[renm + 9][cenm + 3] = '(';
    X[renm + 9][cenm + 4] = '_';
    X[renm + 9][cenm + 5] = '|';
    X[renm + 9][cenm + 6] = ' ';
    X[renm + 9][cenm + 7] = '(';
    X[renm + 9][cenm + 8] = '_';
    X[renm + 9][cenm + 9] = '|';
}
void ersmtare2(char x[][1330], int rtare2, int ctare2) {
    for (int i = 0; i < 1330; i++) {
        x[60][i] = '_';
    }
}
void ersemcloud(char x[][1330], int rcloud, int ccloud)
{
    x[rcloud][ccloud] = 124;
    x[rcloud - 1][ccloud] = 47;
    x[rcloud - 2][ccloud + 1] = 44;
    x[rcloud - 2][ccloud + 2] = 45;
    x[rcloud - 2][ccloud + 3] = 126;
    x[rcloud - 2][ccloud + 4] = 126;
    x[rcloud - 2][ccloud + 5] = 45;
    x[rcloud - 2][ccloud + 6] = 40;
    x[rcloud - 3][ccloud + 7] = 44;
    x[rcloud - 3][ccloud + 8] = 45;
    x[rcloud - 3][ccloud + 9] = 126;
    x[rcloud - 3][ccloud + 10] = 126;
    x[rcloud - 3][ccloud + 11] = 45;
    x[rcloud - 3][ccloud + 12] = 46;
    x[rcloud - 2][ccloud + 13] = 41;
    x[rcloud - 2][ccloud + 14] = 95;
    x[rcloud - 2][ccloud + 15] = 95;
    x[rcloud - 1][ccloud + 16] = 126;
    x[rcloud - 1][ccloud + 17] = 45;
    x[rcloud - 1][ccloud + 18] = 46;
    x[rcloud][ccloud + 19] = 92;
    x[rcloud + 1][ccloud + 19] = 44;
    x[rcloud + 2][ccloud + 18] = 46;
    x[rcloud + 3][ccloud + 17] = 126;
    x[rcloud + 3][ccloud + 16] = 45;
    x[rcloud + 3][ccloud + 15] = 46;
    x[rcloud + 3][ccloud + 14] = 95;
    x[rcloud + 3][ccloud + 13] = 95;
    x[rcloud + 3][ccloud + 12] = 95;
    x[rcloud + 3][ccloud + 11] = 95;
    x[rcloud + 3][ccloud + 10] = 95;
    x[rcloud + 3][ccloud + 9] = 95;
    x[rcloud + 3][ccloud + 8] = 95;
    x[rcloud + 3][ccloud + 7] = 95;
    x[rcloud + 3][ccloud + 6] = 95;
    x[rcloud + 3][ccloud + 5] = 95;
    x[rcloud + 3][ccloud + 4] = 46;
    x[rcloud + 3][ccloud + 3] = 45;
    x[rcloud + 3][ccloud + 2] = 39;
    x[rcloud + 2][ccloud + 1] = 92;
    x[rcloud + 1][ccloud] = 92;
}
void ersemskl3(char x[][1330], int rskl, int cskl)
{
    x[rskl][cskl] = 239;

    x[rskl][cskl + 3] = 239;

    /////////////////////////
    x[rskl - 1][cskl] = 124;
    x[rskl - 1][cskl + 2] = 92;
    /////////////////////////
    x[rskl - 2][cskl] = 47;
    x[rskl - 2][cskl + 2] = 124;
    x[rskl - 2][cskl - 2] = 34;
    x[rskl - 2][cskl - 3] = 39;


    ////////////////////////
    x[rskl - 3][cskl - 4] = 34;
    x[rskl - 3][cskl + 1] = 39;
    x[rskl - 3][cskl - 2] = 124;
    x[rskl - 3][cskl - 3] = 92;
    ////////////////////////
    x[rskl - 4][cskl] = 95;
    x[rskl - 4][cskl + 1] = 47;
    x[rskl - 4][cskl - 1] = 92;
    x[rskl - 4][cskl - 2] = 47;
    x[rskl - 4][cskl - 4] = 39;
    x[rskl - 4][cskl - 5] = 92;
    ////////////////////////
    x[rskl - 5][cskl + 1] = 46;
    x[rskl - 5][cskl] = 96;
    x[rskl - 5][cskl - 1] = 46;
    x[rskl - 5][cskl - 2] = 40;
    x[rskl - 5][cskl - 3] = 47;
    x[rskl - 5][cskl - 4] = 124;
    x[rskl - 5][cskl - 6] = 124;
    //////////////////////
    x[rskl - 6][cskl - 6] = 47;
    x[rskl - 7][cskl - 5] = 47;
    x[rskl - 8][cskl - 4] = 46;
    x[rskl - 8][cskl - 3] = 45;
    x[rskl - 8][cskl - 2] = 39;
    x[rskl - 9][cskl - 1] = 95;
    x[rskl - 9][cskl] = 95;
    x[rskl - 9][cskl + 1] = 95;
    x[rskl - 9][cskl + 2] = 95;
    x[rskl - 9][cskl + 3] = 95;
    x[rskl - 9][cskl + 4] = 95;
    x[rskl - 6][cskl - 4] = 47;
    x[rskl - 6][cskl - 2] = 95;
    x[rskl - 7][cskl - 3] = 46;
    x[rskl - 7][cskl - 2] = 95;
    x[rskl - 7][cskl - 1] = 39;
    x[rskl - 8][cskl] = 95;
    x[rskl - 8][cskl + 1] = 95;
    x[rskl - 8][cskl + 2] = 95;
    x[rskl - 8][cskl + 3] = 95;
    x[rskl - 8][cskl + 4] = 95;
}
void Movehero(int& rHero, int& cHero, char UserDes, char x[][1330])
{
    
    int ccchero = cHero;
    if (UserDes == 'w')
    {
        rHero -= 5;
    }
    if (UserDes == 's')
    {
        rHero += 5;
    }
    if (UserDes == 'a')
    {
        cHero -= 5;

    }
    if (UserDes == 'd')
    {
        cHero += 5;
    }


}
void moveenem(int& renm, int& cenm, char x[][1330]) 
{
    
}
void ermembta(int rbta, int cbta, char X[][1330])
{
    X[rbta][cbta] = ' ';
    X[rbta][cbta + 1] = ' ';
    X[rbta][cbta + 2] = '_';
    /////////////////////
    X[rbta + 1][cbta] = '>';
    X[rbta + 1][cbta + 1] = '(';
    X[rbta + 1][cbta + 2] = '.';
    X[rbta + 1][cbta + 3] = ')';
    X[rbta + 1][cbta + 4] = '_';
    X[rbta + 1][cbta + 5] = '_';
    //////////////////////
    X[rbta + 2][cbta] = ' ';
    X[rbta + 2][cbta + 1] = '(';
    X[rbta + 2][cbta + 2] = '_';
    X[rbta + 2][cbta + 3] = '_';
    X[rbta + 2][cbta + 4] = '_';
    X[rbta + 2][cbta + 5] = '/';
}
void harakbta(int rbta, int cbta,int &dirb, char X[][1330])
{
    cbta += dirb;
}

void main()
{
    char X[64][1330];
    int rHero = 59, cHero = 20;
    int rWelcome = 28, cWelcome = 340;
    int clearr = 0;
    int rcloud = 3, ccloud = 10;
    int rcld = 3, ccld = 60;
    int csem;
    int rsem;
    int dirb = 2;
    int page = 0;
    int rselem = 100;
    int cselem = 100;
    int renm = 49, cenm = 160;
    char moveHero;
    int rbta = 4;
    int cbta = 40;
  
   
    for (;;)
    {
        
        for (; !_kbhit();)
        {
            ClearAndDrawFixedObject(X, rWelcome, cWelcome);
            frame(X, rWelcome, cWelcome);
            if (clearr == 0)
            {
                Welcome(X);

            }
          /// ersemcloud(X, 10, 10);
            clearr++;
            ClearAndDrawFixedObject(X, rWelcome, cWelcome);
            frame(X, rWelcome, cWelcome);
            ersemhero(X, rHero, cHero);
            ersemcloud(X, 20, 35);
            ersemcloud(X, 12, 90);
            ersemcloud(X, 30, 150);
            ersemcloud(X, 22, 95);
            ersemcloud(X, 17, 400);
            ersemcloud(X, 13, 450);
            ersemcloud(X, 10, 470);

            ersemcloud(X, 15, 500);

            ersemcloud(X, 10, 550);

            ersemcloud(X, 10, 570);

            ersemcloud(X, 10, 590);

            ersmselem(X, 50, 60);

            drawEnemy1(renm, cenm, X);

            ersmtare2(X, 70, 30);

            ermembta(rbta, cbta, X);
            harakbta(rbta, cbta, dirb, X);

            CoutMatToScreen(X);

        }
        ersemhero(X, rHero, cHero);
        moveHero = _getch();
        Movehero(rHero, cHero, moveHero, X);
       





    }

}
Editor is loading...
Leave a Comment