Well, as the title suggests...
I'm just starting with Dev-C++, really basic stuff. My eventual goal is to make a roguelike, so I'm starting out by generating a blank map.
Windows programming is a little beyond me for the time being (I'd like to get used to using C++ expressions and the C++ mindset before I even *think* about that), so I'm using the DOS interface provided by Windows and making a bas DOS program. Unfortunately, I cannot for the life of me figure out how to lock the DOS window into a certain width and height - something which is just a little bit crucial to what I'm trying to do. At the moment I'm having real problems setting how many characters wide the map display is.
I'm kind of not sure if this is something I can reconfigure via coding, since being a DOS app, it would normally be run fullscreen... Any advice on the matter would be greatly appreciated.
EDIT: Hm. I found out how to change the width, still not sure how to lock it in. But I suppose that's not really an issue.... My bad.
Unfortunately, I'm now having trouble with the character width. The printing section reads
Each field[x][y] is currently a ".", but for some reason, the x-value runs overboard, and I end up with far too many "."s, more than half again as many as I should have. I've tested the display, and it is 100 characters...Code:void mapprint() //function to display the map as a whole
{
int x(150); // initialise the map displayers's x location to allow for the screen display to be half of the map
int y(190); // initialise the map displayer's y location, likewise
while (y < 210) { //This may seem odd, but not all of the map is being displayed.
while (x < 251) { //This way, items/monsters/whatevers can be offscreen
cout<<field[x][y]; //yet still present in the game.
x++;
}
x = 0;
y++;
}
}
