[Scummvm-devel] START_PACK_STRUCTS default changed -- port breakage

Torbjörn Andersson eriktorbjorn at telia.com
Sat Jul 22 18:46:36 CEST 2006


Max Horn wrote:

> My next change will be to remove GCC_PACK (assuming my testings for  
> that turn up positive).

Unfortunately, this change causes regressions. I know LordHoto already
fixed one (the size of the SCUMM engine's SaveInfoSection changed from
26 to 28 when the packed attribute was removed, causing new savegames to
be broken). The only other I'm aware of is that Full Throttle crashes
when punching your way out of the dumpster at the very start of the
game. I assume there are other problems as well, which will have to be
solved on a case-by-case, or should I say struct-by-struct, basis.

My guess - the documentation isn't entirely clear to me - is that the
#pragma only affects the alignment of the struct members, while the
attribute packs it to the smallest possible size.

Mind you, I was not aware of any problems with this until after the
change had been made. Removing dependencies on GCC features seems like a
good thing to me. Actually, I wouldn't mind if we didn't use packed
structs at all, but I know that's a lot of work.

Torbjörn




More information about the Scummvm-devel mailing list