Small QOL fixes

This commit is contained in:
Llennpie 2022-10-14 15:00:19 -04:00
parent f72a142391
commit d8ec6b996e
3 changed files with 39 additions and 6 deletions

View file

@ -163,8 +163,11 @@ void ssettings_imgui_update() {
imgui_bundled_tooltip("Enable/disable this if your game speed is too fast or slow.");
const char* fps_limits[] = { "30", "60" };
if (ImGui::Combo("FPS###fps_limits", (int*)&configFps60, fps_limits, IM_ARRAYSIZE(fps_limits)))
if (ImGui::Combo("FPS###fps_limits", (int*)&configFps60, fps_limits, IM_ARRAYSIZE(fps_limits))) {
configWindow.settings_changed = true;
is_anim_playing = false;
is_anim_paused = false;
}
ImGui::Checkbox("Anti-aliasing", &configWindow.enable_antialias);
imgui_bundled_tooltip("Enables/disables anti-aliasing with OpenGL.");
@ -255,10 +258,8 @@ void ssettings_imgui_update() {
ImGui::Dummy(ImVec2(0, 5));
}
#ifdef DISCORDRPC
if (has_discord_init) {
ImGui::Checkbox("Discord Activity Status", &configDiscordRPC);
imgui_bundled_tooltip("Enables/disables Discord Rich Presence. Requires restart.");
}
ImGui::Checkbox("Discord Activity Status", &configDiscordRPC);
imgui_bundled_tooltip("Enables/disables Discord Rich Presence. Requires restart.");
#endif
const char* mThemeSettings[] = { "Legacy", "Moon", "Half-Life", "Movie Maker", "Dear" };
ImGui::Combo("Theme", (int*)&configEditorTheme, mThemeSettings, IM_ARRAYSIZE(mThemeSettings));

View file

@ -26,6 +26,7 @@ int camera_view_move_y;
bool enable_head_rotations = false;
bool enable_shadows = true;
bool enable_dust_particles = false;
bool enable_torso_rotation = true;
bool can_fall_asleep = false;
int saturnModelState = 0;
bool linkMarioScale;
@ -53,6 +54,10 @@ bool is_chroma_keying = false;
bool prev_quicks[3];
int lastCourseNum = -1;
bool mcamera_is_keyframe;
bool mcamera_playing;
int mcam_timer;
extern "C" {
#include "game/camera.h"
#include "game/area.h"
@ -90,7 +95,7 @@ void saturn_update() {
// Keybinds
if (accept_text_input) {
if (accept_text_input && mario_exists) {
if (gPlayer1Controller->buttonPressed & U_JPAD) camera_frozen = !camera_frozen;
if (gPlayer1Controller->buttonPressed & D_JPAD) showMenu = !showMenu;
if (gPlayer1Controller->buttonPressed & L_JPAD) {
@ -202,10 +207,32 @@ void saturn_update() {
}
}
// Keyframes
if (mcamera_playing) {
if (mcam_timer < (60 * 10)) {
mcam_timer++;
} else {
mcam_timer = 0;
}
}
//s16 pitch, yaw;
//f32 thisDist;
//vec3f_get_dist_and_angle(gCamera->focus, gCamera->pos, &thisDist, &pitch, &yaw);
//camera_approach_f32_symmetric_bool(&thisDist, 150.f, 7.f);
//vec3f_set_dist_and_angle(c->focus, c->pos, dist, pitch, yaw);
//update_camera_yaw(c);
// Misc
mario_exists = (gMarioState->action != ACT_UNINITIALIZED & sCurrPlayMode != 2 & mario_loaded);
if (!mario_exists) {
is_anim_playing = false;
is_anim_paused = false;
}
switch(saturnModelState) {
case 0: scrollModelState = 0; break;
case 1: scrollModelState = 0x200; break; // Metal Cap

View file

@ -26,6 +26,7 @@ extern int current_eye_state;
extern bool enable_head_rotations;
extern bool enable_shadows;
extern bool enable_dust_particles;
extern bool enable_torso_rotation;
extern bool can_fall_asleep;
extern int saturnModelState;
extern bool linkMarioScale;
@ -52,6 +53,10 @@ extern unsigned int chromaKeyColorB;
extern u16 gChromaKeyColor;
extern u16 gChromaKeyBackground;
extern bool mcamera_is_keyframe;
extern bool mcamera_playing;
extern int mcam_timer;
extern SDL_Scancode saturn_key_to_scancode(unsigned int key[]);
#ifdef __cplusplus