Commit Graph

830 Commits

Author SHA1 Message Date
Amber Burton 2b423c36aa GIM Restoration (#6865)
All edge cases for bottle combinations and replacement/filling mirrors the real game, as well we produce the compass text, and does not render the item exactly as the original game does. (I would have preferred rendering the item since its only cosmetic but I couldn't find a way to do it).

This also swaps the table redirect stuff for using the direct item id's which is a lot more clear and does not substitute anything for 'good enough' and covers all the edge case ids that have been documented.

This is purely a cosmetic change to present the visual of the item without affecting the cutscene making any tricks for GIM still work and just looks more polished.

This supplies effects of ALL game versions (including MZX build) as well as providing text table.

To note: we still can crash with GIM even when returning item None EVEN at least with returning Kokiri Tunic (I can't really figure out why) and there are a few items in the table that use extra data that I don't know how to implement here just yet but the info is in the docs under "Variable".

In the case of disabling the gim restoration, the game would still crash. This change adds a text id protection to prevent crashing, as well prevents invalid items from crashing directly, and also makes it so the game will no longer crash when having GIM disabled in the menu.

Co-authored-by: serprex <159546+serprex@users.noreply.github.com>
2026-07-12 15:09:06 +00:00
djevangelia 1003c462a8 Decomp pull, some z_player and global changes (#6908) 2026-07-12 14:59:10 +00:00
Jordan Longstaff b81d47d795 Hookify text speed options (#6881) 2026-07-11 18:01:02 +00:00
djevangelia 847e3cd323 Maintenance, edits and addition to Lake Hylia water control (#6884) 2026-07-11 15:18:55 +00:00
djevangelia 50837308b7 Decomp, update z_en_holl.c (#6890) 2026-07-09 15:44:29 +00:00
djevangelia 73df35c6ab Bugfix, child Hookshot first person in Hylia lab (#6847) 2026-07-08 19:58:24 +00:00
djevangelia 1133ae221a Bugfix, rando Domain to Lake entry air swim (#6873) 2026-07-08 13:46:34 +00:00
Philip Dubé 5cf03a4cda pull decomp changes: actor functions, z_en_horse.c (#6877) 2026-07-07 01:51:44 +00:00
Philip Dubé 015440fdff Decouple GBK from LACS (#5838)
Triforce Pieces can now be tokens for bridge or ganon's soul. & can be tokens for multiple rewards

Wincon can now be arbitrary conditions

Ganon's Soul (removed from existing boss soul options) can now be arbitrary conditions

Co-authored-by: Pepper0ni <93387759+Pepper0ni@users.noreply.github.com>
2026-07-04 20:04:09 +00:00
Shishu the Dragon b09c0733e2 Ivan: Move ActorDB registration into IvanCoop.cpp (#6815) 2026-07-04 01:51:28 +00:00
Chris c5835669fe Hookifying Various Cheats and FixVineFall (#6827) 2026-06-30 04:10:56 +00:00
Amber Burton aedddc21e9 Sync's Ganons Trials and Fixes Softlock (#6828)
Previous co op softlock fix introduced a possible trial softlock making barrier never dissappear. This not only ensures that softlock cant happen, it syncs the trial flags in real time and allows all cutscenes to finish playing to properly remove the barrier even if the beams are physically visible in your game.
2026-06-29 04:48:27 +00:00
jdperos 003a009ebc Better Octave Drop logic (#6796) 2026-06-27 15:28:40 +00:00
Tim Schneeberger 633e920969 Cleanup unused includes & remove remaining LUS umbrella includes (#6813) 2026-06-27 00:20:03 +00:00
Philip Dubé f95c23ef69 No FMA (#6811) 2026-06-24 19:28:09 +00:00
David Racine 8cf4ff5f14 fix: free look continues from forced view when leaving a fixed camera (#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-24 16:24:19 +00:00
OtherBlue cb215ede87 Custom Bottle Contents (#6780) 2026-06-22 05:09:41 +00:00
David Racine 497d34570b fix: free look releases the door peek camera (#6756)
* 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-19 13:58:12 +00:00
David Racine 100bae3b9f feat(camera): option for free look to follow the default camera distance (#6757)
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-18 13:34:29 +00:00
nickel246 0744396e0e Redo Fishing Pole Gi Model (#6759)
Replaces the gi model for the randomizer Fishing Pole to be more consistent with the rest of the game's gi models
2026-06-18 13:32:50 +00:00
David Racine ebdd2c34c7 fix(audio): replace stray custom-sequence printf with a debug log (#6752)
The custom-sequence registration loop printed each assigned seqNum to
stdout via a bare printf, spamming the console with context-free numbers
on every launch. Convert it to LUSLOG_DEBUG and include the sequence name
so it is hidden by default yet useful for diagnosing music-pack loading.
2026-06-18 13:29:45 +00:00
Reppan 0e5083931f [Modding] Refactor CustomEquipment (#6708) 2026-06-15 14:23:48 +00:00
ph fc2f525052 fix halfmilk RBA (#6670) 2026-06-14 18:55:37 +00:00
Philip Dubé 360f4882d2 rando: option to allow swordless epona items (#6727) 2026-06-14 14:21:16 +00:00
David Racine eb4142835e Fix custom music corruption past 256 sequences (#5989) (#6736)
The resolved replacement id (which can exceed 255) rode a single
per-player seqToPlay slot, written at enqueue but consumed
asynchronously on the audio thread; back-to-back starts and
priority-queue promotions clobbered it. sSeqFlags[0x6F] was also indexed
by raw id, reading out of bounds past the authentic range.

- func_800F9280 resolves the replacement and packs the full 16-bit id
  into the 0x82/0x85 play command; the handler reads opArgs & 0xFFFF.
  Audio_QueueSeqCmd no longer pre-writes the shared slot.
- SyncInitSeqPlayerInternal uses the command-carried id and bounds-checks
  it against the calloc'd sequence map (+0xF headroom for reserved-range
  skips).
- Route sSeqFlags reads through a bounded Audio_GetSeqFlags helper.
- Warn and skip gracefully past the 16-bit id limit.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-13 03:36:25 +00:00
Philip Dubé 739225d222 Add 6th notch to text speed which makes text speed instant (#6694)
Helps frustration trying to read hints faster without skipping
2026-06-12 05:09:24 +00:00
Pepe20129 7c42a63ceb Add the 2 "decoy" crates as NL crates (#6672) 2026-06-11 12:49:55 +00:00
Shishu the Dragon 1c58bcc3e9 Ivan: Hookify and improve spawning (#6707)
Spawn/despawn Ivan immediately (not on next scene)

Move Ivan’s boomerang code out of z_player.c
2026-06-10 01:41:38 +00:00
Demur Rumed 17f5983771 Merge remote-tracking branch 'origin/develop' into develop-ackbar 2026-06-09 22:57:16 +00:00
Philip Dubé 3e1318edc0 uncomment code in z_camera.c (#6709)
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-09 16:17:22 +00:00
Pepe20129 10e429d8f7 Don't Spoil Ice Trap (#6597) 2026-06-06 20:23:11 +00:00
Shishu the Dragon ef014a35e6 Enhancement to disable heat haze (#6663) 2026-06-06 19:56:31 +00:00
Pepper0ni 004adaae14 Update LUS to build in GCC 16 (#6601) 2026-05-30 13:38:58 +00:00
Philip Dubé d09cd4ffcd Fix sword scaling (#6558)
Don't apply transforms when scale 1.0, adjust translation to be gradual
2026-05-29 02:50:02 +00:00
Philip Dubé 806398a65b Fix OGC great fairy reward in vanilla with skip misc interactions when fish is not obtainable (#6556)
Item_CheckObtainability should only be called with MOD_NONE GI

For RG_DOUBLE_DEFENSE that became ITEM_FISH. Nonsense ensued

To reproduce issue, create debug save & go straight to OGC great fairy with only magic/ocarina/lullaby
2026-04-23 12:34:26 +00:00
Philip Dubé c7ef690bc2 func_$hex renaming from upstream (#6498) 2026-04-19 18:56:01 +00:00
Reppan 4587ca6dbe Horseback archery settings (#6517) 2026-04-17 13:22:57 +00:00
Philip Dubé aedae12e63 Hookify DropsDontDie, NoFishDespawn, NoBugsDespawn (#6513) 2026-04-17 03:50:17 +00:00
A Green Spoon 412b60a02f Fix Duplicate Reticles in Anchor (#6520) 2026-04-16 23:50:55 +00:00
PurpleHato 262958a2eb Alt Toggle for Custom animation (#6433)
Add explicit alt prefix checking to animation loading

Makes ResourceMgr_LoadAnimByName alt-toggleable this will work for Link and any other animations files
2026-04-06 19:01:12 +00:00
Philip Dubé 178471bf20 Merge pull request #6425 from HarbourMasters/develop-ackbar
merge develop-ackbar 9.2.1 to develop
2026-03-28 06:26:13 +00:00
Christopher Leggett 4aa6e2ec28 Move retrieval of dbEntry after Actor_Destroy (#6410)
Before I had the change back to the placeholder actor id the Dummy
Player actors were spawned with, but since we grabbed the actorDB
entry before Actor_Destroy was called it didn't matter. Move it
and the requisite log statement to after Actor_Destroy.
2026-03-26 14:18:01 +00:00
Philip Dubé c439d62137 Enemy rando: don't mutate ActorEntry (#6400) 2026-03-23 16:27:20 +00:00
Philip Dubé ccdd8e63ff Enemy rando: don't mutate ActorEntry (#6395) 2026-03-23 12:41:53 +00:00
Sean Latham 5f0c0c8e2f Added minimap icons for other players in Anchor (#6372)
Icon size for other players reduced by 25%
2026-03-23 01:34:06 +00:00
Pepe20129 4e82ea192a Enemy rando cleanup 2 (#6365)
Move stuff to main file, delete header & refactor lists
2026-03-21 18:46:15 +00:00
Paul Schwabauer b6bf97e2f1 Fix ADPCM sample buffer overread in audio synthesis (#6364)
The sampleDataStartPad and aligned variables existed solely to satisfy
the N64 RSP DMA requirement that source addresses be 16-byte aligned.
On PC, aLoadBuffer is a plain memcpy with no such constraint.

The alignment dance caused aLoadBuffer to read up to 15 bytes before
sampleData and up to 8+ bytes past the end of the sample buffer. On
platforms with strict allocator guard pages (e.g. OpenBSD), this
triggers a SIGSEGV.

A second issue remains after removing the alignment dance: nFramesToDecode
is derived from sample counts (loopEnd), but size is not always a multiple
of frameSize. loopEnd and size are derived independently during encoding
and can disagree on the final partial frame, leaving nFramesToDecode *
frameSize exceeding the remaining bytes in the buffer.

Remove sampleDataStartPad and aligned entirely. Clamp the load to
min(nFramesToDecode * frameSize, audioFontSample->size - sampleDataOffset).
The ADPCM decoder operates on DMEM, so a partial last frame in DMEM
produces at most a negligible artifact at sound termination.
2026-03-21 18:34:18 +00:00
Christopher Leggett 5c8ff76554 Custom Item Icons in Textboxes (#6343) 2026-03-20 16:37:44 +00:00
Christopher Leggett f2c34d8c11 Fix Entrance Rando Grotto Voidout Crash when voiding back to an area with a background image (#6379)
Hookify bgimage load cam check and add it to entrance rando
2026-03-20 03:40:35 +00:00
Philip Dubé 6a9567b369 Fix rendering double digit key count (#6371) 2026-03-19 01:39:46 +00:00