Initial boot

This commit is contained in:
Mr-Wiseguy
2025-02-17 21:45:16 -05:00
parent bed19575f3
commit ff73b2107b
168 changed files with 23034 additions and 2 deletions
+65
View File
@@ -0,0 +1,65 @@
#ifndef __BANJO_CONFIG_H__
#define __BANJO_CONFIG_H__
#include <filesystem>
#include <string_view>
#include "ultramodern/config.hpp"
#include "recomp_input.h"
namespace banjo {
constexpr std::u8string_view program_id = u8"BanjoRecompiled";
constexpr std::string_view program_name = "Banjo: Recompiled";
// TODO: Move loading configs to the runtime once we have a way to allow per-project customization.
void load_config();
void save_config();
void reset_input_bindings();
void reset_cont_input_bindings();
void reset_kb_input_bindings();
void reset_single_input_binding(recomp::InputDevice device, recomp::GameInput input);
std::filesystem::path get_app_folder_path();
bool get_debug_mode_enabled();
void set_debug_mode_enabled(bool enabled);
enum class CameraInvertMode {
InvertNone,
InvertX,
InvertY,
InvertBoth,
OptionCount
};
NLOHMANN_JSON_SERIALIZE_ENUM(banjo::CameraInvertMode, {
{banjo::CameraInvertMode::InvertNone, "InvertNone"},
{banjo::CameraInvertMode::InvertX, "InvertX"},
{banjo::CameraInvertMode::InvertY, "InvertY"},
{banjo::CameraInvertMode::InvertBoth, "InvertBoth"}
});
CameraInvertMode get_camera_invert_mode();
void set_camera_invert_mode(CameraInvertMode mode);
CameraInvertMode get_analog_camera_invert_mode();
void set_analog_camera_invert_mode(CameraInvertMode 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();
void set_analog_cam_mode(AnalogCamMode mode);
void open_quit_game_prompt();
};
#endif
+4
View File
@@ -0,0 +1,4 @@
#ifndef __BANJO_DEBUG_H__
#define __BANJO_DEBUG_H__
#endif
+14
View File
@@ -0,0 +1,14 @@
#ifndef __BANJO_GAME_H__
#define __BANJO_GAME_H__
#include <cstdint>
#include <span>
#include <vector>
#include "recomp.h"
namespace banjo {
std::vector<uint8_t> decompress_bk(std::span<const uint8_t> compressed_rom);
void bk_on_init(uint8_t* rdram, recomp_context* ctx);
};
#endif
+49
View File
@@ -0,0 +1,49 @@
#ifndef __BANJO_RENDER_H__
#define __BANJO_RENDER_H__
#include <unordered_set>
#include <filesystem>
#include "common/rt64_user_configuration.h"
#include "ultramodern/renderer_context.hpp"
#include "librecomp/mods.hpp"
namespace RT64 {
struct Application;
}
namespace banjo {
namespace renderer {
class RT64Context final : public ultramodern::renderer::RendererContext {
public:
~RT64Context() override;
RT64Context(uint8_t *rdram, ultramodern::renderer::WindowHandle window_handle, bool developer_mode);
bool valid() override { return static_cast<bool>(app); }
bool update_config(const ultramodern::renderer::GraphicsConfig &old_config, const ultramodern::renderer::GraphicsConfig &new_config) override;
void enable_instant_present() override;
void send_dl(const OSTask *task) override;
void update_screen(uint32_t vi_origin) override;
void shutdown() override;
uint32_t get_display_framerate() const override;
float get_resolution_scale() const override;
protected:
std::unique_ptr<RT64::Application> app;
std::unordered_set<std::filesystem::path> enabled_texture_packs;
};
std::unique_ptr<ultramodern::renderer::RendererContext> create_render_context(uint8_t *rdram, ultramodern::renderer::WindowHandle window_handle, bool developer_mode);
RT64::UserConfiguration::Antialiasing RT64MaxMSAA();
bool RT64SamplePositionsSupported();
bool RT64HighPrecisionFBEnabled();
void enable_texture_pack(const recomp::mods::ModHandle& mod);
void disable_texture_pack(const recomp::mods::ModHandle& mod);
}
}
#endif
+12
View File
@@ -0,0 +1,12 @@
#ifndef __BANJO_SOUND_H__
#define __BANJO_SOUND_H__
namespace banjo {
void reset_sound_settings();
void set_main_volume(int volume);
int get_main_volume();
void set_bgm_volume(int volume);
int get_bgm_volume();
}
#endif
+9
View File
@@ -0,0 +1,9 @@
#ifndef __OVL_PATCHES_HPP__
#define __OVL_PATCHES_HPP__
namespace banjo {
void register_bk_overlays();
void register_bk_patches();
}
#endif
+872
View File
@@ -0,0 +1,872 @@
// PromptFont by Yukari "Shinmera" Hafner, accessible at https://shinmera.com/promptfont
#ifndef __PROMPTFONT_H__
#define __PROMPTFONT_H__
#define PF_ASCII_BANG "!"
#define PF_ASCII_BANG_INT 0x00021
#define PF_ASCII_DOUBLEQUOTE "\""
#define PF_ASCII_DOUBLEQUOTE_INT 0x00022
#define PF_ASCII_HASH "#"
#define PF_ASCII_HASH_INT 0x00023
#define PF_ASCII_DOLLAR "$"
#define PF_ASCII_DOLLAR_INT 0x00024
#define PF_ASCII_PERCENT "%"
#define PF_ASCII_PERCENT_INT 0x00025
#define PF_ASCII_AMPERSAND "&"
#define PF_ASCII_AMPERSAND_INT 0x00026
#define PF_ASCII_QUOTE "'"
#define PF_ASCII_QUOTE_INT 0x00027
#define PF_ASCII_OPEN_PAREN "("
#define PF_ASCII_OPEN_PAREN_INT 0x00028
#define PF_ASCII_CLOSE_PAREN ")"
#define PF_ASCII_CLOSE_PAREN_INT 0x00029
#define PF_ASCII_STAR "*"
#define PF_ASCII_STAR_INT 0x0002A
#define PF_ASCII_PLUS "+"
#define PF_ASCII_PLUS_INT 0x0002B
#define PF_ASCII_COMMA ","
#define PF_ASCII_COMMA_INT 0x0002C
#define PF_ASCII_DASH "-"
#define PF_ASCII_DASH_INT 0x0002D
#define PF_ASCII_PERIOD "."
#define PF_ASCII_PERIOD_INT 0x0002E
#define PF_ASCII_SLASH "/"
#define PF_ASCII_SLASH_INT 0x0002F
#define PF_ASCII_0 "0"
#define PF_ASCII_0_INT 0x00030
#define PF_ASCII_1 "1"
#define PF_ASCII_1_INT 0x00031
#define PF_ASCII_2 "2"
#define PF_ASCII_2_INT 0x00032
#define PF_ASCII_3 "3"
#define PF_ASCII_3_INT 0x00033
#define PF_ASCII_4 "4"
#define PF_ASCII_4_INT 0x00034
#define PF_ASCII_5 "5"
#define PF_ASCII_5_INT 0x00035
#define PF_ASCII_6 "6"
#define PF_ASCII_6_INT 0x00036
#define PF_ASCII_7 "7"
#define PF_ASCII_7_INT 0x00037
#define PF_ASCII_8 "8"
#define PF_ASCII_8_INT 0x00038
#define PF_ASCII_9 "9"
#define PF_ASCII_9_INT 0x00039
#define PF_ASCII_COLON ":"
#define PF_ASCII_COLON_INT 0x0003A
#define PF_ASCII_SEMICOLON ";"
#define PF_ASCII_SEMICOLON_INT 0x0003B
#define PF_ASCII_OPEN_CARET "<"
#define PF_ASCII_OPEN_CARET_INT 0x0003C
#define PF_ASCII_EQUALS "="
#define PF_ASCII_EQUALS_INT 0x0003D
#define PF_ASCII_CLOSE_CARET ">"
#define PF_ASCII_CLOSE_CARET_INT 0x0003E
#define PF_ASCII_QUESTION "?"
#define PF_ASCII_QUESTION_INT 0x0003F
#define PF_ASCII_AT "@"
#define PF_ASCII_AT_INT 0x00040
#define PF_ASCII_UPPER_A "A"
#define PF_ASCII_UPPER_A_INT 0x00041
#define PF_ASCII_UPPER_B "B"
#define PF_ASCII_UPPER_B_INT 0x00042
#define PF_ASCII_UPPER_C "C"
#define PF_ASCII_UPPER_C_INT 0x00043
#define PF_ASCII_UPPER_D "D"
#define PF_ASCII_UPPER_D_INT 0x00044
#define PF_ASCII_UPPER_E "E"
#define PF_ASCII_UPPER_E_INT 0x00045
#define PF_ASCII_UPPER_F "F"
#define PF_ASCII_UPPER_F_INT 0x00046
#define PF_ASCII_UPPER_G "G"
#define PF_ASCII_UPPER_G_INT 0x00047
#define PF_ASCII_UPPER_H "H"
#define PF_ASCII_UPPER_H_INT 0x00048
#define PF_ASCII_UPPER_I "I"
#define PF_ASCII_UPPER_I_INT 0x00049
#define PF_ASCII_UPPER_J "J"
#define PF_ASCII_UPPER_J_INT 0x0004A
#define PF_ASCII_UPPER_K "K"
#define PF_ASCII_UPPER_K_INT 0x0004B
#define PF_ASCII_UPPER_L "L"
#define PF_ASCII_UPPER_L_INT 0x0004C
#define PF_ASCII_UPPER_M "M"
#define PF_ASCII_UPPER_M_INT 0x0004D
#define PF_ASCII_UPPER_N "N"
#define PF_ASCII_UPPER_N_INT 0x0004E
#define PF_ASCII_UPPER_O "O"
#define PF_ASCII_UPPER_O_INT 0x0004F
#define PF_ASCII_UPPER_P "P"
#define PF_ASCII_UPPER_P_INT 0x00050
#define PF_ASCII_UPPER_Q "Q"
#define PF_ASCII_UPPER_Q_INT 0x00051
#define PF_ASCII_UPPER_R "R"
#define PF_ASCII_UPPER_R_INT 0x00052
#define PF_ASCII_UPPER_S "S"
#define PF_ASCII_UPPER_S_INT 0x00053
#define PF_ASCII_UPPER_T "T"
#define PF_ASCII_UPPER_T_INT 0x00054
#define PF_ASCII_UPPER_U "U"
#define PF_ASCII_UPPER_U_INT 0x00055
#define PF_ASCII_UPPER_V "V"
#define PF_ASCII_UPPER_V_INT 0x00056
#define PF_ASCII_UPPER_W "W"
#define PF_ASCII_UPPER_W_INT 0x00057
#define PF_ASCII_UPPER_X "X"
#define PF_ASCII_UPPER_X_INT 0x00058
#define PF_ASCII_UPPER_Y "Y"
#define PF_ASCII_UPPER_Y_INT 0x00059
#define PF_ASCII_UPPER_Z "Z"
#define PF_ASCII_UPPER_Z_INT 0x0005A
#define PF_ASCII_OPEN_BRACKET "["
#define PF_ASCII_OPEN_BRACKET_INT 0x0005B
#define PF_ASCII_BACKSLASH "\\"
#define PF_ASCII_BACKSLASH_INT 0x0005C
#define PF_ASCII_CLOSE_BRACKET "]"
#define PF_ASCII_CLOSE_BRACKET_INT 0x0005D
#define PF_ASCII_CARET "^"
#define PF_ASCII_CARET_INT 0x0005E
#define PF_ASCII_UNDERSCORE "_"
#define PF_ASCII_UNDERSCORE_INT 0x0005F
#define PF_ASCII_BACKTICK "`"
#define PF_ASCII_BACKTICK_INT 0x00060
#define PF_ASCII_LOWER_A "a"
#define PF_ASCII_LOWER_A_INT 0x00061
#define PF_ASCII_LOWER_B "b"
#define PF_ASCII_LOWER_B_INT 0x00062
#define PF_ASCII_LOWER_C "c"
#define PF_ASCII_LOWER_C_INT 0x00063
#define PF_ASCII_LOWER_D "d"
#define PF_ASCII_LOWER_D_INT 0x00064
#define PF_ASCII_LOWER_E "e"
#define PF_ASCII_LOWER_E_INT 0x00065
#define PF_ASCII_LOWER_F "f"
#define PF_ASCII_LOWER_F_INT 0x00066
#define PF_ASCII_LOWER_G "g"
#define PF_ASCII_LOWER_G_INT 0x00067
#define PF_ASCII_LOWER_H "h"
#define PF_ASCII_LOWER_H_INT 0x00068
#define PF_ASCII_LOWER_I "i"
#define PF_ASCII_LOWER_I_INT 0x00069
#define PF_ASCII_LOWER_J "j"
#define PF_ASCII_LOWER_J_INT 0x0006A
#define PF_ASCII_LOWER_K "k"
#define PF_ASCII_LOWER_K_INT 0x0006B
#define PF_ASCII_LOWER_L "l"
#define PF_ASCII_LOWER_L_INT 0x0006C
#define PF_ASCII_LOWER_M "m"
#define PF_ASCII_LOWER_M_INT 0x0006D
#define PF_ASCII_LOWER_N "n"
#define PF_ASCII_LOWER_N_INT 0x0006E
#define PF_ASCII_LOWER_O "o"
#define PF_ASCII_LOWER_O_INT 0x0006F
#define PF_ASCII_LOWER_P "p"
#define PF_ASCII_LOWER_P_INT 0x00070
#define PF_ASCII_LOWER_Q "q"
#define PF_ASCII_LOWER_Q_INT 0x00071
#define PF_ASCII_LOWER_R "r"
#define PF_ASCII_LOWER_R_INT 0x00072
#define PF_ASCII_LOWER_S "s"
#define PF_ASCII_LOWER_S_INT 0x00073
#define PF_ASCII_LOWER_T "t"
#define PF_ASCII_LOWER_T_INT 0x00074
#define PF_ASCII_LOWER_U "u"
#define PF_ASCII_LOWER_U_INT 0x00075
#define PF_ASCII_LOWER_V "v"
#define PF_ASCII_LOWER_V_INT 0x00076
#define PF_ASCII_LOWER_W "w"
#define PF_ASCII_LOWER_W_INT 0x00077
#define PF_ASCII_LOWER_X "x"
#define PF_ASCII_LOWER_X_INT 0x00078
#define PF_ASCII_LOWER_Y "y"
#define PF_ASCII_LOWER_Y_INT 0x00079
#define PF_ASCII_LOWER_Z "z"
#define PF_ASCII_LOWER_Z_INT 0x0007A
#define PF_ASCII_OPEN_BRACE "{"
#define PF_ASCII_OPEN_BRACE_INT 0x0007B
#define PF_ASCII_BAR "|"
#define PF_ASCII_BAR_INT 0x0007C
#define PF_ASCII_CLOSE_BRACE "}"
#define PF_ASCII_CLOSE_BRACE_INT 0x0007D
#define PF_ASCII_TILDE "~"
#define PF_ASCII_TILDE_INT 0x0007E
#define PF_ICON_EXCHANGE "↔"
#define PF_ICON_EXCHANGE_INT 0x02194
#define PF_ICON_REVERSE "↕"
#define PF_ICON_REVERSE_INT 0x02195
#define PF_XBOX_LEFT_TRIGGER "↖"
#define PF_XBOX_LEFT_TRIGGER_INT 0x02196
#define PF_XBOX_RIGHT_TRIGGER "↗"
#define PF_XBOX_RIGHT_TRIGGER_INT 0x02197
#define PF_XBOX_LEFT_SHOULDER "↘"
#define PF_XBOX_LEFT_SHOULDER_INT 0x02198
#define PF_XBOX_RIGHT_SHOULDER "↙"
#define PF_XBOX_RIGHT_SHOULDER_INT 0x02199
#define PF_NINTENDO_LEFT_TRIGGER "↚"
#define PF_NINTENDO_LEFT_TRIGGER_INT 0x0219A
#define PF_NINTENDO_RIGHT_TRIGGER "↛"
#define PF_NINTENDO_RIGHT_TRIGGER_INT 0x0219B
#define PF_NINTENDO_LEFT_SHOULDER "↜"
#define PF_NINTENDO_LEFT_SHOULDER_INT 0x0219C
#define PF_NINTENDO_RIGHT_SHOULDER "↝"
#define PF_NINTENDO_RIGHT_SHOULDER_INT 0x0219D
#define PF_DPAD_LEFT "↞"
#define PF_DPAD_LEFT_INT 0x0219E
#define PF_DPAD_UP "↟"
#define PF_DPAD_UP_INT 0x0219F
#define PF_DPAD_RIGHT "↠"
#define PF_DPAD_RIGHT_INT 0x021A0
#define PF_DPAD_DOWN "↡"
#define PF_DPAD_DOWN_INT 0x021A1
#define PF_DPAD_LEFT_RIGHT "↢"
#define PF_DPAD_LEFT_RIGHT_INT 0x021A2
#define PF_DPAD_UP_DOWN "↣"
#define PF_DPAD_UP_DOWN_INT 0x021A3
#define PF_GAMEPAD_X "↤"
#define PF_GAMEPAD_X_INT 0x021A4
#define PF_GAMEPAD_Y "↥"
#define PF_GAMEPAD_Y_INT 0x021A5
#define PF_GAMEPAD_B "↦"
#define PF_GAMEPAD_B_INT 0x021A6
#define PF_GAMEPAD_A "↧"
#define PF_GAMEPAD_A_INT 0x021A7
#define PF_ANALOG_L_CLOCKWISE "↩"
#define PF_ANALOG_L_CLOCKWISE_INT 0x021A9
#define PF_ANALOG_L_COUNTER "↪"
#define PF_ANALOG_L_COUNTER_INT 0x021AA
#define PF_ANALOG_R_CLOCKWISE "↫"
#define PF_ANALOG_R_CLOCKWISE_INT 0x021AB
#define PF_ANALOG_R_COUNTER "↬"
#define PF_ANALOG_R_COUNTER_INT 0x021AC
#define PF_ANALOG_LR_BLOCKWISE "↭"
#define PF_ANALOG_LR_BLOCKWISE_INT 0x021AD
#define PF_ANALOG_LR_COUNTER "↮"
#define PF_ANALOG_LR_COUNTER_INT 0x021AE
#define PF_SONY_LEFT_SHOULDER "↰"
#define PF_SONY_LEFT_SHOULDER_INT 0x021B0
#define PF_SONY_RIGHT_SHOULDER "↱"
#define PF_SONY_RIGHT_SHOULDER_INT 0x021B1
#define PF_SONY_LEFT_TRIGGER "↲"
#define PF_SONY_LEFT_TRIGGER_INT 0x021B2
#define PF_SONY_RIGHT_TRIGGER "↳"
#define PF_SONY_RIGHT_TRIGGER_INT 0x021B3
#define PF_DPAD_LEFT_DOWN "↴"
#define PF_DPAD_LEFT_DOWN_INT 0x021B4
#define PF_GAMEPAD_UP_RIGHT "↵"
#define PF_GAMEPAD_UP_RIGHT_INT 0x021B5
#define PF_ANALOG_CLOCKWISE "↶"
#define PF_ANALOG_CLOCKWISE_INT 0x021B6
#define PF_ANALOG_COUNTER "↷"
#define PF_ANALOG_COUNTER_INT 0x021B7
#define PF_ANALOG_CLICK "↹"
#define PF_ANALOG_CLICK_INT 0x021B9
#define PF_ANALOG_L_CLICK "↺"
#define PF_ANALOG_L_CLICK_INT 0x021BA
#define PF_ANALOG_R_CLICK "↻"
#define PF_ANALOG_R_CLICK_INT 0x021BB
#define PF_ANALOG_L_LEFT "↼"
#define PF_ANALOG_L_LEFT_INT 0x021BC
#define PF_ANALOG_R_LEFT "↽"
#define PF_ANALOG_R_LEFT_INT 0x021BD
#define PF_ANALOG_L_UP "↾"
#define PF_ANALOG_L_UP_INT 0x021BE
#define PF_ANALOG_R_UP "↿"
#define PF_ANALOG_R_UP_INT 0x021BF
#define PF_ANALOG_L_RIGHT "⇀"
#define PF_ANALOG_L_RIGHT_INT 0x021C0
#define PF_ANALOG_R_RIGHT "⇁"
#define PF_ANALOG_R_RIGHT_INT 0x021C1
#define PF_ANALOG_L_DOWN "⇂"
#define PF_ANALOG_L_DOWN_INT 0x021C2
#define PF_ANALOG_R_DOWN "⇃"
#define PF_ANALOG_R_DOWN_INT 0x021C3
#define PF_ANALOG_L_LEFT_RIGHT "⇄"
#define PF_ANALOG_L_LEFT_RIGHT_INT 0x021C4
#define PF_ANALOG_L_UP_DOWN "⇅"
#define PF_ANALOG_L_UP_DOWN_INT 0x021C5
#define PF_ANALOG_R_LEFT_RIGHT "⇆"
#define PF_ANALOG_R_LEFT_RIGHT_INT 0x021C6
#define PF_ANALOG_LEFT "⇇"
#define PF_ANALOG_LEFT_INT 0x021C7
#define PF_ANALOG_UP "⇈"
#define PF_ANALOG_UP_INT 0x021C8
#define PF_ANALOG_RIGHT "⇉"
#define PF_ANALOG_RIGHT_INT 0x021C9
#define PF_ANALOG_DOWN "⇊"
#define PF_ANALOG_DOWN_INT 0x021CA
#define PF_ANALOG_L "⇋"
#define PF_ANALOG_L_INT 0x021CB
#define PF_ANALOG_R "⇌"
#define PF_ANALOG_R_INT 0x021CC
#define PF_DPAD "⇎"
#define PF_DPAD_INT 0x021CE
#define PF_XBOX_X "⇐"
#define PF_XBOX_X_INT 0x021D0
#define PF_XBOX_Y "⇑"
#define PF_XBOX_Y_INT 0x021D1
#define PF_XBOX_B "⇒"
#define PF_XBOX_B_INT 0x021D2
#define PF_XBOX_A "⇓"
#define PF_XBOX_A_INT 0x021D3
#define PF_ANALOG_LEFT_RIGHT "⇔"
#define PF_ANALOG_LEFT_RIGHT_INT 0x021D4
#define PF_ANALOG_UP_DOWN "⇕"
#define PF_ANALOG_UP_DOWN_INT 0x021D5
#define PF_ANALOG_UP_LEFT "⇖"
#define PF_ANALOG_UP_LEFT_INT 0x021D6
#define PF_ANALOG_UP_RIGHT "⇗"
#define PF_ANALOG_UP_RIGHT_INT 0x021D7
#define PF_ANALOG_DOWN_RIGHT "⇘"
#define PF_ANALOG_DOWN_RIGHT_INT 0x021D8
#define PF_ANALOG_DOWN_LEFT "⇙"
#define PF_ANALOG_DOWN_LEFT_INT 0x021D9
#define PF_ANALOG_L_TOUCH "⇚"
#define PF_ANALOG_L_TOUCH_INT 0x021DA
#define PF_ANALOG_R_TOUCH "⇛"
#define PF_ANALOG_R_TOUCH_INT 0x021DB
#define PF_XBOX_LEFT_TRIGGER_PULL "⇜"
#define PF_XBOX_LEFT_TRIGGER_PULL_INT 0x021DC
#define PF_XBOX_RIGHT_TRIGGER_PULL "⇝"
#define PF_XBOX_RIGHT_TRIGGER_PULL_INT 0x021DD
#define PF_DPAD_RIGHT_DOWN "⇞"
#define PF_DPAD_RIGHT_DOWN_INT 0x021DE
#define PF_DUPAD_LEFT_UP "⇟"
#define PF_DUPAD_LEFT_UP_INT 0x021DF
#define PF_SONY_X "⇠"
#define PF_SONY_X_INT 0x021E0
#define PF_SONY_Y "⇡"
#define PF_SONY_Y_INT 0x021E1
#define PF_SONY_B "⇢"
#define PF_SONY_B_INT 0x021E2
#define PF_SONY_A "⇣"
#define PF_SONY_A_INT 0x021E3
#define PF_STEAM_MENU "⇤"
#define PF_STEAM_MENU_INT 0x021E4
#define PF_STEAM_OPTIONS "⇥"
#define PF_STEAM_OPTIONS_INT 0x021E5
#define PF_SONY_SHARE "⇦"
#define PF_SONY_SHARE_INT 0x021E6
#define PF_SONY_TOUCHPAD "⇧"
#define PF_SONY_TOUCHPAD_INT 0x021E7
#define PF_SONY_OPTIONS "⇨"
#define PF_SONY_OPTIONS_INT 0x021E8
#define PF_NINTENDO_BUTTON_Z "⇩"
#define PF_NINTENDO_BUTTON_Z_INT 0x021E9
#define PF_NINTENDO_TRIGGER_Z "⇪"
#define PF_NINTENDO_TRIGGER_Z_INT 0x021EA
#define PF_NINTENDO_C "⇫"
#define PF_NINTENDO_C_INT 0x021EB
#define PF_NINTENDO_Z "⇬"
#define PF_NINTENDO_Z_INT 0x021EC
#define PF_NINTENDO_1 "⇭"
#define PF_NINTENDO_1_INT 0x021ED
#define PF_NINTENDO_2 "⇮"
#define PF_NINTENDO_2_INT 0x021EE
#define PF_ANALOG_L_ANY "⇱"
#define PF_ANALOG_L_ANY_INT 0x021F1
#define PF_ANALOG_R_ANY "⇲"
#define PF_ANALOG_R_ANY_INT 0x021F2
#define PF_ANALOG_ANY "⇳"
#define PF_ANALOG_ANY_INT 0x021F3
#define PF_ANALOG_R_UP_DOWN "⇵"
#define PF_ANALOG_R_UP_DOWN_INT 0x021F5
#define PF_GAMEPAD_SELECT "⇷"
#define PF_GAMEPAD_SELECT_INT 0x021F7
#define PF_GAMEPAD_START "⇸"
#define PF_GAMEPAD_START_INT 0x021F8
#define PF_GAMEPAD_HOME "⇹"
#define PF_GAMEPAD_HOME_INT 0x021F9
#define PF_XBOX_VIEW "⇺"
#define PF_XBOX_VIEW_INT 0x021FA
#define PF_XBOX_MENU "⇻"
#define PF_XBOX_MENU_INT 0x021FB
#define PF_NINTENDO_MINUS "⇽"
#define PF_NINTENDO_MINUS_INT 0x021FD
#define PF_NINTENDO_PLUS "⇾"
#define PF_NINTENDO_PLUS_INT 0x021FE
#define PF_NINTENDO_DPAD_LEFT "⇿"
#define PF_NINTENDO_DPAD_LEFT_INT 0x021FF
#define PF_NINTENDO_DPAD_UP "∀"
#define PF_NINTENDO_DPAD_UP_INT 0x02200
#define PF_NINTENDO_DPAD_RIGHT "∁"
#define PF_NINTENDO_DPAD_RIGHT_INT 0x02201
#define PF_NINTENDO_DPAD_DOWN "∂"
#define PF_NINTENDO_DPAD_DOWN_INT 0x02202
#define PF_NINTENDO_JOYCON_SL "∃"
#define PF_NINTENDO_JOYCON_SL_INT 0x02203
#define PF_NINTENDO_JOYCON_SR "∄"
#define PF_NINTENDO_JOYCON_SR_INT 0x02204
#define PF_LEGION_SETTINGS "∅"
#define PF_LEGION_SETTINGS_INT 0x02205
#define PF_SONY_DUALSENSE_SHARE "∆"
#define PF_SONY_DUALSENSE_SHARE_INT 0x02206
#define PF_SONY_DUALSENSE_TOUCHPAD "∇"
#define PF_SONY_DUALSENSE_TOUCHPAD_INT 0x02207
#define PF_SONY_DUALSENSE_OPTIONS "∈"
#define PF_SONY_DUALSENSE_OPTIONS_INT 0x02208
#define PF_AYANEO_LC "∉"
#define PF_AYANEO_LC_INT 0x02209
#define PF_AYANEO_RC "∊"
#define PF_AYANEO_RC_INT 0x0220A
#define PF_AYANEO_WAVE "∋"
#define PF_AYANEO_WAVE_INT 0x0220B
#define PF_AYANEO_HOME "∌"
#define PF_AYANEO_HOME_INT 0x0220C
#define PF_AYANEO_LCC "∍"
#define PF_AYANEO_LCC_INT 0x0220D
#define PF_GPD_C1 "∎"
#define PF_GPD_C1_INT 0x0220E
#define PF_GPD_C2 "∏"
#define PF_GPD_C2_INT 0x0220F
#define PF_ONEXPLAYER_KEYBOARD "∐"
#define PF_ONEXPLAYER_KEYBOARD_INT 0x02210
#define PF_ONEXPLAYER_TURBO "∑"
#define PF_ONEXPLAYER_TURBO_INT 0x02211
#define PF_GAMEPAD_M1 ""
#define PF_GAMEPAD_M1_INT 0x02212
#define PF_GAMEPAD_M2 "∓"
#define PF_GAMEPAD_M2_INT 0x02213
#define PF_GAMEPAD_M3 "∔"
#define PF_GAMEPAD_M3_INT 0x02214
#define PF_GAMEPAD_Y1 ""
#define PF_GAMEPAD_Y1_INT 0x02215
#define PF_GAMEPAD_Y2 ""
#define PF_GAMEPAD_Y2_INT 0x02216
#define PF_GAMEPAD_Y3 ""
#define PF_GAMEPAD_Y3_INT 0x02217
#define PF_ONEXPLAYER_FUNCTION "∘"
#define PF_ONEXPLAYER_FUNCTION_INT 0x02218
#define PF_ONEXPLAYER_HOME "∙"
#define PF_ONEXPLAYER_HOME_INT 0x02219
#define PF_TRACKPAD_L_ANY "≤"
#define PF_TRACKPAD_L_ANY_INT 0x02264
#define PF_TRACKPAD_R_ANY "≥"
#define PF_TRACKPAD_R_ANY_INT 0x02265
#define PF_TRACKPAD_L_CLICK "≦"
#define PF_TRACKPAD_L_CLICK_INT 0x02266
#define PF_TRACKPAD_R_CLICK "≧"
#define PF_TRACKPAD_R_CLICK_INT 0x02267
#define PF_TRACKPAD_L_TOUCH "≨"
#define PF_TRACKPAD_L_TOUCH_INT 0x02268
#define PF_TRACKPAD_R_TOUCH "≩"
#define PF_TRACKPAD_R_TOUCH_INT 0x02269
#define PF_TRACKPAD_L_LEFT "≮"
#define PF_TRACKPAD_L_LEFT_INT 0x0226E
#define PF_TRACKPAD_R_LEFT "≯"
#define PF_TRACKPAD_R_LEFT_INT 0x0226F
#define PF_TRACKPAD_L_UP "≰"
#define PF_TRACKPAD_L_UP_INT 0x02270
#define PF_TRACKPAD_R_UP "≱"
#define PF_TRACKPAD_R_UP_INT 0x02271
#define PF_TRACKPAD_L_RIGHT "≲"
#define PF_TRACKPAD_L_RIGHT_INT 0x02272
#define PF_TRACKPAD_R_RIGHT "≳"
#define PF_TRACKPAD_R_RIGHT_INT 0x02273
#define PF_TRACKPAD_L_DOWN "≴"
#define PF_TRACKPAD_L_DOWN_INT 0x02274
#define PF_TRACKPAD_R_DOWN "≵"
#define PF_TRACKPAD_R_DOWN_INT 0x02275
#define PF_GAMEPAD_L4 "≶"
#define PF_GAMEPAD_L4_INT 0x02276
#define PF_GAMEPAD_R4 "≷"
#define PF_GAMEPAD_R4_INT 0x02277
#define PF_GAMEPAD_L5 "≸"
#define PF_GAMEPAD_L5_INT 0x02278
#define PF_GAMEPAD_R5 "≹"
#define PF_GAMEPAD_R5_INT 0x02279
#define PF_XBOX_DPAD_LEFT "≺"
#define PF_XBOX_DPAD_LEFT_INT 0x0227A
#define PF_XBOX_DPAD_UP "≻"
#define PF_XBOX_DPAD_UP_INT 0x0227B
#define PF_XBOX_DPAD_RIGHT "≼"
#define PF_XBOX_DPAD_RIGHT_INT 0x0227C
#define PF_XBOX_DPAD_DOWN "≽"
#define PF_XBOX_DPAD_DOWN_INT 0x0227D
#define PF_XBOX_DEPAD_LEFT_RIGHT "≾"
#define PF_XBOX_DEPAD_LEFT_RIGHT_INT 0x0227E
#define PF_XBOX_DPAD_UP_DOWN "≿"
#define PF_XBOX_DPAD_UP_DOWN_INT 0x0227F
#define PF_XBOX_DPAD_LEFT_UP "⊀"
#define PF_XBOX_DPAD_LEFT_UP_INT 0x02280
#define PF_XBOX_DPAD_RIGHT_UP "⊁"
#define PF_XBOX_DPAD_RIGHT_UP_INT 0x02281
#define PF_XBOX_DPAD_LEFT_DOWN "⊂"
#define PF_XBOX_DPAD_LEFT_DOWN_INT 0x02282
#define PF_XBOX_DPAD_RIGHT_DOWN "⊃"
#define PF_XBOX_DPAD_RIGHT_DOWN_INT 0x02283
#define PF_XBOX_DPAD "⊄"
#define PF_XBOX_DPAD_INT 0x02284
#define PF_ICON_PIN "⌖"
#define PF_ICON_PIN_INT 0x02316
#define PF_ANDROID_TABS "⏍"
#define PF_ANDROID_TABS_INT 0x023CD
#define PF_ANDROID_BACK "⏎"
#define PF_ANDROID_BACK_INT 0x023CE
#define PF_ANDROID_HOME "⏏"
#define PF_ANDROID_HOME_INT 0x023CF
#define PF_ANDROID_HORIZONTAL_DOTS "⏐"
#define PF_ANDROID_HORIZONTAL_DOTS_INT 0x023D0
#define PF_ANDROID_VERTICAL_DOTS "⏑"
#define PF_ANDROID_VERTICAL_DOTS_INT 0x023D1
#define PF_ANDROID_HAMBURGER_MENU "⏒"
#define PF_ANDROID_HAMBURGER_MENU_INT 0x023D2
#define PF_KEYBOARD_LEFT "⏴"
#define PF_KEYBOARD_LEFT_INT 0x023F4
#define PF_KEYBOARD_UP "⏵"
#define PF_KEYBOARD_UP_INT 0x023F5
#define PF_KEYBOARD_RIGHT "⏶"
#define PF_KEYBOARD_RIGHT_INT 0x023F6
#define PF_KEYBOARD_DOWN "⏷"
#define PF_KEYBOARD_DOWN_INT 0x023F7
#define PF_KEYBOARD_WASD "␣"
#define PF_KEYBOARD_WASD_INT 0x02423
#define PF_KEYBOARD_ARROWS "␤"
#define PF_KEYBOARD_ARROWS_INT 0x02424
#define PF_KEYBOARD_IJKL "␥"
#define PF_KEYBOARD_IJKL_INT 0x02425
#define PF_KEYBOARD_FN "␦"
#define PF_KEYBOARD_FN_INT 0x02426
#define PF_KEYBOARD_CONTROL "␧"
#define PF_KEYBOARD_CONTROL_INT 0x02427
#define PF_KEYBOARD_ALT "␨"
#define PF_KEYBOARD_ALT_INT 0x02428
#define PF_KEYBOARD_SHIFT "␩"
#define PF_KEYBOARD_SHIFT_INT 0x02429
#define PF_KEYBOARD_SUPER "␪"
#define PF_KEYBOARD_SUPER_INT 0x0242A
#define PF_KEYBOARD_TAB "␫"
#define PF_KEYBOARD_TAB_INT 0x0242B
#define PF_KEYBOARD_CAPS "␬"
#define PF_KEYBOARD_CAPS_INT 0x0242C
#define PF_KEYBOARD_BACKSPACE "␭"
#define PF_KEYBOARD_BACKSPACE_INT 0x0242D
#define PF_KEYBOARD_ENTER "␮"
#define PF_KEYBOARD_ENTER_INT 0x0242E
#define PF_KEYBOARD_ESCAPE "␯"
#define PF_KEYBOARD_ESCAPE_INT 0x0242F
#define PF_KEYBOARD_PRINT_SCREEN "␰"
#define PF_KEYBOARD_PRINT_SCREEN_INT 0x02430
#define PF_KEYBOARD_SCROLL_LOCK "␱"
#define PF_KEYBOARD_SCROLL_LOCK_INT 0x02431
#define PF_KEYBOARD_PAUSE "␲"
#define PF_KEYBOARD_PAUSE_INT 0x02432
#define PF_KEYBOARD_NUM_LOCK "␳"
#define PF_KEYBOARD_NUM_LOCK_INT 0x02433
#define PF_KEYBOARD_INSERT "␴"
#define PF_KEYBOARD_INSERT_INT 0x02434
#define PF_KEYBOARD_HOME "␵"
#define PF_KEYBOARD_HOME_INT 0x02435
#define PF_KEYBOARD_PAGE_UP "␶"
#define PF_KEYBOARD_PAGE_UP_INT 0x02436
#define PF_KEYBOARD_DELETE "␷"
#define PF_KEYBOARD_DELETE_INT 0x02437
#define PF_KEYBOARD_END "␸"
#define PF_KEYBOARD_END_INT 0x02438
#define PF_KEYBOARD_PAGE_DOWN "␹"
#define PF_KEYBOARD_PAGE_DOWN_INT 0x02439
#define PF_KEYBOARD_SPACE "␺"
#define PF_KEYBOARD_SPACE_INT 0x0243A
#define PF_DEVICE_GAMEPAD "␼"
#define PF_DEVICE_GAMEPAD_INT 0x0243C
#define PF_DEVICE_KEYBOARD "␽"
#define PF_DEVICE_KEYBOARD_INT 0x0243D
#define PF_DEVICE_MOUSE "␾"
#define PF_DEVICE_MOUSE_INT 0x0243E
#define PF_DEVICE_MOUSE_KEYBOARD "␿"
#define PF_DEVICE_MOUSE_KEYBOARD_INT 0x0243F
#define PF_KEYBOARD_F1 "①"
#define PF_KEYBOARD_F1_INT 0x02460
#define PF_KEYBOARD_F2 "②"
#define PF_KEYBOARD_F2_INT 0x02461
#define PF_KEYBOARD_F3 "③"
#define PF_KEYBOARD_F3_INT 0x02462
#define PF_KEYBOARD_F4 "④"
#define PF_KEYBOARD_F4_INT 0x02463
#define PF_KEYBOARD_F5 "⑤"
#define PF_KEYBOARD_F5_INT 0x02464
#define PF_KEYBOARD_F6 "⑥"
#define PF_KEYBOARD_F6_INT 0x02465
#define PF_KEYBOARD_F7 "⑦"
#define PF_KEYBOARD_F7_INT 0x02466
#define PF_KEYBOARD_F8 "⑧"
#define PF_KEYBOARD_F8_INT 0x02467
#define PF_KEYBOARD_F9 "⑨"
#define PF_KEYBOARD_F9_INT 0x02468
#define PF_KEYBOARD_F10 "⑩"
#define PF_KEYBOARD_F10_INT 0x02469
#define PF_KEYBOARD_F11 "⑪"
#define PF_KEYBOARD_F11_INT 0x0246A
#define PF_KEYBOARD_F12 "⑫"
#define PF_KEYBOARD_F12_INT 0x0246B
#define PF_KEYBOARD_KEY "⒏"
#define PF_KEYBOARD_KEY_INT 0x0248F
#define PF_ICON_1 "⓵"
#define PF_ICON_1_INT 0x024F5
#define PF_ICON_2 "⓶"
#define PF_ICON_2_INT 0x024F6
#define PF_ICON_3 "⓷"
#define PF_ICON_3_INT 0x024F7
#define PF_ICON_4 "⓸"
#define PF_ICON_4_INT 0x024F8
#define PF_ICON_5 "⓹"
#define PF_ICON_5_INT 0x024F9
#define PF_ICON_6 "⓺"
#define PF_ICON_6_INT 0x024FA
#define PF_ICON_7 "⓻"
#define PF_ICON_7_INT 0x024FB
#define PF_ICON_8 "⓼"
#define PF_ICON_8_INT 0x024FC
#define PF_ICON_9 "⓽"
#define PF_ICON_9_INT 0x024FD
#define PF_ICON_0 "⓿"
#define PF_ICON_0_INT 0x024FF
#define PF_ICON_STAR "★"
#define PF_ICON_STAR_INT 0x02605
#define PF_ICON_SKULL "☠"
#define PF_ICON_SKULL_INT 0x02620
#define PF_ICON_FROWN "☹"
#define PF_ICON_FROWN_INT 0x02639
#define PF_ICON_SMILE "☺"
#define PF_ICON_SMILE_INT 0x0263A
#define PF_ICON_EMPTY_HEART "♡"
#define PF_ICON_EMPTY_HEART_INT 0x02661
#define PF_ICON_FULL_HEART "♥"
#define PF_ICON_FULL_HEART_INT 0x02665
#define PF_ICON_D4 "♳"
#define PF_ICON_D4_INT 0x02673
#define PF_ICON_D6 "♴"
#define PF_ICON_D6_INT 0x02674
#define PF_ICON_D8 "♵"
#define PF_ICON_D8_INT 0x02675
#define PF_ICON_D10 "♶"
#define PF_ICON_D10_INT 0x02676
#define PF_ICON_D12 "♷"
#define PF_ICON_D12_INT 0x02677
#define PF_ICON_D20 "♸"
#define PF_ICON_D20_INT 0x02678
#define PF_ICON_D6_1 "⚀"
#define PF_ICON_D6_1_INT 0x02680
#define PF_ICON_D6_2 "⚁"
#define PF_ICON_D6_2_INT 0x02681
#define PF_ICON_D6_3 "⚂"
#define PF_ICON_D6_3_INT 0x02682
#define PF_ICON_D6_4 "⚃"
#define PF_ICON_D6_4_INT 0x02683
#define PF_ICON_D6_5 "⚄"
#define PF_ICON_D6_5_INT 0x02684
#define PF_ICON_D6_6 "⚅"
#define PF_ICON_D6_6_INT 0x02685
#define PF_ICON_FLAG "⚑"
#define PF_ICON_FLAG_INT 0x02691
#define PF_ICON_GEARS "⚙"
#define PF_ICON_GEARS_INT 0x02699
#define PF_ICON_CROSS "✗"
#define PF_ICON_CROSS_INT 0x02717
#define PF_ICON_QUESTION "❓"
#define PF_ICON_QUESTION_INT 0x02753
#define PF_ICON_BANG "❗"
#define PF_ICON_BANG_INT 0x02757
#define PF_MOUSE_1 "➊"
#define PF_MOUSE_1_INT 0x0278A
#define PF_MOUSE_2 "➋"
#define PF_MOUSE_2_INT 0x0278B
#define PF_MOUSE_3 "➌"
#define PF_MOUSE_3_INT 0x0278C
#define PF_MOUSE_4 "➍"
#define PF_MOUSE_4_INT 0x0278D
#define PF_MOUSE_5 "➎"
#define PF_MOUSE_5_INT 0x0278E
#define PF_MOUSE_6 "➏"
#define PF_MOUSE_6_INT 0x0278F
#define PF_MOUSE_7 "➐"
#define PF_MOUSE_7_INT 0x02790
#define PF_MOUSE_8 "➑"
#define PF_MOUSE_8_INT 0x02791
#define PF_MOUSE_SCROLL_UP "⟰"
#define PF_MOUSE_SCROLL_UP_INT 0x027F0
#define PF_MOUSE_SCROLL_DOWN "⟱"
#define PF_MOUSE_SCROLL_DOWN_INT 0x027F1
#define PF_MOUSE_LEFT "⟵"
#define PF_MOUSE_LEFT_INT 0x027F5
#define PF_MOUSE_RIGHT "⟶"
#define PF_MOUSE_RIGHT_INT 0x027F6
#define PF_MOUSE_MIDDLE "⟷"
#define PF_MOUSE_MIDDLE_INT 0x027F7
#define PF_MOUSE_LEFT_RIGHT "⟺"
#define PF_MOUSE_LEFT_RIGHT_INT 0x027FA
#define PF_MOUSE_UP_DOWN "⟻"
#define PF_MOUSE_UP_DOWN_INT 0x027FB
#define PF_MOUSE_ANY "⟼"
#define PF_MOUSE_ANY_INT 0x027FC
#define PF_ICON_BOX "⬛"
#define PF_ICON_BOX_INT 0x02B1B
#define PF_ICON_PLAYSTATION ""
#define PF_ICON_PLAYSTATION_INT 0x0E000
#define PF_ICON_XBOX ""
#define PF_ICON_XBOX_INT 0x0E001
#define PF_ICON_NINTENDO_SWITCH ""
#define PF_ICON_NINTENDO_SWITCH_INT 0x0E002
#define PF_ICON_AYANEO ""
#define PF_ICON_AYANEO_INT 0x0E003
#define PF_ICON_LENOVO_LEGION ""
#define PF_ICON_LENOVO_LEGION_INT 0x0E004
#define PF_ROG_ALLY_ARMOURY ""
#define PF_ROG_ALLY_ARMOURY_INT 0x0E005
#define PF_ROG_ALLY_COMMAND ""
#define PF_ROG_ALLY_COMMAND_INT 0x0E006
#define PF_ICON_MAC ""
#define PF_ICON_MAC_INT 0x0E007
#define PF_ICON_WINDOWS ""
#define PF_ICON_WINDOWS_INT 0x0E008
#define PF_ICON_LINUX ""
#define PF_ICON_LINUX_INT 0x0E009
#define PF_ICON_BSD ""
#define PF_ICON_BSD_INT 0x0E00A
#define PF_ICON_STEAM ""
#define PF_ICON_STEAM_INT 0x0E00B
#define PF_ICON_ITCH_IO ""
#define PF_ICON_ITCH_IO_INT 0x0E00C
#define PF_ICON_HUMBLE ""
#define PF_ICON_HUMBLE_INT 0x0E00D
#define PF_ICON_EPIC_GAME_STORE ""
#define PF_ICON_EPIC_GAME_STORE_INT 0x0E00E
#define PF_ICON_GOOD_OLD_GAMES ""
#define PF_ICON_GOOD_OLD_GAMES_INT 0x0E00F
#define PF_MSI_CLAW_CENTER ""
#define PF_MSI_CLAW_CENTER_INT 0x0E010
#define PF_MSI_CLAW_QUICK ""
#define PF_MSI_CLAW_QUICK_INT 0x0E011
#define PF_KEYBOARD_0 ""
#define PF_KEYBOARD_0_INT 0x0FF10
#define PF_KEYBOARD_1 ""
#define PF_KEYBOARD_1_INT 0x0FF11
#define PF_KEYBOARD_2 ""
#define PF_KEYBOARD_2_INT 0x0FF12
#define PF_KEYBOARD_3 ""
#define PF_KEYBOARD_3_INT 0x0FF13
#define PF_KEYBOARD_4 ""
#define PF_KEYBOARD_4_INT 0x0FF14
#define PF_KEYBOARD_5 ""
#define PF_KEYBOARD_5_INT 0x0FF15
#define PF_KEYBOARD_6 ""
#define PF_KEYBOARD_6_INT 0x0FF16
#define PF_KEYBOARD_7 ""
#define PF_KEYBOARD_7_INT 0x0FF17
#define PF_KEYBOARD_8 ""
#define PF_KEYBOARD_8_INT 0x0FF18
#define PF_KEYBOARD_9 ""
#define PF_KEYBOARD_9_INT 0x0FF19
#define PF_KEYBOARD_A ""
#define PF_KEYBOARD_A_INT 0x0FF21
#define PF_KEYBOARD_B ""
#define PF_KEYBOARD_B_INT 0x0FF22
#define PF_KEYBOARD_C ""
#define PF_KEYBOARD_C_INT 0x0FF23
#define PF_KEYBOARD_D ""
#define PF_KEYBOARD_D_INT 0x0FF24
#define PF_KEYBOARD_E ""
#define PF_KEYBOARD_E_INT 0x0FF25
#define PF_KEYBOARD_F ""
#define PF_KEYBOARD_F_INT 0x0FF26
#define PF_KEYBOARD_G ""
#define PF_KEYBOARD_G_INT 0x0FF27
#define PF_KEYBOARD_H ""
#define PF_KEYBOARD_H_INT 0x0FF28
#define PF_KEYBOARD_I ""
#define PF_KEYBOARD_I_INT 0x0FF29
#define PF_KEYBOARD_J ""
#define PF_KEYBOARD_J_INT 0x0FF2A
#define PF_KEYBOARD_K ""
#define PF_KEYBOARD_K_INT 0x0FF2B
#define PF_KEYBOARD_L ""
#define PF_KEYBOARD_L_INT 0x0FF2C
#define PF_KEYBOARD_M ""
#define PF_KEYBOARD_M_INT 0x0FF2D
#define PF_KEYBOARD_N ""
#define PF_KEYBOARD_N_INT 0x0FF2E
#define PF_KEYBOARD_O ""
#define PF_KEYBOARD_O_INT 0x0FF2F
#define PF_KEYBOARD_P ""
#define PF_KEYBOARD_P_INT 0x0FF30
#define PF_KEYBOARD_Q ""
#define PF_KEYBOARD_Q_INT 0x0FF31
#define PF_KEYBOARD_R ""
#define PF_KEYBOARD_R_INT 0x0FF32
#define PF_KEYBOARD_S ""
#define PF_KEYBOARD_S_INT 0x0FF33
#define PF_KEYBOARD_T ""
#define PF_KEYBOARD_T_INT 0x0FF34
#define PF_KEYBOARD_U ""
#define PF_KEYBOARD_U_INT 0x0FF35
#define PF_KEYBOARD_V ""
#define PF_KEYBOARD_V_INT 0x0FF36
#define PF_KEYBOARD_W ""
#define PF_KEYBOARD_W_INT 0x0FF37
#define PF_KEYBOARD_X ""
#define PF_KEYBOARD_X_INT 0x0FF38
#define PF_KEYBOARD_Y ""
#define PF_KEYBOARD_Y_INT 0x0FF39
#define PF_KEYBOARD_Z ""
#define PF_KEYBOARD_Z_INT 0x0FF3A
#define PF_ICON_HEADPHONES "🎧"
#define PF_ICON_HEADPHONES_INT 0x1F3A7
#define PF_ICON_MUSIC "🎶"
#define PF_ICON_MUSIC_INT 0x1F3B6
#define PF_ICON_FISH "🐟"
#define PF_ICON_FISH_INT 0x1F41F
#define PF_DEVICE_DANCE_PAD "💃"
#define PF_DEVICE_DANCE_PAD_INT 0x1F483
#define PF_ICON_LAPTOP "💻"
#define PF_ICON_LAPTOP_INT 0x1F4BB
#define PF_ICON_DISKETTE "💾"
#define PF_ICON_DISKETTE_INT 0x1F4BE
#define PF_ICON_WRITE "📝"
#define PF_ICON_WRITE_INT 0x1F4DD
#define PF_DEVICE_PHONE "📱"
#define PF_DEVICE_PHONE_INT 0x1F4F1
#define PF_ICON_CAMERA "📷"
#define PF_ICON_CAMERA_INT 0x1F4F7
#define PF_ICON_SPEAKER "🔈"
#define PF_ICON_SPEAKER_INT 0x1F508
#define PF_DEVICE_LIGHT_GUN "🔫"
#define PF_DEVICE_LIGHT_GUN_INT 0x1F52B
#define PF_ICON_NOISE "🕬"
#define PF_ICON_NOISE_INT 0x1F56C
#define PF_DEVICE_STEERING_WHEEL "🕸"
#define PF_DEVICE_STEERING_WHEEL_INT 0x1F578
#define PF_DEVICE_JOY_STICK "🕹"
#define PF_DEVICE_JOY_STICK_INT 0x1F579
#define PF_DEVICE_VR_HEADSET "🕻"
#define PF_DEVICE_VR_HEADSET_INT 0x1F57B
#define PF_DEVICE_VR_CONTROLLER "🕼"
#define PF_DEVICE_VR_CONTROLLER_INT 0x1F57C
#define PF_DEVICE_FLIGHT_STICK "🕽"
#define PF_DEVICE_FLIGHT_STICK_INT 0x1F57D
#define PF_ICON_PROCESSOR "🖥"
#define PF_ICON_PROCESSOR_INT 0x1F5A5
#define PF_ICON_INTERNET "🖧"
#define PF_ICON_INTERNET_INT 0x1F5A7
#define PF_ICON_GRAPHICS_CARD "🖨"
#define PF_ICON_GRAPHICS_CARD_INT 0x1F5A8
#define PF_ICON_MEMORY "🖪"
#define PF_ICON_MEMORY_INT 0x1F5AA
#define PF_ICON_USB_STICK "🖫"
#define PF_ICON_USB_STICK_INT 0x1F5AB
#define PF_ICON_DATABASE "🖬"
#define PF_ICON_DATABASE_INT 0x1F5AC
#define PF_ICON_HARD_DISK "🖴"
#define PF_ICON_HARD_DISK_INT 0x1F5B4
#define PF_ICON_SCREEN "🖵"
#define PF_ICON_SCREEN_INT 0x1F5B5
#define PF_ICON_TEXT_ENTRY "🖹"
#define PF_ICON_TEXT_ENTRY_INT 0x1F5B9
#define PF_ICON_SPEAK "🗣"
#define PF_ICON_SPEAK_INT 0x1F5E3
#define PF_ICON_LANGUAGE "🗩"
#define PF_ICON_LANGUAGE_INT 0x1F5E9
#define PF_ICON_EXIT "🚪"
#define PF_ICON_EXIT_INT 0x1F6AA
#define PF_ICON_INFORMATION "🛈"
#define PF_ICON_INFORMATION_INT 0x1F6C8
#define PF_ICON_SHOPPING_CART "🛒"
#define PF_ICON_SHOPPING_CART_INT 0x1F6D2
#endif
+14
View File
@@ -0,0 +1,14 @@
#ifndef __RECOMP_FILES_H__
#define __RECOMP_FILES_H__
#include <filesystem>
#include <fstream>
namespace recomp {
std::ifstream open_input_file_with_backup(const std::filesystem::path& filepath, std::ios_base::openmode mode = std::ios_base::in);
std::ifstream open_input_backup_file(const std::filesystem::path& filepath, std::ios_base::openmode mode = std::ios_base::in);
std::ofstream open_output_file_with_backup(const std::filesystem::path& filepath, std::ios_base::openmode mode = std::ios_base::out);
bool finalize_output_file_with_backup(const std::filesystem::path& filepath);
};
#endif
+202
View File
@@ -0,0 +1,202 @@
#ifndef __RECOMP_INPUT_H__
#define __RECOMP_INPUT_H__
#include <cstdint>
#include <variant>
#include <vector>
#include <type_traits>
#include <span>
#include <string>
#include <string_view>
#include "ultramodern/input.hpp"
#include "json/json.hpp"
namespace recomp {
// x-macros to build input enums and arrays.
// First parameter is the enum name, second parameter is the bit field for the input (or 0 if there is no associated one), third is the readable name.
// TODO refactor this to allow projects to rename these, or get rid of the readable name and leave that up to individual projects to map.
#define DEFINE_N64_BUTTON_INPUTS() \
DEFINE_INPUT(A, 0x8000, "A") \
DEFINE_INPUT(B, 0x4000, "B") \
DEFINE_INPUT(Z, 0x2000, "Z") \
DEFINE_INPUT(START, 0x1000, "Start") \
DEFINE_INPUT(L, 0x0020, "L") \
DEFINE_INPUT(R, 0x0010, "R") \
DEFINE_INPUT(C_UP, 0x0008, "C Up") \
DEFINE_INPUT(C_LEFT, 0x0002, "C Left") \
DEFINE_INPUT(C_DOWN, 0x0004, "C Down") \
DEFINE_INPUT(C_RIGHT, 0x0001, "C Right") \
DEFINE_INPUT(DPAD_UP, 0x0800, "D Pad Down") \
DEFINE_INPUT(DPAD_RIGHT, 0x0100, "D-Pad Down") \
DEFINE_INPUT(DPAD_DOWN, 0x0400, "D-Pad Down") \
DEFINE_INPUT(DPAD_LEFT, 0x0200, "D-Pad Down")
#define DEFINE_N64_AXIS_INPUTS() \
DEFINE_INPUT(Y_AXIS_POS, 0, "Up") \
DEFINE_INPUT(Y_AXIS_NEG, 0, "Down") \
DEFINE_INPUT(X_AXIS_NEG, 0, "Left") \
DEFINE_INPUT(X_AXIS_POS, 0, "Right") \
#define DEFINE_RECOMP_UI_INPUTS() \
DEFINE_INPUT(TOGGLE_MENU, 0, "Toggle Menu") \
DEFINE_INPUT(ACCEPT_MENU, 0, "Accept (Menu)") \
DEFINE_INPUT(APPLY_MENU, 0, "Apply (Menu)")
#define DEFINE_ALL_INPUTS() \
DEFINE_N64_BUTTON_INPUTS() \
DEFINE_N64_AXIS_INPUTS() \
DEFINE_RECOMP_UI_INPUTS()
// Enum containing every recomp input.
#define DEFINE_INPUT(name, value, readable) name,
enum class GameInput {
DEFINE_ALL_INPUTS()
COUNT,
N64_BUTTON_START = A,
N64_BUTTON_COUNT = C_RIGHT - N64_BUTTON_START + 1,
N64_AXIS_START = X_AXIS_NEG,
N64_AXIS_COUNT = Y_AXIS_POS - N64_AXIS_START + 1,
};
#undef DEFINE_INPUT
struct InputField {
uint32_t input_type;
int32_t input_id;
std::string to_string() const;
auto operator<=>(const InputField& rhs) const = default;
};
void poll_inputs();
float get_input_analog(const InputField& field);
float get_input_analog(const std::span<const recomp::InputField> fields);
bool get_input_digital(const InputField& field);
bool get_input_digital(const std::span<const recomp::InputField> fields);
void get_gyro_deltas(float* x, float* y);
void get_mouse_deltas(float* x, float* y);
void get_right_analog(float* x, float* y);
enum class InputDevice {
Controller,
Keyboard,
COUNT
};
void start_scanning_input(InputDevice device);
void stop_scanning_input();
void finish_scanning_input(InputField scanned_field);
void cancel_scanning_input();
void config_menu_set_cont_or_kb(bool cont_interacted);
InputField get_scanned_input();
int get_scanned_input_index();
struct DefaultN64Mappings {
std::vector<InputField> a;
std::vector<InputField> b;
std::vector<InputField> l;
std::vector<InputField> r;
std::vector<InputField> z;
std::vector<InputField> start;
std::vector<InputField> c_left;
std::vector<InputField> c_right;
std::vector<InputField> c_up;
std::vector<InputField> c_down;
std::vector<InputField> dpad_left;
std::vector<InputField> dpad_right;
std::vector<InputField> dpad_up;
std::vector<InputField> dpad_down;
std::vector<InputField> analog_left;
std::vector<InputField> analog_right;
std::vector<InputField> analog_up;
std::vector<InputField> analog_down;
std::vector<InputField> toggle_menu;
std::vector<InputField> accept_menu;
std::vector<InputField> apply_menu;
};
inline const std::vector<InputField>& get_default_mapping_for_input(const DefaultN64Mappings& defaults, const GameInput input) {
static const std::vector<InputField> empty_input_field{};
switch (input) {
case GameInput::A: return defaults.a;
case GameInput::B: return defaults.b;
case GameInput::L: return defaults.l;
case GameInput::R: return defaults.r;
case GameInput::Z: return defaults.z;
case GameInput::START: return defaults.start;
case GameInput::C_LEFT: return defaults.c_left;
case GameInput::C_RIGHT: return defaults.c_right;
case GameInput::C_UP: return defaults.c_up;
case GameInput::C_DOWN: return defaults.c_down;
case GameInput::DPAD_LEFT: return defaults.dpad_left;
case GameInput::DPAD_RIGHT: return defaults.dpad_right;
case GameInput::DPAD_UP: return defaults.dpad_up;
case GameInput::DPAD_DOWN: return defaults.dpad_down;
case GameInput::X_AXIS_NEG: return defaults.analog_left;
case GameInput::X_AXIS_POS: return defaults.analog_right;
case GameInput::Y_AXIS_POS: return defaults.analog_up;
case GameInput::Y_AXIS_NEG: return defaults.analog_down;
case GameInput::TOGGLE_MENU: return defaults.toggle_menu;
case GameInput::ACCEPT_MENU: return defaults.accept_menu;
case GameInput::APPLY_MENU: return defaults.apply_menu;
default: return empty_input_field;
}
}
extern const DefaultN64Mappings default_n64_keyboard_mappings;
extern const DefaultN64Mappings default_n64_controller_mappings;
constexpr size_t bindings_per_input = 2;
size_t get_num_inputs();
const std::string& get_input_name(GameInput input);
const std::string& get_input_enum_name(GameInput input);
GameInput get_input_from_enum_name(const std::string_view name);
InputField& get_input_binding(GameInput input, size_t binding_index, InputDevice device);
void set_input_binding(GameInput input, size_t binding_index, InputDevice device, InputField value);
bool get_n64_input(int controller_num, uint16_t* buttons_out, float* x_out, float* y_out);
void set_rumble(int controller_num, bool);
void update_rumble();
void handle_events();
ultramodern::input::connected_device_info_t get_connected_device_info(int controller_num);
// Rumble strength ranges from 0 to 100.
int get_rumble_strength();
void set_rumble_strength(int strength);
// Gyro and mouse sensitivities range from 0 to 100.
int get_gyro_sensitivity();
int get_mouse_sensitivity();
int get_joystick_deadzone();
void set_gyro_sensitivity(int strength);
void set_mouse_sensitivity(int strength);
void set_joystick_deadzone(int strength);
void apply_joystick_deadzone(float x_in, float y_in, float* x_out, float* y_out);
void set_right_analog_suppressed(bool suppressed);
enum class BackgroundInputMode {
On,
Off,
OptionCount
};
NLOHMANN_JSON_SERIALIZE_ENUM(recomp::BackgroundInputMode, {
{recomp::BackgroundInputMode::On, "On"},
{recomp::BackgroundInputMode::Off, "Off"}
});
BackgroundInputMode get_background_input_mode();
void set_background_input_mode(BackgroundInputMode mode);
bool game_input_disabled();
bool all_input_disabled();
}
#endif
+116
View File
@@ -0,0 +1,116 @@
#ifndef __RECOMP_UI__
#define __RECOMP_UI__
#include <memory>
#include <string>
#include <string_view>
// TODO move this file into src/ui
#include "SDL.h"
#include "RmlUi/Core.h"
#include "../src/ui/util/hsv.h"
#include "../src/ui/util/bem.h"
#include "../src/ui/core/ui_context.h"
namespace Rml {
class ElementDocument;
class EventListenerInstancer;
class Context;
class Event;
}
namespace recompui {
class UiEventListenerInstancer;
// TODO remove this once the UI has been ported over to the new system.
class MenuController {
public:
virtual ~MenuController() {}
virtual Rml::ElementDocument* load_document(Rml::Context* context) = 0;
virtual void register_events(UiEventListenerInstancer& listener) = 0;
virtual void make_bindings(Rml::Context* context) = 0;
};
std::unique_ptr<MenuController> create_launcher_menu();
std::unique_ptr<MenuController> create_config_menu();
using event_handler_t = void(const std::string& param, Rml::Event&);
void queue_event(const SDL_Event& event);
bool try_deque_event(SDL_Event& out);
std::unique_ptr<UiEventListenerInstancer> make_event_listener_instancer();
void register_event(UiEventListenerInstancer& listener, const std::string& name, event_handler_t* handler);
void show_context(ContextId context, std::string_view param);
void hide_context(ContextId context);
void hide_all_contexts();
bool is_context_shown(ContextId context);
bool is_context_taking_input();
bool is_any_context_shown();
ContextId get_launcher_context_id();
ContextId get_config_context_id();
ContextId get_config_sub_menu_context_id();
ContextId get_close_prompt_context_id();
enum class ConfigTab {
General,
Controls,
Graphics,
Sound,
Mods,
Debug,
};
void set_config_tab(ConfigTab tab);
enum class ButtonVariant {
Primary,
Secondary,
Tertiary,
Success,
Error,
Warning,
NumVariants,
};
void open_prompt(
const std::string& headerText,
const std::string& contentText,
const std::string& confirmLabelText,
const std::string& cancelLabelText,
std::function<void()> confirmCb,
std::function<void()> cancelCb,
ButtonVariant _confirmVariant = ButtonVariant::Success,
ButtonVariant _cancelVariant = ButtonVariant::Error,
bool _focusOnCancel = true,
const std::string& _returnElementId = ""
);
bool is_prompt_open();
void apply_color_hack();
void get_window_size(int& width, int& height);
void set_cursor_visible(bool visible);
void update_supported_options();
void toggle_fullscreen();
bool get_cont_active(void);
void set_cont_active(bool active);
void activate_mouse();
void message_box(const char* msg);
void set_render_hooks();
Rml::ElementPtr create_custom_element(Rml::Element* parent, std::string tag);
Rml::ElementDocument* load_document(const std::filesystem::path& path);
Rml::ElementDocument* create_empty_document();
void queue_image_from_bytes(const std::string &src, const std::vector<char> &bytes);
void release_image(const std::string &src);
}
#endif