Create Emulator class for GUI with nav bar

This commit is contained in:
scawful
2023-08-19 14:12:57 -04:00
parent f0d0d9abc6
commit 54790366ef
2 changed files with 125 additions and 0 deletions

42
src/app/core/emulator.h Normal file
View File

@@ -0,0 +1,42 @@
#ifndef YAZE_APP_CORE_EMULATOR_H
#define YAZE_APP_CORE_EMULATOR_H
#include <cstdint>
#include <vector>
#include "app/emu/snes.h"
#include "app/rom.h"
namespace yaze {
namespace app {
namespace core {
class Emulator : public SharedROM {
public:
// Runs the emulator loop, including event handling and rendering
void Run();
private:
// Renders the emulator output to an ImGui child window
void RenderEmulator();
// Draws the navigation bar with various controls
void RenderNavBar();
// Handles user input events
void HandleEvents();
// Updates the emulator state (CPU, PPU, APU, etc.)
void UpdateEmulator();
// Member variables to store internal state and resources
emu::SNES snes_;
bool running_ = false;
};
} // namespace core
} // namespace app
} // namespace yaze
#endif // YAZE_APP_CORE_EMULATOR_H