Files
basic1/emulator/low_level_display_sfml.h
Adolfo Reyna 285dffc32e Add Lua scripting support to desktop emulator
- Created emulator-specific lua_game_emulator.cpp using filesystem instead of FatFS
- Created lua_game_loader_emulator.cpp to scan games/lua_examples directory
- Updated CMakeLists.txt to include Lua 5.4 engine and bindings
- Updated to SFML 3.0 API compatibility (event handling, sprite initialization)
- Updated Game class to use public members for Lua bindings
- Updated GameLauncher to use std::function for lambda captures
- Added continuous 60 FPS rendering for smooth display
- Emulator now loads and runs all three example Lua games
2026-02-07 12:14:33 -05:00

21 lines
483 B
C++

#pragma once
#include <SFML/Graphics.hpp>
#include <optional>
class LowLevelDisplaySFML {
public:
LowLevelDisplaySFML(int width, int height);
bool init();
void draw_buffer(const uint8_t* bit_buffer);
void refresh();
bool isOpen() const;
std::optional<sf::Event> pollEvent();
void close();
private:
int width, height;
sf::RenderWindow window;
sf::Texture texture;
std::optional<sf::Sprite> sprite;
std::vector<uint8_t> framebuffer;
};