mirror of https://github.com/sm64pc/sm64pc.git
Some QOL fixes/updates
This commit is contained in:
parent
de3125f55f
commit
e79cc1ea49
8
Makefile
8
Makefile
|
@ -416,10 +416,10 @@ ifeq ($(TARGET_SWITCH),1)
|
|||
CXX := $(CROSS)g++
|
||||
STRIP := $(CROSS)strip
|
||||
NXARCH := -march=armv8-a+crc+crypto -mtune=cortex-a57 -mtp=soft -fPIE
|
||||
APP_TITLE := Moon64 - [$(GIT_BRANCH)]
|
||||
APP_AUTHOR := Nintendo, n64decomp team, UnderVolt team
|
||||
APP_VERSION := $(GIT_HASH)
|
||||
APP_ICON := $(CURDIR)/textures/logo/moon64-logo.jpg
|
||||
APP_TITLE := Saturn: Moon Edition
|
||||
APP_AUTHOR := Llennpie
|
||||
APP_VERSION := $(GIT_BRANCH) $(GIT_HASH)
|
||||
APP_ICON := $(CURDIR)/textures/logo/saturn-logo.jpg
|
||||
INCLUDE_CFLAGS += -I$(LIBNX)/include -I$(PORTLIBS)/include
|
||||
OPT_FLAGS := -O2
|
||||
LIBDIRS := $(PORTLIBS) $(LIBNX)
|
||||
|
|
|
@ -1,18 +1,18 @@
|
|||
Lights1 n64_N64_Green_lights = gdSPDefLights1(
|
||||
0x3, 0x49, 0x18,
|
||||
0x6, 0x93, 0x30, 0x28, 0x28, 0x28);
|
||||
0x7f, 0x7f, 0x7f,
|
||||
0xff, 0xff, 0xff, 0x28, 0x28, 0x28);
|
||||
|
||||
Lights1 n64_N64_Blue_lights = gdSPDefLights1(
|
||||
0x0, 0xE, 0x54,
|
||||
0x1, 0x1D, 0xA9, 0x28, 0x28, 0x28);
|
||||
0x67, 0x67, 0x67,
|
||||
0xce, 0xce, 0xce, 0x28, 0x28, 0x28);
|
||||
|
||||
Lights1 n64_N64_Red_lights = gdSPDefLights1(
|
||||
0x7F, 0xF, 0xA,
|
||||
0xFE, 0x1F, 0x15, 0x28, 0x28, 0x28);
|
||||
0x60, 0x7f, 0x66,
|
||||
0xc0, 0xff, 0xee, 0x28, 0x28, 0x28);
|
||||
|
||||
Lights1 n64_N64_Yellow_lights = gdSPDefLights1(
|
||||
0x7F, 0x60, 0x0,
|
||||
0xFE, 0xC1, 0x0, 0x28, 0x28, 0x28);
|
||||
0x60, 0x60, 0x60,
|
||||
0xc0, 0xc0, 0xc0, 0x28, 0x28, 0x28);
|
||||
|
||||
Vtx n64_N_Logo_mesh_vtx_0[56] = {
|
||||
{{{106, 1, -107},0, {486, 496},{0x0, 0x4E, 0x9B, 0xFF}}},
|
||||
|
|
|
@ -3394,20 +3394,20 @@ const f32 intro_seg7_table_0700C880[] = {
|
|||
};
|
||||
|
||||
Lights1 n64logo_N64_Green_lights = gdSPDefLights1(
|
||||
0x3, 0x49, 0x18,
|
||||
0x6, 0x93, 0x30, 0x28, 0x28, 0x28);
|
||||
0x60, 0x7f, 0x66,
|
||||
0xc0, 0xff, 0xee, 0x28, 0x28, 0x28);
|
||||
|
||||
Lights1 n64logo_N64_Blue_lights = gdSPDefLights1(
|
||||
0x0, 0xE, 0x54,
|
||||
0x1, 0x1D, 0xA9, 0x28, 0x28, 0x28);
|
||||
0x67, 0x67, 0x67,
|
||||
0xce, 0xce, 0xce, 0x28, 0x28, 0x28);
|
||||
|
||||
Lights1 n64logo_N64_Red_lights = gdSPDefLights1(
|
||||
0x7F, 0xF, 0xA,
|
||||
0xFE, 0x1F, 0x15, 0x28, 0x28, 0x28);
|
||||
0x60, 0x7f, 0x66,
|
||||
0xc0, 0xff, 0xee, 0x28, 0x28, 0x28);
|
||||
|
||||
Lights1 n64logo_N64_Yellow_lights = gdSPDefLights1(
|
||||
0x7F, 0x60, 0x0,
|
||||
0xFE, 0xC1, 0x0, 0x28, 0x28, 0x28);
|
||||
0x60, 0x60, 0x60,
|
||||
0xc0, 0xc0, 0xc0, 0x28, 0x28, 0x28);
|
||||
|
||||
Vtx n64logo_N64_mesh_vtx_0[56] = {
|
||||
{{{106, 1, -107},0, {486, 496},{0x0, 0x4E, 0x9B, 0xFF}}},
|
||||
|
|
|
@ -1,18 +1,18 @@
|
|||
Lights1 n64logo_N64_Green_lights = gdSPDefLights1(
|
||||
0x3, 0x49, 0x18,
|
||||
0x6, 0x93, 0x30, 0x28, 0x28, 0x28);
|
||||
0x7f, 0x7f, 0x7f,
|
||||
0xff, 0xff, 0xff, 0x28, 0x28, 0x28);
|
||||
|
||||
Lights1 n64logo_N64_Blue_lights = gdSPDefLights1(
|
||||
0x0, 0xE, 0x54,
|
||||
0x1, 0x1D, 0xA9, 0x28, 0x28, 0x28);
|
||||
0x67, 0x67, 0x67,
|
||||
0xce, 0xce, 0xce, 0x28, 0x28, 0x28);
|
||||
|
||||
Lights1 n64logo_N64_Red_lights = gdSPDefLights1(
|
||||
0x7F, 0xF, 0xA,
|
||||
0xFE, 0x1F, 0x15, 0x28, 0x28, 0x28);
|
||||
0x60, 0x7f, 0x66,
|
||||
0xc0, 0xff, 0xee, 0x28, 0x28, 0x28);
|
||||
|
||||
Lights1 n64logo_N64_Yellow_lights = gdSPDefLights1(
|
||||
0x7F, 0x60, 0x0,
|
||||
0xFE, 0xC1, 0x0, 0x28, 0x28, 0x28);
|
||||
0x60, 0x60, 0x60,
|
||||
0xc0, 0xc0, 0xc0, 0x28, 0x28, 0x28);
|
||||
|
||||
Vtx n64logo_N64_mesh_vtx_0[56] = {
|
||||
{{{106, 1, -107},0, {486, 496},{0x0, 0x4E, 0x9B, 0xFF}}},
|
||||
|
|
|
@ -69,6 +69,7 @@
|
|||
"concepts": "cpp",
|
||||
"ranges": "cpp",
|
||||
"surface_collision.h": "c",
|
||||
"math_util.h": "c"
|
||||
"math_util.h": "c",
|
||||
"controller_keyboard.h": "c"
|
||||
}
|
||||
}
|
|
@ -20,6 +20,8 @@
|
|||
#include "icons/IconsForkAwesome.h"
|
||||
#include "icons/IconsMaterialDesign.h"
|
||||
#include "moon/utils/moon-env.h"
|
||||
#include "pc/controller/controller_keyboard.h"
|
||||
#include "moon/ui/screens/addons/addons-view.h"
|
||||
|
||||
#include <SDL2/SDL.h>
|
||||
|
||||
|
@ -765,6 +767,8 @@ namespace MoonInternal {
|
|||
ImGui::Begin("Appearance", NULL, ImGuiWindowFlags_None);
|
||||
|
||||
ImGui::InputText(".gs", bufname, IM_ARRAYSIZE(bufname));
|
||||
if (ImGui::IsItemActivated()) accept_input = false;
|
||||
if (ImGui::IsItemDeactivated()) accept_input = true;
|
||||
if (ImGui::Button("Save to File")) {
|
||||
apply_cc_from_editor();
|
||||
|
||||
|
@ -790,22 +794,46 @@ namespace MoonInternal {
|
|||
if (ImGui::BeginTabItem("CC Editor")) {
|
||||
ImGui::Text("Shirt/Cap");
|
||||
ImGui::ColorEdit4("Hat Main", (float*)&uiHatColor, ImGuiColorEditFlags_NoAlpha | ImGuiColorEditFlags_InputRGB | ImGuiColorEditFlags_Uint8 | ImGuiColorEditFlags_NoLabel);
|
||||
if (ImGui::IsItemActivated()) accept_input = false;
|
||||
if (ImGui::IsItemDeactivated()) accept_input = true;
|
||||
ImGui::ColorEdit4("Hat Shade", (float*)&uiHatShadeColor, ImGuiColorEditFlags_NoAlpha | ImGuiColorEditFlags_InputRGB | ImGuiColorEditFlags_Uint8 | ImGuiColorEditFlags_NoLabel);
|
||||
if (ImGui::IsItemActivated()) accept_input = false;
|
||||
if (ImGui::IsItemDeactivated()) accept_input = true;
|
||||
ImGui::Text("Overalls");
|
||||
ImGui::ColorEdit4("Overalls Main", (float*)&uiOverallsColor, ImGuiColorEditFlags_NoAlpha | ImGuiColorEditFlags_InputRGB | ImGuiColorEditFlags_Uint8 | ImGuiColorEditFlags_NoLabel);
|
||||
if (ImGui::IsItemActivated()) accept_input = false;
|
||||
if (ImGui::IsItemDeactivated()) accept_input = true;
|
||||
ImGui::ColorEdit4("Overalls Shade", (float*)&uiOverallsShadeColor, ImGuiColorEditFlags_NoAlpha | ImGuiColorEditFlags_InputRGB | ImGuiColorEditFlags_Uint8 | ImGuiColorEditFlags_NoLabel);
|
||||
if (ImGui::IsItemActivated()) accept_input = false;
|
||||
if (ImGui::IsItemDeactivated()) accept_input = true;
|
||||
ImGui::Text("Gloves");
|
||||
ImGui::ColorEdit4("Gloves Main", (float*)&uiGlovesColor, ImGuiColorEditFlags_NoAlpha | ImGuiColorEditFlags_InputRGB | ImGuiColorEditFlags_Uint8 | ImGuiColorEditFlags_NoLabel);
|
||||
if (ImGui::IsItemActivated()) accept_input = false;
|
||||
if (ImGui::IsItemDeactivated()) accept_input = true;
|
||||
ImGui::ColorEdit4("Gloves Shade", (float*)&uiGlovesShadeColor, ImGuiColorEditFlags_NoAlpha | ImGuiColorEditFlags_InputRGB | ImGuiColorEditFlags_Uint8 | ImGuiColorEditFlags_NoLabel);
|
||||
if (ImGui::IsItemActivated()) accept_input = false;
|
||||
if (ImGui::IsItemDeactivated()) accept_input = true;
|
||||
ImGui::Text("Shoes");
|
||||
ImGui::ColorEdit4("Shoes Main", (float*)&uiShoesColor, ImGuiColorEditFlags_NoAlpha | ImGuiColorEditFlags_InputRGB | ImGuiColorEditFlags_Uint8 | ImGuiColorEditFlags_NoLabel);
|
||||
if (ImGui::IsItemActivated()) accept_input = false;
|
||||
if (ImGui::IsItemDeactivated()) accept_input = true;
|
||||
ImGui::ColorEdit4("Shoes Shade", (float*)&uiShoesShadeColor, ImGuiColorEditFlags_NoAlpha | ImGuiColorEditFlags_InputRGB | ImGuiColorEditFlags_Uint8 | ImGuiColorEditFlags_NoLabel);
|
||||
if (ImGui::IsItemActivated()) accept_input = false;
|
||||
if (ImGui::IsItemDeactivated()) accept_input = true;
|
||||
ImGui::Text("Skin");
|
||||
ImGui::ColorEdit4("Skin Main", (float*)&uiSkinColor, ImGuiColorEditFlags_NoAlpha | ImGuiColorEditFlags_InputRGB | ImGuiColorEditFlags_Uint8 | ImGuiColorEditFlags_NoLabel);
|
||||
if (ImGui::IsItemActivated()) accept_input = false;
|
||||
if (ImGui::IsItemDeactivated()) accept_input = true;
|
||||
ImGui::ColorEdit4("Skin Shade", (float*)&uiSkinShadeColor, ImGuiColorEditFlags_NoAlpha | ImGuiColorEditFlags_InputRGB | ImGuiColorEditFlags_Uint8 | ImGuiColorEditFlags_NoLabel);
|
||||
if (ImGui::IsItemActivated()) accept_input = false;
|
||||
if (ImGui::IsItemDeactivated()) accept_input = true;
|
||||
ImGui::Text("Hair");
|
||||
ImGui::ColorEdit4("Hair Main", (float*)&uiHairColor, ImGuiColorEditFlags_NoAlpha | ImGuiColorEditFlags_InputRGB | ImGuiColorEditFlags_Uint8 | ImGuiColorEditFlags_NoLabel);
|
||||
if (ImGui::IsItemActivated()) accept_input = false;
|
||||
if (ImGui::IsItemDeactivated()) accept_input = true;
|
||||
ImGui::ColorEdit4("Hair Shade", (float*)&uiHairShadeColor, ImGuiColorEditFlags_NoAlpha | ImGuiColorEditFlags_InputRGB | ImGuiColorEditFlags_Uint8 | ImGuiColorEditFlags_NoLabel);
|
||||
if (ImGui::IsItemActivated()) accept_input = false;
|
||||
if (ImGui::IsItemDeactivated()) accept_input = true;
|
||||
ImGui::EndTabItem();
|
||||
|
||||
ImGui::Dummy(ImVec2(0, 5));
|
||||
|
@ -817,7 +845,8 @@ namespace MoonInternal {
|
|||
}
|
||||
if (ImGui::BeginTabItem("GameShark")) {
|
||||
ImGui::InputTextMultiline("###gameshark_box", cc_gameshark, IM_ARRAYSIZE(cc_gameshark), ImVec2(-FLT_MIN, ImGui::GetTextLineHeight() * 25), ImGuiInputTextFlags_CharsUppercase);
|
||||
|
||||
if (ImGui::IsItemActivated()) accept_input = false;
|
||||
if (ImGui::IsItemDeactivated()) accept_input = true;
|
||||
ImGui::Dummy(ImVec2(0, 5));
|
||||
|
||||
if (ImGui::Button("Paste GS Code")) {
|
||||
|
@ -928,6 +957,36 @@ namespace MoonInternal {
|
|||
ImGui::Checkbox("Skip Intro", &configSkipIntro);
|
||||
ImGui::Checkbox("Enable Yoshi", &enable_yoshi);
|
||||
}
|
||||
if (ImGui::CollapsingHeader("Addons")) {
|
||||
{
|
||||
ImGuiWindowFlags window_flags = ImGuiWindowFlags_None;
|
||||
ImGui::BeginChild("addon_child", ImVec2(ImGui::GetWindowContentRegionWidth(), 130), false, window_flags);
|
||||
for (int n = 0; n < texturePackList.size(); n++)
|
||||
{
|
||||
currentPack = texturePackList[n];
|
||||
ImGui::Selectable(currentPack->name.c_str());
|
||||
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::SetMouseCursor(2);
|
||||
}
|
||||
|
||||
if (ImGui::IsItemActive() && !ImGui::IsItemHovered())
|
||||
{
|
||||
int n_next = n + (ImGui::GetMouseDragDelta(0).y < 0.f ? -1 : 1);
|
||||
if (n_next >= 0 && n_next < texturePackList.size())
|
||||
{
|
||||
texturePackList[n] = texturePackList[n_next];
|
||||
texturePackList[n_next] = currentPack;
|
||||
ImGui::ResetMouseDragDelta();
|
||||
}
|
||||
}
|
||||
}
|
||||
ImGui::EndChild();
|
||||
}
|
||||
if (ImGui::Button("Reload Addons")) {
|
||||
rebuildTextureCache();
|
||||
}
|
||||
}
|
||||
|
||||
ImGui::End();
|
||||
ImGui::PopStyleColor();
|
||||
|
|
|
@ -3,7 +3,10 @@
|
|||
|
||||
#include "moon/utils/moon-env.h"
|
||||
#include "moon/fs/moonfs.h"
|
||||
#include "moon/ui/screens/addons/addons-view.h"
|
||||
#include "moon/mod-engine/engine.h"
|
||||
#include "pc/configfile.h"
|
||||
#include "pc/controller/controller_keyboard.h"
|
||||
|
||||
#include "saturn_colors.h"
|
||||
#include "saturn_textures.h"
|
||||
|
@ -82,6 +85,13 @@ namespace MoonInternal {
|
|||
saturn_load_stache_array();
|
||||
saturn_load_button_array();
|
||||
saturn_load_sideburn_array();
|
||||
|
||||
if(texturePackList.empty()){
|
||||
texturePackList.clear();
|
||||
copy(Moon::addons.begin(), Moon::addons.end(), back_inserter(texturePackList));
|
||||
reverse(texturePackList.begin(), texturePackList.end());
|
||||
}
|
||||
currentPack = NULL;
|
||||
}});
|
||||
|
||||
Moon::registerHookListener({.hookName = WINDOW_API_HANDLE_EVENTS, .callback = [&](HookCall call){
|
||||
|
@ -89,15 +99,9 @@ namespace MoonInternal {
|
|||
switch (ev->type){
|
||||
case SDL_KEYDOWN:
|
||||
if(ev->key.keysym.sym == SDLK_f){
|
||||
if (!show_menu_bar)
|
||||
if (accept_input)
|
||||
freeze_camera();
|
||||
}
|
||||
if(ev->key.keysym.sym == SDLK_x){
|
||||
//cycle_eye_state(1);
|
||||
}
|
||||
if(ev->key.keysym.sym == SDLK_z){
|
||||
//cycle_eye_state(-1);
|
||||
}
|
||||
if(ev->key.keysym.sym == SDLK_F1){
|
||||
show_menu_bar = !show_menu_bar;
|
||||
}
|
||||
|
@ -105,12 +109,6 @@ namespace MoonInternal {
|
|||
if (ev->cbutton.button == SDL_CONTROLLER_BUTTON_DPAD_UP) {
|
||||
freeze_camera();
|
||||
}
|
||||
if (ev->cbutton.button == SDL_CONTROLLER_BUTTON_DPAD_RIGHT) {
|
||||
//cycle_eye_state(1);
|
||||
}
|
||||
if (ev->cbutton.button == SDL_CONTROLLER_BUTTON_DPAD_LEFT) {
|
||||
//cycle_eye_state(-1);
|
||||
}
|
||||
if(ev->cbutton.button == SDL_CONTROLLER_BUTTON_BACK){
|
||||
show_menu_bar = !show_menu_bar;
|
||||
}
|
||||
|
|
|
@ -56,8 +56,8 @@ void rebuildTextureCache(){
|
|||
}
|
||||
reverse(order.begin(), order.end());
|
||||
MoonInternal::buildTextureCache(order);
|
||||
MoonInternal::buildAudioCache(order);
|
||||
MoonInternal::resetSoundSystem();
|
||||
//MoonInternal::buildAudioCache(order);
|
||||
//MoonInternal::resetSoundSystem();
|
||||
}
|
||||
|
||||
void MoonAddonsScreen::changeScroll(int idx){
|
||||
|
|
|
@ -13,5 +13,12 @@ private:
|
|||
void changeScroll(int idx);
|
||||
};
|
||||
|
||||
#include <vector>
|
||||
#include "moon/mod-engine/interfaces/bit-module.h"
|
||||
|
||||
extern BitModule* currentPack;
|
||||
extern std::vector<BitModule*> texturePackList;
|
||||
|
||||
extern void rebuildTextureCache();
|
||||
|
||||
#endif
|
|
@ -56,11 +56,11 @@ ConfigWindow configWindow = {
|
|||
};
|
||||
|
||||
ImGuiConfig configImGui = {
|
||||
.s_stats = false,
|
||||
.s_stats = true,
|
||||
.texture_debug = false,
|
||||
.s_toggles = false,
|
||||
.s_machinima = false,
|
||||
.s_appearance = false,
|
||||
.s_toggles = true,
|
||||
.s_machinima = true,
|
||||
.s_appearance = true,
|
||||
.s_options = false,
|
||||
.jaboMode = false
|
||||
};
|
||||
|
|
|
@ -10,6 +10,8 @@
|
|||
#include "../configfile.h"
|
||||
#include "controller_keyboard.h"
|
||||
|
||||
bool accept_input = true;
|
||||
|
||||
static int keyboard_buttons_down;
|
||||
|
||||
#define MAX_KEYBINDS 64
|
||||
|
@ -29,6 +31,8 @@ static int keyboard_map_scancode(int scancode) {
|
|||
}
|
||||
|
||||
bool keyboard_on_key_down(int scancode) {
|
||||
if (!accept_input) return false;
|
||||
|
||||
int mapped = keyboard_map_scancode(scancode);
|
||||
keyboard_buttons_down |= mapped;
|
||||
keyboard_lastkey = scancode;
|
||||
|
@ -36,6 +40,8 @@ bool keyboard_on_key_down(int scancode) {
|
|||
}
|
||||
|
||||
bool keyboard_on_key_up(int scancode) {
|
||||
if (!accept_input) return false;
|
||||
|
||||
int mapped = keyboard_map_scancode(scancode);
|
||||
keyboard_buttons_down &= ~mapped;
|
||||
if (keyboard_lastkey == (u32) scancode)
|
||||
|
|
|
@ -16,6 +16,7 @@ void keyboard_on_all_keys_up(void);
|
|||
}
|
||||
#endif
|
||||
|
||||
extern bool accept_input;
|
||||
extern struct ControllerAPI controller_keyboard;
|
||||
|
||||
#endif
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 13 KiB |
Loading…
Reference in New Issue