Compiling for big endian systems I have compiled IVAN for AmigaOS 4 (PowerPC) some days ago. Sadly, I kept crashing when entering from town (or dungeon) back to the world map. Also save games didn't work.
I couldn't find any endian problems from felib/include/save.h which was the most logical suspect. After some debugging I edited main/include/proto.h a bit:
template <class type> inline inputfile& operator>>(inputfile& SaveFile, type*& Class)
{
ushort Type = 0; // used to be int
SaveFile >> (ushort&)Type;
Now the game doesn't crash anymore when moving back to the world map. However, save games don't yet work but at least the crash log is always identical now:
Symbol info:
Instruction pointer 0x7135DF6C belongs to module "ivan" (PowerPC)
Symbol: _ZNK4item9GetVolumeEv + 0x14 in section 1 offset 0x0005DF4C
Stack trace:
_ZNK4item9GetVolumeEv()+0x14 (section 1 @ 0x5df4c)
_ZN5stack4LoadER9inputfile()+0xF0 (section 1 @ 0x2d425c)
_ZN9character4LoadER9inputfile()+0x50 (section 1 @ 0x1eaa4)
_ZN8humanoid4LoadER9inputfile()+0x2C (section 1 @ 0xafc98)
_ZN10playerkind4LoadER9inputfile()+0x28 (section 1 @ 0xc7b5c)
_ZNK18characterprototype12SpawnAndLoadER9inputfile()+0x5C (section 1 @ 0x2e150)
_ZrsI9characterER9inputfileS2_RPT_()+0x88 (section 1 @ 0xcd18)
_ZN6square4LoadER9inputfile()+0x4C (section 1 @ 0xaf98)
_ZN7wsquare4LoadER9inputfile()+0x38 (section 1 @ 0x2effb8)
_ZN8worldmap4LoadER9inputfile()+0x480 (section 1 @ 0x2ebbec)
_ZrsR9inputfileRP8worldmap()+0x184 (section 1 @ 0x2ef388)
_ZN4game12LoadWorldMapERK8festring()+0x1E8 (section 1 @ 0x138f44)
_ZN4game4LoadERK8festring()+0x93C (section 1 @ 0x136b98)
_ZN4game4InitERK8festring()+0x2E8 (section 1 @ 0x133b00)
I will be investigating this when I have more time. If Mac users have problems with the game, try changing int to ushort as pasted above.
Comments?
Capehill- 12-08-2005
Ok, found similar code in main/source/stack.cpp:
void stack::Load(inputfile& SaveFile)
{
ushort SavedItems = 0; // was int!
SaveFile >> (ushort&)SavedItems;
Now also a saved game loaded (which was nice).
Capehill- 12-08-2005
There is also a potential problem in main/source/script.cpp:
void materialscript::Load(inputfile& SaveFile)
{
script::Load(SaveFile);
Config = 0;
SaveFile >> (ushort&)Config;
}
I haven't see this cause problems yet but maybe value should be read into a temporary ushort variable first. Config is "int" in materialscript class.
lenox- 01-11-2006
Thanks for the info....I will give these a try on the mac build.
One question: are you using the source code from CVS? Because in that version, the devs have made some changes to the code based upon some of my mac compatibility notes.
Capehill- 01-12-2006
@lenox:
I used the old source, I have been too lazy&busy to check the CVS ;)
I would like to know if you get the game working on Mac too...
lenox- 01-16-2006
As it stands I have been able to get IVAN to compile (on mac), but it will eventually crash once in the dungeon for a length of time.
Not sure how much support we'd get from the devs at the moment unfortunately, however they have been helpful in the past when the game was still being worked on.
Forumer™ is Voted #1 Free Forum Hosting provider
Build your own community today with the largest message board hosting company.