Commit Graph

787 Commits

Author SHA1 Message Date
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
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
Philip Dubé
e9ef09eee4 Fix RBA gauntlet colors to match console (#6359)
Also fix tracker to show golden gauntlets while wearing glitched gauntlets,
& don't crash save editor
2026-03-17 17:40:08 +00:00
Pepe20129
b35883e1f6 Enemy rando cleanup (#6327)
Change Actor_SpawnEntry to use VB
Move adult zelda collapse stalfos to a explicit hook
Move dark link to a explicit hook
Some more canRandomize that were not needed
Move bg_haka & bg_haka_tubo to explicit hooks
Move en_vali to an explicit hook
Move bg_mori_bigst to an explicit hook
Fix door opening before the enemies are killed
Remove `canRandomize` parameter
Move bg_haka_huta to explicit hooks
2026-03-17 04:53:33 +00:00
A Green Spoon
6340ad3d5c Hookify Hookshot Reticle Changes (#6279) 2026-03-05 16:11:36 +00:00
red
2c07edc4eb Add disable jabu wobble accessibility option (#6280) 2026-03-02 00:45:17 +00:00
Philip Dubé
0a946e5b9d Roc's Feather: avoid OOB access to gItemAgeReqs (#6297)
This fix is a bit blunt, but in the absence of a better idea it exists
2026-03-01 14:55:16 +00:00
Philip Dubé
b07c64ecf9 Fix song of storms cutscene (#6310) 2026-02-28 23:51:13 +00:00
Philip Dubé
5a7bc9a459 Remove unnecessary includes of OTRGlobals.h in actor overlays (#6306) 2026-02-28 00:44:41 +00:00
Christopher Leggett
d4d3e8bc0f Port Scrolling Texture Interpolation over from 2Ship (#6224) 2026-02-26 13:36:55 +00:00
A Green Spoon
d9ebce9f9f hookify additional reticles (#6278) 2026-02-17 20:08:06 +00:00
Jordan Longstaff
0210374cc4 Enable missing music entries in audio editor (#5685)
* Enable missing music entries in audio editor

* Fix mislabeled tracks "Ocarina of Time" and "Seal of Six Sages" (mirrored in decomp)
2026-02-14 20:31:19 -07:00
Philip Dubé
92cb7f1594 fix crash when generating decoupled entrances with boss shuffle (#6189)
regression from ganon's tower shuffle
2026-02-10 19:22:40 +00:00
tortugaveloz
a365446832 Basic Surround Sound support. (#6204) 2026-01-28 05:14:57 +00:00
xxAtrain223
f5264be192 Recalculate Available Checks from Current Region (#6165) 2026-01-26 03:23:47 +00:00
Philip Dubé
c9414b4d45 Misc fixes mostly related to custom text refactor (#6174)
fix goron messages in rando
also always include "IS_RANDO" in rando shipinit dependencies
don't use rando RNG, trying std::array
avoid sprintf, std::array not necessary
fix random rupee name crash
roll random traps: don't reuse rando rng
fix better bombchu typo
2026-01-20 20:55:24 +00:00
ItsHeckinPat
04c5d50b3e Ported BtnSelector from 2ship (#6158)
Allows the rebinding for Resetting the game, Debug Map Select, and Debug No-Clip.
Also allows for Speed Modifiers to use the new button combos, instead of only the modifier buttons.
2026-01-18 16:01:39 +00:00
Philip Dubé
44d351698b Shuffle Masks (#5536)
Future improvements can build on this,
giving masks abilities,
or adding checks for trading mask to someone
2026-01-17 05:00:03 +00:00
Jordan Longstaff
6606eefbf1 Add option to disable Link spinning with the Goron Pot (#6138)
Make Link focus on Goron Pot instead
2026-01-16 13:55:36 +00:00
Christopher Leggett
7b3efb1e7b Upgrades Custom Messages to Hooks and ShipInit (#5101)
Defines the hook for OnTextLoad. Intercepts message loading with hooks. Adds file to handle the CustomMessage creation for items.

Handles Ice Traps, Triforce Pieces, and Custom Items. Handle maps, compasses, and keys

Converts gossip stone hints to hook. Handle one-off merchant messages. Convert scrubs and shop text and remove now-unused code

Convert Sheik and Ganondorf hint text. Convert skulltula people messages. Convert more static hints

Specifically Dampe, Greg, Warp Songs, Frogs, Loach, Fishing Pole, and Saria

Convert Biggoron Hint. Convert Big Poes hint. Convert Anju hint dialogue. Convert Malon hint. Convert Horseback Archery hints. Convert Mask Shop SIgn hint

Convert Lake Hylia Switch related text. Convert Shooting Gallery bow reminder message

Convert random rupee names. Convert Rando-Relevant Navi Enhancement. Convert Random Goron messages

Convert Injecting Skull token counts. Add in a way to AutoFormat with an item icon.. Fix some errors with skull tokens and apply icon

Convert heart container item counts. Convert Inject Item Count for Heart Pieces. Port Better Bombchu Shopping. Convert Market Sneak

Port Quit Fishing At Door and clean up unused stuff. Reintroduce missing Mysterious warp song hint

Make ShipInitFuncs static

Adds and uses per-item articles for get item messages

Fix Entrance Hints and port toggle from dev-copper
2026-01-15 20:57:13 +00:00
Paul Schwabauer
cd8bd69c6e Fix undefined behavior (#6089)
Fix TimeSplit crash on empty name

Initialize OptionValue::mVal to fix undefined behavior

Fix undefined behavior in GraveHoleJumps surface type copy.
The memcpy was reading 33 SurfaceTypes regardless of the actual count,
causing a buffer overread since NTSC 1.0 only has 31 surface types and
later versions have 32. Now uses the actual surfaceTypesCount from the
collision header.

Fix undefined behavior in framebuffer OTR signature check.
Use calloc instead of malloc for framebuffer allocation to zero-initialize
the memory. This fixes Valgrind warnings about reading uninitialized values
when ResourceMgr_OTRSigCheck reads from framebuffer pointers to check for
the "__OTR__" signature.

Fix undefined behavior in fontLoadStatus initialization.
Use calloc instead of malloc when allocating fontLoadStatus array
to ensure zero-initialization. This fixes Valgrind warnings about
conditional jumps depending on uninitialized values in
AudioLoad_SetFontLoadStatus.
2026-01-10 21:31:21 +00:00
Philip Dubé
7627b0567b Bring back Big Poe Count option, lost in menu refactor (#6126) 2026-01-10 17:19:19 +01:00
aMannus
14a6bc1f85 Add Roc's Feather (custom item) to Rando Item Pool (#6035)
This adds Roc's as a fully implemented item into the randomizer pool. When both Roc's and Nayru's is found, you can swap between them on the pause menu

Many people have contributed to this over time, so huge shoutout to:
- kentonm, this item is directly inspired by their Roc's Feather from their romhack Indigo. Also provided me with their GI model, icon texture and animation to use.
- PurpleHato, for providing the images for the item name shown on the kaleidoscope.
- Dana The Elf, providing another custom animation for the item.
- Reppan, for helping to tweak the animation and exporting the GI model for me.
2026-01-10 12:59:32 +00:00
Paul Schwabauer
5bbc32c2d1 Fix memory leaks in MessageViewer and audio_load (#6124)
Add destructor to MessageViewer to free allocated buffers

Free individual strings from ResourceMgr_ListFiles before freeing the array in audio_load.c
2026-01-10 12:53:37 +00:00
Jordan Longstaff
9ca5ce0b53 Decomp import: rename timer-related functions and variables (#5896) 2026-01-08 18:56:01 +00:00
Garrett Cox
4839e575b1 Add toggle for Link's sword trail (#6112) 2026-01-08 05:53:36 +00:00
nclok1405
7c4a3359f0 Enable Battle Music for Leever option + Modularize EnemyBGMDisable (#5985)
Add "Enable Enemy Proximity Music for Leever" option + Modularize EnemyBGMDisable
2026-01-05 15:07:05 +00:00
Jordyn Hardyman
9af262c1bb Disable Fixed Camera Enhancement (#6083)
Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com>
2026-01-03 18:07:19 +00:00
nclok1405
5b275343db Allow Enemy Randomizer in Debug Save (#5841) 2026-01-03 14:19:06 +00:00
Reppan
7db2a97cea modding: alt equipment (#6062)
Implements object_custom_equip objects that adds more support to have items modified by modders without having to export with hands or do xml edits to load hands. This is autonomous if exported as a object_custom_equip

Also adds non existing DisplayList for items that originally did not have a DisplayList. Longshot and Big Goron Sword Sheath is 2 examples
2026-01-03 14:18:11 +00:00
Glought
31db9e4ade Added "firstInput" stat and repurposed the "fileCreatedAt" stat. (#6070)
- The "firstInput" stat is set on first input in game. Used for RTA
  Timing.
- The "fileCreatedAt" stat is now set when then save file is created
  (After the player is done entering the file name). Useful for seeding
  non rando randomizers like Mirrorworld, Enemy Randomizer, extraTraps,
  etc.
2026-01-02 14:39:42 +00:00
aMannus
e96503c0bd Fix custom tunics not updating on scene change (#6026) 2025-12-30 23:21:53 +00:00
Christopher Leggett
7e829a0780 Add in Progressive Bombchu Bags (#5836)
* Adds new Progressive Bombchu Bags option

Also changes existing code to account for Bombchu Bags becoming
a drop down with 3 values instead of a checkbox

* Handle the new lower capacities for ammo refills

* Handle what happens when receiving a bombchu bag

* Remove the trick name of Progressive Bombchu Bag

Since, you know, that's an actual thing now.

* Implements Bombchu Bag handling next to Progressive Bombchu Handling

* clang-formatting

* Add extra bag for plentiful items

* Address review comment

* Move bombchu upgrade level to gSaveContext and add save/load

* Use logic's saveContext for correct logic calculations

* Remove RG_PROGRESSIVE_BOMBCHU

* Fix Bombchu Refill obtainability

* Don't add normal chus to the pool if chu bags are on.

* cmake-format

* Properly reset bombchuUpgradeLevel on savefile init

* Fix error with va_arg on linux

* Fixes small error in the Bombchu Bag description

* Fix bug with bombchu obtainability

* clang-format

* Fix infinite bombchu text

* fix clang-format
2025-12-04 15:14:32 +00:00
nclok1405
098cb70460 Disable Screen Flash for Finishing Blow option (#5988) 2025-12-03 19:15:49 -07:00
Garrett Cox
9cd31099e2 Additional Anchor functionality: (#5999)
- Returned support for custom tunic colors
- Ocarina playback now audible
- Fixed movement translation issue when climbing or going through crawlspaces
- Fixed issue preventing some items from being visible in Dummy hands (namely ocarina)
- Fixed stick length not correctly syncing
2025-11-30 18:17:00 -07:00
Jordan Longstaff
0f41ecb145 Modularize Hurt Container mode hook (#5874)
* Modularize Hurt Container mode hook

* Hook condition was wrong - fixed it

* Change type of hurtEnabled for clarity

* Change type back to bool

* Add VB hook

* Don't duplicate health capacity modifier calculation

* Add constants, replace magic numbers

* Clang format

* Publicize more health unit macros

* Make mod file self-contained
2025-11-24 17:30:34 +00:00
Malkierian
623a7e4f7b Merge pull request #5961 from Malkierian/develop-copper
Copper -> Develop 11/14
2025-11-14 12:29:38 -07:00
Jordan Longstaff
dadc2e5218 "Assignable Tunic and Boots" setting now allows shields also (#5953) 2025-11-13 14:29:48 -07:00
Garrett Cox
8073f96856 Various hooks to support anchor (#5929) 2025-11-08 15:51:09 -06:00
Malkierian
52a8f6c281 Program Execution Argument Extraction (#5807)
* Add function to be able to feed specific path into to process programmatically, and setup drag and drop functionality.

* Encapsulate dropped file functionality from Switch and Wii U.

* Fix dropped file detection, and fix ShowYesNowBox return checking.
2025-10-09 16:51:04 -07:00
briaguya
57c368aa2c update lus includes for new LUS file structure (#5820)
* Bump LUS to include FileDropMgr's new registration system and initial cursor visibility changes.

* New LUS ref.

* Remove default on for cursor always visible.
Add option to camera controls next to enable mouse input for autocapture.
Set autocapture on startup.

* next LUS

* clang again

* Add "EnableMouse" CVar check to startup SetAutoCaptureMouse.

* Back to LUS main.

* lus version with fixes we need

* very wip

* get it building

* soh otr

* bump lus before fixing soh side stuff

* build

* still builds

* mac error

* bump otrexporter

* bump to lus main

* upstream otrexporter

---------

Co-authored-by: Malkierian <malkierian@gmail.com>
Co-authored-by: briaguya <70942617+briaguya-ai@users.noreply.github.com>
2025-10-09 16:50:51 -07:00
briaguya
dd2628f737 sequence notifs (updated #5265) (#5824)
* Adds ability for Notifiations to not make a noise

This is probably the only feature that will use it, the noise makes sense for most things we want to use notifications for, but it playing on every scene transition was a bit distracting.

* Adds a hook for OnSeqPlayerInit

* Uses new hook and displays notification instead of overlay text

* Changes names to prevent collisions

Will be registering other types of hooks that will need different ShipInitFuncs in this same file later.

* Change Icon

* Change CVarName and remove now-unused duration slider

* Update ConfigMigrator for CVar changes.

* clang-format

* fix

* bring back duration control

* config v4

* fix v4 migration

---------

Co-authored-by: Christopher Leggett <chris@leggett.dev>
Co-authored-by: briaguya <70942617+briaguya-ai@users.noreply.github.com>
2025-10-04 18:57:01 -07:00
PurpleHato
e10b882c08 [ADD] - 3D Scenes for pre-render areas (#5804)
* Hard removal 2D ones for now

* override some scene values for prerender tests (#46)

* Adult Link Cloudy

* Fix: Child Link Night ToT Exterior

* Fix for real now

* Tweak: Skybox castle courtyard

* WIP - adjusting for patterns

* Hooked all code, needs testing

* Hookified

* Clean up

* Update Fog Control

* clang

* Fix skybox override to only affect 3D pre-rendered scenes

Prevent the 3D scene renderer from overriding skyboxes on all scenes

Previously, the function was applying skybox changes to every scene, overriding the intended skyboxes throughout the game (Example: Kokiri Forest with a blue sky instead of it's original "greyish" one)
Now it only applies custom skybox settings to scenes in the skyboxControlList, preserving original skyboxes for other scenes

* Remove commentary and forgot to add Zelda's courtyard skybox

* Move code to shipInit.

* Early return for VB_SHOULD.

* clang

* Fix missing !

* Feedback fixes.

* clang

* Fix CVAR

* Modify Skybox for scenes with multiple viewpoints.

* setting position change to blend in the "modder stuff can do"

* Adressed review

* tooltip space missing, oops

* InitFunc

---------

Co-authored-by: Archez <Archez@users.noreply.github.com>
Co-authored-by: Caladius <clatini88@gmail.com>
2025-09-30 19:03:55 -07:00
Eblo
5ed3db0a7e Allow non-ASCII characters on Windows (#5741) 2025-09-30 19:00:30 -07:00
Philip Dubé
e6663a1c49 entrance shuffle: sign hints (#5335)
* entrance shuffle: sign hints

* update entrance tracker with hint

* show sign hints when any entrances shuffled

* only hint when entrance shuffled

* avoid crash when loading rando file

* fix kf exit

* correct hint from sign outside kokiri forest

* 3 signs on DMT

* improve naming
2025-09-16 17:52:47 -07:00