[aquaria] Enabled Windows compiling with Visual Studio

prog2 programmer02 at gmail.com
Mon Jun 7 15:35:49 EDT 2010


Hello there!

Building upon the previous Windows compile patch, I've further
modified the CMake script and sources to produce and compile a Visual
Studio project (tested with VC7, 2002 version). I added Windows
libraries for OpenAL and SDL, and the linked .exe now runs
successfully from my Steam Aquaria directory.

I had to remove FT_CONFIG_CONFIG_H and FT_CONFIG_MODULES_H from the
Freetype2 definitions, since VS wouldn't process the quotation marks
correctly as they were. Rather than changing them, I simply removed
them and let the Freetype2 build system work it's magic like it seems
supposed to do. Is there a reason why these should be specified for
non-VS systems?

There was some trouble getting the OpenGL-macros in Core.cpp to work.
I noticed that Pontos removed the contents of GLAPIENTRY for Windows
as well, and I added APIENTRY back for VS since that's how they're
defined in the new gl.h. There's still something off, since I get some
500 warnings during linking ("locally defined symbol _x imported"),
but it works :) I also had to slightly move a parenthesis at line
1773, which I'm hoping won't affect other configurations since now VS
is the only one with a non-empty define as far as I can tell...

As already mentioned, the executable runs, and performance seems good
at least for the first couple of levels. There's a weird exception
though; loading a big save file takes seemingly forever. When I
attempted to view my list of saved games (including saves at the end
of the game which are quite large) the game froze for a good 5 minutes
before I killed the process. I tracked it down to the while-loop at
lines 573-581 in tinyxmlparser.cpp trying to parse my uncompressed 4MB
save file (127KB compressed), but I have no idea why it is so slow.
Saves from an early point in a MOD shows up fine (they're only 2KB
compressed).

That's all for now. I've attached a hg export diff with my changes,
using the git extended format to include the binary libraries.

/prog2
-------------- next part --------------
A non-text attachment was scrubbed...
Name: visual.diff
Type: application/octet-stream
Size: 33940 bytes
Desc: not available
URL: <http://icculus.org/pipermail/aquaria/attachments/20100607/8a45af65/attachment-0001.obj>


More information about the aquaria mailing list