Chip8-CPP/include/instruction_handler.h

18 lines
460 B
C
Raw Normal View History

2023-09-09 17:57:57 +00:00
#ifndef CHIP8_INSTRUCTION_HANDLER_H
#define CHIP8_INSTRUCTION_HANDLER_H
#include <map>
#include "chip8.h"
#include "instruction.h"
class InstructionHandler {
private:
typedef void (*Handler)(Chip8&, Instruction);
2023-09-09 17:57:57 +00:00
std::map<unsigned short, Handler> handlers = {};
static void handle0000(Chip8&, Instruction);
2023-09-09 17:57:57 +00:00
public:
InstructionHandler();
void handleInstruction(unsigned short, Chip8&, Instruction);
2023-09-09 17:57:57 +00:00
};
#endif //CHIP8_INSTRUCTION_HANDLER_H