Commit Graph

4162 Commits

Author SHA1 Message Date
Pepper0ni cc63cc4abd fix logic bugs with Bombchus (#7117) 2026-08-25 14:59:46 +00:00
Matthew-Whisenant 78e3683ef6 Side room pot 5 and 6 logic fix (#7107) 2026-08-25 12:57:51 +00:00
Philip Dubé ce969cab90 clean up includes (#7114) 2026-08-25 08:02:02 +00:00
Philip Dubé b341e02cd5 Remove unused field progressive from Item (#7113) 2026-08-23 21:24:07 +00:00
Philip Dubé 07414fd722 Clear fire timer when blue warp skip bypasses chamber of sage (#7112)
Avoids timer from Volvagia carrying over to DMC
2026-08-23 21:08:55 +00:00
Philip Dubé 47d1383020 MQ DC: standing in corner slingshot can hit through eye through boulder (#7109) 2026-08-23 13:26:49 +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
Philip Dubé 7a7f942b8e Fix item tracker fishing pole & roc's feather (#7103)
ITEM_ cases should not be mixed into RG_ cases
2026-08-22 20:11:05 +00:00
djevangelia 5f52af7ef2 Enemy rando, make Keese not fall if not dead + fall downscale (#7101) 2026-08-22 19:30:14 +00:00
Jameriquiah e8b943968b Disable2DBackgrounds Fixes (#7102) 2026-08-22 16:39:52 +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
David Racine 22426a8127 Resolve the Fast3dGui cast once per scope instead of per call (#7095)
Reaching the Fast3d GUI is spelled out in full at every call site:

    std::dynamic_pointer_cast<Fast::Fast3dGui>(
        Ship::Context::GetRawInstance()->GetWindow()->GetGui())->GetTextureByName(name)

Each one locks the Context weak_ptr, copies a shared_ptr for the window
and one for the GUI, then runs a dynamic_cast, only to drop all three
again. InputViewer::DrawElement does that 43 times per frame, and the
item tracker and save editor repeat it once per icon drawn.

Binding it to a local once per scope leaves the behaviour identical and
reads better. The local goes in the innermost block that covers the call
sites, so it stays behind the guards that were already there: DrawElement
still resolves nothing when the input viewer is off.

RenderButton keeps its inline casts. Its two call sites are in exclusive
branches, so a local would add a cast on the path that takes neither.
2026-08-20 17:56:41 +00:00
Philip Dubé 17c57c64c5 Try fix mac build flakiness in CI with mdutil -a -i off (#7094) 2026-08-20 02:10:52 +00:00
Philip Dubé 9baa114f6b Hookify fish, refactor fishsanity (#7091) 2026-08-18 14:36:30 +00:00
Philip Dubé 401605532f Set ToD in non-rando LACS & MSCS skips (#7092) 2026-08-18 02:07:03 +00:00
Philip Dubé bd8a5825f9 Hookify masks / timeless equipment (#7088) 2026-08-17 17:24:03 +00:00
Philip Dubé 172b373fb5 Adjust fishing prize threshold when minigame weight adjusted (#7089)
cleanup IS_RANDO usage in randomizer hook_handlers.cpp
2026-08-17 17:23:36 +00:00
Philip Dubé 4c43ef030d Fix crash when loading unversioned oot_save.sav (#7090) 2026-08-17 17:23:08 +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
Philip Dubé 0bae4961ab Draw keys on keyring with code, consolidate dungeon key counting code (#7087)
Remove CustomKeyModels option, always enabled
2026-08-16 23:30:38 +00:00
Philip Dubé 999f6fe892 use ccache for windows too (#7086)
MSVC support added in 4.6
2026-08-16 19:31:38 +00:00
Philip Dubé bdccc868b7 Fix entrance overrides being different between loading spoiler vs starting seed (#7085) 2026-08-16 18:46:15 +00:00
Philip Dubé 17a7fde003 Shuffle Silver: fix gtg room setting room cleared instead of flag (#7084) 2026-08-16 18:38:51 +00:00
Philip Dubé 38acd5a177 Intro Skip: adjust Link's position & camera to match values after watching intro (#7077) 2026-08-16 17:18:01 +00:00
Philip Dubé 252f6ffaa1 generate-builds.yml: consistently use max-size 2G, prefer j4 over j3, evict-old-files: job (#7083) 2026-08-16 16:41:05 +00:00
Philip Dubé bc12521718 Silence warnings on Windows for dependencies, bump torch (#7082) 2026-08-16 16:38:36 +00:00
Philip Dubé 940e3c5696 More pragma once (#7081)
libultraship uses pragma once, we were already using it in many headers
2026-08-16 14:49:44 +00:00
djevangelia 05f199e12b Enemy rando, GTG hammer room air spawn fix (#7079) 2026-08-16 13:37:59 +00:00
djevangelia 917a9b78d9 Enemy rando, fix healthy big Guays not dying (#7065) 2026-08-15 20:37:15 +00:00
djevangelia 3a3d93f732 Enemy rando, exclude Withered Deku Babas from clear rooms (#7078) 2026-08-15 19:57:04 +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
Philip Dubé afcfe4f7bf Format JSON, include CI check (#7071) 2026-08-14 22:03:44 +00:00
Garrett Cox fa5172a58b Add advanced option for teleport trap (#6986) 2026-08-14 16:42:43 -04:00
djevangelia e048afd10a Decomp, three audio functions (#7069) 2026-08-14 20:01:49 +00:00
Malkierian 9782faba44 Torch CMake and Extraction Flow cleanup (#7063)
* Fix yaml-cpp inclusion for VS building.

* Fix double-finds for rom files in the binary directory.

* Fix archive generation targets.

* Port over Proxy's change on 2ship to old ROM deletion to search all applicable subdirectories.
2026-08-14 18:54:09 +00:00
Pepe20129 db147f6a0a Update the "Hell Mode" preset (#7066) 2026-08-14 18:23:39 +00:00
David Racine a35f331189 Keep an unlisted combobox value from killing the menu (#7062)
A stored value with no entry in the combo map threw out of map::at while
drawing, which took the whole menu down as soon as a search matched the widget.
Fall back to the default and log the offender.

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
2026-08-13 20:22:03 +00:00
David Racine 14d9d4e8bb Pick up newly added source files without a manual re-configure (#7060)
The source globs did not use CONFIGURE_DEPENDS, so adding a file under
soh/ or src/ left it out of the build until cmake was re-run by hand,
silently and with no warning.

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
2026-08-13 11:26:37 +00:00
David Racine 81784a09e8 Keep the save editor's sword state alive long enough to draw (#7061)
fmt::format returns a std::string by value, so taking c_str() of the temporary
left BeginCombo reading freed memory whenever the melee weapon state fell
outside the known cases. Hold the text in a std::string instead.

Use spdlog::fmt_lib in the save editor

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-13 11:25:05 +00:00
A Green Spoon 08cb0dcf70 Fix graveyard sign checks at night (#7057) 2026-08-12 11:42:16 +00:00
Malkierian 253e672473 Adds native OOTRS archive support to remove need for custom packing. (#7056) 2026-08-12 11:34:25 +00:00
djevangelia 9772a603e8 Enemy rando, remove switch flag setting from Wolfos (#7055) 2026-08-10 13:01:04 +00:00
Philip Dubé 55b52a26a5 replace specialized bean logic with events (#5842) 2026-08-10 01:21:41 +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é 0cf2b37013 Apply Enemy Rando Dark Link fixes to Crowd Control & Sail (#7054) 2026-08-09 23:46:51 +00:00
Philip Dubé f35f134c93 Fix grammar (#7053) 2026-08-09 22:54:45 +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é 490e13616e fix warnings (#7051) 2026-08-09 18:02:47 +00:00