Polished CC system

This commit is contained in:
Llennpie 2021-11-15 15:11:04 -05:00
parent 7825408f65
commit 95bf35b275
2 changed files with 28 additions and 10 deletions

View File

@ -674,8 +674,6 @@ endif
ADDONS := addons ADDONS := addons
ADDONS_PATH := $(BUILD_DIR)/$(ADDONS)/ ADDONS_PATH := $(BUILD_DIR)/$(ADDONS)/
MACHINIMA := machinima
MACHINIMA_PATH := $(BUILD_DIR)/$(MACHINIMA)/
BASEPACK_LST := $(BUILD_DIR)/basepack.lst BASEPACK_LST := $(BUILD_DIR)/basepack.lst
# depend on resources as well # 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 $(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 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 # Make sure build directory exists before compiling anything
DUMMY != mkdir -p $(ALL_DIRS) DUMMY != mkdir -p $(ALL_DIRS)

View File

@ -81,8 +81,22 @@ using namespace std;
SDL_Window* window = nullptr; SDL_Window* window = nullptr;
ImGuiIO* io = nullptr; ImGuiIO* io = nullptr;
#define SM64_WIDTH 320 #define SM64_WIDTH 640
#define SM64_HEIGHT 240 #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 #ifdef TARGET_SWITCH
namespace MoonNX { namespace MoonNX {
@ -299,6 +313,7 @@ namespace MoonInternal {
if (!ImGui::DockBuilderGetNode(dockspace_id)) { if (!ImGui::DockBuilderGetNode(dockspace_id)) {
ImGui::DockBuilderRemoveNode(dockspace_id); ImGui::DockBuilderRemoveNode(dockspace_id);
ImGui::DockBuilderAddNode(dockspace_id, ImGuiDockNodeFlags_NoTabBar); ImGui::DockBuilderAddNode(dockspace_id, ImGuiDockNodeFlags_NoTabBar);
ImGui::DockBuilderAddNode(dockspace_id, ImGuiDockNodeFlags_NoDockingOverMe);
ImGui::DockBuilderDockWindow("Game", dockspace_id); ImGui::DockBuilderDockWindow("Game", dockspace_id);
@ -322,7 +337,7 @@ namespace MoonInternal {
ImGui::Separator(); ImGui::Separator();
if (ImGui::BeginMenu("Tools")) { if (ImGui::BeginMenu("Tools")) {
ImGui::MenuItem("Toggle View (F1)", NULL, &show_menu_bar); 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(); ImGui::EndMenu();
} }
if (ImGui::BeginMenu("View")) { if (ImGui::BeginMenu("View")) {
@ -371,15 +386,17 @@ namespace MoonInternal {
} }
} }
configWindow.internal_w = configImGui.n64Mode ? SM64_WIDTH : size.x; configWindow.internal_w = (configImGui.n64Mode && !show_menu_bar) ? SM64_WIDTH : size.x;
configWindow.internal_h = configImGui.n64Mode ? SM64_HEIGHT : size.y; configWindow.internal_h = (configImGui.n64Mode && !show_menu_bar) ? SM64_HEIGHT : size.y;
/*
if(configImGui.n64Mode) { if(configImGui.n64Mode) {
configWindow.multiplier = (float)n64Mul; configWindow.multiplier = (float)n64Mul;
int sw = size.y * SM64_WIDTH / SM64_HEIGHT; int sw = size.y * SM64_WIDTH / SM64_HEIGHT;
pos = ImVec2(size.x / 2 - sw / 2, 0); pos = ImVec2(size.x / 2 - sw / 2, 0);
size = ImVec2(sw, size.y); size = ImVec2(sw, size.y);
} }
*/
int fbuf = stoi(MoonInternal::getEnvironmentVar("framebuffer")); int fbuf = stoi(MoonInternal::getEnvironmentVar("framebuffer"));
ImGui::ImageRotated((ImTextureID) fbuf, pos, size, 180.0f); ImGui::ImageRotated((ImTextureID) fbuf, pos, size, 180.0f);
@ -594,11 +611,14 @@ namespace MoonInternal {
} }
} }
ImGui::Checkbox("VSync", &configWindow.vsync); 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"); ImGui::Text("Graphics Quality");
const char* lod_modes[] = { "Auto", "Low", "High" }; const char* lod_modes[] = { "Auto", "Low", "High" };
ImGui::Combo("###lod_modes", (int*)&configLODMode, lod_modes, IM_ARRAYSIZE(lod_modes)); 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"); ImGui::Text("Texture Filtering");
const char* texture_filters[] = { "Nearest", "Linear", "Three-point" }; const char* texture_filters[] = { "Nearest", "Linear", "Three-point" };
ImGui::Combo("###texture_filters", (int*)&configFiltering, texture_filters, IM_ARRAYSIZE(texture_filters)); ImGui::Combo("###texture_filters", (int*)&configFiltering, texture_filters, IM_ARRAYSIZE(texture_filters));