You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I suspect that VBCC will align structure members on word or long word boundaries. So if you want to align the members on bytes instead (so the whole structure is 4 bytes), you should wrap the declaration with:
Thanks. I don't think this record ended up being used... it might be a hold over from when I started working on the code on my C256. It should probably be removed.
I saw it was not used, but I thought it was because it was not working :D
Sometimes it's just easier to use a unsigned long.
So a colour could really be defined as a union, e.g:
union color {
unsigned long l; // Requires the user to know the order of components but makes for easier conversion long <-> union
t_color4 argb;
}
Anyway, as you way it can probably be deleted until we need it.
"types.h" defines the following structure to represent a 32 bit color:
I suspect that VBCC will align structure members on word or long word boundaries. So if you want to align the members on bytes instead (so the whole structure is 4 bytes), you should wrap the declaration with:
as indicated on page 46 of the VBCC manual.
I haven't tested it though
It struck me because for the EmuTOS port I had the problem and had to use the packed attribute to indicate what I wanted to GCC.
The text was updated successfully, but these errors were encountered: