27 namespace libsidplayfp
38 unsigned int lastLine;
41 unsigned int cyclesPerLine;
59 uint8_t getXpos(
unsigned int lineCycle)
const
62 lineCycle += cyclesPerLine-1;
66 return lineCycle << 2;
78 lastLine = height - 1;
79 cyclesPerLine = width;
95 uint8_t
getX()
const {
return lpx; }
100 uint8_t
getY()
const {
return lpy; }
109 bool retrigger(
unsigned int lineCycle,
unsigned int rasterY)
111 const bool triggered =
trigger(lineCycle, rasterY);
112 switch (cyclesPerLine)
132 bool trigger(
unsigned int lineCycle,
unsigned int rasterY)
140 if ((rasterY != lastLine) || (lineCycle == 0))
143 lpx = getXpos(lineCycle) + 2;
Definition: lightpen.h:35
uint8_t getX() const
Definition: lightpen.h:95
bool retrigger(unsigned int lineCycle, unsigned int rasterY)
Definition: lightpen.h:109
uint8_t getY() const
Definition: lightpen.h:100
void reset()
Definition: lightpen.h:85
bool trigger(unsigned int lineCycle, unsigned int rasterY)
Definition: lightpen.h:132
void setScreenSize(unsigned int height, unsigned int width)
Definition: lightpen.h:76
void untrigger()
Definition: lightpen.h:153