mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-06-10 20:28:19 -04:00
basic setup for archipelago support started
For now we'll be using APCpp, seems to be good enough for what we need to do for this. might eventually roll my own library if things end up being too weird/complicated to integrate properly.
This commit is contained in:
@@ -1459,6 +1459,7 @@ set(DUSK_FILES
|
||||
src/dusk/imgui/ImGuiMenuTools.hpp
|
||||
src/dusk/imgui/ImGuiMenuRandomizer.cpp
|
||||
src/dusk/imgui/ImGuiMenuRandomizer.hpp
|
||||
src/dusk/imgui/ImGuiArchipelagoDebug.cpp
|
||||
src/dusk/imgui/ImGuiActorSpawner.cpp
|
||||
src/dusk/imgui/ImGuiProcessOverlay.cpp
|
||||
src/dusk/imgui/ImGuiCameraOverlay.cpp
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
#include <dusk/imgui/ImGuiArchipelagoDebug.h>
|
||||
|
||||
#include "imgui.h"
|
||||
|
||||
#include "Archipelago.h"
|
||||
|
||||
namespace dusk {
|
||||
ImGuiArchipelagoDebug::ImGuiArchipelagoDebug() {
|
||||
|
||||
}
|
||||
|
||||
void ImGuiArchipelagoDebug::drawMenuItem() {
|
||||
if (ImGui::BeginMenu("Randomizer")) {
|
||||
ImGui::Checkbox("Archipelago Window", &m_drawWindow);
|
||||
ImGui::EndMenu();
|
||||
}
|
||||
}
|
||||
|
||||
void ImGuiArchipelagoDebug::drawWindow() {
|
||||
if (!m_drawWindow)
|
||||
return;
|
||||
|
||||
ImGui::Begin("Archipelago Debug");
|
||||
|
||||
ImGui::End();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
#pragma once
|
||||
|
||||
namespace dusk {
|
||||
class ImGuiArchipelagoDebug {
|
||||
private:
|
||||
bool m_drawWindow = false;
|
||||
public:
|
||||
ImGuiArchipelagoDebug();
|
||||
|
||||
void drawMenuItem();
|
||||
void drawWindow();
|
||||
};
|
||||
}
|
||||
@@ -278,6 +278,7 @@ namespace dusk {
|
||||
ImGui::PushStyleColor(ImGuiCol_WindowBg, ImVec4(0.0f, 0.0f, 0.0f, 0.0f));
|
||||
if (showMenu && ImGui::BeginMainMenuBar()) {
|
||||
m_menuRandomizer.draw();
|
||||
m_menuArchipelago.drawMenuItem();
|
||||
m_menuTools.draw();
|
||||
|
||||
ImGui::EndMainMenuBar();
|
||||
@@ -375,6 +376,7 @@ namespace dusk {
|
||||
m_menuRandomizer.windowRandoGeneration();
|
||||
m_menuRandomizer.windowRandoTracker();
|
||||
|
||||
m_menuArchipelago.drawWindow();
|
||||
}
|
||||
|
||||
void ImGuiConsole::PostDraw() {
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
#include "ImGuiMenuRandomizer.hpp"
|
||||
#include "dusk/main.h"
|
||||
#include "imgui.h"
|
||||
#include "ImGuiArchipelagoDebug.h"
|
||||
|
||||
union SDL_Event;
|
||||
struct ImGuiWindow;
|
||||
@@ -34,6 +35,7 @@ private:
|
||||
ImVec2 m_dragScrollLastMousePos = {};
|
||||
|
||||
ImGuiMenuRandomizer m_menuRandomizer;
|
||||
ImGuiArchipelagoDebug m_menuArchipelago;
|
||||
|
||||
// Keep always last
|
||||
ImGuiMenuTools m_menuTools;
|
||||
|
||||
@@ -52,12 +52,19 @@ FetchContent_Declare(
|
||||
GIT_TAG fdbae3f
|
||||
)
|
||||
|
||||
FetchContent_MakeAvailable(yaml-cpp base64pp battery-embed)
|
||||
message(STATUS "randomizer: Fetching APCpp")
|
||||
FetchContent_Declare(
|
||||
APCpp
|
||||
GIT_REPOSITORY https://github.com/N00byKing/APCpp.git
|
||||
GIT_TAG 9194179
|
||||
)
|
||||
|
||||
FetchContent_MakeAvailable(yaml-cpp base64pp battery-embed APCpp)
|
||||
|
||||
string(LENGTH "${CMAKE_SOURCE_DIR}/" SOURCE_PATH_SIZE)
|
||||
set(GAME_COMPILE_DEFS ${GAME_COMPILE_DEFS} SOURCE_PATH_SIZE=${SOURCE_PATH_SIZE})
|
||||
set(GAME_LIBS ${GAME_LIBS} yaml-cpp::yaml-cpp base64pp)
|
||||
set(GAME_LIBS ${GAME_LIBS} yaml-cpp::yaml-cpp base64pp APCpp)
|
||||
|
||||
file(MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/randomizer")
|
||||
# Put data files together for easier manipulation
|
||||
# file(COPY "${CMAKE_SOURCE_DIR}/src/dusk/randomizer/data/" DESTINATION "${CMAKE_BINARY_DIR}/randomizer/data/" REGEX "^.*example.*$" EXCLUDE) # World, macros, and location info
|
||||
# file(COPY "${CMAKE_SOURCE_DIR}/src/dusk/randomizer/data/" DESTINATION "${CMAKE_BINARY_DIR}/randomizer/data/" REGEX "^.*example.*$" EXCLUDE) # World, macros, and location info
|
||||
Reference in New Issue
Block a user