Once I reached the masks section in chapter 38, I found my C code that I’d copied from Windows failed because of the type byte. MSVC is a little bit more forgiving over somethings and one of those is the byte type which it accepts. In the Windows code, I had declared the mask arrays like this:
byte bulletmask; byte plmask; byte a1mask; byte a2mask; byte a3mask; byte a4mask;
But Clang in its wisdom barfed at that, not recognising the type byte. A simple fix was replace byte with char and all was well.
Looking into it, I loaded one of the Windows asteroids projects, built it and then did a ctrl-click on the byte type. It led me to a file called rpcndr.h in a Windows SDK folder and this line (191) of code.
typedef unsigned char byte;
It just shows! My er bad…