27 namespace libsidplayfp
38 unsigned int lastLine;
41 unsigned int cyclesPerLine;
59 uint8_t getXpos(
unsigned int lineCycle)
const
63 lineCycle += cyclesPerLine;
68 if ((cyclesPerLine == 65) && (lineCycle > (61 - 13)))
73 return lineCycle << 2;
85 lastLine = height - 1;
86 cyclesPerLine = width;
102 uint8_t
getX()
const {
return lpx; }
107 uint8_t
getY()
const {
return lpy; }
123 switch (cyclesPerLine)
146 bool trigger(
unsigned int lineCycle,
unsigned int rasterY)
154 if ((rasterY == lastLine) && (lineCycle > 0))
160 lpx = getXpos(lineCycle) + 2;
Definition: lightpen.h:35
uint8_t getX() const
Definition: lightpen.h:102
uint8_t getY() const
Definition: lightpen.h:107
void reset()
Definition: lightpen.h:92
bool retrigger()
Definition: lightpen.h:116
bool trigger(unsigned int lineCycle, unsigned int rasterY)
Definition: lightpen.h:146
void setScreenSize(unsigned int height, unsigned int width)
Definition: lightpen.h:83
void untrigger()
Definition: lightpen.h:171