mirror of
https://github.com/Zelda64Recomp/Zelda64Recomp.git
synced 2026-04-28 05:01:39 +00:00
Add menu option for moving in first person.
This commit is contained in:
parent
2bc4a1e77f
commit
fb8fe0a25b
6 changed files with 29 additions and 2 deletions
|
|
@ -242,6 +242,18 @@
|
||||||
/>
|
/>
|
||||||
<label class="config-option__tab-label" for="analog_cam_enabled">On</label>
|
<label class="config-option__tab-label" for="analog_cam_enabled">On</label>
|
||||||
|
|
||||||
|
<input
|
||||||
|
type="radio"
|
||||||
|
data-event-blur="set_cur_config_index(-1)"
|
||||||
|
data-event-focus="set_cur_config_index(8)"
|
||||||
|
name="analog_cam_mode"
|
||||||
|
data-checked="analog_cam_mode"
|
||||||
|
value="MoveInFirstPerson"
|
||||||
|
id="analog_cam_fpm"
|
||||||
|
style="nav-up: #camera_inversion_x; nav-down: #analog_camera_inversion_x"
|
||||||
|
/>
|
||||||
|
<label class="config-option__tab-label" for="analog_cam_fpm">On - Move In First Person</label>
|
||||||
|
|
||||||
<input
|
<input
|
||||||
type="radio"
|
type="radio"
|
||||||
data-event-blur="set_cur_config_index(-1)"
|
data-event-blur="set_cur_config_index(-1)"
|
||||||
|
|
|
||||||
|
|
@ -73,11 +73,13 @@ namespace zelda64 {
|
||||||
enum class AnalogCamMode {
|
enum class AnalogCamMode {
|
||||||
On,
|
On,
|
||||||
Off,
|
Off,
|
||||||
|
MoveInFirstPerson,
|
||||||
OptionCount
|
OptionCount
|
||||||
};
|
};
|
||||||
|
|
||||||
NLOHMANN_JSON_SERIALIZE_ENUM(zelda64::AnalogCamMode, {
|
NLOHMANN_JSON_SERIALIZE_ENUM(zelda64::AnalogCamMode, {
|
||||||
{zelda64::AnalogCamMode::On, "On"},
|
{zelda64::AnalogCamMode::On, "On"},
|
||||||
|
{zelda64::AnalogCamMode::MoveInFirstPerson, "MoveInFirstPerson"},
|
||||||
{zelda64::AnalogCamMode::Off, "Off"}
|
{zelda64::AnalogCamMode::Off, "Off"}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,13 @@ s16 func_80832754(Player* this, s32 arg1);
|
||||||
s32 func_8082EF20(Player* this);
|
s32 func_8082EF20(Player* this);
|
||||||
|
|
||||||
bool recomp_first_person_movement_allowed(PlayState* play, Player* this, bool in_free_look) {
|
bool recomp_first_person_movement_allowed(PlayState* play, Player* this, bool in_free_look) {
|
||||||
return play->unk_1887C == 0 && (in_free_look || this->currentMask != PLAYER_MASK_ZORA);
|
return recomp_move_in_first_person_enabled()
|
||||||
|
//return recomp_analog_cam_enabled()
|
||||||
|
&& play->unk_1887C == 0
|
||||||
|
&& (
|
||||||
|
in_free_look
|
||||||
|
|| this->currentMask != PLAYER_MASK_ZORA
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
void recomp_handle_first_person_movement(PlayState* play, Player* this, s32 arg2) {
|
void recomp_handle_first_person_movement(PlayState* play, Player* this, s32 arg2) {
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,7 @@ DECLARE_FUNC(void, recomp_get_mouse_deltas, float* x, float* y);
|
||||||
DECLARE_FUNC(s32, recomp_get_targeting_mode);
|
DECLARE_FUNC(s32, recomp_get_targeting_mode);
|
||||||
DECLARE_FUNC(void, recomp_get_inverted_axes, s32* x, s32* y);
|
DECLARE_FUNC(void, recomp_get_inverted_axes, s32* x, s32* y);
|
||||||
DECLARE_FUNC(s32, recomp_analog_cam_enabled);
|
DECLARE_FUNC(s32, recomp_analog_cam_enabled);
|
||||||
|
DECLARE_FUNC(s32, recomp_move_in_first_person_enabled);
|
||||||
DECLARE_FUNC(void, recomp_get_analog_inverted_axes, s32* x, s32* y);
|
DECLARE_FUNC(void, recomp_get_analog_inverted_axes, s32* x, s32* y);
|
||||||
DECLARE_FUNC(void, recomp_get_camera_inputs, float* x, float* y);
|
DECLARE_FUNC(void, recomp_get_camera_inputs, float* x, float* y);
|
||||||
DECLARE_FUNC(void, recomp_set_right_analog_suppressed, s32 suppressed);
|
DECLARE_FUNC(void, recomp_set_right_analog_suppressed, s32 suppressed);
|
||||||
|
|
|
||||||
|
|
@ -44,3 +44,4 @@ recomp_get_inverted_axes = 0x8F0000A4;
|
||||||
recomp_high_precision_fb_enabled = 0x8F0000A8;
|
recomp_high_precision_fb_enabled = 0x8F0000A8;
|
||||||
recomp_get_resolution_scale = 0x8F0000AC;
|
recomp_get_resolution_scale = 0x8F0000AC;
|
||||||
recomp_get_analog_inverted_axes = 0x8F0000B0;
|
recomp_get_analog_inverted_axes = 0x8F0000B0;
|
||||||
|
recomp_move_in_first_person_enabled = 0x8F0000B4;
|
||||||
|
|
|
||||||
|
|
@ -132,7 +132,12 @@ extern "C" void recomp_get_analog_inverted_axes(uint8_t* rdram, recomp_context*
|
||||||
}
|
}
|
||||||
|
|
||||||
extern "C" void recomp_analog_cam_enabled(uint8_t* rdram, recomp_context* ctx) {
|
extern "C" void recomp_analog_cam_enabled(uint8_t* rdram, recomp_context* ctx) {
|
||||||
_return<s32>(ctx, zelda64::get_analog_cam_mode() == zelda64::AnalogCamMode::On);
|
_return<s32>(ctx, zelda64::get_analog_cam_mode() == zelda64::AnalogCamMode::On
|
||||||
|
|| zelda64::get_analog_cam_mode() == zelda64::AnalogCamMode::MoveInFirstPerson);
|
||||||
|
}
|
||||||
|
|
||||||
|
extern "C" void recomp_move_in_first_person_enabled(uint8_t* rdram, recomp_context* ctx) {
|
||||||
|
_return<s32>(ctx, zelda64::get_analog_cam_mode() == zelda64::AnalogCamMode::MoveInFirstPerson);
|
||||||
}
|
}
|
||||||
|
|
||||||
extern "C" void recomp_get_camera_inputs(uint8_t* rdram, recomp_context* ctx) {
|
extern "C" void recomp_get_camera_inputs(uint8_t* rdram, recomp_context* ctx) {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue