diff --git a/Makefile b/Makefile index 156c6b91..f7516871 100644 --- a/Makefile +++ b/Makefile @@ -674,8 +674,6 @@ endif ADDONS := addons ADDONS_PATH := $(BUILD_DIR)/$(ADDONS)/ -MACHINIMA := machinima -MACHINIMA_PATH := $(BUILD_DIR)/$(MACHINIMA)/ BASEPACK_LST := $(BUILD_DIR)/basepack.lst # depend on resources as well @@ -723,7 +721,7 @@ $(BUILD_DIR)/src/game/crash_screen.o: $(CRASH_TEXTURE_C_FILES) $(BUILD_DIR)/lib/rsp.o: $(BUILD_DIR)/rsp/rspboot.bin $(BUILD_DIR)/rsp/fast3d.bin $(BUILD_DIR)/rsp/audio.bin RSP_DIRS := $(BUILD_DIR)/rsp -ALL_DIRS := $(BUILD_DIR) $(addprefix $(BUILD_DIR)/,$(SRC_DIRS) $(ASM_DIRS) $(GODDARD_SRC_DIRS) $(ULTRA_SRC_DIRS) $(ULTRA_ASM_DIRS) $(ULTRA_BIN_DIRS) $(BIN_DIRS) $(TEXTURE_DIRS) $(SOUND_SAMPLE_DIRS) $(addprefix levels/,$(LEVEL_DIRS)) include) $(MIO0_DIR) $(addprefix $(MIO0_DIR)/,$(VERSION)) $(SOUND_BIN_DIR) $(SOUND_BIN_DIR)/sequences/$(VERSION) $(RSP_DIRS) $(ADDONS_PATH) $(MACHINIMA_PATH) +ALL_DIRS := $(BUILD_DIR) $(addprefix $(BUILD_DIR)/,$(SRC_DIRS) $(ASM_DIRS) $(GODDARD_SRC_DIRS) $(ULTRA_SRC_DIRS) $(ULTRA_ASM_DIRS) $(ULTRA_BIN_DIRS) $(BIN_DIRS) $(TEXTURE_DIRS) $(SOUND_SAMPLE_DIRS) $(addprefix levels/,$(LEVEL_DIRS)) include) $(MIO0_DIR) $(addprefix $(MIO0_DIR)/,$(VERSION)) $(SOUND_BIN_DIR) $(SOUND_BIN_DIR)/sequences/$(VERSION) $(RSP_DIRS) $(ADDONS_PATH) # Make sure build directory exists before compiling anything DUMMY != mkdir -p $(ALL_DIRS) diff --git a/src/moon/imgui/imgui_impl.cpp b/src/moon/imgui/imgui_impl.cpp index c6e47bfe..97afee8c 100644 --- a/src/moon/imgui/imgui_impl.cpp +++ b/src/moon/imgui/imgui_impl.cpp @@ -81,8 +81,22 @@ using namespace std; SDL_Window* window = nullptr; ImGuiIO* io = nullptr; -#define SM64_WIDTH 320 -#define SM64_HEIGHT 240 +#define SM64_WIDTH 640 +#define SM64_HEIGHT 480 + +// Helper to display a little (?) mark which shows a tooltip when hovered. +static void HelpMarker(const char* desc) +{ + ImGui::TextDisabled("(?)"); + if (ImGui::IsItemHovered()) + { + ImGui::BeginTooltip(); + ImGui::PushTextWrapPos(ImGui::GetFontSize() * 35.0f); + ImGui::TextUnformatted(desc); + ImGui::PopTextWrapPos(); + ImGui::EndTooltip(); + } +} #ifdef TARGET_SWITCH namespace MoonNX { @@ -299,6 +313,7 @@ namespace MoonInternal { if (!ImGui::DockBuilderGetNode(dockspace_id)) { ImGui::DockBuilderRemoveNode(dockspace_id); ImGui::DockBuilderAddNode(dockspace_id, ImGuiDockNodeFlags_NoTabBar); + ImGui::DockBuilderAddNode(dockspace_id, ImGuiDockNodeFlags_NoDockingOverMe); ImGui::DockBuilderDockWindow("Game", dockspace_id); @@ -322,7 +337,7 @@ namespace MoonInternal { ImGui::Separator(); if (ImGui::BeginMenu("Tools")) { ImGui::MenuItem("Toggle View (F1)", NULL, &show_menu_bar); - ImGui::MenuItem("N64 Mode", NULL, &configImGui.n64Mode); + ImGui::MenuItem("Jabo Mode", NULL, &configImGui.n64Mode); ImGui::EndMenu(); } if (ImGui::BeginMenu("View")) { @@ -371,15 +386,17 @@ namespace MoonInternal { } } - configWindow.internal_w = configImGui.n64Mode ? SM64_WIDTH : size.x; - configWindow.internal_h = configImGui.n64Mode ? SM64_HEIGHT : size.y; + configWindow.internal_w = (configImGui.n64Mode && !show_menu_bar) ? SM64_WIDTH : size.x; + configWindow.internal_h = (configImGui.n64Mode && !show_menu_bar) ? SM64_HEIGHT : size.y; + /* if(configImGui.n64Mode) { configWindow.multiplier = (float)n64Mul; int sw = size.y * SM64_WIDTH / SM64_HEIGHT; pos = ImVec2(size.x / 2 - sw / 2, 0); size = ImVec2(sw, size.y); } + */ int fbuf = stoi(MoonInternal::getEnvironmentVar("framebuffer")); ImGui::ImageRotated((ImTextureID) fbuf, pos, size, 180.0f); @@ -594,11 +611,14 @@ namespace MoonInternal { } } ImGui::Checkbox("VSync", &configWindow.vsync); + ImGui::Text("Internal Multiplier"); + ImGui::SliderFloat("###internal_multiplier", &configWindow.multiplier, 1.0f, 4.0f); + ImGui::Checkbox("Jabo Mode", &configImGui.n64Mode); + ImGui::SameLine(); HelpMarker( + "Mimics Project64's widescreen stretching"); ImGui::Text("Graphics Quality"); const char* lod_modes[] = { "Auto", "Low", "High" }; ImGui::Combo("###lod_modes", (int*)&configLODMode, lod_modes, IM_ARRAYSIZE(lod_modes)); - ImGui::Text("Internal Multiplier"); - ImGui::SliderFloat("###internal_multiplier", &configWindow.multiplier, 1.0f, 4.0f); ImGui::Text("Texture Filtering"); const char* texture_filters[] = { "Nearest", "Linear", "Three-point" }; ImGui::Combo("###texture_filters", (int*)&configFiltering, texture_filters, IM_ARRAYSIZE(texture_filters));