mirror of
https://github.com/BanjoRecomp/BanjoRecomp
synced 2026-08-23 06:29:17 -04:00
0e89ee2fe2
* Add jinjo saving support * Cleanup * jinjo saving: Improve jiggy position lock, and update static vars on level change * jinjo saving: Check if jiggy during actor search * jinjo saving: Remove redundant var * jinjo saving: Address an uncommon logic scenario that could confuse players, plus some cleanup * jinjo saving: Cleanup * jinjo saving: Account for the case where a save file already has the jinjo jiggy collected Thanks iCloudius for pointing this out Co-authored-by: iCloudius <102083937+Cloudydude@users.noreply.github.com> * jinjo saving: Update UI for the same case Co-authored-by: iCloudius <102083937+Cloudydude@users.noreply.github.com> * jinjo saving: Extend "note saving" option in settings menu to control jinjo saving * jinjo saving: Cleanup * jinjo saving: Fix accidental regression preventing jiggy respawn Thanks iCloudius for tracking it down. Co-authored-by: iCloudius <102083937+Cloudydude@users.noreply.github.com> * jinjo saving: Add bounds checks for jinjoIdx And remove some old declarations that went unused after removing the patch for chjiggy_update * jinjo saving: Add support for mods that save jinjos in Grunty's Lair, like Jiggies of Time Thanks iCloudius for the suggestion * jinjo saving: Prevent conflicts with Furnace Fun and credits when saving lair jinjos * jinjo saving: Fix missing jinjo sfx Thanks BoozemanDoorslam for the report! A bit surprised this wasn't picked up on sooner --------- Co-authored-by: iCloudius <102083937+Cloudydude@users.noreply.github.com>
98 lines
2.7 KiB
C++
98 lines
2.7 KiB
C++
#ifndef __BANJO_CONFIG_H__
|
|
#define __BANJO_CONFIG_H__
|
|
|
|
#include <filesystem>
|
|
#include <string>
|
|
#include <string_view>
|
|
|
|
#include "json/json.hpp"
|
|
|
|
namespace banjo {
|
|
inline const std::u8string program_id = u8"BanjoRecompiled";
|
|
inline const std::string program_name = "Banjo: Recompiled";
|
|
|
|
namespace configkeys {
|
|
namespace general {
|
|
inline const std::string note_saving_mode = "note_saving_mode";
|
|
inline const std::string camera_invert_mode = "camera_invert_mode";
|
|
inline const std::string analog_cam_mode = "analog_cam_mode";
|
|
inline const std::string third_person_camera_invert_mode = "third_person_camera_invert_mode";
|
|
inline const std::string flying_and_swimming_invert_mode = "flying_and_swimming_invert_mode";
|
|
inline const std::string first_person_invert_mode = "first_person_invert_mode";
|
|
inline const std::string analog_camera_sensitivity = "analog_camera_sensitivity";
|
|
}
|
|
|
|
namespace sound {
|
|
inline const std::string bgm_volume = "bgm_volume";
|
|
}
|
|
|
|
namespace graphics {
|
|
inline const std::string cutscene_aspect_ratio_mode = "cutscene_aspect_ratio_mode";
|
|
}
|
|
}
|
|
|
|
// TODO: Move loading configs to the runtime once we have a way to allow per-project customization.
|
|
void init_config();
|
|
|
|
enum class CameraInvertMode {
|
|
InvertNone,
|
|
InvertX,
|
|
InvertY,
|
|
InvertBoth
|
|
};
|
|
|
|
CameraInvertMode get_camera_invert_mode();
|
|
|
|
CameraInvertMode get_third_person_camera_mode();
|
|
|
|
CameraInvertMode get_flying_and_swimming_invert_mode();
|
|
|
|
CameraInvertMode get_first_person_invert_mode();
|
|
|
|
enum class AnalogCamMode {
|
|
On,
|
|
Off,
|
|
OptionCount
|
|
};
|
|
|
|
NLOHMANN_JSON_SERIALIZE_ENUM(banjo::AnalogCamMode, {
|
|
{banjo::AnalogCamMode::On, "On"},
|
|
{banjo::AnalogCamMode::Off, "Off"}
|
|
});
|
|
|
|
AnalogCamMode get_analog_cam_mode();
|
|
|
|
uint32_t get_analog_cam_sensitivity();
|
|
|
|
enum class NoteSavingMode {
|
|
Both,
|
|
OnlyJinjos,
|
|
OnlyNotes,
|
|
Off,
|
|
OptionCount
|
|
};
|
|
|
|
NLOHMANN_JSON_SERIALIZE_ENUM(banjo::NoteSavingMode, {
|
|
// Keeping as "On" to preserve compatibility with previous configs before jinjo saving
|
|
{banjo::NoteSavingMode::Both, "On"},
|
|
{banjo::NoteSavingMode::OnlyJinjos, "Jinjos"},
|
|
{banjo::NoteSavingMode::OnlyNotes, "Notes"},
|
|
{banjo::NoteSavingMode::Off, "Off"}
|
|
});
|
|
|
|
NoteSavingMode get_note_saving_mode();
|
|
|
|
enum class CutsceneAspectRatioMode {
|
|
Original,
|
|
Clamp16x9,
|
|
Full,
|
|
OptionCount
|
|
};
|
|
|
|
CutsceneAspectRatioMode get_cutscene_aspect_ratio_mode();
|
|
|
|
void open_quit_game_prompt();
|
|
};
|
|
|
|
#endif
|