LCDMakePattern macro unusable due to small bug

Ah, C macros—always fun to debug.
From pd_api_gfx.h:

#define LCDMakePattern(r0,r1,r2,r3,r4,r5,r6,r7,r8,r9,ra,rb,rc,rd,re,rf) (LCDPattern){(r0),(r1),(r2),(r3),(r4),(r5),(r6),(f7),(r8),(r9),(ra),(rb),(rc),(rd),(re),(rf)}

The bug: identifier "f7" is undefined

1 Like

How is this a bug? You're using r7 as the macro argument, but f7 within the macro
(edit: oh, this is in the SDK)

I'll file an issue so we can investigate!

I'm not sure now why I put LCDMakePattern() in there. I guess I added LCDOpaquePattern and thought I should make a macro for patterns with alpha values also, but it doesn't do anything but make things more confusing. I'm going to remove that and also take the cast out of LCDOpaquePattern() so you don't have to (for some reason I don't get) declare the LCDPattern static to use it.