Closed Pan7 closed 2 years ago
The loops to fill the rest of the bytes in the unsigned
value seems like overkill to me. If size of int
/unsigned
is not four bytes, lots of stuff will break. The solution would probably be sized types like uint32_t
, not supporting 8-byte int or whatever everywhere which would also break file formats, VM APIs, and networking.
I don't think there is an issue with ColorBytes4() which sets all four bytes.
All ColorBytes3 would need to do is set the fourth byte:
( (byte *)&i )[3] = 0;
However nothing uses ColorBytes3() so it could be removed instead.
Setting the fourth byte is probably better altought the compiler optimizes the other code. Closing this pr
See https://github.com/ioquake/ioq3/issues/459