PDA

View Full Version : Save Game fix?


0marTheZealot
02-18-2004, 10:02 AM
Is there any way to fix the save game bugs (it crashes whenever you try to load games) under rott32? or do I have to devote a whole day to beat this game?

jbailey
02-18-2004, 06:43 PM
Hello,
The code listed below was originally for a fix related to saving a game, then reloading the save game and all of the windows were broken, I'm not sure this will help you, but here is the code:


#358099 Re: Saving shatters all windows...
06/21/03 06:46 PM

Fixed!

It was indeed a problem specific to big endian machines. I'll save you the details and just post the fixed piece of code from LoadMaskedWalls() in rt_door.c, the comments speak for themselves:

code:

for (i=0;i<maskednum;i++)
{
// Yet another endianness problem: the flags are stored in different byte
// order depending on the platform. This is bad, but I guess not many people
// will exchange game files anyway.
// Worse is that the original code here checked for the first byte of each
// flag, which only makes sense on little endian platforms. This can be
// fixed elegantly by using bit masks.
word flags; // used to be a byte

mw=maskobjlist[i];
size=sizeof(mw->flags);
memcpy(&flags,bufptr,size);
bufptr+=size;
if ((flags&0x00FF)!=(mw->flags&0x00FF)) // only check the 8 LSBs.
UpdateMaskedWall(i);
if (mw->flags&MW_SWITCHON)
mw->toptexture--;
}

This also fixes a dirty practice in the original code: a char was declared but then an int was memcopy'd into it.

Just insert the above code and re-compile and give it a try!

Hope this fixes your problem....

jbailey

Atum Ra
02-20-2004, 07:02 AM
Where exactly do i put that code and how do i 're-compile'
Im not a coder at all an its all alien to me http://forums.3drealms.com/ubbthreads/images/graemlins/confused.gif
All i want to do is be able to load my save games with out the game crashing too!!!!

jbailey
02-21-2004, 07:45 AM
Hello,
If you don't know how to recompile the rott executable at all, then the code listed is useless to you. Other things you could try would be to check your configuration settings, make sure everything in your config file is correct for your setup. If this fails to yield any results, you might have to play the game with a diffrent version of the executable. You can look on www.icculus.org (http://www.icculus.org) and click on the rott link there if you haven't already tried that.

jbailey

0marTheZealot
03-05-2004, 08:36 PM
so outside of coding there is no real way to do this....

jbailey
03-06-2004, 09:17 AM
If I understood your problem properly, then in my opinion no, there is no way to correct your problem with your current version of the executable you are running. The problem is in the source code that your executable was compiled from. That being the case, your only other option is to use a different version of the executable, as I mentioned in my last message, you can try the icculus version of the rott executable and see if that fixes your problem, you can download it at http://www.icculus.org and scroll down the page a bit and click on the rott link listed there. If you have already checked your configuration settings and they seem fine, then this is about your only other option that I know of at least. If you would like to learn how to re-compile your own executable, let me know and I'll help you out with that...
Also note that if you try a different version of the executable, then all of your current save games will more than likely be incompatable and won't load.

jbailey