[mw-devel] MW3 r878 - in branches: . portable/src

Justin Mitchell arthur at sucs.org
Fri Apr 28 17:49:05 BST 2006


On Fri, Apr 28, 2006 at 02:33:54AM +0100, Peter Berry wrote:
> >its not going to help much, those are packed structs,
> >on a 64 system the packing system will be different,
> >so the vars will be the right size (didnt matter if they got bigger anyway)
> >but in the wrong places (totally fatal when reading old saved data).
> 
> I don't see any packing declarations in bb.h, which is where said structs 
> are all defined. In any case I've tested the old folder files with a 64 
> bit build and they (seem to) work fine.

then we got lucky, because afaik it will automatically align vars
within a struct so that the variables dont get split across word align
boundaries.

eg. if you had a char[3] and an long in a struct,
in 32bit: the byte ordering is: c c c _ l l l l 
as starting a long on byte[3] would be silly, so one padding byte.
in 64bit: the byte ordering is: c c c _ _ _ _ _ l l l l l l l l 
so that the long starts on a 64bit word boundary, the part between is wasted.

so when thats translated to disk, as it does quite directly, it would 
obviously screw up.

anyways thats not important.

as far as xml database is concerned, please go and hit yourself with 
a heavy book, one on speed and optimsation for preference.

marvin uses sqlite for that, its small, and very fast, and acid compliant.

but if you really want to work on improving mw3, start by abstracting the
ipc mechanism, so it could be replaced by sockets and a client-server model.



More information about the mw-devel mailing list