I've made a couple more tiny steps in the right direction, but massive issues all around.
I don't even know where to start. I suppose I'll keep poking the parts of the code that aren't working,
until I learn enough about the issue to resolve it.
Until then, I can't do any of the fun stuff that is to be added next.
I am getting very impatient and aggravated.
The current problem is very vague.
When a new map tile is explored, it is supposed to check if a save of that map already exists, and if so,
just load the save.
Too bad it doesn't work, and I have no idea where the problem lies.
The most likely issue is that the detection of the existence of files is not working.
Here's the code that deals with that:
stringstream awayfile;
awayfile << "Away" << " " << worldx << " " << worldy << " " << worldz << ".bin";
ifstream myFile;
bool hasloaded = false;
myFile.open(awayfile.str().c_str(), ios::trunc | ios::in | ios::binary);
if(myFile){
myFile.read((char*)&myaway, sizeof (AwayData));
myFile.close();
hasloaded = true;
}
The overall issue is that it isn't detecting the maps present, and is creating a new map on top of the old one.
The other place the issue could be is in the translation of coords in my map transfer function.
Basically, if the game is moving the world map around incorrectly, it could be picking up empty spaces there.
I would have to identify and fix that problem on my own, as I have been attempting to do for a while.
Basically, if you want to help, proof-read that code, and tell me if it makes sense to you.