- the big mergecheit

This commit is contained in:
2025-07-21 19:21:18 +02:00
parent 300f95803e
commit 13354b855d
17 changed files with 273 additions and 19 deletions

34
z80viewer.h Normal file
View File

@@ -0,0 +1,34 @@
#pragma once
#include <SDL2/SDL.h>
#include <vector>
class z80viewer;
struct viewer_t
{
char name[12];
z80viewer *viewer;
};
class z80viewer
{
public:
virtual void show() = 0;
virtual void refresh() = 0;
virtual void hide() = 0;
virtual void focus() = 0;
virtual bool handleEvent(SDL_Event *e) = 0;
static void registerViewer(const char *name, z80viewer *viewer);
static z80viewer *getViewer(const char *name);
static void refreshAll();
static bool handleEvents(SDL_Event *e);
protected:
SDL_Window *win = nullptr;
SDL_Renderer *ren = nullptr;
SDL_Texture *tex = nullptr;
SDL_Texture *uitex = nullptr;
static std::vector<viewer_t> viewers;
};