summaryrefslogtreecommitdiff
path: root/soh/src/code/z_camera.c
AgeCommit message (Collapse)Author
2026-08-08Decomp, some camera names (#7043)djevangelia
2026-07-31Decomp, naming (OnePointCS, itemAction, blure, wall/floor types) (#7007)djevangelia
2026-07-13Don't point free cam at sky coming out of crawlspace (#6920)Philip Dubé
2026-07-12wire decomp static savestates with macros (#6904)Philip Dubé
2026-07-12Decomp pull, some `z_player` and global changes (#6908)djevangelia
2026-07-08Bugfix, child Hookshot first person in Hylia lab (#6847)djevangelia
2026-07-07pull decomp changes: actor functions, z_en_horse.c (#6877)Philip Dubé
2026-06-24fix: free look continues from forced view when leaving a fixed camera ↵David Racine
(#4953) (#6808) When a scene-forced/fixed camera (e.g. the Spirit Temple boulder-room alcoves, CAM_SET_PREREND_FIXED / Camera_Fixed3) drives the view, the Free Look angles in play->camX/camY are left untouched while manualCamera stays set. On exit, Camera_Free resumed from those stale pre-alcove angles, so the camera snapped/reversed instead of following the player out. This does NOT change the forced-camera behavior: the alcove still clamps exactly as the game intends. It only fixes the hand-off back to Free Look: when Camera_Free resumes after another camera function drove the previous frame (detected via a frame-number gap), the free-look yaw/pitch are re-seeded from the camera's current orientation so the view continues from where it was left. Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-19fix: free look releases the door peek camera (#6756)David Racine
* fix(camera): let free look release the door peek camera After walking through a door, the door camera (CAM_SET_DOORC) held the view and only handed control back once the player moved or pressed a button, so the right stick did nothing until then. With free look the camera appeared frozen after every door. Treat right-stick movement as a release condition too, using the same stick threshold as free-look activation. * refactor(camera): move door-cam free-look release to a VB_SHOULD hook Reimplements the door peek camera free-look release as a vanilla-behavior hook instead of inline logic in z_camera.c, keeping the decomp file close to upstream. - Add VB_RELEASE_DOORC_CAMERA wrapping the existing Camera_Special9 release condition; the vanilla button/xzSpeed expression is left untouched. - Move the right-stick / free-look threshold logic into a new enhancement, FreeLookDoorCamRelease.cpp, registered with COND_VB_SHOULD and gated on FreeLook.Enabled so the hook only exists while Free Look is on. Behavior is unchanged from the previous fix; this only relocates the logic. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-18feat(camera): option for free look to follow the default camera distance (#6757)David Racine
Free Look pinned the camera to the fixed "Camera Distance" setting, so it never pulled in or out the way the vanilla camera does for the current situation. Add an opt-in "Follow Default Camera Distance" setting (FreeLook.UseGameDistance) that uses the game's per-mode default distance instead. The fixed distance slider is hidden while it is enabled. Closes #4050 Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-09uncomment code in z_camera.c (#6709)Philip Dubé
pointed out by Evangelia, cause of discrepancy in crawlspace glitch * [Console](https://www.youtube.com/watch?v=2_tFHeEvXI0) * [SoH](https://www.youtube.com/watch?v=-u3TzbdUr3c)
2026-06-06Enhancement to disable heat haze (#6663)Shishu the Dragon
2025-04-01Apply clang-format to files (#5273)Archez
2025-03-24Mouse Support (#4673)lilacLunatic
* mouse * (mouse) small fix * "fix" implicit declaration * LUS 1.2 * empty commit to force CI re-run * include new mouse LUS * deleted: soh/soh/Enhancements/controls/GameControlEditor.cpp * [mouse]LUS * fix input viewer header * Bump LUS for mouse support * Mouse Support * Comment cleanup * Adding the actual mouse enhancement files * Fix (?) Windows and Mac builds * Maybe fix MacOS now * Why was it compiling with this?? * Mouse input viewer handling * [Mouse] LUS bump * [mouse] LUS * (Mouse) bump LUS for dxgi fix * F2 mouse notif * Update soh/soh/Enhancements/controls/Mouse.h Co-authored-by: Pepe20129 <72659707+Pepe20129@users.noreply.github.com> * Update soh/soh/Enhancements/controls/Mouse.cpp Co-authored-by: Pepe20129 <72659707+Pepe20129@users.noreply.github.com> * Fix mouse shield ranges to match control stick behavior * Use early returns in Mouse_HandleQuickspin * newline cleanup * cleanup * rename BUTTON_COLOR_MOUSE_BEIGE to BUTTON_COLOR_MOUSE_GRAY * 'Enable Mouse' tooltip * Fix includes * Comments re mouse quickspin * bullshit * Hook handler for cursor recentering on shield * Hook handler for first person mouse aiming * Hook handlers for mouse quickspin * Hook handlers for mouse shield control * Hook registration conditions * Enable Mouse -> Enable Mouse Controls --------- Co-authored-by: Pepe20129 <72659707+Pepe20129@users.noreply.github.com>
2025-02-25Use gamemode enum (#5089)Archez
* Use gamemode enum * update console command for file_select
2024-11-08Update SFX symbols from decomp (#4531)Jordan Longstaff
2024-10-17`z_player` documentation 2024-10-11 (#4407)Pepe20129
* Add names to start of typedefs * Idle stuff * 2 functions * Player state flags * Name functions + misc * ActionChange => ActionHandler * Some player unks * More player unks * Header misc * Misc * More misc * Player Actions * Missed comments * Move ship specific stuff * Fix build * CsCmdActorAction to CsCmdActorCue * Fix build
2024-05-05Merge branch 'develop' of github.com:Malkierian/Shipwright into dev-to-rando-5-5Malkierian
2024-05-05Final Step of CVar macro/sectionalizing (#4107)Malkierian
* p * Missed the prefix renames. * More missed ones. * Mostly finished cleanup. Removed a few CVars and some related functionality. * Bit more (prepping non-existent title card color editing). * Resolve gCrowdControl. * Final cleanup. * Universal constant, not acceleration... * Preset CVars.
2024-04-26All MenuBar enhancement CVars done. (#4064)Malkierian
2024-04-21CVar Macro Cleanup (#4062)Malkierian
* Standardized CVar macros to have `CVAR_` at the front instead of the end. Removed excluded and replaced sequence macros. * Missed a few developer CVars outside of `SohMenuBar.cpp` * 1 more.
2024-04-03pull in docs (#97)briaguya
* rename `func_8002DF54` to `Player_SetCsActionWithHaltedActors` * rename `func_8002F434` to `Actor_OfferGetItem`
2024-02-15document dependencies per distro (#3933)briaguya
* start on arch * noconfirm * git * noconfirm * just skip cache * cmake * ninja * gcc * lsb * sdl2 * png * sdl net * boost * imagemagick and add opensuse * non interactive * git * cmake * add a bunch * things * more * try to matrix * soh otr i guess * needs * trying to figure out how matrix include works * make the matrix? * matrix debug * install? * echo? * yuck * cannot locate package false * parens for good measure * lsb * libsdl2 * suse * i forgot opensuse uses gcc-c++ instead of g++ for the package name * png * sdl * more * suse packages.... * fedora cmake * 2? * png * handle old sdl2 net * apt * not sure if this is a problem for both clang and gcc on opensuse or just clang * devel * cmake min version * def don't want this here but it's here for now * does this do anything * mantic because cmake version * libopengl? * fedora ninja * fedora g++ * lsb * fedora sdl * libpng * do a build * clang fix * give early returns values * ImageMagick * Update BUILDING.md * something * plain boost instead of devel? * not packing so we don't need this part * base? * don't have it can't need it * just use boost download on opensuse i guess * move workflow * bring back the file * lus main? * detach
2024-02-15Player State Docs (#3280)inspectredc
* state flags 1 * state flags 2 * state flags 3 * fill array
2024-02-02Merge branch 'develop-macready' into macready-to-dev-2-2briaguya
2024-02-01Renames Freecam to Free Look. (#3771)Malkierian
Adds helper info for invert, distance, and transition speed options.
2024-01-15Add Collision Header XML parser (#3396)Pepe20129
* Add Collision Header XML parser * Update CollisionHeaderFactory.cpp * Remove "Num" attributes * Fix crashes Prevent crash when the camera setting is negative Change some IntAttributes to UnsignedAttributes
2023-11-26Bring over some player documentation from decomp (#3380)Pepe20129
* Document static variables * Document enums and structs * Document some functions * Document more functions * actionParam to itemAction and fix build * Document some local variables and a define * General cleanup * Use PlayerMeleeWeaponAnimation enum when appropiate * Document some function parameters and local variables * Document some of player struct
2023-11-19Transition docs (#3322)inspectredc
* transition variables renamed * transition circle * transition wipe * sand storm * remaining sceneloadflag rename * transition trigger macros * transition mode enum * transition type enum * tc set params * creg debug transitions
2023-10-30improve free camera reset (#3225)Adam Bird
2023-09-15Some documentation changes for zplayer (#3172)Garrett Cox
* Documentation changes for zplayer * Update soh/include/z64player.h Co-authored-by: Adam Bird <Archez@users.noreply.github.com> --------- Co-authored-by: Adam Bird <Archez@users.noreply.github.com>
2023-09-01Add scene table (#3131)Pepe20129
* Add scene table * Re-add accidentally deleted entry * Update CrashHandlerExt.cpp * Update CrashHandlerExt.cpp
2023-08-30Fix: Check for debug mode when watching cutscene debug inputs (#3133)Adam Bird
* fix check for debug mode when watching cutscene debug inputs * update other cvar to debug enabled
2023-08-06fix: disable Idle camera re-center no longer stuck on level geometry (#3094)Adam Bird
2023-06-13Mirrored world enhancement (#1569)Garrett Cox
* Mirrored world PoC * invert culling for health meter and A button action * A few more fixes * Fix for item equip animations * Fix for pause triforce * Mirror scenes with static backgrounds * mirror minimap for mirror world * mirror dungeon maps and icons on the pause menu * mirror overworld map and icons on the pause menu * mirror debug world movement * mirror shops cursor and movement * use flip flag * Reverse crouch stab x axis for mirror mode * use invert culling command and clean up culling logic * Move mirror mode handler to mods and support random modes * Small cvar tweaks * mirror billboard score numbers and fix gyro horse mirrored inputs --------- Co-authored-by: Adam Bird <archez39@me.com>
2023-02-28[Accessibility] Add ability to disable camera re-centering on idle (#2503)David Chavez
* Add ability to disable camera recentering on idle * Remove platform check * Update else camera comment
2023-02-15Separate X/Y axis sensitivity sliders (#2472)Bigs
* Update z_camera.c * Update GameControlEditor.cpp * Update GameControlEditor.cpp * Update GameControlEditor.cpp Adding Sliders for first person X and Y axis * Update z_player.c Modified variables to allowed separate sensitivity settings for x and y axis
2023-01-26Debug camera (#2400)Kenix3
* Moves SoH mixer to SoH from LUS. * Debug camera now works in SoH, but mempak saving does not (yet). * Debug camera is now enabled/disabled based on the gDebugEnabled cvar. * Updates OTRGlobals comments * Updates OTRGlobals comments
2023-01-17refactor: use LUS 1.0 RCbriaguya
Co-authored-by: kenix3 <kenixwhisperwind@gmail.com> Co-authored-by: David Chavez <david@dcvz.io> Co-authored-by: KiritoDv <kiritodev01@gmail.com> Co-authored-by: Christopher Leggett <chris@leggett.dev>
2022-12-12improving free cam settings configurability (#1987)frizzle101101
* Initial camera distance slider * works with freecam * improving the settings configurability, adding distance slider and transition speed for the free camera adding seperate sensitivity and invert settings for aiming/first person camera * spelling * tooltip msg on camera invvert * typos * removing the original free camera checkbox in experimental menu * adding name change to new presets file Co-authored-by: RaelCappra <rael.cappra@gmail.com>
2022-12-12added fix option to fix camera swing; (#1992)frizzle101101
* added fix option to fix camera swing; Fixes camera getting stuck on collision when standing still, also fixes slight shift back in camera when stop moving * add option to fix hang off ledge swing rate; Fixes camera swing rate when player falls of a ledge and camera swings around * adding camera fixes to preset list
2022-11-22[Enhancement] Add fix camera drift option to fixes menu (#1983)frizzle101101
2022-11-14Fixes most known bugs associated with FreeCam (#1960)RaelCappra
* Fixes most known bugs associated with FreeCam Co-authored-by: MelonSpeedruns <melonspeedruns@outlook.com> * Address review suggestions Co-authored-by: MelonSpeedruns <melonspeedruns@outlook.com>
2022-11-06Use PlayState instead of GlobalContext (#1927)Garrett Cox
* Use PlayState instead of GlobalContext - GlobalContext -> PlayState - globalCtx -> play - GlobalCtx -> PlayState - globalContext -> playState * Find and replace Gameplay_ with Play_ * Correct some misnamed argument cases
2022-10-21Adds camera sensitivity option back (#1817)Ada
* Adds camera sensitivity option * Fixes default values * Fixes default values (for real this time)
2022-09-28disable crit wiggle (#1629)louist103
* disable crit wiggle * Set to zero in default preset
2022-09-26Correct default value of gInvertYAxis and change default trials required to ↵Garrett Cox
vanilla (#1610)
2022-08-23Adds game specific camera options (#1212)Ada
* Adds inversion options * Fixes compilation * Adds options to new detailed control editor * Fixes inversion on C-Up view * Fixes right stick aiming * Fixes right stick aiming again * Adds tooltip function + tooltips to gamecontroleditor.cpp * Fixes tooltip for X axis * Uses LUS tooltip function instead of new one * Adds padding to camera control editor To fit more in line with other enhancement checkboxes
2022-08-16[zret] Port some documentation changes (#1164)David Chavez
* zret: Documentation pass on scene/room commands #1226 * Update OTR scene * zret: Document the lens system #1079 * zret: Misc. doc/cleanup 4 #1093 * zret: Fix misc 8 #1150 * zret: Document Distortions from z_camera and z_view #1102
2022-08-11Make libultra OSContPad struct consistent with the one from libultrashipKenix3