1
0
Fork 0
2019-nes-emulator/Source/Input.hpp

33 lines
319 B
C++

#pragma once
#include <cstdint>
#include <cstdio>
enum Buttons
{
A = 0,
B = 1,
Select = 2,
Start = 3,
Up = 4,
Down = 5,
Left = 6,
Right = 7
};
class Input
{
public:
void Strobe(uint8_t* but);
uint8_t Poll();
private:
friend class NES;
bool strobe{};
uint8_t buttonIndex{};
uint8_t buttons[8]{};
};