Getting ASCII Code

So in this simple RPG in CMD I'm having trouble getting an ASCII character that was converted from a character. That sounds a little confusing so let me show you.

Here is my map:
1
2
3
4
5
6
7
8
9
10
char Map2[10][30] = {"                           ",
                     "         CCCC              ",
                     "       CCCCCCCC            ",
                     "       CCCCCCCC            ",
                     "         CCCC              ",
                     "                           ",
                     "            @ B            ",
                     "    B      Bddd ddd       >",
                     "ddddddddddddddd ddddddddddd",
                     "ddddddddddddddddddddddddddd" };

ds are converted somewhere down the line to ░:
1
2
3
4
case 'd':
                    {
                        Map2[y][x] = dirt;
                    }break;

where dirt equals 176, the code for ░.

There is where I have trouble:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
case ' ':
                                {
                                    if(Map2[y2][x2] == ' '){
                                        if(Map2[y3][x2] == ' '){
                                            cout << "You cannot jump down there!";
                                        }else if(Map2[y3][x2] == 'd'){ <--
                                            cout << "test"; 
                                        }

                                    }else{
                                        Map2[y][x] = ' ';
                                        x += 1;
                                        Map2[y][x2] = '@';
                                    }

                                }break;


Where I have the arrow (Line 6) is where my problem is. When I check to see if 'd' is there, it doesn't return "test". I understand this is because previously I had changed d to ░, but if I just put ░ in the code, that doesn't work, neither does putting 176. If I don't convert d to ░, "test" is returned.

So the questions is, how can I get ░ to return "test"?
Declare Map2 as unsigned char Map2[10][30]. char can hold values between +128 and -128, but '░' has ascii value 176, so comparison didn't work.
Topic archived. No new replies allowed.