From af2c8be6f6af40c4b20167428f939276fe715d9b Mon Sep 17 00:00:00 2001 From: Mr-Wiseguy Date: Sun, 26 May 2024 05:22:13 -0400 Subject: [PATCH] Fixed analog cam updating twice in Jump2 camera handler --- patches/camera_patches.c | 13 +------------ patches/input.c | 6 +++--- 2 files changed, 4 insertions(+), 15 deletions(-) diff --git a/patches/camera_patches.c b/patches/camera_patches.c index db5b080..1a3dabe 100644 --- a/patches/camera_patches.c +++ b/patches/camera_patches.c @@ -91,7 +91,7 @@ void update_analog_cam(Camera* c) { analog_camera_pos.pitch = -0x16D0; } - recomp_printf("analog cam pitch: %05X\n", analog_camera_pos.pitch); + // recomp_printf("analog cam pitch: %05X\n", analog_camera_pos.pitch); } } @@ -1008,17 +1008,6 @@ s32 Camera_Jump2(Camera* camera) { camera->rUpdateRateInv = 100.0f; } - // @recomp - if (recomp_analog_cam_enabled()) { - update_analog_cam(camera); - - if (analog_cam_active) { - spB4.pitch = analog_camera_pos.pitch; - // spB4.r = analog_camera_pos.r; - spB4.yaw = analog_camera_pos.yaw; - } - } - spB4.pitch = CLAMP_MAX(spB4.pitch, DEG_TO_BINANG(60.43f)); spB4.pitch = CLAMP_MIN(spB4.pitch, -DEG_TO_BINANG(60.43f)); diff --git a/patches/input.c b/patches/input.c index f9ca351..ec28383 100644 --- a/patches/input.c +++ b/patches/input.c @@ -30,9 +30,9 @@ s32 func_80847190(PlayState* play, Player* this, s32 arg2) { analog_y = CLAMP(analog_y, -60, 60); } - recomp_printf("stick_x: %d stick_y: %d analog_x: %d analog_y: %d\n", - play->state.input[0].rel.stick_x, play->state.input[0].rel.stick_y, - analog_x, analog_y); + // recomp_printf("stick_x: %d stick_y: %d analog_x: %d analog_y: %d\n", + // play->state.input[0].rel.stick_x, play->state.input[0].rel.stick_y, + // analog_x, analog_y); if (!func_800B7128(this) && !func_8082EF20(this) && !arg2) { // @recomp Add in the analog camera Y input. Clamp to prevent moving the camera twice as fast if both sticks are held.