Analog camera support. (#28)

* Implement analog camera.

* Change swimming camera to use R Look mode instead.

* More work on flight mode.

* Add extra updates to improve transitions between modes.

* Add flying camera and some bug fixes to target computation.

* Remove extra updates.

* Update analog_camera_patches.c
This commit is contained in:
Darío
2025-12-29 19:31:09 -05:00
committed by GitHub
parent 7b9f13819f
commit fdc9e6b650
4 changed files with 569 additions and 0 deletions
File diff suppressed because it is too large Load Diff
+5
View File
@@ -40,8 +40,10 @@ extern Vtx *sVtxStack[2];
extern s32 sStackSelector;
extern s32 gTextureFilterPoint;
extern u32 heap_occupiedBytes;
extern u32 dynamic_camera_target_index;
extern void recomp_reset_skinning_stack();
extern void recomp_advance_dynamic_camera_targets();
// @recomp Patched to not free anything.
RECOMP_PATCH void graphicsCache_release(void) {
@@ -89,6 +91,9 @@ RECOMP_PATCH void game_draw(s32 arg0){
// @recomp Reset the high precision position skinning stack.
recomp_reset_skinning_stack();
// @recomp Advance the frame used as reference by the dynamic camera target changes for analog camera.
recomp_advance_dynamic_camera_targets();
// @recomp Track the original values.
Mtx* mtx_start = mtx;
Vtx* vtx_start = vtx;
+1
View File
@@ -31,6 +31,7 @@ void osWriteBackDCacheAll(void);
#define osPiStartDma osPiStartDma_recomp
#define sinf sinf_recomp
#define cosf __cosf_recomp
#define osContGetReadData osContGetReadData_recomp
#include "ultra64.h"
#pragma GCC diagnostic push
+5
View File
@@ -40,3 +40,8 @@ recomp_xxh3 = 0x8F00008C;
recomp_get_bgm_volume = 0x8F000090;
sinf_recomp = 0x8F000094;
__cosf_recomp = 0x8F000098;
recomp_get_camera_inputs = 0x8F00009C;
recomp_get_analog_cam_enabled = 0x8F0000A0;
recomp_get_analog_inverted_axes = 0x8F0000A4;
recomp_set_right_analog_suppressed = 0x8F0000A8;
osContGetReadData_recomp = 0x8F0000AC;