by Spike » Fri Jun 03, 2011 12:09 am
from what I remember, there are not too many issues blocking it.
mostly its just warnings.
however...
there's a bug in the sprite code, from what I remember.
and then there's the big one.
qc strings are indexes into the string table. logically a 32bit index is just fine. the catch is that quake is EVIL and gives offsets into other bits of memory, namely the sv.client[X].name strings, as well as any builtins that return a temp string.
the 'simple' solution is to just allocate those string buffers in some block on the hunk, after the progs is loaded(names persist, so you probably want to have two copies of it).
However, frik_file's strzone needs some sort of dynamic memory.
To be honest, if frik_file uses the Z_Malloc functions to allocate memory, you end up with a signed pointer to the hunk. negative strings tend to be in the dynamic zone at the start of the hunk (so dynamic<0, 0<=stringtable<tablesize, entlump>=tablesize, tempstrings>=tablesize,netnames>=tablesize).
If those strings are arranged to always only refer to a heap object, and your heap does not exceed 2gb in size, there's no unsolvable issue.
Alternatively you can do it the fte/dp way, and use the upper bits as a string classification ident. more forwards thinking, but more changes up front.
if you're targetting windows only, I wouldn't bother. sure win64 builds are a nice thing to have... but geez, what's the point? noone knows what sort of windows they have. they don't understand 32bit or 64bit systems, they just know they're running windows! If you're lucky, they might know that its called 'XP'...
And even if you do get a 64bit build, msvc doesn't have the full feature set of the 32bit build, namely lacking edit-and-continue, which is basically the sole feature that puts msvc above any other ide, which is basically the only reason I boot windows instead of linux (linux gets higher fps anyway).
Oh, and two binaries build for different archetectures might see different versions of the registry.
You should generally not need to use intptr_t (the win32 equivelent is named DWORD_PTR, by the way). In most situations, a size_t should suffice. intptr_t is really only useful if you want to cast directly from a pointer to an int, which shouldn't really be done anyway.
A size_t should be fine for the alias model code (typically its a uintptr_t anyway), and is sized correctly for any ptr-ptr result anyway.
.