Spellcaster Studios

Make it happen…

Linux Porting, Part 3–The Linkagening, Part 2

Finally finished the 64-bit porting (syntax/compile-wise), and after a couple of hours, all libraries are linked!

So now, time to run the game for the first time:

failed_run

Bah, more issues with .SOs… Most of the stuff I actually compiled as a static library (or is included with the system), but this one I can’t… So after copying it to the proper directory (/usr/lib):

another_shot

That distorted looking thing is the game window! So the game started, but failed miserably to startup… Still, small victory!

Looking at the generated logs, it’s a problem with reading the textures… I even know what it is… I’m reading the DDS header with code like:

fread((unsigned char*)&(magic_number),sizeof(unsigned long),1,file);

Problem is that “unsigned long” under 32-bit compilation used to be a 32-bit number, and under 64-bit compilation is a 64-bit number, so that means that I’m reading more data, so everything screws up… I need to change all of that to something like:

fread((unsigned char*)&(magic_number),sizeof(uint32_t),1,file);

Which will take some time to do on the whole of the codebase…

The advantage of this is that I can do it under Windows, by compiling the game in 64-bit, since the same problem applies!

Now listening to “Forever is the World” by “Theatre of Tragedy”

Comment