mirror of
https://github.com/DerKoun/bsnes-hd.git
synced 2025-04-02 10:52:49 -04:00
27 lines
564 B
C++
27 lines
564 B
C++
struct Justifier : Controller {
|
|
enum : uint {
|
|
X, Y, Trigger, Start,
|
|
};
|
|
|
|
Justifier(uint port, bool chained);
|
|
|
|
auto data() -> uint2;
|
|
auto latch(bool data) -> void;
|
|
auto latch() -> void override;
|
|
auto draw(uint32_t* data, uint pitch, uint width, uint height) -> void override;
|
|
|
|
//private:
|
|
const bool chained; //true if the second justifier is attached to the first
|
|
const uint device;
|
|
bool latched;
|
|
uint counter;
|
|
uint prev;
|
|
|
|
bool active;
|
|
struct Player {
|
|
int x;
|
|
int y;
|
|
bool trigger;
|
|
bool start;
|
|
} player1, player2;
|
|
};
|