285dffc32e
- 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
44 lines
1.2 KiB
CMake
44 lines
1.2 KiB
CMake
cmake_minimum_required(VERSION 3.10)
|
|
project(basic1_emulator)
|
|
|
|
set(CMAKE_CXX_STANDARD 17)
|
|
|
|
find_package(SFML 3.0 COMPONENTS Graphics Window System REQUIRED)
|
|
|
|
# Lua source files
|
|
file(GLOB LUA_SOURCES "../lib/lua/*.c")
|
|
list(FILTER LUA_SOURCES EXCLUDE REGEX "lua\\.c$|luac\\.c$|loslib\\.c$|liolib\\.c$")
|
|
|
|
# Game source files
|
|
set(GAME_SOURCES
|
|
../games/lua_bindings.cpp
|
|
../games/demo_game.cpp
|
|
../games/tic_tac_toe.cpp
|
|
../games/monopoly/monopoly_game.cpp
|
|
../games/monopoly/player.c
|
|
../lib/game_launcher.cpp
|
|
../display/low_level_render.cpp
|
|
../display/low_level_gui.cpp
|
|
)
|
|
|
|
# Add source files
|
|
set(SOURCES
|
|
main.cpp
|
|
low_level_display_sfml.cpp
|
|
lua_game_emulator.cpp
|
|
lua_game_loader_emulator.cpp
|
|
input_manager.cpp
|
|
${GAME_SOURCES}
|
|
${LUA_SOURCES}
|
|
# Add more emulator-specific sources here
|
|
)
|
|
|
|
add_executable(basic1_emulator ${SOURCES})
|
|
|
|
# Define LUA_32BITS for 32-bit embedded mode
|
|
target_compile_definitions(basic1_emulator PRIVATE LUA_32BITS=1)
|
|
|
|
target_include_directories(basic1_emulator PRIVATE . .. ../display ../fonts ../games ../lib ../lib/lua)
|
|
|
|
target_link_libraries(basic1_emulator SFML::Graphics SFML::Window SFML::System)
|