mirror of https://github.com/sm64pc/sm64pc.git
Start working on skybox toggle, remove castle grounds butterflies
This commit is contained in:
parent
eda6218059
commit
5879b11b4e
|
@ -76,18 +76,18 @@ static const LevelScript script_func_local_3[] = {
|
|||
};
|
||||
|
||||
static const LevelScript script_func_local_4[] = {
|
||||
OBJECT(/*model*/ MODEL_BUTTERFLY, /*pos*/ -4508, 406, 4400, /*angle*/ 0, 0, 0, /*behParam*/ 0x00000000, /*beh*/ bhvButterfly),
|
||||
OBJECT(/*model*/ MODEL_BUTTERFLY, /*pos*/ -4408, 406, 4500, /*angle*/ 0, 0, 0, /*behParam*/ 0x00000000, /*beh*/ bhvButterfly),
|
||||
OBJECT(/*model*/ MODEL_BUTTERFLY, /*pos*/ -4708, 406, 4100, /*angle*/ 0, 0, 0, /*behParam*/ 0x00000000, /*beh*/ bhvButterfly),
|
||||
OBJECT(/*model*/ MODEL_BUTTERFLY, /*pos*/ -6003, 473, -2621, /*angle*/ 0, 0, 0, /*behParam*/ 0x00000000, /*beh*/ bhvButterfly),
|
||||
OBJECT(/*model*/ MODEL_BUTTERFLY, /*pos*/ -6003, 473, -2321, /*angle*/ 0, 0, 0, /*behParam*/ 0x00000000, /*beh*/ bhvButterfly),
|
||||
OBJECT(/*model*/ MODEL_BUTTERFLY, /*pos*/ 6543, 461, -617, /*angle*/ 0, 0, 0, /*behParam*/ 0x00000000, /*beh*/ bhvButterfly),
|
||||
OBJECT(/*model*/ MODEL_BUTTERFLY, /*pos*/ 6143, 461, -617, /*angle*/ 0, 0, 0, /*behParam*/ 0x00000000, /*beh*/ bhvButterfly),
|
||||
OBJECT(/*model*/ MODEL_BUTTERFLY, /*pos*/ 5773, 775, -5722, /*angle*/ 0, 0, 0, /*behParam*/ 0x00000000, /*beh*/ bhvButterfly),
|
||||
OBJECT(/*model*/ MODEL_BUTTERFLY, /*pos*/ 5873, 775, -5622, /*angle*/ 0, 0, 0, /*behParam*/ 0x00000000, /*beh*/ bhvButterfly),
|
||||
OBJECT(/*model*/ MODEL_BUTTERFLY, /*pos*/ 5473, 775, -5322, /*angle*/ 0, 0, 0, /*behParam*/ 0x00000000, /*beh*/ bhvButterfly),
|
||||
OBJECT(/*model*/ MODEL_BUTTERFLY, /*pos*/ -1504, 326, 3196, /*angle*/ 0, 0, 0, /*behParam*/ 0x00000000, /*beh*/ bhvButterfly),
|
||||
OBJECT(/*model*/ MODEL_BUTTERFLY, /*pos*/ -1204, 326, 3296, /*angle*/ 0, 0, 0, /*behParam*/ 0x00000000, /*beh*/ bhvButterfly),
|
||||
//OBJECT(/*model*/ MODEL_BUTTERFLY, /*pos*/ -4508, 406, 4400, /*angle*/ 0, 0, 0, /*behParam*/ 0x00000000, /*beh*/ bhvButterfly),
|
||||
//OBJECT(/*model*/ MODEL_BUTTERFLY, /*pos*/ -4408, 406, 4500, /*angle*/ 0, 0, 0, /*behParam*/ 0x00000000, /*beh*/ bhvButterfly),
|
||||
//OBJECT(/*model*/ MODEL_BUTTERFLY, /*pos*/ -4708, 406, 4100, /*angle*/ 0, 0, 0, /*behParam*/ 0x00000000, /*beh*/ bhvButterfly),
|
||||
//OBJECT(/*model*/ MODEL_BUTTERFLY, /*pos*/ -6003, 473, -2621, /*angle*/ 0, 0, 0, /*behParam*/ 0x00000000, /*beh*/ bhvButterfly),
|
||||
//OBJECT(/*model*/ MODEL_BUTTERFLY, /*pos*/ -6003, 473, -2321, /*angle*/ 0, 0, 0, /*behParam*/ 0x00000000, /*beh*/ bhvButterfly),
|
||||
//OBJECT(/*model*/ MODEL_BUTTERFLY, /*pos*/ 6543, 461, -617, /*angle*/ 0, 0, 0, /*behParam*/ 0x00000000, /*beh*/ bhvButterfly),
|
||||
//OBJECT(/*model*/ MODEL_BUTTERFLY, /*pos*/ 6143, 461, -617, /*angle*/ 0, 0, 0, /*behParam*/ 0x00000000, /*beh*/ bhvButterfly),
|
||||
//OBJECT(/*model*/ MODEL_BUTTERFLY, /*pos*/ 5773, 775, -5722, /*angle*/ 0, 0, 0, /*behParam*/ 0x00000000, /*beh*/ bhvButterfly),
|
||||
//OBJECT(/*model*/ MODEL_BUTTERFLY, /*pos*/ 5873, 775, -5622, /*angle*/ 0, 0, 0, /*behParam*/ 0x00000000, /*beh*/ bhvButterfly),
|
||||
//OBJECT(/*model*/ MODEL_BUTTERFLY, /*pos*/ 5473, 775, -5322, /*angle*/ 0, 0, 0, /*behParam*/ 0x00000000, /*beh*/ bhvButterfly),
|
||||
//OBJECT(/*model*/ MODEL_BUTTERFLY, /*pos*/ -1504, 326, 3196, /*angle*/ 0, 0, 0, /*behParam*/ 0x00000000, /*beh*/ bhvButterfly),
|
||||
//OBJECT(/*model*/ MODEL_BUTTERFLY, /*pos*/ -1204, 326, 3296, /*angle*/ 0, 0, 0, /*behParam*/ 0x00000000, /*beh*/ bhvButterfly),
|
||||
OBJECT(/*model*/ MODEL_YOSHI, /*pos*/ 0, 3174, -5625, /*angle*/ 0, 0, 0, /*behParam*/ 0x00000000, /*beh*/ bhvYoshi),
|
||||
RETURN(),
|
||||
};
|
||||
|
|
|
@ -176,6 +176,9 @@ namespace MoonInternal {
|
|||
|
||||
int selected_eye_item = 0;
|
||||
|
||||
int selected_sky_item = 0;
|
||||
int current_sky_item = 0;
|
||||
|
||||
void setupFonts() {
|
||||
ImGuiIO& io = ImGui::GetIO();
|
||||
// for (auto entry = Moon::fonts.begin(); entry != Moon::fonts.end(); entry++){
|
||||
|
@ -338,6 +341,7 @@ namespace MoonInternal {
|
|||
if (ImGui::BeginMenu("Tools")) {
|
||||
ImGui::MenuItem("Toggle View (F1)", NULL, &show_menu_bar);
|
||||
ImGui::MenuItem("Jabo Mode", NULL, &configImGui.n64Mode);
|
||||
ImGui::MenuItem("Night Mode", NULL, &enable_night_skybox);
|
||||
ImGui::EndMenu();
|
||||
}
|
||||
if (ImGui::BeginMenu("View")) {
|
||||
|
@ -427,11 +431,25 @@ namespace MoonInternal {
|
|||
ImGui::Combo("Cap", ¤t_cap_state, capStates, IM_ARRAYSIZE(capStates));
|
||||
const char* handStates[] = { "Fists", "Open", "Peace", "With Cap", "With Wing Cap", "Right Open" };
|
||||
ImGui::Combo("Hands", ¤t_hand_state, handStates, IM_ARRAYSIZE(handStates));
|
||||
ImGui::Checkbox("Dust Particles", &enable_dust_particles);
|
||||
ImGui::Dummy(ImVec2(0, 5));
|
||||
}
|
||||
|
||||
ImGui::Checkbox("Shadows", &enable_shadows);
|
||||
ImGui::Checkbox("Dust Particles", &enable_dust_particles);
|
||||
const char* skyStates[] = { "Default", "Night", "Green", "Blue", "Pink"};
|
||||
ImGui::Combo("Skybox", &selected_sky_item, skyStates, IM_ARRAYSIZE(skyStates));
|
||||
|
||||
if (selected_sky_item != current_sky_item) {
|
||||
current_sky_item = selected_sky_item;
|
||||
if (selected_sky_item == 0) custom_sky_name = "default";
|
||||
if (selected_sky_item == 1) custom_sky_name = "skyboxes/night";
|
||||
if (selected_sky_item == 2) custom_sky_name = "skyboxes/green";
|
||||
if (selected_sky_item == 3) custom_sky_name = "skyboxes/blue";
|
||||
if (selected_sky_item == 4) custom_sky_name = "skyboxes/pink";
|
||||
saturn_sky_swap();
|
||||
}
|
||||
|
||||
//ImGui::Checkbox("Night Mode", &enable_night_skybox);
|
||||
|
||||
ImGui::Dummy(ImVec2(0, 5));
|
||||
|
||||
|
@ -642,10 +660,12 @@ namespace MoonInternal {
|
|||
ImGui::Begin("Settings", NULL, ImGuiWindowFlags_None);
|
||||
|
||||
if (ImGui::CollapsingHeader("Graphics")) {
|
||||
/*
|
||||
if (ImGui::Button("Toggle Fullscreen")) {
|
||||
configWindow.fullscreen = !configWindow.fullscreen;
|
||||
configWindow.settings_changed = true;
|
||||
}
|
||||
*/
|
||||
if (!configWindow.fullscreen) {
|
||||
if (ImGui::Button("Reset Window Size")) {
|
||||
configWindow.w = 1280;
|
||||
|
|
|
@ -38,12 +38,14 @@ bool show_menu_bar;
|
|||
float camera_speed = 0.8f;
|
||||
bool enable_cap_logo;
|
||||
bool enable_overall_buttons;
|
||||
bool enable_night_skybox;
|
||||
bool enable_yoshi;
|
||||
|
||||
// Second Check
|
||||
|
||||
bool has_changed_cap_logo;
|
||||
bool has_changed_overall_buttons;
|
||||
bool has_changed_night_skybox;
|
||||
bool has_changed_yoshi;
|
||||
|
||||
namespace MoonInternal {
|
||||
|
@ -88,7 +90,8 @@ namespace MoonInternal {
|
|||
switch (ev->type){
|
||||
case SDL_KEYDOWN:
|
||||
if(ev->key.keysym.sym == SDLK_f){
|
||||
freeze_camera();
|
||||
if (!show_menu_bar)
|
||||
freeze_camera();
|
||||
}
|
||||
if(ev->key.keysym.sym == SDLK_x){
|
||||
//cycle_eye_state(1);
|
||||
|
@ -101,7 +104,8 @@ namespace MoonInternal {
|
|||
}
|
||||
case SDL_CONTROLLERBUTTONDOWN:
|
||||
if (ev->cbutton.button == SDL_CONTROLLER_BUTTON_DPAD_UP) {
|
||||
freeze_camera();
|
||||
if (!show_menu_bar)
|
||||
freeze_camera();
|
||||
}
|
||||
if (ev->cbutton.button == SDL_CONTROLLER_BUTTON_DPAD_RIGHT) {
|
||||
//cycle_eye_state(1);
|
||||
|
@ -147,6 +151,12 @@ namespace MoonInternal {
|
|||
saturn_toggle_m_buttons();
|
||||
has_changed_overall_buttons = false;
|
||||
}
|
||||
/*
|
||||
if (enable_night_skybox && !has_changed_night_skybox) {
|
||||
saturn_toggle_night_skybox();
|
||||
has_changed_night_skybox = true;
|
||||
}
|
||||
*/
|
||||
|
||||
// Yoshi
|
||||
|
||||
|
|
|
@ -17,6 +17,7 @@ extern bool show_menu_bar;
|
|||
extern float camera_speed;
|
||||
extern bool enable_cap_logo;
|
||||
extern bool enable_overall_buttons;
|
||||
extern bool enable_night_skybox;
|
||||
extern bool enable_yoshi;
|
||||
|
||||
#endif
|
|
@ -20,6 +20,7 @@ extern "C" {
|
|||
}
|
||||
|
||||
string custom_eye_name;
|
||||
string custom_sky_name;
|
||||
|
||||
std::vector<string> eye_array;
|
||||
string eyeDir;
|
||||
|
@ -79,4 +80,34 @@ void saturn_toggle_m_buttons() {
|
|||
}
|
||||
}
|
||||
}});
|
||||
}
|
||||
}
|
||||
|
||||
void saturn_sky_swap() {
|
||||
Moon::registerHookListener({.hookName = TEXTURE_BIND, .callback = [](HookCall call) {
|
||||
char* *hookTexture = reinterpret_cast<char**>(call.baseArgs["texture"]);
|
||||
string texName = string(*hookTexture);
|
||||
if(texName.find("textures/skyboxes/") != string::npos) {
|
||||
if (custom_sky_name != "default") {
|
||||
(*hookTexture) = const_cast<char*>(custom_sky_name.c_str());
|
||||
} else {
|
||||
(*hookTexture) = const_cast<char*>(texName.c_str());
|
||||
}
|
||||
}
|
||||
}});
|
||||
}
|
||||
|
||||
/*
|
||||
void saturn_toggle_night_skybox() {
|
||||
Moon::registerHookListener({.hookName = TEXTURE_BIND, .callback = [](HookCall call) {
|
||||
char* *hookTexture = reinterpret_cast<char**>(call.baseArgs["texture"]);
|
||||
string texName = string(*hookTexture);
|
||||
if(texName.find("textures/skyboxes/") != string::npos) {
|
||||
if (enable_night_skybox) {
|
||||
(*hookTexture) = const_cast<char*>("night_skybox");
|
||||
} else {
|
||||
(*hookTexture) = const_cast<char*>(texName.c_str());
|
||||
}
|
||||
}
|
||||
}});
|
||||
}
|
||||
*/
|
|
@ -5,6 +5,7 @@
|
|||
#include <vector>
|
||||
|
||||
extern std::string custom_eye_name;
|
||||
extern std::string custom_sky_name;
|
||||
|
||||
extern std::vector<std::string> eye_array;
|
||||
|
||||
|
@ -12,5 +13,7 @@ void saturn_eye_swap(void);
|
|||
void saturn_load_eye_array(void);
|
||||
void saturn_toggle_m_cap(void);
|
||||
void saturn_toggle_m_buttons(void);
|
||||
void saturn_sky_swap(void);
|
||||
//void saturn_toggle_night_skybox(void);
|
||||
|
||||
#endif
|
|
@ -228,7 +228,7 @@ string getLevelLogo(){
|
|||
}
|
||||
|
||||
void set_logo(void) {
|
||||
discordRichPresence.largeImageKey = "saturn-logo-star-bg";
|
||||
discordRichPresence.largeImageKey = "saturn-moon-full";
|
||||
discordRichPresence.largeImageText = "https://github.com/Llennpie/Saturn";
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue