24 #include <propeller.h>
28 int rotateLeft(
int mask);
29 int rotateRight(
int mask);
55 int countmask = 0x0700;
89 popcount = (popupspot & countmask) >> 8;
94 if(molemask & (1<<popupspot)) {
96 LEDOUT((1<<popupspot) & molemask);
99 whacked = getButton(popupspot);
100 msleep(popuptime>>1);
101 whacked |= getButton(popupspot);
109 molemask &= ~(1<<popupspot);
119 molemask = rotateRight(molemask);
122 molemask = rotateLeft(molemask);
154 int rotateLeft(
int mask)
156 int temp = mask << 1;
157 mask = (temp & 0x100) ? 1 : 0;
165 int rotateRight(
int mask)
167 int temp = mask >> 1;
180 OUTA = (
OUTA & ~(0xff<<16)) | (val<<16);
197 return (getButtons() & (1<<n));
221 result = ~result & 0xFF;