mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-06-23 15:25:19 -04:00
Merge branch 'main' into 26-04-04-config
This commit is contained in:
+54
-32
@@ -94,9 +94,37 @@ message(STATUS "dusk: TP Version: ${DUSK_TP_VERSION}")
|
||||
source_group("dolzel" FILES ${DOLZEL_FILES} ${Z2AUDIOLIB_FILES} ${JSYSTEM_FILES} ${JSYSTEM_DEBUG_FILES} ${REL_FILES})
|
||||
source_group("dusk" FILES ${DUSK_FILES})
|
||||
|
||||
set(GAME_COMPILE_DEFS TARGET_PC AVOID_UB=1 VERSION=0
|
||||
DUSK_TP_VERSION="${DUSK_TP_VERSION}" DUSK_GAME_NAME="${DUSK_GAME_NAME}" DUSK_GAME_VERSION="${DUSK_GAME_VERSION}")
|
||||
|
||||
set(GAME_INCLUDE_DIRS
|
||||
include
|
||||
src
|
||||
assets/${DUSK_TP_VERSION}
|
||||
libs/JSystem/include
|
||||
libs
|
||||
extern/aurora/include/dolphin
|
||||
extern
|
||||
${CMAKE_SOURCE_DIR}/build/${DUSK_TP_VERSION}/include
|
||||
build/${DUSK_TP_VERSION}/include)
|
||||
|
||||
set(GAME_LIBS aurora::core aurora::gx aurora::gd aurora::si aurora::vi aurora::pad aurora::mtx aurora::os aurora::dvd
|
||||
aurora::card freeverb cxxopts::cxxopts absl::flat_hash_map nlohmann_json::nlohmann_json)
|
||||
|
||||
if (DUSK_MOVIE_SUPPORT_REAL)
|
||||
if (TARGET libjpeg-turbo::turbojpeg-static)
|
||||
message(STATUS "dusk: Linking against libjpeg-turbo static library")
|
||||
list(APPEND GAME_LIBS "libjpeg-turbo::turbojpeg-static")
|
||||
else ()
|
||||
message(STATUS "dusk: Linking against libjpeg-turbo shared library")
|
||||
list(APPEND GAME_LIBS "libjpeg-turbo::turbojpeg")
|
||||
endif ()
|
||||
list(APPEND GAME_COMPILE_DEFS MOVIE_SUPPORT=1)
|
||||
endif ()
|
||||
|
||||
# game_debug is for game code files that we know work when compiled with DEBUG=1
|
||||
# Of course, if building a release build, this distinction is irrelevant
|
||||
add_library(game_debug STATIC ${JSYSTEM_DEBUG_FILES} ${SSYSTEM_FILES}
|
||||
add_library(game_debug OBJECT ${JSYSTEM_DEBUG_FILES} ${SSYSTEM_FILES}
|
||||
src/dusk/audio/DuskAudioSystem.cpp
|
||||
src/dusk/audio/JASCriticalSection.cpp
|
||||
src/dusk/audio/DuskDsp.hpp
|
||||
@@ -104,40 +132,33 @@ add_library(game_debug STATIC ${JSYSTEM_DEBUG_FILES} ${SSYSTEM_FILES}
|
||||
src/dusk/audio/Adpcm.cpp
|
||||
src/dusk/audio/Adpcm.hpp
|
||||
src/dusk/audio/DspStub.cpp)
|
||||
target_compile_definitions(game_debug PRIVATE TARGET_PC AVOID_UB=1 VERSION=0 $<$<CONFIG:Debug>:DEBUG=1>)
|
||||
|
||||
# Make these properties PUBLIC so that the regular game target also sees them.
|
||||
target_include_directories(game_debug PUBLIC
|
||||
include
|
||||
src
|
||||
assets/${DUSK_TP_VERSION}
|
||||
libs/JSystem/include
|
||||
libs
|
||||
extern/aurora/include/dolphin
|
||||
extern
|
||||
${CMAKE_SOURCE_DIR}/build/${DUSK_TP_VERSION}/include
|
||||
build/${DUSK_TP_VERSION}/include)
|
||||
target_link_libraries(game_debug PUBLIC aurora::core aurora::gx aurora::gd aurora::si aurora::vi aurora::pad aurora::mtx aurora::os aurora::dvd aurora::card freeverb nlohmann_json::nlohmann_json)
|
||||
|
||||
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
|
||||
add_library(game SHARED ${DOLZEL_FILES} ${Z2AUDIOLIB_FILES} ${SSYSTEM_FILES} ${JSYSTEM_FILES} ${REL_FILES} ${DUSK_FILES} ${DOLPHIN_FILES}
|
||||
# game_base is for all other game code files
|
||||
add_library(game_base OBJECT ${DOLZEL_FILES} ${Z2AUDIOLIB_FILES} ${JSYSTEM_FILES} ${REL_FILES} ${DUSK_FILES}
|
||||
${DOLPHIN_FILES}
|
||||
src/dusk/imgui/ImGuiStubLog.cpp
|
||||
src/dusk/imgui/ImGuiAudio.cpp)
|
||||
|
||||
target_link_libraries(game PRIVATE game_debug cxxopts::cxxopts absl::flat_hash_map freeverb)
|
||||
if (DUSK_MOVIE_SUPPORT_REAL)
|
||||
if (TARGET libjpeg-turbo::turbojpeg-static)
|
||||
message(STATUS "dusk: Linking against libjpeg-turbo static library")
|
||||
target_link_libraries(game PRIVATE libjpeg-turbo::turbojpeg-static)
|
||||
else ()
|
||||
message(STATUS "dusk: Linking against libjpeg-turbo shared library")
|
||||
target_link_libraries(game PRIVATE libjpeg-turbo::turbojpeg)
|
||||
endif ()
|
||||
target_compile_definitions(game PRIVATE MOVIE_SUPPORT=1)
|
||||
endif ()
|
||||
target_compile_definitions(game PRIVATE TARGET_PC AVOID_UB=1 VERSION=0 NDEBUG=1 NDEBUG_DEFINED=1 DEBUG_DEFINED=0
|
||||
DUSK_TP_VERSION="${DUSK_TP_VERSION}" DUSK_GAME_NAME="${DUSK_GAME_NAME}" DUSK_GAME_VERSION="${DUSK_GAME_VERSION}")
|
||||
target_precompile_headers(game PRIVATE "$<$<COMPILE_LANGUAGE:CXX>:${CMAKE_SOURCE_DIR}/include/dusk_pch.hpp>")
|
||||
target_compile_definitions(game_debug PRIVATE ${GAME_COMPILE_DEFS} $<$<CONFIG:Debug>:DEBUG=1>)
|
||||
target_compile_definitions(game_base PRIVATE ${GAME_COMPILE_DEFS} NDEBUG=1 NDEBUG_DEFINED=1 DEBUG_DEFINED=0)
|
||||
|
||||
# only apply PCH to game_base since not all headers are necessarily validated with DEBUG=1
|
||||
target_precompile_headers(game_base PRIVATE "$<$<COMPILE_LANGUAGE:CXX>:${CMAKE_SOURCE_DIR}/include/dusk_pch.hpp>")
|
||||
|
||||
target_include_directories(game_debug PRIVATE ${GAME_INCLUDE_DIRS})
|
||||
target_include_directories(game_base PRIVATE ${GAME_INCLUDE_DIRS})
|
||||
|
||||
# This implicitly pulls in the library include directories even though no
|
||||
# linking actually takes place for object libraries
|
||||
target_link_libraries(game_debug PRIVATE ${GAME_LIBS})
|
||||
target_link_libraries(game_base PRIVATE ${GAME_LIBS})
|
||||
|
||||
# Combined game library
|
||||
add_library(game STATIC
|
||||
$<TARGET_OBJECTS:game_base>
|
||||
$<TARGET_OBJECTS:game_debug>)
|
||||
target_link_libraries(game PUBLIC ${GAME_LIBS})
|
||||
|
||||
add_executable(dusk src/dusk/main.cpp)
|
||||
target_compile_definitions(dusk PRIVATE TARGET_PC AVOID_UB=1 VERSION=0)
|
||||
target_include_directories(dusk PRIVATE include)
|
||||
@@ -151,7 +172,7 @@ add_custom_command(TARGET dusk POST_BUILD
|
||||
)
|
||||
|
||||
include(extern/aurora/cmake/AuroraCopyRuntimeDLLs.cmake)
|
||||
aurora_copy_runtime_dlls(dusk game)
|
||||
aurora_copy_runtime_dlls(dusk)
|
||||
|
||||
if (DUSK_SELECTED_OPT)
|
||||
if (CMAKE_CXX_COMPILER_FRONTEND_VARIANT STREQUAL "MSVC")
|
||||
@@ -162,4 +183,5 @@ if (DUSK_SELECTED_OPT)
|
||||
|
||||
target_compile_options(xxhash PRIVATE ${_opt_flags})
|
||||
target_compile_options(aurora_gx PRIVATE ${_opt_flags})
|
||||
target_compile_options(freeverb PRIVATE ${_opt_flags})
|
||||
endif ()
|
||||
|
||||
@@ -14,6 +14,8 @@ constexpr const char* SHOW_STUB_LOG = "F5";
|
||||
constexpr const char* SHOW_CAMERA_DEBUG = "F6";
|
||||
constexpr const char* SHOW_AUDIO_DEBUG = "F7";
|
||||
|
||||
constexpr const char* TURBO = "Tab";
|
||||
|
||||
}
|
||||
|
||||
#endif // DUSK_HOTKEYS_H
|
||||
|
||||
@@ -13,11 +13,11 @@ extern ConfigVar<bool> enableFullscreen;
|
||||
}
|
||||
|
||||
namespace audio {
|
||||
extern ConfigVar<float> masterVolume;
|
||||
extern ConfigVar<float> mainMusicVolume;
|
||||
extern ConfigVar<float> subMusicVolume;
|
||||
extern ConfigVar<float> soundEffectsVolume;
|
||||
extern ConfigVar<float> fanfareVolume;
|
||||
extern ConfigVar<int> masterVolume;
|
||||
extern ConfigVar<int> mainMusicVolume;
|
||||
extern ConfigVar<int> subMusicVolume;
|
||||
extern ConfigVar<int> soundEffectsVolume;
|
||||
extern ConfigVar<int> fanfareVolume;
|
||||
extern ConfigVar<bool> enableReverb;
|
||||
}
|
||||
|
||||
@@ -53,6 +53,9 @@ extern ConfigVar<bool> canTransformAnywhere;
|
||||
|
||||
// Technical
|
||||
extern ConfigVar<bool> restoreWiiGlitches;
|
||||
|
||||
// Controls
|
||||
extern ConfigVar<bool> enableTurboKeybind;
|
||||
}
|
||||
|
||||
void Register();
|
||||
@@ -75,6 +78,7 @@ struct CollisionViewSettings {
|
||||
|
||||
struct TransientSettings {
|
||||
CollisionViewSettings collisionView;
|
||||
bool skipFrameRateLimit;
|
||||
};
|
||||
|
||||
TransientSettings& getTransientSettings();
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
#include "aurora/aurora.h"
|
||||
#include "dusk/gx_helper.h"
|
||||
#include "dusk/logging.h"
|
||||
#include "dusk/settings.h"
|
||||
#include "global.h"
|
||||
|
||||
void JFWDisplay::ctor_subroutine(bool enableAlpha) {
|
||||
@@ -347,7 +348,11 @@ void JFWDisplay::waitBlanking(int param_0) {
|
||||
}
|
||||
|
||||
static void waitForTick(u32 p1, u16 p2) {
|
||||
|
||||
#if TARGET_PC
|
||||
if (dusk::getTransientSettings().skipFrameRateLimit) {
|
||||
p1 = OS_TIMER_CLOCK / 120;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (p1 != 0)
|
||||
{
|
||||
|
||||
@@ -590,8 +590,6 @@ static void cut_control2(obj_brg_class* i_this, br_s* i_part) {
|
||||
}
|
||||
|
||||
static void himo_cut_control1(obj_brg_class* i_this, cXyz* param_1, f32 param_2) {
|
||||
STUB_RET();
|
||||
|
||||
cXyz sp74 = {};
|
||||
cXyz sp80 = {};
|
||||
cXyz sp8C = {};
|
||||
|
||||
+2
-2
@@ -10156,9 +10156,9 @@ bool dCamera_c::eventCamera(s32 param_0) {
|
||||
mEye = mCenter + mDirection.Xyz();
|
||||
}
|
||||
|
||||
int* sp90_i;
|
||||
BE(int)* sp90_i;
|
||||
if (getEvStringData(sp90, "Trim", "DEFAULT") != false) {
|
||||
sp90_i = (int*)sp90;
|
||||
sp90_i = (BE(int)*)sp90;
|
||||
if (*sp90_i == 'STAN') {
|
||||
mEventData.field_0x1c = 0;
|
||||
} else if (*sp90_i == 'VIST') {
|
||||
|
||||
+3
-18
@@ -35,16 +35,6 @@ void OSInitContext(OSContext* context, u32 pc, u32 newsp) {
|
||||
context->gpr[1] = newsp;
|
||||
}
|
||||
|
||||
u32 OSSaveContext(OSContext* context) {
|
||||
// On PC we don't save PowerPC registers.
|
||||
// Return 0 = "context was just saved" (as opposed to 1 = "restored from save").
|
||||
return 0;
|
||||
}
|
||||
|
||||
void OSLoadContext(OSContext* context) {
|
||||
// No-op on PC (no PowerPC register restore)
|
||||
}
|
||||
|
||||
void OSDumpContext(OSContext* context) {
|
||||
if (!context) {
|
||||
OSReport("[PC] OSDumpContext: NULL context\n");
|
||||
@@ -66,20 +56,15 @@ void OSSaveFPUContext(OSContext* fpucontext) {
|
||||
}
|
||||
|
||||
u32 OSGetStackPointer(void) {
|
||||
// Return approximate stack pointer
|
||||
volatile u32 dummy;
|
||||
return (u32)(uintptr_t)&dummy;
|
||||
return 0;
|
||||
}
|
||||
|
||||
u32 OSSwitchStack(u32 newsp) {
|
||||
// Not meaningful on PC - return current sp
|
||||
return OSGetStackPointer();
|
||||
abort();
|
||||
}
|
||||
|
||||
int OSSwitchFiber(u32 pc, u32 newsp) {
|
||||
// Not meaningful on PC
|
||||
OSReport("[PC] OSSwitchFiber: not supported on PC\n");
|
||||
return 0;
|
||||
abort();
|
||||
}
|
||||
|
||||
void __OSContextInit(void) {
|
||||
|
||||
@@ -26,8 +26,6 @@ namespace dusk {
|
||||
}
|
||||
|
||||
ImGui::SetNextWindowBgAlpha(0.65f);
|
||||
ImGui::SetNextWindowSizeConstraints(ImVec2(300.f * ImGuiScale(), 0),
|
||||
ImVec2(FLT_MAX, FLT_MAX));
|
||||
|
||||
if (!ImGui::Begin("Camera Debug", nullptr, windowFlags)) {
|
||||
ImGui::End();
|
||||
|
||||
@@ -28,6 +28,14 @@ namespace dusk::config {
|
||||
Save();
|
||||
}
|
||||
}
|
||||
|
||||
static void ImGuiMenuItem(const char* label, const char* shortcut, ConfigVar<bool>& p_selected, bool enabled = true) {
|
||||
bool copy = p_selected.getValue();
|
||||
if (ImGui::MenuItem(label, shortcut, ©, enabled)) {
|
||||
p_selected.setValue(copy);
|
||||
Save();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif // DUSK_IMGUICONFIG_HPP
|
||||
|
||||
@@ -13,6 +13,8 @@
|
||||
#include "ImGuiConsole.hpp"
|
||||
|
||||
#include "JSystem/JUtility/JUTGamePad.h"
|
||||
#include "dusk/config.hpp"
|
||||
#include "dusk/settings.h"
|
||||
|
||||
#if _WIN32
|
||||
#define NOMINMAX
|
||||
@@ -23,7 +25,7 @@ using namespace std::string_literals;
|
||||
using namespace std::string_view_literals;
|
||||
|
||||
namespace dusk {
|
||||
float ImGuiScale() { return ImGui::GetIO().DisplayFramebufferScale.x; }
|
||||
float ImGuiScale() { return 1.0f; }
|
||||
|
||||
void ImGuiStringViewText(std::string_view text) {
|
||||
// begin()/end() do not work on MSVC
|
||||
@@ -182,6 +184,20 @@ namespace dusk {
|
||||
m_isLaunchInitialized = true;
|
||||
}
|
||||
|
||||
getTransientSettings().skipFrameRateLimit = settings::game::enableTurboKeybind && ImGui::IsKeyDown(ImGuiKey_Tab);
|
||||
|
||||
if ((ImGui::IsKeyDown(ImGuiKey_LeftCtrl) || ImGui::IsKeyDown(ImGuiKey_RightCtrl)) &&
|
||||
ImGui::IsKeyPressed(ImGuiKey_R))
|
||||
{
|
||||
JUTGamePad::C3ButtonReset::sResetSwitchPushing = true;
|
||||
}
|
||||
|
||||
if (ImGui::IsKeyPressed(ImGuiKey_F11)) {
|
||||
settings::video::enableFullscreen.setValue(!settings::video::enableFullscreen);
|
||||
VISetWindowFullscreen(settings::video::enableFullscreen);
|
||||
config::Save();
|
||||
}
|
||||
|
||||
if (CheckMenuViewToggle(ImGuiKey_F1, m_isHidden)) {
|
||||
ShowToasts();
|
||||
return;
|
||||
@@ -192,9 +208,11 @@ namespace dusk {
|
||||
|
||||
if (ImGui::BeginMainMenuBar()) {
|
||||
m_menuGame.draw();
|
||||
m_menuTools.draw();
|
||||
m_menuEnhancements.draw();
|
||||
|
||||
// Keep always last
|
||||
m_menuTools.draw();
|
||||
|
||||
ImGui::SetCursorPosX(ImGui::GetWindowWidth() - 80.0f * ImGuiScale());
|
||||
ImGuiIO& io = ImGui::GetIO();
|
||||
ImGuiStringViewText(fmt::format(FMT_STRING("FPS: {:.2f}\n"), io.Framerate));
|
||||
|
||||
@@ -31,10 +31,13 @@ private:
|
||||
bool m_isHidden = true;
|
||||
bool m_isLaunchInitialized = false;
|
||||
std::deque<Toast> m_toasts;
|
||||
|
||||
ImGuiMenuGame m_menuGame;
|
||||
ImGuiMenuTools m_menuTools;
|
||||
ImGuiMenuEnhancements m_menuEnhancements;
|
||||
|
||||
// Keep always last
|
||||
ImGuiMenuTools m_menuTools;
|
||||
|
||||
void ShowToasts();
|
||||
void ShowPipelineProgress();
|
||||
};
|
||||
|
||||
@@ -38,6 +38,7 @@ void ImGuiEngine_Initialize(float scale) {
|
||||
ImGui::GetCurrentContext();
|
||||
ImGuiIO& io = ImGui::GetIO();
|
||||
io.Fonts->Clear();
|
||||
io.FontGlobalScale = scale > 0.0f ? 1.0f / scale : 1.0f;
|
||||
|
||||
const std::string fontPath = GetAssetPath("NotoMono-Regular.ttf");
|
||||
const bool hasFontFile = AssetExists(fontPath);
|
||||
@@ -146,7 +147,6 @@ void ImGuiEngine_Initialize(float scale) {
|
||||
colors[ImGuiCol_NavWindowingDimBg] = ImVec4(0.80f, 0.80f, 0.80f, 0.20f);
|
||||
colors[ImGuiCol_ModalWindowDimBg] = ImVec4(0.80f, 0.80f, 0.80f, 0.35f);
|
||||
|
||||
style.ScaleAllSizes(scale);
|
||||
}
|
||||
|
||||
Icon GetIcon() {
|
||||
|
||||
@@ -241,7 +241,7 @@ namespace dusk {
|
||||
}
|
||||
|
||||
char bufId[32];
|
||||
snprintf(bufId, sizeof(bufId), "%p", block);
|
||||
snprintf(bufId, sizeof(bufId), "%p", block.block);
|
||||
ImGui::PushID(bufId);
|
||||
ImGui::TableNextColumn();
|
||||
ImGui::Text("%08X", (u32)((uintptr_t)block.block - (uintptr_t)expHeap->getStartAddr()));
|
||||
|
||||
@@ -17,8 +17,6 @@ namespace dusk {
|
||||
ImGuiWindowFlags_NoFocusOnAppearing | ImGuiWindowFlags_NoNav;
|
||||
|
||||
ImGui::SetNextWindowBgAlpha(0.65f);
|
||||
ImGui::SetNextWindowSizeConstraints(ImVec2(300.f * ImGuiScale(), 0),
|
||||
ImVec2(FLT_MAX, FLT_MAX));
|
||||
|
||||
if (!ImGui::Begin("Map Loader", &m_showMapLoader, windowFlags)) {
|
||||
ImGui::End();
|
||||
|
||||
@@ -39,28 +39,28 @@ namespace dusk {
|
||||
|
||||
if (ImGui::BeginMenu("Audio")) {
|
||||
ImGui::Text("Master Volume");
|
||||
config::ImGuiSliderFloat("##masterVolume", settings::audio::masterVolume, 0.0f, 1.0f, "");
|
||||
config::ImGuiSliderInt("##masterVolume", settings::audio::masterVolume, 0, 100);
|
||||
config::ImGuiCheckbox("Enable Reverb", settings::audio::enableReverb);
|
||||
/*
|
||||
// TODO: implement additional settings
|
||||
// TODO: Implement additional settings
|
||||
ImGui::Text("Main Music Volume");
|
||||
ImGui::SliderFloat("##mainMusicVolume", &getSettings().audio.mainMusicVolume, 0.0f, 1.0f, "");
|
||||
ImGui::SliderFloat("##mainMusicVolume", &getSettings().audio.mainMusicVolume, 0, 100);
|
||||
|
||||
ImGui::Text("Sub Music Volume");
|
||||
ImGui::SliderFloat("##subMusicVolume", &getSettings().audio.subMusicVolume, 0.0f, 1.0f, "");
|
||||
ImGui::SliderFloat("##subMusicVolume", &getSettings().audio.subMusicVolume, 0, 100);
|
||||
|
||||
ImGui::Text("Sound Effects Volume");
|
||||
ImGui::SliderFloat("##soundEffectsVolume", &getSettings().audio.soundEffectsVolume, 0.0f, 1.0f, "");
|
||||
ImGui::SliderFloat("##soundEffectsVolume", &getSettings().audio.soundEffectsVolume, 0, 100);
|
||||
|
||||
ImGui::Text("Fanfare Volume");
|
||||
ImGui::SliderFloat("##fanfareVolume", &getSettings().audio.fanfareVolume, 0.0f, 1.0f, "");
|
||||
ImGui::SliderFloat("##fanfareVolume", &getSettings().audio.fanfareVolume, 0, 100);
|
||||
|
||||
Z2AudioMgr* audioMgr = Z2AudioMgr::getInterface();
|
||||
if (audioMgr != nullptr) {
|
||||
}
|
||||
*/
|
||||
|
||||
audio::SetMasterVolume(settings::audio::masterVolume);
|
||||
audio::SetMasterVolume(settings::audio::masterVolume / 100.0f);
|
||||
audio::EnableReverb = settings::audio::enableReverb;
|
||||
|
||||
ImGui::EndMenu();
|
||||
@@ -78,14 +78,6 @@ namespace dusk {
|
||||
|
||||
windowInputViewer();
|
||||
windowControllerConfig();
|
||||
|
||||
if ((ImGui::IsKeyDown(ImGuiKey_LeftCtrl) || ImGui::IsKeyDown(ImGuiKey_RightCtrl)) && ImGui::IsKeyPressed(ImGuiKey_R)) {
|
||||
JUTGamePad::C3ButtonReset::sResetSwitchPushing = true;
|
||||
}
|
||||
|
||||
if (ImGui::IsKeyPressed(ImGuiKey_F11)) {
|
||||
ToggleFullscreen();
|
||||
}
|
||||
}
|
||||
|
||||
static void drawVirtualStick(const char* id, const ImVec2& stick) {
|
||||
@@ -151,8 +143,6 @@ namespace dusk {
|
||||
ImGuiWindowFlags_AlwaysAutoResize;
|
||||
|
||||
ImGui::SetNextWindowBgAlpha(0.65f);
|
||||
ImGui::SetNextWindowSizeConstraints(ImVec2(850 * scale, 400 * scale),
|
||||
ImVec2(850 * scale, 400 * scale));
|
||||
|
||||
if (!ImGui::Begin("Controller Config", &m_showControllerConfig, windowFlags)) {
|
||||
ImGui::End();
|
||||
|
||||
@@ -3,13 +3,15 @@
|
||||
#include "aurora/gfx.h"
|
||||
|
||||
#include "dusk/hotkeys.h"
|
||||
#include "dusk/settings.h"
|
||||
#include "ImGuiConsole.hpp"
|
||||
#include "ImGuiMenuTools.hpp"
|
||||
|
||||
#include "m_Do/m_Do_main.h"
|
||||
#include "d/d_com_inf_game.h"
|
||||
#include "ImGuiConfig.hpp"
|
||||
#include "d/actor/d_a_alink.h"
|
||||
#include "d/actor/d_a_horse.h"
|
||||
#include "d/d_com_inf_game.h"
|
||||
#include "m_Do/m_Do_main.h"
|
||||
|
||||
namespace dusk {
|
||||
ImGuiMenuTools::ImGuiMenuTools() {}
|
||||
@@ -48,6 +50,8 @@ namespace dusk {
|
||||
ImGui::MenuItem("Save Editor", nullptr, &m_showSaveEditor);
|
||||
ImGui::MenuItem("Audio Debug", hotkeys::SHOW_AUDIO_DEBUG, &m_showAudioDebug);
|
||||
ImGui::MenuItem("OSReport Force", nullptr, &OSReportReallyForceEnable);
|
||||
ImGui::Separator();
|
||||
config::ImGuiMenuItem("Enable Turbo Key", hotkeys::TURBO, settings::game::enableTurboKeybind);
|
||||
ImGui::EndMenu();
|
||||
}
|
||||
|
||||
@@ -146,10 +150,10 @@ namespace dusk {
|
||||
}
|
||||
|
||||
ImGuiIO& io = ImGui::GetIO();
|
||||
ImGuiWindowFlags windowFlags = ImGuiWindowFlags_NoResize;
|
||||
ImGuiWindowFlags windowFlags =
|
||||
ImGuiWindowFlags_NoResize | ImGuiWindowFlags_AlwaysAutoResize;
|
||||
|
||||
ImGui::SetNextWindowBgAlpha(0.65f);
|
||||
ImGui::SetNextWindowSizeConstraints(ImVec2(300, 200), ImVec2(300, 200));
|
||||
|
||||
if (ImGui::Begin("Player Info", &m_showPlayerInfo, windowFlags)) {
|
||||
daAlink_c* player = (daAlink_c*)dComIfGp_getPlayer(0);
|
||||
|
||||
@@ -284,10 +284,10 @@ namespace dusk {
|
||||
|
||||
void ImGuiSaveEditor::draw(bool& open) {
|
||||
ImGuiIO& io = ImGui::GetIO();
|
||||
ImGuiWindowFlags windowFlags = ImGuiWindowFlags_NoResize;
|
||||
ImGuiWindowFlags windowFlags =
|
||||
ImGuiWindowFlags_NoResize | ImGuiWindowFlags_AlwaysAutoResize;
|
||||
|
||||
ImGui::SetNextWindowBgAlpha(0.65f);
|
||||
ImGui::SetNextWindowSizeConstraints(ImVec2(600, 700), ImVec2(600, 700));
|
||||
|
||||
if (ImGui::Begin("Save Editor", &open, windowFlags)) {
|
||||
if (ImGui::BeginTabBar("SaveEditorTabBar", ImGuiTabBarFlags_NoCloseWithMiddleMouseButton)) {
|
||||
|
||||
+10
-5
@@ -7,11 +7,11 @@ ConfigVar<bool> enableFullscreen("video.enableFullscreen", false);
|
||||
}
|
||||
|
||||
namespace audio {
|
||||
ConfigVar<float> masterVolume("audio.masterVolume", 1.0f);
|
||||
ConfigVar<float> mainMusicVolume("audio.mainMusicVolume", 1.0f);
|
||||
ConfigVar<float> subMusicVolume("audio.subMusicVolume", 1.0f);
|
||||
ConfigVar<float> soundEffectsVolume("audio.soundEffectsVolume", 1.0f);
|
||||
ConfigVar<float> fanfareVolume("audio.fanfareVolume", 1.0f);
|
||||
ConfigVar<int> masterVolume("audio.masterVolume", 80);
|
||||
ConfigVar<int> mainMusicVolume("audio.mainMusicVolume", 100);
|
||||
ConfigVar<int> subMusicVolume("audio.subMusicVolume", 100);
|
||||
ConfigVar<int> soundEffectsVolume("audio.soundEffectsVolume", 100);
|
||||
ConfigVar<int> fanfareVolume("audio.fanfareVolume", 100);
|
||||
ConfigVar<bool> enableReverb("audio.enableReverb", true);
|
||||
}
|
||||
|
||||
@@ -47,6 +47,9 @@ ConfigVar<bool> canTransformAnywhere("game.canTransformAnywhere", false);
|
||||
|
||||
// Technical
|
||||
ConfigVar<bool> restoreWiiGlitches("game.restoreWiiGlitches", false);
|
||||
|
||||
// Controls
|
||||
ConfigVar<bool> enableTurboKeybind("game.enableTurboKeybind", true);
|
||||
}
|
||||
|
||||
void Register() {
|
||||
@@ -82,6 +85,7 @@ void Register() {
|
||||
Register(game::noMissClimbing);
|
||||
Register(game::noLowHpSound);
|
||||
Register(game::midnasLamentNonStop);
|
||||
Register(game::enableTurboKeybind);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -100,6 +104,7 @@ static TransientSettings g_transientSettings = {
|
||||
.colliderViewOpacity = 50.0f,
|
||||
.drawRange = 100.0f,
|
||||
},
|
||||
.skipFrameRateLimit = false,
|
||||
};
|
||||
|
||||
TransientSettings& getTransientSettings() {
|
||||
|
||||
+2
-9
@@ -1062,22 +1062,15 @@ extern "C" void KPADEnableDPD(s32) {
|
||||
void LCDisable(void) {
|
||||
STUB_LOG();
|
||||
}
|
||||
void LCQueueWait(__REGISTER u32 len) {
|
||||
STUB_LOG();
|
||||
}
|
||||
u32 LCStoreData(void* destAddr, void* srcAddr, u32 nBytes) {
|
||||
STUB_LOG();
|
||||
return 0;
|
||||
}
|
||||
|
||||
#pragma mark PPC Arch
|
||||
// MSR stuff?
|
||||
void PPCHalt() {
|
||||
STUB_LOG();
|
||||
abort();
|
||||
}
|
||||
|
||||
extern "C" void PPCSync(void) {
|
||||
STUB_LOG();
|
||||
// Does nothing on PC
|
||||
}
|
||||
|
||||
u32 PPCMfhid2() {
|
||||
|
||||
Reference in New Issue
Block a user