From 4bbfeae42a1245b1b84e8847787d7643e6a6f2cf Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Thu, 10 May 2018 19:27:59 -0400 Subject: Started integrating Lua as a scripting engine Currently moving platforms are able to have their movement controlled by a script rather than by XML, which is probably a better implementation and scales better to other things. The scripts, instead of using the components as state, use the stack as state. In this way, they pretend to be multithreaded. For instance, the moving platform calls moveRight and then moveLeft. Both of those functions internally make calls that say to wait until the next tick. When the AutomatingSystem ticks, it continues execution of all scripts (sequentially, of course) until they ask for the next tick again. This is implemented using coroutines. --- CMakeLists.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 04ca668..fbc843c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -16,6 +16,7 @@ find_package(GLEW REQUIRED) find_package(portaudio REQUIRED) find_package(libsndfile REQUIRED) find_package(libxml2 REQUIRED) +find_package(lua REQUIRED) IF(APPLE) FIND_LIBRARY(COCOA_LIBRARY Cocoa) @@ -32,6 +33,7 @@ set(ALL_LIBS ${PORTAUDIO_LIBRARIES} ${LIBSNDFILE_LIBRARY} ${LIBXML2_LIBRARIES} + ${LUA_LIBRARIES} ${EXTRA_LIBS} ) @@ -40,6 +42,7 @@ include_directories( ${GLFW_INCLUDE_DIRS} ${OPENGL_INCLUDE_DIRS} ${GLEW_INCLUDE_DIRS} + ${LUA_INCLUDE_DIRS} src vendor ) @@ -71,6 +74,6 @@ add_executable(Aromatherapy vendor/stb_image.cpp ) -set_property(TARGET Aromatherapy PROPERTY CXX_STANDARD 11) +set_property(TARGET Aromatherapy PROPERTY CXX_STANDARD 17) set_property(TARGET Aromatherapy PROPERTY CXX_STANDARD_REQUIRED ON) target_link_libraries(Aromatherapy ${ALL_LIBS}) -- cgit 1.4.1