From f2f4889161f3004ffd9913c354092b74fe33434f Mon Sep 17 00:00:00 2001 From: lachrymaL Date: Thu, 6 Apr 2023 20:33:08 -0400 Subject: [PATCH] fix --- ADVect/ADVect.cpp | 27 ++++----------------------- ADVect/CMakeLists.txt | 2 +- 2 files changed, 5 insertions(+), 24 deletions(-) diff --git a/ADVect/ADVect.cpp b/ADVect/ADVect.cpp index 0072239..bc8edb1 100644 --- a/ADVect/ADVect.cpp +++ b/ADVect/ADVect.cpp @@ -50,7 +50,7 @@ namespace { .w = 500, .h = 500 }, avatar = { .current{}, - .pos_x = 0, .pos_y = 0, + .pos_x = 10, .pos_y = 0, .w = 500, .h = 500 }; ADVect::ImageTrack dialogue_bg = { @@ -249,8 +249,8 @@ namespace ADVect { } int main(int argc, char* argv[]) { -// std::filesystem::current_path("E:\\Archive\\Projects\\NouVeL\\ADVect\\runtime"); - std::filesystem::current_path("/Users/lachrymal/Projects/NouVeL/ADVect/runtime/"); + std::filesystem::current_path("E:\\Archive\\Projects\\NouVeL\\ADVect\\runtime"); +// std::filesystem::current_path("/Users/lachrymal/Projects/NouVeL/ADVect/runtime/"); NVL::Environment::ENVIRONMENT.enter({ { @@ -293,26 +293,7 @@ int main(int argc, char* argv[]) { { u"Show", NVL::Environment::Variable([](std::vector args) { - std::string name = NVL::to_std_string(std::get(NVL::Environment::Variable(args[0]).value)); -/* NamedImageTrack* t = find_image_track(name); - if (t == nullptr) { - std::cerr << "ADV: Cannot find ImageTrack " << name << std::endl; - } - else { - auto s = std::get(NVL::Environment::Variable(args[1]).value); - auto s2 = NVL::to_std_string(s); - t->current = ADVect::Graphics::GetImageTextureFromFile(s2); - }*/ - if (name == "BG") - bg.change(current_time, ADVect::Graphics::GetImageTextureFromFile(NVL::to_std_string(std::get(NVL::Environment::Variable(args[1]).value))), 200); -// bg.current = ADVect::Graphics::GetImageTextureFromFile(NVL::to_std_string(std::get(NVL::Environment::Variable(args[1]).value))); - else if (name == "Avatar") - avatar.change(current_time, ADVect::Graphics::GetImageTextureFromFile(NVL::to_std_string(std::get(NVL::Environment::Variable(args[1]).value))), 200); -// avatar.current = ADVect::Graphics::GetImageTextureFromFile(NVL::to_std_string(std::get(NVL::Environment::Variable(args[1]).value))); - else if (name == "BGDialogue") - dialogue_bg.current = ADVect::Graphics::GetImageTextureFromFile(NVL::to_std_string(std::get(NVL::Environment::Variable(args[1]).value))); - else - std::cerr << "ADV: Cannot find ImageTrack " << name << std::endl; + std::get)>>(args[0].value)({args[1]}); return NVL::Environment::Type::Nil; }, 2) } diff --git a/ADVect/CMakeLists.txt b/ADVect/CMakeLists.txt index 37a427a..cad7a3d 100644 --- a/ADVect/CMakeLists.txt +++ b/ADVect/CMakeLists.txt @@ -12,7 +12,7 @@ include_directories ("include" "../NVL/") add_subdirectory("ext/freetype") add_subdirectory("ext/bgfx") if (WIN32) - include_directories("include_windows") + include_directories("include_windows" "include_windows/SDL2") target_link_libraries (Game PRIVATE ${PROJECT_SOURCE_DIR}/lib/SDL2.lib ${PROJECT_SOURCE_DIR}/lib/SDL2main.lib NVL freetype bgfx bx) elseif (APPLE) set_target_properties(Game PROPERTIES XCODE_ATTRIBUTE_ENABLE_BITCODE "NO")