Tim Allen 44a8c5a2b4 Update to v099r03 release.
byuu says:

Changelog:
- finished cleaning up the SFC core to my new coding conventions
- removed sfc/controller/usart (superseded by 21fx)
- hid Synchronize Video option from the menu (still in the configuration
  file)

Pretty much the only minor detail left is some variable names in the
SA-1 core that really won't look good at all if I move to camelCase,
so I'll have to rethink how I handle those. It's probably a good area
to attempt using BitFields, to see how it impacts performance. But I'll
do that in a test branch first.

But for the most part, this should be the end of the gigantic diffs (this
one was 174KiB), at least for the SFC/WS cores. Still have the FC/GB/GBA
cores to clean up more fully. Assuming we don't spot any new regressions,
we should be ~95% out of the woods on code cleanups breaking things.
2016-06-17 23:03:54 +10:00

23 lines
422 B
C++

struct Mouse : Controller {
enum : uint {
X, Y, Left, Right,
};
Mouse(bool port);
auto data() -> uint2;
auto latch(bool data) -> void;
private:
bool latched;
uint counter;
uint speed; //0 = slow, 1 = normal, 2 = fast
int x; //x-coordinate
int y; //y-coordinate
bool dx; //x-direction
bool dy; //y-direction
bool l; //left button
bool r; //right button
};