Commit Graph

2966 Commits

Author SHA1 Message Date
PJB3005 bd09eea0f3 Disallow consecutive periods in mod IDs
Avoid config shenanigans
2026-05-31 16:35:28 +02:00
PJB3005 531313120f Merge branch 'main' into mods 2026-05-31 16:23:01 +02:00
Pieter-Jan Briers 81caa89e12 Update Aurora & use new texture replacements API (#1935)
Cherry picked from TPHD branch

Co-authored-by: Luke Street <luke@street.dev>
2026-05-30 19:57:17 -06:00
Luke Street bc3cdcc955 Revert "Adds a new cheat that let you transform from the start of the game. (…" (#1927)
This reverts commit 62c19c0f64.
2026-05-29 21:20:15 -06:00
tomlube bf0dc85468 Revert "Added Sword and Shield skip Achievement" (#1917) 2026-05-29 15:14:05 -04:00
Supern_Ice 5269eadfaf Added Sword and Shield skip Achievement 2026-05-29 15:26:26 +01:00
PJB3005 fd26670b0e Remove unused include from mod_loader.hpp
This was for the code mods toggle before I moved the checking logic to CMake.
2026-05-29 09:56:47 +02:00
PJB3005 c83cc3b971 Horrible C++ template nightmares (fix clang-tidy warning about int conversions with ranges) 2026-05-29 05:47:12 +02:00
PJB3005 8c713d4535 Fix prelaunch animation timings
oops
2026-05-29 05:22:12 +02:00
PJB3005 183e7669c2 Add mods button to prelaunch UI
Fixes https://github.com/TwilitRealm/dusklight/issues/1904
2026-05-29 05:09:10 +02:00
PJB3005 f38514db79 Mods can be disabled by config
We now register a CVar for mod enablement for each mod.

Also made LoadedMod stored in unique_ptr because we keep pointers to them already, and I'm entirely uncomfortable with keeping pointers to the vector directly.
2026-05-29 04:59:42 +02:00
PJB3005 3792912ad1 Allow CVars to be registered late, improve usability for dynamically registered CVars.
Now we store the raw JSON value in memory for unregistered CVars.

Intended to be used for mod CVars, as we obviously can't statically define all of those.

CVar names are now stored as an std::string, so the lifetime is easy to manage when dynamically registered.

CVars cannot be moved/copied anymore. We had some code that was accidentally relying on this, and I fixed that.
2026-05-29 04:38:24 +02:00
Sirius902 e5c032f6e6 fix: item and talk rendering (#1896) 2026-05-29 03:15:56 +02:00
PJB3005 d9795f4098 Validate that mod IDs have a restricted character set.
Avoid funny business.
2026-05-29 02:43:00 +02:00
PJB3005 87d56be232 Improve native mod load failure diagnostics 2026-05-29 02:29:50 +02:00
PJB3005 be2924b509 Replace DuskLog uses with local log for modloader 2026-05-29 01:59:12 +02:00
PJB3005 be3e6b80eb Move code mod API to separate C++ file 2026-05-29 01:55:26 +02:00
PJB3005 10c310f7b1 Merge branch 'main' into mods 2026-05-29 01:38:13 +02:00
PJB3005 5f0c44eb84 Don't force symbol export if code mods disabled
Allows us to re-enable PCH on RmlUI. We'll likely need to rethink how this works anyways IMO.
2026-05-29 01:25:03 +02:00
PJB3005 b88a5e4ac3 Allow code mods to be disabled on build, disable them by default for now. 2026-05-29 00:37:13 +02:00
Luke Street c3c8d459e8 Revert "Fixed being unable to break through the water surface with the moonju…"
This reverts commit 477192f3c2.
2026-05-28 09:29:23 -06:00
Giorgio Mendieta 21e0491d43 Preview texture replacements without the menu obstructing the view (#1599)
* feat: Change texture replacement from config_bool_select to graphics_tuner_control

* fix: add kTextureReplacementHelpText

* fix: remove unused header
2026-05-28 00:28:20 -06:00
Olivia!! 62c19c0f64 Adds a new cheat that let you transform from the start of the game. (#1241)
* Adds a new cheat that let you transform from the start of the game.

* Preserves transformation when passing loadzones similar to having shadow crystal

* standards compliance

* code compliance with decomp
2026-05-28 00:25:45 -06:00
Flash Computer 477192f3c2 Fixed being unable to break through the water surface with the moonjump cheat (#1320)
* Speed Vector for Link and Epona added to the Player Info debug ImGUI window for debugging.

* Fix being unable to moonjump through water surface

* Revert "Speed Vector for Link and Epona added to the Player Info debug ImGUI window for debugging."

This reverts commit d87cad3b37.
2026-05-28 00:16:50 -06:00
Ash 71961dae85 feat: Make gamepad status lighting optional (#1705)
* feat: Status Lighting option

* wip: rename to "Enable Controller LED"

* wip: setting for all four ports individually

* wip: fix detection + code cleanup

* wip: increase led speed for dusk preset

* wip: use aurora API

* bump aurora to 2b07d55

* wip: remove isSupported + fix namespace comment

* wip: add value override to BoolButton

* Style nit & remove unused

* Undo change

---------

Co-authored-by: Luke Street <luke@street.dev>
2026-05-28 00:04:23 -06:00
Jairinho 6592d95199 Allow independent X and Y sensitivity for free camera (#1431)
Co-authored-by: Luke Street <luke@street.dev>
2026-05-27 23:53:14 -06:00
JaxonKEKW c10e41f02e Scale Memory Card at Widescreen, fix Name Select screen (#1828)
* Improve Widescreen/Ultrawide Collection/File Select Menus

Re-scale (unstretch) and center elements of the Collection Screen/File Select details screen for Widescreen/Ultrawide

* Fix oversight

Fix default behavior

* Support ultrawide on Collection menu, target PC

support ultrawide instead of reverting to default behavior

wrap logic in target PC ifdefs (both changed functions themselves are still behind them as a whole as well) and use old function behavior otherwise

* Fix icon overshift at ultrawide

Icon shifted too much at ultrawide

Move redundant duplicate line

* Finished Collection/File Select screen changes

Added settings for the scaling mode (GameCube, Wii, Dusklight)

Depending on the setting in the Interface menu (Dusklight preset automatically sets scaling to Dusklight option, Classic preset sets to Gamecube, Wii/all old behavior available as well) Collection and File Select screens get scaled differently

Fixed backdrop behind slots on File Select with Dusklight setting (the Magic Armor background slot seeming too low on all aspects is vanilla behavior)

Fixed Fused Shadow/Mirror size and position with Dusklight setting

All logic is behind TARGET_PC gates (not the logic specifically, but the functions themselves have always been)

Changes  dSelect_cursor_c::refreshAspectScale to take a parameter so the scale of the selection cursor can be reset to default (only ever called in TARGET_PC functions or wrapped in gates)

* Ultrawide oversight

* Update d_file_select.cpp

copy paste oopsie

* Update d_file_select.cpp

im tired, never tested msvc

* Menu Scaling Mode

changed definitions to be more open ended

header additions now in TARGET_PC ifdefs

fixed/added scaling for Save/Option buttons in Collection menu with Dusklight setting, stopped scaling just the text

* Update settings.cpp

* Scale Memory Card screen, fix GC name screen

Scales the Memory Card screen (text only) on Wii and Dusklight scaling settings, GC already keeps default scaling

Fixes oversight on Name selection screen on GC settings (all textboxes/letters were getting scaled down)

* deleted line oopsie

* cleaning

* fix stupid

Moved cachedPanes to each 'wide' function because they're static and only being used there anyway
2026-05-27 23:52:31 -06:00
Pieter-Jan Briers e70fef0650 SafeStringCopy log fix (#1858)
* Fix logging on SafeStringCopy overflow failure

* Fix CRASH() macro to not take varargs

Didn't work, probably a remnant of a different iteration I made.

* Fix ValidateChannel CRASH call

---------

Co-authored-by: Luke Street <luke@street.dev>
2026-05-27 23:49:54 -06:00
Olivia!! 42d9dd23c0 Add option for inverting Direct Select (#1841)
Adds a new subheading under Input for gameplay-related settings.
It's at the bottom because players probably will want to configure their camera
more than they care about ornery gameplay details.

The one and only toggle there right now is to invert the function of the L-trigger
on the Item Wheel. It renders the on-screen text properly if inverted too,
meaning with it on the game does tell you that holding L will rotate
and moving the stick without holding L will direct select.
2026-05-27 23:35:29 -06:00
Pieter-Jan Briers 5d68762590 Add a *ton* of const and constexpr around the codebase. (#1864)
* Add a *ton* of const and constexpr around the codebase.

This makes the codebase compile without strings being cast to non-const char*. I also went through and added constexpr where appropriate for tons of static data.

* Make process definitions const too

Might as well
2026-05-27 23:12:16 -06:00
SuperDude88 a9c8f44a86 Set daObjAvalanche_c Matrix Properly
- Set the matrix properly instead of multiplying based on the previous one

Fixes an issue where the snow would not fall when bonking if you had bloom disabled
2026-05-27 19:36:19 -04:00
PJB3005 af6ca3c80c Merge remote-tracking branch 'upstream/main' into mods 2026-05-28 00:41:11 +02:00
PJB3005 9973a28154 EntryNum assignment for new aurora API changes 2026-05-28 00:40:05 +02:00
PJB3005 358d218e8f Fix Windows Unicode paths in disk mods
oops
2026-05-28 00:17:25 +02:00
Luke Street a85f8c203d Better config saving handling (#1846) 2026-05-26 20:42:26 -06:00
Luke Street dc0c868bc1 Crash handler: Properly map stack frames from modules; fix build IDs (#1848) 2026-05-26 20:42:11 -06:00
Irastris 2afc52772c Suppress Textinput line break events on BaseStringButton (#1833)
* Suppress Textinput line break events on BaseStringButton

* Oops, removed a comment
2026-05-26 20:39:07 -06:00
doop 0dc475108b Ensure dMdl_c packet is in drawlist for interp (#1818)
Fixes #1010.
2026-05-26 11:39:40 -04:00
Olivia!! f03bd71612 store config to disk when destroying ui (#1791) 2026-05-24 22:20:32 -06:00
Luke Street 2e1cc7cb26 Save config when hiding controller config window 2026-05-24 22:17:24 -06:00
SuperDude88 498868c17d Invert Air/Swim Axes (#1155)
* Invert Air/Swim Axes

Apparently this is a setting in TPHD, so for parity's sake I'll throw it in here

* Invert Air Controls

Thanks @Abzol for knowing exactly where this is
2026-05-24 22:12:36 -06:00
Loïs 2a3bc722d9 Add in-process crash handler with symbolizable backtrace (#1536) 2026-05-24 22:11:45 -06:00
Ash 326ef70afa feat: more info in player info window (#1641)
* wip: more info in player info window

* wip: 3d speed + vel vec + ui change

* wip: add epona velocity vec

* wip: remove dead code + add format indexing
2026-05-24 22:08:37 -06:00
Luke Street a8a2f5c84c Disable OSReport in release builds 2026-05-24 17:44:43 -06:00
Luke Street 1f1f7e324b Use absl::flat_hash_map in frame_interpolation 2026-05-24 17:43:51 -06:00
Ash 0692fa5423 wip: load other shared library formats (#1790) 2026-05-24 15:23:38 -06:00
Luke Street c207150ae9 Fix achievement logic startup crash 2026-05-24 13:00:41 -06:00
Irastris 78e1a05aef Various mirror mode fixes (#1725)
* Fix mirror mode stage map scrolling

* Fix Link's arrow rotation on fullscreen map

* Fix fishing in mirror mode

* Fix cucco controls in mirror mode

* Only stick_x is necessary

---------

Co-authored-by: TakaRikka <38417346+TakaRikka@users.noreply.github.com>
Co-authored-by: Luke Street <luke@street.dev>
2026-05-24 12:31:04 -06:00
qwertyquerty 8668474a33 Achievements improvements v2 (#1553)
* make LJA achievement more attainable glitchlessly

* update loach achievement description

* 3 kill rollstab achievement

* update gone fishin description

* gorge skip achievement

* early city achievement

* make goats and snowboarding safety check stage

* fix indomitable requirement, add hero mode achievement

* properly check skybook completion when returned

* prototype ganondorf achievement

* Autospin Annihilation
2026-05-24 12:18:07 -06:00
Pieter-Jan Briers a6376368ee String safety (#1548)
* Array size UB fixes

* Fix ShieldD

* Remove (almost) all unsafe strcpy calls

Bunch of macros. C arrays are easy enough and just need a different call. For various cases where a char* is passed around bare, I've made a TEXT_SPAN macro that can store a length too for bounds checking.

* Move crash handling in safe string operations to separate TU

* strcat safe version

* sprintf made safe too

* Fix compile
2026-05-24 10:43:00 -06:00