OOP great again ;)

4, Apr, 2020

The last annoying error was like that - mouse handling function got spinning handling 100% of one CPU. And it was buried under tons of oop abstraction, which was disorienting even the profiler. This reminded me function to check mouse position on amiga:

unsigned short xy = *(unsigned short volatile*)0xdff0a;
unsigned short x = xy >> 8;
unsigned short y = xy  & 0xff;

Yeap, so simple. I know there is int to pointer conversion. I know this maybe shall a little enhancement in some cases (you may want to track mouse more than 256 impulses). But, it was at most direct function call.