mirror of
https://github.com/bsnes-emu/bsnes.git
synced 2025-02-22 14:12:35 +01:00
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.
23 lines
422 B
C++
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
|
|
};
|