Commit Graph

1615 Commits

Author SHA1 Message Date
Philip Dubé 4afcb78331 speedrun mode (#7073)
prevent Esc menu while speedrun file loaded, instead toggles gameplay stats / time splits

render RUN tag on speedrun files

don't persist speedrun preset into player's settings
2026-10-05 05:19:52 +00:00
David Racine 9308ba7940 Carry sound font ids in 16 bits (#7260)
Each streamed track brings its own sound font, so a pack with more than
~217 of them pushes font ids past 255. Stored in 8 bits they wrapped onto
vanilla fonts or onto 0xFF, which reads as "no font": the track played
vanilla instruments or nothing at all.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 23:39:10 +00:00
Philip Dubé 12e17c68a8 don't set nextEntranceIndex in Play_Init, breaks FWWW (#7300)
instead tracker uses gSaveContext.entranceIndex
2026-10-04 15:39:07 +00:00
Philip Dubé 9eafd15fe1 Fix grotto entrance misbehaving when entering grotto before last transition not done (#7271) 2026-10-02 15:34:13 +00:00
David Racine 57eea55bd4 Fix a song enlarging on the quest page while the cursor is on L/R (#7263)
The selected-slot index is only assigned when the cursor is on a slot, so on
the page arrows the song icons compared against an uninitialised value.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-01 02:46:12 +00:00
Philip Dubé ad7d0a66d0 Set time of day when skipping sun song cutscene (#7235)
Simulate cutscenes to match various time of day quirks
2026-10-01 02:22:38 +00:00
Chris b9bcc5e901 Fix audio thread race on CVar reads during preset apply (#7265) 2026-09-29 03:27:11 +00:00
Pepper0ni eccbc72cbe Fix and hookify full health on spawn (#7239) 2026-09-24 22:39:33 +00:00
Pepper0ni 2e300d3acc force empty bottle OI to use the milk effect to avoid UB (#7247) 2026-09-24 22:38:51 +00:00
Philip Dubé 5fee87c23e Replace tabs with spaces (#7223) 2026-09-19 18:09:26 +00:00
Philip Dubé 27a66925bf Add restoration for hookshot as child to softlock (#7219)
Requested for speedrun mode

Also hookify more enemy rando stuff while I'm in the neighbourhood
2026-09-19 14:00:06 +00:00
Philip Dubé a353b6e7ce Shuffle Scarecrow Song (#7205) 2026-09-18 14:54:24 +00:00
Philip Dubé 02c7632a33 Fix boolean logic error breaking Talon cutscene skip (#7211) 2026-09-17 02:09:18 +00:00
Philip Dubé 01a4f3693d Refactor file select quest visibility, fix single quest handling (#7210)
Select single visible quest when only single quest visible

Fix bad operator precedence
2026-09-17 00:15:19 +00:00
Jordan Longstaff ae62048910 Hookify three Glitch Restoration options (#7200) 2026-09-16 18:15:17 +00:00
Jordan Longstaff aff03cd7b8 Hookify Mweep cutscene options (#7199) 2026-09-15 16:56:25 +00:00
Philip Dubé 4bd2356b11 QuickBossDeaths.cpp (#7192)
Phantom Ganon was only QuickBossDeaths skip, Twinrova only had rando / boss rush hack
2026-09-15 15:06:38 +00:00
Philip Dubé 060787a239 clean up headers (#7194)
GameInteractor.h does not itself depend on libultraship/bridge/consolevariablebridge.h,
instead its dependencies requiring that header should include it themselves

This was particularly impactful for SohGui.hpp which included all the windows
2026-09-14 19:49:29 +00:00
Caladius 43ea332874 [Enhancement] Time Splits v2 (#5839)
This aims to port over the Time Splits feature from 2Ship as it is cleaner & more robust.

New to this is the ability to finally compare splits from a second list.

Old Save data will now be converted to the new format automatically. Once it converts the data, the old save file will be renamed with a new ".backup" extension.

Co-authored-by: serprex <159546+serprex@users.noreply.github.com>
2026-09-14 16:55:22 +00:00
Philip Dubé 97fb13cbee Hookify FP movement (#7189)
Apply consistent movement effects to first person movement
2026-09-14 16:49:50 +00:00
Philip Dubé 8b3d91506e Fix title card margins (#7167) 2026-09-13 21:03:26 +00:00
Philip Dubé d37a378466 Don't apply inverted X axis aiming to first person movement (#7163) 2026-09-08 17:14:07 +00:00
Pepper0ni f3830ee8ad Fix megadives with jump clamping (#7164) 2026-09-08 17:13:52 +00:00
Philip Dubé e2a82213c6 Reduce big octo cutscene skip (#7158)
Pointless to give control while player waits for big octo to descend (& still play cutscene),
just opens up complications & speedrun discussion raised concern about backflip to get behind Big Octo
2026-09-08 13:38:42 +00:00
Philip Dubé a5f5903955 water temple: quadruple water level change when skipping cutscene (#7162)
prevents falling into water while it descends, reaching 2f cracked wall without tricks
2026-09-08 13:38:30 +00:00
Philip Dubé b4c41c9bf4 Jabu fish cutscene skip: immediately transition (#7159)
This avoids awkward pause, also prevents recapturing fish

Also cleanup RSK_JABU_OPEN
2026-09-08 13:38:20 +00:00
David Racine 17a4c2cf89 Reopen the OPUS decoder when a note moves to another sample (#7137)
The decoder cached on a note was keyed on nothing, so a note reused for a
different streamed sample carried on decoding the previous track. Audible as
the wrong custom music: the sequence and soundfont the audio editor reports
are correct, only the samples reaching the mixer are not.

Reproduced on the game-start cutscene chain with a streamed music pack in 4
of 6 runs; 0 of 6 after.

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
Co-authored-by: serprex <159546+serprex@users.noreply.github.com>
2026-09-06 13:10:21 +00:00
Philip Dubé 3175ea9c20 Remove completed mask quest option, add all masks to starting items menu (#7104)
Fix masks not rendering properly with completed mask quest

Remove completed mask quest option, add all masks to starting items menu

logic: handle starting with masks being able to skip ahead a bit in trade sequence
2026-08-31 17:13:25 +00:00
Philip Dubé a7cd6c8113 Avoid randomizer generation races with file select (#7136)
Fixes both starting file while generating,
& starting generation in file loading transition

Remove RandoGenerating cvar
2026-08-31 14:04:50 +00:00
Jordan Longstaff 2dd51f1288 [Enhancement] Hide quests in File Select (#7093)
Migrate File Select CVars

Co-authored-by: Unreference <87878910+unreference@users.noreply.github.com>
2026-08-31 14:03:04 +00:00
David Racine 8bf26365be Honour the loop end when reading streamed music (#7129)
Streamed samples were read a whole block at a time regardless of where the loop
ended, so playback ran past it and only then jumped back. The seam therefore landed
at a random offset up to a block late instead of where the sample asked for it, which
is why a loop that is clean in an editor pops in game.

Fixes #5780.


Claude-Session: https://claude.ai/code/session_011Ex3z29fQzPEZgwH4EA641

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
2026-08-30 14:03:45 +00:00
djevangelia 2ab81a9bab Fix King Zora talkstate not updating (#7125) 2026-08-30 05:48:49 +00:00
HighTierHumann 6d1a6527d4 Bugfix for AlwaysOnFixes.cpp as well as a fallback to prevent crashes when attempting to display an textId 0 (#7123)
Add guard to check if camera mode is CAMERA_MODE_FIRST_PERSON before applying fixes

Also adds missing PLAYER_IA modes for magic arrows, as well as applying camera fix for Hookshot outside of just lakeside lab.

Move gameinteractor for change aiming camera inside bow/sling/hook aiming block
2026-08-27 19:35:25 +00:00
David Racine 945f70222a Restore the realId assignment in AudioLoad_AsyncLoadInner (#7105)
The function declares realId and then indexes with it thirteen times -
the load-status tables, AudioLoad_SearchCaches, the table entry it reads
size and address from, every cache allocation, and the status write at the
end - but nothing assigns it. It has read an uninitialised local since
"Custom Sequences" (#2066) dropped the assignment in 2022.

Restoring the line puts back the value the rest of the function expects.
For SEQUENCE_TABLE and FONT_TABLE, AudioLoad_GetRealTableIndex returns the
id unchanged, so this is only a correctness fix in practice: the paths that
reach this function today go through the sequence script's async load
command, which is rare enough that the garbage index has not been tied to
any report.
2026-08-23 12:37:51 +00:00
djevangelia 5f52af7ef2 Enemy rando, make Keese not fall if not dead + fall downscale (#7101) 2026-08-22 19:30:14 +00:00
David Racine 27b71b1a54 Drop the seqLoadStatus bounds checks made redundant by #6932 (#7100)
#6917 guarded the three seqLoadStatus accessors against sequenceMapSize
because the array was allocated at exactly that size, so a custom sequence
id past it read and wrote off the end.

#6932 sized the array to sequenceMapSize + 0xF to match sequenceMap, which
covers the whole id space rather than rejecting the ids outside it, and also
protects the writers those guards never saw: AudioHeap_AllocCached and
AudioHeap_PopCache index seqLoadStatus directly.

The guards are now not just redundant but bounded wrong - they treat the ids
in [sequenceMapSize, sequenceMapSize + 0xF) as absent from a table that now
has room for them. Nothing breaks today because every entry starts at 5, so
AudioLoad_IsSeqLoadComplete answers true regardless and
AudioLoad_SetSeqLoadStatus already declines to overwrite a 5 - but once the
heap cache path moves such an entry off 5, the guard blocks an update that
should happen.

Reverting them restores the three functions to their decompiled form. The
sizing from #6932 and the id check in AudioLoad_SyncInitSeqPlayerInternal
remain the actual protection.
2026-08-22 14:19:04 +00:00
Philip Dubé 9baa114f6b Hookify fish, refactor fishsanity (#7091) 2026-08-18 14:36:30 +00:00
Philip Dubé bd8a5825f9 Hookify masks / timeless equipment (#7088) 2026-08-17 17:24:03 +00:00
David Racine 6a3c9b7604 Add a Skip Warp Cutscenes enhancement (#7059)
Warp song cutscenes were skipped for randomizer players whether they
wanted it or not: Demo_Kankyo cut the departure animation short from a
hardcoded IS_RANDO branch, and entrance rando cleared respawnFlag so the
arrival never played. There was no way to get the vanilla warp back, and
no way for a vanilla playthrough to skip it.

Drop both and put the behavior behind a Skip Warp Cutscenes toggle,
defaulting on in randomizer so existing rando warps are unchanged. It
kills the departure actor as it spawns and puts the arrival spawn mode
back to IDLE, which covers both halves of the warp.

Entrance rando's destination override moves off Demo_Kankyo's update onto
a new OnWarpSongLeave hook fired from Environment_WarpSongLeave. That is
where every warp path -- the cutscene, the skip toggle, and the spawn
failure fallback -- commits its destination, so the override no longer
depends on the departure actor being alive to see it, and a warp song
shuffled onto a grotto return keeps its grotto respawn.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-17 17:22:34 +00:00
djevangelia 3a8c68be66 Enemy rando, let enemies air walk over voidout floor in clear rooms (#7005)
Behind a setting

Add timed rooms + Fire Temple modifications
2026-08-17 13:08:13 +00:00
djevangelia 917a9b78d9 Enemy rando, fix healthy big Guays not dying (#7065) 2026-08-15 20:37:15 +00:00
Philip Dubé ca0a17cfe7 bombchu bowling setting: first item (#7070)
desirable for speedrun settings that want less variance. also use for moving rando logic into hooks
2026-08-14 22:24:03 +00:00
djevangelia e048afd10a Decomp, three audio functions (#7069) 2026-08-14 20:01:49 +00:00
djevangelia 7e9cf1eb1c Enemy rando, set EnTp EnSkb EnPeehat collider positions on actor init (#7049) 2026-08-10 01:10:40 +00:00
Philip Dubé f27ddede59 Fix mirror decal not rendering on some walls (#7052) 2026-08-09 22:01:31 +00:00
Pedro Nascimento 4e39d06acc fix(audio): bound audio-heap cache tables (SIGSEGV with large custom music packs) (#6932)
Root cause of three identical field crashes (audio thread, opcode fetch
through a pointer with its low 32 bits overwritten, seconds after scene
transitions): AudioHeap_AllocPermanent writes permanentCache[index] with
index = permanentPool.count and no bound against the 32-entry array. In
SoH every soundfont sync-load is forced permanent, and custom sequences
whose SEQ.xml says CachePolicy="Temporary" ALSO allocate permanently
(the factory stores the LUS enum where CACHE_TEMPORARY == 0, while
AudioLoad_SyncLoad's switch reads 0 with the ROM convention
'permanent'). A pack with ~60 streamed customs plus vanilla fonts pushes
count past 32 within a session, after which each allocation sprays a
{ptr, size, tableType/id} triplet at 24-byte stride through
gAudioContext - entry[135]'s ptr field lands exactly on
seqPlayers[0].scriptState.pc and entry[156] on seqPlayers[1]'s (both
verified against the crash-dump registers).

- permanentCache raised 32 -> 512 (12 KB) and AllocPermanent refuses
  allocations past the array instead of corrupting memory.
- Same unbounded-index disease fixed in the three sibling writers:
  AllocCached's persistent path (16-entry array; CACHE_EITHER degrades
  to temporary, hard persistent requests fail cleanly),
  AllocPersistentSampleCacheEntry, AllocTemporarySampleCacheEntry.
- seqLoadStatus malloc sized for the full id space (sequenceMapSize +
  0xF) matching sequenceMap; custom ids above sequenceMapSize previously
  overflowed the allocation by up to 15 bytes.

Upstream SoH bugs, not branch-introduced - this branch's many-track
packs merely made the overflow reachable in normal play. Standalone
upstreamable fix.
2026-08-09 18:36:33 +00:00
Philip Dubé bf7177256a FixFlexDrops (#7047) 2026-08-09 15:46:51 +00:00
Philip Dubé 5ecff16bdb Fix heap corruption due to skybox code using GameState as PlayState (#7045)
Also corrects clearing skybox context before Skybox_Setup
2026-08-09 01:05:15 +00:00
Pepper0ni 07944d785c Allow buying tunic as either age in rando even without shopsanity. (#7016) 2026-08-08 21:17:10 +00:00
Jameriquiah a4901abdc5 Hookify Skeleton Unregisters (#6988)
Co-authored-by: serprex <159546+serprex@users.noreply.github.com>
2026-08-08 21:16:10 +00:00