38 unsigned int lastLine;
41 unsigned int cyclesPerLine;
59 uint8_t getXpos(
unsigned int lineCycle)
const
62 lineCycle += cyclesPerLine;
67 if ((cyclesPerLine == 65) && (lineCycle > (61 - 13)))
72 return lineCycle << 2;
84 lastLine = height - 1;
85 cyclesPerLine = width;
101 uint8_t
getX()
const {
return lpx; }
106 uint8_t
getY()
const {
return lpy; }
120 switch (cyclesPerLine)
143 bool trigger(
unsigned int lineCycle,
unsigned int rasterY)
151 if ((rasterY == lastLine) && (lineCycle > 0))
157 lpx = getXpos(lineCycle) + 2;
uint8_t getX() const
Definition lightpen.h:101
uint8_t getY() const
Definition lightpen.h:106
void reset()
Definition lightpen.h:91
bool retrigger()
Definition lightpen.h:113
bool trigger(unsigned int lineCycle, unsigned int rasterY)
Definition lightpen.h:143
void setScreenSize(unsigned int height, unsigned int width)
Definition lightpen.h:82
void untrigger()
Definition lightpen.h:168