Compare commits

...

851 Commits

Author SHA1 Message Date
madeline 99ea28e9f7 maybe fix ook crash 2026-05-20 14:33:48 -07:00
Giorgio Mendieta 31dd069879 docs: Improve building.md file (#1530)
* docs: Improve building.md file

- Fix broken XCode link
- Add MacOS running instructions
- Alphabetize linux packages

* fix: collapse packages sections for readability

* fix: collapse packages sections for readability

* fix: add --dvd flag to specify iso path

* fix: Remove incorrect info about game.iso
2026-05-17 07:51:38 -06:00
SrBananaMan a499877c37 Add an enable texture replacements option in the video tab (#1517)
Co-authored-by: Luke Street <luke@street.dev>
2026-05-17 07:51:15 -06:00
Olivia!! b91a58feab Adds option to unbind using controller only (#1212)
* Adds option to unbind using controller only

* Adds a new cheat to let you transform from the start of the game, without Midna or the Shadow Crystal

* Revert "Adds a new cheat to let you transform from the start of the game, without Midna or the Shadow Crystal"

This reverts commit 51ed736729.

* Do not allow unbinding the A or B buttons to prevent softlocks when no other input sources are available (e.g. playing on a TV)

* change 'and' to '&&' in accordance with code standards
2026-05-17 07:45:08 -06:00
doop c710ea5b38 Use 10% steps for bloom brightness setting (#1423) 2026-05-17 07:44:29 -06:00
Olivia!! cd4b29f8a1 Update controller bindings menu. (#1461)
* Add a button to reset to default controls, and hides the digital L and R binds except on advanced menu.

* Rename Controller mentions to Device + Extra menu sounds

* Shouldn't add a column here

* Changes mentions of controller to device in accordance with #1479

---------

Co-authored-by: MelonSpeedruns <melonspeedruns@stratobox.net>
2026-05-17 07:38:24 -06:00
Loïs 6faa4a3330 Fix mButtonText buffer overflow on long localized action labels (#1491) 2026-05-17 07:34:18 -06:00
Luke Street eed81e9ecc Update aurora 2026-05-17 09:33:26 -04:00
Loïs a773e5489e Fix unresponsive R trigger in dusklight menu (#1424) 2026-05-17 07:27:27 -06:00
Krutonium db6a1835d2 Flake: Update GitHub revision and hash for aurora-src (#1237)
* Flake: Update GitHub revision and hash for aurora-src

Fixes Build Error due to Aurora being out of date in the flake.

* No Required Aurora Hash
2026-05-17 07:26:50 -06:00
David Kanevskyy e10e1f74d5 Feature - remember window position (#1238)
* added .zed/ to gitignore (editor configs)

* remember window position upon closing

* Save window location on SDL_EVENT_WINDOW_MOVED or SDL_EVENT_WINDOW_RESIZED

* Fix code format mistakes

* Also persist window width/height

* Undo change to input::handle_event

* Undo aurora submodule change

---------

Co-authored-by: Luke Street <luke@street.dev>
2026-05-17 07:25:12 -06:00
TakaRikka ff3eb9aa48 Merge pull request #1511 from SailorSnoW/fix/ook-consistency
Fix Ook first jump not matching console behavior
2026-05-16 17:55:41 -07:00
TakaRikka 513fdd2312 Merge pull request #1502 from SailorSnoW/fix/autostart-run
Fix LiveSplit not starting when TV settings screen is skipped
2026-05-16 17:52:25 -07:00
TakaRikka f33c3bdf72 Merge pull request #1380 from TwilitRealm/fast-boots-backwalk-anim-fix
Fix Backwalk Animation Speed with Fast Iron Boots
2026-05-16 17:48:50 -07:00
TakaRikka e08b427650 Merge branch 'main' into fast-boots-backwalk-anim-fix 2026-05-16 17:43:31 -07:00
SailorSnoW 9f0fa12c6e Fix Ook first jump not matching console behavior 2026-05-17 02:12:14 +02:00
SailorSnoW ad4f75bbb6 Fix LiveSplit not starting when TV settings screen is skipped 2026-05-16 19:13:07 +02:00
Loïs 5d2811955c Fix item wheel background capturing interpolated frame instead of current sim (#1447) 2026-05-16 08:19:57 -04:00
Pieter-Jan Briers 3b30c09e79 Fix PAL name keyboard (#1467)
Fixes #1460
2026-05-16 08:15:27 -04:00
MelonSpeedruns 8adc40708e Infinite Rupee now set to max Rupees (#1417)
Co-authored-by: MelonSpeedruns <melonspeedruns@stratobox.net>
2026-05-16 10:28:45 +02:00
SuperDude88 2541c3f293 Update Description (#1439)
Mention that it applies to other cases besides just boots
2026-05-16 10:28:21 +02:00
Loïs 30b003c9d9 fix rein interpolation jitter by rolling snapshot once per sim tick (#1421) 2026-05-15 17:16:36 -04:00
SuperDude88 c77ed40208 Fix Backwalk Animation Speed
Also make one of the other similar checks more concise
2026-05-15 01:52:53 -04:00
Luke Street af8300a77c Update aurora 2026-05-14 23:22:08 -06:00
SuperDude88 1ce1003e1a Bold Back Button Name in Popup (#1376)
* Bold Back Button Name

Makes it stand out more, especially when the back button is called something else that's just a common word

* Just b

---------

Co-authored-by: Luke Street <luke@street.dev>
2026-05-14 23:21:01 -06:00
Loïs 10e2181692 Fix file select softlock when resetting during save (#1293) 2026-05-14 23:17:17 -06:00
Miguel 424d1d7b71 Fixed Debug target not compiling (#1157)
* Update f_op_actor_mng.h

* Update f_op_actor_mng.h
2026-05-14 23:10:09 -06:00
matthewdavidrichardanderson 26be454999 soft reset hotkey on release (#1358)
Co-authored-by: matthewdavidrichardanderson <matthewdavidrichardanderson@mfb.com>
2026-05-14 23:05:08 -06:00
Pieter-Jan Briers cf89da811a Fix fast tears going out of bounds (#1337)
Incorrect decomp from TPHD making the tears think you're always in the Zora River ride

Fixes https://github.com/TwilitRealm/dusklight/issues/1047
2026-05-14 23:04:36 -06:00
tomlube f02c7bd1ac modify gx init fail text (#1332) 2026-05-14 23:04:13 -06:00
Pieter-Jan Briers 53abb8b96d Use safe string copies in d_save.cpp (#1232)
* Use safe string copies in d_save.cpp

Seeing sentry crashes here that I suspect involve buffer overflows here.
2026-05-14 23:03:42 -06:00
Loïs 6a27fa23c8 Fix game mode on MacOS <26 (#1362) 2026-05-14 22:56:28 -06:00
Luke Street 025a425884 Use -fsigned-char on ARM 2026-05-14 22:54:55 -06:00
Irastris 5064385c8c Add styling for <b> tags (#1349) 2026-05-15 03:12:36 +02:00
Luke Street e52d9e9b71 Fix mDoLib_project with safe area 2026-05-14 17:06:58 -06:00
qwertyquerty 3520bb746c better completionist achievement requirements for skybook (#1258) 2026-05-14 22:56:15 +02:00
Irastris 1e10d95936 Disable scrolling the name cursor (#1243) 2026-05-14 22:53:34 +02:00
Loïs a923aa24e1 Fix Rollgoal completion reward to scale with Bigger Wallets (#1296) 2026-05-14 22:45:27 +02:00
tomlube 9c4f61678e update instructions (#1329)
better OS interoperability with iloader and imo much easier to set up too
2026-05-14 22:43:46 +02:00
MelonSpeedruns 7967ee1f66 Fix Autosaves resetting memory card during minigames (#1318)
* Fix autosaves resetting memory card during minigames

* Update description

* remove unused include

---------

Co-authored-by: MelonSpeedruns <melonspeedruns@stratobox.net>
2026-05-14 22:42:39 +02:00
Loïs 2bdc7b6c09 use bit-stable lerp form in frame_interpolation (#1326) 2026-05-14 15:05:54 -04:00
tomlube 232f73365c rebrand fix (#1290) 2026-05-14 16:31:37 +02:00
TakaRikka a913f1699f Merge pull request #1252 from TwilitRealm/erd
clear e_rd static boss ptr on delete
2026-05-13 19:31:35 -07:00
TakaRikka 01b4eaa2fa clear e_rd static boss ptr on delete 2026-05-13 19:27:39 -07:00
SuperDude88 9d2ba3eb49 Rename Settings Preset (#1233)
To match the bloom preset, since that name was updated in #1211
2026-05-13 20:26:30 -04:00
JaxonWasTaken 6026b4bb9b Apply rebrand to bloom setting value name (#1211)
The display name for BloomSetting::Dusk was unchanged in the rebranding
process, and still shows up as "Dusk" in the settings menu. Rename it to
"Dusklight" to bring it in line with the rebrand.
2026-05-13 16:34:14 -04:00
Luke Street 7a77d48954 Use legacy path if migration fails 2026-05-13 09:08:41 -06:00
qwertyquerty 4ee0d8ed4b 1.1.1 fixes (#1168)
* fix keyboard npe

* fix autosave NPE

* hintTalkEvCamera UB

* fix UB in f_pc_base logging

* fix NPE in karg carry logic

* fix link model dangling pointers

* exponential audio slider and better audio default

* fix speedrun mode defaullt layer restore issue
2026-05-13 08:56:16 -06:00
qwertyquerty ce554a107d speedrun mode hotfixes (#1160) 2026-05-13 01:10:25 -06:00
Luke Street 9ce1ab7d5a Migrate only user files 2026-05-13 00:47:29 -06:00
Luke Street 8830760d34 BUILD_SHARED_LIBS=OFF for Android 2026-05-12 23:04:13 -06:00
SuperDude88 9abe89f47f Oops (#1156)
Forgot one
2026-05-12 22:57:42 -06:00
Loïs 3e62c1e96e Add Invincible Enemies cheat (#1123) 2026-05-12 22:52:35 -06:00
Irastris d9bbea300d Add map loader to RmlUi (#1147)
* Add Warp to RmlUi

* Remove ImGui map loader
2026-05-12 22:52:02 -06:00
Luke Street 1a951511be Merge pull request #1153 from TwilitRealm/slingshot-ammo-cheat
Infinite Slingshot Seeds
2026-05-12 22:51:23 -06:00
Luke Street ab0efb7a3b CI fixes and enable mobile THP support 2026-05-12 22:33:12 -06:00
Luke Street 5fdc3c7a54 Merge pull request #875 from Krutonium/flake-desktop-icon 2026-05-12 22:10:53 -06:00
SuperDude88 2978ae145d Infinite Slingshot Seeds 2026-05-13 00:04:58 -04:00
Krutonium e93773757f Edit CMakeLists to add Nix Version 2026-05-12 23:35:54 -04:00
Krutonium 6be742b15f Merge branch 'main' into flake-desktop-icon 2026-05-12 23:34:10 -04:00
Luke Street 861efaa053 Update aurora 2026-05-12 20:33:01 -06:00
qwertyquerty 8e41e0195e Merge pull request #1142 from SailorSnoW/fix/lja-achievement-bugfix
Fix LJA achievement triggering from cutscene teleport
2026-05-12 19:00:51 -07:00
qwertyquerty e9359a92d7 Merge branch 'main' into fix/lja-achievement-bugfix 2026-05-12 19:00:08 -07:00
SailorSnoW 0c78376ba8 Fix LJA achievement triggering from cutscene teleport 2026-05-13 03:40:38 +02:00
Loïs 8c001f7968 Add Nix devshell for Linux and macOS development (#1044)
- Restructure flake to expose `devShells.<system>.default` across
  x86_64-linux, aarch64-linux, x86_64-darwin, and aarch64-darwin via
  `nixpkgs.lib.genAttrs`. The existing `packages.x86_64-linux.default`
  build is preserved (still tied to the linux-x86_64 dawn/nod prebuilts).
- Linux devshell (`mkShell`): gcc + clang/lld, cmake, ninja, pkg-config,
  python3 + markupsafe, rustc/cargo, sccache, plus the system libs
  mirrored from the Ubuntu apt list in .github/workflows/build.yml
  (X11/Wayland, Vulkan, GL, ALSA/PulseAudio/PipeWire, GTK3, freetype,
  zstd, ...).
- macOS devshell (`mkShellNoCC`): cmake, ninja, python3 + markupsafe,
  rustc/cargo, sccache. No cc-wrapper so CMake picks up Apple Clang and
  the Xcode SDK directly, matching the build-apple CI job.
- Ignore `.direnv/` and `.envrc` so local direnv state stays out of git.
2026-05-12 19:37:31 -06:00
gymnast86 ef43b94370 Add options for binding custom buttons to specific actions (#1141)
* custom action framework and first person custom action

* add bind for midna call

* custom binding for opening dusklight menu

* turbo speed button action

* text descriptions

* fix not stopping default GC controller menu combo

* more explanation text

* block bind actions when in the dusklight menu
2026-05-12 19:36:07 -06:00
Pieter-Jan Briers 76efa02beb Allow written files to be read by other applications (#1092)
* Allow written files to be read by other applications

Intended for the log file mainly. Hopefully fixes https://github.com/TwilitRealm/dusk/issues/966?

* Consistency
2026-05-12 19:23:49 -06:00
MelonSpeedruns aeeb1ccdd2 Auto Save Protection (#1102)
* Auto Save Protection

* added line behind target_pc define

---------

Co-authored-by: MelonSpeedruns <melonspeedruns@stratobox.net>
Co-authored-by: TakaRikka <38417346+TakaRikka@users.noreply.github.com>
2026-05-12 19:23:28 -06:00
SuperDude88 93c7d0d64d Only Flip Stick Axes (#1132)
Some people asked about this, I think I've come around to their position (follow-up to #870 ).

I checked what TPHD does and its invert setting only changes the sticks
2026-05-12 19:21:28 -06:00
qwertyquerty 1b76b2650c input viewer options in rmlui and reset key option (#1136)
* input viewer options in rmlui

* reset key
2026-05-12 19:18:00 -06:00
Pieter-Jan Briers 45196886b0 Trim trailing newlines off OSReport (#1127) 2026-05-12 19:16:49 -06:00
Pieter-Jan Briers 80af15c95b Log build info on startup (#1117)
Co-authored-by: Luke Street <luke@street.dev>
2026-05-12 19:16:37 -06:00
Sulfrix 4c5e3b933e set sdl app metadata when initializing audio (#1137)
* set sdl app metadata when initializing audio

* move metadata to main
2026-05-12 19:15:33 -06:00
SuperDude88 5eddcb9653 Discord RPC Toggle (#1120)
* Discord RPC Toggle

* I learned my lesson (Formatting)

Took me long enough

* Fix Mobile Platforms

- ifdef the setting so it builds properly on platforms that don't have rpc
- More formatting I missed
2026-05-12 19:14:44 -06:00
tomlube 6dd50c955c fix minor typo (#1134) 2026-05-13 01:21:45 +02:00
TakaRikka 4db65b9845 Merge pull request #1071 from TwilitRealm/better-speedrun-mode
improved speedrun mode
2026-05-12 15:11:24 -07:00
madeline ede6827369 Merge branch 'main' of https://github.com/TakaRikka/dusk into better-speedrun-mode 2026-05-12 14:15:05 -07:00
Luke Street 2c9b20841d Update aurora 2026-05-12 14:00:38 -06:00
Luke Street 2b9ed729a3 Fix file logging on Android 2026-05-12 14:00:38 -06:00
Luke Street f39195c5e0 Fix duplicate "Pause on Focus Lost" option 2026-05-12 14:00:38 -06:00
Luke Street a0f42c0c80 Incorporate SDL_GameControllerDB 2026-05-12 14:00:38 -06:00
Joey Cato d1e9d5af2f Add Fast Roll cheat (#929)
* Add roll fast cheat

* Corrected case on cheat name

* Addressed PR feedback

* Fixed whitespace

* Renamed cheat to be more consistent with other options
2026-05-12 15:56:54 -04:00
Rib 61b2e6ce4d Allow menu navigation via D-Pad (#814) 2026-05-12 11:48:14 -04:00
BoLThompson e73244bca5 add deltatime to darkworld blur size oscillation (#957)
* add deltatime to darkworld blur size oscillation

* updated bloom oscillation to use game_clock
2026-05-12 11:47:14 -04:00
Nathan Mena a4f25ecb28 Fix map offset when toggling mirror mode (#938)
Co-authored-by: Nathan Mena <natemena153+git@gmail.com>
2026-05-12 14:12:38 +02:00
Flash Computer 39b546b81f Don't slow down underwater rolling if the fastIronBoots cheat is on. (#1085)
* Don't slow down underwater rolling if the fastIronBoots cheat is on.

* Removed the comment
2026-05-12 14:11:59 +02:00
madeline 1bd4585994 fix indent 2026-05-11 22:23:31 -07:00
madeline c896bb39ea improved speedrun mode 2026-05-11 22:20:53 -07:00
doop 3366613354 Pillarbox widezoom cutscenes instead of cropping (#1054)
Fixes #777.
2026-05-11 22:59:17 -06:00
Luke Street 79b1f4ab4d Customizable data directory & migration (#1059)
* Customizable data directory & migration

* Add file/dir rename fast-path

* Write data_location.json to base path on Windows; fix UTF-8 custom paths

* Build fix

* Another build fix

* Android data directory selection

* Fix CMake target ref
2026-05-11 22:57:59 -06:00
Irastris 157f4f9df2 Rebrand (#1064)
* Rebrand

* Revert Info.plist.in

* Think, Mark!
2026-05-11 22:06:58 -06:00
SuperDude88 9d5d8dd13a Fix Prelaunch Break-Out With Controller Config (#950)
* Fix Prelaunch Break-Out With Controller Config

Fixes #945

* Formatting
2026-05-11 21:49:24 -06:00
Krutonium b0f1fbee1c Fix Overflow/Off-by-one. Fixes #1036 and #1012 (#1042)
* Fix Overflow/Off-by-one. Fixes #1036 and #1012

* Guard behind TARGET_PC
2026-05-12 01:16:33 +02:00
Howard Luck 40e3f7d057 freedom units (#948) 2026-05-11 12:23:04 +02:00
Luke Street 764fc0b96f Fix "Pause on Focus Lost" preventing startup 2026-05-10 22:29:34 -06:00
SuperDude88 1b4a842eec Invert First Person Aiming (#870)
- Inverts first person aiming on either axis, for both stick and gyro controls

Could be separated from gyro if desirable, but I think it makes the most sense to have it apply to both
2026-05-10 19:00:20 -06:00
gymnast86 08c7261262 fix going into first person with orbital cam (#923) 2026-05-10 19:00:09 -06:00
Luke Street 07b440a1c9 Update aurora 2026-05-10 18:42:31 -06:00
SuperDude88 e7ab978a30 Crash Reporting Popup (#879)
* Initial Draft

- Add draft crash report window on startup

If you want to disable them before/during startup, there is a command line option to force it

* Fixes

- Update language to be more precise, consistent with settings menu
- Actually shut down reporting properly if you disable it
- Fix my silly syntax errors

* Update text & use Sentry consent

---------

Co-authored-by: Luke Street <luke@street.dev>
2026-05-10 18:37:22 -06:00
qwertyquerty 3a02e129e7 Fix keyboard not binding maybe (idk i cant repro) (#901)
* fixkb

* restore comment
2026-05-10 17:35:29 -06:00
qwertyquerty 93c6106770 cherry pick actor spawner (#920) 2026-05-10 17:30:39 -06:00
Luke Street b08d994e32 Update aurora 2026-05-10 17:27:30 -06:00
Luke Street 0665a78c84 Update CMakePresets.json 2026-05-10 13:35:58 -06:00
Luke Street 4db8b51f24 Disable Sentry on Android 2026-05-10 13:22:26 -06:00
Luke Street 800da8dbff Update aurora 2026-05-10 12:48:49 -06:00
Krutonium d6cbc9b6d5 Set Version String to be NixOS-<short git hash> OR dirty 2026-05-10 14:21:03 -04:00
Luke Street a0ecdb1735 Re-enable Sentry for release builds 2026-05-10 12:10:32 -06:00
Krutonium b10211c4c2 Add Desktop Icon 2026-05-10 13:25:43 -04:00
Luke Street c948bffd32 Update aurora 2026-05-10 10:55:30 -06:00
Luke Street 4bcf4ca354 Improve build-appimage.sh 2026-05-10 10:54:43 -06:00
Krutonium bfd9917ca1 Fix Flake to Build Successfully (#791)
* Fix Flake to Build Successfully

* Fix typo; Res Folder is now correctly placed
2026-05-10 10:53:07 -06:00
Pieter-Jan Briers 7f6212f9b7 Add some basic code conventions to the README (#831) 2026-05-10 10:52:47 -06:00
Irastris 80245387f3 Update README & fallback ImGui error message (#857) 2026-05-10 10:52:34 -06:00
Markos Theocharis 0a1fea4bc7 Add LSSupportsGameMode to enable game mode (#859) 2026-05-10 10:51:45 -06:00
project516 4ec7b01213 update github actions in ci (#852) 2026-05-10 10:39:55 -06:00
Luke Street 5187fe90c3 Seed initial pipeline cache through SDL IO & UTF8 path fixes 2026-05-10 10:39:11 -06:00
Pieter-Jan Briers a86fa9c162 State share Unicode fix (#834) 2026-05-10 10:35:11 -06:00
MelonSpeedruns 4ec8c1aaee Fix recording mode muting music until next reboot (#832)
Co-authored-by: MelonSpeedruns <melonspeedruns@stratobox.net>
2026-05-10 17:32:55 +02:00
Luke Street 97d032f8b5 Add Android CI 2026-05-10 00:51:34 -06:00
Luke Street 286532904a Update aurora 2026-05-10 00:31:49 -06:00
Luke Street 04b5861f29 Update CI (again x2) 2026-05-10 00:12:11 -06:00
Luke Street 453e958068 Update CI (again) 2026-05-10 00:11:05 -06:00
Luke Street e7d2fbcc0b Update CI 2026-05-10 00:08:42 -06:00
Krutonium 8f71c70d14 fix io.hpp to enable compiling on GCC15 (#790) 2026-05-09 23:41:15 -06:00
Luke Street df23edcb69 Add iOS UIFileSharingEnabled integration 2026-05-09 21:42:43 -06:00
Luke Street daff157027 Fix change notifications in Android DocumentsProvider 2026-05-09 21:42:32 -06:00
Luke Street 0c23bd4332 Add "Open Data Folder" to Interface menu 2026-05-09 20:57:34 -06:00
Luke Street 7562486449 Log disc verification status 2026-05-09 20:40:59 -06:00
Luke Street 5e08b810fc Update aurora 2026-05-09 20:26:37 -06:00
Pieter-Jan Briers c66cccf660 Fix handling of Unicode paths on Windows (#767)
I love C++
2026-05-09 20:24:50 -06:00
Luke Street 3b1118229b Add Android DocumentsProvider 2026-05-09 20:23:11 -06:00
TakaRikka 491da372a1 Merge pull request #764 from TwilitRealm/gyro-axis-fix
Fix Gyro Sensitivity Axes
2026-05-09 17:47:59 -07:00
SuperDude88 a2f463d146 Fix Gyro Sensitivity Axes
Fixes #759
2026-05-09 20:15:33 -04:00
TakaRikka 63b3ce4849 temp fix for speedrun timer controls 2026-05-09 15:16:54 -07:00
MelonSpeedruns 8280ac00a0 Always disable cursor if Gyro is set to Mouse mode and the menu is not open (#736)
Co-authored-by: MelonSpeedruns <melonspeedruns@stratobox.net>
2026-05-09 15:06:58 -06:00
Luke Street 45ef0d72b1 Fix Android backgrounding & re-hide bars after swipe 2026-05-09 15:03:21 -06:00
SuperDude88 ad9c460ec9 Navigate Carousel Without Focus (#741)
* Navigate Carousel Without Focus

- Allow left/right inputs to change the setting value without having the arrow explicitly clicked

* Formatting
2026-05-09 14:23:59 -06:00
Phillip Stephens 23dc9bc39a Disable setting default mappings for now (#742) 2026-05-09 14:14:45 -06:00
SuperDude88 bf23d44389 Fix Syntax Warning (#743)
- Remove invalid property value
2026-05-09 14:14:36 -06:00
SuperDude88 d0b9b6d10f Fix Prelaunch Break-out (#738)
- Prevent users from breaking out of the prelaunch menu through the GraphicsTuner pages
2026-05-09 13:37:14 -06:00
Luke Street 2f83753260 Fix Android release gradle build 2026-05-09 10:13:59 -06:00
Luke Street eeb0ad77a4 Missed a spot 2026-05-09 10:03:05 -06:00
Luke Street 594cadcf7d Update Android app ID to dev.twilitrealm.dusk 2026-05-09 09:55:26 -06:00
TakaRikka 4290726691 update setup instructions 2026-05-09 07:38:19 -07:00
TakaRikka 80dd5ff278 revert mirror mode message override for now 2026-05-09 07:32:29 -07:00
TakaRikka 08efb9a3cf Merge pull request #735 from TwilitRealm/mute-streams
Recording Mode - Mute streams & Fix 1 note playing
2026-05-09 06:38:33 -07:00
MelonSpeedruns d8a1dd1da4 Recording Mode - Mute streams & Fix 1 note playing 2026-05-09 09:15:10 -04:00
SuperDude88 13dd3c3932 Clamp LOD For Cutscene Midna (#728)
- Sets max eye LOD level to 0 for `demo00_Midna_cut00_FC_tongue` and `demo00_Midna_cut00_BD_tmp`
2026-05-09 06:30:46 -06:00
TakaRikka dd7885da9c Merge pull request #734 from TwilitRealm/number-button-fix
Number Button Fix
2026-05-09 04:40:55 -07:00
TakaRikka 5a05433a2b Merge pull request #733 from TwilitRealm/fix/e_s1_e_yg
Frame interp: Fix e_s1 & e_yg
2026-05-09 04:35:25 -07:00
TakaRikka c3ff3884d7 Merge pull request #730 from TwilitRealm/fix/fchain
Frame interp: Fix obj_fchain
2026-05-09 04:34:34 -07:00
SuperDude88 e42c4d3174 Number Button Fix
- Add `is_editing` helper to BaseStringButton
- Block left/right input from changing number while typing

Resolves #706
2026-05-08 23:19:48 -04:00
Pheenoh 06c77a6818 frame interp: e_s1 & e_yg 2026-05-08 21:16:57 -06:00
Pheenoh 4d4a80891f frame interp: fix obj_fchain 2026-05-08 20:21:37 -06:00
doop 71c892368d Use float vertex positions for trim (#729)
Fixes #726 and looks much smoother.
2026-05-08 21:31:46 -04:00
Irastris d2a1dda523 Add interp callbacks to the stalks of four Baba variants 2026-05-08 21:00:16 -04:00
roeming 78179eb93f comment out flags tab in editor (#727)
Co-authored-by: roeming <roeming@users.noreply.github.com>
2026-05-08 18:56:38 -06:00
Luke Street 34e10d3844 Show "3-finger tap" for menu notif on mobile 2026-05-08 17:55:39 -06:00
Howard Luck 65e8577253 frame interp: fix b&c chain links (#724) 2026-05-08 17:26:33 -06:00
Luke Street a4fcc10f5f Make version logic tolerate prerelease semver 2026-05-08 17:25:09 -06:00
Luke Street a2c2988666 Disable Sentry in CI builds 2026-05-08 17:12:58 -06:00
Irastris abec043249 Add mouse as a gyro input source (#720)
* Add mouse as a gyro input source

* Revisions

* Grammar
2026-05-08 17:11:13 -06:00
SuperDude88 699d069b0a Fix Letter Menu Page Numbers (#722)
This bug comes from `getBounds()` returning a reference to a static variable -- the compiler can load the float right away or later (after the second call), so the value it is referencing may have changed. If it waits to load the first operand, the subtraction results in 0. Further discussion at https://discord.com/channels/1446645861529550869/1446648842387722411/1502415404386091118.

Resolves #719
2026-05-08 17:10:37 -06:00
Tom Lube 4d67033ff8 Remove reset via CTRL + R 2026-05-08 17:08:03 -06:00
Irastris 84ffd67622 Refactor notification settings, allow disabling controller toasts (#721)
* Refactor notification settings, allow disabling controller toasts

* "Toasts" to "Notifications"
2026-05-08 17:01:19 -06:00
Luke Street 1c85ee63eb Many mobile fixes, Android update check, "Background Input" & "Pause On Focus Lost" options 2026-05-08 16:57:33 -06:00
qwertyquerty 81c7213993 Merge pull request #599 from TwilitRealm/50_achievements
More Achievements
2026-05-08 12:27:25 -07:00
madeline be82e606b2 45 achievements 2026-05-08 11:20:17 -07:00
MelonSpeedruns 44da1a9f7d Added sounds to Reset & Quit modals (#718)
Co-authored-by: MelonSpeedruns <melonspeedruns@stratobox.net>
2026-05-08 11:51:13 -06:00
doop d0f8ea56f9 Interpolate more things (#699)
* Interpolate trim height

* Interpolate (some) fades
2026-05-08 11:50:44 -06:00
Howard Luck e472b36cef Merge pull request #717 from TwilitRealm/fix/super_clawshot 2026-05-08 10:26:46 -06:00
MelonSpeedruns 3934e09c8f remove mention of chains not rendering 2026-05-08 12:07:00 -04:00
MelonSpeedruns 3136816ce9 Merge remote-tracking branch 'origin/main' into fix/super_clawshot 2026-05-08 12:06:47 -04:00
MelonSpeedruns 6fd3762ffc optimized code 2026-05-08 12:06:38 -04:00
Pheenoh 97a1190713 set max chain links to 600 2026-05-08 08:59:13 -06:00
MelonSpeedruns 73a3bd9ae8 super clawshot warning about chains (#716)
Co-authored-by: MelonSpeedruns <melonspeedruns@stratobox.net>
2026-05-08 08:53:01 -06:00
Luke Street fc533dbdc7 UI: Add update checks (#715) 2026-05-08 08:52:36 -06:00
madeline 6217e071d2 Merge branch '50_achievements' of https://github.com/TakaRikka/dusk into 50_achievements 2026-05-08 05:17:48 -07:00
Luke Street 673ca7f686 Update Linux icons & .desktop
Resolves #714
2026-05-08 01:23:53 -06:00
CraftyBoss 29a1cff7ea update aurora, add comment explaining king bulblin 1 strange behavior
the game saves a flag when the player hits king bulblin at least once, which makes subsequent loads (including king bulblin 2) have 1 less "health" as lap_num for the boar is set to 1 during creation, as it checks the flag.
2026-05-08 00:05:16 -07:00
Luke Street 3c5152a67b Disable autosave in speedrun mode 2026-05-08 00:46:02 -06:00
MelonSpeedruns 1c1a849095 Recording Mode & Enable Autosave in Dusk preset (#685)
* branch for recording without a HUD

* no more black bars thanks maddie

* Backslash hotkey

* mute music

* dont check for null twice

* renamed option to recording mode, and added it to the rmlui menu

* Move recording mode to Interface

* re-added & renamed minimal hud option

* Mute all BGM if recording mode is on

* Update Interface section

* Un-experimentalize Autosave & enable in Dusk preset

---------

Co-authored-by: MelonSpeedruns <melonspeedruns@stratobox.net>
Co-authored-by: Irastris <irastris15@gmail.com>
Co-authored-by: Luke Street <luke@street.dev>
2026-05-07 23:26:22 -06:00
Phillip Stephens 89d393e57a Add missing climits include 2026-05-07 22:24:31 -07:00
Phillip Stephens 2f27687d80 Fix OSReport strings corruption with non-trivial format (#709)
* Fix OSReport strings corruption with non-trivial format

* Limit format attempts to 3
2026-05-07 23:10:23 -06:00
SuperDude88 167a50c01d Deselect Sub-Menu On Focus Change (#710)
- Unselect any previous items when focusing a new one

This might be way over-inclusive so it should be scrutinized harshly (but fixes #672)
2026-05-07 23:09:25 -06:00
SuperDude88 313f03f5e5 Dim Carousel Arrows
- Dim carousel arrows if there are no further options in that direction (closes #708)

This sets the color property constantly, not sure if that is a concern for perf (would imagine not since it already sets the rml to mValueElem every frame also?)
2026-05-07 23:05:08 -06:00
Howard Luck 6cfdc3d8a3 add keyboard controls + roll support to fly cam (#705) 2026-05-07 23:04:29 -06:00
Luke Street 9c24a0bc4b Disable Development Mode & move Input Viewer
Resolves #712
2026-05-07 23:03:26 -06:00
TakaRikka b99ad920c4 Merge pull request #704 from TwilitRealm/ira/rmlui-confirmation
Add confirmations modals to Reset and Quit
2026-05-07 13:57:03 -07:00
TakaRikka 912b18eca1 Merge pull request #703 from TwilitRealm/ui/advanced-settings
Advanced Settings
2026-05-07 13:55:13 -07:00
TakaRikka 9e651a51db Merge pull request #700 from TwilitRealm/ira/rmlui-fps
Add FPS counter to RmlUi
2026-05-07 13:51:51 -07:00
TakaRikka c8b6e997a7 Merge pull request #702 from TwilitRealm/ira/rmlui-inputconfig
Add remaining controller config options to RmlUi
2026-05-07 13:45:35 -07:00
Irastris 928e187524 Add mobile layout for prelaunch 2026-05-07 15:57:52 -04:00
Irastris cf12d19860 Resolve RmlUi deprecation warning, add L1/R1 tabbing to MenuBar 2026-05-07 13:48:12 -04:00
Irastris e3a3ac56fb Add confirmations modals to Reset and Quit 2026-05-07 13:32:59 -04:00
MelonSpeedruns d15ed81cd5 Only show Editor if Advanced Settings is enabled 2026-05-07 12:39:37 -04:00
TakaRikka ff054f6f47 update aurora and enable MTX_USE_PS 2026-05-07 09:36:32 -07:00
MelonSpeedruns 667cf70fa0 Add Advanced Settings option & Disable debug hotkeys if it's off 2026-05-07 12:01:32 -04:00
Irastris 73eb401c93 Add remaining controller config options, remove ImGui config 2026-05-07 12:00:35 -04:00
Irastris b11f3add06 Don't immediately dismiss prelaunch if skip config is toggled
Prevents a situation where memcard is not init until restarting after the deferral change
2026-05-07 09:26:41 -04:00
Irastris 92f888a152 Remove blur and shadow from counter, consolidate options 2026-05-07 03:28:30 -04:00
Irastris 78ed5cc716 Add FPS counter 2026-05-07 03:13:08 -04:00
Luke Street 3968b67c5d Disc verification cleanup 2026-05-07 00:35:00 -06:00
Luke Street 119830c979 Merge pull request #695 from TwilitRealm/hash-verif
Hash verification for disc images
2026-05-06 23:41:57 -06:00
Luke Street 647394c875 Don't hash on startup & cleanup 2026-05-06 23:33:55 -06:00
Luke Street c50d777309 Progress modal & persist validation state 2026-05-06 23:21:43 -06:00
Luke Street 4954685cca Merge branch 'main' into hash-verif 2026-05-06 22:09:20 -06:00
qwertyquerty 39d43a8d8f Keyboard mouse binding controls (#682)
* kbm controls

* submodule

* files.cmake

* a

* Fixes

* include <cstring> in J3DStruct.h

---------

Co-authored-by: Luke Street <luke@street.dev>
2026-05-06 22:07:28 -06:00
TakaRikka b4761cc54e fix build 2026-05-06 20:36:21 -07:00
qwertyquerty 9aee2e9cfe PS math accuracy (#654)
* math accuracy

* submodule

* Update aurora

---------

Co-authored-by: Luke Street <luke@street.dev>
2026-05-06 21:22:59 -06:00
Luke Street 7c7c8b228e Crafty's crafty Dungeon door hack 2026-05-06 19:53:18 -06:00
doop ca7714dafd Merge pull request #697 from TwilitRealm/include-numbers
Try to fix Windows/macOS build errors
2026-05-06 21:09:53 -04:00
doop 1ad5ab8632 Try to fix Windows/macOS build errors 2026-05-07 01:02:43 +00:00
Irastris c4e7838089 Swap shield labels in RmlUi editor 2026-05-06 21:02:15 -04:00
roeming 7313712263 update area flags to precalculate correct offsets/masks (#694)
Co-authored-by: roeming <roeming@users.noreply.github.com>
2026-05-06 18:40:10 -06:00
doop aa48d95f24 Procedurally-generate HQ minimap textures (#692)
* Procedurally-generate HQ minimap textures

* Don't leak old minimap textures
2026-05-06 18:40:04 -06:00
Thomas c5baabbe9c assets: Remove objdiff screenshot (#691)
Leftover from the decomp.
2026-05-06 18:38:01 -06:00
Irastris 1d2716139f Redesign PresetWindow 2026-05-06 19:49:57 -04:00
MelonSpeedruns 742ad2c150 Increase Link's heap size for mods 2026-05-06 19:48:43 -04:00
Luke Street 18eb0692f0 UI: "No controller" & menu notifications
Resolves #629
Resolves #678
2026-05-06 17:34:08 -06:00
Irastris b5f98f69db Redesign Modal 2026-05-06 19:19:38 -04:00
Irastris 47593d0eb4 Allow hash-mismatched discs to be loaded with user confirmation 2026-05-06 19:19:38 -04:00
Irastris 4404fce369 Do hash-based verification of disc images 2026-05-06 19:19:38 -04:00
Irastris 72c20f4dd0 Add stylesheet rules 2026-05-06 19:19:38 -04:00
doop 3240885bfd Preserved doop work
* Disc verification

* Add platform and region info to known discs map

* Use array over map

* Use std::to_array
2026-05-06 19:19:38 -04:00
Luke Street 7f0955f022 Add ImGui screen for Aurora Null backend
Resolves #628
2026-05-06 16:39:28 -06:00
Luke Street c21bce0093 UI: Adjust battery icon thresholds 2026-05-06 11:49:24 -06:00
Luke Street 4e23472ed5 UI: Controller connect/disconnect toasts 2026-05-06 11:14:12 -06:00
doop cfe1f2304b Increase line-height for right pane descriptions 2026-05-06 13:15:30 +00:00
TakaRikka de6568d750 allow suns song / quick transform in ToT past 2026-05-06 04:25:42 -07:00
TakaRikka 3aafe7fa16 more mirror mode map fixes 2026-05-06 04:19:00 -07:00
Luke Street c1e65d19e7 Autosave: Rotate inner ring too 2026-05-05 23:57:20 -06:00
Luke Street 5fdf954994 Reduce autosave spinner opacity 2026-05-05 23:25:06 -06:00
Luke Street 230868af3c Add autosave spinner & make RmlUi respect 4:3
Resolves #627
2026-05-05 23:18:11 -06:00
doop 66154d9de8 Remove post-trim scissor (#684)
* Remove post-trim scissor

Fixes #679

* Add comment
2026-05-05 19:41:59 -06:00
Luke Street 93ec3c7dbd New UI: Achievement toasts (#690)
* Rename Overlay -> GraphicsTuner, Popup -> MenuBar

* Update GraphicsTuner CSS

* WIP Overlay document & toasts

* Achievement toasts

* Cleanup
2026-05-05 19:29:42 -06:00
MelonSpeedruns 945ce3e4bc Alternate RMLUI Menu Sounds (#686)
* Alternate RMLUI Menu Sounds

Those fit more the game I feel like.

* swapped tab sounds

* pressing A on tab button plays the OK sound

* Fix tab sound + Added menu sounds to prelaunch menu

* Centralize UI sound definitions

* Improvements

* Add "Play" button sound

* Use kSoundItemFocus in prelaunch

* Oops

* Update play/enable/disable sounds

---------

Co-authored-by: MelonSpeedruns <melonspeedruns@stratobox.net>
Co-authored-by: Luke Street <luke@street.dev>
2026-05-05 16:44:11 -06:00
TakaRikka 782a8573e9 Merge pull request #570 from TwilitRealm/mapmirror
fix main map for mirror mode
2026-05-05 14:22:25 -07:00
Irastris 4e0ca51159 Remove restart notice from cardFileType's rightPane 2026-05-05 17:03:04 -04:00
Irastris 3cd160e1b2 Defer mDoMemCd_ThdInit if necessary, removing restart requirement
Thanks, Melon
2026-05-05 16:56:41 -04:00
Luke Street 93a236a9d2 Prelaunch settings: actually save config 2026-05-05 14:47:53 -06:00
Irastris eaf3bc2f40 Remove skipWarningScreen config option, always skip logos 2026-05-05 16:27:41 -04:00
Luke Street 5ca0a2ba06 UI: Fix focus reconciliation for context root 2026-05-05 14:17:57 -06:00
Luke Street ccd2bdbaac Add full Settings window to prelaunch 2026-05-05 14:12:53 -06:00
Irastris 08321699cd Display the real title screen behind the prelaunch menu (#638)
* Start game execution as soon as a disk image is available

* Do not update dDemo_c if prelaunch document is visible

* Prevent intro music until prelaunch has popped

* Replace "Start Game" references with "Play"

* Make prelaunch layout respect mirror mode

* Add drop shadow to prelaunch disk-status and version-info

* Remove ImGui prelaunch

* Add "Change Disk Image" button to prelaunch options

* Actually validate discs and make prelaunch very betterer :)

* Check your build before pushing dumbass, and go to sleep

* "Disc" consistency, adjust restart notice logic

* Better LanguageSelect logic

* Add restart notice to SaveTypeSelect

* Added wind sounds to the pre-launch menu

* Add Modal document, use it for disc verification

* Consolidate Modal and PresetWindow

* Squash various bugs, rearrange document flow

* Allow Window inheritors to opt-out of being toggleable

* Tweak focus behavior/syntax

* Implement "Restart Now" option

* Tweaks

* Remove a bunch of dynamic_cast

* Update README.md

---------

Co-authored-by: Luke Street <luke@street.dev>
2026-05-05 12:18:25 -06:00
Luke Street 7300c0e0f5 Update aurora 2026-05-05 12:15:01 -06:00
Luke Street 7e562824fe Add a <br> 2026-05-05 11:30:49 -06:00
Luke Street ed8b5c96b9 Update aurora & add logo to README.md 2026-05-05 11:28:05 -06:00
TakaRikka 14bccdffa6 fix mirror map portal selection 2026-05-05 06:25:46 -07:00
TakaRikka 39e465bcab fix mirror map region selection 2026-05-05 06:22:49 -07:00
TakaRikka e53bb3a12d Merge branch 'main' of github.com:TwilitRealm/dusk into mapmirror 2026-05-05 04:59:25 -07:00
TakaRikka 50fccd393f fix mirror mode text / rodeo direction 2026-05-05 04:44:14 -07:00
TakaRikka 7993740ac8 fix kargorok mirror mode controls 2026-05-05 01:16:01 -07:00
TakaRikka 8e5bb8ae59 Merge pull request #676 from TwilitRealm/instant-text-tweaks
Instant text tweaks
2026-05-04 23:43:43 -07:00
TakaRikka 8fefdd4114 Merge pull request #669 from TwilitRealm/remove-discord-rpc
Remove discord-rpc/rapidjson; roll our own
2026-05-04 23:43:24 -07:00
gymnast86 64c8cee21b revert to checking for Hold B at the start of do_isReady 2026-05-04 23:08:01 -07:00
gymnast86 25fe686573 add message ids for not being able to buy bombs from barnes 2026-05-04 23:07:23 -07:00
Luke Street 1c1ea98fdd Update aurora 2026-05-04 23:35:21 -06:00
TakaRikka e098104f8f Merge pull request #642 from TwilitRealm/debug-fly-cam
Add fly mode option to debug cam
2026-05-04 19:25:19 -07:00
Pheenoh 3c5ade5565 don't allow activation if paused or in event 2026-05-04 20:15:02 -06:00
Pheenoh b2ad75027e Merge branch 'main' into debug-fly-cam 2026-05-04 19:26:31 -06:00
TakaRikka fdfbf83b88 Merge pull request #660 from TwilitRealm/fix/fix-ub
Fix a UB in Morpheel
2026-05-04 18:24:16 -07:00
SuperDude88 1b9ca0949e Clear Description on More Hovers (#673)
- Properly clear the previous option description when you hover over "toggle fullscreen" or "restore default window size"

Fixes #671
2026-05-04 19:17:39 -06:00
Luke Street 827037f0fa Update aurora for RmlUi base path fix 2026-05-04 18:27:50 -06:00
Luke Street d84c5790f5 NOMINMAX 2026-05-04 16:27:12 -06:00
Luke Street 49eb2282af Forgor to add 2026-05-04 16:20:30 -06:00
Luke Street 741f9ecfab Remove discord-rpc/rapidjson; roll our own 2026-05-04 16:14:57 -06:00
Luke Street 37b8122962 UI: Refactor pane control to allow hover for help text 2026-05-04 14:16:35 -06:00
doop 5f2cf68e80 Minor UI nits 2026-05-04 19:38:11 +00:00
Luke Street 74f2c58b29 UI: Preset tweaks 2026-05-04 13:08:20 -06:00
madeline 208433047a Merge branch 'main' of https://github.com/TakaRikka/dusk 2026-05-04 12:06:28 -07:00
madeline 2c01430035 fix stereo audio with mirror mode fixes #666 2026-05-04 12:06:24 -07:00
Luke Street 5121437bcf UI: Avoid looping at end of window content 2026-05-04 11:49:12 -06:00
Luke Street f61bd3e5ad UI: Reorder settings tabs 2026-05-04 11:31:09 -06:00
Luke Street 835e409b32 UI: Fix prelaunch options close anim 2026-05-04 11:27:31 -06:00
Luke Street 010bdb7e25 UI: Fix left/right nav from content to change tabs 2026-05-04 11:17:48 -06:00
Luke Street 7ba22b7714 UI: Refocus top document automatically 2026-05-04 11:14:40 -06:00
Luke Street efcb19a3d0 Revert hide change to popup menu 2026-05-04 10:49:57 -06:00
Luke Street 55455bb1b5 Adjust presets & default settings 2026-05-04 10:43:42 -06:00
qwertyquerty e49be12297 RmlUi improvements (#663)
* rmlui audio

* fix menu select sound

* Fixes #662

* fix reset logic and fix popup getting stuck closed

* fix X button on menu popup

* rmlui achievements, and fix open/close bug

* presets, achievements css, and menu sounds toggle

* forgor

* fix b button causing audio when menu not visible
2026-05-04 10:25:13 -06:00
MelonSpeedruns 75f4940f5e set field_0xbaf variable like all the other conditions 2026-05-04 11:29:29 -04:00
MelonSpeedruns 8047330952 oops i suck 2026-05-04 09:55:01 -04:00
MelonSpeedruns 9105dcb078 remove empty line 2026-05-04 09:54:24 -04:00
MelonSpeedruns b8e38e03e2 Apply PJB request 2026-05-04 09:54:00 -04:00
MelonSpeedruns 331352878e Fix a UB in morpheel 2026-05-04 08:41:19 -04:00
Luke Street 62a88f1e9a UI: Add warning icons to experimental settings 2026-05-03 23:44:38 -06:00
Luke Street 43b603e70b UI: 3-finger tap to toggle menu on mobile 2026-05-03 22:39:31 -06:00
doop 95e6ac54cf Random UI and README tweaks (#653) 2026-05-03 22:02:09 -06:00
Luke Street c4b2e2e501 Make prelaunch fade out smoother 2026-05-03 22:01:02 -06:00
Luke Street dccba23980 Update aurora 2026-05-03 20:47:14 -06:00
Luke Street bf27d10519 Revert "Convert UI fonts to WOFF2 (#647)" (#648)
This reverts commit 6c27011e32.
2026-05-03 20:41:24 -06:00
doop 6c27011e32 Convert UI fonts to WOFF2 (#647)
* Convert UI fonts to WOFF2

* ...except for the ones we use for ImGui
2026-05-03 20:36:55 -06:00
Luke Street 6220990dc5 UI: Use decorator: text for close button 2026-05-03 19:01:44 -06:00
Phillip Stephens 93e9767c9f Fix OSReport crash on linux, harden FormatToString against malformed strings (#640)
* Fix OSReport crash on linux, harden FormatToString against malformed strings

* Move size increment to after error check

* Update aurora and impl OSPanic

---------

Co-authored-by: Luke Street <luke@street.dev>
2026-05-03 18:50:49 -06:00
Luke Street c774f53dad UI: Fix L/R to switch tabs
Resolves #645
2026-05-03 18:36:06 -06:00
Luke Street 7fbfe5ad88 UI: Add close button to tab bar 2026-05-03 18:29:08 -06:00
Luke Street ef02037990 Remove ESC to exit fullscreen 2026-05-03 17:26:17 -06:00
Luke Street 23cc18ba0e UI: Press ESC to unbind a button
Resolves #562
2026-05-03 17:26:17 -06:00
Luke Street 924dbc7715 UI: Implement controller config
Resolves #622
2026-05-03 17:26:17 -06:00
TakaRikka 742f4938f2 Merge pull request #641 from TwilitRealm/fix/klift00
Frame Interp: Fix obj_klift00 chains
2026-05-03 15:32:35 -07:00
TakaRikka 02e0f586d3 Merge pull request #639 from TwilitRealm/fix/fyer_cs
Frame Interp: Fix Fyer canon repair cutscene
2026-05-03 15:31:09 -07:00
Luke Street 5717aeef85 UI: Bold modified settings values 2026-05-03 16:01:33 -06:00
Luke Street da9b99f650 Update aurora 2026-05-03 15:28:03 -06:00
Pheenoh 901ce2ee4c add debug fly cam option 2026-05-03 15:23:59 -06:00
Pheenoh dd2b993cd5 frame interp: fix obj_klift00 chains 2026-05-03 09:58:31 -06:00
Pheenoh 83577d3b82 frame interp: fix fyer canon repair cs 2026-05-03 09:20:41 -06:00
TakaRikka 1cb8b19520 Merge pull request #612 from TwilitRealm/26-05-01-gameheap-size
Increase gameHeap size by an order of magnitude
2026-05-03 00:18:37 -07:00
TakaRikka d109cd891e add note 2026-05-03 00:07:37 -07:00
doop 63c4002ca6 Fix prelaunch nav cycling 2026-05-03 05:49:53 +00:00
Lurs 6954efcd15 Should fix #636 2026-05-03 06:46:49 +02:00
Jasper St. Pierre 78c2147771 midna eye lod fix 2026-05-02 15:36:00 -07:00
Irastris c938d5468e Add Interface tab to RmlUi, remove ImGui interface menu 2026-05-02 18:16:42 -04:00
Irastris 35590c5312 Increase font size for pane text 2026-05-02 17:24:10 -04:00
Luke Street e976b10e2a UI: Avoid overlapping ImGui menu bar 2026-05-02 15:22:24 -06:00
Irastris 3949706b28 Revise gyro aim help text, remove ImGui input menu 2026-05-02 17:19:41 -04:00
Irastris ce55916845 Add Autosave to RmlUi, remove ImGui gameplay menu, formatting consistency 2026-05-02 17:01:30 -04:00
Irastris 9b252cbdd2 Remove ImGui cheats menu 2026-05-02 16:33:50 -04:00
Irastris 97fa09f6ee Add spatial sound option to RmlUi, remove ImGui audio menu 2026-05-02 16:05:57 -04:00
TakaRikka 0e7a7cccb9 Merge pull request #458 from TwilitRealm/feature/autosave
Autosave Feature
2026-05-02 13:03:29 -07:00
Irastris 1c0cdcc176 Typo 2: Electric Boogaloo 2026-05-02 15:54:42 -04:00
Irastris 280305c2ba Typo 2026-05-02 15:33:44 -04:00
Luke Street d1f1d579bc Prevent macOS crash on shutdown by tracking logging dtor (#626) 2026-05-02 13:22:28 -06:00
Irastris eeeb3ffe25 Remove ImGui graphics menu 2026-05-02 14:45:34 -04:00
Jasper St. Pierre 1ee0f862e1 map highlight fix 2026-05-02 11:45:01 -07:00
Jasper St. Pierre 6b327c9f61 disable jpa interp for now
closes #618
2026-05-02 11:44:21 -07:00
Luke Street f148e0ebc1 UI: Rework Document close handling again 2026-05-02 12:39:07 -06:00
Jasper St. Pierre 6f20f4d629 compile fix 2026-05-02 10:54:45 -07:00
Irastris 94670270d6 Fix prelaunch menu transition post-startup 2026-05-02 13:52:20 -04:00
Luke Street 8e21247a97 UI: Prelaunch fade + BG persistence 2026-05-02 11:32:59 -06:00
Luke Street aa84004cb4 Merge branch 'rmlui-integration' 2026-05-02 10:50:18 -06:00
Luke Street e1c201f4bd Make prelaunch sticky & kill ImGui prelaunch 2026-05-02 10:44:59 -06:00
MelonSpeedruns 425a1d15a0 Merge remote-tracking branch 'origin/main' into feature/autosave 2026-05-02 10:56:36 -04:00
MelonSpeedruns e3ad41792a fix respawn stageinfo when autosaving 2026-05-02 10:42:20 -04:00
MelonSpeedruns c1ba10fc8b fix mistake 2026-05-02 10:29:23 -04:00
TakaRikka 1c5686f71b Merge pull request #616 from TwilitRealm/HRTF
Emulate Surround option
2026-05-01 22:51:25 -07:00
TakaRikka b9e0f2b9ca Merge pull request #611 from TwilitRealm/26-05-01-heap-crash-log
Improve heap crash logging
2026-05-01 22:19:33 -07:00
TakaRikka ede175f141 Merge pull request #600 from TwilitRealm/fix/fix-bow-aiming
Fix bow aiming in first person
2026-05-01 22:18:14 -07:00
TakaRikka a301874e30 Merge pull request #592 from TwilitRealm/fix/free-cam-fix
Freecam Fixes
2026-05-01 22:17:21 -07:00
Irastris 9b4a9a6bd9 Initial attempt at the prelaunch document 2026-05-02 00:10:11 -04:00
Luke Street 04274b1884 Make RmlUi F1, ImGui Shift+F1 2026-05-01 21:53:48 -06:00
Luke Street ca783b8424 Merge branch 'main' into rmlui-integration
# Conflicts:
#	extern/aurora
2026-05-01 21:24:24 -06:00
Luke Street 2e4c2b5b46 UI: Add controller input 2026-05-01 21:24:12 -06:00
Luke Street 4c09d8b910 Fix restoring scroll position on pop 2026-05-01 17:40:38 -06:00
Luke Street fb1b260d09 Add Input tab to settings 2026-05-01 16:52:08 -06:00
Luke Street 98eb8f718e Add Bloom settings 2026-05-01 16:32:04 -06:00
Luke Street 68b2e0ee2d Rework Settings components 2026-05-01 16:14:20 -06:00
Luke Street 81771a0522 Editor Collection, Minigame, Config tabs 2026-05-01 14:12:12 -06:00
madeline 93c8bcc210 hrtf 2026-05-01 13:04:08 -07:00
Luke Street 176bf5f0c4 Editor inventory tab 2026-05-01 13:11:43 -06:00
Luke Street 65a5945778 Location tab in editor 2026-05-01 12:37:40 -06:00
Luke Street 8f7b9cdfdd Dual pane navigation & more player editor 2026-05-01 12:06:05 -06:00
MelonSpeedruns acecba7ff7 Reset camera zoom to 0 if freecam is enabled mid-game 2026-05-01 12:54:40 -04:00
MelonSpeedruns 507e0aadbc Merge remote-tracking branch 'origin/main' into fix/free-cam-fix 2026-05-01 12:54:12 -04:00
Jasper St. Pierre 8406d9b192 Merge pull request #613 from TwilitRealm/widescreen/wide-hidden-village
Wide Bulblin count in Hidden Village
2026-05-01 09:04:23 -07:00
Jasper St. Pierre 6f3170cb56 Merge pull request #604 from TwilitRealm/widescreen/dmap-menu
Widescreen Dungeon Map
2026-05-01 09:04:08 -07:00
Jasper St. Pierre 835582224e Merge pull request #601 from TwilitRealm/fix/fmap-widescreen
Widescreen Field Map
2026-05-01 09:04:00 -07:00
MelonSpeedruns 52879f50f0 Wide Bulblin count in Hidden Village 2026-05-01 11:47:18 -04:00
Irastris 2b505f1be4 Revise floating scrollbar margin 2026-05-01 11:19:51 -04:00
Irastris f089f9024d Centralize tab styling and other tidying 2026-05-01 11:13:14 -04:00
roeming 43fb421a93 Merge pull request #608 from TwilitRealm/location-flags-ui
Area flags UI
2026-05-01 07:26:23 -04:00
PJB3005 f06d6b50a9 Fix Plumm game score reset
Fixes #609
2026-05-01 09:27:45 +02:00
Jasper St. Pierre 2c987b0211 build fix 2026-05-01 00:17:51 -07:00
Jasper St. Pierre 3d860ad454 jpa interp start 2026-05-01 00:12:26 -07:00
Luke Street b5bf19569b Button: Selected but not active style 2026-05-01 01:01:38 -06:00
PJB3005 5a7f5cb4a7 Increase gameHeap size by an order of magnitude
Why not?
2026-05-01 08:57:37 +02:00
Luke Street 1affefbbfc Pane: Focus selected child first 2026-05-01 00:56:53 -06:00
PJB3005 e4ff38a712 Disable spammy mDoGph_Painter log line
What was this even debugging? Who knows.
2026-05-01 08:54:32 +02:00
PJB3005 f2ac4d6f44 Leave OSReport enabled. 2026-05-01 08:52:41 +02:00
PJB3005 48b98a5432 Make JKRExpHeap OOM logging more verbose 2026-05-01 08:50:55 +02:00
PJB3005 a4752154f7 Nicely plumb OSReport error/warning/etc through Aurora's logger
This makes a new implementation in the dusk src folder, and makes the existing file containing these functions not compiled anymore.

A ton of dead code is now gone.
2026-05-01 08:50:42 +02:00
Luke Street 0d973a497b Editor: Add get_item_name 2026-05-01 00:40:57 -06:00
Luke Street ab4eccf1df Some more dual pane select work 2026-05-01 00:26:04 -06:00
Luke Street e0c449f28e Improve add_child and Button APIs 2026-04-30 23:36:30 -06:00
Jasper St. Pierre ce9a5c06d5 heap name 2026-04-30 22:19:19 -07:00
Jasper St. Pierre 2bbba1e4e8 couple small fixes 2026-04-30 21:37:28 -07:00
Luke Street 39298f8d8f Preserve focused element on pop 2026-04-30 22:31:24 -06:00
Luke Street 32b4c0567a Animate overlay open/close 2026-04-30 22:17:48 -06:00
Jasper St. Pierre 7ff1b5332e Merge pull request #606 from dooplecks/trim-correction
Correct trim height for arbitrary aspect ratios
2026-04-30 20:38:03 -07:00
Jasper St. Pierre 5e77a60bd6 Merge pull request #610 from dooplecks/shadow-interp
Interpolate shadow camera
2026-04-30 20:36:53 -07:00
doop 9629c000bd Interpolate shadow camera
Fixes #454.
2026-05-01 03:25:07 +00:00
Luke Street 9dc5fed686 Fix overlay CSS 2026-04-30 21:12:25 -06:00
Luke Street 2cc9db77dd Fix overlay 2026-04-30 21:10:48 -06:00
Luke Street 8aa08c9443 Window animations & tags instead of classes 2026-04-30 20:55:21 -06:00
Irastris dca3e2eba6 Overlay: I forgot about pop_document()
This in turn fixes a bug that I was about to bother encounter about, smh
2026-04-30 21:54:52 -04:00
Irastris 57061fba38 Initial attempt at the overlay document 2026-04-30 21:39:39 -04:00
Luke Street cee6a24309 UI: Defer document destruction 2026-04-30 17:46:36 -06:00
Luke Street 62edb3abc6 UI: Implement initial document stack logic 2026-04-30 17:21:55 -06:00
Luke Street 1c9e1c0a66 Minor clean 2026-04-30 16:15:27 -06:00
Luke Street a06aeb10c1 Extract TabBar component 2026-04-30 16:13:08 -06:00
roeming b84b309e00 compilation fix attempt 3 2026-04-30 17:51:52 -04:00
roeming 62eecb3ccd compilation fix attempt 2 2026-04-30 17:48:39 -04:00
roeming ec07572ced compilation fix attempt 2026-04-30 17:45:53 -04:00
roeming b45e2fa34d swap array for named variables 2026-04-30 17:25:24 -04:00
roeming 289a718446 fix comment wording 2026-04-30 17:10:33 -04:00
roeming 292a2a6c34 fix wrong formatting, fix duplicate ui object, fix wrong flags getting set 2026-04-30 17:03:47 -04:00
Luke Street 2e8415b950 Update aurora 2026-04-30 14:43:44 -06:00
roeming dbf1f6e354 implement multibyte area flags in UI 2026-04-30 16:25:56 -04:00
roeming 9a2fe9745d Draw area flags as table 2026-04-30 15:55:59 -04:00
Irastris b5ca343fac Fix apostrophes in strings 2026-04-30 15:50:01 -04:00
doop 88c7ff63ff Fix preprocessor conditional 2026-04-30 19:48:03 +00:00
Luke Street 7a438ad30f UI: Extract a Document class 2026-04-30 13:44:33 -06:00
doop 89649de7c3 Correct trim height for arbitrary aspect ratios
Fixes #543.
2026-04-30 19:39:36 +00:00
Irastris a1960eaa33 Initial attempt at the popup menu 2026-04-30 15:30:14 -04:00
MelonSpeedruns d6820c9233 fix toast call 2026-04-30 14:53:15 -04:00
MelonSpeedruns 5c4bb8d33d Merge remote-tracking branch 'origin/main' into feature/autosave
# Conflicts:
#	src/dusk/imgui/ImGuiConsole.cpp
2026-04-30 14:51:17 -04:00
MelonSpeedruns e3ce1f01c9 Widescreen Dungeon Map 2026-04-30 14:38:24 -04:00
Luke Street 9b6b344ecf Revert "mirror clip fix"
This reverts commit 1ac6df8de7.
2026-04-30 12:09:18 -06:00
Luke Street 3db85d5b44 Merge branch 'main' into rmlui-integration
# Conflicts:
#	extern/aurora
2026-04-30 12:04:21 -06:00
roeming b5871d72d9 fix build 2026-04-30 11:47:22 -04:00
roeming b70a714f88 Remove missed randomizer flag 2026-04-30 11:45:16 -04:00
roeming cad5a8d1bc Add multibyte flags to Area iterators 2026-04-30 11:43:57 -04:00
roeming 93f8a5fa8f Move area multi flag bits to combined flags, at most 2 2026-04-30 11:11:08 -04:00
roeming b0809ea78c Add area flags 2026-04-30 11:02:18 -04:00
MelonSpeedruns b0e9033736 Widescreen Field Map 2026-04-30 10:55:53 -04:00
Jasper St. Pierre 1ac6df8de7 mirror clip fix
closes #581
2026-04-30 07:52:44 -07:00
MelonSpeedruns 5899b2157a fix bow aiming in first person 2026-04-30 09:29:42 -04:00
madeline 44f3828f68 fix morpheel logic 2026-04-30 02:48:30 -07:00
madeline 3f560b060c 40 achievements 2026-04-30 01:48:03 -07:00
Luke Street 3185f578fb Update aurora 2026-04-30 01:45:54 -06:00
Luke Street 4fc09799b6 UI: Fix section heading font 2026-04-30 01:45:25 -06:00
Irastris fe0e3cad72 Remove unused editor functions 2026-04-30 03:27:48 -04:00
Luke Street 37d1aa7f40 UI: Run builder before moving it 2026-04-30 01:07:11 -06:00
Luke Street 4a12554bf4 UI: Mobile keyboard fixes, safe area padding, & more 2026-04-30 00:06:27 -06:00
Phillip Stephens fecd1d5683 Update aurora 2026-04-29 22:33:02 -07:00
doop bce9bf6fd9 Merge pull request #597 from dooplecks/haze-fix
Correct JPADrawInfo proj matrix on widescreen
2026-04-30 00:55:32 -04:00
doop fbf63b075a Correct JPADrawInfo proj matrix on widescreen
Fixes #337.
2026-04-30 04:28:47 +00:00
Luke Street b86d6e90e2 Add Gameplay settings & make Panes scrollable 2026-04-29 21:52:33 -06:00
Luke Street 6425b452e7 Make PgUp/PgDown change tabs 2026-04-29 20:25:59 -06:00
Luke Street 1657fe8083 Split out string/number components 2026-04-29 20:19:27 -06:00
Luke Street ecd74a4cbd More settings/editor components 2026-04-29 19:54:37 -06:00
MelonSpeedruns 36dc43c602 Fix changing tunics crash while on top of mirror (#596)
* Fix changing tunics while reflection is active

* Revert "Fix changing tunics while reflection is active"

This reverts commit 89927dc7a6.

* Really fix changing tunics while reflection is active

* Fix transforming on ice again

---------

Co-authored-by: MelonSpeedruns <melonspeedruns@stratobox.net>
Co-authored-by: Irastris <irastris15@gmail.com>
2026-04-29 18:13:07 -06:00
Luke Street d92515f0d4 Begin scaffolding keyboard nav 2026-04-29 15:19:15 -06:00
MelonSpeedruns f147dcac0c Fix camera while crawling & disable freecam properly when not chasecam 2026-04-29 15:29:00 -04:00
MelonSpeedruns ee4c84f39b Fix slight spazz when changing cam type 2026-04-29 15:21:48 -04:00
MelonSpeedruns b8a83c6f59 disable freecam if not chasecamera 2026-04-29 14:37:32 -04:00
MelonSpeedruns 4462c0ef69 more optimizations to freecam code 2026-04-29 14:28:18 -04:00
Phillip Stephens c803bfb545 Update aurora 2026-04-29 09:14:51 -07:00
qwertyquerty 2623c44cab Merge pull request #583 from TheLastPocket/achievement/email-me
Email me and Heavy Hitter Achievements
2026-04-29 05:29:50 -07:00
madeline 24dd02fc81 better back in time condition 2026-04-29 05:28:28 -07:00
TakaRikka a97602b6dc Merge pull request #589 from TwilitRealm/instant-text-shop-fix
Fix instant text clearing some shop dialogue too quickly
2026-04-29 00:37:51 -07:00
TakaRikka e2943e90dc Merge pull request #590 from dooplecks/map-outline
Improve map outline rendering
2026-04-29 00:37:04 -07:00
Luke Street 3cb7fbd030 Create new component system & initial settings window 2026-04-29 00:38:26 -06:00
doop afe54f22ab Write circle pixels linearly 2026-04-29 04:16:24 +00:00
doop e15f5bcee9 Improve map outline rendering 2026-04-29 03:51:14 +00:00
Irastris 1e372a856d Attempted to start making the save editor functional 2026-04-28 22:54:47 -04:00
gymnast86 b26896cad5 includes 2026-04-28 18:05:40 -07:00
gymnast86 f75faf6b06 fix instant text clearing shop messages too early 2026-04-28 18:03:06 -07:00
Irastris b48d9aa052 Split window document and styles out to files for readability 2026-04-28 19:09:47 -04:00
Luke Street d899706208 Start UI over from scratch and add demo window 2026-04-28 16:20:45 -06:00
TakaRikka 3e05789b58 Merge pull request #586 from TwilitRealm/fix/fix-super-clawshot
Fix draw crash with Super Clawshot enabled
2026-04-28 13:34:24 -07:00
MelonSpeedruns 9a7b62cbc6 disable freecam if an event cam happens 2026-04-28 16:25:42 -04:00
MelonSpeedruns 8e0f0e878e optimize some code 2026-04-28 16:13:49 -04:00
MelonSpeedruns 79344edf0d maybe fix number 2 2026-04-28 15:19:32 -04:00
MelonSpeedruns e59bfd1a9c potential fix for freecam flashing 2026-04-28 15:01:57 -04:00
MelonSpeedruns 4d12cc8ea2 Fix draw crash with Super Clawshot enabled 2026-04-28 11:05:29 -04:00
Julian Maynes 2ed2268579 fix newline 2026-04-28 07:19:18 -07:00
Julian Maynes 94a99e8da0 Add iron boots achievement 2026-04-28 07:12:29 -07:00
madeline ddaf50c01d long jump attack achievement 2026-04-28 06:53:20 -07:00
madeline 7566949b42 fix friendly fire achievement 2026-04-28 06:21:41 -07:00
Julian Maynes bb6db3caea remove newlines 2026-04-28 06:18:40 -07:00
Julian Maynes 2dc494dc1c Finish achievement 2026-04-28 06:14:56 -07:00
madeline 3c25633ee9 speed_target avoid ub 2026-04-28 06:08:04 -07:00
madeline d99ed2729b fix achievements window sizing 2026-04-28 05:57:58 -07:00
madeline 782455d48b Merge branch 'main' of https://github.com/TakaRikka/dusk 2026-04-28 05:54:12 -07:00
madeline 47863b34c2 achievement signal system 2026-04-28 05:54:09 -07:00
TakaRikka 92391d5eb8 add overview and ai notice to readme 2026-04-28 04:06:29 -07:00
madeline 0d37cb4e54 thank you berry much achievement 2026-04-28 04:01:22 -07:00
madeline ea528ed9d9 clear single achievement and fix achievement tab moving around 2026-04-28 03:41:04 -07:00
Luke Street f7b880c5ea Small tweak to rml_string 2026-04-28 00:27:18 -06:00
Luke Street ff78bc8d6c Start using Rml::PropertyId/Property instead of strings 2026-04-28 00:18:52 -06:00
Luke Street 6503b4e7eb Add blur and shadow to window component 2026-04-27 23:44:58 -06:00
TakaRikka 30b7087f30 add option for only fishing once for sera's cat 2026-04-27 22:04:42 -07:00
Luke Street 0c1372f986 Revert "Kinda crappy initial controller support"
This reverts commit 23a91a37be.
2026-04-27 21:55:57 -06:00
Irastris 8fb4ba8924 Remove "Enable" from various options, and move DoF under post-processing 2026-04-27 22:51:56 -04:00
Irastris 5f675c6f2b Start deprecating ImGui 2026-04-27 22:44:26 -04:00
Irastris b3333241c5 Add right-pane for item descriptions 2026-04-27 22:44:26 -04:00
Irastris e39079c0f8 Initial game menu implementation 2026-04-27 22:44:26 -04:00
Irastris c3317d9232 Initial window class programming 2026-04-27 22:43:04 -04:00
TakaRikka a4777045fe Merge pull request #578 from TwilitRealm/fix/fix-disable-hud
Fix bugs with Disable Main HUD
2026-04-27 15:29:02 -07:00
TakaRikka bbe8ea6aa6 Merge pull request #577 from TwilitRealm/better-freecam-code
Better Freecam code + Allow Freecam in Target mode
2026-04-27 15:28:39 -07:00
MelonSpeedruns d662db69f0 Fix bugs with Disable Main HUD 2026-04-27 17:04:42 -04:00
MelonSpeedruns 9b259143be Better Freecam code + Allow Freecam in Target mode 2026-04-27 12:05:26 -04:00
Luke Street 025cb58493 Forgor to commit 2026-04-27 01:15:19 -06:00
Luke Street b3dee825e8 Improve button/option style 2026-04-27 00:44:01 -06:00
Luke Street f6c5aac3c8 Improve disc selector 2026-04-27 00:36:56 -06:00
Luke Street 25e9064d09 Revamped prelaunch experiment w/ RmlUi 2026-04-27 00:18:31 -06:00
Irastris 5f33489465 Register interp callback for d_a_obj_lv8Lift 2026-04-27 01:04:45 -04:00
Luke Street 3e1e8f1244 Enable RmlUi 2026-04-26 21:53:39 -06:00
Luke Street 23a91a37be Kinda crappy initial controller support 2026-04-26 21:01:41 -06:00
TakaRikka eaae8b6137 Merge branch 'main' of github.com:TwilitRealm/dusk into mapmirror 2026-04-26 17:37:30 -07:00
TakaRikka a886f8a2df Merge pull request #568 from TwilitRealm/fix/d_a_obj_balloon
d_a_balloon score and interp fixes
2026-04-26 17:00:30 -07:00
TakaRikka 6df7b1e9cd Merge pull request #357 from TwilitRealm/speedrun-timer
speedrun timer
2026-04-26 16:59:47 -07:00
TakaRikka 206c02b527 fix igt timer 2026-04-26 16:51:10 -07:00
Pheenoh a05d1a9ee6 d_a_balloon score and interp fixes 2026-04-26 17:05:46 -06:00
Howard Luck ed0df01b8d Merge pull request #565 from TwilitRealm/fix/clib_offsetpos
cLib_offsetPos param aliasing fix
2026-04-26 16:09:26 -06:00
Pheenoh 0f9d563a3e cLib_offsetPos param aliasing fix 2026-04-26 15:59:45 -06:00
TakaRikka f3fb65495e Merge pull request #561 from TwilitRealm/fix/pal_lang
Only show language selection if PAL disc
2026-04-26 14:50:14 -07:00
TakaRikka 196f33005e Merge pull request #560 from TwilitRealm/fix/imgui-and-camera-x
ImGui Button name change + Fix Freecam Invert X Axis option
2026-04-26 14:49:40 -07:00
Luke Street 90c0bdded0 Use GXDestroyCopyTex on map destroy
Resolves #469
2026-04-26 14:02:28 -06:00
Pheenoh f856f871bb Only show languages if PAL disc 2026-04-26 13:58:38 -06:00
Jasper St. Pierre e75ea18ef0 map deco perf 2026-04-26 11:52:20 -07:00
Jasper St. Pierre 50e2d9d1a7 grass draw fix
closes #534
2026-04-26 11:18:25 -07:00
Jasper St. Pierre 5c84978c3c evil perf fix
closes #552
2026-04-26 10:44:52 -07:00
MelonSpeedruns 3859f39729 Fix camera radius to be smoother 2026-04-26 10:25:10 -04:00
MelonSpeedruns 3498ded9d9 ImGui Button name change + Fix Freecam Invert X Axis option 2026-04-26 10:18:47 -04:00
Phillip Stephens 8784958c40 Quick PAD rumble fixes, add button to test rumble configuration 2026-04-25 22:51:39 -07:00
Phillip Stephens c1231885fe Add rumble intensity sliders to input configurator (#558) 2026-04-25 23:17:17 -06:00
TakaRikka 2b65a696dd Merge pull request #556 from TwilitRealm/fix/zant_fog
Frame Interp: Fix Zant Fog Spin
2026-04-25 21:31:30 -07:00
Pheenoh 02924549be fix idle howl blinking 2026-04-25 21:21:22 -07:00
TakaRikka 6cf94b4491 remove unneeded file 2026-04-25 21:18:51 -07:00
TakaRikka 30aa2dd527 Merge branch 'main' of github.com:TwilitRealm/dusk into speedrun-timer 2026-04-25 21:16:27 -07:00
TakaRikka 8e121a7e51 update timer impl 2026-04-25 21:12:51 -07:00
Pheenoh 34ec362876 fix zant fog spin and culling 2026-04-25 21:37:11 -06:00
MelonSpeedruns ba58d2486e Free Camera (#542)
* freecam wip

* added manual mode

* fix freecam collision

* made freecam into its own function

* Added settings & Radius modification when camer is higher up

---------

Co-authored-by: MelonSpeedruns <melonspeedruns@stratobox.net>
2026-04-25 21:35:43 -06:00
Luke Street f7b5350d60 Update README.md 2026-04-25 20:42:02 -06:00
Howard Luck 9ddfcc38c9 fix interp on ooks rope (#553) 2026-04-25 20:37:36 -06:00
TakaRikka cee66a6fd5 Merge pull request #554 from TwilitRealm/achievements
achievements
2026-04-25 19:25:50 -07:00
madeline 574b6197a2 achievements 2026-04-25 18:23:12 -07:00
Howard Luck 6fc8628144 fix gdorf horseback reins + demo cuts (#551) 2026-04-25 20:44:38 -04:00
Irastris ca9330b412 Register interp callback for d_a_obj_lv8OptiLift
Fixes disappearing platforms
2026-04-25 20:40:29 -04:00
Luke Street 1b792eb964 Update aurora 2026-04-25 16:18:16 -06:00
Howard Luck 0e5ea0d3b1 fix d_meter_button flashing (#549) 2026-04-25 15:48:45 -06:00
Pieter-Jan Briers 977ad16806 GCN PAL support (#533)
* Basic PAL ISO & language support

Probably still needs much more work

* Add language selector to pre-launch

* Store DVDDiskID in a global

Can use this later for things

* More version system API improvements

* d_name mostly region switching fully

JPN doesn't work yet cuz it'll be a nightmare, probably.

* More version switching support

* Mark GCN PAL as supported ROM

* Fix remaining REL assets to have PAL offsets

* d_a_mg_fish PAL

* d_a_mg_fshop PAL

* isRegionUsa helper

* d_menu_fishing PAL

* d_msg_class PAL

* m_Do_MemCardRWmng PAL

* Update CARDInit call & remove DUSK_TP_VERSION

* Fix Ganon cape

Missed this one.

* Remove tp_version from Sentry

---------

Co-authored-by: Luke Street <luke@street.dev>
2026-04-25 15:46:12 -06:00
Irastris 41420bc71c Chu Fix 2: Electric Boogaloo 2026-04-25 17:08:22 -04:00
Irastris 5ec5f8864a Register interp callback for d_a_e_sm2
Fixes chu color changes
2026-04-25 16:59:48 -04:00
MelonSpeedruns 60e8836968 Tears Collect during cutscenes (#539)
TPHD has tears collectable just as fast during cutscenes, this changes our implementation to reflect that.

Co-authored-by: MelonSpeedruns <melonspeedruns@stratobox.net>
2026-04-25 14:59:30 -06:00
MelonSpeedruns e755148f16 Fix some UBs (#544)
Co-authored-by: MelonSpeedruns <melonspeedruns@stratobox.net>
2026-04-25 14:59:04 -06:00
roeming 0bf663141a change filter to avoid allocations 2026-04-25 14:39:47 -04:00
TakaRikka 17949e526b Merge branch 'main' of github.com:TwilitRealm/dusk into speedrun-timer 2026-04-25 06:05:50 -07:00
MelonSpeedruns d7dced7ddf don't autosave if playing a cutscene 2026-04-25 08:25:50 -04:00
Luke Street 4e264d6a22 Fix Zbuffer texture binding
Resolves #511
2026-04-24 22:53:48 -06:00
Irastris c8e89a0f99 Fix grass cutting when interp is enabled 2026-04-25 00:31:40 -04:00
Luke Street c61e32cd4f Update aurora for GXPeekZ
Resolves #281
Resolves #468
2026-04-24 22:10:56 -06:00
Irastris 274bf61b3e Fix Link's hands detaching when interp is enabled 2026-04-24 22:56:47 -04:00
TakaRikka 05b2a5cbe9 Merge pull request #530 from TwilitRealm/fix-event-flag-constant-sorting
Implement custom sorting when sorting event flags by flag on/off
2026-04-24 15:23:49 -07:00
TakaRikka aa838c8003 Merge pull request #532 from TwilitRealm/feature/even-faster-tears
Even faster tears to match TPHD
2026-04-24 15:14:10 -07:00
MelonSpeedruns d5aabe9f9e Even faster tears to match TPHD 2026-04-24 18:06:02 -04:00
roeming 171dbdd0a1 Implement custom sorting when sorting event flags by flag on/off 2026-04-24 16:50:31 -04:00
Luke Street b2c09d56d6 Remove unnecessary logic from dMirror_packet_c::entryModel 2026-04-24 13:34:51 -06:00
Luke Street f0e8379fa5 Fix UaF in d_a_mirror
Resolves #505
2026-04-24 13:19:09 -06:00
Irastris 1fea4f02ed Fix camera bouncing with interp enabled 2026-04-24 14:26:56 -04:00
Luke Street 35ea13c53a Update aurora 2026-04-24 12:25:15 -06:00
MelonSpeedruns 78b0563c0e Merge remote-tracking branch 'origin/main' into feature/autosave
# Conflicts:
#	src/dusk/imgui/ImGuiMenuEnhancements.cpp
#	src/dusk/settings.cpp
#	src/f_ap/f_ap_game.cpp
2026-04-24 12:54:40 -04:00
PJB3005 5fab665f21 Don't allocate giant unused stacks for movie player
How to save 800 KiB of commit charge easy
2026-04-24 15:25:14 +02:00
madeline 109f0a50e5 fix sun song again 2026-04-24 03:37:35 -07:00
Irastris 746910c59f Register interp callback for d_a_obj_item
Fixes rupee color changes
2026-04-24 05:13:31 -04:00
CraftyBoss ae4806ae4f Merge remote-tracking branch 'origin/main' 2026-04-23 23:40:36 -07:00
CraftyBoss 1c00e2cdde fix unsafe cstr usage in flag editor, remove stray backslash 2026-04-23 23:40:20 -07:00
Luke Street 78301a8a83 Restore half-size in drawDepth2 2026-04-24 00:39:20 -06:00
CraftyBoss ca798049b3 Merge remote-tracking branch 'origin/main' 2026-04-23 23:31:24 -07:00
CraftyBoss daf4b1dfeb update aurora, add pre launch option to determine save file type (gci or raw) 2026-04-23 23:31:07 -07:00
TakaRikka 5bdd31a5af Merge pull request #517 from TwilitRealm/midna-eye
Clamp max LOD for Wolf Link and Midna eyes
2026-04-23 22:43:16 -07:00
Luke Street 3cb5e5172b Add Adult Link eye LOD fix 2026-04-23 23:42:15 -06:00
TakaRikka d625c7ab0c fix save editor clothes change crash 2026-04-23 20:26:50 -07:00
Luke Street c2045391c8 Fix a couple issues for Xcode projects (#513)
* Link separate JSystem libraries due to control.cpp

This allows the Xcode generator to work, otherwise
it breaks on the duplicate control.o files within
the game_debug library.

* Fix __memcpy define on GCC

* Try LINK_GROUP:RESCAN for GNU ld

* Combine dusk/game_base/game_debug targets

* Fix compile defs syntax
2026-04-23 21:05:38 -06:00
TakaRikka f04a0ffcf1 forgot pic oops 2026-04-23 15:12:40 -07:00
TakaRikka dfdac1c1cd update setup instructions 2026-04-23 15:11:51 -07:00
TakaRikka f4b361ab02 Merge pull request #510 from TwilitRealm/feature/thinner-map-lines
Thinner map lines at higher resolution
2026-04-23 14:36:02 -07:00
TakaRikka 5f3d3012ff Merge pull request #509 from TwilitRealm/fix/ring_menu_cursor_interp
Frame interp: interpolate ring menu cursor along arc
2026-04-23 14:09:35 -07:00
TakaRikka 0897ef1132 Merge pull request #508 from TwilitRealm/fix/wolf-dive-fix
Fix Sun Song check
2026-04-23 14:08:44 -07:00
TakaRikka 8b89dbcbf0 Merge pull request #506 from TwilitRealm/instant-text-responsiveness
Instant Text: Fix holding B in the middle of a textbox
2026-04-23 14:08:09 -07:00
TakaRikka f24e944ab0 Merge pull request #492 from TwilitRealm/feature/gamepad-color
Gamepad Colors for DS4/DS5
2026-04-23 14:07:43 -07:00
MelonSpeedruns 23130d5a57 Thinner map lines at higher resolution
Affects both the Map Menu and the Mini-Map.
2026-04-23 15:08:34 -04:00
Luke Street 1e6e1976e3 Clamp max LOD for Wolf Link and Midna eyes 2026-04-23 13:07:42 -06:00
MelonSpeedruns 4453316bb0 Separated gamepad color into its own files 2026-04-23 14:25:50 -04:00
Pheenoh 14aeefb813 Frame interp: interpolate ring menu cursor along arc 2026-04-23 08:38:47 -06:00
MelonSpeedruns c991c7c407 Fixes sun songing underwater 2026-04-23 09:42:02 -04:00
madeline 251c6e7aec more precise link debug info 2026-04-23 06:28:16 -07:00
madeline cf2357fff2 Merge branch 'main' of https://github.com/TakaRikka/dusk 2026-04-23 03:58:38 -07:00
madeline 06e6b0d47e fix safety bit on interp fixes #507 2026-04-23 03:58:35 -07:00
gymnast86 a83b4186af fix holding B in the middle of text 2026-04-23 03:25:19 -07:00
TakaRikka dc5de83436 Merge pull request #503 from TwilitRealm/feature/rotate-link-doll
Add ability to rotate link on the collection screen
2026-04-22 23:36:55 -07:00
TakaRikka 77425b4b25 Merge pull request #500 from TwilitRealm/fix/interp_dselect_cursor_ring_menu
Frame Interp: dselect_cursor_c in d_menu_ring
2026-04-22 23:31:16 -07:00
Phillip Stephens 5a109313cb Minor tooltip cleanup 2026-04-22 23:02:11 -07:00
Phillip Stephens d8a7927602 Clarify tooltip 2026-04-22 22:59:56 -07:00
Phillip Stephens cccddee106 Add ability to rotate link on the collection screen 2026-04-22 22:58:38 -07:00
madeline 6c252c6d26 disallow breaking share state by overlapping loads 2026-04-22 22:37:21 -07:00
madeline b06c1911c6 Merge branch 'main' of https://github.com/TakaRikka/dusk 2026-04-22 22:33:59 -07:00
madeline 7c9e99220a better impl of insta state shares 2026-04-22 22:33:55 -07:00
madeline bfd8b9f453 make state share loads basically instant 2026-04-22 22:27:14 -07:00
Pheenoh 53e8662335 frame interp: dselect_cursor_c in d_menu_ring 2026-04-22 21:57:36 -06:00
Luke Street ae54f024cd Update aurora 2026-04-22 21:48:58 -06:00
TakaRikka 9aa391c5bf Merge pull request #499 from TwilitRealm/fix/dmap_frame_interp
Frame interp: Fix dmap scroll arrows
2026-04-22 17:41:56 -07:00
TakaRikka ec48249934 Merge pull request #495 from TwilitRealm/limiter
Limiter: Use SDL_GetTicksNS instead of std::chrono
2026-04-22 17:40:47 -07:00
Pheenoh 6a8f3516f9 Frame interp: Fix dmap scroll arrows 2026-04-22 18:35:07 -06:00
TakaRikka 79d4835784 Merge pull request #496 from TwilitRealm/feat/esc_fs
Press esc to exit full screen
2026-04-22 17:00:54 -07:00
TakaRikka b1a4783e38 Merge pull request #494 from TwilitRealm/fix/wide-fused-shadows
Widescreenified Fused Shadow Animations for all first 3 bosses
2026-04-22 16:59:45 -07:00
Pheenoh 0038afa392 Press esc to exit full screen 2026-04-22 17:51:16 -06:00
Luke Street 5fcffa0b4f Use SDL_GetTicksNS instead of std::chrono 2026-04-22 17:18:18 -06:00
MelonSpeedruns 9e9d11ae89 Widescreenified Fused Shadow Animations for all first 3 bosses 2026-04-22 18:47:51 -04:00
TakaRikka 97bd84725c Merge pull request #491 from TwilitRealm/gyro-roll
Incorporate roll into gyro horizontal aiming
2026-04-22 14:45:57 -07:00
Captain Kitty Cat 19c86b1b73 Items Don't Despawn (#488)
* Indefinite Item Drops

* Preserve Disappear Effect when Disabled

* Changed to "Items Don't Despawn". Under "Cheats"

* SetItemTooltip for description
2026-04-22 12:27:54 -06:00
Luke Street ca247095da Reset gravity baseline on aim start 2026-04-22 12:20:44 -06:00
MelonSpeedruns c350b7b8ed fix building on linux 2026-04-22 13:52:14 -04:00
Luke Street ac3d3314c4 Incorporate roll into gyro horizontal aiming 2026-04-22 11:47:40 -06:00
MelonSpeedruns f916a48db0 optimized code and removed bugs 2026-04-22 13:36:06 -04:00
MelonSpeedruns 6963a4b554 Merge remote-tracking branch 'origin/main' into feature/gamepad-color
# Conflicts:
#	src/f_ap/f_ap_game.cpp
2026-04-22 13:01:03 -04:00
MelonSpeedruns 4466bf4e12 wip 2026-04-22 13:00:35 -04:00
madeline c4d01b82a6 get rid of old logs 2026-04-22 03:16:13 -07:00
madeline 42e8d9ab9d name fix 2026-04-22 02:50:49 -07:00
madeline 9c562ff740 state packs and partial states 2026-04-22 02:44:58 -07:00
madeline 1787de517c properly set oxygen in share states 2026-04-22 01:55:23 -07:00
madeline 832e567620 better share states 2026-04-22 01:50:17 -07:00
Luke Street 319efbe662 Reset game clock with over 250ms frame gap 2026-04-22 00:30:11 -06:00
Luke Street 6f34bb050a Call J3DModel::diff in mDoExt_modelEntryDL when interpolating
Fixes #355
2026-04-22 00:17:52 -06:00
Irastris a2a56122e2 Gyro: Hawk Aiming 2026-04-22 01:46:10 -04:00
Irastris 58f2679def Rollgoal: Gyro & Mirror Mode Fixes 2026-04-22 01:41:35 -04:00
Luke Street 396ea02fe5 Fix flowers with interpolation on (#486) 2026-04-21 23:33:03 -06:00
TakaRikka 8100ddb990 Merge pull request #485 from TwilitRealm/frame-pacing-2
Rework interpolation pacing; interpolate every frame
2026-04-21 22:05:33 -07:00
Luke Street d78c46a628 Rework interpolation pacing; interpolate every frame 2026-04-21 22:45:18 -06:00
Phillip Stephens 1e93657ab5 Update aurora for fix 2026-04-21 19:25:28 -07:00
madeline 366e47245e make sun song play the correct notes 2026-04-21 19:23:53 -07:00
madeline 4c53ba91be Merge branch 'main' of https://github.com/TakaRikka/dusk 2026-04-21 18:59:23 -07:00
madeline cf080523cb dsp oscillator channels fixes #471 fixes #131 2026-04-21 18:59:11 -07:00
Luke Street a15d0af139 Better fix for mirror crashes 2026-04-21 17:39:53 -06:00
Luke Street d99205ecc6 Update aurora 2026-04-21 17:12:28 -06:00
TakaRikka dd3a61d84c fix dmap background 2026-04-21 15:13:55 -07:00
Luke Street 595a6f1c9e Enable DoF (+ setting) & fix texture cache leak 2026-04-21 14:52:26 -06:00
MelonSpeedruns 18d70df188 Small Imgui changes for better visibility by end user (#473)
Co-authored-by: MelonSpeedruns <melonspeedruns@stratobox.net>
2026-04-21 10:17:56 -06:00
TakaRikka 46f6dc67c1 make file select card wait times obey instantSaves setting 2026-04-21 00:46:22 -07:00
madeline 6267b79da3 Merge branch 'main' of https://github.com/TakaRikka/dusk 2026-04-20 20:22:12 -07:00
madeline 62f3d09076 fix incorrect eldin field name on map 2026-04-20 20:22:06 -07:00
Luke Street 4b3c559df3 CMake: Don't build a game static lib 2026-04-20 20:47:03 -06:00
Luke Street 30a99c22f1 Reorganize ImGui menus (#456)
* Reorganize ImGui menus

* Fix crash_reporting.cpp

* Update aurora
2026-04-20 20:45:16 -06:00
TakaRikka 360cb37028 Merge pull request #463 from TwilitRealm/fix/interp_map_save
Frame Interp: d_menu_save and d_menu_fmap2D
2026-04-20 19:17:56 -07:00
TakaRikka 4b6b41a6aa Merge pull request #461 from TwilitRealm/26-04-21-thp-shutdown-crash
Fix THP shutdown crash
2026-04-20 18:45:29 -07:00
Pheenoh faa8618124 Fix frame interpolation on save and world map menus 2026-04-20 19:37:38 -06:00
PJB3005 89acf923e0 Fix THP shutdown crash
Cleanly shut down movie player threads on exit.

I'm not 100% fond of having to manually insert a call like this into the shutdown logic, but the other solution is shutting down all processes and that's likely to result in causing more crashes.
2026-04-21 01:11:49 +02:00
Irastris c42a33154c Frame Interp: Fix flickering refraction in cutscenes 2026-04-20 18:11:27 -04:00
MelonSpeedruns 871d18e294 added experimental setting for autosave 2026-04-20 13:15:37 -04:00
MelonSpeedruns c157564da6 dungeon doors now autosave 2026-04-20 13:02:25 -04:00
MelonSpeedruns ecc3b00c51 Merge remote-tracking branch 'origin/main' into feature/autosave
# Conflicts:
#	src/f_ap/f_ap_game.cpp
2026-04-20 12:55:17 -04:00
madeline a074e30147 Merge branch 'main' of https://github.com/TakaRikka/dusk 2026-04-20 06:45:09 -07:00
madeline 2ce272d586 fix some menus scaling wrong 2026-04-20 06:45:05 -07:00
TakaRikka e1636e20bd Merge branch 'main' of https://github.com/TakaRikka/dusk 2026-04-20 06:14:28 -07:00
TakaRikka 9904720e5a better lv5key fix 2026-04-20 06:14:21 -07:00
madeline 9910320fb4 Merge branch 'main' of https://github.com/TakaRikka/dusk 2026-04-20 06:10:22 -07:00
madeline b43a9e2ccc menu cursor resizing fixes #313 closes #314 2026-04-20 06:10:18 -07:00
TakaRikka 23d81492e6 Merge branch 'main' of https://github.com/TakaRikka/dusk 2026-04-20 06:02:11 -07:00
TakaRikka 65b0ec3f90 add failsafes to lv5key to avoid reverse unlock softlock 2026-04-20 06:02:03 -07:00
madeline 91248d10db disable water refraction in debug, fixes #422 2026-04-20 05:36:31 -07:00
TakaRikka f76a4d7087 add dMsgUnit_c::setTag bug fix 2026-04-20 05:15:02 -07:00
TakaRikka c7b609945b fix option menu widescreen regression 2026-04-20 04:48:58 -07:00
TakaRikka 6ca6ea8065 fix crawl arrow direction with mirror mode 2026-04-20 04:16:35 -07:00
TakaRikka 315f621176 Merge pull request #450 from TwilitRealm/discord
Discord rich presence
2026-04-20 03:36:03 -07:00
madeline 10d9a818c2 fix apple ci? 2026-04-20 00:31:41 -07:00
madeline e3761784af rich presence 2026-04-20 00:21:09 -07:00
Phillip Stephens d85556a063 Use vendored SDL on ubuntu for libusb (#448) 2026-04-19 23:27:29 -06:00
madeline c43f33a5bc Merge branch 'main' of https://github.com/TakaRikka/dusk 2026-04-19 21:43:32 -07:00
madeline e63897d1f7 add --console to launch.json 2026-04-19 21:43:29 -07:00
Howard Luck 35a69e7ff1 Frame interp pacing/camera cuts, King Bulblin reins, and crash fixes
* misc fixes round 1

* kb1 fixes

* fixes for encounter/ira
2026-04-20 00:34:13 -04:00
Luke Street 8b9f09bda5 Frame interp: Fix cloud shadow flickering (#446) 2026-04-19 21:31:34 -06:00
Jasper St. Pierre 32cddc725b mirror flicker fix 2 2026-04-19 16:21:30 -07:00
Jasper St. Pierre 55eec3b0de hitstun camera interp fix 2026-04-19 16:01:51 -07:00
TakaRikka 1cf14f176c Merge pull request #438 from TwilitRealm/frame-interp-simplify
Frame interp simplify
2026-04-19 14:58:38 -07:00
TakaRikka 74550b031f Merge pull request #436 from TwilitRealm/feat/pause_on_unfocus
Add pause on unfocus feature
2026-04-19 14:26:58 -07:00
Jasper St. Pierre 2f84f0eaa4 j3d small cleanup 2026-04-19 14:16:38 -07:00
Jasper St. Pierre 3ed7ef1c88 fix stone shadow flicker 2026-04-19 13:22:00 -07:00
Jasper St. Pierre eace147652 mirror interp fix 2026-04-19 12:57:30 -07:00
Jasper St. Pierre 53c005c4f1 jutfader doc 2026-04-19 12:48:50 -07:00
Jasper St. Pierre a4ff97564c minor cleanup 2026-04-19 12:39:08 -07:00
Jasper St. Pierre c6beeba14f proct 2026-04-19 11:56:48 -07:00
Jasper St. Pierre e470278717 grass/flower/shadow interp fixes 2026-04-19 10:27:37 -07:00
Pheenoh 783230b654 Add pause on unfocus feature 2026-04-19 10:02:55 -06:00
TakaRikka 4e7711725a attempt to fix clawshot aim model position 2026-04-19 03:58:22 -07:00
Jasper St. Pierre e5bf7606ec run d_a_bg::draw on interp frames
to set up lights. this is a somewhat hacky workaround for lighting setup, but it might be good enough?
2026-04-19 03:19:44 -07:00
Jasper St. Pierre aa377cd5c1 add alternate to interp callbacks, flags on the leafdraw 2026-04-19 02:43:25 -07:00
Jasper St. Pierre bb9a88d7dc frame interp camera cleanups 2026-04-19 02:25:00 -07:00
Jasper St. Pierre 341e97ba82 simple shadow interp fix 2026-04-19 01:14:58 -07:00
Jasper St. Pierre 8d3cb51157 frame interp simplify 2026-04-18 23:26:28 -07:00
TakaRikka 7fff3b5ae0 Merge pull request #430 from TwilitRealm/fix/JAISeqMgr
Fix JAISeqMgr
2026-04-18 22:57:57 -07:00
TakaRikka 6beb73b7a6 Merge pull request #429 from TwilitRealm/fix/d_menu_fmap2d_interp
Fix d_menu_fmap2d interpolation for tears of light
2026-04-18 22:57:45 -07:00
Jasper St. Pierre c239a5a226 freelook fix 2026-04-18 22:45:54 -07:00
Jasper St. Pierre b3f8fecfe4 water interpolation fix 2026-04-18 22:17:35 -07:00
Phillip Stephens 6dcf4942f5 Update aurora for CARDFormat speedup 2026-04-18 21:51:28 -07:00
Phillip Stephens cd7e429a66 Fix memory card not properly attaching on init. (#433)
* Fix memory card not properly attaching on init.

Previously the card status was forced to ready which caused quite a bit of default state getting set properly,
reverting that and setting mCardCommand to `COMM_ATTACH_e` allows the memory card system to properly probe and
detect the card status.

A companion fix in aurora addresses the "Memory Card corrupted" error message.

* Update aurora
2026-04-18 21:33:02 -07:00
Pheenoh fcfcb35929 fix JAISeqMgr beginStartSeq_ to check free memory before allocation 2026-04-18 19:53:40 -06:00
Pheenoh 82b20be436 Merge remote-tracking branch 'origin/main' into fix/d_menu_fmap2d_interp 2026-04-18 19:34:57 -06:00
Pheenoh 33101d8050 fix minimap tear of light flash not respecting interpolation 2026-04-18 19:34:38 -06:00
TakaRikka 05160a968c Merge branch 'main' of https://github.com/TakaRikka/dusk 2026-04-18 18:08:40 -07:00
TakaRikka 623f29eb24 volume setting effects movie now 2026-04-18 18:08:33 -07:00
TakaRikka 0a3833818a Merge pull request #427 from TwilitRealm/fix/interp_d_file_select
Fix file select fade not rendering with frame interpolation
2026-04-18 16:17:54 -07:00
TakaRikka 4f276252a3 Merge branch 'main' of https://github.com/TakaRikka/dusk 2026-04-18 15:54:47 -07:00
TakaRikka d17c629ce0 fix bulblin eye glow 2026-04-18 15:54:42 -07:00
Pheenoh 5bcc969778 fix file select fade not rendering with frame interpolation 2026-04-18 16:53:48 -06:00
Luke Street 09e3e17aa6 Disable vendored dawn for x-macos-ci 2026-04-18 16:23:15 -06:00
Luke Street f02a39d921 Update aurora 2026-04-18 16:19:59 -06:00
TakaRikka effe5cb9e2 Merge pull request #426 from TwilitRealm/fix/cat_cs
More interpolation fixes
2026-04-18 13:44:05 -07:00
TakaRikka 767bb6826f Merge pull request #418 from TwilitRealm/unhackify-widescreen
Widescreen rework & IR scaling
2026-04-18 13:40:38 -07:00
Pheenoh a9f8595901 fix interpolation for cat cs, pop up 2d text 2026-04-18 14:27:01 -06:00
Luke Street 56239e77ff Update aurora 2026-04-18 14:16:24 -06:00
Luke Street 763cb7f92f Merge branch 'main' into unhackify-widescreen
# Conflicts:
#	src/dusk/imgui/ImGuiMenuGame.cpp
#	src/m_Do/m_Do_lib.cpp
2026-04-18 14:12:21 -06:00
Luke Street 85120648b1 Fix shadow draw viewport/scissor overflow 2026-04-18 14:04:28 -06:00
Luke Street b77ef63d5e Reintroduce x offset change for mDoLib_project 2026-04-18 13:34:22 -06:00
TakaRikka 45adce4af2 Merge pull request #424 from TwilitRealm/fix/button_combo_conflict
Fix quick transform conflicting with debug move combo
2026-04-18 12:27:02 -07:00
Luke Street 7b8f9c6f46 Fix blur scale in mDoGph_gInf_c::bloom_c::draw2 2026-04-18 13:08:14 -06:00
Luke Street 1c8bb1206e Unhackify mDoLib_project 2026-04-18 12:46:44 -06:00
Howard Luck 78d1596f66 Frame Interp: d_meter_haihai, d_msg_out_font, d_meter_button
* fix menu option haihai cursor and description icon animation speeds under frame interpolation

* also fix d_meter_button
2026-04-18 14:06:32 -04:00
Howard Luck 4cda2cd5f0 Merge pull request #417 from TwilitRealm/ira/data-folder
Add "Open Data Folder" to Game menu
2026-04-18 11:07:34 -06:00
Pheenoh d34be5143a fix quick transform conflicting with debug move combo 2026-04-18 10:20:55 -06:00
TakaRikka c00fc756e3 wip readme 2026-04-18 04:57:22 -07:00
TakaRikka 6ea3fef8c6 fix mirrored shops / projection 2026-04-18 03:38:16 -07:00
TakaRikka 8010e16cab add some cheats 2026-04-18 01:14:14 -07:00
Luke Street 2ec6f65572 Merge remote-tracking branch 'refs/remotes/origin/main' into unhackify-widescreen
# Conflicts:
#	src/m_Do/m_Do_main.cpp
2026-04-17 23:12:58 -06:00
Luke Street 5c20f527ac Widescreen rework & IR scaling 2026-04-17 23:11:43 -06:00
Irastris 3d9dfbd447 Add "Open Data Folder" to Game menu 2026-04-18 00:46:00 -04:00
Irastris 3a538d45cf Frame Interp: Game Clock Refactor & Ring Item Selection 2026-04-17 23:24:47 -04:00
Irastris 59d2014fb9 Frame Interp: UI Pacing Simplification 2026-04-17 23:24:47 -04:00
TakaRikka bc6c132d69 Merge pull request #413 from TwilitRealm/uninitialized-inko
add uninitialized variable fix
2026-04-17 15:04:08 -07:00
TakaRikka 83ddb2c6c8 Merge pull request #412 from TwilitRealm/feature/auto-hide-cursor
Auto-Hide Cursor
2026-04-17 15:03:46 -07:00
TakaRikka 3fe26f8dd6 Merge pull request #410 from TwilitRealm/instant-text
Hold B for instant text setting
2026-04-17 15:03:35 -07:00
Irastris 054c4384be Gyro: Add Subjectivity ProcIDs 2026-04-17 17:13:12 -04:00
Irastris 439cc936a1 Frame interp: wideZoom support 2026-04-17 16:19:20 -04:00
roeming 570d00ee8c Update src/d/actor/d_a_npc_inko.cpp
Co-authored-by: Pieter-Jan Briers <pieterjan.briers+git@gmail.com>
2026-04-17 15:14:00 -04:00
roeming 7ae1818550 add uninitialized variable fix 2026-04-17 15:05:12 -04:00
MelonSpeedruns 8afb1141ab Autosave when changing rooms 2026-04-17 13:41:56 -04:00
MelonSpeedruns 4ddd243eca Auto-Hide Cursor after 3 seconds if F1 menu not open 2026-04-17 13:22:19 -04:00
MelonSpeedruns 8c5673d9b8 autosave when loading scene 2026-04-17 13:12:20 -04:00
MelonSpeedruns 916dfcd9da Merge remote-tracking branch 'origin/main' into feature/autosave
# Conflicts:
#	src/dusk/imgui/ImGuiConsole.cpp
2026-04-17 12:10:24 -04:00
Lurs edea6a1418 fix #260 and potentially more 2026-04-17 16:12:53 +02:00
gymnast86 9614614981 remove unecessary comment 2026-04-17 01:32:50 -07:00
gymnast86 4e433f646b Merge branch 'main' of https://github.com/TwilitRealm/dusk into instant-text 2026-04-17 01:30:19 -07:00
gymnast86 5ba04524eb implement instant text setting 2026-04-17 01:30:08 -07:00
CraftyBoss e566202c26 change android icon to not-midna icon 2026-04-16 23:58:27 -07:00
Luke Street f293281eb2 Merge pull request #408 from TwilitRealm/ci-2
macOS CI, iOS file picker, icons, safe area avoidance

Resolves #382
2026-04-17 00:00:34 -06:00
Luke Street e9689f9abb Disable macOS x86_64 for now 2026-04-16 23:47:52 -06:00
Luke Street 36bfce534c Only upload artifacts on tag builds 2026-04-16 23:46:49 -06:00
Luke Street 8ba1133e34 iOS file picker, ImGui drag scroll & more 2026-04-16 23:26:27 -06:00
Luke Street 2db4040843 Make HUD viewport respect SDL_GetWindowSafeArea 2026-04-16 22:47:02 -06:00
Luke Street f2848f0be0 Add iOS and macOS icons 2026-04-16 22:44:52 -06:00
Irastris 363788accd Frame interp: Cap the accumulator 2026-04-16 23:29:13 -04:00
TakaRikka d9a0ef760f fix icon positions 2026-04-16 19:46:02 -07:00
Irastris c7de341484 Frame interp: Ganondorf's Cape 2026-04-16 22:29:44 -04:00
MelonSpeedruns 842210e539 remove scene autosave cause that's buggy atm 2026-04-16 19:56:04 -04:00
MelonSpeedruns 39d951d0cb scene saving now works 2026-04-16 19:50:20 -04:00
MelonSpeedruns a4be0841e5 autosave WIP 2026-04-16 19:30:37 -04:00
TakaRikka b182e18fab Merge pull request #407 from TwilitRealm/event-flag-table
Add UI for better manipulation of event flags
2026-04-16 16:30:31 -07:00
roeming 72a73ba661 Add UI for better manipulation of event flags 2026-04-16 19:11:20 -04:00
Luke Street d882ce47fc Merge remote-tracking branch 'origin/main' into ci-2 2026-04-16 16:34:55 -06:00
MelonSpeedruns 2cc11c74b7 Lots of Imgui Adjustments (#405)
- Store if the F1 menu is open for the next boot
- Auto-save controller changes without having the press the Save button
- Changed FPS X position so it doesn't clip to the right of the window
- Changed F1 Toast to be 2.5 secs so it doesn't go over the title screen

Co-authored-by: MelonSpeedruns <melonspeedruns@stratobox.net>
2026-04-16 13:58:39 -06:00
Irastris c7d9a8733f Gyro: Revisions & Rollgoal Mirror Mode 2026-04-16 15:31:58 -04:00
TakaRikka 95470b830f wip map mirror 2026-04-16 05:55:46 -07:00
TakaRikka 88bdea1fd3 mirror minimap 2026-04-16 04:46:06 -07:00
TakaRikka 6c055d462f Merge branch 'main' of https://github.com/TakaRikka/dusk 2026-04-16 03:33:24 -07:00
TakaRikka dd84c3f46d add get item flags to save editor 2026-04-16 03:33:16 -07:00
Irastris 3db0281088 Gyro: ROLLGOAL! 2026-04-16 05:17:50 -04:00
TakaRikka 8230ebcced Merge branch 'main' of https://github.com/TakaRikka/dusk 2026-04-16 01:44:51 -07:00
TakaRikka a2882711ee add dungeon item flags to save editor 2026-04-16 01:44:44 -07:00
Jasper St. Pierre 6bc1d3d847 bloom blend tweakk 2026-04-16 01:05:03 -07:00
Jasper St. Pierre 06e6a97ee7 e&c 2026-04-16 00:43:13 -07:00
Jasper St. Pierre ff92ba3abc bloom viewport fix 2026-04-16 00:22:40 -07:00
Luke Street 5c61c5ede8 Add Bloom debug window 2026-04-16 00:34:17 -06:00
Luke Street 98b0c8296e And this too 2026-04-15 23:01:37 -06:00
Luke Street 269505a69f Fix bloom viewport hack 2026-04-15 22:36:37 -06:00
Irastris 433f058aea Frame interp: Revised camera system
FOV is now smooth, and the individual hacks for stars and Epona's reins are removed
2026-04-16 00:04:32 -04:00
SuperDude88 1c057bb24a Fix Unloading Gates (#397)
* Fix Unloading Gates

- Fix CitS/Lakebed gates not loading if you don't restart the game between the different instances

Comment should be upstreamed to decomp (+ daDsh_c brief should be changed from "Death Sword Shutter Gate" which isn't accurate)

* Clarify Comment

- Add details about GC/Wii vs TPHD
2026-04-15 20:00:05 -06:00
MelonSpeedruns 31c5397ae3 Gamepad Color Implementation 2026-04-15 14:36:20 -04:00
Howard Luck b0b1978c76 Fix dangling daMyna_c file-statics across scenes (#392) 2026-04-15 10:52:30 -06:00
Irastris 965e958222 Consolidate the Enhancements menu (#349)
* Consolidate the Enhancements menu

* Merge "main" branch again

* added Preferences separator
2026-04-15 09:11:30 -06:00
Pieter-Jan Briers 8de4863426 Validate that provided ISO is GZ2E01 in pre-launch UI (#390)
Fixes #377
2026-04-15 09:10:56 -06:00
Howard Luck 9235833413 Fix OSGetTime overflow on iOS/Android (#389)
* Fix OSGetTime overflow on iOS/Android

* Fetch latest aurora main
2026-04-15 09:10:45 -06:00
PJB3005 a0e9ee73a8 Fix mDoExt_3DlineMat0_c drawing
Fixes shadow beast hair etc, fixes #204

Regression introduced by https://github.com/TwilitRealm/dusk/commit/fe21abb1ec1a9f4fc320dfb191be58e864bc079c#diff-1c53210cfc3c1892c88d6c56110608fa017738f0b099e2cf5766f9107cefa4e8L2382-R2386
2026-04-15 15:17:03 +02:00
TakaRikka 99fd2f9bc5 save editor minigame tab / item amounts 2026-04-15 05:00:38 -07:00
TakaRikka 7eb61b71f1 some save editor cleanup 2026-04-15 04:29:33 -07:00
Luke Street 2a49673dce Merge branch 'main' into ci-2 2026-04-14 23:06:04 -06:00
Luke Street 20e958bf12 Update macOS CI stuff 2 2026-04-14 22:33:06 -06:00
TakaRikka d8df116047 Merge pull request #386 from TwilitRealm/fix/telma_dialog
Fix Missing Telma Dialog During Escort
2026-04-14 20:39:32 -07:00
Luke Street d432fbcd10 Update macOS CI stuff 2026-04-14 21:27:07 -06:00
Pheenoh 5f69895326 Merge remote-tracking branch 'origin/main' into fix/telma_dialog 2026-04-14 21:05:29 -06:00
TakaRikka 194cb94d43 Merge pull request #380 from TwilitRealm/feature/disable-main-hud
Disable Main HUD Feature
2026-04-14 20:03:23 -07:00
TakaRikka 22535ba84d Merge pull request #379 from TwilitRealm/minigame-wide-hud
Widescreen Minigame Counters
2026-04-14 20:02:41 -07:00
Pheenoh ab65f42816 Wait to finish creating Telma actor during escort on PC until the player is loaded 2026-04-14 20:47:30 -06:00
Irastris 0508acaa79 Frame interp: Dreamworks' Turbo (2013) 2026-04-14 21:59:24 -04:00
Luke Street bf83f40ec5 Update rustup command for iOS 2026-04-14 19:21:13 -06:00
Luke Street ada67f1be1 Try self-hosted macOS/iOS builds 2026-04-14 18:06:49 -06:00
Phillip Stephens d876c62822 Fix missing libusb in Linux AppImage (#384) 2026-04-14 17:49:08 -06:00
Luke Street c26b05b1dd Update CI for self-hosted runners 2026-04-14 16:15:55 -06:00
Irastris 97c459a614 Frame interp: GOAT IN! 2026-04-14 17:51:00 -04:00
Irastris cd9bb31b02 Frame interp: Howl 2 Electric Boogaloo 2026-04-14 17:17:29 -04:00
Irastris e37c912053 Frame interp: Stable keying for simple shadows 2026-04-14 16:55:24 -04:00
MelonSpeedruns 4e42af6cd8 Disable Main HUD Feature 2026-04-14 15:43:52 -04:00
Irastris 87a95fb1b8 Frame interp: Howl UI scrolling dot 2026-04-14 15:27:29 -04:00
MelonSpeedruns 83b210e26c Widescreen minigame counters 2026-04-14 15:10:28 -04:00
Luke Street 158f31d056 Patch Twilight Hack 2026-04-14 11:33:14 -06:00
Irastris 3bcb07dba4 Frame interp: Title logo presentation sync & minor sync refactor 2026-04-14 12:22:08 -04:00
madeline 86bea34bb2 Merge branch 'main' of https://github.com/TakaRikka/dusk 2026-04-14 07:07:23 -07:00
madeline 09e9c6ad34 redo keybinds for debug tab 2026-04-14 07:07:19 -07:00
TakaRikka 0d76b90144 Merge branch 'main' of https://github.com/TakaRikka/dusk into speedrun-timer 2026-04-14 04:10:28 -07:00
TakaRikka 54db8e4b5b Merge pull request #370 from TwilitRealm/android-building
Android building
2026-04-14 03:20:13 -07:00
CraftyBoss ec091ac3af change ANDROID define to TARGET_ANDROID 2026-04-14 03:18:21 -07:00
CraftyBoss 35650784c3 Merge branch 'main' into android-building 2026-04-14 03:17:07 -07:00
CraftyBoss 86c1e21ac1 fix compilation error
GlyphTextures no longer exists
2026-04-14 03:07:47 -07:00
CraftyBoss a2f8fffc8d Merge branch 'main' into android-building 2026-04-14 02:48:24 -07:00
CraftyBoss ddfe21b18a fix shadow resolution changing causing a crash
operator delete[] was used instead of JKR_DELETE_ARRAY, which causes standard allocator to freak out
2026-04-14 02:45:16 -07:00
TakaRikka 93450dce7b Merge pull request #367 from TwilitRealm/flake
Add flake.nix to build on NixOS
2026-04-14 02:41:18 -07:00
TakaRikka 38cfaae940 Merge pull request #360 from TwilitRealm/26-04-13-font-opts
Text Rendering optimizations
2026-04-14 02:38:59 -07:00
TakaRikka 7e56747e33 Merge pull request #359 from TwilitRealm/feature/time-stones
Sun's Song
2026-04-14 02:38:10 -07:00
TakaRikka 72a97d62d8 Merge pull request #136 from TwilitRealm/26-03-27-better-mapping
Show better button names in controller mapping UI
2026-04-14 02:35:49 -07:00
madeline 130e5c9502 Merge branch 'main' of https://github.com/TakaRikka/dusk 2026-04-14 01:55:18 -07:00
madeline 505ef363fd more save state fixes 2026-04-14 01:55:14 -07:00
CraftyBoss b7f3dbb8b3 Merge remote-tracking branch 'origin/main' into android-building
# Conflicts:
#	CMakeLists.txt
2026-04-14 01:03:50 -07:00
Luke Street 27d95c37d5 Create log files under configDir/logs; seed initial pipeline cache 2026-04-14 01:32:58 -06:00
Luke Street 588910c642 Fix DUSK_VERSION_STRING on tag commits 2026-04-14 01:13:43 -06:00
Luke Street 00803b53ab I'm silly 2026-04-14 00:57:45 -06:00
Luke Street 4b8248b130 Integrate Sentry crash reporting for public builds 2026-04-14 00:43:56 -06:00
Irastris d32dc7481e Frame interp: Initial presentation sync implementation 2026-04-14 02:41:11 -04:00
madeline e08807f44f style 2026-04-13 23:34:57 -07:00
Irastris 8ea0352fed Frame interp: Initial presentation sync implementation 2026-04-14 02:33:44 -04:00
madeline 7f6696715a fix crash when loading states with ZA from title screen 2026-04-13 23:23:07 -07:00
madeline c27a2a3b75 fix -4 properly 2026-04-13 22:33:53 -07:00
madeline 863ce9117d fix bugs on exporting during fade 2026-04-13 22:20:50 -07:00
madeline c5c7e89b13 fix -4 bug 2026-04-13 22:05:30 -07:00
madeline 0e25434c17 state share feature 2026-04-13 21:55:55 -07:00
madeline 48c9f1e984 fix menu capture crash fixes #300 2026-04-13 20:08:48 -07:00
madeline 62fc79425e Merge branch 'main' of https://github.com/TakaRikka/dusk 2026-04-13 19:35:33 -07:00
madeline 266f36118f fix hot springs water 2026-04-13 19:35:29 -07:00
Jasper St. Pierre c6e67daeac d_drawlist: shadow fix
dDlst_shadowControl_c::reset() is called every frame, dDlst_shadowControl_c::init() is not. Fix up dDlst_shadowControl_c::init() to not leak and reset its own data when needed, and remove texture reset calls which tear down the texobj.
2026-04-13 19:34:25 -07:00
Jasper St. Pierre 03a46635a0 d_drawlist: naming cleanup 2026-04-13 19:34:25 -07:00
Luke Street 3f92989af8 Add Win32 resources, icon & copy DLLs/res to install 2026-04-13 20:27:59 -06:00
Luke Street b5d2ded2ca Hide Win32 console by default, show with --console/DUSK_CONSOLE=1 2026-04-13 20:25:44 -06:00
kipcode66 5155270fd3 Add flake.nix to build on NixOS 2026-04-13 22:17:06 -04:00
Luke Street 7136c90336 Add Dusk logo to imgui prelaunch 2026-04-13 19:25:59 -06:00
Luke Street 50a8ebab28 Move CMakePresets windows build dirs from out/build/ to build/ 2026-04-13 19:24:03 -06:00
MelonSpeedruns d865c82f76 Added howling anywhere (R+X) 2026-04-13 18:08:05 -04:00
Lurs 3252d70276 Add slider functionality to classic bloom too 2026-04-13 23:58:15 +02:00
Lurs b3f2ae63b3 Add slider for bloom brightness 2026-04-13 23:35:21 +02:00
MelonSpeedruns ad94d9656f Merge branch 'main' into feature/time-stones 2026-04-13 16:44:00 -04:00
Luke Street 49215dbc7b bloom2: Rework divRects calc 2026-04-13 14:14:19 -06:00
Luke Street fba3114d4f bloom2: Ensure draws/copies are pixel aligned 2026-04-13 14:00:32 -06:00
Luke Street b3cc9ba02e Add "Bloom Mode" config option (Off, Classic, Dusk) 2026-04-13 13:06:14 -06:00
Jasper St. Pierre a3a36508d6 bloom2 work 2026-04-13 11:26:56 -07:00
PJB3005 143aa51eb3 Make JUTResFont load all texture data into one texture
Together with the previous change, this enables entire blocks of text to be rendered in one draw call.
2026-04-13 19:09:16 +02:00
MelonSpeedruns e3b3eabfeb oops forgot a define somewhere 2026-04-13 13:05:11 -04:00
MelonSpeedruns f15a4f07e5 Time Stones now with Song of Time 2026-04-13 13:03:28 -04:00
MelonSpeedruns 277d16c110 Time Stones Feature 2026-04-13 10:46:09 -04:00
PJB3005 18995f3d7c Enable some draw call merging in text rendering
Don't set state between characters if possible.

Next step is page merging so it can do full lines of text at once.
2026-04-13 13:27:21 +02:00
CraftyBoss 5e6d240d0f Merge remote-tracking branch 'origin/main' into android-building 2026-04-13 01:05:16 -07:00
madeline a6690c2052 speedrun timer 2026-04-12 23:22:25 -07:00
CraftyBoss fbec777b0a bump sdk & gradle version, add game mode data to manifest 2026-04-12 20:04:31 -07:00
CraftyBoss 8cd8d1b90c Merge remote-tracking branch 'origin/main' into android-building 2026-04-12 20:02:23 -07:00
CraftyBoss fc659b966f Merge branch 'main' into android-building 2026-04-12 03:34:51 -07:00
CraftyBoss 7e1e193f64 adjust logging to use std funcs, hide all system bars from showing 2026-04-12 03:32:58 -07:00
CraftyBoss 75a4fe4429 Merge remote-tracking branch 'origin/main' into android-building 2026-04-12 02:53:05 -07:00
PJB3005 6a07f82425 Merge branch 'main' into 26-03-27-better-mapping 2026-04-11 20:03:40 +02:00
CraftyBoss 1a91c77a64 rename all metaforce related things to Dusk 2026-04-10 21:59:03 -07:00
CraftyBoss 0649aa4828 Merge branch 'main' into android-building 2026-04-10 18:36:37 -07:00
CraftyBoss 4ec4cd363e only check if iso path is not empty on android, split log messages by newlines to prevent truncation
SDL_GetPathInfo doesnt seem able to get valid info from android, or theres some weird permission thing going on
2026-04-10 18:35:40 -07:00
CraftyBoss d01f6bafff use android logging func for aurora_log_callback 2026-04-10 15:13:11 -07:00
CraftyBoss 627cf559c9 building for android impl
currently builds a "Metaforce" apk, will need to change name of course. Running the apk using Android Studio's emulator can get in game, however running on a samsung phone does not seem to work.
2026-04-10 03:53:57 -07:00
PJB3005 7e797b2320 Merge branch 'main' into 26-03-27-better-mapping 2026-04-10 03:50:32 +02:00
PJB3005 228a305110 Show better button names in controller mapping UI
Requires https://github.com/encounter/aurora/pull/68
2026-03-27 19:52:09 +01:00
520 changed files with 45471 additions and 4668 deletions
+1 -1
View File
@@ -2,7 +2,7 @@
Language: Cpp
Standard: C++03
AccessModifierOffset: -4
AlignAfterOpenBracket: Align
AlignAfterOpenBracket: DontAlign
AlignConsecutiveAssignments: false
AlignConsecutiveDeclarations: false
AlignOperands: true
+115 -47
View File
@@ -10,6 +10,7 @@ on:
env:
SCCACHE_GHA_ENABLED: "true"
RUSTC_WRAPPER: "sccache"
SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
jobs:
build-linux:
@@ -24,10 +25,10 @@ jobs:
runner: ubuntu-latest
preset: gcc
artifact_arch: x86_64
- name: GCC aarch64
runner: ubuntu-24.04-arm
preset: gcc
artifact_arch: aarch64
# - name: GCC aarch64
# runner: ubuntu-24.04-arm
# preset: gcc
# artifact_arch: aarch64
# - name: Clang x86_64
# runner: ubuntu-latest
# preset: clang
@@ -46,10 +47,13 @@ jobs:
zlib1g-dev libglu1-mesa-dev libdbus-1-dev libvulkan-dev libxi-dev libxrandr-dev libasound2-dev \
libpulse-dev libudev-dev libpng-dev libncurses5-dev libx11-xcb-dev libfreetype-dev \
libxinerama-dev libxcursor-dev python3-markupsafe libgtk-3-dev libssl-dev \
libxss-dev libfuse2
libxss-dev libfuse2 libusb-1.0-0-dev libdecor-0-dev libpipewire-0.3-dev libunwind-dev
- name: Setup sccache
uses: mozilla-actions/sccache-action@v0.0.9
uses: mozilla-actions/sccache-action@v0.0.10
- name: Print sccache stats
run: sccache --show-stats
- name: Configure CMake
run: cmake --preset x-linux-ci-${{matrix.preset}}
@@ -63,12 +67,11 @@ jobs:
- name: Upload artifacts
uses: actions/upload-artifact@v7
with:
name: dusk-${{env.DUSK_VERSION}}-linux-${{matrix.preset}}-${{matrix.artifact_arch}}
name: dusklight-${{env.DUSK_VERSION}}-linux-${{matrix.preset}}-${{matrix.artifact_arch}}
path: |
build/install/Dusk-*.AppImage
build/install/Dusklight-*.AppImage
build/install/debug.tar.*
build-apple:
name: Build Apple (${{matrix.name}})
runs-on: macos-latest
@@ -76,15 +79,19 @@ jobs:
fail-fast: false
matrix:
include:
- name: AppleClang macOS universal
- name: AppleClang macOS arm64
platform: macos
preset: x-macos-ci
artifact_name: macos-appleclang-universal
# - name: AppleClang iOS arm64 # TODO enable when CI is free
# platform: ios
# preset: x-ios-ci
# artifact_name: ios-appleclang-arm64
# - name: AppleClang tvOS arm64 # TODO enable when CI is free
preset: x-macos-ci-arm64
artifact_name: macos-appleclang-arm64
- name: AppleClang macOS x86_64
platform: macos
preset: x-macos-ci-x86_64
artifact_name: macos-appleclang-x86_64
- name: AppleClang iOS arm64
platform: ios
preset: x-ios-ci
artifact_name: ios-appleclang-arm64
# - name: AppleClang tvOS arm64
# platform: tvos
# preset: x-tvos-ci
# artifact_name: tvos-appleclang-arm64
@@ -95,22 +102,14 @@ jobs:
fetch-depth: 0
submodules: recursive
- name: Update Homebrew
if: matrix.platform == 'tvos'
run: |
brew update
brew upgrade --formula
- name: Install dependencies
run: brew install cmake ninja
- name: Install markupsafe
if: matrix.platform == 'tvos'
run: pip3 install --break-system-packages markupsafe
- name: Install Rust iOS target
if: matrix.platform == 'ios'
run: rustup target add aarch64-apple-ios
run: |
rustup toolchain install stable
rustup target add aarch64-apple-ios
- name: Install Rust tvOS target
if: matrix.platform == 'tvos'
@@ -118,8 +117,14 @@ jobs:
rustup toolchain install nightly
rustup target add --toolchain nightly aarch64-apple-tvos
- name: Install Rust x86_64 macOS target
if: endsWith(matrix.preset, 'x86_64')
run: |
rustup toolchain install stable
rustup target add x86_64-apple-darwin
- name: Setup sccache
uses: mozilla-actions/sccache-action@v0.0.9
uses: mozilla-actions/sccache-action@v0.0.10
- name: Configure CMake
run: cmake --preset ${{matrix.preset}}
@@ -130,19 +135,82 @@ jobs:
- name: Upload artifacts
uses: actions/upload-artifact@v7
with:
name: dusk-${{env.DUSK_VERSION}}-${{matrix.artifact_name}}
name: dusklight-${{env.DUSK_VERSION}}-${{matrix.artifact_name}}
path: |
build/install/Dusk.app
build/install/Dusklight.app
build/install/debug.tar.*
build-android:
name: Build Android (${{matrix.name}})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- name: Clang arm64-v8a
preset: x-android-ci-arm64
abi: arm64-v8a
artifact_arch: arm64
rust_target: aarch64-linux-android
env:
ANDROID_NDK_VERSION: "29.0.14206865"
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
submodules: recursive
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get -y install ninja-build
- name: Setup Java
uses: actions/setup-java@v5
with:
distribution: temurin
java-version: 17
- name: Setup Android SDK
uses: android-actions/setup-android@v4
- name: Install Android SDK packages
run: sdkmanager "platforms;android-36" "build-tools;36.1.0" "ndk;${ANDROID_NDK_VERSION}"
- name: Install Rust Android target
run: |
rustup toolchain install stable
rustup target add ${{matrix.rust_target}}
- name: Setup sccache
uses: mozilla-actions/sccache-action@v0.0.10
- name: Configure CMake
run: cmake --preset ${{matrix.preset}}
- name: Build native library
run: cmake --build --preset ${{matrix.preset}} --target dusklight
- name: Stage stripped JNI library
run: ANDROID_STAGE_ABIS="${{matrix.abi}}" platforms/android/scripts/stage-jni-libs.sh
- name: Build APK
working-directory: platforms/android
run: ./gradlew :app:assembleRelease --rerun-tasks
- name: Upload artifacts
uses: actions/upload-artifact@v7
with:
name: dusklight-${{env.DUSK_VERSION}}-android-${{matrix.artifact_arch}}
path: platforms/android/app/build/outputs/apk/release/app-${{matrix.abi}}-release-unsigned.apk
build-windows:
name: Build Windows (${{matrix.name}})
runs-on: ${{matrix.runner}}
env:
BUILD_DIR: C:\build
SCCACHE_DIR: C:\sccache
strategy:
fail-fast: false
matrix:
@@ -153,12 +221,12 @@ jobs:
msvc_arch: amd64
vcpkg_arch: x64
artifact_arch: x86_64
- name: MSVC arm64
runner: windows-11-arm
preset: arm64-msvc
msvc_arch: arm64
vcpkg_arch: arm64
artifact_arch: arm64
# - name: MSVC arm64
# runner: windows-11-arm
# preset: arm64-msvc
# msvc_arch: arm64
# vcpkg_arch: arm64
# artifact_arch: arm64
# - name: Clang x86_64
# runner: windows-latest
# preset: clang
@@ -187,9 +255,7 @@ jobs:
- name: Install dependencies
run: |
choco install ninja
vcpkg install zlib:${{matrix.vcpkg_arch}}-windows-static bzip2:${{matrix.vcpkg_arch}}-windows-static `
zstd:${{matrix.vcpkg_arch}}-windows-static liblzma:${{matrix.vcpkg_arch}}-windows-static `
freetype:${{matrix.vcpkg_arch}}-windows-static
vcpkg install freetype:${{matrix.vcpkg_arch}}-windows-static zstd:${{matrix.vcpkg_arch}}-windows-static
- name: Configure CMake
run: cmake --preset x-windows-ci-${{matrix.preset}}
@@ -200,7 +266,9 @@ jobs:
- name: Upload artifacts
uses: actions/upload-artifact@v7
with:
name: dusk-${{env.DUSK_VERSION}}-win32-msvc-${{matrix.artifact_arch}}
name: dusklight-${{env.DUSK_VERSION}}-win32-msvc-${{matrix.artifact_arch}}
path: |
${{env.BUILD_DIR}}/install/*.exe
${{env.BUILD_DIR}}/install/debug.7z
build/install/*.exe
build/install/*.dll
build/install/res/
build/install/debug.7z
+5
View File
@@ -1,6 +1,7 @@
# IDE folders
.idea/
.vs/
.zed/
# Caches
__pycache__
@@ -41,6 +42,10 @@ compile_commands.json
# MacOS
.DS_Store
# direnv / nix
.direnv/
.envrc
# ISOs
*.iso
+2 -2
View File
@@ -2,11 +2,11 @@
"version": "0.2.0",
"configurations": [
{
"name": "(gdb) Launch Dusk MSVC",
"name": "(gdb) Launch Dusklight MSVC",
"type": "cppvsdbg",
"request": "launch",
"program": "${command:cmake.launchTargetPath}",
"args": ["-l", "1", "--dvd", "${workspaceRoot}/orig/GZ2E01/GZ2E01.iso"],
"args": ["-l", "1", "--dvd", "${workspaceRoot}/orig/GZ2E01/GZ2E01.iso", "--console"],
"MIMode": "gdb",
"miDebuggerPath": "gdb",
"symbolSearchPath": "${command:cmake.launchTargetPath}",
+1 -1
View File
@@ -1,5 +1,5 @@
{
"cmake.buildDirectory": "${workspaceFolder}/build/dusk/${buildType}/${variant:tp_version}",
"cmake.buildDirectory": "${workspaceFolder}/build/dusklight/${buildType}/${variant:tp_version}",
"cmake.generator": "Ninja",
"cmake.configureSettings": {
"CMAKE_EXPORT_COMPILE_COMMANDS": "ON"
+390 -134
View File
@@ -5,8 +5,19 @@ if (NOT CMAKE_BUILD_TYPE)
"Build type options: Debug Release RelWithDebInfo MinSizeRel" FORCE)
endif ()
# obtain revision info from git
find_package(Git)
set(DUSK_VERSION_OVERRIDE "" CACHE STRING "Override version string (skips git detection and format validation)")
if (DUSK_VERSION_OVERRIDE)
set(DUSK_WC_DESCRIBE "${DUSK_VERSION_OVERRIDE}")
set(DUSK_VERSION_STRING "0.0.0.0")
set(DUSK_SHORT_VERSION_STRING "0.0.0")
set(DUSK_WC_REVISION "")
set(DUSK_WC_BRANCH "")
set(DUSK_WC_DATE "")
message(STATUS "Dusklight version overridden to ${DUSK_WC_DESCRIBE}")
else ()
# obtain revision info from git
find_package(Git)
if (GIT_FOUND)
# make sure version information gets re-run when the current Git HEAD changes
execute_process(WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} COMMAND ${GIT_EXECUTABLE} rev-parse --git-path HEAD
@@ -48,21 +59,33 @@ else ()
message(STATUS "Unable to find git, commit information will not be available")
endif ()
if (DUSK_WC_DESCRIBE)
string(REGEX REPLACE "v([0-9]+)\.([0-9]+)\.([0-9]+)\-([0-9]+).*" "\\1.\\2.\\3.\\4" DUSK_VERSION_STRING "${DUSK_WC_DESCRIBE}")
string(REGEX REPLACE "v([0-9]+)\.([0-9]+)\.([0-9]+).*" "\\1.\\2.\\3" DUSK_SHORT_VERSION_STRING "${DUSK_WC_DESCRIBE}")
if (DUSK_WC_DESCRIBE MATCHES "^v([0-9]+)\\.([0-9]+)\\.([0-9]+)([-+].*)?$")
set(DUSK_SHORT_VERSION_STRING "${CMAKE_MATCH_1}.${CMAKE_MATCH_2}.${CMAKE_MATCH_3}")
set(DUSK_VERSION_TWEAK "0")
if (DUSK_WC_DESCRIBE MATCHES "^v[0-9]+\\.[0-9]+\\.[0-9]+-([0-9]+)(-dirty)?$")
set(DUSK_VERSION_TWEAK "${CMAKE_MATCH_1}")
elseif (DUSK_WC_DESCRIBE MATCHES "^v[0-9]+\\.[0-9]+\\.[0-9]+-[0-9A-Za-z.-]+-([0-9]+)(-dirty)?$")
set(DUSK_VERSION_TWEAK "${CMAKE_MATCH_1}")
endif ()
set(DUSK_VERSION_STRING "${DUSK_SHORT_VERSION_STRING}.${DUSK_VERSION_TWEAK}")
else ()
set(DUSK_WC_DESCRIBE "UNKNOWN-VERSION")
set(DUSK_VERSION_STRING "0.0.0")
set(DUSK_VERSION_STRING "0.0.0.0")
set(DUSK_SHORT_VERSION_STRING "0.0.0")
endif ()
endif ()
# Add version information to CI environment variables
if(DEFINED ENV{GITHUB_ENV})
file(APPEND "$ENV{GITHUB_ENV}" "DUSK_VERSION=${DUSK_WC_DESCRIBE}\n")
endif()
message(STATUS "Dusk version set to ${DUSK_WC_DESCRIBE}")
message(STATUS "Dusklight version set to ${DUSK_WC_DESCRIBE}")
message(STATUS "Build type: ${CMAKE_BUILD_TYPE}")
project(dusk LANGUAGES C CXX VERSION ${DUSK_VERSION_STRING})
project(dusklight LANGUAGES C CXX VERSION ${DUSK_VERSION_STRING})
if (APPLE)
enable_language(OBJC OBJCXX)
endif ()
if (APPLE AND NOT TVOS AND CMAKE_SYSTEM_NAME STREQUAL tvOS)
# ios.toolchain.cmake hack for SDL
set(TVOS ON)
@@ -82,25 +105,46 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
# Folder-based instead of target-based organization
# in Visual Studio and Xcode generators
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
set_property(GLOBAL PROPERTY PREDEFINED_TARGETS_FOLDER "_cmake")
if (CMAKE_SYSTEM_NAME STREQUAL Linux)
set(DAWN_USE_WAYLAND ON CACHE BOOL "Enable support for Wayland surface" FORCE)
endif ()
set(AURORA_ENABLE_DVD ON CACHE BOOL "Enable DVD API support" FORCE)
set(AURORA_ENABLE_CARD ON CACHE BOOL "Enable CARD API support" FORCE)
set(AURORA_ENABLE_RMLUI ON CACHE BOOL "Enable RmlUi UI support" FORCE)
add_subdirectory(extern/aurora EXCLUDE_FROM_ALL)
target_compile_definitions(aurora_mtx PRIVATE MTX_USE_PS=1)
add_subdirectory(libs/freeverb)
option(DUSK_BUILD_WARNINGS "Enable compiler warnings (off by default)")
option(DUSK_SELECTED_OPT "If on, selected parts of the project will be compiled with optimizations on Debug, intending to make the game run at 30 FPS. Note for MSVC: you will need to remove '/RTC1' from your debug flags in CMake.")
option(DUSK_MOVIE_SUPPORT "If on, compile against libjpeg-turbo to enable THP file decoding" ON)
option(DUSK_ENABLE_UPDATE_CHECKER "Enable update checking support" ON)
option(DUSK_ENABLE_SENTRY_NATIVE "Enable sentry-native crash reporting support" OFF)
set(DUSK_SENTRY_DSN "" CACHE STRING "Sentry DSN")
set(DUSK_SENTRY_ENVIRONMENT "development" CACHE STRING "Sentry environment")
# Edit & Continue
if (MSVC)
if ("${CMAKE_MSVC_DEBUG_INFORMATION_FORMAT}" STREQUAL "" AND CMAKE_BUILD_TYPE STREQUAL "Debug")
set(CMAKE_MSVC_DEBUG_INFORMATION_FORMAT "EditAndContinue")
endif ()
if (CMAKE_MSVC_DEBUG_INFORMATION_FORMAT STREQUAL "EditAndContinue")
add_link_options("/INCREMENTAL")
endif ()
endif ()
if (DUSK_MOVIE_SUPPORT)
find_package(libjpeg-turbo QUIET)
find_package(libjpeg-turbo 3.0 CONFIG QUIET)
if (libjpeg-turbo_FOUND)
message(STATUS "dusk: Using system libjpeg-turbo")
message(STATUS "dusklight: Using system libjpeg-turbo")
else ()
message(STATUS "dusk: Fetching libjpeg-turbo")
message(STATUS "dusklight: Fetching libjpeg-turbo")
include(ExternalProject)
set(_jpeg_install_dir ${CMAKE_BINARY_DIR}/libjpeg-turbo-install)
if (WIN32)
@@ -108,19 +152,40 @@ if (DUSK_MOVIE_SUPPORT)
else ()
set(_jpeg_lib ${_jpeg_install_dir}/lib/libturbojpeg.a)
endif ()
set(_jpeg_cmake_args
-DCMAKE_INSTALL_PREFIX=${_jpeg_install_dir}
-DENABLE_SHARED=OFF
-DWITH_TURBOJPEG=ON
-DWITH_JAVA=OFF
)
if (CMAKE_TOOLCHAIN_FILE)
get_filename_component(_jpeg_toolchain_file "${CMAKE_TOOLCHAIN_FILE}" ABSOLUTE BASE_DIR "${CMAKE_SOURCE_DIR}")
list(APPEND _jpeg_cmake_args -DCMAKE_TOOLCHAIN_FILE=${_jpeg_toolchain_file})
endif ()
set(_jpeg_passthrough_vars
ANDROID_ABI
ANDROID_PLATFORM
CMAKE_BUILD_TYPE
CMAKE_C_COMPILER
CMAKE_C_COMPILER_LAUNCHER
CMAKE_MAKE_PROGRAM
CMAKE_MSVC_RUNTIME_LIBRARY
CMAKE_MSVC_DEBUG_INFORMATION_FORMAT
CMAKE_OSX_ARCHITECTURES
DEPLOYMENT_TARGET
ENABLE_ARC
ENABLE_BITCODE
PLATFORM
)
foreach(_var IN LISTS _jpeg_passthrough_vars)
if (DEFINED ${_var})
list(APPEND _jpeg_cmake_args -D${_var}=${${_var}})
endif ()
endforeach ()
ExternalProject_Add(libjpeg-turbo-ext
URL https://github.com/libjpeg-turbo/libjpeg-turbo/archive/refs/tags/3.1.0.tar.gz
URL_HASH SHA256=35fec2e1ddfb05ecf6d93e50bc57c1e54bc81c16d611ddf6eff73fff266d8285
CMAKE_ARGS
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
-DCMAKE_INSTALL_PREFIX=${_jpeg_install_dir}
-DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}
-DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
-DCMAKE_C_COMPILER_LAUNCHER=${CMAKE_C_COMPILER_LAUNCHER}
-DCMAKE_MSVC_RUNTIME_LIBRARY=${CMAKE_MSVC_RUNTIME_LIBRARY}
-DENABLE_SHARED=OFF
-DWITH_TURBOJPEG=ON
-DWITH_JAVA=OFF
CMAKE_ARGS ${_jpeg_cmake_args}
BUILD_BYPRODUCTS ${_jpeg_lib}
)
file(MAKE_DIRECTORY ${_jpeg_install_dir}/include)
@@ -148,34 +213,36 @@ elseif (APPLE)
set(CMAKE_INSTALL_RPATH "$ORIGIN")
set(CMAKE_BUILD_RPATH "$ORIGIN")
elseif (MSVC)
add_compile_options(/bigobj)
add_compile_options(/Zc:strictStrings-)
add_compile_options(/MP)
add_compile_options(/FS)
add_compile_options(
$<$<COMPILE_LANGUAGE:C,CXX>:/bigobj>
$<$<COMPILE_LANGUAGE:C,CXX>:/Zc:strictStrings->
$<$<COMPILE_LANGUAGE:C,CXX>:/MP>
$<$<COMPILE_LANGUAGE:C,CXX>:/FS>
)
if (NOT DUSK_BUILD_WARNINGS)
add_compile_options(/W0)
add_compile_options($<$<COMPILE_LANGUAGE:C,CXX>:/W0>)
else ()
# Disable warnings
add_compile_options(/wd4068) # unknown pragma
add_compile_options(/wd4291) # no matching delete operator, leaks if exception thrown
add_compile_options($<$<COMPILE_LANGUAGE:C,CXX>:/wd4068>) # unknown pragma
add_compile_options($<$<COMPILE_LANGUAGE:C,CXX>:/wd4291>) # no matching delete operator, leaks if exception thrown
# Only show warnings once
add_compile_options(/wo4244) # narrowing conversion, possible data loss
add_compile_options($<$<COMPILE_LANGUAGE:C,CXX>:/wo4244>) # narrowing conversion, possible data loss
endif ()
add_compile_options(/utf-8)
add_compile_options($<$<COMPILE_LANGUAGE:C,CXX>:/utf-8>)
endif ()
include(FetchContent)
# Declare all dependencies first so CMake can download them in parallel
message(STATUS "dusk: Fetching cxxopts")
message(STATUS "dusklight: Fetching cxxopts")
FetchContent_Declare(cxxopts
URL https://github.com/jarro2783/cxxopts/archive/refs/tags/v3.3.1.tar.gz
URL_HASH SHA256=3bfc70542c521d4b55a46429d808178916a579b28d048bd8c727ee76c39e2072
DOWNLOAD_EXTRACT_TIMESTAMP TRUE
)
message(STATUS "dusk: Fetching nlohmann/json")
message(STATUS "dusklight: Fetching nlohmann/json")
FetchContent_Declare(json
URL https://github.com/nlohmann/json/releases/download/v3.12.0/json.tar.xz
URL_HASH SHA256=42f6e95cad6ec532fd372391373363b62a14af6d771056dbfc86160e6dfff7aa
@@ -183,38 +250,130 @@ FetchContent_Declare(json
)
FetchContent_MakeAvailable(cxxopts json)
if (DUSK_ENABLE_SENTRY_NATIVE)
message(STATUS "dusklight: Fetching sentry-native")
set(SENTRY_BUILD_SHARED_LIBS OFF CACHE BOOL "" FORCE)
set(SENTRY_BACKEND crashpad CACHE STRING "" FORCE)
if (WIN32)
set(SENTRY_TRANSPORT winhttp CACHE STRING "" FORCE)
endif ()
set(SENTRY_BUILD_TESTS OFF CACHE BOOL "" FORCE)
set(SENTRY_BUILD_EXAMPLES OFF CACHE BOOL "" FORCE)
set(SENTRY_BUILD_BENCHMARKS OFF CACHE BOOL "" FORCE)
FetchContent_Declare(sentry_native
GIT_REPOSITORY https://github.com/getsentry/sentry-native.git
GIT_TAG 0.13.6
GIT_SHALLOW TRUE
GIT_PROGRESS TRUE
GIT_SUBMODULES_RECURSE TRUE
)
if (NOT sentry_native_POPULATED)
FetchContent_Populate(sentry_native)
set(_dusk_skip_install_rules ${CMAKE_SKIP_INSTALL_RULES})
set(CMAKE_SKIP_INSTALL_RULES ON)
add_subdirectory(${sentry_native_SOURCE_DIR} ${sentry_native_BINARY_DIR} EXCLUDE_FROM_ALL)
set(CMAKE_SKIP_INSTALL_RULES ${_dusk_skip_install_rules})
endif ()
endif ()
# Use signed char on ARM to match the original game (and x86)
string(TOLOWER "${CMAKE_SYSTEM_PROCESSOR}" _arch)
if(_arch MATCHES "^(arm|aarch64)" AND CMAKE_CXX_COMPILER_FRONTEND_VARIANT STREQUAL "GNU")
add_compile_options(-fsigned-char)
endif()
if (CMAKE_SYSTEM_NAME STREQUAL Windows)
set(PLATFORM_NAME win32)
elseif (CMAKE_SYSTEM_NAME STREQUAL Darwin)
if (IOS)
set(PLATFORM_NAME ios)
elseif (TVOS)
set(PLATFORM_NAME tvos)
else ()
set(PLATFORM_NAME macos)
endif ()
else ()
string(TOLOWER CMAKE_SYSTEM_NAME PLATFORM_NAME)
endif ()
configure_file(${CMAKE_SOURCE_DIR}/version.h.in ${CMAKE_BINARY_DIR}/version.h)
include(files.cmake)
# TODO: version handling for res includes
set(DUSK_BUNDLE_NAME Dusk)
set(DUSK_BUNDLE_IDENTIFIER dev.decomp.dusk)
set(DUSK_GAME_NAME "GZ2E")
set(DUSK_GAME_VERSION "01")
set(DUSK_TP_VERSION ${DUSK_GAME_NAME}${DUSK_GAME_VERSION})
set(DUSK_BUNDLE_NAME Dusklight)
set(DUSK_BUNDLE_IDENTIFIER dev.twilitrealm.dusk)
set(DUSK_COMPANY_NAME "Twilit Realm")
set(DUSK_FILE_DESCRIPTION "Dusklight")
set(DUSK_PRODUCT_NAME "Dusklight")
set(DUSK_COPYRIGHT "Copyright (C) Twilit Realm contributors")
message(STATUS "dusk: Game Version: ${DUSK_TP_VERSION}")
source_group("dolzel" FILES ${DOLZEL_FILES} ${Z2AUDIOLIB_FILES} ${REL_FILES})
source_group("dusklight" FILES ${DUSK_FILES} ${DUSK_HTTP_BACKEND_FILES})
source_group("dolzel" FILES ${DOLZEL_FILES} ${Z2AUDIOLIB_FILES} ${JSYSTEM_FILES} ${JSYSTEM_DEBUG_FILES} ${REL_FILES})
source_group("dusk" FILES ${DUSK_FILES})
set(GAME_COMPILE_DEFS TARGET_PC WIDESCREEN_SUPPORT=1 AVOID_UB=1 VERSION=0
DUSK_TP_VERSION="${DUSK_TP_VERSION}" DUSK_GAME_NAME="${DUSK_GAME_NAME}" DUSK_GAME_VERSION="${DUSK_GAME_VERSION}")
set(GAME_COMPILE_DEFS TARGET_PC WIDESCREEN_SUPPORT=1 AVOID_UB=1 VERSION=0 MTX_USE_PS=1)
set(GAME_INCLUDE_DIRS
include
src
assets/${DUSK_TP_VERSION}
assets/GZ2E01 # TODO: make this dynamic if needed?
libs/JSystem/include
libs
extern/aurora/include/dolphin
extern
${CMAKE_BINARY_DIR})
find_package(Threads REQUIRED)
set(GAME_LIBS aurora::core aurora::gx aurora::gd aurora::si aurora::vi aurora::pad aurora::mtx aurora::os aurora::dvd
aurora::card freeverb cxxopts::cxxopts absl::flat_hash_map nlohmann_json::nlohmann_json TracyClient)
aurora::card freeverb cxxopts::cxxopts absl::flat_hash_map nlohmann_json::nlohmann_json TracyClient fmt::fmt
Threads::Threads)
list(APPEND GAME_LIBS libzstd_static)
if (DUSK_ENABLE_SENTRY_NATIVE)
list(APPEND GAME_LIBS sentry)
list(APPEND GAME_COMPILE_DEFS DUSK_ENABLE_SENTRY_NATIVE=1 SENTRY_BUILD_STATIC=1)
endif ()
if (WIN32)
list(APPEND GAME_LIBS Ws2_32)
endif ()
set(DUSK_HTTP_BACKEND_SOURCE src/dusk/http/no_backend.cpp)
if (DUSK_ENABLE_UPDATE_CHECKER)
list(APPEND GAME_COMPILE_DEFS DUSK_ENABLE_UPDATE_CHECKER=1)
if (WIN32)
set(DUSK_HTTP_BACKEND_SOURCE src/dusk/http/winhttp.cpp)
list(APPEND GAME_LIBS winhttp)
list(APPEND GAME_COMPILE_DEFS DUSK_HTTP_BACKEND_WINHTTP=1)
message(STATUS "dusklight: Enabled update checker (WinHTTP)")
elseif (ANDROID)
set(DUSK_HTTP_BACKEND_SOURCE src/dusk/http/android.cpp)
list(APPEND GAME_COMPILE_DEFS DUSK_HTTP_BACKEND_ANDROID=1)
message(STATUS "dusklight: Enabled update checker (Android)")
elseif (APPLE)
find_library(FOUNDATION_FRAMEWORK Foundation REQUIRED)
set(DUSK_HTTP_BACKEND_SOURCE src/dusk/http/url_session.mm)
set_source_files_properties(src/dusk/http/url_session.mm PROPERTIES COMPILE_FLAGS -fobjc-arc)
list(APPEND GAME_LIBS ${FOUNDATION_FRAMEWORK})
list(APPEND GAME_COMPILE_DEFS DUSK_HTTP_BACKEND_URLSESSION=1)
message(STATUS "dusklight: Enabled update checker (NSURLSession)")
elseif (CMAKE_SYSTEM_NAME STREQUAL Linux)
find_package(CURL QUIET OPTIONAL_COMPONENTS HTTPS SSL)
if (CURL_FOUND AND CURL_HTTPS_FOUND AND CURL_SSL_FOUND)
set(DUSK_HTTP_BACKEND_SOURCE src/dusk/http/curl.cpp)
list(APPEND GAME_LIBS CURL::libcurl)
list(APPEND GAME_COMPILE_DEFS DUSK_HTTP_BACKEND_LIBCURL=1)
message(STATUS "dusklight: Enabled update checker (libcurl)")
else ()
message(STATUS "dusklight: Disabled update checker (libcurl + HTTPS/SSL not found)")
endif ()
else ()
message(STATUS "dusklight: Disabled update checker (unsupported platform)")
endif ()
endif ()
list(APPEND DUSK_FILES ${DUSK_HTTP_BACKEND_SOURCE})
if (DUSK_MOVIE_SUPPORT)
if (TARGET libjpeg-turbo::turbojpeg-static)
@@ -225,102 +384,191 @@ if (DUSK_MOVIE_SUPPORT)
list(APPEND GAME_COMPILE_DEFS MOVIE_SUPPORT=1)
endif ()
# Edit & Continue
if (MSVC)
add_compile_options("/ZI")
add_link_options("/INCREMENTAL")
set(DUSK_ENABLE_DISCORD_DEFAULT ON)
if (DEFINED DUSK_ENABLE_DISCORD_RPC AND NOT DEFINED DUSK_ENABLE_DISCORD)
set(DUSK_ENABLE_DISCORD_DEFAULT ${DUSK_ENABLE_DISCORD_RPC})
endif ()
option(DUSK_ENABLE_DISCORD "Enable Discord Rich Presence support" ${DUSK_ENABLE_DISCORD_DEFAULT})
if (DUSK_ENABLE_DISCORD AND NOT ANDROID AND NOT IOS AND NOT TVOS)
list(APPEND GAME_COMPILE_DEFS DUSK_DISCORD=1)
endif ()
if(ANDROID)
list(APPEND GAME_COMPILE_DEFS TARGET_ANDROID=1)
endif ()
# game_debug is for game code files that we know work when compiled with DEBUG=1
# Of course, if building a release build, this distinction is irrelevant
add_library(game_debug OBJECT ${JSYSTEM_DEBUG_FILES} ${SSYSTEM_FILES}
set(GAME_DEBUG_FILES
${SSYSTEM_FILES}
src/dusk/audio/DuskAudioSystem.cpp
src/dusk/audio/JASCriticalSection.cpp
src/dusk/audio/DuskDsp.cpp
src/dusk/audio/Adpcm.cpp
src/dusk/audio/DspStub.cpp
src/dusk/imgui/ImGuiAudio.cpp)
src/dusk/imgui/ImGuiAudio.cpp
)
set_source_files_properties(
${GAME_DEBUG_FILES}
PROPERTIES
COMPILE_DEFINITIONS "$<$<CONFIG:Debug>:DEBUG=1>;$<$<CONFIG:Debug>:PARTIAL_DEBUG=1>"
)
# game_base is for all other game code files
add_library(game_base OBJECT ${DOLZEL_FILES} ${Z2AUDIOLIB_FILES} ${JSYSTEM_FILES} ${REL_FILES} ${DUSK_FILES} ${DOLPHIN_FILES})
target_compile_definitions(game_debug PRIVATE ${GAME_COMPILE_DEFS} $<$<CONFIG:Debug>:DEBUG=1> $<$<CONFIG:Debug>:PARTIAL_DEBUG=1>)
target_compile_definitions(game_base PRIVATE ${GAME_COMPILE_DEFS} NDEBUG=1 NDEBUG_DEFINED=1 DEBUG_DEFINED=0 $<$<CONFIG:Debug>:PARTIAL_DEBUG=1>)
# only apply PCH to game_base since not all headers are necessarily validated with DEBUG=1
target_precompile_headers(game_base PRIVATE "$<$<COMPILE_LANGUAGE:CXX>:${CMAKE_SOURCE_DIR}/include/dusk_pch.hpp>")
target_include_directories(game_debug PRIVATE ${GAME_INCLUDE_DIRS})
target_include_directories(game_base PRIVATE ${GAME_INCLUDE_DIRS})
# This implicitly pulls in the library include directories even though no
# linking actually takes place for object libraries
target_link_libraries(game_debug PRIVATE ${GAME_LIBS})
target_link_libraries(game_base PRIVATE ${GAME_LIBS})
# Combined game library
add_library(game STATIC
$<TARGET_OBJECTS:game_base>
$<TARGET_OBJECTS:game_debug>)
target_link_libraries(game PUBLIC ${GAME_LIBS})
add_executable(dusk src/dusk/main.cpp)
target_compile_definitions(dusk PRIVATE TARGET_PC AVOID_UB=1 VERSION=0)
target_include_directories(dusk PRIVATE include)
target_link_libraries(dusk PRIVATE game aurora::main)
add_custom_command(TARGET dusk POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_directory
"${CMAKE_SOURCE_DIR}/res"
"$<TARGET_FILE_DIR:dusk>/res"
COMMENT "Copying resources"
set(GAME_BASE_FILES
${DOLZEL_FILES}
${Z2AUDIOLIB_FILES}
${REL_FILES}
${DUSK_FILES}
${DOLPHIN_FILES}
)
set_source_files_properties(
${GAME_BASE_FILES}
PROPERTIES
COMPILE_DEFINITIONS "NDEBUG=1;NDEBUG_DEFINED=1;DEBUG_DEFINED=0;$<$<CONFIG:Debug>:PARTIAL_DEBUG=1>"
)
foreach(jsystem_lib IN LISTS JSYSTEM_LIBRARIES)
target_compile_definitions(${jsystem_lib} PRIVATE
${GAME_COMPILE_DEFS}
$<$<CONFIG:Debug>:DEBUG=1>
$<$<CONFIG:Debug>:PARTIAL_DEBUG=1>
)
target_include_directories(${jsystem_lib} PRIVATE ${GAME_INCLUDE_DIRS})
target_link_libraries(${jsystem_lib} PRIVATE ${GAME_LIBS})
set_target_properties(${jsystem_lib} PROPERTIES FOLDER "JSystem")
endforeach()
set(JSYSTEM_LINK_LIBRARIES ${JSYSTEM_LIBRARIES})
if (CMAKE_CXX_LINK_GROUP_USING_RESCAN_SUPPORTED OR CMAKE_LINK_GROUP_USING_RESCAN_SUPPORTED)
# GNU ld resolves static archives in a single left-to-right pass. The split
# JSystem libraries reference each other, so they need a RESCAN group there.
set(JSYSTEM_LINK_LIBRARIES "$<LINK_GROUP:RESCAN,${JSYSTEM_LIBRARIES}>")
endif ()
set(DUSK_FILES src/dusk/main.cpp ${GAME_BASE_FILES} ${GAME_DEBUG_FILES})
if(ANDROID)
add_library(dusklight SHARED ${DUSK_FILES})
set_target_properties(dusklight PROPERTIES OUTPUT_NAME main)
else ()
add_executable(dusklight ${DUSK_FILES})
endif ()
target_compile_definitions(dusklight PRIVATE ${GAME_COMPILE_DEFS})
target_include_directories(dusklight PRIVATE ${GAME_INCLUDE_DIRS})
target_link_libraries(dusklight PRIVATE aurora::main ${GAME_LIBS} ${JSYSTEM_LINK_LIBRARIES})
target_precompile_headers(dusklight PRIVATE "$<$<COMPILE_LANGUAGE:CXX>:${CMAKE_SOURCE_DIR}/include/dusk_pch.hpp>")
if (TARGET crashpad_handler)
add_dependencies(dusklight crashpad_handler)
add_custom_command(TARGET dusklight POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_if_different
"$<TARGET_FILE:crashpad_handler>"
"$<TARGET_FILE_DIR:dusklight>"
COMMENT "Copying crashpad handler"
)
endif ()
if (ANDROID)
# SDLActivity loads SDL_main via dlsym on Android. Since aurora::main is a static
# archive, force an undefined reference so the linker keeps the SDL_main object.
target_link_options(dusklight PRIVATE "-Wl,-u,SDL_main")
endif ()
if (NOT APPLE)
add_custom_command(TARGET dusklight POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_directory
"${CMAKE_SOURCE_DIR}/res"
"$<TARGET_FILE_DIR:dusklight>/res"
COMMENT "Copying resources"
)
endif ()
if (WIN32)
set(DUSK_WINDOWS_RESOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/platforms/windows)
set(DUSK_WINDOWS_ICON_PNG ${CMAKE_CURRENT_SOURCE_DIR}/res/icon.png)
set(DUSK_WINDOWS_ICON_ICO ${CMAKE_CURRENT_BINARY_DIR}/dusklight.ico)
set(DUSK_WINDOWS_RC ${CMAKE_CURRENT_BINARY_DIR}/dusklight.rc)
set(DUSK_WINDOWS_MANIFEST ${CMAKE_CURRENT_BINARY_DIR}/dusklight.manifest)
add_custom_command(
OUTPUT ${DUSK_WINDOWS_ICON_ICO}
COMMAND powershell -ExecutionPolicy Bypass -File
${DUSK_WINDOWS_RESOURCE_DIR}/Create-IcoFromPng.ps1
-InputPng ${DUSK_WINDOWS_ICON_PNG}
-OutputIco ${DUSK_WINDOWS_ICON_ICO}
DEPENDS ${DUSK_WINDOWS_ICON_PNG} ${DUSK_WINDOWS_RESOURCE_DIR}/Create-IcoFromPng.ps1
VERBATIM
COMMENT "Generating Windows icon"
)
configure_file(${DUSK_WINDOWS_RESOURCE_DIR}/dusklight.manifest.in ${DUSK_WINDOWS_MANIFEST} @ONLY)
configure_file(${DUSK_WINDOWS_RESOURCE_DIR}/dusklight.rc.in ${DUSK_WINDOWS_RC} @ONLY)
target_sources(dusklight PRIVATE ${DUSK_WINDOWS_ICON_ICO} ${DUSK_WINDOWS_RC})
set_target_properties(dusklight PROPERTIES WIN32_EXECUTABLE TRUE)
if (MSVC)
target_link_options(dusklight PRIVATE /MANIFEST:NO)
endif ()
endif ()
if (APPLE)
if (IOS)
set(DUSK_RESOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/platforms/ios)
set(DUSK_INFO_PLIST ${DUSK_RESOURCE_DIR}/Info.plist.in)
file(GLOB_RECURSE DUSK_RESOURCE_FILES "${DUSK_RESOURCE_DIR}/Base.lproj/*")
endif ()
if (IOS OR TVOS)
target_sources(dusk PRIVATE ${DUSK_RESOURCE_FILES})
foreach (FILE ${DUSK_RESOURCE_FILES})
file(RELATIVE_PATH NEW_FILE "${DUSK_RESOURCE_DIR}" ${FILE})
get_filename_component(NEW_FILE_PATH ${NEW_FILE} DIRECTORY)
set_property(SOURCE ${FILE} PROPERTY MACOSX_PACKAGE_LOCATION "Resources/${NEW_FILE_PATH}")
endforeach ()
set_target_properties(
dusk PROPERTIES
MACOSX_BUNDLE TRUE
MACOSX_BUNDLE_BUNDLE_NAME ${DUSK_BUNDLE_NAME}
MACOSX_BUNDLE_GUI_IDENTIFIER ${DUSK_BUNDLE_IDENTIFIER}
MACOSX_BUNDLE_BUNDLE_VERSION ${DUSK_VERSION_STRING}
MACOSX_BUNDLE_SHORT_VERSION_STRING ${DUSK_SHORT_VERSION_STRING}
OUTPUT_NAME dusk
XCODE_ATTRIBUTE_CODE_SIGNING_ALLOWED "YES"
XCODE_ATTRIBUTE_CODE_SIGNING_REQUIRED "YES"
)
if (CMAKE_GENERATOR STREQUAL "Xcode")
set_target_properties(dusk PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${DUSK_INFO_PLIST})
elseif (DEFINED DUSK_INFO_PLIST)
set(MACOSX_BUNDLE_EXECUTABLE_NAME dusk)
set(MACOSX_BUNDLE_GUI_IDENTIFIER ${DUSK_BUNDLE_IDENTIFIER})
set(MACOSX_BUNDLE_BUNDLE_NAME ${DUSK_BUNDLE_NAME})
set(MACOSX_BUNDLE_BUNDLE_VERSION ${DUSK_VERSION_STRING})
set(MACOSX_BUNDLE_SHORT_VERSION_STRING ${DUSK_SHORT_VERSION_STRING})
set(DUSK_GENERATED_INFO_PLIST ${CMAKE_CURRENT_BINARY_DIR}/dusk.Info.plist)
configure_file(${DUSK_INFO_PLIST} ${DUSK_GENERATED_INFO_PLIST})
add_custom_command(
TARGET dusk POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${DUSK_GENERATED_INFO_PLIST} $<TARGET_FILE_DIR:dusk>/Info.plist
VERBATIM
)
endif ()
elseif (TVOS)
set(DUSK_RESOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/platforms/tvos)
else ()
set(DUSK_RESOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/platforms/macos)
endif ()
set(DUSK_INFO_PLIST ${DUSK_RESOURCE_DIR}/Info.plist.in)
file(GLOB_RECURSE DUSK_RESOURCE_FILES
"${DUSK_RESOURCE_DIR}/Assets.car"
"${DUSK_RESOURCE_DIR}/Base.lproj/*"
"${DUSK_RESOURCE_DIR}/Dusklight.icns")
file(GLOB_RECURSE DUSK_APP_RESOURCE_FILES "${CMAKE_CURRENT_SOURCE_DIR}/res/*")
target_sources(dusklight PRIVATE ${DUSK_RESOURCE_FILES})
target_sources(dusklight PRIVATE ${DUSK_APP_RESOURCE_FILES})
foreach (FILE ${DUSK_RESOURCE_FILES})
file(RELATIVE_PATH NEW_FILE "${DUSK_RESOURCE_DIR}" ${FILE})
get_filename_component(NEW_FILE_PATH ${NEW_FILE} DIRECTORY)
set_property(SOURCE ${FILE} PROPERTY MACOSX_PACKAGE_LOCATION "Resources/${NEW_FILE_PATH}")
endforeach ()
foreach (FILE ${DUSK_APP_RESOURCE_FILES})
file(RELATIVE_PATH NEW_FILE "${CMAKE_CURRENT_SOURCE_DIR}" ${FILE})
get_filename_component(NEW_FILE_PATH ${NEW_FILE} DIRECTORY)
set_property(SOURCE ${FILE} PROPERTY MACOSX_PACKAGE_LOCATION "Resources/${NEW_FILE_PATH}")
endforeach ()
set_target_properties(
dusklight PROPERTIES
MACOSX_BUNDLE TRUE
MACOSX_BUNDLE_BUNDLE_NAME ${DUSK_BUNDLE_NAME}
MACOSX_BUNDLE_GUI_IDENTIFIER ${DUSK_BUNDLE_IDENTIFIER}
MACOSX_BUNDLE_BUNDLE_VERSION ${DUSK_VERSION_STRING}
MACOSX_BUNDLE_SHORT_VERSION_STRING ${DUSK_SHORT_VERSION_STRING}
MACOSX_BUNDLE_INFO_PLIST ${DUSK_INFO_PLIST}
OUTPUT_NAME Dusklight
XCODE_ATTRIBUTE_CODE_SIGNING_ALLOWED "YES"
XCODE_ATTRIBUTE_CODE_SIGNING_REQUIRED "YES"
)
endif ()
if (APPLE AND NOT IOS AND NOT TVOS)
find_library(APPKIT_FRAMEWORK AppKit REQUIRED)
target_sources(dusklight PRIVATE src/dusk/file_select_macos.mm)
set_source_files_properties(src/dusk/file_select_macos.mm PROPERTIES COMPILE_FLAGS -fobjc-arc)
target_link_libraries(dusklight PRIVATE ${APPKIT_FRAMEWORK})
endif ()
if (IOS)
find_library(UIKIT_FRAMEWORK UIKit REQUIRED)
find_library(UNIFORM_TYPE_IDENTIFIERS_FRAMEWORK UniformTypeIdentifiers REQUIRED)
target_sources(dusklight PRIVATE src/dusk/ios/FileSelectDialog.m)
set_source_files_properties(src/dusk/ios/FileSelectDialog.m PROPERTIES COMPILE_FLAGS -fobjc-arc)
target_link_libraries(dusklight PRIVATE ${UIKIT_FRAMEWORK} ${UNIFORM_TYPE_IDENTIFIERS_FRAMEWORK})
endif ()
include(extern/aurora/cmake/AuroraCopyRuntimeDLLs.cmake)
aurora_copy_runtime_dlls(dusk)
aurora_copy_runtime_dlls(dusklight)
if (DUSK_SELECTED_OPT)
if (CMAKE_CXX_COMPILER_FRONTEND_VARIANT STREQUAL "MSVC")
@@ -358,12 +606,16 @@ function(get_target_prefix target result_var)
endif ()
endif ()
endfunction()
list(APPEND BINARY_TARGETS dusk)
list(APPEND BINARY_TARGETS dusklight)
set(EXTRA_TARGETS "")
if (TARGET crashpad_handler)
list(APPEND EXTRA_TARGETS crashpad_handler)
endif ()
install(TARGETS ${BINARY_TARGETS} ${EXTRA_TARGETS} DESTINATION ${CMAKE_INSTALL_PREFIX})
aurora_install_runtime_dlls(dusklight ${CMAKE_INSTALL_PREFIX})
if (NOT APPLE)
install(DIRECTORY ${CMAKE_SOURCE_DIR}/res DESTINATION ${CMAKE_INSTALL_PREFIX})
endif ()
if (CMAKE_BUILD_TYPE STREQUAL Debug OR CMAKE_BUILD_TYPE STREQUAL RelWithDebInfo)
set(DEBUG_FILES_LIST "")
foreach (target IN LISTS BINARY_TARGETS EXTRA_TARGETS)
@@ -385,18 +637,22 @@ if (CMAKE_BUILD_TYPE STREQUAL Debug OR CMAKE_BUILD_TYPE STREQUAL RelWithDebInfo)
endif ()
list(APPEND DEBUG_FILES_LIST "${output_name}")
endforeach ()
if (WIN32)
list(TRANSFORM DEBUG_FILES_LIST APPEND ".pdb")
list(JOIN DEBUG_FILES_LIST " " DEBUG_FILES)
install(CODE "execute_process(WORKING_DIRECTORY \"${CMAKE_INSTALL_PREFIX}\" COMMAND 7z a -t7z \"${CMAKE_INSTALL_PREFIX}/debug.7z\" ${DEBUG_FILES})")
elseif (APPLE)
list(TRANSFORM DEBUG_FILES_LIST APPEND ".dSYM")
list(JOIN DEBUG_FILES_LIST " " DEBUG_FILES)
install(CODE "execute_process(WORKING_DIRECTORY \"${CMAKE_INSTALL_PREFIX}\" COMMAND tar acfv \"${CMAKE_INSTALL_PREFIX}/debug.tar.xz\" ${DEBUG_FILES})")
elseif (UNIX)
list(TRANSFORM DEBUG_FILES_LIST APPEND ".dbg")
list(JOIN DEBUG_FILES_LIST " " DEBUG_FILES)
install(CODE "execute_process(WORKING_DIRECTORY \"${CMAKE_INSTALL_PREFIX}\" COMMAND tar -I \"xz -9 -T0\" -cvf \"${CMAKE_INSTALL_PREFIX}/debug.tar.xz\" ${DEBUG_FILES})")
# This is a terrible hack to only run this on CI
# until I turn this into a script or something
if(DEFINED ENV{GITHUB_ENV})
if (WIN32)
list(TRANSFORM DEBUG_FILES_LIST APPEND ".pdb")
list(JOIN DEBUG_FILES_LIST " " DEBUG_FILES)
install(CODE "execute_process(WORKING_DIRECTORY \"${CMAKE_INSTALL_PREFIX}\" COMMAND 7z a -t7z \"${CMAKE_INSTALL_PREFIX}/debug.7z\" ${DEBUG_FILES})")
elseif (APPLE)
list(TRANSFORM DEBUG_FILES_LIST APPEND ".dSYM")
list(JOIN DEBUG_FILES_LIST " " DEBUG_FILES)
install(CODE "execute_process(WORKING_DIRECTORY \"${CMAKE_INSTALL_PREFIX}\" COMMAND tar acfv \"${CMAKE_INSTALL_PREFIX}/debug.tar.xz\" ${DEBUG_FILES})")
elseif (UNIX)
list(TRANSFORM DEBUG_FILES_LIST APPEND ".dbg")
list(JOIN DEBUG_FILES_LIST " " DEBUG_FILES)
install(CODE "execute_process(WORKING_DIRECTORY \"${CMAKE_INSTALL_PREFIX}\" COMMAND tar -I \"xz -9 -T0\" -cvf \"${CMAKE_INSTALL_PREFIX}/debug.tar.xz\" ${DEBUG_FILES})")
endif ()
endif ()
endif ()
foreach (target IN LISTS BINARY_TARGETS)
+124 -43
View File
@@ -22,6 +22,20 @@
"CMAKE_MSVC_RUNTIME_LIBRARY": "MultiThreaded"
}
},
{
"name": "ci",
"hidden": true,
"cacheVariables": {
"CMAKE_C_COMPILER_LAUNCHER": "sccache",
"CMAKE_CXX_COMPILER_LAUNCHER": "sccache",
"DUSK_ENABLE_SENTRY_NATIVE": {
"type": "BOOL",
"value": true
},
"DUSK_SENTRY_DSN": "$env{SENTRY_DSN}",
"DUSK_SENTRY_ENVIRONMENT": "production"
}
},
{
"name": "linux-default",
"displayName": "Linux (default)",
@@ -88,7 +102,7 @@
"name": "windows-msvc",
"displayName": "Windows (MSVC)",
"generator": "Ninja",
"binaryDir": "${sourceDir}/out/build/${presetName}",
"binaryDir": "${sourceDir}/build/${presetName}",
"architecture": {
"value": "x64",
"strategy": "external"
@@ -96,7 +110,7 @@
"cacheVariables": {
"CMAKE_C_COMPILER": "cl",
"CMAKE_CXX_COMPILER": "cl",
"CMAKE_INSTALL_PREFIX": "${sourceDir}/out/install"
"CMAKE_INSTALL_PREFIX": "${sourceDir}/build/install"
},
"vendor": {
"microsoft.com/VisualStudioSettings/CMake/1.0": {
@@ -126,7 +140,7 @@
"name": "windows-arm64-msvc",
"displayName": "Windows ARM64 (MSVC)",
"generator": "Ninja",
"binaryDir": "${sourceDir}/out/build/${presetName}",
"binaryDir": "${sourceDir}/build/${presetName}",
"architecture": {
"value": "arm64",
"strategy": "external"
@@ -134,8 +148,7 @@
"cacheVariables": {
"CMAKE_C_COMPILER": "cl",
"CMAKE_CXX_COMPILER": "cl",
"CMAKE_INSTALL_PREFIX": "${sourceDir}/out/install",
"AURORA_DAWN_PROVIDER": "vendor"
"CMAKE_INSTALL_PREFIX": "${sourceDir}/build/install"
},
"vendor": {
"microsoft.com/VisualStudioSettings/CMake/1.0": {
@@ -236,22 +249,11 @@
"type": "BOOL",
"value": false
},
"CMAKE_DISABLE_FIND_PACKAGE_BZip2": {
"CMAKE_DISABLE_FIND_PACKAGE_PkgConfig": {
"type": "BOOL",
"value": true
},
"CMAKE_DISABLE_FIND_PACKAGE_LibLZMA": {
"type": "BOOL",
"value": true
},
"CMAKE_DISABLE_FIND_PACKAGE_zstd": {
"type": "BOOL",
"value": true
},
"CMAKE_DISABLE_FIND_PACKAGE_Freetype": {
"type": "BOOL",
"value": true
}
"CMAKE_IGNORE_PREFIX_PATH": "/opt/homebrew"
},
"vendor": {
"microsoft.com/VisualStudioSettings/CMake/1.0": {
@@ -316,7 +318,11 @@
"cacheVariables": {
"CMAKE_INSTALL_PREFIX": "${sourceDir}/build/install",
"CMAKE_TOOLCHAIN_FILE": "$env{ANDROID_HOME}/ndk/$env{ANDROID_NDK_VERSION}/build/cmake/android.toolchain.cmake",
"ANDROID_PLATFORM": "android-24"
"ANDROID_PLATFORM": "android-28",
"BUILD_SHARED_LIBS": {
"type": "BOOL",
"value": false
}
}
},
{
@@ -339,15 +345,40 @@
"ANDROID_ABI": "x86_64"
}
},
{
"name": "x-android-ci",
"hidden": true,
"inherits": [
"android-base",
"ci"
],
"cacheVariables": {
"DUSK_ENABLE_SENTRY_NATIVE": {
"type": "BOOL",
"value": false
}
}
},
{
"name": "x-android-ci-arm64",
"binaryDir": "${sourceDir}/build/android-arm64",
"inherits": [
"x-android-ci"
],
"cacheVariables": {
"ANDROID_ABI": "arm64-v8a",
"Rust_CARGO_TARGET": "aarch64-linux-android"
}
},
{
"name": "x-linux-ci",
"hidden": true,
"inherits": [
"relwithdebinfo"
"relwithdebinfo",
"ci"
],
"cacheVariables": {
"CMAKE_C_COMPILER_LAUNCHER": "sccache",
"CMAKE_CXX_COMPILER_LAUNCHER": "sccache"
"AURORA_SDL3_PROVIDER": "vendor"
}
},
{
@@ -367,11 +398,41 @@
{
"name": "x-macos-ci",
"inherits": [
"macos-default-relwithdebinfo"
"macos-default-relwithdebinfo",
"ci"
],
"cacheVariables": {
"CMAKE_C_COMPILER_LAUNCHER": "sccache",
"CMAKE_CXX_COMPILER_LAUNCHER": "sccache"
"AURORA_NOD_PROVIDER": "vendor",
"CMAKE_DISABLE_FIND_PACKAGE_PkgConfig": {
"type": "BOOL",
"value": true
},
"CMAKE_OSX_DEPLOYMENT_TARGET": "11.0",
"CMAKE_IGNORE_PREFIX_PATH": "/opt/homebrew",
"BUILD_SHARED_LIBS": {
"type": "BOOL",
"value": false
}
}
},
{
"name": "x-macos-ci-arm64",
"inherits": [
"x-macos-ci"
],
"cacheVariables": {
"CMAKE_OSX_ARCHITECTURES": "arm64"
}
},
{
"name": "x-macos-ci-x86_64",
"inherits": [
"x-macos-ci"
],
"cacheVariables": {
"AURORA_DAWN_PROVIDER": "vendor",
"CMAKE_OSX_ARCHITECTURES": "x86_64",
"Rust_CARGO_TARGET": "x86_64-apple-darwin"
}
},
{
@@ -398,14 +459,16 @@
"name": "x-windows-ci",
"hidden": true,
"inherits": [
"relwithdebinfo"
"relwithdebinfo",
"ci"
],
"binaryDir": "$env{BUILD_DIR}",
"cacheVariables": {
"CMAKE_INSTALL_PREFIX": "$env{BUILD_DIR}/install",
"CMAKE_C_COMPILER_LAUNCHER": "sccache",
"CMAKE_CXX_COMPILER_LAUNCHER": "sccache",
"CMAKE_MSVC_DEBUG_INFORMATION_FORMAT": "Embedded"
"CMAKE_MSVC_DEBUG_INFORMATION_FORMAT": "Embedded",
"CMAKE_TOOLCHAIN_FILE": {
"type": "FILEPATH",
"value": "$env{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake"
},
"VCPKG_TARGET_TRIPLET": "x64-windows"
}
},
{
@@ -473,7 +536,7 @@
"description": "iOS release build with debug info",
"displayName": "iOS RelWithDebInfo",
"targets": [
"dusk"
"dusklight"
]
},
{
@@ -482,7 +545,7 @@
"description": "tvOS release build with debug info",
"displayName": "tvOS RelWithDebInfo",
"targets": [
"dusk"
"dusklight"
]
},
{
@@ -491,7 +554,7 @@
"description": "Android arm64-v8a release build with debug info",
"displayName": "Android arm64-v8a RelWithDebInfo",
"targets": [
"dusk"
"dusklight"
]
},
{
@@ -500,7 +563,16 @@
"description": "Android x86_64 release build with debug info",
"displayName": "Android x86_64 RelWithDebInfo",
"targets": [
"dusk"
"dusklight"
]
},
{
"name": "x-android-ci-arm64",
"configurePreset": "x-android-ci-arm64",
"description": "(Internal) Android CI arm64-v8a",
"displayName": "(Internal) Android CI arm64-v8a",
"targets": [
"dusklight"
]
},
{
@@ -546,10 +618,19 @@
]
},
{
"name": "x-macos-ci",
"configurePreset": "x-macos-ci",
"description": "(Internal) macOS CI",
"displayName": "(Internal) macOS CI",
"name": "x-macos-ci-arm64",
"configurePreset": "x-macos-ci-arm64",
"description": "(Internal) macOS CI arm64",
"displayName": "(Internal) macOS CI arm64",
"targets": [
"install"
]
},
{
"name": "x-macos-ci-x86_64",
"configurePreset": "x-macos-ci-x86_64",
"description": "(Internal) macOS CI x86_64",
"displayName": "(Internal) macOS CI x86_64",
"targets": [
"install"
]
@@ -557,8 +638,8 @@
{
"name": "x-ios-ci",
"configurePreset": "x-ios-ci",
"description": "(Internal) iOS CI",
"displayName": "(Internal) iOS CI",
"description": "(Internal) iOS CI arm64",
"displayName": "(Internal) iOS CI arm64",
"targets": [
"install"
]
@@ -566,8 +647,8 @@
{
"name": "x-tvos-ci",
"configurePreset": "x-tvos-ci",
"description": "(Internal) tvOS CI",
"displayName": "(Internal) tvOS CI",
"description": "(Internal) tvOS CI arm64",
"displayName": "(Internal) tvOS CI arm64",
"targets": [
"install"
]
+51 -85
View File
@@ -1,103 +1,69 @@
## Dusk
<div align="center">
<img src="res/logo.png" alt="Logo" width="640">
### Building
#### Prerequisites
* [CMake 3.25+](https://cmake.org)
* Windows: Install `CMake Tools` in Visual Studio
* macOS: `brew install cmake`
* [Python 3+](https://python.org)
* Windows: [Microsoft Store](https://go.microsoft.com/fwlink?linkID=2082640)
* Verify it's added to `%PATH%` by typing `python` in `cmd`.
* macOS: `brew install python@3`
* **[Windows]** [Visual Studio 2026 Community](https://www.visualstudio.com/en-us/products/visual-studio-community-vs.aspx)
* Select `C++ Development` and verify the following packages are included:
* `Windows 11 SDK`
* `CMake Tools`
* `C++ Clang Compiler`
* `C++ Clang-cl`
* **[macOS]** [Xcode 16.4+](https://developer.apple.com/xcode/download/)
* **[Linux]** Actively tested on Ubuntu 24.04, Arch Linux & derivatives.
* Ubuntu 24.04+ packages
```
build-essential curl git ninja-build clang lld zlib1g-dev libcurl4-openssl-dev \
libglu1-mesa-dev libdbus-1-dev libvulkan-dev libxi-dev libxrandr-dev libasound2-dev libpulse-dev \
libudev-dev libpng-dev libncurses5-dev cmake libx11-xcb-dev python3 python-is-python3 \
libclang-dev libfreetype-dev libxinerama-dev libxcursor-dev python3-markupsafe libgtk-3-dev \
libxss-dev libxtst-dev
```
* Arch Linux packages
```
base-devel cmake ninja llvm vulkan-headers python python-markupsafe clang lld alsa-lib libpulse libxrandr freetype2
```
* Fedora packages
```
cmake vulkan-headers ninja-build clang-devel llvm-devel libpng-devel
```
* It's also important that you install the developer tools and libraries
```
sudo dnf groupinstall "Development Tools" "Development Libraries"
```
#### Setup
Clone and initialize the Dusk repository
```sh
git clone --recursive https://github.com/TwilitRealm/dusk.git
cd dusk
git pull
git submodule update --init --recursive
```
<p align="center">
<a href="https://twilitrealm.dev">Official Website</a>
<a href="https://discord.gg/6NpMhefCK9">Discord</a>
</p>
</div>
#### Building
# Overview
**CLion (Windows / macOS / Linux)**
Dusklight is a reverse-engineered reimplementation of Twilight Princess.
Open the project directory in CLion. Enable the appropriate presets for your platform:
It aims to be as accurate as possible to the original while also providing new options, enhancements, and tools to customize your experience.
![CLion](assets/clion.png)
# Setup
**Visual Studio (Windows)**
> [!IMPORTANT]
> Dusklight does *not* provide any copyrighted assets. You must provide your own copy of the original game.
Open the project directory in Visual Studio. The CMake configuration will be loaded automatically.
> [!IMPORTANT]
> At a minimum, Dusklight requires a GPU with support for either D3D12, Vulkan, or Metal. Your experience with specific hardware, operating systems, and drivers may vary. In particular, older Intel iGPUs have a high likelihood of incompatibility. We are also aware of a number of issues on devices with Adreno GPUs and are working to resolve them.
**ninja (macOS)**
### 1. Verify your dump
```sh
cmake --preset macos-default-relwithdebinfo
cmake --build --preset macos-default-relwithdebinfo
```
First, make sure your dump of the game is clean and supported by Dusklight. You can do this by checking the SHA-1 hash of your dump against this list of supported versions:
Alternate presets available:
- `macos-default-debug`: Clang, Debug
| Version | SHA-1 hash |
|--------------| ------------------------------------------ |
| GameCube USA | `75edd3ddff41f125d1b4ce1a40378f1b565519e7` |
| GameCube EUR | `2601822a488eeb86fb89db16ca8f29c2c953e1ca` |
**ninja (Linux)**
*Support for other versions of the game is planned in the future.
```sh
cmake --preset linux-default-relwithdebinfo
cmake --build --preset linux-default-relwithdebinfo
```
### 2. Download [Dusklight](https://github.com/TwilitRealm/dusklight/releases)
Alternate presets available:
- `linux-default-debug`: GCC, Debug
- `linux-clang-relwithdebinfo`: Clang, RelWithDebInfo
- `linux-clang-debug`: Clang, Debug
### 3. Setup the game
**Windows / macOS / Linux**
- Extract the .zip file
- Launch Dusklight
- Press **Select Disc Image** and provide the path to your supported game dump
- Press **Play**!
**ninja (Windows)**
**iOS**
- Follow the [iOS setup guide](docs/ios-install-altstore.md)
```sh
cmake --preset windows-msvc-relwithdebinfo
cmake --build --preset windows-msvc-relwithdebinfo
```
**Android**
- Install the Dusklight APK
- Launch Dusklight
- Press **Select Disc Image** and provide the path to your supported game dump
- Press **Play**!
Alternate presets available:
- `windows-msvc-debug`: MSVC, Debug
- `windows-clang-relwithdebinfo`: Clang-cl, RelWithDebInfo
- `windows-clang-debug`: Clang-cl, Debug
# Building
#### Running
Pass the disc image as a positional argument. Supported formats: ISO (GCM), RVZ, WIA, WBFS, CISO, GCZ
```sh
build/{preset}/dusk /path/to/game.rvz
```
If no path is specified, Dusk defaults to `game.iso` in the current working directory.
If you'd like to build Dusklight from source, please read the [build instructions](docs/building.md).
#### 30 FPS on Debug
When compiled fully in a Debug the game runs too slowly to hit playable 30 FPS. To avoid this, you can set a CMake cache variable to optimize specific critical files without hampering debuggability in the rest of the program: `-DDUSK_SELECTED_OPT=ON`. When building for MSVC (Windows) you must also modify `CMAKE_CXX_FLAGS_DEBUG` and `CMAKE_C_FLAGS_DEBUG` to remove `/RTC1` from the flags, like so: `-DCMAKE_CXX_FLAGS_DEBUG="/MDd /Zi /Ob0 /Od" -DCMAKE_C_FLAGS_DEBUG="/MDd /Zi /Ob0 /Od"`
Pull requests are welcomed! Note that we do not accept contributions that are primarily AI-generated and will close your PR if we suspect as much. Please also see the [code conventions](docs/code-conventions.md).
# Credits
Special thanks to the [TP decompilation](https://github.com/zeldaret/tp) team, the GC/Wii decompilation community, the [Aurora](https://github.com/encounter/aurora) developers, the [TP speedrunning community](https://zsrtp.link), and all [contributors](https://github.com/TwilitRealm/dusklight/graphs/contributors).
<br/>
<div align="center">
<a href="https://github.com/encounter/aurora">
<img src="assets/aurora-powered.png" alt="Powered by Aurora" width="800">
</a>
</div>
Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 85 KiB

+66
View File
@@ -0,0 +1,66 @@
<svg width="600" height="600" viewBox="0 0 300 300" xmlns="http://www.w3.org/2000/svg">
<circle cx="150" cy="150" r="105" fill="none" stroke="white" stroke-width="4"/>
<circle cx="150" cy="150" r="95" fill="none" stroke="white" stroke-width="4"/>
<circle cx="150" cy="150" r="60" fill="none" stroke="white" stroke-width="4"/>
<circle cx="150" cy="150" r="75" fill="none" stroke="white" stroke-width="4"/>
<defs>
<line id="ray" x1="150" y1="55" x2="150" y2="45"/>
<clipPath id="zigzag-clip">
<circle cx="150" cy="150" r="75"/>
</clipPath>
</defs>
<g stroke="white" stroke-width="3">
<use href="#ray"/>
<use href="#ray" transform="rotate(18 150 150)"/>
<use href="#ray" transform="rotate(36 150 150)"/>
<use href="#ray" transform="rotate(54 150 150)"/>
<use href="#ray" transform="rotate(72 150 150)"/>
<use href="#ray" transform="rotate(90 150 150)"/>
<use href="#ray" transform="rotate(108 150 150)"/>
<use href="#ray" transform="rotate(126 150 150)"/>
<use href="#ray" transform="rotate(144 150 150)"/>
<use href="#ray" transform="rotate(162 150 150)"/>
<use href="#ray" transform="rotate(180 150 150)"/>
<use href="#ray" transform="rotate(198 150 150)"/>
<use href="#ray" transform="rotate(216 150 150)"/>
<use href="#ray" transform="rotate(234 150 150)"/>
<use href="#ray" transform="rotate(252 150 150)"/>
<use href="#ray" transform="rotate(270 150 150)"/>
<use href="#ray" transform="rotate(288 150 150)"/>
<use href="#ray" transform="rotate(306 150 150)"/>
<use href="#ray" transform="rotate(324 150 150)"/>
<use href="#ray" transform="rotate(342 150 150)"/>
</g>
<polygon fill="none" stroke="white" stroke-width="4" opacity="1" clip-path="url(#zigzag-clip)"
points="
126.82,78.67
150,90
173.18,78.67
185.27,101.46
210.68,105.92
207.06,131.46
225,150
207.06,168.54
210.68,194.08
185.27,198.54
173.18,221.33
150,210
126.82,221.33
114.73,198.54
89.32,194.08
92.94,168.54
75,150
92.94,131.46
89.32,105.92
114.73,101.46
"/>
<g fill="none" stroke="white" stroke-width="4">
<polygon points="150,105 130,140 170,140"/>
<polygon points="130,140 110,175 150,175"/>
<polygon points="170,140 150,175 190,175"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.3 KiB

+17 -9
View File
@@ -1,18 +1,26 @@
#!/bin/bash -ex
shopt -s extglob
if [[ -n "${GITHUB_WORKSPACE:-}" ]]; then
cd "$GITHUB_WORKSPACE"
fi
build_dir="$PWD/build"
linuxdeploy="$build_dir/linuxdeploy-$(uname -m).AppImage"
# Get linuxdeploy
cd "$RUNNER_WORKSPACE"
curl -fOL https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-$(uname -m).AppImage
chmod +x linuxdeploy-$(uname -m).AppImage
mkdir -p "$build_dir"
curl -fL "https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-$(uname -m).AppImage" -o "$linuxdeploy"
chmod +x "$linuxdeploy"
# Build AppImage
cd "$GITHUB_WORKSPACE"
mkdir -p build/appdir/usr/{bin,share/{applications,icons/hicolor}}
cp build/install/!(*.*) build/appdir/usr/bin
for install_path in build/install/*; do
[[ "$(basename "$install_path")" == *.* ]] && continue
cp -r "$install_path" build/appdir/usr/bin
done
cp -r platforms/freedesktop/{16x16,32x32,48x48,64x64,128x128,256x256,512x512,1024x1024} build/appdir/usr/share/icons/hicolor
cp platforms/freedesktop/dusk.desktop build/appdir/usr/share/applications
cp platforms/freedesktop/dusklight.desktop build/appdir/usr/share/applications
cd build/install
VERSION="$DUSK_VERSION" NO_STRIP=1 "$RUNNER_WORKSPACE"/linuxdeploy-$(uname -m).AppImage \
--appdir "$GITHUB_WORKSPACE"/build/appdir --output appimage
VERSION="$DUSK_VERSION" NO_STRIP=1 "$linuxdeploy" \
-l /usr/lib/x86_64-linux-gnu/libusb-1.0.so --appdir "$build_dir/appdir" --output appimage
-10
View File
@@ -13,13 +13,3 @@ buildType:
short: RelWithDebInfo
long: Optimized, with debug symbols
buildType: RelWithDebInfo
tp_version:
default: GZ2E01
description: TP Version
choices:
GZ2E01:
short: GZ2E01
long: GZ2E01
settings:
DUSK_TP_VERSION: GZ2E01
+228
View File
@@ -0,0 +1,228 @@
# Building Dusklight
## Dependencies
The following dependencies are required:
* [CMake 3.25+](https://cmake.org)
* [Python 3+](https://python.org)
### Windows
* Install [CMake 3.25+](https://cmake.org) by searching `CMake Tools` in Visual Studio
* Install Python 3 from the [Microsoft Store](https://go.microsoft.com/fwlink?linkID=2082640) and verify it's added to `%PATH%` by typing `python` in `cmd`.
Recommended IDEs:
* [Visual Studio 2026 Community](https://www.visualstudio.com/en-us/products/visual-studio-community-vs.aspx). During installation:
* Select `C++ Development` and verify the following packages are included:
* `Windows 11 SDK`
* `CMake Tools`
* `C++ Clang Compiler`
* `C++ Clang-cl`
### macOS
* Make sure [Homebrew](https://brew.sh) is installed
* Install [CMake 3.25+](https://cmake.org)
```sh
brew install cmake
```
* Install Python 3
```sh
brew install python@3
```
Recommended IDEs:
* [Xcode 16.4 or later](https://developer.apple.com/xcode/)
* [Visual Studio Code](https://code.visualstudio.com/download/)
* [CLion](https://www.jetbrains.com/clion/)
### Linux
Actively tested on Ubuntu 24.04, Arch Linux & derivatives.
**Ubuntu 24.04+ packages**
<details>
<summary>Click to expand</summary>
* Run the following command to install the required dependencies:
```sh
sudo apt update && sudo apt install -y \
build-essential \
clang \
cmake \
curl \
git \
libasound2-dev \
libclang-dev \
libcurl4-openssl-dev \
libdbus-1-dev \
libfreetype-dev \
libglu1-mesa-dev \
libgtk-3-dev \
libncurses5-dev \
libpng-dev \
libpulse-dev \
libudev-dev \
libvulkan-dev \
libx11-xcb-dev \
libxcursor-dev \
libxi-dev \
libxinerama-dev \
libxrandr-dev \
libxss-dev \
libxtst-dev \
lld \
ninja-build \
python-is-python3 \
python3 \
python3-markupsafe \
zlib1g-dev
```
</details>
<br>
**Arch Linux packages**
<details>
<summary>Click to expand</summary>
* Run the following command to install the required dependencies:
```sh
sudo pacman -S --needed \
alsa-lib \
base-devel \
clang \
cmake \
freetype2 \
libpulse \
libxrandr \
lld \
llvm \
ninja \
python \
python-markupsafe \
vulkan-headers
```
</details>
<br>
**Fedora packages**
<details>
<summary>Click to expand</summary>
* Run the following command to install the required dependencies:
```sh
sudo dnf install -y \
clang-devel \
cmake \
libpng-devel \
llvm-devel \
ninja-build \
vulkan-headers
```
* It's also important that you install the developer tools and libraries
```sh
sudo dnf groupinstall \
"Development Libraries" "Development Tools"
```
</details>
<br>
Recommended IDEs:
* [CLion](https://www.jetbrains.com/clion/)
* [Visual Studio Code](https://code.visualstudio.com/download/)
## Building
* Clone and initialize the Dusklight repository:
```sh
git clone --recursive https://github.com/TwilitRealm/dusklight.git
git pull
cd dusklight
git submodule update --init --recursive
```
**CLion (Windows / macOS / Linux)**
Open the project directory in CLion. Enable the appropriate presets for your platform:
![CLion](../assets/clion.png)
**Visual Studio (Windows)**
Open the project directory in Visual Studio. The CMake configuration will be loaded automatically.
**ninja (macOS)**
```sh
cmake --preset macos-default-relwithdebinfo
cmake --build --preset macos-default-relwithdebinfo
```
Alternate presets available:
* `macos-default-debug`: Clang, Debug
**ninja (Linux)**
```sh
cmake --preset linux-default-relwithdebinfo
cmake --build --preset linux-default-relwithdebinfo
```
Alternate presets available:
* `linux-default-debug`: GCC, Debug
* `linux-clang-relwithdebinfo`: Clang, RelWithDebInfo
* `linux-clang-debug`: Clang, Debug
**ninja (Windows)**
```sh
cmake --preset windows-msvc-relwithdebinfo
cmake --build --preset windows-msvc-relwithdebinfo
```
Alternate presets available:
* `windows-msvc-debug`: MSVC, Debug
* `windows-clang-relwithdebinfo`: Clang-cl, RelWithDebInfo
* `windows-clang-debug`: Clang-cl, Debug
## Running
**Windows / Linux**
* Pass the disc image as a positional argument using the `--dvd` flag. Supported formats are: ISO (GCM), RVZ, WIA, WBFS, CISO, GCZ
```sh
build/{preset}/dusklight --dvd /path/to/game.iso
```
**macOS**
macOS builds an `.app` bundle which contains the executable and all necessary resources.
* Pass the disc image as a positional argument using the `--dvd` flag. Supported formats are: ISO (GCM), RVZ, WIA, WBFS, CISO, GCZ
```sh
build/{preset}/Dusklight.app/Contents/MacOS/Dusklight --dvd /path/to/game.iso
```
+13
View File
@@ -0,0 +1,13 @@
# Code conventions for Dusk
## Upstream when appropriate
Bug fixes, documentation improvements, code cleanup, etc that also apply to the [original decompilation project](https://github.com/zeldaret/tp) should preferably be PR'd there.
## Properly indicate Dusk-modified code
When modifying original game code (i.e. in decomp) for Dusk's purposes, please clearly delineate such code as being Dusk-specific. Generally, this can be done by using `#if TARGET_PC` and keeping the original code in place. Use `#if AVOID_UB` for Undefined Behavior fixes to the original codebase.
## Miscellaneous things
* The original codebase makes heavy use of global `operator new` and similar overloads to allocate into a strict tree of heaps. This would cause many linkage headaches for us, so effectively all uses of `new` or `delete` in the original game code have been replaced with `JKR_NEW`, `JKR_DELETE`, or similar macros. See `JKRHeap.h` for the full list.
+48
View File
@@ -0,0 +1,48 @@
# Installing Dusklight on iOS via iloader
## Prerequisites
- A Windows, Linux, or macOS device
- iOS device connected to computer via USB
- Dusklight IPA file (download the latest `Dusklight-vX.X.X-ios-arm64.ipa` from the [releases page](https://github.com/TwilitRealm/dusk/releases))
- Game disc - `GZ2E01` (Gamecube USA) or `GZ2PE01` (Gamecube PAL)
## 1. Install AltServer
- Executable bundles can be installed from [iloader's main page](https://iloader.app/) or [their GitHub](https://github.com/nab138/iloader) for Windows, Linux, and macOS.
- Windows WILL require iTunes to be installed
- Linux WILL require usbmuxd to be installed, this is installed by default in most distros though
## 2. Enable Developer Mode (iOS 16+)
- On your iPhone, go to **Settings > Privacy & Security > Developer Mode**
- Toggle it on and restart when prompted
## 3. Install Dusklight on Your iPhone
1. Sign into your Apple ID (this is required for registering app IDs, it is sent securely and not stored by iloader)
* You may be prompted to put in a code from your iOS device, do so
2. Plug in your iOS device via USB into your PC. If you're missing a dependency, an error pop-up will tell you to install it
* You will need to hit `Refresh` after plugging it in at this stage so that it can be detected, it does not automatically refresh
3. Leave settings unchanged (the Anisette server should stay Sidestore (.io))
3.(a) Installing SideStore directly is not required, but provides you a way to install Dusklight on your phone without being plugged into a computer later
4. Press `Import IPA` and choose your downloaded `Dusk-v.X.X.X-ios-arm64.ipa`, it will begin installing on your device
**NOTE:** *At various stages, you may be prompted to trust your device, do so*
## 3. Getting Dusk trusted
When installing sideloaded iOS applications, at first you will need to manually trust the app due to Apple's security policies
* Go to **Settings > General > VPN & Device Management**
* Tap the Apple ID you signed into iloader with under "Developer App" and tap **Trust**
* Tap **Allow** on the pop-up
## 4. Copy Files to Your iPhone
Transfer the IPA and game disc to your iPhone so they're accessible in the Files app. A few ways to do this:
- **AirDrop** - Right-click the files on your Mac and choose Share > AirDrop
- **iCloud Drive** - Place files in iCloud Drive on your Mac and they'll sync to Files on your iPhone
- **USB transfer** - Connect your iPhone and drag files via Finder's sidebar
- **Cloud storage** - Upload to Google Drive, Dropbox, etc. and download on your iPhone
You may now use Dusklight on iOS, iPadOS!
+1 -1
+171 -16
View File
@@ -1,7 +1,7 @@
set(DOLZEL_FILES
src/m_Do/m_Do_main.cpp
src/m_Do/m_Do_printf.cpp
#src/m_Do/m_Do_printf.cpp
src/m_Do/m_Do_audio.cpp
src/m_Do/m_Do_controller_pad.cpp
#src/m_Do/m_Re_controller_pad.cpp
@@ -15,7 +15,6 @@ set(DOLZEL_FILES
src/m_Do/m_Do_DVDError.cpp
src/m_Do/m_Do_MemCard.cpp
src/m_Do/m_Do_MemCardRWmng.cpp
src/m_Do/m_Do_machine_exception.cpp
src/m_Do/m_Do_hostIO.cpp
src/c/c_damagereaction.cpp
src/c/c_dylink.cpp
@@ -315,7 +314,7 @@ set(SSYSTEM_FILES
src/SSystem/SStandard/s_basic.cpp
)
set(JSYSTEM_DEBUG_FILES
add_library(JSystem_JParticle STATIC
libs/JSystem/src/JParticle/JPAResourceManager.cpp
libs/JSystem/src/JParticle/JPAResource.cpp
libs/JSystem/src/JParticle/JPABaseShape.cpp
@@ -331,10 +330,19 @@ set(JSYSTEM_DEBUG_FILES
libs/JSystem/src/JParticle/JPAEmitter.cpp
libs/JSystem/src/JParticle/JPAParticle.cpp
libs/JSystem/src/JParticle/JPAMath.cpp
)
add_library(JSystem_JFramework STATIC
libs/JSystem/src/JFramework/JFWSystem.cpp
libs/JSystem/src/JFramework/JFWDisplay.cpp
)
add_library(JSystem_J3DU STATIC
libs/JSystem/src/J3DU/J3DUClipper.cpp
libs/JSystem/src/J3DU/J3DUDL.cpp
)
add_library(JSystem_JKernel STATIC
libs/JSystem/src/JKernel/JKRHeap.cpp
libs/JSystem/src/JKernel/JKRExpHeap.cpp
libs/JSystem/src/JKernel/JKRSolidHeap.cpp
@@ -360,14 +368,23 @@ set(JSYSTEM_DEBUG_FILES
libs/JSystem/src/JKernel/JKRDvdRipper.cpp
libs/JSystem/src/JKernel/JKRDvdAramRipper.cpp
libs/JSystem/src/JKernel/JKRDecomp.cpp
)
add_library(JSystem_JMath STATIC
libs/JSystem/src/JMath/JMath.cpp
libs/JSystem/src/JMath/random.cpp
libs/JSystem/src/JMath/JMATrigonometric.cpp
)
add_library(JSystem_JSupport STATIC
libs/JSystem/src/JSupport/JSUList.cpp
libs/JSystem/src/JSupport/JSUInputStream.cpp
libs/JSystem/src/JSupport/JSUOutputStream.cpp
libs/JSystem/src/JSupport/JSUMemoryStream.cpp
libs/JSystem/src/JSupport/JSUFileStream.cpp
)
add_library(JSystem_JUtility STATIC
libs/JSystem/src/JUtility/JUTCacheFont.cpp
libs/JSystem/src/JUtility/JUTResource.cpp
libs/JSystem/src/JUtility/JUTTexture.cpp
@@ -388,6 +405,9 @@ set(JSYSTEM_DEBUG_FILES
libs/JSystem/src/JUtility/JUTConsole.cpp
libs/JSystem/src/JUtility/JUTDirectFile.cpp
libs/JSystem/src/JUtility/JUTFontData_Ascfont_fix12.cpp
)
add_library(JSystem_JStage STATIC
libs/JSystem/src/JStage/JSGActor.cpp
libs/JSystem/src/JStage/JSGAmbientLight.cpp
libs/JSystem/src/JStage/JSGCamera.cpp
@@ -395,6 +415,9 @@ set(JSYSTEM_DEBUG_FILES
libs/JSystem/src/JStage/JSGLight.cpp
libs/JSystem/src/JStage/JSGObject.cpp
libs/JSystem/src/JStage/JSGSystem.cpp
)
add_library(JSystem_J2DGraph STATIC
libs/JSystem/src/J2DGraph/J2DGrafContext.cpp
libs/JSystem/src/J2DGraph/J2DOrthoGraph.cpp
libs/JSystem/src/J2DGraph/J2DTevs.cpp
@@ -413,6 +436,9 @@ set(JSYSTEM_DEBUG_FILES
libs/JSystem/src/J2DGraph/J2DAnmLoader.cpp
libs/JSystem/src/J2DGraph/J2DAnimation.cpp
libs/JSystem/src/J2DGraph/J2DManage.cpp
)
add_library(JSystem_J3DGraphBase STATIC
libs/JSystem/src/J3DGraphBase/J3DGD.cpp
libs/JSystem/src/J3DGraphBase/J3DSys.cpp
libs/JSystem/src/J3DGraphBase/J3DVertex.cpp
@@ -427,6 +453,9 @@ set(JSYSTEM_DEBUG_FILES
libs/JSystem/src/J3DGraphBase/J3DTevs.cpp
libs/JSystem/src/J3DGraphBase/J3DDrawBuffer.cpp
libs/JSystem/src/J3DGraphBase/J3DStruct.cpp
)
add_library(JSystem_J3DGraphAnimator STATIC
libs/JSystem/src/J3DGraphAnimator/J3DShapeTable.cpp
libs/JSystem/src/J3DGraphAnimator/J3DJointTree.cpp
libs/JSystem/src/J3DGraphAnimator/J3DModelData.cpp
@@ -438,6 +467,9 @@ set(JSYSTEM_DEBUG_FILES
libs/JSystem/src/J3DGraphAnimator/J3DCluster.cpp
libs/JSystem/src/J3DGraphAnimator/J3DJoint.cpp
libs/JSystem/src/J3DGraphAnimator/J3DMaterialAttach.cpp
)
add_library(JSystem_J3DGraphLoader STATIC
libs/JSystem/src/J3DGraphLoader/J3DMaterialFactory.cpp
libs/JSystem/src/J3DGraphLoader/J3DMaterialFactory_v21.cpp
libs/JSystem/src/J3DGraphLoader/J3DClusterLoader.cpp
@@ -446,6 +478,9 @@ set(JSYSTEM_DEBUG_FILES
libs/JSystem/src/J3DGraphLoader/J3DJointFactory.cpp
libs/JSystem/src/J3DGraphLoader/J3DShapeFactory.cpp
libs/JSystem/src/J3DGraphLoader/J3DAnmLoader.cpp
)
add_library(JSystem_JStudio STATIC
libs/JSystem/src/JStudio/JStudio/ctb.cpp
libs/JSystem/src/JStudio/JStudio/ctb-data.cpp
libs/JSystem/src/JStudio/JStudio/functionvalue.cpp
@@ -460,6 +495,9 @@ set(JSYSTEM_DEBUG_FILES
libs/JSystem/src/JStudio/JStudio/stb.cpp
libs/JSystem/src/JStudio/JStudio/stb-data-parse.cpp
libs/JSystem/src/JStudio/JStudio/stb-data.cpp
)
add_library(JSystem_JStudio_JStage STATIC
libs/JSystem/src/JStudio/JStudio_JStage/control.cpp
libs/JSystem/src/JStudio/JStudio_JStage/object.cpp
libs/JSystem/src/JStudio/JStudio_JStage/object-actor.cpp
@@ -467,10 +505,19 @@ set(JSYSTEM_DEBUG_FILES
libs/JSystem/src/JStudio/JStudio_JStage/object-camera.cpp
libs/JSystem/src/JStudio/JStudio_JStage/object-fog.cpp
libs/JSystem/src/JStudio/JStudio_JStage/object-light.cpp
)
add_library(JSystem_JStudio_JAudio2 STATIC
libs/JSystem/src/JStudio/JStudio_JAudio2/control.cpp
libs/JSystem/src/JStudio/JStudio_JAudio2/object-sound.cpp
)
add_library(JSystem_JStudio_JParticle STATIC
libs/JSystem/src/JStudio/JStudio_JParticle/control.cpp
libs/JSystem/src/JStudio/JStudio_JParticle/object-particle.cpp
)
add_library(JSystem_JAudio2 STATIC
libs/JSystem/src/JAudio2/JASCalc.cpp
libs/JSystem/src/JAudio2/JASTaskThread.cpp
libs/JSystem/src/JAudio2/JASDvdThread.cpp
@@ -535,22 +582,34 @@ set(JSYSTEM_DEBUG_FILES
libs/JSystem/src/JAudio2/JAUSoundAnimator.cpp
libs/JSystem/src/JAudio2/JAUSoundTable.cpp
libs/JSystem/src/JAudio2/JAUStreamFileTable.cpp
)
add_library(JSystem_JMessage STATIC
libs/JSystem/src/JMessage/control.cpp
libs/JSystem/src/JMessage/data.cpp
libs/JSystem/src/JMessage/processor.cpp
libs/JSystem/src/JMessage/resource.cpp
libs/JSystem/src/JMessage/locale.cpp
)
add_library(JSystem_JGadget STATIC
libs/JSystem/src/JGadget/binary.cpp
libs/JSystem/src/JGadget/define.cpp
libs/JSystem/src/JGadget/linklist.cpp
libs/JSystem/src/JGadget/search.cpp
libs/JSystem/src/JGadget/std-vector.cpp
)
add_library(JSystem_JAHostIO STATIC
libs/JSystem/src/JAHostIO/JAHFrameNode.cpp
libs/JSystem/src/JAHostIO/JAHioMessage.cpp
libs/JSystem/src/JAHostIO/JAHioMgr.cpp
libs/JSystem/src/JAHostIO/JAHioNode.cpp
libs/JSystem/src/JAHostIO/JAHioUtil.cpp
libs/JSystem/src/JAHostIO/JAHVirtualNode.cpp
)
add_library(JSystem_JHostIO STATIC
libs/JSystem/src/JHostIO/JORFile.cpp
libs/JSystem/src/JHostIO/JORHostInfo.cpp
libs/JSystem/src/JHostIO/JORMessageBox.cpp
@@ -560,7 +619,28 @@ set(JSYSTEM_DEBUG_FILES
libs/JSystem/src/JHostIO/JHIMccBuf.cpp
)
set(JSYSTEM_FILES
set(JSYSTEM_LIBRARIES
JSystem_JParticle
JSystem_JFramework
JSystem_J3DU
JSystem_JKernel
JSystem_JMath
JSystem_JSupport
JSystem_JUtility
JSystem_JStage
JSystem_J2DGraph
JSystem_J3DGraphBase
JSystem_J3DGraphAnimator
JSystem_J3DGraphLoader
JSystem_JStudio
JSystem_JStudio_JStage
JSystem_JStudio_JAudio2
JSystem_JStudio_JParticle
JSystem_JAudio2
JSystem_JMessage
JSystem_JGadget
JSystem_JAHostIO
JSystem_JHostIO
)
set(REL_FILES
@@ -1331,50 +1411,125 @@ set(DOLPHIN_FILES
)
set(DUSK_FILES
include/dusk/action_bindings.h
include/dusk/endian_gx.hpp
include/dusk/config.hpp
include/dusk/dvd_asset.hpp
include/dusk/scope_guard.hpp
src/dusk/dvd_asset.cpp
src/d/actor/d_a_alink_dusk.cpp
src/dusk/asserts.cpp
src/dusk/config.cpp
src/dusk/crash_reporting.cpp
src/dusk/data.cpp
src/dusk/data.hpp
src/dusk/endian.cpp
src/dusk/extras.c
src/dusk/extras.cpp
src/dusk/file_select.cpp
src/dusk/file_select.hpp
src/dusk/frame_interpolation.cpp
src/dusk/game_clock.cpp
src/dusk/globals.cpp
src/dusk/gyro_aim.cpp
src/dusk/gyro.cpp
src/dusk/gamepad_color.cpp
src/dusk/autosave.cpp
src/dusk/http/http.hpp
src/dusk/io.cpp
src/dusk/layout.cpp
src/dusk/logging.cpp
src/dusk/settings.cpp
src/dusk/speedrun.cpp
src/dusk/stubs.cpp
src/dusk/update_check.cpp
src/dusk/update_check.hpp
#src/dusk/m_Do_ext_dusk.cpp
src/dusk/imgui/ImGuiConfig.hpp
src/dusk/imgui/ImGuiConsole.hpp
src/dusk/imgui/ImGuiConsole.cpp
src/dusk/imgui/ImGuiEngine.cpp
src/dusk/imgui/ImGuiEngine.hpp
src/dusk/imgui/ImGuiMenuGame.cpp
src/dusk/imgui/ImGuiMenuGame.hpp
src/dusk/imgui/ImGuiBloomWindow.cpp
src/dusk/imgui/ImGuiBloomWindow.hpp
src/dusk/imgui/ImGuiMenuTools.cpp
src/dusk/imgui/ImGuiMenuTools.hpp
src/dusk/imgui/ImGuiMenuEnhancements.cpp
src/dusk/imgui/ImGuiMenuEnhancements.hpp
src/dusk/imgui/ImGuiPreLaunchWindow.cpp
src/dusk/imgui/ImGuiPreLaunchWindow.hpp
src/dusk/imgui/ImGuiFirstRunPreset.hpp
src/dusk/imgui/ImGuiFirstRunPreset.cpp
src/dusk/imgui/ImGuiActorSpawner.cpp
src/dusk/imgui/ImGuiProcessOverlay.cpp
src/dusk/imgui/ImGuiCameraOverlay.cpp
src/dusk/imgui/ImGuiHeapOverlay.cpp
src/dusk/imgui/ImGuiDebugPad.cpp
src/dusk/imgui/ImGuiControllerOverlay.cpp
src/dusk/imgui/ImGuiStubLog.cpp
src/dusk/imgui/ImGuiMapLoader.cpp
src/dusk/imgui/ImGuiSaveEditor.cpp
src/dusk/imgui/ImGuiStateShare.hpp
src/dusk/imgui/ImGuiStateShare.cpp
src/dusk/ui/achievements.cpp
src/dusk/ui/achievements.hpp
src/dusk/ui/bool_button.cpp
src/dusk/ui/bool_button.hpp
src/dusk/ui/button.cpp
src/dusk/ui/button.hpp
src/dusk/ui/component.cpp
src/dusk/ui/component.hpp
src/dusk/ui/controller_config.cpp
src/dusk/ui/controller_config.hpp
src/dusk/ui/document.cpp
src/dusk/ui/document.hpp
src/dusk/ui/editor.cpp
src/dusk/ui/editor.hpp
src/dusk/ui/event.cpp
src/dusk/ui/event.hpp
src/dusk/ui/graphics_tuner.cpp
src/dusk/ui/graphics_tuner.hpp
src/dusk/ui/input.cpp
src/dusk/ui/input.hpp
src/dusk/ui/modal.cpp
src/dusk/ui/modal.hpp
src/dusk/ui/nav_types.hpp
src/dusk/ui/number_button.cpp
src/dusk/ui/number_button.hpp
src/dusk/ui/overlay.cpp
src/dusk/ui/overlay.hpp
src/dusk/ui/pane.cpp
src/dusk/ui/pane.hpp
src/dusk/ui/menu_bar.cpp
src/dusk/ui/menu_bar.hpp
src/dusk/ui/prelaunch.cpp
src/dusk/ui/prelaunch.hpp
src/dusk/ui/preset.cpp
src/dusk/ui/preset.hpp
src/dusk/ui/reporting.cpp
src/dusk/ui/reporting.hpp
src/dusk/ui/select_button.cpp
src/dusk/ui/select_button.hpp
src/dusk/ui/settings.cpp
src/dusk/ui/settings.hpp
src/dusk/ui/string_button.cpp
src/dusk/ui/string_button.hpp
src/dusk/ui/tab_bar.cpp
src/dusk/ui/tab_bar.hpp
src/dusk/ui/ui.cpp
src/dusk/ui/ui.hpp
src/dusk/ui/warp.cpp
src/dusk/ui/warp.hpp
src/dusk/ui/window.cpp
src/dusk/ui/window.hpp
src/dusk/achievements.cpp
src/dusk/iso_validate.cpp
src/dusk/livesplit.cpp
src/dusk/offset_ptr.cpp
src/dusk/OSContext.cpp
src/dusk/OSReport.cpp
src/dusk/OSThread.cpp
src/dusk/OSMutex.cpp
src/dusk/discord.cpp
src/dusk/discord.hpp
src/dusk/discord_presence.cpp
src/dusk/version.cpp
src/dusk/action_bindings.cpp
)
set(DUSK_HTTP_BACKEND_FILES
src/dusk/http/no_backend.cpp
src/dusk/http/curl.cpp
src/dusk/http/winhttp.cpp
src/dusk/http/url_session.mm
)
Generated
+27
View File
@@ -0,0 +1,27 @@
{
"nodes": {
"nixpkgs": {
"locked": {
"lastModified": 1775710090,
"narHash": "sha256-ar3rofg+awPB8QXDaFJhJ2jJhu+KqN/PRCXeyuXR76E=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "4c1018dae018162ec878d42fec712642d214fdfa",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}
+219
View File
@@ -0,0 +1,219 @@
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
};
outputs = { self, nixpkgs }:
let
supportedSystems = [
"x86_64-linux"
"aarch64-linux"
"x86_64-darwin"
"aarch64-darwin"
];
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
pkgsFor = system: import nixpkgs { inherit system; };
# Dependencies that are not packaged in nixpkgs (used by the Linux package build):
buildSources = pkgs: {
dawn-src = pkgs.fetchzip {
url = "https://github.com/encounter/dawn-build/releases/download/v20260423.175430/dawn-linux-x86_64.tar.gz";
hash = "sha256-HXfKTLHtMPwupnFnaflCARtXVPuS/0PoCePXidjE5xs=";
stripRoot = false;
};
nod-src = pkgs.fetchzip {
url = "https://github.com/encounter/nod/releases/download/v2.0.0-alpha.8/libnod-linux-x86_64.tar.gz";
hash = "sha256-mUqvLsbsqaZ+HAjMmHYPYO+MgtanGRTw7Gzn5uXR5rE=";
stripRoot = false;
};
# The version of imgui on nixpkgs does not map cleanly.
imgui-src = pkgs.fetchFromGitHub {
owner = "ocornut";
repo = "imgui";
rev = "v1.91.9b-docking";
hash = "sha256-mQOJ6jCN+7VopgZ61yzaCnt4R1QLrW7+47xxMhFRHLQ=";
};
sqlite-src = pkgs.fetchzip {
url = "https://sqlite.org/2026/sqlite-amalgamation-3510300.zip";
hash = "sha256-pNMR8zxaaqfAzQ0AQBOXMct4usdjey1Q0Gnitg06UhM=";
};
rmlui-src = pkgs.fetchzip {
url = "https://github.com/mikke89/RmlUi/archive/f9b8c9e2935d5df2c7dff2c190d3968e99b0c3dc.tar.gz";
hash = "sha256-g4O/JZUrrcseOz8o2QJRt+2CeuiLnVeuDJc906xvuIg=";
};
};
# Dusklight Actual (Linux x86_64 only — relies on prebuilt dawn/nod binaries)
mkDusklight = pkgs:
let srcs = buildSources pkgs;
versionSuffix = if self ? shortRev && self.shortRev != null
then "nix-${self.shortRev}"
else "nix-dirty";
in
pkgs.stdenv.mkDerivation {
name = "dusklight";
src = ./.;
postUnpack = ''
sed -i '/add_subdirectory(tests)/d' $sourceRoot/extern/aurora/CMakeLists.txt
'';
# Remove last line to re-enable tests
cmakeFlags = [
"-DDUSK_VERSION_OVERRIDE=${versionSuffix}"
"-DFETCHCONTENT_FULLY_DISCONNECTED=ON"
"-DFETCHCONTENT_SOURCE_DIR_CXXOPTS=${pkgs.cxxopts.src}"
"-DFETCHCONTENT_SOURCE_DIR_JSON=${pkgs.nlohmann_json.src}"
"-DFETCHCONTENT_SOURCE_DIR_DAWN_PREBUILT=${srcs.dawn-src}"
"-DFETCHCONTENT_SOURCE_DIR_XXHASH=${pkgs.xxHash.src}"
"-DFETCHCONTENT_SOURCE_DIR_FMT=${pkgs.fmt.src}"
"-DFETCHCONTENT_SOURCE_DIR_TRACY=${pkgs.tracy.src}"
"-DAURORA_SDL3_PROVIDER=system"
"-DFETCHCONTENT_SOURCE_DIR_NOD_PREBUILT=${srcs.nod-src}"
"-DAURORA_NOD_PROVIDER=package"
"-DFETCHCONTENT_SOURCE_DIR_FREETYPE=${pkgs.freetype.src}"
"-DFETCHCONTENT_SOURCE_DIR_ZSTD=${pkgs.zstd.src}"
"-DFETCHCONTENT_SOURCE_DIR_SQLITE3=${srcs.sqlite-src}"
"-DFETCHCONTENT_SOURCE_DIR_IMGUI=${srcs.imgui-src}"
"-DFETCHCONTENT_SOURCE_DIR_RMLUI=${srcs.rmlui-src}"
"-DCMAKE_CROSSCOMPILING=ON" # Tests are not working as I didn't want to work through getting google's test suite working as well. This is the only guard I could find to disable it.
];
installPhase = ''
mkdir -p $out/bin
cp dusklight $out/bin/dusklight
cp -r ./res $out/bin/res
mkdir -p $out/share/applications
cp $src/platforms/freedesktop/dusklight.desktop $out/share/applications/dusklight.desktop
for size in 16 32 48 64 128 256 512 1024; do
install -Dm644 $src/platforms/freedesktop/''${size}x''${size}/apps/dusklight.png \
$out/share/icons/hicolor/''${size}x''${size}/apps/dusklight.png
done
'';
nativeBuildInputs = [
pkgs.cmake
pkgs.pkg-config
pkgs.wayland
];
buildInputs = [
pkgs.libGL
pkgs.libX11
pkgs.libXcursor
pkgs.libxi
pkgs.libxcb
pkgs.libxrandr
pkgs.libxscrnsaver
pkgs.libxtst
pkgs.libjpeg8
pkgs.libxkbcommon
pkgs.libglvnd
pkgs.cxxopts
pkgs.abseil-cpp
pkgs.sdl3
pkgs.fmt
pkgs.tracy
pkgs.freetype
pkgs.zstd
];
};
# Tooling common to every supported host (Linux and macOS).
commonDevTools = pkgs: [
pkgs.cmake
pkgs.ninja
pkgs.pkg-config
pkgs.git
pkgs.python3
pkgs.python3Packages.markupsafe
pkgs.rustc
pkgs.cargo
pkgs.sccache
];
# Linux-only system libraries — mirrors the apt deps from .github/workflows/build.yml
# so the cmake presets resolve the same set of headers as CI.
linuxDevDeps = pkgs: [
# Compilers / linkers
pkgs.clang
pkgs.lld
# C/C++ utilities
pkgs.curl
pkgs.openssl
pkgs.zlib
pkgs.libpng
pkgs.libjpeg_turbo
pkgs.freetype
pkgs.zstd
pkgs.fmt
pkgs.tracy
pkgs.cxxopts
pkgs.abseil-cpp
pkgs.sdl3
pkgs.ncurses
pkgs.libunwind
pkgs.libusb1
pkgs.fuse
# Wayland / display server
pkgs.wayland
pkgs.wayland-protocols
pkgs.libxkbcommon
pkgs.libdecor
# OpenGL / Vulkan
pkgs.libGL
pkgs.libGLU
pkgs.libglvnd
pkgs.vulkan-headers
pkgs.vulkan-loader
# X11
pkgs.libX11
pkgs.libxcb
pkgs.libXcursor
pkgs.libxi
pkgs.libxrandr
pkgs.libxscrnsaver
pkgs.libxtst
pkgs.libxinerama
# Audio
pkgs.alsa-lib
pkgs.libpulseaudio
pkgs.pipewire
# System integration
pkgs.dbus
pkgs.udev
pkgs.gtk3
];
# On macOS we deliberately avoid pulling Nix's cc-wrapper so CMake picks up
# Apple Clang and the Xcode SDK directly, matching the macOS CI workflow.
mkDarwinShell = pkgs:
pkgs.mkShellNoCC {
packages = commonDevTools pkgs;
shellHook = ''
echo "Dusklight dev shell (macOS)"
echo "Requires Xcode Command Line Tools for Apple Clang and the macOS SDK."
echo "Configure: cmake --preset macos-default-relwithdebinfo"
echo "Build: cmake --build --preset macos-default-relwithdebinfo"
'';
};
mkLinuxShell = pkgs:
pkgs.mkShell {
packages = (commonDevTools pkgs) ++ (linuxDevDeps pkgs);
shellHook = ''
echo "Dusklight dev shell (Linux)"
echo "Configure: cmake --preset linux-default-relwithdebinfo"
echo " cmake --preset linux-clang-relwithdebinfo"
echo "Build: cmake --build --preset <preset>"
'';
};
mkDevShell = pkgs:
if pkgs.stdenv.isDarwin
then mkDarwinShell pkgs
else mkLinuxShell pkgs;
in {
packages.x86_64-linux.default = mkDusklight (pkgsFor "x86_64-linux");
devShells = forAllSystems (system: {
default = mkDevShell (pkgsFor system);
});
};
}
+4
View File
@@ -39,6 +39,10 @@ enum Z2WolfHowlCurveID {
Z2WOLFHOWL_NEWSONG2,
Z2WOLFHOWL_NEWSONG3,
#if TARGET_PC
Z2WOLFHOWL_TIMESONG,
#endif
Z2WOLFHOWL_MAX
};
+14 -1
View File
@@ -4549,8 +4549,21 @@ public:
/* 0x03850 */ daAlink_procFunc mpProcFunc;
#if TARGET_PC
void handleWolfHowl();
void handleQuickTransform();
bool checkGyroAimItemContext();
bool checkGyroAimContext();
void onIronBallChainInterpCallback();
static const int IRON_BALL_CHAIN_COUNT = 102;
cXyz mIBChainInterpPrevPos[IRON_BALL_CHAIN_COUNT];
cXyz mIBChainInterpCurrPos[IRON_BALL_CHAIN_COUNT];
csXyz mIBChainInterpPrevAngle[IRON_BALL_CHAIN_COUNT];
csXyz mIBChainInterpCurrAngle[IRON_BALL_CHAIN_COUNT];
cXyz mIBChainInterpPrevHandRoot;
cXyz mIBChainInterpCurrHandRoot;
bool mIBChainInterpPrevValid;
bool mIBChainInterpCurrValid;
#endif
}; // Size: 0x385C
+9
View File
@@ -188,6 +188,15 @@ public:
/* 0x273C */ f32 mKankyoBlend;
/* 0x2740 */ u8 field_0x2740;
/* 0x2744 */ dMsgFlow_c mMsgFlow;
#if TARGET_PC
cXyz mReinsInterpPrev[2][16];
cXyz mReinsInterpCurr[2][16];
cXyz mReinsTexInterpPrev[2];
cXyz mReinsTexInterpCurr[2];
bool mReinsInterpPrevValid;
bool mReinsInterpCurrValid;
s8 mDemoCamSyncTicks;
#endif
};
STATIC_ASSERT(sizeof(b_gnd_class) == 0x2790);
+3
View File
@@ -44,6 +44,9 @@ public:
int draw();
int execute();
void drawMeter();
#if TARGET_PC
void updateOnWide();
#endif
void setComboCount(u8, u8);
void setScoreCount(u32);
void addScoreCount(cXyz*, u32, u8);
+6
View File
@@ -80,6 +80,12 @@ public:
/* 0x125C */ u32 field_0x125c;
/* 0x1260 */ u8 field_0x1260[0x126C - 0x1260];
/* 0x126C */ u8 HIOInit;
#if TARGET_PC
cXyz mStalkLineInterpPrev[12];
cXyz mStalkLineInterpCurr[12];
bool mStalkLineInterpPrevValid;
bool mStalkLineInterpCurrValid;
#endif
};
STATIC_ASSERT(sizeof(e_db_class) == 0x1270);
+6
View File
@@ -73,6 +73,12 @@ public:
/* 0x124C */ f32 field_0x124c;
/* 0x1250 */ u8 field_0x1250[0x1264 - 0x1250];
/* 0x1264 */ u8 HIOInit;
#if TARGET_PC
cXyz mStalkLineInterpPrev[12];
cXyz mStalkLineInterpCurr[12];
bool mStalkLineInterpPrevValid;
bool mStalkLineInterpCurrValid;
#endif
};
STATIC_ASSERT(sizeof(e_hb_class) == 0x1268);
+6
View File
@@ -44,6 +44,12 @@ public:
/* 0x88C */ u8 field_0x88C[0x8C8 - 0x88C];
/* 0x8C8 */ s8 field_0x8c8;
/* 0x8C9 */ u8 mInitHIO;
#if TARGET_PC
cXyz mRopeInterpPrev[16];
cXyz mRopeInterpCurr[16];
bool mRopeInterpPrevValid;
bool mRopeInterpCurrValid;
#endif
};
STATIC_ASSERT(sizeof(e_mb_class) == 0x8cc);
+9
View File
@@ -81,6 +81,15 @@ public:
/* 0x306D */ u8 field_0x306D[0x307C - 0x306D];
/* 0x307C */ u32 mBodyEffEmtrID;
/* 0x3080 */ u8 mInitHIO;
#if TARGET_PC
static const int HAIR_STRAND_COUNT = 22;
static const int HAIR_SEGMENT_COUNT = 16;
cXyz mHairInterpPrev[HAIR_STRAND_COUNT * HAIR_SEGMENT_COUNT];
cXyz mHairInterpCurr[HAIR_STRAND_COUNT * HAIR_SEGMENT_COUNT];
bool mHairInterpPrevValid;
bool mHairInterpCurrValid;
#endif
};
STATIC_ASSERT(sizeof(e_s1_class) == 0x3084);
+9
View File
@@ -220,6 +220,15 @@ public:
/* 0x17E2 */ s16 wait_roll_angle; ///< @brief Roll angle during wait state.
/* 0x17E4 */ u8 field_0x17e4[0x17e8 - 0x17e4];
/* 0x17E8 */ f32 ride_speed_max; ///< @brief Speed rate for riding calculations.
#if TARGET_PC
cXyz himo_mat_interp_prev[2][16];
cXyz himo_mat_interp_curr[2][16];
cXyz himo_tex_interp_prev[2];
cXyz himo_tex_interp_curr[2];
bool himo_interp_prev_valid;
bool himo_interp_curr_valid;
s8 demo_cam_sync_ticks;
#endif
};
STATIC_ASSERT(sizeof(e_wb_class) == 0x17EC);
+6
View File
@@ -74,6 +74,12 @@ public:
/* 0x1250 */ f32 field_0x1250;
/* 0x1254 */ u8 field_0x1254[0x1268 - 0x1254];
/* 0x1268 */ u8 field_0x1268;
#if TARGET_PC
cXyz mLineMatInterpPrev[12];
cXyz mLineMatInterpCurr[12];
bool mLineMatInterpPrevValid;
bool mLineMatInterpCurrValid;
#endif
};
STATIC_ASSERT(sizeof(e_yd_class) == 0x126c);
+9
View File
@@ -63,6 +63,15 @@ public:
/* 0x0BB4 */ yg_ke_s mYgKes[13];
/* 0x1880 */ mDoExt_3DlineMat0_c mLineMat;
/* 0x189C */ u8 mIsFirstSpawn;
#if TARGET_PC
static const int TENTACLE_STRAND_COUNT = 13;
static const int TENTACLE_SEGMENT_COUNT = 10;
cXyz mTentacleInterpPrev[TENTACLE_STRAND_COUNT * TENTACLE_SEGMENT_COUNT];
cXyz mTentacleInterpCurr[TENTACLE_STRAND_COUNT * TENTACLE_SEGMENT_COUNT];
bool mTentacleInterpPrevValid;
bool mTentacleInterpCurrValid;
#endif
};
STATIC_ASSERT(sizeof(e_yg_class) == 0x18a0);
+6
View File
@@ -77,6 +77,12 @@ public:
/* 0x1260 */ u32 field_0x1260;
/* 0x1260 */ u8 field_0x1264[0x1270 - 0x1264];
/* 0x1270 */ bool mIsHIOOwner;
#if TARGET_PC
cXyz mLineInterpPrev[12];
cXyz mLineInterpCurr[12];
bool mLineInterpPrevValid;
bool mLineInterpCurrValid;
#endif
};
STATIC_ASSERT(sizeof(e_yh_class) == 0x1274);
+4
View File
@@ -25,6 +25,10 @@ public:
/* 0x164 */ cXyz mMinVal;
/* 0x170 */ cXyz mMaxVal;
/* 0x17C */ cXyz mViewScale;
#if TARGET_PC
bool mbReset = false;
bool mbHadEntry = false;
#endif
};
/**
+6
View File
@@ -94,6 +94,12 @@ static void __THPAudioInitialize(THPAudioDecodeInfo* info, u8* ptr);
#define THP_TEXTURE_SET_COUNT 3
#endif
#if TARGET_PC
namespace dusk {
void MoviePlayerShutdown();
}
#endif
struct daMP_THPPlayer {
/* 0x000 */ DVDFileInfo fileInfo;
/* 0x03C */ THPHeader header;
+12
View File
@@ -31,6 +31,10 @@ public:
csXyz* getAngle() { return field_0x8a4; }
J3DModelData* getModelData() { return mModelData; }
#if TARGET_PC
void onInterpCallback();
#endif
private:
/* 0x568 */ request_of_phase_process_class mPhase;
/* 0x570 */ J3DModelData* mModelData;
@@ -42,6 +46,14 @@ private:
/* 0x694 */ cXyz field_0x694[22];
/* 0x79C */ cXyz field_0x79c[22];
/* 0x8A4 */ csXyz field_0x8a4[22];
#if TARGET_PC
static const int CHAIN_COUNT = 22;
cXyz mChainInterpPrev[CHAIN_COUNT];
cXyz mChainInterpCurr[CHAIN_COUNT];
bool mChainInterpPrevValid;
bool mChainInterpCurrValid;
#endif
};
STATIC_ASSERT(sizeof(daObjFchain_c) == 0x928);
+11
View File
@@ -25,6 +25,10 @@ public:
int Draw();
int Delete();
#if TARGET_PC
void onInterpCallback();
#endif
enum Param_e {
LOCK_e = (1 << 6), NO_BASE_DISP = (1 << 7)
};
@@ -50,6 +54,13 @@ private:
/* 0x1020 */ dCcD_Cyl mCylinderCollider;
/* 0x115C */ s32 mStopSwingingFrames;
#if TARGET_PC
cXyz mChainInterpPrev[64];
cXyz mChainInterpCurr[64];
bool mChainInterpPrevValid;
bool mChainInterpCurrValid;
#endif
// Number of chain models
u32 getArg0() {
return fopAcM_GetParamBit(this, 0, 6);
+3
View File
@@ -58,6 +58,9 @@ public:
void setNextPoint();
int Draw();
int Delete();
#if TARGET_PC
friend void daL8Lift_interp_callback(bool isSimFrame, void* pUserWork);
#endif
u8 getPthID() { return fopAcM_GetParamBit(this, 0, 8); }
u8 getMoveSpeed() { return fopAcM_GetParamBit(this, 8, 4); }
+2 -4
View File
@@ -68,10 +68,8 @@ public:
/* 0x904 */ cXyz field_0x904[2];
/* 0x91C */ int field_0x91c;
/* 0x920 */ cXyz field_0x920[63];
/* 0xC14 */ f32 field_0xc14[4];
/* 0xC24 */ u8 field_0xc24[0xd10 - 0xc24];
/* 0xD10 */ s8 field_0xd10[4];
/* 0xD14 */ u8 field_0xd14[0xd50 - 0xd14];
/* 0xC14 */ f32 field_0xc14[63];
/* 0xD10 */ s8 field_0xd10[64];
/* 0xD50 */ mDoExt_3DlineMat1_c field_0xd50;
/* 0xD8C */ int field_0xd8c;
};
+6
View File
@@ -143,6 +143,12 @@ public:
/* 0x20 */ JORFile mFile;
#endif
#if TARGET_PC
/* 0x24 */ u8 mManualMode;
/* 0x25 */ f32 freeXAngle;
/* 0x29 */ f32 freeYAngle;
#endif
u32 Id(s32 i_style) { return mCamStyleData[i_style].field_0x0; }
int Algorythmn(s32 i_style) { return mCamStyleData[i_style].field_0x4; }
int Algorythmn() { return mCurrentStyle->field_0x4; }
+23
View File
@@ -118,6 +118,18 @@ class camera_class;
class dCamera_c;
typedef bool (dCamera_c::*engine_fn)(s32);
#if TARGET_PC
struct DebugFlyCam {
bool initialized;
f32 pitch;
f32 yaw;
cXyz savedCenter;
cXyz savedEye;
f32 savedFovy;
cSAngle savedBank;
};
#endif
class dCamera_c {
public:
class dCamInfo_c {
@@ -273,6 +285,8 @@ public:
/* 0xA4 */ f32 field_0xa4;
/* 0xA8 */ int field_0xa8;
/* 0xAC */ f32 field_0xac;
f32 xAngle;
f32 yAngle;
};
struct LockOnData {
@@ -1024,6 +1038,11 @@ public:
bool colosseumCamera(s32);
bool test1Camera(s32);
bool test2Camera(s32);
#if TARGET_PC
bool freeCamera();
bool executeDebugFlyCam();
void deactivateDebugFlyCam();
#endif
bool towerCamera(s32);
bool hookshotCamera(s32);
bool railCamera(s32);
@@ -1371,6 +1390,10 @@ public:
/* 0x970 */ dCamSetup_c mCamSetup;
/* 0xAEC */ dCamParam_c mCamParam;
/* 0xB0C */ u8 field_0xb0c;
#if TARGET_PC
DebugFlyCam mDebugFlyCam;
#endif
}; // Size: 0xB10
dCamera_c* dCam_getBody();
+8 -4
View File
@@ -1845,6 +1845,12 @@ inline void dComIfGs_addDeathCount() {
g_dComIfG_gameInfo.info.getPlayer().getPlayerInfo().addDeathCount();
}
#if TARGET_PC
inline u16 dComIfGs_getDeathCount() {
return g_dComIfG_gameInfo.info.getPlayer().getPlayerInfo().getDeathCount();
}
#endif
inline char* dComIfGs_getPlayerName() {
return g_dComIfG_gameInfo.info.getPlayer().getPlayerInfo().getPlayerName();
}
@@ -4834,8 +4840,7 @@ inline void dComIfGd_drawXluListDark() {
inline void dComIfGd_drawXluListInvisible() {
ZoneScoped;
#ifdef TARGET_PC
if (dusk::getSettings().game.enableWaterRefraction &&
!dusk::getSettings().game.enableFrameInterpolation) {
if (!dusk::getSettings().game.disableWaterRefraction) {
#endif
g_dComIfG_gameInfo.drawlist.drawXluListInvisible();
#ifdef TARGET_PC
@@ -4846,8 +4851,7 @@ inline void dComIfGd_drawXluListInvisible() {
inline void dComIfGd_drawOpaListInvisible() {
ZoneScoped;
#ifdef TARGET_PC
if (dusk::getSettings().game.enableWaterRefraction &&
!dusk::getSettings().game.enableFrameInterpolation) {
if (!dusk::getSettings().game.disableWaterRefraction) {
#endif
g_dComIfG_gameInfo.drawlist.drawOpaListInvisible();
#ifdef TARGET_PC
+9 -2
View File
@@ -209,6 +209,10 @@ public:
/* 0x04 */ TGXTexObj* mpTexObj;
/* 0x08 */ Mtx mVolumeMtx;
/* 0x38 */ Mtx mMtx;
#if TARGET_PC
const void* mVolumeMtxKey;
const void* mMtxKey;
#endif
}; // Size: 0x68
struct cBgD_Vtx_t;
@@ -308,8 +312,11 @@ private:
/* 0x0000C */ dDlst_shadowSimple_c mSimple[128];
/* 0x0340C */ int mNextID;
/* 0x03410 */ dDlst_shadowReal_c mReal[8];
/* 0x15EB0 */ TGXTexObj field_0x15eb0[2];
/* 0x15EF0 */ void* field_0x15ef0[2];
/* 0x15EB0 */ TGXTexObj mShadowTexObj[2];
/* 0x15EF0 */ void* mShadowTexData[2];
#if TARGET_PC
int mTexResScale;
#endif
};
class dDlst_window_c {
+4
View File
@@ -196,7 +196,11 @@ public:
/* 0x108 */ int mSkipTimer;
/* 0x10C */ int mSkipParameter;
/* 0x110 */ BOOL mIsSkipFade;
#if TARGET_PC
/* 0x114 */ char mSkipEventName[21];
#else
/* 0x114 */ char mSkipEventName[20];
#endif
/* 0x128 */ u8 mCompulsory;
/* 0x129 */ bool mRoomInfoSet;
/* 0x12C */ int mRoomNo;
+16
View File
@@ -10,6 +10,7 @@
#include "JSystem/J3DGraphLoader/J3DAnmLoader.h"
class dFile_info_c;
class J2DPicture;
class dDlst_FileSel_c : public dDlst_base_c {
public:
@@ -113,6 +114,14 @@ public:
/* 0x04 */ J2DScreen* Scr3m;
};
class dDlst_FileSelFade_c : public dDlst_base_c {
public:
void draw();
virtual ~dDlst_FileSelFade_c() {}
/* 0x04 */ J2DPicture* mpPict;
};
class dFs_HIO_c : public JORReflexible {
public:
dFs_HIO_c();
@@ -676,6 +685,9 @@ public:
#if PLATFORM_GCN
/* 0x2378 */ J2DPicture* mpFadePict;
#endif
#ifdef TARGET_PC
dDlst_FileSelFade_c mFadeDlst;
#endif
#if PLATFORM_WII || PLATFORM_SHIELD
/* 0x2376 */ u8 field_0x2376[SAVEFILE_SIZE];
@@ -684,6 +696,10 @@ public:
#endif
};
#ifdef TARGET_PC
STATIC_ASSERT(sizeof(dFile_select_c) == 0x237C + sizeof(dDlst_FileSelFade_c));
#else
STATIC_ASSERT(sizeof(dFile_select_c) == 0x237C);
#endif
#endif /* D_FILE_D_FILE_SELECT_H */
+3
View File
@@ -223,6 +223,9 @@ private:
/* 0x8F */ u8 field_0x8f;
/* 0x90 */ u8 field_0x90;
/* 0x91 */ u8 field_0x91;
#if TARGET_PC
bool previousMirror;
#endif
}; // Size: 0x94
class dMap_HIO_list_c : public dMpath_HIO_n::hioList_c {
+8
View File
@@ -91,6 +91,10 @@ public:
void calcCursor();
void drawCursor();
#if TARGET_PC
void dMapBgWide();
#endif
void setDPDFloorSelCurPos(s8 i_pos) { field_0xdd6 = i_pos; }
f32 getMapWidth() { return mMapWidth; }
@@ -103,6 +107,10 @@ public:
field_0xd98 = param_1;
}
#if TARGET_PC
void resetScrollArrowMask() { field_0xdda = 0; }
#endif
/* 0xC98 */ JKRExpHeap* mpHeap;
/* 0xC9C */ JKRExpHeap* mpTalkHeap;
/* 0xCA0 */ STControl* mpStick;
+3 -1
View File
@@ -75,7 +75,9 @@ public:
/* 0x8 */ BE(u16) mAreaName;
/* 0xA */ u8 mCount;
#ifdef _MSVC_LANG
u8* __get_mRoomNos() const { return (u8*)(this + 1); }
// Room numbers start at offset 0xB (right after mCount), NOT at sizeof(data)=12.
// (u8*)(this+1) would give offset 12 because MSVC sizeof=12; use &mCount+1 instead.
u8* __get_mRoomNos() const { return (u8*)&mCount + 1; }
__declspec(property(get = __get_mRoomNos)) u8* mRoomNos;
#else
/* 0xB */ u8 mRoomNos[0];
+14
View File
@@ -81,6 +81,10 @@ public:
void calcDrawPriority();
void setArrowPosAxis(f32, f32);
#if TARGET_PC
void fMapBackWide();
#endif
virtual void draw();
virtual ~dMenu_Fmap2DBack_c();
@@ -165,6 +169,12 @@ public:
void mapBlink() {}
#if PLATFORM_WII || TARGET_PC
f32 getMirrorPosX(f32 param_0, f32 param_1) {
return (field_0x11dc * 2.0f - (param_0 + param_1)) - param_1;
}
#endif
// Unknown name
struct RegionTexData {
/* 0x00 */ float mMinX;
@@ -330,6 +340,10 @@ public:
void setHIO(bool);
bool isWarpAccept();
#if TARGET_PC
void fMapTopWide();
#endif
virtual void draw();
virtual ~dMenu_Fmap2DTop_c();
+10
View File
@@ -66,6 +66,16 @@ public:
_c90 = param_2;
}
#if PLATFORM_WII || TARGET_PC
f32 getMirrorCenterPosX(f32 param_0, f32 param_1) {
if (_c90) {
return (mCenterPosX * 2.0f - (param_0 + param_1)) - param_1;
}
return param_0;
}
#endif
struct Stage_c {
// Incomplete class
+12
View File
@@ -204,6 +204,18 @@ private:
/* 0x6D1 */ u8 field_0x6d1;
/* 0x6D2 */ u8 field_0x6d2;
/* 0x6D3 */ u8 field_0x6d3;
#if TARGET_PC
f32 mSelectItemSlideElapsed[4];
f32 mCursorInterpPrevX;
f32 mCursorInterpPrevY;
f32 mCursorInterpCurrX;
f32 mCursorInterpCurrY;
s16 mCursorInterpPrevAngle;
s16 mCursorInterpCurrAngle;
bool mCursorInterpPrevAngular;
bool mCursorInterpCurrAngular;
bool mCursorInterpInit;
#endif
};
#endif /* D_MENU_D_MENU_RING_H */
+5
View File
@@ -343,6 +343,11 @@ public:
/* 0x624 */ f32 mMidonaPosX;
/* 0x628 */ f32 mMidonaPosY;
/* 0x62C */ f32 mMidonaScale;
#ifdef TARGET_PC
bool mWasListen[2];
bool mWasRepeat[2];
#endif
};
#endif /* D_METER_D_METER_BUTTON_H */
+3
View File
@@ -67,6 +67,9 @@ public:
bool isStaffMessage();
bool isSaveMessage();
bool isTalkMessage();
#if TARGET_PC
bool isShopItemMessage();
#endif
const char* getSmellName();
const char* getPortalName();
const char* getBombName();
+4
View File
@@ -110,6 +110,10 @@ struct dMsgScrnHowl_c : public dMsgScrnBase_c {
/* 0x27A0 */ f32 field_0x27a0;
/* 0x27A4 */ f32 field_0x27a4;
/* 0x27A8 */ f32 field_0x27a8;
#if TARGET_PC
u8 showCursor;
#endif
};
#endif /* MSG_SCRN_D_MSG_SCRN_HOWL_H */
+1 -1
View File
@@ -89,7 +89,7 @@ public:
void MojiSelectAnm3();
int mojiChange(u8);
void selectMojiSet();
#if REGION_JPN
#if TARGET_PC || REGION_JPN
int checkDakuon(int, u8);
int setDakuon(int, u8);
#endif
+2 -2
View File
@@ -79,7 +79,7 @@ public:
bool isProgressiveMode();
void setRenderMode();
#if VERSION == VERSION_GCN_PAL || PLATFORM_WII || PLATFORM_SHIELD
#if TARGET_PC || VERSION == VERSION_GCN_PAL || PLATFORM_WII || PLATFORM_SHIELD
u8 getPalLanguage();
#endif
@@ -149,7 +149,7 @@ public:
/* 0x200 */ dDlst_2D_c* mNvLogo;
/* 0x204 */ dDlst_2D_c* mMocImg;
#endif
#if VERSION == VERSION_GCN_PAL
#if TARGET_PC || VERSION == VERSION_GCN_PAL
/* 0x1FC */ mDoDvdThd_mountArchive_c* mpPalLogoResCommand;
#endif
/* 0x1FC */ request_of_phase_process_class* m_preLoad_dylPhase;
+21 -6
View File
@@ -486,20 +486,35 @@ public:
mDeathCount++;
}
}
#if TARGET_PC
u16 getDeathCount() const { return mDeathCount; }
#endif
char* getPlayerName() const { return const_cast<char*>(mPlayerName); }
void setPlayerName(const char* i_name) { strcpy(mPlayerName, i_name); }
void setPlayerName(const char* i_name) {
#if AVOID_UB
strncpy(mPlayerName, i_name, sizeof(mPlayerName) - 1);
mPlayerName[sizeof(mPlayerName) - 1] = '\0';
#else
strcpy(mPlayerName, i_name);
#endif
}
char* getHorseName() const { return const_cast<char*>(mHorseName); }
void setHorseName(const char* i_name) { strcpy(mHorseName, i_name); }
void setHorseName(const char* i_name) {
#if AVOID_UB
strncpy(mHorseName, i_name, sizeof(mHorseName) - 1);
mHorseName[sizeof(mHorseName) - 1] = '\0';
#else
strcpy(mHorseName, i_name);
#endif
}
u8 getClearCount() const { return mClearCount; }
/* 0x00 */ BE(u64) unk0;
/* 0x08 */ BE(s64) mTotalTime;
/* 0x10 */ BE(u16) unk16;
/* 0x12 */ BE(u16) mDeathCount;
/* 0x14 */ char mPlayerName[16];
/* 0x24 */ u8 unk36;
/* 0x25 */ char mHorseName[16];
/* 0x35 */ u8 unk53;
/* 0x14 */ char mPlayerName[17];
/* 0x25 */ char mHorseName[17];
/* 0x36 */ u8 mClearCount;
/* 0x37 */ u8 unk55[5];
}; // Size: 0x40
+10
View File
@@ -47,6 +47,13 @@ public:
mPositionY = y;
}
#ifdef TARGET_PC
f32 getPositionX() const { return mPositionX; }
f32 getPositionY() const { return mPositionY; }
void refreshAspectScale();
#endif
void onUpdateFlag() { mUpdateFlag = true; }
void resetUpdateFlag() { mUpdateFlag = false; }
@@ -79,6 +86,9 @@ private:
/* 0x58 */ f32 mPositionX;
/* 0x5C */ f32 mPositionY;
/* 0x60 */ f32 mParam1;
#ifdef TARGET_PC
f32 mBaseParam1;
#endif
/* 0x64 */ f32 mParam2;
/* 0x68 */ f32 mParam3;
/* 0x6C */ f32 mParam4;
+70
View File
@@ -0,0 +1,70 @@
#pragma once
#include <cstdint>
#include <functional>
#include <queue>
#include <string>
#include <string_view>
#include <unordered_set>
#include <vector>
#include "nlohmann/json.hpp"
namespace dusk {
enum class AchievementCategory : uint8_t {
Challenge,
Collection,
Minigame,
Misc,
Glitched
};
struct Achievement {
const char* key;
const char* name;
const char* description;
AchievementCategory category;
bool isCounter;
int32_t goal;
int32_t progress;
bool unlocked;
};
// Responsible for updating a.progress.
// Use extra for any per-achievement state that must survive across frames or sessions, extra is saved
using AchievementCheckFn = std::function<void(Achievement& a, nlohmann::json& extra)>;
class AchievementSystem {
public:
static AchievementSystem& get();
void load();
void save();
void tick();
void clearAll();
void clearOne(const char* key);
// Signals are visible to all achievement checks within the same tick, then cleared.
void signal(const char* key);
bool hasSignal(const char* key) const;
std::vector<Achievement> getAchievements() const;
private:
struct Entry {
Achievement achievement;
AchievementCheckFn check;
nlohmann::json extra;
};
AchievementSystem();
static std::vector<Entry> makeEntries();
void processEntry(Entry& e);
std::vector<Entry> m_entries;
std::unordered_set<std::string_view> m_signals;
bool m_loaded = false;
bool m_dirty = false;
};
} // namespace dusk
+43
View File
@@ -0,0 +1,43 @@
#pragma once
#include <unordered_map>
#include "dusk/config_var.hpp"
namespace dusk {
enum class ActionBinds {
FIRST_PERSON_CAMERA,
CALL_MIDNA,
OPEN_DUSKLIGHT_MENU,
TURBO_SPEED_BUTTON,
COUNT,
};
struct ActionBindData {
std::array<config::ActionBindConfigVar, 4>* configVars{};
std::string actionName{};
};
struct ActionBindPressData {
bool pressedCurFrame{false};
bool pressedPrevFrame{false};
};
using ActionBindsMap = std::unordered_map<ActionBinds, ActionBindData>;
ActionBindsMap& getActionBinds();
bool isActionBound(ActionBinds action, u32 port);
void updateActionBindings();
bool getActionBindTrig(ActionBinds action, u32 port);
bool getActionBindHold(ActionBinds action, u32 port);
bool getActionBindHoldAnyPort(ActionBinds action);
int getActionBindButton(ActionBinds action, u32 port);
}
+6 -1
View File
@@ -7,7 +7,12 @@ namespace dusk {
*
* This gets used for file paths and such, and cannot be changed!
*/
constexpr auto AppName = "Dusk";
constexpr auto AppName = "Dusklight";
/**
* Previous AppName to migrate data from.
*/
constexpr auto LegacyAppName = "Dusk";
/**
* \brief The internal organization name for the game.
+13
View File
@@ -1,8 +1,19 @@
#pragma once
#include <cmath>
#include <dolphin/types.h>
namespace dusk::audio {
// Converts a 0-1 volume to a linear amplitude multiplier.
// The curve is -4 dB per 10% step: 100% = 0 dB, 90% = -4 dB, ..., 0% = -inf dB
inline f32 MasterVolumeToLinear(f32 v) {
if (v <= 0.0f) {
return 0.0f;
}
return std::pow(10.0f, (v - 1.0f) * 2.0f);
}
/**
* Initialize the audio system and start playing audio.
*/
@@ -12,6 +23,8 @@ namespace dusk::audio {
void SetMasterVolume(f32 value);
void SetPaused(bool paused);
u32 GetResetCount(int channelIdx);
f32 VolumeFromU16(u16 value);
+19
View File
@@ -0,0 +1,19 @@
#pragma once
#ifndef AUTOSAVE_H
#define AUTOSAVE_H
#include <m_Do/m_Do_MemCardRWmng.h>
#include <m_Do/m_Do_MemCard.h>
#include <d/actor/d_a_alink.h>
void noAutoSave();
void triggerAutoSave();
void updateAutoSave();
void enterAutoSave();
void autoSaving();
void waitingForWrite();
void endAutoSave();
void toggleAutoSave(bool enabled);
#endif
+13
View File
@@ -1,6 +1,7 @@
#ifndef DUSK_CONFIG_HPP
#define DUSK_CONFIG_HPP
#include <functional>
#include <stdexcept>
#include "nlohmann/json.hpp"
#include "config_var.hpp"
@@ -111,6 +112,18 @@ void Save();
*/
ConfigVarBase* GetConfigVar(std::string_view name);
/**
* \brief Resets all custom action bindings for a specific port to nothing
*
* @param port The port to be cleared of action bindings
*/
void ClearAllActionBindings(int port);
/**
* \brief Call a function on every registered CVar.
*/
void EnumerateRegistered(std::function<void(ConfigVarBase&)> callback);
template <ConfigValue T>
const ConfigImplBase* GetConfigImpl() {
static ConfigImpl<T> config;
+72
View File
@@ -48,6 +48,13 @@ enum class ConfigVarLayer : u8 {
* Will not get saved to config.
*/
Override,
/**
* The CVar is temporarily overridden by speedrun mode.
* Will not get saved to config. Cleared when speedrun mode is disabled.
* Lower priority than Override, so launch args still win.
*/
Speedrun,
};
class ConfigImplBase;
@@ -113,6 +120,12 @@ public:
* This is necessary to make it legal to access.
*/
void markRegistered();
/**
* Clear a speedrun-mode override if one is active on this CVar.
* Safe to call on any CVar, no-op if not at the Speedrun layer.
*/
virtual void clearSpeedrunOverride() {}
};
template <typename T>
@@ -146,6 +159,12 @@ concept ConfigValue =
template <ConfigValue T>
const ConfigImplBase* GetConfigImpl();
template <typename T>
struct ConfigEnumRange {
static constexpr auto min = std::numeric_limits<std::underlying_type_t<T>>::min();
static constexpr auto max = std::numeric_limits<std::underlying_type_t<T>>::max();
};
/**
* \brief A CVar storing values.
*
@@ -156,6 +175,7 @@ class ConfigVar : public ConfigVarBase {
T defaultValue;
T value;
T overrideValue;
ConfigVarLayer priorLayer = ConfigVarLayer::Default;
public:
/**
@@ -183,12 +203,18 @@ public:
case ConfigVarLayer::Value:
return value;
case ConfigVarLayer::Override:
case ConfigVarLayer::Speedrun:
return overrideValue;
default:
abort();
}
}
[[nodiscard]] constexpr const T& getDefaultValue() const noexcept {
checkRegistered();
return defaultValue;
}
/**
* \brief Change the value of a CVar.
*
@@ -228,8 +254,54 @@ public:
overrideValue = std::move(newValue);
layer = ConfigVarLayer::Override;
}
/**
* \brief Give a CVar a speedrun-mode override value.
*
* Lower priority than a launch-arg override. Cleared when speedrun mode is disabled.
* The overridden value will not get saved to config.
*
* @param newValue The new value the CVar will get.
*/
void setSpeedrunValue(T newValue) {
checkRegistered();
if (layer != ConfigVarLayer::Override) {
priorLayer = layer;
overrideValue = std::move(newValue);
layer = ConfigVarLayer::Speedrun;
}
}
void clearOverride() {
checkRegistered();
if (layer == ConfigVarLayer::Override) {
overrideValue = {};
layer = ConfigVarLayer::Value;
}
}
void clearSpeedrunOverride() override {
checkRegistered();
if (layer == ConfigVarLayer::Speedrun) {
overrideValue = {};
layer = priorLayer;
}
}
/**
* \brief Get the user-persisted value, ignoring any temporary overrides.
*
* Used by Save() to write the correct value even when a speedrun override is active.
*/
[[nodiscard]] constexpr const T& getValueForSave() const noexcept {
checkRegistered();
const ConfigVarLayer effectiveLayer = (layer == ConfigVarLayer::Speedrun) ? priorLayer : layer;
return effectiveLayer == ConfigVarLayer::Default ? defaultValue : value;
}
};
using ActionBindConfigVar = ConfigVar<int>;
}
#endif // DUSK_CONFIG_VAR_HPP
+17
View File
@@ -0,0 +1,17 @@
#pragma once
namespace dusk::crash_reporting {
enum class Consent {
Unavailable,
Unknown,
Given,
Revoked,
};
void initialize();
void shutdown();
Consent get_consent();
void set_consent(bool enabled);
} // namespace dusk::crash_reporting
+14
View File
@@ -0,0 +1,14 @@
#pragma once
#ifdef DUSK_DISCORD
namespace dusk::discord {
void initialize();
void run_callbacks();
void update_presence();
void shutdown();
} // namespace dusk::discord
#endif // DUSK_DISCORD
-1
View File
@@ -6,7 +6,6 @@
#include "aurora/gfx.h"
extern AuroraInfo auroraInfo;
extern const char* configPath;
namespace dusk {
extern AuroraStats lastFrameAuroraStats;
+12 -3
View File
@@ -1,22 +1,31 @@
#pragma once
#include "dolphin/types.h"
#include "version.hpp"
namespace dusk {
struct OffsetVersion {
version::GameVersion mGameVersion;
u32 mOffset;
constexpr OffsetVersion(const version::GameVersion gameVersion, const u32 offset)
: mGameVersion(gameVersion), mOffset(offset) {}
};
/**
* Load bytes from the main DOL by GameCube virtual address
*/
bool LoadDolAsset(void* dst, u32 virtualAddress, s32 size);
bool LoadDolAsset(void* dst, std::initializer_list<OffsetVersion> virtualAddress, s32 size);
/**
* Load bytes from a REL file in the ISO filesystem, dst must be 32-byte aligned
*/
bool LoadRelAsset(void* dst, const char* dvdPath, s32 offset, s32 size);
bool LoadRelAsset(void* dst, const char* dvdPath, std::initializer_list<OffsetVersion> offset, s32 size);
/**
* Load bytes from a REL inside RELS.arc
*/
bool LoadArchivedRelAsset(void* dst, u32 memType, const char* relFileName, s32 offset, s32 size);
bool LoadArchivedRelAsset(void* dst, u32 memType, const char* relFileName, std::initializer_list<OffsetVersion> offset, s32 size);
} // namespace dusk
+27 -17
View File
@@ -1,13 +1,12 @@
#ifndef DUSK_FRAME_INTERP_H
#define DUSK_FRAME_INTERP_H
#pragma once
#include <dolphin/mtx.h>
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
struct cXyz;
class camera_process_class;
class view_class;
#ifdef __cplusplus
namespace dusk {
@@ -15,29 +14,40 @@ namespace frame_interp {
void ensure_initialized();
void begin_record_camera();
void begin_record();
void end_record();
void interpolate(float step);
void begin_sim_tick();
uint64_t sim_tick_seq();
void begin_frame(bool enabled, bool is_sim_frame, float step);
void interpolate();
float get_interpolation_step();
void notify_sim_tick_complete();
uint32_t begin_presentation_ui_pass();
uint32_t get_presentation_ui_advance_ticks();
void end_presentation_ui_pass();
void open_child(const void* key, int32_t id);
void close_child();
void request_presentation_sync();
bool presentation_sync_active();
bool is_enabled();
// TODO: These should be phased out as UI is progressively updated to use game_clock
void set_ui_tick_pending(bool value);
bool get_ui_tick_pending();
bool is_sim_frame();
void record_camera(::camera_process_class* cam, int camera_id);
void record_final_mtx_raw(const Mtx* dest, const Mtx src);
void interp_view(::view_class* view);
void record_final_mtx(Mtx m, const void *key);
void record_final_mtx(Mtx m);
bool lookup_replacement(const void* source, Mtx out);
bool lookup_replacement(const void* key, Mtx out);
bool lookup_concat_replacement(const void* lhs, const void* rhs, Mtx out);
void camera_eye_from_view_mtx(MtxP view_mtx, cXyz* o_eye);
bool build_star_view(Mtx o_view, Mtx o_cam_billboard_base, cXyz* o_anchor_eye, float* o_fovy);
typedef void (*InterpolationCallBack)(bool isSimFrame, void* pUserWork);
// call on a sim tick, will get called during presentation
void add_interpolation_callback(InterpolationCallBack pCallBack, void* pUserWork);
void begin_presentation_camera();
void end_presentation_camera();
} // namespace frame_interp
} // namespace dusk
#endif
#endif
+26
View File
@@ -0,0 +1,26 @@
#pragma once
namespace dusk::game_clock {
void ensure_initialized();
void reset_frame_timer();
constexpr float sim_pace() { return 1.0f / 30.0f; }
constexpr float period_for_original_frames(float frame_count) { return frame_count * sim_pace(); }
constexpr float ui_maximum_dt() { return 0.05f; }
constexpr float ui_initial_dt() { return 1.0f / 60.0f; }
struct MainLoopPacer {
float presentation_dt_seconds;
bool is_interpolating;
int sim_ticks_to_run;
float sim_pace;
};
MainLoopPacer advance_main_loop();
void commit_sim_tick();
float sample_interpolation_step();
float consume_interval(const void* consumer);
} // namespace dusk::game_clock
+8
View File
@@ -0,0 +1,8 @@
#pragma once
#ifndef GAMEPAD_COLOR_H
#define GAMEPAD_COLOR_H
void handleGamepadColor();
#endif
+18
View File
@@ -0,0 +1,18 @@
#ifndef DUSK_GYRO_H
#define DUSK_GYRO_H
namespace dusk::gyro {
void read(float dt);
void getAimDeltas(float& out_yaw, float& out_pitch);
bool queryGyroAimContext();
void rollgoalTick(bool play_active, s16 camera_yaw);
void rollgoalTableOffset(s16& out_ax, s16& out_az);
extern bool s_sensor_keep_alive;
bool get_sensor_keep_alive();
void set_sensor_keep_alive(bool value);
bool rollgoal_gyro_enabled();
} // namespace dusk::gyro
#endif
-10
View File
@@ -1,10 +0,0 @@
#ifndef DUSK_GYRO_AIM_H
#define DUSK_GYRO_AIM_H
namespace dusk::gyro_aim {
void read(float dt, bool context_active);
void consumeAimDeltas(float& out_yaw_rad, float& out_pitch_rad);
bool queryGyroAimItemContext();
} // namespace dusk::gyro_aim
#endif
+7 -5
View File
@@ -9,14 +9,16 @@ constexpr const char* DO_RESET = "Cmd+R";
constexpr const char* DO_RESET = "Ctrl+R";
#endif
constexpr const char* TOGGLE_FULLSCREEN = "F11";
constexpr const char* SHOW_PROCESS_MANAGEMENT = "F2";
constexpr const char* SHOW_DEBUG_OVERLAY = "F3";
constexpr const char* SHOW_HEAP_VIEWER = "F4";
constexpr const char* SHOW_STUB_LOG = "F5";
constexpr const char* SHOW_CAMERA_DEBUG = "F6";
constexpr const char* SHOW_AUDIO_DEBUG = "F7";
constexpr const char* SHOW_PLAYER_INFO = "F5";
constexpr const char* SHOW_SAVE_EDITOR = "F6";
constexpr const char* SHOW_STATE_SHARE = "F8";
constexpr const char* SHOW_DEBUG_CAMERA = "F9";
constexpr const char* SHOW_AUDIO_DEBUG = "F10";
constexpr const char* TOGGLE_FULLSCREEN = "F11";
constexpr const char* TURBO = "Tab";
+35 -5
View File
@@ -1,6 +1,7 @@
#ifndef DUSK_IO_HPP
#define DUSK_IO_HPP
#include <filesystem>
#include <vector>
// I can't believe it's 2026 and neither SDL (no error codes) nor
@@ -15,7 +16,7 @@ namespace dusk::io {
* Methods on this class throw appropriate C++ exceptions when an error occurs.
*/
class FileStream {
void* file;
FILE* file;
public:
FileStream() noexcept;
@@ -23,7 +24,7 @@ public:
/**
* \brief Take ownership of a FILE* handle.
*/
explicit FileStream(void* file);
explicit FileStream(FILE* file);
FileStream(const FileStream& other) = delete;
FileStream(FileStream&& other) noexcept;
@@ -34,6 +35,11 @@ public:
*/
static FileStream OpenRead(const char* utf8Path);
/**
* \brief Open a file for reading at the given path.
*/
static FileStream OpenRead(const std::filesystem::path& path);
/**
* \brief Create a file for writing.
*
@@ -41,16 +47,33 @@ public:
*/
static FileStream Create(const char* utf8Path);
/**
* \brief Create a file for writing.
*
* If there is an existing file, its contents are demolished.
*/
static FileStream Create(const std::filesystem::path& path);
/**
* \brief Read the byte contents of a file directly into a vector.
*/
static std::vector<u8> ReadAllBytes(const char* utf8Path);
/**
* \brief Read the byte contents of a file directly into a vector.
*/
static std::vector<u8> ReadAllBytes(const std::filesystem::path& path);
/**
* \brief Read the byte contents of a file directly into a vector.
*/
static void WriteAllText(const char* utf8Path, std::string_view text);
/**
* \brief Read the byte contents of a file directly into a vector.
*/
static void WriteAllText(const std::filesystem::path& path, std::string_view text);
/**
* \brief Read the remaining contents of the file directly into a vector.
*/
@@ -59,17 +82,24 @@ public:
/**
* Get direct access to the underlying FILE* handle.
*/
[[nodiscard]] void* GetFileHandle() const noexcept {
return file;
}
[[nodiscard]] void* GetFileHandle() const noexcept { return file; }
/**
* Write data to the file.
*/
void Write(const char* data, size_t dataLen);
FILE* ToInner();
};
/**
* Converts a std::filesystem::path to a std::string, UTF-8, without exploding on Windows.
*/
inline std::string fs_path_to_string(const std::filesystem::path& path) {
const auto u8str = path.u8string();
return {reinterpret_cast<const char*>(u8str.c_str())};
}
} // namespace dusk::io
#endif // DUSK_IO_HPP
+16
View File
@@ -0,0 +1,16 @@
#pragma once
#include <cstdint>
namespace dusk::speedrun {
void onGameFrame();
uint64_t getFrameCount();
void start();
void reset();
void connectLiveSplit(const char* host = "127.0.0.1", int port = 16834);
void disconnectLiveSplit();
bool consumeConnectedEvent();
bool consumeDisconnectedEvent();
void updateLiveSplit();
void shutdown();
}
+5
View File
@@ -4,9 +4,14 @@
#include <aurora/aurora.h>
#include <aurora/lib/logging.hpp>
#include <filesystem>
void aurora_log_callback(AuroraLogLevel level, const char* module, const char* message, unsigned int len);
namespace dusk {
void InitializeFileLogging(const std::filesystem::path& configDir, AuroraLogLevel logLevel);
void ShutdownFileLogging();
const char* GetLogFilePath();
void SendToStubLog(AuroraLogLevel level, const char* module, const char* message);
}
+20 -4
View File
@@ -1,10 +1,26 @@
#ifndef DUSK_MAIN_H
#define DUSK_MAIN_H
#include <filesystem>
namespace dusk {
extern bool IsRunning;
extern bool IsShuttingDown;
extern bool IsGameLaunched;
}
extern bool IsRunning;
extern bool IsShuttingDown;
extern bool IsGameLaunched;
extern bool RestartRequested;
extern std::filesystem::path ConfigPath;
extern std::filesystem::path CachePath;
#if defined(__ANDROID__) || (defined(TARGET_OS_IOS) && TARGET_OS_IOS) || \
(defined(TARGET_OS_TV) && TARGET_OS_TV)
inline constexpr bool SupportsProcessRestart = false;
#else
inline constexpr bool SupportsProcessRestart = true;
#endif
void RequestRestart() noexcept;
} // namespace dusk
#endif // DUSK_MAIN_H
+2
View File
@@ -1,5 +1,7 @@
#pragma once
#include <array>
struct RoomEntry {
u8 roomNo;
std::vector<s16> roomPoints = {};
+1 -137
View File
@@ -2,9 +2,6 @@
#define _SRC_DUSK_MATH_H_
#include <cmath>
#include <array>
#include <limits>
#include <bit>
#ifndef M_PI
#define M_PI 3.14159265358979323846f
@@ -19,139 +16,6 @@ inline float i_cosf(float x) { return cos(x); }
inline float i_tanf(float x) { return tan(x); }
inline float i_acosf(float x) { return acos(x); }
// frsqrte matching courtesy of Geotale, with reference to https://achurch.org/cpu-tests/ppc750cl.s
struct BaseAndDec32 {
uint32_t base;
int32_t dec;
};
struct BaseAndDec64 {
uint64_t base;
int64_t dec;
};
union c32 {
constexpr c32(const float p) {
f = p;
}
constexpr c32(const uint32_t p) {
u = p;
}
uint32_t u;
float f;
};
union c64 {
constexpr c64(const double p) {
f = p;
}
constexpr c64(const uint64_t p) {
u = p;
}
uint64_t u;
double f;
};
static constexpr uint64_t EXPONENT_SHIFT_F64 = 52;
static constexpr uint64_t MANTISSA_MASK_F64 = 0x000fffffffffffffULL;
static constexpr uint64_t EXPONENT_MASK_F64 = 0x7ff0000000000000ULL;
static constexpr uint64_t SIGN_MASK_F64 = 0x8000000000000000ULL;
static constexpr std::array<BaseAndDec64, 32> RSQRTE_TABLE = {{
{0x69fa000000000ULL, -0x15a0000000LL},
{0x5f2e000000000ULL, -0x13cc000000LL},
{0x554a000000000ULL, -0x1234000000LL},
{0x4c30000000000ULL, -0x10d4000000LL},
{0x43c8000000000ULL, -0x0f9c000000LL},
{0x3bfc000000000ULL, -0x0e88000000LL},
{0x34b8000000000ULL, -0x0d94000000LL},
{0x2df0000000000ULL, -0x0cb8000000LL},
{0x2794000000000ULL, -0x0bf0000000LL},
{0x219c000000000ULL, -0x0b40000000LL},
{0x1bfc000000000ULL, -0x0aa0000000LL},
{0x16ae000000000ULL, -0x0a0c000000LL},
{0x11a8000000000ULL, -0x0984000000LL},
{0x0ce6000000000ULL, -0x090c000000LL},
{0x0862000000000ULL, -0x0898000000LL},
{0x0416000000000ULL, -0x082c000000LL},
{0xffe8000000000ULL, -0x1e90000000LL},
{0xf0a4000000000ULL, -0x1c00000000LL},
{0xe2a8000000000ULL, -0x19c0000000LL},
{0xd5c8000000000ULL, -0x17c8000000LL},
{0xc9e4000000000ULL, -0x1610000000LL},
{0xbedc000000000ULL, -0x1490000000LL},
{0xb498000000000ULL, -0x1330000000LL},
{0xab00000000000ULL, -0x11f8000000LL},
{0xa204000000000ULL, -0x10e8000000LL},
{0x9994000000000ULL, -0x0fe8000000LL},
{0x91a0000000000ULL, -0x0f08000000LL},
{0x8a1c000000000ULL, -0x0e38000000LL},
{0x8304000000000ULL, -0x0d78000000LL},
{0x7c48000000000ULL, -0x0cc8000000LL},
{0x75e4000000000ULL, -0x0c28000000LL},
{0x6fd0000000000ULL, -0x0b98000000LL},
}};
[[nodiscard]] static inline double frsqrte(const double val) {
c64 bits(val);
uint64_t mantissa = bits.u & MANTISSA_MASK_F64;
int64_t exponent = bits.u & EXPONENT_MASK_F64;
bool sign = (bits.u & SIGN_MASK_F64) != 0;
// Handle 0 case
if (mantissa == 0 && exponent == 0) {
return std::copysign(std::numeric_limits<double>::infinity(), bits.f);
}
// Handle NaN-like
if (exponent == EXPONENT_MASK_F64) {
if (mantissa == 0) {
return sign ? std::numeric_limits<double>::quiet_NaN() : 0.0;
}
return val;
}
// Handle negative inputs
if (sign) {
return std::numeric_limits<double>::quiet_NaN();
}
if (exponent == 0) {
// Shift so one bit goes to where the exponent would be,
// then clear that bit to mimic a not-subnormal number!
// Aka, if there are 12 leading zeroes, shift left once
uint32_t shift = std::countl_zero(mantissa) - static_cast<uint32_t>(63 - EXPONENT_SHIFT_F64);
mantissa <<= shift;
mantissa &= MANTISSA_MASK_F64;
// The shift is subtracted by 1 because denormals by default
// are offset by 1 (exponent 0 doesn't have implied 1 bit)
exponent -= static_cast<int64_t>(shift - 1) << EXPONENT_SHIFT_F64;
}
// In reality this doesn't get the full exponent -- Only the least significant bit
// Only that's needed because square roots of higher exponent bits simply multiply the
// result by 2!!
uint32_t key = static_cast<uint32_t>((static_cast<uint64_t>(exponent) | mantissa) >> 37);
uint64_t new_exp =
(static_cast<uint64_t>((0xbfcLL << EXPONENT_SHIFT_F64) - exponent) >> 1) & EXPONENT_MASK_F64;
// Remove the bits relating to anything higher than the LSB of the exponent
const auto &entry = RSQRTE_TABLE[0x1f & (key >> 11)];
// The result is given by an estimate then an adjustment based on the original
// key that was computed
uint64_t new_mantissa = static_cast<uint64_t>(entry.base + entry.dec * static_cast<int64_t>(key & 0x7ff));
return c64(new_exp | new_mantissa).f;
}
#include <dolphin/ppc_math.h>
#endif // _SRC_DUSK_MATH_H_
+20
View File
@@ -0,0 +1,20 @@
#ifndef DUSK_SCOPE_GUARD_HPP
#define DUSK_SCOPE_GUARD_HPP
#include <functional>
class SimpleScopeGuard {
public:
// Store the function in the constructor
explicit SimpleScopeGuard(const std::function<void()>& func) : m_func(func) {}
// Run the function when the object goes out of scope
~SimpleScopeGuard() {
if (m_func) m_func();
}
private:
std::function<void()> m_func;
};
#endif //DUSK_SCOPE_GUARD_HPP
+134 -8
View File
@@ -1,12 +1,65 @@
#ifndef DUSK_CONFIG_H
#define DUSK_CONFIG_H
#include <array>
#include "dusk/config_var.hpp"
namespace dusk {
using namespace config;
enum class BloomMode : int {
Off = 0,
Classic = 1,
Dusk = 2,
};
enum class GameLanguage : u8 {
English = OS_LANGUAGE_ENGLISH,
German = OS_LANGUAGE_GERMAN,
French = OS_LANGUAGE_FRENCH,
Spanish = OS_LANGUAGE_SPANISH,
Italian = OS_LANGUAGE_ITALIAN,
};
enum class DiscVerificationState : u8 {
Unknown = 0,
Success,
HashMismatch,
};
enum class GyroMode : u8 {
Sensor = 0,
Mouse = 1,
};
namespace config {
template <>
struct ConfigEnumRange<BloomMode> {
static constexpr auto min = BloomMode::Off;
static constexpr auto max = BloomMode::Dusk;
};
template <>
struct ConfigEnumRange<GameLanguage> {
static constexpr auto min = GameLanguage::English;
static constexpr auto max = GameLanguage::Italian;
};
template <>
struct ConfigEnumRange<DiscVerificationState> {
static constexpr auto min = DiscVerificationState::Unknown;
static constexpr auto max = DiscVerificationState::HashMismatch;
};
template <>
struct ConfigEnumRange<GyroMode> {
static constexpr auto min = GyroMode::Sensor;
static constexpr auto max = GyroMode::Mouse;
};
}
// Persistent user settings
struct UserSettings {
@@ -17,6 +70,12 @@ struct UserSettings {
ConfigVar<bool> enableFullscreen;
ConfigVar<bool> enableVsync;
ConfigVar<bool> lockAspectRatio;
ConfigVar<bool> enableFpsOverlay;
ConfigVar<int> fpsOverlayCorner;
ConfigVar<int> windowPositionX;
ConfigVar<int> windowPositionY;
ConfigVar<int> windowWidth;
ConfigVar<int> windowHeight;
} video;
struct {
@@ -27,15 +86,18 @@ struct UserSettings {
ConfigVar<int> soundEffectsVolume;
ConfigVar<int> fanfareVolume;
ConfigVar<bool> enableReverb;
ConfigVar<bool> enableHrtf;
ConfigVar<bool> menuSounds;
} audio;
// Game settings
struct {
ConfigVar<GameLanguage> language;
// QoL
ConfigVar<bool> enableQuickTransform;
ConfigVar<bool> hideTvSettingsScreen;
ConfigVar<bool> skipWarningScreen;
ConfigVar<bool> biggerWallets;
ConfigVar<bool> noReturnRupees;
ConfigVar<bool> disableRupeeCutscenes;
@@ -46,49 +108,112 @@ struct UserSettings {
ConfigVar<bool> fastClimbing;
ConfigVar<bool> noMissClimbing;
ConfigVar<bool> fastTears;
ConfigVar<bool> no2ndFishForCat;
ConfigVar<bool> instantSaves;
ConfigVar<bool> instantText;
ConfigVar<bool> sunsSong;
ConfigVar<bool> autoSave;
// Preferences
ConfigVar<bool> enableMirrorMode;
ConfigVar<bool> invertCameraXAxis;
ConfigVar<bool> minimalHUD;
ConfigVar<bool> pauseOnFocusLost;
ConfigVar<bool> enableLinkDollRotation;
ConfigVar<bool> enableAchievementToasts;
ConfigVar<bool> enableControllerToasts;
ConfigVar<bool> enableDiscordPresence;
// Graphics
ConfigVar<bool> enableBloom;
ConfigVar<bool> enableWaterRefraction;
ConfigVar<BloomMode> bloomMode;
ConfigVar<float> bloomMultiplier;
ConfigVar<bool> disableWaterRefraction;
ConfigVar<bool> enableTextureReplacements;
ConfigVar<bool> enableFrameInterpolation;
ConfigVar<int> internalResolutionScale;
ConfigVar<int> shadowResolutionMultiplier;
ConfigVar<bool> enableDepthOfField;
ConfigVar<bool> enableMapBackground;
ConfigVar<bool> disableCutscenePillarboxing;
// Audio
ConfigVar<bool> noLowHpSound;
ConfigVar<bool> midnasLamentNonStop;
// Input
ConfigVar<GyroMode> gyroMode;
ConfigVar<bool> enableGyroAim;
ConfigVar<float> gyroAimSensitivityX;
ConfigVar<float> gyroAimSensitivityY;
ConfigVar<bool> gyroAimInvertPitch;
ConfigVar<bool> gyroAimInvertYaw;
ConfigVar<bool> enableGyroRollgoal;
ConfigVar<float> gyroSensitivityX;
ConfigVar<float> gyroSensitivityY;
ConfigVar<float> gyroSensitivityRollgoal;
ConfigVar<float> gyroSmoothing;
ConfigVar<float> gyroDeadband;
ConfigVar<bool> gyroInvertPitch;
ConfigVar<bool> gyroInvertYaw;
ConfigVar<bool> freeCamera;
ConfigVar<bool> invertCameraXAxis;
ConfigVar<bool> invertCameraYAxis;
ConfigVar<bool> invertFirstPersonXAxis;
ConfigVar<bool> invertFirstPersonYAxis;
ConfigVar<float> freeCameraSensitivity;
ConfigVar<bool> debugFlyCam;
ConfigVar<bool> debugFlyCamLockEvents;
ConfigVar<bool> allowBackgroundInput;
// Cheats
ConfigVar<bool> infiniteHearts;
ConfigVar<bool> infiniteArrows;
ConfigVar<bool> infiniteSeeds;
ConfigVar<bool> infiniteBombs;
ConfigVar<bool> infiniteOil;
ConfigVar<bool> infiniteOxygen;
ConfigVar<bool> infiniteRupees;
ConfigVar<bool> enableIndefiniteItemDrops;
ConfigVar<bool> moonJump;
ConfigVar<bool> superClawshot;
ConfigVar<bool> alwaysGreatspin;
ConfigVar<bool> enableFastIronBoots;
ConfigVar<bool> canTransformAnywhere;
ConfigVar<bool> fastRoll;
ConfigVar<bool> fastSpinner;
ConfigVar<bool> freeMagicArmor;
ConfigVar<bool> invincibleEnemies;
// Technical
ConfigVar<bool> restoreWiiGlitches;
// Controls
ConfigVar<bool> enableTurboKeybind;
ConfigVar<bool> enableResetKeybind;
// Tools
ConfigVar<bool> speedrunMode;
ConfigVar<bool> liveSplitEnabled;
ConfigVar<bool> showSpeedrunRTATimer;
ConfigVar<bool> recordingMode;
ConfigVar<bool> showInputViewer;
ConfigVar<bool> showInputViewerGyro;
} game;
struct {
ConfigVar<std::string> isoPath;
ConfigVar<DiscVerificationState> isoVerification;
ConfigVar<std::string> graphicsBackend;
ConfigVar<bool> skipPreLaunchUI;
ConfigVar<bool> showPipelineCompilation;
ConfigVar<bool> wasPresetChosen;
ConfigVar<bool> checkForUpdates;
ConfigVar<int> cardFileType;
ConfigVar<bool> enableAdvancedSettings;
} backend;
// Arrays of size 4 for 4 ports
struct {
std::array<ActionBindConfigVar, 4> firstPersonCamera;
std::array<ActionBindConfigVar, 4> callMidna;
std::array<ActionBindConfigVar, 4> openDusklightMenu;
std::array<ActionBindConfigVar, 4> turboSpeedButton;
} actionBindings;
};
UserSettings& getSettings();
@@ -112,6 +237,7 @@ struct TransientSettings {
CollisionViewSettings collisionView;
bool skipFrameRateLimit;
bool moveLinkActive;
bool stateShareLoadActive;
};
TransientSettings& getTransientSettings();
+41
View File
@@ -0,0 +1,41 @@
#pragma once
#include <aurora/aurora.h>
namespace dusk {
struct SpeedrunInfo {
void startRun() {
m_isRunStarted = true;
m_startTimestamp = OSGetTime();
}
void stopRun() {
m_isRunStarted = false;
m_endTimestamp = OSGetTime() - m_startTimestamp;
}
void reset() {
m_isRunStarted = false;
m_startTimestamp = 0;
m_endTimestamp = 0;
m_isPauseIGT = false;
m_loadStartTimestamp = 0;
m_totalLoadTime = 0;
m_igtTimer = 0;
}
bool m_isRunStarted = false;
OSTime m_startTimestamp = 0;
OSTime m_endTimestamp = 0;
bool m_isPauseIGT = false;
OSTime m_loadStartTimestamp = 0;
OSTime m_totalLoadTime = 0;
OSTime m_igtTimer = 0;
};
extern SpeedrunInfo m_speedrunInfo;
void resetForSpeedrunMode();
} // namespace dusk
+25 -25
View File
@@ -1,9 +1,10 @@
#ifndef DUSK_TIME_H
#define DUSK_TIME_H
#include <chrono>
#include <numeric>
#include <array>
#include <numeric>
#include "SDL3/SDL_timer.h"
#ifdef _WIN32
#ifndef WIN32_LEAN_AND_MEAN
@@ -15,28 +16,26 @@
#include <Windows.h>
#include <shellapi.h>
#include <intrin.h>
#else
#include "SDL3/SDL_timer.h"
#endif
class Limiter {
using delta_clock = std::chrono::high_resolution_clock;
using duration_t = std::chrono::nanoseconds;
public:
void Reset() { m_oldTime = delta_clock::now(); }
using duration_t = Uint64;
void Reset() { m_oldTime = SDL_GetTicksNS(); }
void Sleep(duration_t targetFrameTime) {
if (targetFrameTime.count() == 0) {
if (targetFrameTime == 0) {
return;
}
auto start = delta_clock::now();
const Uint64 start = SDL_GetTicksNS();
duration_t adjustedSleepTime = SleepTime(targetFrameTime);
if (adjustedSleepTime.count() > 0) {
if (adjustedSleepTime > 0) {
NanoSleep(adjustedSleepTime);
duration_t overslept = TimeSince(start) - adjustedSleepTime;
if (overslept < duration_t{targetFrameTime}) {
const duration_t elapsed = TimeSince(start);
const duration_t overslept = elapsed > adjustedSleepTime ? elapsed - adjustedSleepTime : 0;
if (overslept < targetFrameTime) {
m_overheadTimes[m_overheadTimeIdx] = overslept;
m_overheadTimeIdx = (m_overheadTimeIdx + 1) % m_overheadTimes.size();
}
@@ -45,23 +44,23 @@ public:
}
duration_t SleepTime(duration_t targetFrameTime) {
const auto sleepTime = duration_t{targetFrameTime} - TimeSince(m_oldTime);
m_overhead = std::accumulate(m_overheadTimes.begin(), m_overheadTimes.end(), duration_t{}) / m_overheadTimes.size();
const duration_t elapsed = TimeSince(m_oldTime);
const duration_t sleepTime = elapsed < targetFrameTime ? targetFrameTime - elapsed : 0;
m_overhead = std::accumulate(m_overheadTimes.begin(), m_overheadTimes.end(), duration_t{0}) /
m_overheadTimes.size();
if (sleepTime > m_overhead) {
return sleepTime - m_overhead;
}
return duration_t{0};
return 0;
}
private:
delta_clock::time_point m_oldTime;
Uint64 m_oldTime = 0;
std::array<duration_t, 4> m_overheadTimes{};
size_t m_overheadTimeIdx = 0;
duration_t m_overhead = duration_t{0};
duration_t m_overhead = 0;
duration_t TimeSince(delta_clock::time_point start) {
return std::chrono::duration_cast<duration_t>(delta_clock::now() - start);
}
duration_t TimeSince(Uint64 start) const { return SDL_GetTicksNS() - start; }
#if _WIN32
void NanoSleep(const duration_t duration) {
@@ -85,9 +84,10 @@ private:
LARGE_INTEGER start, current;
QueryPerformanceCounter(&start);
LONGLONG ticksToWait = static_cast<LONGLONG>(duration.count() * countPerNs);
if (DWORD ms = std::chrono::duration_cast<std::chrono::milliseconds>(duration).count(); ms > 1) {
::Sleep(ms - 1);
const LONGLONG ticksToWait = static_cast<LONGLONG>(duration * countPerNs);
const Uint64 ms = duration / 1'000'000ULL;
if (ms > 1) {
::Sleep(static_cast<DWORD>(ms - 1));
}
do {
QueryPerformanceCounter(&current);
@@ -99,7 +99,7 @@ private:
} while (current.QuadPart - start.QuadPart < ticksToWait);
}
#else
void NanoSleep(const duration_t duration) { SDL_DelayPrecise(duration.count()); }
void NanoSleep(const duration_t duration) { SDL_DelayPrecise(duration); }
#endif
};
+67
View File
@@ -0,0 +1,67 @@
#ifndef DUSK_VERSION_HPP
#define DUSK_VERSION_HPP
/**
* Functionality for switching game behavior based on the loaded game version (e.g. PAL/JPN, GC/Wii)
*/
namespace dusk::version {
enum class GameVersion : u8 {
GcnUsa = VERSION_GCN_USA,
GcnPal = VERSION_GCN_PAL,
GcnJpn = VERSION_GCN_JPN,
WiiUsaRev0 = VERSION_WII_USA_R0,
WiiUsa = VERSION_WII_USA_R2,
WiiPal = VERSION_WII_PAL,
WiiJpn = VERSION_WII_JPN,
WiiKor = VERSION_WII_KOR,
};
bool isGcn();
bool isWii();
bool isPalOrAtLeastWiiR2();
bool isRegionPal();
bool isRegionJpn();
bool isRegionUsa();
GameVersion getGameVersion();
const DVDDiskID& getDiskID();
void init();
template<typename T>
struct VersionOption {
GameVersion mVersion;
T mValue;
constexpr VersionOption(GameVersion version, T value) : mVersion(version), mValue(value) {}
};
template<typename T>
const T& versionSelect(const std::initializer_list<VersionOption<T>> options) {
const auto version = getGameVersion();
for (const auto& opt : options) {
if (opt.mVersion == version) {
return opt.mValue;
}
}
// Unable to find value.
abort();
}
template<typename T>
const T& versionSelect(const std::initializer_list<VersionOption<T>> options, const T& defaultValue) {
const auto version = getGameVersion();
for (const auto& opt : options) {
if (opt.mVersion == version) {
return opt.mValue;
}
}
return defaultValue;
}
} // namespace dusk::version
#endif // DUSK_VERSION_HPP
+1 -1
View File
@@ -108,7 +108,7 @@ struct fopAcM_search_prm {
struct fOpAcm_HIO_entry_c : public mDoHIO_entry_c {
virtual ~fOpAcm_HIO_entry_c() {}
#if DEBUG
#if DEBUG && !TARGET_PC
void removeHIO(const fopAc_ac_c* i_this) { removeHIO(*i_this); }
void removeHIO(const fopAc_ac_c& i_this) { removeHIO(i_this.base); }
void removeHIO(const fopEn_enemy_c& i_this) { removeHIO(i_this.base); }
+1 -1
View File
@@ -25,7 +25,7 @@ typedef struct leafdraw_class : base_process_class {
#endif
/* 0xB8 */ leafdraw_method_class* leaf_methods;
/* 0xBC */ s8 unk_0xBC;
/* 0xBD */ u8 unk_0xBD;
/* 0xBD */ u8 draw_interp_frame;
/* 0xBE */ draw_priority_class draw_priority;
} leafdraw_class;
+1
View File
@@ -18,6 +18,7 @@ typedef struct process_node_class {
/* 0x0BC */ layer_class layer;
/* 0x0E8 */ node_list_class layer_nodelist[16];
/* 0x1A8 */ s8 unk_0x1A8;
/* 0x1A9 */ s8 draw_interp_frame;
} process_node_class;
typedef struct node_process_profile_definition {
+17 -1
View File
@@ -73,6 +73,9 @@
#endif
#ifndef __MWERKS__
#ifdef __cplusplus
extern "C" {
#endif
// Silence clangd errors about MWCC PPC intrinsics by declaring them here.
extern int __cntlzw(unsigned int);
extern int __rlwimi(int, int, int, int, int);
@@ -80,7 +83,14 @@ extern void __dcbf(void*, int);
extern void __dcbz(void*, int);
extern void __sync();
extern int __abs(int);
void* __memcpy(void*, const void*, int);
#if defined(__has_builtin) && __has_builtin(__builtin_memcpy)
#define __memcpy __builtin_memcpy
#else
#define __memcpy memcpy
#endif
#ifdef __cplusplus
}
#endif
#endif
#ifndef M_PI
@@ -220,10 +230,16 @@ using std::isnan;
// Some basic macros that are more convenient than putting down #if blocks for one-line changes.
#if TARGET_PC
#define IF_DUSK(statement) statement
#define IF_DUSK_BLOCK(cond) if (cond) {
#define IF_DUSK_BLOCK_END }
#define IF_DUSK_ARG(expr) , expr
#define IF_NOT_DUSK(statement)
#define DUSK_IF_ELSE(dusk, orig) dusk
#else
#define IF_DUSK(statement)
#define IF_DUSK_ARG(expr)
#define IF_DUSK_BLOCK(cond)
#define IF_DUSK_BLOCK_END
#define IF_NOT_DUSK(statement) statement
#define DUSK_IF_ELSE(dusk, orig) orig
#endif
+13
View File
@@ -5,6 +5,7 @@
#include "Z2AudioLib/Z2EnvSeMgr.h"
#include "Z2AudioLib/Z2LinkMgr.h"
#include "dusk/audio.h"
#include "dusk/settings.h"
class mDoAud_zelAudio_c : public Z2AudioMgr {
public:
@@ -132,6 +133,18 @@ inline void mDoAud_seStart(u32 i_sfxID, const Vec* i_sePos, u32 param_2, s8 i_re
-1.0f, -1.0f, 0);
}
#if TARGET_PC
inline void mDoAud_seStartMenu(u32 i_sfxID) {
if (!mDoAud_zelAudio_c::isInitFlag()) {
return;
}
if (!dusk::getSettings().audio.menuSounds.getValue()) {
return;
}
mDoAud_seStart(i_sfxID, nullptr, 0, 0);
}
#endif
inline void mDoAud_seStartLevel(u32 i_sfxID, const Vec* i_sePos, u32 param_2, s8 i_reverb) {
DUSK_AUDIO_SKIP()
Z2AudioMgr::getInterface()->seStartLevel(i_sfxID, i_sePos, param_2, i_reverb, 1.0f, 1.0f,
+19 -8
View File
@@ -125,8 +125,15 @@ public:
#if TARGET_PC
static f32 hudAspectScaleDown;
static f32 hudAspectScaleUp;
static f32 ScaleHUDXLeft(f32 baseX) { return getMinXF() + baseX; }
static f32 ScaleHUDXRight(f32 baseX) { return -getMinXF() + baseX; }
static void updateSafeAreaBounds();
static f32 getSafeMinXF() { return m_safeMinXF; }
static f32 getSafeMinYF() { return m_safeMinYF; }
static f32 getSafeWidthF() { return m_safeWidthF; }
static f32 getSafeHeightF() { return m_safeHeightF; }
static f32 getSafeMaxXF() { return m_safeMaxXF; }
static f32 getSafeMaxYF() { return m_safeMaxYF; }
static f32 ScaleHUDXLeft(f32 baseX) { return getSafeMinXF() + baseX; }
static f32 ScaleHUDXRight(f32 baseX) { return getSafeMaxXF() - FB_WIDTH_BASE + baseX; }
#endif
static void setBlureMtx(const Mtx m) {
@@ -279,12 +286,7 @@ public:
#if WIDESCREEN_SUPPORT
static void setTvSize();
#if TARGET_PC
static void onWide(f32 width, f32 height);
#else
static void onWide();
#endif
static void offWide();
static u8 isWide();
@@ -297,7 +299,7 @@ public:
#endif
#if TARGET_PC
static void setWindowSize(AuroraWindowSize const& size);
static void updateRenderSize();
#endif
static TGXTexObj mFrameBufferTexObj;
@@ -369,6 +371,15 @@ public:
static int m_height;
static f32 m_heightF;
static f32 m_widthF;
#if TARGET_PC
static f32 m_safeMinXF;
static f32 m_safeMinYF;
static f32 m_safeMaxXF;
static f32 m_safeMaxYF;
static f32 m_safeWidthF;
static f32 m_safeHeightF;
#endif
#endif
};
-4
View File
@@ -43,10 +43,6 @@ struct mDoLib_clipper {
};
void mDoLib_project(Vec* src, Vec* dst);
#if TARGET_PC
void mDoLib_project(Vec* src, Vec* dst, JGeometry::TBox2<f32> viewport);
#endif
u32 mDoLib_setResTimgObj(ResTIMG const* res, TGXTexObj* o_texObj, u32 tlut_name,
GXTlutObj* o_tlutObj);
void mDoLib_pos2camera(Vec* src, Vec* dst);
@@ -79,6 +79,10 @@ public:
virtual void viewCalc();
virtual ~J3DModel() {}
#if TARGET_PC
static void interp_callback(bool isSimFrame, void* pUserWork);
#endif
J3DModelData* getModelData() { return mModelData; }
void onFlag(u32 flag) { mFlags |= flag; }
@@ -105,9 +109,7 @@ public:
void setAnmMtx(int jointNo, Mtx m) {
mMtxBuffer->setAnmMtx(jointNo, m);
#ifdef TARGET_PC
dusk::frame_interp::record_final_mtx_raw(
reinterpret_cast<const Mtx*>(mMtxBuffer->getAnmMtx(jointNo)),
mMtxBuffer->getAnmMtx(jointNo));
dusk::frame_interp::record_final_mtx(mMtxBuffer->getAnmMtx(jointNo));
#endif
}
MtxP getAnmMtx(int jointNo) { return mMtxBuffer->getAnmMtx(jointNo); }
@@ -23,6 +23,10 @@ public:
void syncJ3DSysPointers() const;
void syncJ3DSysFlags() const;
#if TARGET_PC
bool needsInterpCallBack() const;
#endif
virtual ~J3DModelData() {}
void simpleCalcMaterial(Mtx mtx) { simpleCalcMaterial(0, mtx); }
@@ -33,6 +33,9 @@ public:
void copy(J3DMaterial*);
s32 newSharedDisplayList(u32);
s32 newSingleSharedDisplayList(u32);
#if TARGET_PC
bool needsInterpCallBack() const;
#endif
virtual void calc(f32 const (*)[4]);
virtual void calcDiffTexMtx(f32 const (*)[4]);
@@ -46,7 +49,6 @@ public:
virtual void change();
J3DMaterial() { initialize(); }
~J3DMaterial() {}
J3DMaterial* getNext() { return mNext; }
J3DShape* getShape() { return mShape; }
J3DTevBlock* getTevBlock() { return mTevBlock; }
@@ -1,9 +1,9 @@
#ifndef J3DSTRUCT_H
#define J3DSTRUCT_H
#include <cstring>
#include <gx.h>
#include <mtx.h>
#include <mtx.h>
#include "global.h"
#include "JSystem/JMath/JMath.h"
@@ -11,7 +11,7 @@
/**
* @ingroup jsystem-j3d
*
*
*/
struct J3DLightInfo {
bool operator==(J3DLightInfo& other) const;
@@ -28,7 +28,7 @@ struct J3DLightInfo {
/**
* @ingroup jsystem-j3d
*
*
*/
struct J3DTextureSRTInfo {
// NOTE: Big endian when loaded from file!
@@ -79,7 +79,7 @@ enum J3DTexMtxMode {
/**
* @ingroup jsystem-j3d
*
*
*/
struct J3DTexMtxInfo {
bool operator==(J3DTexMtxInfo& other) const;
@@ -97,7 +97,7 @@ struct J3DTexMtxInfo {
/**
* @ingroup jsystem-j3d
*
*
*/
struct J3DIndTexMtxInfo {
J3DIndTexMtxInfo& operator=(J3DIndTexMtxInfo const&);
@@ -107,7 +107,7 @@ struct J3DIndTexMtxInfo {
/**
* @ingroup jsystem-j3d
*
*
*/
struct J3DFogInfo {
bool operator==(J3DFogInfo&) const;
@@ -126,7 +126,7 @@ struct J3DFogInfo {
/**
* @ingroup jsystem-j3d
*
*
*/
struct J3DNBTScaleInfo {
bool operator==(const J3DNBTScaleInfo& other) const;
@@ -153,7 +153,7 @@ struct J3DIndTexOrderInfo {
/**
* @ingroup jsystem-j3d
*
*
*/
struct J3DTevSwapModeInfo {
/* 0x0 */ u8 mRasSel;
@@ -164,7 +164,7 @@ struct J3DTevSwapModeInfo {
/**
* @ingroup jsystem-j3d
*
*
*/
struct J3DTevSwapModeTableInfo {
/* 0x0 */ u8 field_0x0;
@@ -175,7 +175,7 @@ struct J3DTevSwapModeTableInfo {
/**
* @ingroup jsystem-j3d
*
*
*/
struct J3DTevStageInfo {
/* 0x0 */ u8 field_0x0;
@@ -202,7 +202,7 @@ struct J3DTevStageInfo {
/**
* @ingroup jsystem-j3d
*
*
*/
struct J3DIndTevStageInfo {
/* 0x0 */ u8 mIndStage;
@@ -219,7 +219,7 @@ struct J3DIndTevStageInfo {
/**
* @ingroup jsystem-j3d
*
*
*/
struct J3DTexCoordInfo {
/* 0x0 */ u8 mTexGenType;
@@ -265,7 +265,7 @@ struct J3DBlendInfo {
/**
* @ingroup jsystem-j3d
*
*
*/
struct J3DTevOrderInfo {
void operator=(const J3DTevOrderInfo& other) {
@@ -59,6 +59,9 @@ public:
bool isActive() const { return mSeqList.getNumLinks() != 0; }
int getNumActiveSeqs() const { return mSeqList.getNumLinks(); }
void pause(bool paused) { mActivity.field_0x0.flags.flag2 = paused; }
#if TARGET_PC
JSUList<JAISeq>* getSeqList() { return &mSeqList; }
#endif
private:
/* 0x08 */ JAIAudience* mAudience;
@@ -11,9 +11,17 @@
struct JASCalc {
static void imixcopy(const s16*, const s16*, s16*, u32);
static void bcopyfast(const void* src, void* dest, u32 size);
#if TARGET_ANDROID
static void _bcopy(const void* src, void* dest, u32 size);
#else
static void bcopy(const void* src, void* dest, u32 size);
#endif
static void bzerofast(void* dest, u32 size);
#if TARGET_ANDROID
static void _bzero(void* dest, u32 size);
#else
static void bzero(void* dest, u32 size);
#endif
static f32 pow2(f32);
template <typename A, typename B>
@@ -101,10 +101,6 @@ public:
void setDrawDoneMethod(EDrawDone drawDone) { mDrawDoneMethod = drawDone; }
void setFader(JUTFader* fader) { mFader = fader; }
#ifdef TARGET_PC
// For frame interpolation
void setFaderSimSteps(u32 steps);
#endif
void resetFader() { setFader(NULL); }
JUTFader* getFader() const { return mFader; }
void setClearColor(JUtility::TColor color) { mClearColor = color; }
@@ -207,4 +207,11 @@ void JPARegistAlphaEnv(JPAEmitterWorkData*, JPABaseParticle*);
void JPARegistPrmAlpha(JPAEmitterWorkData*, JPABaseParticle*);
void JPARegistPrmAlphaEnv(JPAEmitterWorkData*, JPABaseParticle*);
#if TARGET_PC
void JPAInterpBillboard(JPAEmitterWorkData*, JPABaseParticle*);
void JPAInterpRotBillboard(JPAEmitterWorkData*, JPABaseParticle*);
void JPAInterpDirection(JPAEmitterWorkData*, JPABaseParticle*);
void JPAInterpRotDirection(JPAEmitterWorkData*, JPABaseParticle*);
#endif
#endif /* JPABASESHAPE_H */

Some files were not shown because too many files have changed in this diff Show More