Reorganizando codigo, otra vez :p
This commit is contained in:
27
src/Machine.h
Normal file
27
src/Machine.h
Normal file
@@ -0,0 +1,27 @@
|
||||
#ifndef MACHINE_H
|
||||
#define MACHINE_H
|
||||
|
||||
#include "Graphics/Chip8Display.h"
|
||||
#include "Graphics/Graphics.h"
|
||||
#include "Interpreter/Interpreter.h"
|
||||
#include "SDL3/SDL_events.h"
|
||||
|
||||
class Machine {
|
||||
std::shared_ptr<MachineState> machine_state;
|
||||
std::unique_ptr<Interpreter> interpreter;
|
||||
std::unique_ptr<Graphics> graphics;
|
||||
std::unique_ptr<Chip8Display> chip8_display;
|
||||
|
||||
int ips;
|
||||
uint64_t last_update_time;
|
||||
double accumulator;
|
||||
|
||||
void execute_interpreter();
|
||||
|
||||
public:
|
||||
Machine();
|
||||
void iterate();
|
||||
static bool on_event(const SDL_Event* event);
|
||||
};
|
||||
|
||||
#endif //MACHINE_H
|
||||
Reference in New Issue
Block a user