[Scummvm-devel] START_PACK_STRUCTS default changed -- port breakage
Johannes Schickel
lordhoto at gmail.com
Sat Jul 22 20:37:39 CEST 2006
Max Horn wrote:
> That would be quite a big task, and would decrease code readability
> (IMHO)... Normally I'd say: We could undertake it, but I see nothing
> to be gained by it at this time. Show me a compiler we want to
> support that does not provide a suitable struct packing pragma, and
> we can discuss it. That's what I *would* say, normally.
>
I stated in the other mail I wrote, that the packed struct storing for
the ThumbnailHeader structure in the Scumm savegame code needed a hack
to be supported on palmos and the gp32 for example. See the old code:
#if defined(PALMOS_ARM) || defined(__GP32__)
// sizeof(header) is hardcoded here, because the compiler add padding to
// have a 4byte aligned struct and there is no easy way to pack it.
header.size = 14 + thumb.w*thumb.h*thumb.bytesPerPixel;
#else
header.size = sizeof(header) + thumb.w*thumb.h*thumb.bytesPerPixel;
#endif
It looks like we got allready some compilers/platforms which don't like
struckt packing or the porters simply don't know how to do it (which I
don't think)
// Johannes
More information about the Scummvm-devel
mailing list