The game portion of the code is irrelevant.. It's based on a random number generator that only works if you're in the coordinates marked by '~'. My original C++ game is a while loop that continuously redraws a map, given a character position (X,Y). There are limits that the character, marked by 'X', cannot leave the boundaries of the map. As I said above, it's all in one huge 2D array given by example: int Map[17][22] = { ... } . That is how I drew the map, and the map is essentially re-declared and re-initialized every time an outside function called DrawMap(Position of Character) is called. That's how I made it so that the map looks the same every re-drawing except with the 'X' (Character) being in a different position.
So, given all of that, I have something that basically looks like this.
int a = 0, b = 0;
a = _getch();
if (a == 224)
b = _getch()
if (b == ...)
the different options for b are the different ASCII values for the arrow keys. That's how I get the 'X' to move around the map. What I'm wondering is, if I replace my map with graphics from SFML, will I still be able to implement this same type of code to move the character? Keep in mind, I have restrictions that say if character is in (x,y) and it's next to a wall, they cannot move into the wall. If you want to see the actual code, I'll send it to you. I don't want to just post my entire program because that ruins the point of me creating my own logic for it, especially because it could definitely be written in a lot of different ways.
ESSENTIALLY, all I'm asking is will I have to entirely rewrite my entire program? Or is it possible to merely replace my DrawMap() function with 2D graphics using SFML?