Compare commits

..

494 Commits

Author SHA1 Message Date
CraftyBoss 589c6675fe fix inventory reset ignoring previously obtained items on inv fill, add heros clothes to reset inventory default 2026-07-02 00:50:07 -07:00
CraftyBoss 0be48db605 save archipelago connection info based on current save slot 2026-07-01 01:36:14 -07:00
CraftyBoss dbb9ce2c03 fix merge error 2026-07-01 00:51:29 -07:00
CraftyBoss cc808ab50c Merge remote-tracking branch 'origin/randomizer' into rando-archi
# Conflicts:
#	include/dusk/settings.h
#	src/dusk/settings.cpp
2026-07-01 00:42:52 -07:00
gymnast86 591c38e871 Merge branch 'main' of https://github.com/TwilitRealm/dusk into randomizer 2026-07-01 00:27:50 -07:00
gymnast86 a5bc71795e add various cosmetic options 2026-07-01 00:27:35 -07:00
CraftyBoss 7682165478 Merge remote-tracking branch 'origin/randomizer' into rando-archi 2026-06-30 01:08:17 -07:00
gymnast86 26d0725c76 Merge branch 'main' of https://github.com/TwilitRealm/dusk into randomizer 2026-06-26 11:56:32 -07:00
gymnast86 1b3b493fbf reset rando context if current seed is deleted 2026-06-26 11:53:33 -07:00
gymnast86 f62a70f9d0 update starting time of day descriptions 2026-06-26 11:40:09 -07:00
gymnast86 ec2173db9f change seed option menu styling 2026-06-26 11:34:22 -07:00
gymnast86 563944d4a3 use updated shadow crystal bti from melonspeedruns 2026-06-26 11:32:59 -07:00
gymnast86 b8f69e82dd add shadow crystal icon 2026-06-25 08:57:34 -07:00
gymnast86 830b560933 text changes to account for long item names 2026-06-25 03:15:14 -07:00
CraftyBoss 57019bea30 Merge remote-tracking branch 'origin/main' into rando-archi 2026-06-25 01:05:26 -07:00
CraftyBoss c590018059 trigger game complete on ganondorf kill
with this, in theory AP seeds should be beatable now, of course theres still a ton of work to do in terms of fleshing out some features
2026-06-25 01:05:15 -07:00
CraftyBoss e7eefbb0cb Merge remote-tracking branch 'origin/randomizer' into rando-archi 2026-06-24 03:22:56 -07:00
CraftyBoss 7ee39edee7 add death link support, add needed archipelago item messages to language yamls
Archipelago items will still be green rupees for now until we decide how we want to handle custom game assets
2026-06-24 03:22:42 -07:00
gymnast86 6592871fa2 add mirror chamber access setting 2026-06-23 09:16:39 -07:00
CraftyBoss 5a1368b355 cleanup settings parser, get settings directly from slot data instead of user YAML
loaded seeds should now have proper settings applied without needing to seperately parse the archi's player settings yaml.
2026-06-22 23:43:24 -07:00
CraftyBoss 6984ae83bf add UI to selecting/creating archipelago seed
Next step will be to associate connection info to each save slot instead of overwriting the same config values for every slot. With these changes though, it should be possible to connect to an archipelago lobby without needing to use the ImGui debug window.
2026-06-22 03:25:01 -07:00
gymnast86 e57c952deb print required dungeons to spoiler log 2026-06-21 16:18:07 -07:00
gymnast86 4239cea3d5 Fix arbiters grounds sometimes not being listed as a required dungeon 2026-06-21 15:59:39 -07:00
CraftyBoss 93479100fc Merge remote-tracking branch 'origin/randomizer' into rando-archi 2026-06-21 14:36:49 -07:00
gymnast86 9bd34a0d02 fix gor liggs always setting item bit for 3 key shards 2026-06-21 09:07:54 -07:00
gymnast86 cce67c1809 fix dpad icon not drawing at unlocked framerates 2026-06-21 08:32:58 -07:00
gymnast86 6bf0dfd92a properly patch CT malo mart door to be open at any time of day 2026-06-20 10:24:17 -07:00
gymnast86 4d8fcfa551 add permalink sharing 2026-06-20 07:57:49 -07:00
CraftyBoss 6366ab61d1 add inventory resetting on server connect, properly handle getting new items from locations, integrate some of archi into new rando ui stuff
For the most part, solo archipelago runs seem to work fine now using the original TP apworld, but im sure there are plenty of weird issues still that need to be handled.
2026-06-19 17:07:42 -07:00
CraftyBoss 7537f1c4a8 Merge remote-tracking branch 'origin/randomizer' into rando-archi 2026-06-19 17:01:52 -07:00
gymnast86 a3de85fb4b Merge branch 'main' of https://github.com/TwilitRealm/dusk into randomizer 2026-06-19 03:09:50 -07:00
gymnast86 08e0645ef8 add functionality for saving and loading presets 2026-06-19 03:08:12 -07:00
gymnast86 f20cf3c24e change spoiler log wording 2026-06-19 03:03:03 -07:00
gymnast86 b2dfdf4158 fix entrance metadata 2026-06-19 03:02:47 -07:00
gymnast86 99689258a2 misc cleanup 2026-06-17 23:56:37 -07:00
gymnast86 08345d01ed Merge branch 'main' of https://github.com/TwilitRealm/dusk into randomizer 2026-06-17 03:01:05 -07:00
gymnast86 56d47d475f add button to reset settings to default 2026-06-17 03:00:40 -07:00
gymnast86 8a92efbe0d properly save rando file during autosave 2026-06-17 02:30:54 -07:00
gymnast86 1790ad6faf fix merge conflicts 2026-06-16 05:30:08 -04:00
gymnast86 e39c139b97 Merge branch 'main' of https://github.com/TwilitRealm/dusklight into randomizer 2026-06-16 05:18:57 -04:00
gymnast86 54b3545736 properly refocus child element after deleting a seed 2026-06-16 05:14:32 -04:00
gymnast86 2428ca2efe Merge branch 'main' of https://github.com/TwilitRealm/dusklight into randomizer 2026-06-15 06:04:32 -04:00
gymnast86 05d9cf0402 make requirement tooltips more readable 2026-06-15 06:03:08 -04:00
gymnast86 2651640ee0 Merge branch 'main' of https://github.com/TwilitRealm/dusklight into randomizer 2026-06-13 20:59:48 -04:00
gymnast86 f8c5a8988b fix getTempleKeysFound 2026-06-13 20:57:32 -04:00
gymnast86 544964c1a5 properly implement no logic 2026-06-13 07:56:51 -04:00
CraftyBoss 59b76f7aae Merge remote-tracking branch 'origin/randomizer' into rando-archi 2026-06-12 23:29:45 -07:00
gymnast86 7bd3e9cafd move saved file seed load to file select instead of file start 2026-06-12 21:25:49 -04:00
gymnast86 8999c4c9c5 remove asheis sketch after showing it to Ralis 2026-06-12 20:48:24 -04:00
gymnast86 917def4732 fix missed string 2026-06-12 20:48:02 -04:00
gymnast86 0516282bb6 cleanup settings_list.yaml and related files 2026-06-12 19:26:09 -04:00
CraftyBoss 4466442cfb add location IDs to yaml db, get started on translating received ap data to rando data
the idea is to use the existing randomizer systems (like World, RandomizerContext, etc) in order to generate necessary data for in-game modifications such as text replacements, model swaps, etc. to do this we need to get the apworld's current settings, which atm will require loading the configured ap yaml file before connecting to archipelago.
2026-06-12 02:47:52 -07:00
CraftyBoss d6f741947a Merge remote-tracking branch 'origin/randomizer' into rando-archi 2026-06-10 22:59:44 -07:00
gymnast86 d855efe513 remove instances of double actors 2026-06-10 23:05:25 -06:00
CraftyBoss 51a25206c2 Merge remote-tracking branch 'origin/randomizer' into rando-archi
# Conflicts:
#	include/dusk/settings.h
#	src/dusk/settings.cpp
2026-06-10 21:02:31 -07:00
gymnast86 28733f5c15 Merge branch 'main' of https://github.com/TwilitRealm/dusk into randomizer 2026-06-10 06:23:31 -07:00
gymnast86 b2ac2d6600 overhaul seed selection to be on file creation 2026-06-10 06:22:03 -07:00
CraftyBoss f6b86d3f38 actually get some ap functionality going
getting items from the server works now mostly, for now we're ignoring inventory fills as its going to require a bit of work to reset the inventory on connection.
2026-06-09 01:23:05 -07:00
CraftyBoss b118fa19e1 Merge remote-tracking branch 'origin/randomizer' into rando-archi 2026-06-09 01:14:16 -07:00
gymnast86 68bebfad3a Merge branch 'main' of https://github.com/TwilitRealm/dusk into randomizer 2026-06-08 22:58:46 -07:00
gymnast86 a0f5b250b4 Merge branch 'randomizer' of https://github.com/TwilitRealm/dusk into randomizer 2026-06-08 22:58:41 -07:00
gymnast86 cb70f2c3b3 use C-style array for adjectives and nouns 2026-06-08 22:58:29 -07:00
Luke Street 5851954ca1 Revert "Move RegisteredConfigVars to function-local static"
This reverts commit ea09dd73c6.
2026-06-08 22:16:10 -06:00
gymnast86 c65f0bb0ac Merge branch 'randomizer' of https://github.com/TwilitRealm/dusk into randomizer 2026-06-08 21:06:52 -07:00
gymnast86 038254db48 decouple generation modal from config menu 2026-06-08 21:05:30 -07:00
Luke Street c1997b3d68 Remove huge TLS variable; fixes Linux issues
Randomizer code was allocating a 25MB buffer
for file I/O using thread-local storage,
which was starving the stack space of threads
created on Linux.

The buffer appears to be a workaround for
Wii U homebrew I/O, so we can just disable
it altogether.

Resolves #1836
2026-06-08 21:52:12 -06:00
gymnast86 474a7dce00 Merge branch 'main' of https://github.com/TwilitRealm/dusk into randomizer 2026-06-08 18:08:13 -07:00
gymnast86 382f33d021 fix some tracker locations not getting updated fast enough 2026-06-08 18:05:21 -07:00
CraftyBoss efbf82d4c7 Merge remote-tracking branch 'origin/randomizer' into rando-archi 2026-06-08 16:44:48 -07:00
gymnast86 b743a762b4 fix swapped flags for male/female beetle 2026-06-08 16:04:58 -07:00
gymnast86 302abd6b65 track twilight tears in tracker 2026-06-08 13:44:35 -07:00
gymnast86 3f6ae4324b Merge branch 'randomizer' of https://github.com/TwilitRealm/dusk into randomizer 2026-06-08 00:12:19 -07:00
gymnast86 dccded964b fix hang on swim spawn with no water 2026-06-07 21:09:31 -07:00
Luke Street ea09dd73c6 Move RegisteredConfigVars to function-local static
Defers initialization until used to avoid crash
with specific file-local static initialization ordering.

Fixes #1836
2026-06-07 21:08:41 -06:00
gymnast86 c426b52a15 use constexpr for seed nouns and adjectives 2026-06-07 09:32:53 -07:00
gymnast86 41e0a81c39 fix rando first item bits in editor 2026-06-07 00:54:13 -07:00
gymnast86 5b6f2f6e91 fix some first item bits accidentally getting unset 2026-06-06 23:39:18 -07:00
gymnast86 bbea07ba9e fix boomerang sometimes not spinning as freestanding item 2026-06-06 21:41:16 -07:00
gymnast86 0f0dca5514 fix boomerang potentially not being collected as freestanding item 2026-06-06 21:11:40 -07:00
gymnast86 3fb86dbac8 better plando error messaging 2026-06-06 20:17:51 -07:00
CraftyBoss 83adafff82 basic setup for archipelago support started
For now we'll be using APCpp, seems to be good enough for what we need to do for this. might eventually roll my own library if things end up being too weird/complicated to integrate properly.
2026-06-06 19:39:23 -07:00
gymnast86 7e367c1e15 parameter cleanup 2026-06-06 18:21:01 -07:00
gymnast86 46e81963e2 focus seed gen modal after seed generates 2026-06-06 17:39:44 -07:00
gymnast86 4f1d4cde3d Merge branch 'main' of https://github.com/TwilitRealm/dusk into randomizer 2026-06-06 11:14:02 -07:00
gymnast86 45c8fa9f19 update seed generation modal when generation finishes 2026-06-06 11:11:17 -07:00
gymnast86 87635d3cf7 Coro bottle hint in text 2026-06-06 06:46:58 -07:00
gymnast86 e5324c7562 remove old comments 2026-06-05 22:58:58 -07:00
gymnast86 03593def22 fix setting jumpstrike event bit 2026-06-05 22:45:42 -07:00
gymnast86 2ae5518c81 SetPsuedoClass -> SetClass 2026-06-05 21:23:10 -07:00
gymnast86 bc45bf27c2 Merge branch 'main' of https://github.com/TwilitRealm/dusk into randomizer 2026-06-05 21:11:36 -07:00
gymnast86 7d2c9776ea implement excluded locations menu 2026-06-05 21:10:57 -07:00
gymnast86 fbf4fcc50c add crc32.hpp to files.cmake 2026-06-04 18:46:38 -07:00
gymnast86 1868d698f5 include crc32.hpp 2026-06-04 18:05:08 -07:00
gymnast86 d858626be1 Merge branch 'main' of https://github.com/TwilitRealm/dusk into randomizer 2026-06-04 17:56:36 -07:00
gymnast86 f00ad8e0ea maybe fix linux crash 2026-06-04 17:55:48 -07:00
gymnast86 7b521aef02 fix missing location category 2026-06-03 19:39:25 -07:00
gymnast86 4721b8da50 Merge branch 'randomizer' of https://github.com/TwilitRealm/dusk into randomizer 2026-06-03 16:49:15 -07:00
gymnast86 b06af0e057 Merge branch 'main' of https://github.com/TwilitRealm/dusk into randomizer 2026-06-03 16:48:57 -07:00
gymnast86 518dea482e fix lost woods boulder poe logic 2026-06-03 16:48:50 -07:00
gymnast86 daf2f18369 fix asheis sketch disappearing 2026-06-03 16:48:33 -07:00
CraftyBoss 9307d8abde dont throw on failed to obtain item name, fix getTempleKeysFound not checking flag correctly 2026-06-03 16:47:04 -07:00
gymnast86 b3dbf2c71b Merge branch 'main' of https://github.com/TwilitRealm/dusk into randomizer 2026-06-02 23:25:57 -07:00
gymnast86 4bb5f320c3 Merge branch 'main' of https://github.com/TwilitRealm/dusk into randomizer 2026-06-02 22:15:42 -07:00
gymnast86 f1357f09ed add starting inventory management to UI 2026-06-02 22:15:34 -07:00
gymnast86 e3eb63f158 Merge branch 'main' of https://github.com/TwilitRealm/dusk into randomizer 2026-06-01 19:28:36 -07:00
gymnast86 47c0a399e1 Merge branch 'main' of https://github.com/TwilitRealm/dusk into randomizer 2026-06-01 02:07:47 -07:00
gymnast86 dfdd5250bd fix prologue items sometimes being in excluded locations 2026-06-01 02:07:37 -07:00
gymnast86 ba7211126c only spawn donation bridge after twilights are cleared 2026-06-01 01:54:28 -07:00
gymnast86 ef607434dd fix twilight clear checks 2026-06-01 01:53:43 -07:00
gymnast86 f12838ea3b fix required dungeons sign when no dungeons are required 2026-06-01 01:53:04 -07:00
gymnast86 dc88e11115 implement framework for custom text in other languages 2026-05-31 01:41:12 -07:00
gymnast86 e671ed748b change some custom text coloring 2026-05-31 01:38:49 -07:00
gymnast86 98633a5cb6 Merge branch 'main' of https://github.com/TwilitRealm/dusk into randomizer 2026-05-30 19:28:29 -07:00
gymnast86 6c1aeb0d0a reset conversation bit after exiting ordon shield house 2026-05-30 19:28:24 -07:00
gymnast86 a2d41bcfba Merge branch 'main' of https://github.com/TwilitRealm/dusk into randomizer 2026-05-29 22:57:56 -07:00
gymnast86 96ed5c671b fix garbled ice trap audio 2026-05-29 22:57:38 -07:00
gymnast86 de12d277d0 restricted fills cleanup 2026-05-29 11:31:29 -07:00
gymnast86 3b8ec9efa6 quick no logic implementation 2026-05-29 11:31:13 -07:00
gymnast86 39b079ddb9 fix plentiful item pool crash 2026-05-28 20:33:20 -07:00
gymnast86 e2790d922a reorganize includes 2026-05-28 20:25:26 -07:00
gymnast86 afed2c1774 Merge branch 'randomizer' of https://github.com/TwilitRealm/dusk into randomizer 2026-05-28 20:22:12 -07:00
gymnast86 46a67c658c Merge branch 'main' of https://github.com/TwilitRealm/dusk into randomizer 2026-05-28 20:21:14 -07:00
gymnast86 351afd6686 add item text replacements 2026-05-28 20:04:20 -07:00
gymnast86 485374abba Outside Castle Town -> South of Castle Town 2026-05-28 20:02:21 -07:00
gymnast86 8ecd848307 filter out nonprogress locations when placing goal items 2026-05-28 20:02:03 -07:00
CraftyBoss c4a13c8c10 add WIP inventory window in check tracker, only decrease available locations if check is accessible
also fixed issue with getSaveItemPool not counting base skybook item, as well as Aurus Memo if it was used
2026-05-28 01:16:53 -07:00
CraftyBoss 313e9be99d Merge remote-tracking branch 'origin/main' into randomizer
# Conflicts:
#	src/d/actor/d_a_npc_kkri.cpp
#	src/d/actor/d_a_npc_rafrel.cpp
2026-05-28 01:15:08 -07:00
gymnast86 d79088ba05 Merge branch 'randomizer' of https://github.com/TwilitRealm/dusk into randomizer 2026-05-27 10:54:52 -07:00
gymnast86 3aa7abe73f add required dungeons to links house sign 2026-05-27 10:54:35 -07:00
CraftyBoss 8e38f27602 sort checks by status, add hide button, cleanup code layout 2026-05-27 02:00:48 -07:00
Luke Street 7543db2222 Merge branch 'main' into randomizer 2026-05-26 20:58:20 -06:00
gymnast86 32e553e38d Merge branch 'main' of https://github.com/TwilitRealm/dusk into randomizer 2026-05-25 23:41:18 -07:00
gymnast86 089a947c30 rework some prologue logic 2026-05-25 23:41:10 -07:00
gymnast86 83a5ccce92 fix blank letters 2026-05-25 22:43:09 -07:00
gymnast86 48de086d65 fix logic tests path 2026-05-25 22:39:30 -07:00
gymnast86 5a61b912bb Merge branch 'main' of https://github.com/TwilitRealm/dusk into randomizer 2026-05-24 22:00:10 -07:00
gymnast86 4e92b22c5d fix auru having a model scale of 0 2026-05-24 21:59:26 -07:00
gymnast86 ede9697dae update bobm refill logic 2026-05-24 19:12:17 -07:00
gymnast86 580b772c3c update tracker flags for various locations 2026-05-24 19:12:10 -07:00
gymnast86 143b548102 Merge branch 'main' of https://github.com/TwilitRealm/dusk into randomizer 2026-05-24 10:32:31 -07:00
gymnast86 15742c71f3 fix aurus memo temporarily disappearing 2026-05-24 10:29:49 -07:00
CraftyBoss 40f753e18b Merge remote-tracking branch 'origin/main' into randomizer
# Conflicts:
#	src/f_op/f_op_actor_mng.cpp
2026-05-24 03:40:08 -07:00
CraftyBoss 65f4048a41 show item name when location is collected, fix ordon shield flag being incorrect 2026-05-23 19:50:45 -07:00
gymnast86 e78a198adf fix horse call get item func 2026-05-23 11:44:21 -07:00
gymnast86 75d86ab296 fix ilia quest logic setting logic 2026-05-23 11:44:05 -07:00
gymnast86 62e48984bf Merge branch 'main' of https://github.com/TwilitRealm/dusk into randomizer 2026-05-23 09:11:07 -07:00
gymnast86 deb213d07a path cleanup 2026-05-23 09:10:58 -07:00
gymnast86 484c5e8bf3 variable change 2026-05-23 09:10:01 -07:00
gymnast86 bb67fc991d fix isStageItem check 2026-05-23 09:09:13 -07:00
gymnast86 7326a619da fix tears in itempool 2026-05-23 09:08:53 -07:00
CraftyBoss 4ce5800a33 fix some config options not saving on change, move check obtained checking to tool func, tracker cleanup 2026-05-23 03:05:54 -07:00
CraftyBoss 66a8af31b3 fix non msvc compile error 2026-05-23 00:20:38 -07:00
CraftyBoss 85fe76b5be add tracker_isStageItem for Freestanding Item checking 2026-05-22 23:03:06 -07:00
CraftyBoss ffa1fd5da4 add ability to toggle tracker in rmlui (hack for now), show area remaining checks, misc debugging info 2026-05-22 22:49:44 -07:00
gymnast86 3d2c5633cd set nonprogress locations in tracker 2026-05-22 20:35:15 -07:00
gymnast86 08ce522edb add flag checking for more intuitve location marking 2026-05-22 19:58:05 -07:00
gymnast86 ab007b4c44 revert updateTracker check 2026-05-22 19:53:09 -07:00
gymnast86 2cf2442dc8 update location metadata for switch/event flags 2026-05-21 20:03:32 -07:00
gymnast86 7354bfc163 remove unused include 2026-05-21 20:02:18 -07:00
gymnast86 7bca56ea80 uncomment option 2026-05-21 10:04:48 -07:00
gymnast86 42eb9ef518 use region for areas instead of area name 2026-05-21 10:04:38 -07:00
gymnast86 be4a1d8838 don't search if type is NO_SEARCH 2026-05-21 05:53:27 -07:00
gymnast86 fd523a7e4d more intuitive GetWorld function 2026-05-21 05:52:48 -07:00
gymnast86 650b56beee more guarding against null stag info 2026-05-21 05:51:33 -07:00
CraftyBoss 1e3f097e63 start work on detecting if a check has been collected in tracker
the func getStageSaveId in randomizer/game/tools.cpp might not be totally accurate, and is based off google spreadsheet data
2026-05-21 03:26:10 -07:00
CraftyBoss 9fd5678ae4 Merge remote-tracking branch 'origin/main' into randomizer 2026-05-21 00:32:38 -07:00
CraftyBoss dcf6268444 sort tracker checks by area name, uncomment manual update button for now, always generate search when updating tracker 2026-05-20 21:17:27 -07:00
gymnast86 1f4370af85 Merge branch 'main' of https://github.com/TwilitRealm/dusk into randomizer 2026-05-20 17:42:10 -07:00
gymnast86 ed458dc2b3 backend tracker updates 2026-05-20 17:41:03 -07:00
gymnast86 7cebc42266 comments 2026-05-20 14:00:58 -07:00
gymnast86 0d819b215d comment out other options 2026-05-20 13:58:37 -07:00
gymnast86 8113fc3088 Remove entrance rando options until they're hooked up 2026-05-20 13:56:50 -07:00
gymnast86 78bc0216fb Merge branch 'randomizer' of https://github.com/TwilitRealm/dusk into randomizer 2026-05-19 22:13:29 -07:00
gymnast86 b74603c883 basic backend for tracking 2026-05-19 22:13:06 -07:00
gymnast86 9e8b451462 fix starting time of day button 2026-05-19 19:31:05 -07:00
CraftyBoss d25695be0e implement basic warp to start button in rando menu
serves as a sort of placeholder until Midna can be properly edited to behave like console rando
2026-05-19 17:40:49 -07:00
CraftyBoss ba9dc8e9ba finish up rando config ui, remove randomizerEnabled CVar, fix seed strings not saving to config
i would like to have someone more aquainted with the UI system to look over the config menu at some point, as i do think it could be better.
2026-05-19 16:13:50 -07:00
gymnast86 ddb9816158 use config path for imgui seed selection 2026-05-19 08:43:56 -07:00
gymnast86 33e19f58e0 github action fixes 2026-05-19 07:56:32 -07:00
gymnast86 ece92765c9 use dusk config path for settings file 2026-05-19 00:51:17 -07:00
CraftyBoss c2dea2ab8f switch GenerateSeed to use c++ rand instead 2026-05-18 23:21:08 -07:00
CraftyBoss e0dea86134 embed rando generator yamls into binary 2026-05-18 22:37:55 -07:00
gymnast86 8409c2ab9f Merge branch 'randomizer' of https://github.com/TwilitRealm/dusk into randomizer 2026-05-18 20:00:57 -07:00
gymnast86 3eb4181b9c Merge branch 'main' of https://github.com/TwilitRealm/dusk into randomizer 2026-05-18 20:00:51 -07:00
gymnast86 0d33d44e75 fix crash after getting Ook item 2026-05-18 20:00:44 -07:00
CraftyBoss 6ea50f33e4 remove fog lantern cooldown while rando is active 2026-05-18 19:17:34 -07:00
CraftyBoss 769b8f02c8 optimize config option finding a bit, add optional settings in config menu, load last generated seed and set generator seed 2026-05-18 19:14:42 -07:00
gymnast86 d77da3fba3 don't show special text for 20 poe souls 2026-05-18 17:50:08 -07:00
gymnast86 ea0c697afa fix key count inconsistency 2026-05-18 11:05:46 -07:00
gymnast86 6321bcf0d8 Merge branch 'main' of https://github.com/TwilitRealm/dusk into randomizer 2026-05-18 07:31:38 -07:00
gymnast86 1e7e9b3513 Merge branch 'main' of https://github.com/TwilitRealm/dusk into randomizer 2026-05-17 17:40:24 -07:00
gymnast86 63e7fb4187 Merge branch 'randomizer' of https://github.com/TwilitRealm/dusk into randomizer 2026-05-17 17:39:59 -07:00
gymnast86 453accc674 draw d-pad icon for quest item slot 2026-05-17 17:39:53 -07:00
madeline a565601849 fix rando_config.cpp on linux maybe 2026-05-17 16:45:18 -07:00
gymnast86 e92a3b4a90 fix epona crash on ordon layer 0 2026-05-17 15:52:16 -07:00
gymnast86 141ddafdc8 another tbox id swap 2026-05-17 13:47:03 -07:00
gymnast86 007561874d Merge branch 'main' of https://github.com/TwilitRealm/dusk into randomizer 2026-05-17 13:41:36 -07:00
gymnast86 b167124a70 Merge branch 'main' of https://github.com/TwilitRealm/dusk into randomizer 2026-05-17 07:07:09 -07:00
gymnast86 879c68f8a3 fix incorrect stage check 2026-05-17 07:07:02 -07:00
gymnast86 ccaee02c2e Merge branch 'main' of https://github.com/TwilitRealm/dusk into randomizer 2026-05-17 02:19:59 -07:00
gymnast86 ff498af6e8 add horse jump scob on post mdh kak gorge 2026-05-17 02:19:24 -07:00
gymnast86 9c3420bcc7 fix midna being on players back 2026-05-17 01:56:24 -07:00
gymnast86 23a6719e99 Merge branch 'main' of https://github.com/TwilitRealm/dusk into randomizer 2026-05-16 01:56:46 -07:00
gymnast86 95c1a93332 poe soul option swap 2026-05-16 01:56:37 -07:00
gymnast86 63a91bffde another tbox id swap 2026-05-16 01:56:17 -07:00
gymnast86 d33b3c16e1 zlib cmake fix 2026-05-16 01:56:06 -07:00
gymnast86 33e2ffbb6e Merge branch 'main' of https://github.com/TwilitRealm/dusk into randomizer 2026-05-15 17:14:46 -07:00
gymnast86 491a73f517 fix swapped tbox IDs 2026-05-15 15:09:54 -07:00
gymnast86 54efc49bd8 fix lake hylia poe logic 2026-05-15 15:09:41 -07:00
gymnast86 f6eaa64156 don't check time when going into malo mart 2026-05-15 11:17:25 -07:00
gymnast86 ed1f21f333 allow overriding flw types 2026-05-15 11:16:11 -07:00
gymnast86 0a0f1e9a04 rando rider ub 2026-05-15 09:09:19 -07:00
gymnast86 64720ef0e0 membit onSwitch patches 2026-05-15 09:08:51 -07:00
gymnast86 b213ae2faa more boulder rupee layer patches 2026-05-15 09:08:15 -07:00
gymnast86 d7e0c240d0 fix domain rock rupee layers 2026-05-15 08:42:14 -07:00
gymnast86 56de23e2e6 fix itempool size 2026-05-15 03:39:44 -07:00
gymnast86 0862408ee8 Merge branch 'main' of https://github.com/TwilitRealm/dusk into randomizer 2026-05-15 02:46:23 -07:00
gymnast86 b2b74e5c4d fix transform after faron twilight 2026-05-15 02:46:08 -07:00
gymnast86 39da278394 fix gate to north faron 2026-05-15 02:32:15 -07:00
gymnast86 ec2f2753a2 update versioning in logs 2026-05-15 01:10:58 -07:00
gymnast86 89a0702d2b put kak bomb rock hp on twilight layer 2026-05-15 00:59:49 -07:00
gymnast86 9d94e9684f Merge branch 'main' of https://github.com/TwilitRealm/dusk into randomizer 2026-05-14 08:00:45 -07:00
gymnast86 f8d01ae6d2 onEventBit patches 2026-05-14 08:00:34 -07:00
gymnast86 9f400543c2 update startflags 2026-05-14 08:00:09 -07:00
gymnast86 3861bf5506 add twilight layer to eldin boulder rupees 2026-05-14 06:44:20 -07:00
gymnast86 5c745735d7 fix faron boulder rupee layers 2026-05-14 06:13:26 -07:00
gymnast86 886fb7f2db Merge branch 'main' of https://github.com/TwilitRealm/dusk into randomizer 2026-05-14 04:09:12 -07:00
gymnast86 01d0d12af0 comment 2026-05-14 04:08:35 -07:00
gymnast86 c0f882845d add barriers to prevent early lanayru twilight access 2026-05-13 18:28:48 -07:00
gymnast86 7225fb25dc Merge branch 'main' of https://github.com/TwilitRealm/dusk into randomizer 2026-05-13 17:04:13 -07:00
gymnast86 5ab46c604b always show reekfish scent path after having smelled reekfish 2026-05-13 17:04:06 -07:00
gymnast86 f3b29d97d0 fix bo house door patches 2026-05-13 06:55:25 -07:00
gymnast86 9447f4e89b fix LH cave chest metadata 2026-05-13 05:09:33 -07:00
gymnast86 7db5386885 use main zlib 2026-05-13 02:47:40 -07:00
gymnast86 9c1617d423 Merge branch 'main' of https://github.com/TwilitRealm/dusk into randomizer 2026-05-13 02:24:56 -07:00
gymnast86 4c4e3e4b10 Merge branch 'main' of https://github.com/TwilitRealm/dusk into randomizer 2026-05-11 14:13:11 -07:00
gymnast86 4db50d2843 fix progressive items in chests on the same stage 2026-05-11 14:05:23 -07:00
gymnast86 ba5a59eee2 Foolish items 2026-05-11 13:47:17 -07:00
CraftyBoss 5e69c7bdce Merge remote-tracking branch 'origin/main' into randomizer
# Conflicts:
#	files.cmake
#	src/m_Do/m_Do_main.cpp
2026-05-10 23:14:50 -07:00
CraftyBoss 04d9640eff add config menu and hook it up into current config system
currently any options that requires additional settings, like "Hyrule Barrier Requirements", wont actually have any additional options yet until i figure out a clean way to handle that
2026-05-10 23:13:02 -07:00
CraftyBoss 83480110fd Merge branch 'main' into randomizer 2026-05-10 15:16:07 -07:00
gymnast86 5038068905 patch spawns between faron field and outside sct to not be inside rocks 2026-05-10 10:45:29 -07:00
gymnast86 7388213715 allow patching of PLYR objects 2026-05-10 10:45:04 -07:00
gymnast86 0e1e64fe7d Merge branch 'main' of https://github.com/TwilitRealm/dusk into randomizer 2026-05-10 09:56:06 -07:00
gymnast86 f48a3be466 patch cits objects 2026-05-10 09:55:52 -07:00
gymnast86 61835c05ba add support for patching objects in stage.dzs 2026-05-10 09:54:55 -07:00
gymnast86 762a597eba delete midna trigger that sometimes prevents going north in palace 2026-05-10 05:12:17 -07:00
gymnast86 69283fc611 remove grove portal fight walls 2026-05-10 04:51:31 -07:00
gymnast86 b0efe464c0 make shoe shiner always available 2026-05-10 04:05:58 -07:00
gymnast86 a6fda86ebf fix sera bottle check if faorn twilight is cleared 2026-05-10 03:02:27 -07:00
gymnast86 4b363dab06 Merge branch 'main' of https://github.com/TwilitRealm/dusk into randomizer 2026-05-10 01:26:10 -07:00
gymnast86 77ae5fd0b3 implement temple of time sword requirement 2026-05-10 01:25:44 -07:00
gymnast86 2890a663f3 Merge branch 'main' of https://github.com/TwilitRealm/dusk into randomizer 2026-05-09 10:38:57 -07:00
gymnast86 f263a33db2 change time of day with midna 2026-05-09 10:38:34 -07:00
gymnast86 99ee9c2f48 Merge branch 'main' of https://github.com/TwilitRealm/dusk into randomizer 2026-05-09 06:38:27 -07:00
gymnast86 1cfb22fdd9 handle unknown patch action 2026-05-09 06:38:14 -07:00
gymnast86 bf85d511a8 make the gate to KB2 stay open permanently once it's been unlocked 2026-05-09 06:24:27 -07:00
gymnast86 dc9dce2cd7 Merge branch 'main' of https://github.com/TwilitRealm/dusk into randomizer 2026-05-09 04:39:24 -07:00
gymnast86 8333ae35a8 refactor object overrides 2026-05-09 04:38:38 -07:00
gymnast86 ced018794f remove invisible wall blocking north palace 2026-05-09 01:52:27 -07:00
gymnast86 bfb715e11a Merge branch 'main' of https://github.com/TwilitRealm/dusk into randomizer 2026-05-08 16:26:52 -07:00
gymnast86 9e9f36e484 autoskip cutscenes when skip major cutscenes is on 2026-05-08 16:21:26 -07:00
gymnast86 38031e2545 set all letters obtained when skip minor cutscenes is on 2026-05-08 16:00:42 -07:00
gymnast86 2dea7375ef custom text for donating 100 rupees to charlo 2026-05-08 09:11:36 -07:00
gymnast86 48bfcec0a3 missed include 2026-05-07 23:24:45 -07:00
gymnast86 7a4c23fa33 Merge branch 'main' of https://github.com/TwilitRealm/dusk into randomizer 2026-05-07 23:23:16 -07:00
gymnast86 0014be0e82 implement custom item text 2026-05-07 23:17:58 -07:00
gymnast86 870bd6476c show rando stats by default 2026-05-06 18:41:59 -07:00
gymnast86 96d9b5e7b1 update old category name 2026-05-06 15:35:20 -07:00
gymnast86 09a73d5828 organize items.yaml 2026-05-06 09:06:46 -07:00
gymnast86 e14d1f1f68 Merge branch 'main' of https://github.com/TwilitRealm/dusk into randomizer 2026-05-06 07:56:33 -07:00
gymnast86 9f6c39754b rework actor additions 2026-05-06 07:56:17 -07:00
gymnast86 eda9991e6a sols check 2026-05-06 07:53:02 -07:00
gymnast86 95e699fb63 don't transform in twilight fog if the player doesn't have shadow crystal 2026-05-06 03:48:06 -07:00
gymnast86 618d5b5733 fix data typos 2026-05-06 03:27:28 -07:00
gymnast86 2ececa3206 update goal flags during play 2026-05-06 03:27:14 -07:00
gymnast86 4fddaba76b fix conflict 2026-05-05 21:33:24 -07:00
gymnast86 045df82445 Merge branch 'main' of https://github.com/TwilitRealm/dusk into randomizer 2026-05-05 21:33:06 -07:00
gymnast86 b3833be529 don't try to play get item cutscene when swimming or snowboarding 2026-05-05 21:21:47 -07:00
gymnast86 f45aa6040e fix multiple progressive items on the same stage giving the same item 2026-05-05 21:20:56 -07:00
gymnast86 25b273a726 fix single arrow drops being too large 2026-05-05 21:12:24 -07:00
gymnast86 3e99420527 allow keeping ooccoo jr through dungeon exits 2026-05-05 05:13:26 -07:00
gymnast86 f6e526b187 fix missed metadata 2026-05-05 04:15:53 -07:00
gymnast86 23567fba42 fix boss arena music 2026-05-05 03:47:42 -07:00
gymnast86 255a55d4c8 remove uneeded code 2026-05-05 02:46:52 -07:00
gymnast86 d7ca855d9a Merge branch 'main' of https://github.com/TwilitRealm/dusk into randomizer 2026-05-05 02:40:56 -07:00
gymnast86 e8318e2eb3 switch fishing hole bottle to FLW message patch 2026-05-05 02:26:18 -07:00
gymnast86 f4992aa378 data cleanup 2026-05-05 02:08:51 -07:00
gymnast86 97388be8e5 Merge branch 'main' of https://github.com/TwilitRealm/dusk into randomizer 2026-05-04 23:58:32 -07:00
gymnast86 dbad1a4832 Merge branch 'main' of https://github.com/TwilitRealm/dusk into randomizer 2026-05-04 22:26:07 -07:00
gymnast86 40949474a1 wooden statue check 2026-05-04 22:23:30 -07:00
gymnast86 1166b58447 telma invoice check 2026-05-04 10:34:05 -07:00
gymnast86 2c7cfa8951 ilia reward and hdiden village checks 2026-05-04 08:37:46 -07:00
gymnast86 89621dbff5 allow swapping between different trade quest items 2026-05-04 06:47:09 -07:00
gymnast86 18f688e4b3 fix blank item slot 2026-05-04 06:14:04 -07:00
gymnast86 354d9b2fde Merge branch 'main' of https://github.com/TwilitRealm/dusk into randomizer 2026-05-03 18:53:42 -07:00
gymnast86 bc7faadc02 bulblin key 2026-05-03 18:52:59 -07:00
gymnast86 c265207c92 ball and chain check 2026-05-03 17:58:11 -07:00
gymnast86 05678f1ddc snowpeak mansion map check 2026-05-03 17:11:09 -07:00
gymnast86 cf015c4219 goron elder checks 2026-05-03 16:49:14 -07:00
gymnast86 a11427a48f dungeon reward and boss heart container checks 2026-05-03 16:06:45 -07:00
gymnast86 c87d7e3875 gale boomerang check 2026-05-03 06:56:57 -07:00
gymnast86 75f6337985 forest temple baba key 2026-05-03 06:28:57 -07:00
gymnast86 71f33021cc comment consistency 2026-05-03 05:57:56 -07:00
gymnast86 5b52f13f4b Merge branch 'main' of https://github.com/TwilitRealm/dusk into randomizer 2026-05-03 05:34:18 -07:00
gymnast86 0a8cbc8f08 cave of ordeals fairy check 2026-05-03 05:33:13 -07:00
gymnast86 28e907aafd bulblin camp checks 2026-05-03 04:31:39 -07:00
gymnast86 7018796b93 snowboard racing check 2026-05-03 03:13:15 -07:00
gymnast86 b28e21fa18 snowboarding rupees 2026-05-03 02:28:18 -07:00
gymnast86 afc53ce1b2 ashei sketch check 2026-05-03 01:25:29 -07:00
gymnast86 4b0564779f underwater goron check 2026-05-03 01:13:47 -07:00
gymnast86 dc5fd98cfd zoras domain rupee checks 2026-05-03 01:02:40 -07:00
gymnast86 e2c51ec45c Merge branch 'main' of https://github.com/TwilitRealm/dusk into randomizer 2026-05-02 07:45:21 -07:00
gymnast86 38640354b0 fix getting fishing hole HP with fishing rod 2026-05-02 07:44:59 -07:00
gymnast86 0393fdad6d fishing hole bottle check 2026-05-02 06:08:09 -07:00
gymnast86 5fc0340603 iza 1 and 2 checks 2026-05-01 19:33:59 -07:00
gymnast86 99652c01ed uzr rupee checks 2026-05-01 19:04:32 -07:00
gymnast86 580d50ab05 comment 2026-05-01 18:25:20 -07:00
gymnast86 cfa680f2d8 fruit balloon minigame check 2026-05-01 18:24:02 -07:00
gymnast86 e4e438e1ba lanayru spring rupee checks 2026-05-01 18:14:14 -07:00
gymnast86 4ec1a0e52c lake hylia rupees 2026-05-01 09:52:26 -07:00
gymnast86 f251a3497d bridge of hylia rupee checks 2026-05-01 08:20:18 -07:00
gymnast86 05734d9e93 Merge branch 'main' of https://github.com/TwilitRealm/dusk into randomizer 2026-05-01 05:52:41 -07:00
gymnast86 30e4291f14 malo mart magic armor check 2026-05-01 05:52:25 -07:00
gymnast86 88770b90ab STAR minigame checks 2026-05-01 05:39:32 -07:00
gymnast86 5a22ce6321 charlo donation check 2026-05-01 05:23:43 -07:00
gymnast86 62b30d2dad properly spawn jovani house poe 2026-05-01 01:11:31 -07:00
gymnast86 5a5004793a Jovani poe reward checks 2026-05-01 01:11:21 -07:00
gymnast86 d0cb0c001a outside castle town rupees 2026-05-01 00:26:18 -07:00
gymnast86 7a246941f8 fix bomb drops always being blue rupees 2026-04-30 23:01:27 -07:00
gymnast86 c3ad0abd37 lanayru field rupee checks 2026-04-30 22:55:57 -07:00
gymnast86 91d6ec1f26 Merge branch 'main' of https://github.com/TwilitRealm/dusk into randomizer 2026-04-30 21:26:12 -07:00
gymnast86 a863ea253e remove todo 2026-04-30 21:25:51 -07:00
gymnast86 f5789aaebd turn off gravity for zant and stallord hc actors 2026-04-30 21:25:45 -07:00
gymnast86 438fd2fe71 goron springwater check 2026-04-30 21:11:01 -07:00
gymnast86 040094115b move item override checks into param init block 2026-04-30 21:10:51 -07:00
gymnast86 d4bc2daa89 simplify chest and freestanding item lookups 2026-04-30 19:19:42 -07:00
gymnast86 622920d8c0 rutela and ralis checks 2026-04-30 04:39:41 -07:00
gymnast86 2b9dd50a8d fix forest temple compass item resource 2026-04-30 04:36:02 -07:00
gymnast86 ff44cdfd3c talo sharpshooting check 2026-04-30 03:20:44 -07:00
gymnast86 3b0cc4c712 Merge branch 'main' of https://github.com/TwilitRealm/dusk into randomizer 2026-04-30 01:20:30 -07:00
gymnast86 71d73a9db4 barnes bomb bag check 2026-04-30 01:19:59 -07:00
gymnast86 4ef7511336 Merge branch 'main' of https://github.com/TwilitRealm/dusk into randomizer 2026-04-29 16:15:48 -07:00
gymnast86 9b34fd8f8f implement kak malo mart shop checks 2026-04-29 16:15:29 -07:00
gymnast86 a5cc64c2fe Merge branch 'main' of https://github.com/TwilitRealm/dusk into randomizer 2026-04-28 14:45:45 -07:00
gymnast86 ce88c237a3 always make barne's shop available 2026-04-28 14:45:36 -07:00
gymnast86 cee8101b37 fix includes 2026-04-28 04:00:03 -07:00
gymnast86 409663711b Merge branch 'main' of https://github.com/TwilitRealm/dusk into randomizer 2026-04-28 03:56:05 -07:00
gymnast86 decf925e5d remove todo 2026-04-28 03:55:58 -07:00
gymnast86 cbead7bbb0 setup shop model overrides 2026-04-28 03:55:51 -07:00
gymnast86 05e5023354 implement eldin rupee checks 2026-04-28 03:02:59 -07:00
gymnast86 3126605cd6 coro boulder rupees 2026-04-28 00:14:29 -07:00
gymnast86 0b932c1993 fix conflict 2026-04-28 00:14:22 -07:00
gymnast86 5ed72f4af2 Merge branch 'main' of https://github.com/TwilitRealm/dusk into randomizer 2026-04-27 23:35:59 -07:00
gymnast86 1a3aac4d05 Merge branch 'main' of https://github.com/TwilitRealm/dusk into randomizer 2026-04-27 21:31:34 -07:00
gymnast86 573414dc83 fix old category name 2026-04-27 16:00:44 -07:00
gymnast86 7132655d42 Merge branch 'main' of https://github.com/TwilitRealm/dusk into randomizer 2026-04-27 15:57:37 -07:00
gymnast86 318bf293ca Merge branch 'main' of https://github.com/TwilitRealm/dusk into randomizer 2026-04-27 04:08:20 -07:00
gymnast86 3149f929c1 implement golden wolf checks 2026-04-27 04:05:36 -07:00
gymnast86 8acdbf03bf fix portal item ids 2026-04-27 03:52:48 -07:00
gymnast86 11a632511f fix wrong stage on chest near bulblin camp 2026-04-27 02:31:28 -07:00
gymnast86 33941d8ede update warp portal logic 2026-04-26 16:31:30 -07:00
gymnast86 01d217acb5 patch flight by fowl top chest to not always start closed 2026-04-26 04:12:09 -07:00
gymnast86 7c331fdb2c coro bottle check 2026-04-26 02:00:11 -07:00
gymnast86 f7d3cf32fd add red rupee behind canon 2026-04-26 01:59:57 -07:00
gymnast86 95ceb1241b Merge branch 'main' of https://github.com/TwilitRealm/dusk into randomizer 2026-04-26 01:05:35 -07:00
gymnast86 5c9ff2f5fa properly clear item queue on file load 2026-04-26 01:04:49 -07:00
gymnast86 6b5e251037 auru check 2026-04-26 01:04:24 -07:00
gymnast86 4905718024 Merge branch 'main' of https://github.com/TwilitRealm/dusk into randomizer 2026-04-25 21:48:11 -07:00
gymnast86 00929789a1 add master sword and shadow crystal checks 2026-04-25 21:43:59 -07:00
gymnast86 8e3306f87f add master sword actor to grove layer 2 2026-04-25 21:43:32 -07:00
gymnast86 8ea4b7747d update poe todos 2026-04-25 03:44:36 -07:00
gymnast86 02852eb586 fix pill bug categories 2026-04-25 03:41:59 -07:00
gymnast86 7d9d398844 fix actor patching on room load 2026-04-25 03:35:19 -07:00
gymnast86 dfe6d10c07 implement poe checks 2026-04-25 03:07:25 -07:00
gymnast86 80f4284e82 implement item queue 2026-04-25 03:07:07 -07:00
gymnast86 c7c9b664e8 sky character checks 2026-04-25 00:32:23 -07:00
gymnast86 e2de904f8a fix progressive dominion rod check 2026-04-25 00:18:34 -07:00
gymnast86 1f593812c8 cleanup 2026-04-24 23:41:20 -07:00
gymnast86 d3d0016d16 label locations which are still TODO 2026-04-24 23:05:53 -07:00
gymnast86 b7adbde0d5 Merge branch 'main' of https://github.com/TwilitRealm/dusk into randomizer 2026-04-24 22:42:18 -07:00
gymnast86 94bfb8c9e3 implement freestanding heart pieces 2026-04-24 22:42:12 -07:00
gymnast86 8949a3a8ee Merge branch 'main' of https://github.com/TwilitRealm/dusk into randomizer 2026-04-24 12:22:31 -07:00
gymnast86 80b0d11319 Merge branch 'main' of https://github.com/TwilitRealm/dusk into randomizer 2026-04-24 03:26:24 -07:00
gymnast86 49e8058f4e implement golden bugs 2026-04-24 03:25:33 -07:00
gymnast86 fccce91ea5 fix yaml field typo 2026-04-24 03:25:05 -07:00
gymnast86 8b117c8ed3 Merge branch 'main' of https://github.com/TwilitRealm/dusk into randomizer 2026-04-23 16:51:45 -07:00
gymnast86 e77fe61596 Merge branch 'main' of https://github.com/TwilitRealm/dusk into randomizer 2026-04-23 06:37:06 -07:00
gymnast86 0da8b4c6dc implement agitha rewards 2026-04-23 06:37:00 -07:00
gymnast86 726999c476 Merge branch 'main' of https://github.com/TwilitRealm/dusk into randomizer 2026-04-22 23:10:54 -07:00
gymnast86 f774cc689c Merge branch 'main' of https://github.com/TwilitRealm/dusk into randomizer 2026-04-22 16:58:05 -07:00
gymnast86 498db43c62 Merge branch 'main' of https://github.com/TwilitRealm/dusk into randomizer 2026-04-22 03:47:20 -07:00
gymnast86 89f1c6c71f ordon freestanding rupees 2026-04-22 03:47:14 -07:00
gymnast86 c801cb2a84 update randomizer_isActive() 2026-04-21 23:25:34 -07:00
gymnast86 f069be5789 herding goats reward check 2026-04-21 23:16:26 -07:00
gymnast86 b4722177ca Merge branch 'main' of https://github.com/TwilitRealm/dusk into randomizer 2026-04-21 22:38:37 -07:00
gymnast86 a36695a240 ordon shield check 2026-04-21 22:36:33 -07:00
gymnast86 148a3d23eb sera shop slingshot check 2026-04-21 22:05:38 -07:00
gymnast86 e7e5363c0c Merge branch 'main' of https://github.com/TwilitRealm/dusk into randomizer 2026-04-21 21:51:09 -07:00
gymnast86 93cc3bd2ce ordon cat rescue check 2026-04-21 21:51:01 -07:00
gymnast86 52a53b64dc Ordon Sword check 2026-04-21 21:05:23 -07:00
gymnast86 fa473d48a9 implement Uli Cradle Delivery check 2026-04-21 20:54:07 -07:00
gymnast86 8774cfa31b fix conflicts 2026-04-21 18:51:14 -07:00
gymnast86 8270ec3050 Merge branch 'main' of https://github.com/TwilitRealm/dusk into randomizer 2026-04-21 18:50:43 -07:00
gymnast86 6113df21e0 fix stuff relating to getting the Iron Boots chest 2026-04-21 18:47:04 -07:00
gymnast86 dbdb4daa58 isEventBit patches 2026-04-21 18:40:44 -07:00
gymnast86 dd04da230f add necessary settings to rando context 2026-04-21 01:32:08 -07:00
gymnast86 7606998ba6 Patch Jovani to only give 60 reward if 20 reward has been gotten. 2026-04-17 18:23:40 -07:00
gymnast86 0f0c10d26a Merge branch 'main' of https://github.com/TwilitRealm/dusk into randomizer 2026-04-17 18:02:14 -07:00
gymnast86 88dd4a2aae Patch bo to prevent softlock if chest doesn't contain iron boots 2026-04-17 14:44:39 -07:00
gymnast86 cc75af7cce Patch shadow beasts to set Iza flags even if they are defeated as wolf. 2026-04-17 14:36:43 -07:00
gymnast86 7520998aca Patch suits of armor to spawn regardless of boss flag value 2026-04-17 11:20:06 -07:00
gymnast86 ab28ae36e3 Merge branch 'main' of https://github.com/TwilitRealm/dusk into randomizer 2026-04-17 11:12:19 -07:00
gymnast86 88826bd5f8 Patch shad so he spawns until he gives the dominion rod check 2026-04-17 11:07:09 -07:00
gymnast86 39a9dd4029 Patch SPR locks to prevent softlock when opening them from behind. 2026-04-17 10:40:37 -07:00
gymnast86 23fe55fdca Add Yeta door patch for SPR 2026-04-17 09:27:23 -07:00
gymnast86 a31e388b3a Prevent game from removing bulblin camp key from inventory 2026-04-17 09:20:45 -07:00
gymnast86 3e241da2a4 patch Ilia 2026-04-17 09:11:03 -07:00
gymnast86 ce80d83c00 Patch Diababa and Ook to transform player if they are wolf to avoid softlocks 2026-04-17 09:06:32 -07:00
gymnast86 f62fb69a4d patch d_a_obj_life_container so only certain actors sparkle 2026-04-17 08:52:04 -07:00
gymnast86 782bf4e0b3 Patch Yeto and Yeta to not leave the dungeon even if the BK is obtained 2026-04-17 08:46:34 -07:00
gymnast86 727066e54e Merge branch 'main' of https://github.com/TwilitRealm/dusk into randomizer 2026-04-17 00:17:50 -07:00
gymnast86 f13ecbaec7 Merge branch 'main' of https://github.com/TwilitRealm/dusk into randomizer 2026-04-16 23:45:07 -07:00
gymnast86 be390c3645 fix item scaling mistake 2026-04-16 23:44:58 -07:00
gymnast86 fdfe379824 remove enhancements from randomizer settings list 2026-04-16 22:25:50 -07:00
gymnast86 da2cb85aa1 Merge branch 'main' of https://github.com/TwilitRealm/dusk into randomizer 2026-04-16 19:50:26 -07:00
gymnast86 2b4598821b add imgui menu for generating and selecting seeds 2026-04-16 19:50:17 -07:00
gymnast86 4cd911a114 restructure randomizer folder 2026-04-15 19:55:46 -07:00
gymnast86 5484cd69b5 Merge branch 'main' of https://github.com/TwilitRealm/dusk into randomizer 2026-04-15 19:20:50 -07:00
gymnast86 1ff9421cea set starting time of day 2026-04-15 19:20:44 -07:00
gymnast86 c0e83af35e fix patch being in wrong spot 2026-04-15 19:20:28 -07:00
gymnast86 2c6d0b11dd Add warp portals to item pool 2026-04-15 15:36:20 -07:00
gymnast86 bab1cda97a Merge branch 'main' of https://github.com/TwilitRealm/dusk into randomizer 2026-04-15 10:42:17 -07:00
gymnast86 da24b6a1e2 fix more startflags 2026-04-15 01:35:46 -07:00
gymnast86 2bb05b0248 Merge branch 'main' of https://github.com/TwilitRealm/dusk into randomizer 2026-04-15 00:05:53 -07:00
gymnast86 96d82c5fc2 add starting inventory to file 2026-04-15 00:02:44 -07:00
gymnast86 5175795814 Add patches for onDungeonItem 2026-04-14 18:58:46 -07:00
gymnast86 049758431c Patch isStageLife calls since we handle hearts differently. Also patch isDungeon item and item wheel amounts 2026-04-14 18:16:10 -07:00
gymnast86 762f103991 Patch setGetItemFace to add more items to expressions 2026-04-14 17:39:25 -07:00
gymnast86 66aeeb8857 Patch execItemGet and patch CoO fairy to give item no matter what 2026-04-14 17:34:07 -07:00
gymnast86 d3a9c52ec5 patch seLineUpItem to use all item slots 2026-04-14 17:21:34 -07:00
gymnast86 dea93938e6 Patch createInit to use custom item scale and prevent giving booomerang on room load 2026-04-14 17:12:11 -07:00
gymnast86 890a42b3ee patch checkFieldItemCreateHeap to properly create certain field models 2026-04-14 17:02:58 -07:00
gymnast86 38f591c521 Patch existing item_funcs 2026-04-14 16:59:35 -07:00
gymnast86 14ec080a23 Add custom item functions and check functions 2026-04-14 16:51:13 -07:00
gymnast86 48da572df0 Merge branch 'main' of https://github.com/TwilitRealm/dusk into randomizer 2026-04-14 15:27:08 -07:00
gymnast86 0cb77802be Merge branch 'main' of https://github.com/TwilitRealm/dusk into randomizer 2026-04-14 03:21:36 -07:00
gymnast86 dacfe11d95 Merge branch 'main' of https://github.com/TwilitRealm/dusk into randomizer 2026-04-14 03:17:46 -07:00
gymnast86 cc58b41901 Patch create functions to handle progressive items and special circumstances 2026-04-14 03:12:11 -07:00
gymnast86 04a2417f02 progressive item functions 2026-04-14 02:55:09 -07:00
gymnast86 9e74ffd9be Patch d_a_demo item to use special scales for defined items 2026-04-14 02:02:07 -07:00
gymnast86 dec4045e25 add rando item ids enum 2026-04-14 02:01:48 -07:00
gymnast86 4daf410cce throw error if generation fails 2026-04-14 02:01:40 -07:00
gymnast86 cf604b5fb0 tab 2026-04-14 01:32:56 -07:00
gymnast86 8738e5b122 update item resources, field resources, and info 2026-04-14 01:12:54 -07:00
gymnast86 38bea19a7b Merge branch 'main' of https://github.com/TwilitRealm/dusk into randomizer 2026-04-13 23:51:28 -07:00
gymnast86 bf70de83f1 add basic chest overrides 2026-04-13 23:51:10 -07:00
gymnast86 f478751080 add some location metadata 2026-04-13 23:50:57 -07:00
gymnast86 a18ce4e6dd add item ids 2026-04-13 23:50:42 -07:00
gymnast86 e77bc5c9e5 Merge branch 'main' of https://github.com/TwilitRealm/dusk into randomizer 2026-04-13 07:51:11 -07:00
gymnast86 7e39274da2 Merge branch 'main' of https://github.com/TwilitRealm/dusk into randomizer 2026-04-12 21:43:51 -07:00
gymnast86 4ad05a3445 Merge branch 'main' of https://github.com/TwilitRealm/dusk into randomizer 2026-04-11 23:01:58 -07:00
gymnast86 4e25db0f20 more clean up 2026-04-11 23:01:46 -07:00
gymnast86 98b492bd89 remove redundant specifiers 2026-04-11 20:21:59 -07:00
gymnast86 461d59984f update hyrule castle settings 2026-04-11 19:37:45 -07:00
gymnast86 796a67f207 Merge branch 'main' of https://github.com/TwilitRealm/dusk into randomizer 2026-04-11 13:27:33 -07:00
gymnast86 2d4247f10e fix starting with maps and compasses 2026-04-11 09:06:29 -07:00
gymnast86 d4028fefa8 fix ordon rupee logic 2026-04-11 09:05:00 -07:00
gymnast86 7e5726c255 add rupees to generator 2026-04-11 08:30:39 -07:00
gymnast86 1873330e61 Merge branch 'main' of https://github.com/TwilitRealm/dusk into randomizer 2026-04-11 00:29:48 -07:00
gymnast86 9c9316466b swap fill order of prologue and own dungeon items 2026-04-10 21:39:42 -07:00
gymnast86 123c809e14 hold Z to create randomizer save 2026-04-10 21:04:35 -07:00
gymnast86 8172e672de place goal locations items before prologue items 2026-04-10 20:57:23 -07:00
gymnast86 4d1771649a Merge branch 'main' of https://github.com/TwilitRealm/dusk into randomizer 2026-04-10 19:23:16 -07:00
gymnast86 c91925f243 Merge branch 'main' of https://github.com/TwilitRealm/dusk into randomizer 2026-04-10 17:21:35 -07:00
gymnast86 87116b871b add randomizer startflags 2026-04-10 17:20:34 -07:00
gymnast86 3547c57de0 Merge branch 'main' of https://github.com/TwilitRealm/dusk into randomizer 2026-04-09 22:34:10 -07:00
gymnast86 2d8a60aa75 Merge branch 'main' of https://github.com/TwilitRealm/dusk into randomizer 2026-04-09 19:03:01 -07:00
gymnast86 dd773bc261 properly set RANDOMIZER_ONLY 2026-04-09 19:02:55 -07:00
gymnast86 535c2f53c1 Merge branch 'main' of https://github.com/TwilitRealm/dusk into randomizer 2026-04-09 16:31:51 -07:00
gymnast86 c8cde246a9 add back SD only twilit insects 2026-04-09 16:31:44 -07:00
gymnast86 bc66d96d8b Merge branch 'main' of https://github.com/TwilitRealm/dusk into randomizer 2026-04-09 15:39:02 -07:00
gymnast86 6c55f42ce2 Wrap generator in Randomizer class 2026-04-09 15:38:56 -07:00
gymnast86 679044f33d Merge branch 'main' of https://github.com/TwilitRealm/dusk into randomizer 2026-04-09 12:27:13 -07:00
gymnast86 ac53fdbbff cmake cleanup 2026-04-09 12:27:05 -07:00
gymnast86 0b78547ba1 Merge branch 'main' of https://github.com/TwilitRealm/dusk into randomizer 2026-04-09 09:22:33 -07:00
gymnast86 0ebab8bad3 change how randomizer is included 2026-04-09 00:29:16 -07:00
gymnast86 ab7d3a5e03 change macro name 2026-04-09 00:28:52 -07:00
gymnast86 2f79bbe067 Merge branch 'main' of https://github.com/TwilitRealm/dusk into randomizer 2026-04-08 16:28:14 -07:00
gymnast86 b8b5b7197c Merge branch 'main' of https://github.com/TwilitRealm/dusk into randomizer 2026-04-08 16:11:17 -07:00
gymnast86 554a461c95 add entrance aliases 2026-04-08 16:11:11 -07:00
gymnast86 1efb6c4a80 change namespace to "randomizer" 2026-04-08 01:18:35 -07:00
gymnast86 377d6a0d25 Merge branch 'main' of https://github.com/TwilitRealm/dusk into randomizer 2026-04-08 00:35:08 -07:00
gymnast86 72bed7a1ba initial rando generator hookup 2026-04-08 00:35:02 -07:00
1420 changed files with 71244 additions and 29614 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
---
Language: Cpp
Standard: c++20
Standard: C++03
AccessModifierOffset: -4
AlignAfterOpenBracket: DontAlign
AlignConsecutiveAssignments: false
+1 -14
View File
@@ -80,7 +80,6 @@ jobs:
path: |
build/install/Dusklight-*.AppImage
build/install/debug.tar.*
build/install/sdk/
build-apple:
name: Build Apple (${{matrix.name}})
@@ -149,7 +148,6 @@ jobs:
path: |
build/install/Dusklight.app
build/install/debug.tar.*
build/install/sdk/
build-android:
name: Build Android (${{matrix.name}})
@@ -205,9 +203,6 @@ jobs:
- name: Build native library
run: cmake --build --preset ${{matrix.preset}} --target dusklight
- name: Build bundled mods
run: cmake --build --preset ${{matrix.preset}} --target dusklight_mods
- name: Stage stripped JNI library
run: ANDROID_STAGE_ABIS="${{matrix.abi}}" platforms/android/scripts/stage-jni-libs.sh
@@ -215,17 +210,11 @@ jobs:
working-directory: platforms/android
run: ./gradlew :app:assembleRelease --rerun-tasks
- name: Stage artifacts
run: |
mkdir -p upload/sdk
cp build/*/stub-android-*.so upload/sdk/
cp platforms/android/app/build/outputs/apk/release/app-${{matrix.abi}}-release-unsigned.apk upload/
- name: Upload artifacts
uses: actions/upload-artifact@v7
with:
name: dusklight-${{env.DUSK_VERSION}}-android-${{matrix.artifact_arch}}
path: upload/
path: platforms/android/app/build/outputs/apk/release/app-${{matrix.abi}}-release-unsigned.apk
build-windows:
name: Build Windows (${{matrix.name}})
@@ -291,6 +280,4 @@ jobs:
build/install/*.exe
build/install/*.dll
build/install/res/
build/install/mods/
build/install/debug.7z
build/install/sdk/
+160 -222
View File
@@ -5,8 +5,96 @@ if (NOT CMAKE_BUILD_TYPE)
"Build type options: Debug Release RelWithDebInfo MinSizeRel" FORCE)
endif ()
include(cmake/DetectVersion.cmake)
detect_version()
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_VERSION_CODE "1")
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
OUTPUT_VARIABLE dusk_git_head_filename
OUTPUT_STRIP_TRAILING_WHITESPACE)
set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS "${dusk_git_head_filename}")
execute_process(WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} COMMAND ${GIT_EXECUTABLE} rev-parse --symbolic-full-name HEAD
OUTPUT_VARIABLE dusk_git_head_symbolic
OUTPUT_STRIP_TRAILING_WHITESPACE)
execute_process(WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
COMMAND ${GIT_EXECUTABLE} rev-parse --git-path ${dusk_git_head_symbolic}
OUTPUT_VARIABLE dusk_git_head_symbolic_filename
OUTPUT_STRIP_TRAILING_WHITESPACE)
set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS "${dusk_git_head_symbolic_filename}")
# defines DUSK_WC_REVISION
execute_process(WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} COMMAND ${GIT_EXECUTABLE} rev-parse HEAD
OUTPUT_VARIABLE DUSK_WC_REVISION
OUTPUT_STRIP_TRAILING_WHITESPACE)
# defines DUSK_WC_DESCRIBE
execute_process(WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} COMMAND ${GIT_EXECUTABLE} describe --tags --long --dirty --match "v*"
OUTPUT_VARIABLE DUSK_WC_DESCRIBE
OUTPUT_STRIP_TRAILING_WHITESPACE)
# remove the git hash, then collapse a clean "-0" suffix only
string(REGEX REPLACE "-[^-]+(-dirty|)$" "\\1" DUSK_WC_DESCRIBE "${DUSK_WC_DESCRIBE}")
string(REGEX REPLACE "-0$" "" DUSK_WC_DESCRIBE "${DUSK_WC_DESCRIBE}")
# defines DUSK_WC_BRANCH
execute_process(WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} COMMAND ${GIT_EXECUTABLE} rev-parse --abbrev-ref HEAD
OUTPUT_VARIABLE DUSK_WC_BRANCH
OUTPUT_STRIP_TRAILING_WHITESPACE)
# defines DUSK_WC_DATE
execute_process(WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} COMMAND ${GIT_EXECUTABLE} log -1 --format=%ad
OUTPUT_VARIABLE DUSK_WC_DATE
OUTPUT_STRIP_TRAILING_WHITESPACE)
else ()
message(STATUS "Unable to find git, commit information will not be available")
endif ()
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(_ver_major ${CMAKE_MATCH_1})
set(_ver_minor ${CMAKE_MATCH_2})
set(_ver_patch ${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}")
if(DUSK_VERSION_TWEAK GREATER 999)
set(_tweak 999)
else()
set(_tweak ${DUSK_VERSION_TWEAK})
endif()
# encoding: major*1e7 + minor*1e5 + patch*1e3 + tweak; collision-free for major<210, minor<100, patch<100, tweak<=999
math(EXPR DUSK_VERSION_CODE
"${_ver_major} * 10000000 + ${_ver_minor} * 100000 + ${_ver_patch} * 1000 + ${_tweak}")
else ()
set(DUSK_WC_DESCRIBE "UNKNOWN-VERSION")
set(DUSK_VERSION_STRING "0.0.0.0")
set(DUSK_SHORT_VERSION_STRING "0.0.0")
set(DUSK_VERSION_CODE "1")
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")
file(APPEND "$ENV{GITHUB_ENV}" "DUSK_VERSION_CODE=${DUSK_VERSION_CODE}\n")
endif()
message(STATUS "Dusklight version set to ${DUSK_WC_DESCRIBE}")
message(STATUS "Build type: ${CMAKE_BUILD_TYPE}")
project(dusklight LANGUAGES C CXX VERSION ${DUSK_VERSION_STRING})
if (APPLE)
@@ -89,42 +177,12 @@ option(DUSK_ENABLE_UPDATE_CHECKER "Enable update checking support" ON)
option(DUSK_ENABLE_SENTRY_NATIVE "Enable sentry-native crash reporting support" OFF)
option(DUSK_PACKAGE_INSTALL "Install Dusklight with a Linux-native file structure" OFF)
option(DUSK_GFX_DEBUG_GROUPS "Report debug groups to the native graphics API" ${DUSK_GFX_DEBUG_GROUPS_DEFAULT})
option(DUSK_ENABLE_CODE_MODS "Enable code mods" OFF)
option(DUSK_ENABLE_OPUS "Enable loading Opus audio files for mods" ON)
set(DUSK_HAS_FUNCHOOK OFF)
if (DUSK_ENABLE_CODE_MODS AND (NOT APPLE OR CMAKE_SYSTEM_NAME STREQUAL "Darwin"))
set(DUSK_HAS_FUNCHOOK ON)
endif ()
set(DUSK_HAS_FUNCHOOK ${DUSK_HAS_FUNCHOOK} CACHE INTERNAL "Enable funchook" FORCE)
set(_target_architectures ${CMAKE_OSX_ARCHITECTURES})
if (NOT _target_architectures)
set(_target_architectures ${CMAKE_SYSTEM_PROCESSOR})
endif ()
list(LENGTH _target_architectures _target_arch_count)
set(DUSK_HAS_PREPATCH OFF)
if (DUSK_ENABLE_CODE_MODS AND APPLE AND _target_arch_count EQUAL 1)
list(GET _target_architectures 0 _target_arch)
if (_target_arch STREQUAL "arm64")
set(DUSK_HAS_PREPATCH ON)
endif ()
endif ()
set(DUSK_HAS_PREPATCH ${DUSK_HAS_PREPATCH} CACHE INTERNAL "Enable symgen prepatch support" FORCE)
if (DUSK_ENABLE_CODE_MODS AND CMAKE_SYSTEM_NAME MATCHES "^(iOS|tvOS)$")
list(LENGTH CMAKE_OSX_ARCHITECTURES _mobile_arch_count)
if (NOT _mobile_arch_count EQUAL 1 OR NOT CMAKE_OSX_ARCHITECTURES STREQUAL "arm64")
message(FATAL_ERROR
"iOS/tvOS code mods require a single arm64 architecture; got "
"CMAKE_OSX_ARCHITECTURES='${CMAKE_OSX_ARCHITECTURES}'")
endif ()
endif ()
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"
AND CMAKE_CXX_COMPILER_ID STREQUAL "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")
@@ -205,8 +263,8 @@ if (CMAKE_SYSTEM_NAME STREQUAL Linux)
set(CMAKE_BUILD_RPATH "$ORIGIN")
elseif (APPLE)
add_compile_options(-Wno-declaration-after-statement -Wno-non-pod-varargs)
set(CMAKE_INSTALL_RPATH "@loader_path")
set(CMAKE_BUILD_RPATH "@loader_path")
set(CMAKE_INSTALL_RPATH "$ORIGIN")
set(CMAKE_BUILD_RPATH "$ORIGIN")
elseif (MSVC)
add_compile_options(
$<$<COMPILE_LANGUAGE:C,CXX>:/bigobj>
@@ -241,66 +299,7 @@ FetchContent_Declare(json
URL_HASH SHA256=42f6e95cad6ec532fd372391373363b62a14af6d771056dbfc86160e6dfff7aa
DOWNLOAD_EXTRACT_TIMESTAMP FALSE
)
message(STATUS "dusklight: Fetching miniz")
FetchContent_Declare(miniz
URL https://github.com/richgel999/miniz/releases/download/3.0.2/miniz-3.0.2.zip
DOWNLOAD_EXTRACT_TIMESTAMP TRUE
EXCLUDE_FROM_ALL
)
set(_fetch_content_deps cxxopts json miniz)
if (DUSK_ENABLE_OPUS)
message(STATUS "dusklight: Fetching opusfile")
# Opusfile options
SET(OP_DISABLE_HTTP ON CACHE BOOL "" FORCE)
SET(OP_DISABLE_DOCS ON CACHE BOOL "" FORCE)
SET(OP_DISABLE_EXAMPLES ON CACHE BOOL "" FORCE)
message(STATUS "dusklight: Fetching opusfile")
FetchContent_Declare(
opusfile
GIT_REPOSITORY https://github.com/xiph/opusfile.git
GIT_TAG 6dfd29e7adb87f2e193575fc3fa88cbf1a0b27df
)
list(APPEND _fetch_content_deps opusfile)
endif ()
if (DUSK_HAS_FUNCHOOK)
message(STATUS "dusklight: Fetching funchook")
# cmake/PatchFunchook.cmake patches funchook's cmake/capstone.cmake.in to inject a
# PATCH_COMMAND into capstone's inner ExternalProject. That PATCH_COMMAND runs
# cmake/PatchCapstone.cmake after capstone is cloned, which removes the
# cmake_policy(SET CMP0048 OLD) line that CMake >= 3.27 rejects.
# This is incredibly scuffed and we should probably think of a better way to do this
set(CAPSTONE_FIX_SCRIPT "${CMAKE_CURRENT_SOURCE_DIR}/cmake/PatchCapstone.cmake")
FetchContent_Declare(funchook
GIT_REPOSITORY https://github.com/kubo/funchook.git
GIT_TAG v1.1.3
GIT_SHALLOW TRUE
GIT_PROGRESS TRUE
PATCH_COMMAND ${CMAKE_COMMAND} -DSOURCE_DIR=<SOURCE_DIR> -P ${CMAKE_CURRENT_SOURCE_DIR}/cmake/PatchFunchook.cmake
EXCLUDE_FROM_ALL
)
set(FUNCHOOK_BUILD_TESTS OFF CACHE BOOL "" FORCE)
set(FUNCHOOK_BUILD_SHARED OFF CACHE BOOL "" FORCE)
set(FUNCHOOK_INSTALL OFF CACHE BOOL "" FORCE)
if (APPLE AND CMAKE_OSX_ARCHITECTURES)
list(LENGTH CMAKE_OSX_ARCHITECTURES _osx_arch_count)
if (_osx_arch_count EQUAL 1)
list(GET CMAKE_OSX_ARCHITECTURES 0 _osx_arch)
if (_osx_arch MATCHES "^(arm64|aarch64|ARM64)$")
set(FUNCHOOK_CPU arm64 CACHE STRING "" FORCE)
elseif (_osx_arch MATCHES "^(x86_64|AMD64|amd64|i[3-6]86|x86)$")
set(FUNCHOOK_CPU x86 CACHE STRING "" FORCE)
endif ()
endif ()
endif ()
list(APPEND _fetch_content_deps funchook)
endif ()
FetchContent_MakeAvailable(${_fetch_content_deps})
FetchContent_MakeAvailable(cxxopts json)
if (DUSK_ENABLE_SENTRY_NATIVE)
message(STATUS "dusklight: Fetching sentry-native")
@@ -321,10 +320,10 @@ if (DUSK_ENABLE_SENTRY_NATIVE)
)
if (NOT sentry_native_POPULATED)
FetchContent_Populate(sentry_native)
set(_skip_install_rules ${CMAKE_SKIP_INSTALL_RULES})
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 ${_skip_install_rules})
set(CMAKE_SKIP_INSTALL_RULES ${_dusk_skip_install_rules})
endif ()
endif ()
@@ -334,7 +333,21 @@ if(_arch MATCHES "^(arm|aarch64)" AND CMAKE_CXX_COMPILER_FRONTEND_VARIANT STREQU
add_compile_options(-fsigned-char)
endif()
configure_version_header()
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)
@@ -350,20 +363,22 @@ set(DUSK_COPYRIGHT "Copyright (C) Twilit Realm contributors")
source_group("dolzel" FILES ${DOLZEL_FILES} ${Z2AUDIOLIB_FILES} ${REL_FILES})
source_group("dusklight" FILES ${DUSK_FILES} ${DUSK_HTTP_BACKEND_FILES})
include(cmake/GameABIConfig.cmake)
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/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_COMPILE_DEFS DUSK_BUILDING_GAME=1)
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 fmt::fmt
Threads::Threads zstd::libzstd dusklight_game_headers)
if (DUSK_HAS_FUNCHOOK)
list(APPEND GAME_LIBS funchook-static)
endif ()
if (DUSK_ENABLE_OPUS)
list(APPEND GAME_LIBS OpusFile::opusfile)
list(APPEND GAME_COMPILE_DEFS DUSK_OPUS=1)
endif ()
Threads::Threads zstd::libzstd)
if (DUSK_ENABLE_SENTRY_NATIVE)
list(APPEND GAME_LIBS sentry)
@@ -422,6 +437,8 @@ if (DUSK_MOVIE_SUPPORT)
list(APPEND GAME_COMPILE_DEFS MOVIE_SUPPORT=1)
endif ()
include(src/dusk/randomizer/randomizer.cmake)
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})
@@ -431,12 +448,9 @@ if (DUSK_ENABLE_DISCORD AND NOT ANDROID AND NOT IOS AND NOT TVOS)
list(APPEND GAME_COMPILE_DEFS DUSK_DISCORD=1)
endif ()
if (DUSK_ENABLE_CODE_MODS)
list(APPEND GAME_COMPILE_DEFS DUSK_CODE_MODS=1)
if(ANDROID)
list(APPEND GAME_COMPILE_DEFS TARGET_ANDROID=1)
endif ()
list(APPEND GAME_COMPILE_DEFS
DUSK_HAS_FUNCHOOK=$<BOOL:${DUSK_HAS_FUNCHOOK}>
DUSK_HAS_PREPATCH=$<BOOL:${DUSK_HAS_PREPATCH}>)
if (DUSK_PACKAGE_INSTALL)
include(GNUInstallDirs)
@@ -462,7 +476,7 @@ set(GAME_DEBUG_FILES
set_source_files_properties(
${GAME_DEBUG_FILES}
PROPERTIES
COMPILE_DEFINITIONS "$<$<CONFIG:Debug>:DEBUG=1>"
COMPILE_DEFINITIONS "$<$<CONFIG:Debug>:DEBUG=1>;$<$<CONFIG:Debug>:PARTIAL_DEBUG=1>"
)
# game_base is for all other game code files
@@ -476,11 +490,16 @@ set(GAME_BASE_FILES
set_source_files_properties(
${GAME_BASE_FILES}
PROPERTIES
COMPILE_DEFINITIONS "NDEBUG=1;NDEBUG_DEFINED=1;DEBUG_DEFINED=0"
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>)
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()
@@ -492,7 +511,7 @@ if (CMAKE_CXX_LINK_GROUP_USING_RESCAN_SUPPORTED OR CMAKE_LINK_GROUP_USING_RESCAN
set(JSYSTEM_LINK_LIBRARIES "$<LINK_GROUP:RESCAN,${JSYSTEM_LIBRARIES}>")
endif ()
set(DUSK_FILES src/dusk/main.cpp ${GAME_BASE_FILES} ${GAME_DEBUG_FILES} ${miniz_SOURCE_DIR}/miniz.c)
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)
@@ -503,69 +522,28 @@ if (ENABLE_ASAN)
target_sources(dusklight PRIVATE src/dusk/asan_options.c)
endif ()
# Add embedded data to target
file(GLOB_RECURSE RANDOMIZER_DATA "src/dusk/randomizer/generator/data/*")
file(GLOB_RECURSE RANDOMIZER_ASSETS "src/dusk/randomizer/assets/*")
list(APPEND RANDOMIZER_DATA ${RANDOMIZER_ASSETS})
set(RANDO_ROOT_DATA_DIR ${CMAKE_CURRENT_SOURCE_DIR})
foreach (RANDOMIZER_FILE IN LISTS RANDOMIZER_DATA)
file(RELATIVE_PATH REL_PATH ${RANDO_ROOT_DATA_DIR} ${RANDOMIZER_FILE})
if(REL_PATH MATCHES "^src/dusk/randomizer/generator/data/tests")
message(STATUS "Skipping Embed: ${REL_PATH}")
continue()
endif ()
message(STATUS "Embedding File: ${REL_PATH}")
b_embed(dusklight ${REL_PATH})
endforeach ()
target_compile_definitions(dusklight PRIVATE ${GAME_COMPILE_DEFS})
target_include_directories(dusklight PRIVATE ${miniz_SOURCE_DIR})
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 (DUSK_ENABLE_CODE_MODS)
include(cmake/SymbolManifest.cmake)
if (WIN32)
# Game ABI exports & import library for mod linking
include(cmake/WindowsExports.cmake)
setup_windows_exports(dusklight)
endif ()
# Post-link symbol manifest: hookable-surface name->address map keyed to the build.
setup_symbol_manifest(dusklight)
endif ()
# Hook reliability: guaranteed patchable entries on the game ABI surface, and no identical-code folding.
if (MSVC)
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
set(DUSK_PATCHABLE_ENTRY_FLAG $<$<COMPILE_LANGUAGE:C,CXX>:/hotpatch>)
endif ()
if (CMAKE_SYSTEM_PROCESSOR STREQUAL "ARM64")
target_link_options(dusklight PRIVATE /FUNCTIONPADMIN:16 /OPT:NOICF)
else ()
target_link_options(dusklight PRIVATE /FUNCTIONPADMIN /OPT:NOICF)
endif ()
elseif (CMAKE_CXX_COMPILER_ID MATCHES "^(AppleClang|Clang)$")
if (CMAKE_SYSTEM_PROCESSOR STREQUAL "arm64" OR CMAKE_OSX_ARCHITECTURES MATCHES "arm64")
set(DUSK_PATCHABLE_ENTRY_FLAG $<$<COMPILE_LANGUAGE:C,CXX>:-fpatchable-function-entry=2,1>)
else ()
set(DUSK_PATCHABLE_ENTRY_FLAG $<$<COMPILE_LANGUAGE:C,CXX>:-fpatchable-function-entry=10,5>)
endif ()
endif ()
if (DEFINED DUSK_PATCHABLE_ENTRY_FLAG)
target_compile_options(dusklight PRIVATE ${DUSK_PATCHABLE_ENTRY_FLAG})
foreach(jsystem_lib IN LISTS JSYSTEM_LIBRARIES)
target_compile_options(${jsystem_lib} PRIVATE ${DUSK_PATCHABLE_ENTRY_FLAG})
endforeach()
foreach(_sdk_lib aurora_card aurora_core aurora_dvd aurora_gd aurora_gx aurora_mtx
aurora_os aurora_pad aurora_si aurora_vi)
if (TARGET ${_sdk_lib})
get_target_property(_sdk_lib_imported ${_sdk_lib} IMPORTED)
if (NOT _sdk_lib_imported)
target_compile_options(${_sdk_lib} PRIVATE ${DUSK_PATCHABLE_ENTRY_FLAG})
endif ()
endif ()
endforeach ()
endif ()
if (WIN32)
target_link_libraries(dusklight PRIVATE Psapi)
endif ()
if (APPLE)
include(cmake/AppleExports.cmake)
setup_apple_exports(dusklight)
elseif (ANDROID)
include(cmake/AndroidExports.cmake)
setup_android_exports(dusklight)
elseif (UNIX)
target_link_options(dusklight PRIVATE -rdynamic)
endif ()
if (TARGET crashpad_handler)
add_dependencies(dusklight crashpad_handler)
add_custom_command(TARGET dusklight POST_BUILD
@@ -584,9 +562,6 @@ endif ()
if (CMAKE_SYSTEM_NAME STREQUAL Linux)
target_link_options(dusklight PRIVATE "-Wl,--build-id=sha1")
target_link_libraries(dusklight PRIVATE dl)
elseif (ANDROID)
target_link_options(dusklight PRIVATE "-Wl,--build-id=sha1")
endif ()
if (NOT APPLE)
@@ -627,16 +602,6 @@ if (WIN32)
endif ()
endif ()
include(cmake/ModSDK.cmake)
if (DUSK_ENABLE_CODE_MODS AND CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
add_custom_target(dusklight_mods) # Aggregate target for all in-tree mods
add_subdirectory(mods/template_mod)
add_subdirectory(mods/ao_mod)
add_subdirectory(mods/shadow_mod)
add_subdirectory(mods/audio_mod)
endif ()
if (APPLE)
if (IOS)
set(DUSK_RESOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/platforms/ios)
@@ -644,7 +609,6 @@ if (APPLE)
set(DUSK_RESOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/platforms/tvos)
else ()
set(DUSK_RESOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/platforms/macos)
set(DUSK_ENTITLEMENTS ${DUSK_RESOURCE_DIR}/Dusklight.entitlements)
endif ()
set(DUSK_INFO_PLIST ${DUSK_RESOURCE_DIR}/Info.plist.in)
file(GLOB_RECURSE DUSK_RESOURCE_FILES
@@ -664,7 +628,8 @@ if (APPLE)
get_filename_component(NEW_FILE_PATH ${NEW_FILE} DIRECTORY)
set_property(SOURCE ${FILE} PROPERTY MACOSX_PACKAGE_LOCATION "Resources/${NEW_FILE_PATH}")
endforeach ()
set(_apple_bundle_properties
set_target_properties(
dusklight PROPERTIES
MACOSX_BUNDLE TRUE
MACOSX_BUNDLE_BUNDLE_NAME ${DUSK_BUNDLE_NAME}
MACOSX_BUNDLE_GUI_IDENTIFIER ${DUSK_BUNDLE_IDENTIFIER}
@@ -675,34 +640,9 @@ if (APPLE)
XCODE_ATTRIBUTE_CODE_SIGNING_ALLOWED "YES"
XCODE_ATTRIBUTE_CODE_SIGNING_REQUIRED "YES"
)
if (DUSK_ENTITLEMENTS)
list(APPEND _apple_bundle_properties
XCODE_ATTRIBUTE_CODE_SIGN_ENTITLEMENTS ${DUSK_ENTITLEMENTS})
endif ()
if (CMAKE_SYSTEM_NAME STREQUAL "Darwin")
list(APPEND _apple_bundle_properties
XCODE_ATTRIBUTE_ENABLE_HARDENED_RUNTIME "YES")
endif ()
set_target_properties(dusklight PROPERTIES ${_apple_bundle_properties})
if (CMAKE_SYSTEM_NAME STREQUAL "Darwin" AND NOT "${CMAKE_GENERATOR}" STREQUAL "Xcode")
set(_sign_nested_commands)
if (TARGET crashpad_handler)
list(APPEND _sign_nested_commands
COMMAND /usr/bin/codesign --force --sign -
"$<TARGET_FILE_DIR:dusklight>/crashpad_handler")
endif ()
add_custom_command(TARGET dusklight POST_BUILD
${_sign_nested_commands}
COMMAND /usr/bin/codesign --force --sign - --entitlements
"${DUSK_ENTITLEMENTS}" "$<TARGET_BUNDLE_DIR:dusklight>"
COMMENT "Signing Dusklight.app with entitlements"
VERBATIM
)
endif ()
endif ()
if (CMAKE_SYSTEM_NAME STREQUAL "Darwin")
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)
@@ -823,5 +763,3 @@ foreach (target IN LISTS BINARY_TARGETS)
endif ()
endforeach ()
endforeach ()
install_bundled_mods()
+23 -38
View File
@@ -22,6 +22,18 @@
"CMAKE_MSVC_RUNTIME_LIBRARY": "MultiThreadedDLL"
}
},
{
"name": "release",
"hidden": true,
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Release",
"CMAKE_MSVC_RUNTIME_LIBRARY": "MultiThreadedDLL",
"CMAKE_INTERPROCEDURAL_OPTIMIZATION": {
"type": "BOOL",
"value": true
}
}
},
{
"name": "ci",
"hidden": true,
@@ -60,11 +72,7 @@
"type": "BOOL",
"value": false
},
"CMAKE_INSTALL_PREFIX": "${sourceDir}/build/install",
"DUSK_ENABLE_CODE_MODS": {
"type": "BOOL",
"value": true
}
"CMAKE_INSTALL_PREFIX": "${sourceDir}/build/install"
},
"vendor": {
"microsoft.com/VisualStudioSettings/CMake/1.0": {
@@ -151,10 +159,6 @@
"CMAKE_C_COMPILER": "cl",
"CMAKE_CXX_COMPILER": "cl",
"CMAKE_INSTALL_PREFIX": "${sourceDir}/build/install",
"DUSK_ENABLE_CODE_MODS": {
"type": "BOOL",
"value": true
},
"CMAKE_DISABLE_FIND_PACKAGE_PkgConfig": {
"type": "BOOL",
"value": true
@@ -196,13 +200,17 @@
{
"name": "windows-arm64-msvc",
"displayName": "Windows ARM64 (MSVC)",
"inherits": [
"windows-msvc"
],
"generator": "Ninja",
"binaryDir": "${sourceDir}/build/${presetName}",
"architecture": {
"value": "arm64",
"strategy": "external"
},
"cacheVariables": {
"CMAKE_C_COMPILER": "cl",
"CMAKE_CXX_COMPILER": "cl",
"CMAKE_INSTALL_PREFIX": "${sourceDir}/build/install"
},
"vendor": {
"microsoft.com/VisualStudioSettings/CMake/1.0": {
"hostOS": [
@@ -254,11 +262,7 @@
"type": "BOOL",
"value": false
},
"CMAKE_INSTALL_PREFIX": "${sourceDir}/build/install",
"DUSK_ENABLE_CODE_MODS": {
"type": "BOOL",
"value": true
}
"CMAKE_INSTALL_PREFIX": "${sourceDir}/build/install"
},
"vendor": {
"microsoft.com/VisualStudioSettings/CMake/1.0": {
@@ -314,19 +318,11 @@
"type": "BOOL",
"value": false
},
"ENABLE_VISIBILITY": {
"type": "BOOL",
"value": true
},
"Rust_CARGO_TARGET": "aarch64-apple-ios",
"BUILD_SHARED_LIBS": {
"type": "BOOL",
"value": false
},
"DUSK_ENABLE_CODE_MODS": {
"type": "BOOL",
"value": true
},
"CMAKE_DISABLE_FIND_PACKAGE_PkgConfig": {
"type": "BOOL",
"value": true
@@ -362,20 +358,12 @@
"type": "BOOL",
"value": false
},
"ENABLE_VISIBILITY": {
"type": "BOOL",
"value": true
},
"Rust_CARGO_TARGET": "aarch64-apple-tvos",
"Rust_TOOLCHAIN": "nightly",
"BUILD_SHARED_LIBS": {
"type": "BOOL",
"value": false
},
"DUSK_ENABLE_CODE_MODS": {
"type": "BOOL",
"value": true
},
"CMAKE_DISABLE_FIND_PACKAGE_PkgConfig": {
"type": "BOOL",
"value": true
@@ -406,10 +394,6 @@
"type": "BOOL",
"value": false
},
"DUSK_ENABLE_CODE_MODS": {
"type": "BOOL",
"value": true
},
"CMAKE_DISABLE_FIND_PACKAGE_PkgConfig": {
"type": "BOOL",
"value": true
@@ -445,7 +429,8 @@
"hidden": true,
"inherits": [
"android-base",
"ci"
"ci",
"release"
],
"cacheVariables": {
"DUSK_ENABLE_SENTRY_NATIVE": {
+1 -1
View File
@@ -26,7 +26,7 @@ It aims to be as accurate as possible to the original while also providing new o
You must dump your own copy of the game. Please see [this article](https://wiki.dolphin-emu.org/index.php?title=Ripping_Games) for instructions. After dumping, you can use a program like [Dolphin](https://dolphin-emu.org/) or [nodtool](https://github.com/encounter/nod/releases) to convert the `.iso` to `.rvz` to save space.
Currently, only the GameCube releases are supported. Support for other versions of the game is planned in the future.
Currently, only the GameCube USA and EUR releases are supported. Support for other versions of the game is planned in the future.
### 2. Install Dusklight
-63
View File
@@ -1,63 +0,0 @@
include_guard(GLOBAL)
get_filename_component(_dir "${CMAKE_CURRENT_LIST_FILE}" DIRECTORY)
# Android mod linking: symgen scans and filters the game's exports, generating a version script used for the executable
# link step, and generates a shared object stub that mods can link against without having to build the whole game.
function(setup_android_exports target)
include("${_dir}/SymbolManifest.cmake")
ensure_symgen(TRUE)
add_dependencies(${target} symgen)
set(_rsp_lines "$<TARGET_OBJECTS:${target}>")
foreach (_lib IN LISTS JSYSTEM_LIBRARIES)
list(APPEND _rsp_lines "$<TARGET_FILE:${_lib}>")
endforeach ()
list(JOIN _rsp_lines "\n" _rsp_content)
set(_rsp "${CMAKE_BINARY_DIR}/dusklight_exports_input.rsp")
file(GENERATE OUTPUT "${_rsp}" CONTENT "${_rsp_content}")
set(_sdk_args)
foreach (_lib aurora_card aurora_core aurora_dvd aurora_gd aurora_gx aurora_mtx
aurora_os aurora_pad aurora_si aurora_vi)
if (TARGET ${_lib})
list(APPEND _sdk_args --sdk-lib "$<TARGET_FILE:${_lib}>")
endif ()
endforeach ()
if (TARGET dawn::webgpu_dawn)
get_target_property(_dawn_type dawn::webgpu_dawn TYPE)
if (_dawn_type STREQUAL "STATIC_LIBRARY")
list(APPEND _sdk_args --sdk-lib "$<TARGET_FILE:dawn::webgpu_dawn>")
endif ()
endif ()
set(_vscript "${CMAKE_BINARY_DIR}/dusklight_exports.ver")
add_custom_command(TARGET ${target} PRE_LINK
COMMAND "${SYMGEN_EXE}" exports
"@${_rsp}"
--out "${_vscript}"
--format version-script
--exclude cmake_pch
--exclude miniz
--exclude asan_options
--exclude src/dusk
# Resolved from the Java side; the SDL ones live in the statically-linked
# SDL archive, outside the provenance scan.
--extra-sym JNI_OnLoad
--extra-sym SDL_main
--extra-sym "Java_*"
${_sdk_args}
COMMENT "Generating dusklight exports"
VERBATIM)
target_link_options(${target} PRIVATE "-Wl,--version-script=${_vscript}")
string(TOLOWER "${CMAKE_SYSTEM_PROCESSOR}" _arch)
set(_stub "${CMAKE_BINARY_DIR}/stub-android-${_arch}.so")
add_custom_command(TARGET ${target} POST_BUILD
COMMAND "${SYMGEN_EXE}" stub -f elf "$<TARGET_FILE:${target}>" -o "${_stub}"
--soname "$<TARGET_FILE_NAME:${target}>" --arch "${_arch}"
BYPRODUCTS "${_stub}"
COMMENT "Generating dusklight link stub"
VERBATIM)
install(FILES "${_stub}" DESTINATION sdk)
endfunction()
-90
View File
@@ -1,90 +0,0 @@
include_guard(GLOBAL)
get_filename_component(_dir "${CMAKE_CURRENT_LIST_FILE}" DIRECTORY)
# Apple mod linking: symgen scans and filters the game's exports, generating an exports list used for the executable
# link step, and generates a MH_EXECUTE Mach-O stub that mods can link against without having to build the whole game.
function(setup_apple_exports target)
include("${_dir}/SymbolManifest.cmake")
ensure_symgen(TRUE)
set(_symgen "${SYMGEN_EXE}")
add_dependencies(${target} symgen)
set(_config_subdir "")
if (CMAKE_CONFIGURATION_TYPES)
set(_config_subdir "$<CONFIG>/")
endif ()
set(_rsp_lines "$<TARGET_OBJECTS:${target}>")
foreach (_lib IN LISTS JSYSTEM_LIBRARIES)
list(APPEND _rsp_lines "$<TARGET_FILE:${_lib}>")
endforeach ()
list(JOIN _rsp_lines "\n" _rsp_content)
set(_rsp "${CMAKE_BINARY_DIR}/${_config_subdir}dusklight_exports_input.rsp")
file(GENERATE OUTPUT "${_rsp}" CONTENT "${_rsp_content}")
set(_sdk_args)
foreach (_lib aurora_card aurora_core aurora_dvd aurora_gd aurora_gx aurora_mtx
aurora_os aurora_pad aurora_si aurora_vi)
if (TARGET ${_lib})
list(APPEND _sdk_args --sdk-lib "$<TARGET_FILE:${_lib}>")
endif ()
endforeach ()
# Dawn is linked statically on Apple; mods reach wgpu* through the executable.
if (TARGET dawn::webgpu_dawn)
get_target_property(_dawn_type dawn::webgpu_dawn TYPE)
if (_dawn_type STREQUAL "STATIC_LIBRARY")
list(APPEND _sdk_args --sdk-lib "$<TARGET_FILE:dawn::webgpu_dawn>")
endif ()
endif ()
set(_exp "${CMAKE_BINARY_DIR}/${_config_subdir}dusklight_exports.exp")
add_custom_command(TARGET ${target} PRE_LINK
COMMAND "${_symgen}" exports
"@${_rsp}"
--out "${_exp}"
--exclude cmake_pch
--exclude miniz
--exclude asan_options
--exclude src/dusk
${_sdk_args}
COMMENT "Generating dusklight exports"
VERBATIM)
target_link_options(${target} PRIVATE -Xlinker -exported_symbols_list -Xlinker "${_exp}")
# Generate the stub executable mods link against via -bundle_loader.
set(_stub_args)
if (IOS)
set(_stub_platform "ios")
list(APPEND _stub_args --platform ios)
elseif (TVOS)
set(_stub_platform "tvos")
list(APPEND _stub_args --platform tvos)
else ()
set(_stub_platform "macos")
endif ()
if (CMAKE_OSX_DEPLOYMENT_TARGET)
list(APPEND _stub_args --min-os "${CMAKE_OSX_DEPLOYMENT_TARGET}")
endif ()
if (CMAKE_OSX_ARCHITECTURES)
set(_archs "${CMAKE_OSX_ARCHITECTURES}")
else ()
set(_archs "${CMAKE_SYSTEM_PROCESSOR}")
endif ()
set(_arch_names "")
foreach (_arch IN LISTS _archs)
string(TOLOWER "${_arch}" _arch)
list(APPEND _stub_args --arch "${_arch}")
list(APPEND _arch_names "${_arch}")
endforeach ()
list(JOIN _arch_names "_" _arch_name)
set(_stub "${CMAKE_BINARY_DIR}/${_config_subdir}dusklight-stub")
add_custom_command(TARGET ${target} POST_BUILD
COMMAND "${_symgen}" stub -f macho "${_exp}" -o "${_stub}" ${_stub_args}
BYPRODUCTS "${_stub}"
COMMENT "Generating dusklight link stub"
VERBATIM)
install(FILES "${_stub}" DESTINATION sdk RENAME "stub-${_stub_platform}-${_arch_name}")
endfunction()
-10
View File
@@ -1,10 +0,0 @@
# Copies a mod asset directory for packaging, skipping dotfiles and dot-directories
# (.gitkeep, .DS_Store, ...). Usage: cmake -DSRC=<dir> -DDST=<dir> -P CopyModAssets.cmake
file(MAKE_DIRECTORY "${DST}")
file(GLOB_RECURSE _files RELATIVE "${SRC}" "${SRC}/*")
foreach (_file IN LISTS _files)
if (NOT _file MATCHES "(^|/)\\.")
get_filename_component(_dir "${_file}" DIRECTORY)
file(COPY "${SRC}/${_file}" DESTINATION "${DST}/${_dir}")
endif ()
endforeach ()
-121
View File
@@ -1,121 +0,0 @@
# Version detection shared by the main build and the mod SDK (sdk/CMakeLists.txt)
include_guard(GLOBAL)
get_filename_component(_DUSK_VERSION_ROOT "${CMAKE_CURRENT_LIST_DIR}/.." ABSOLUTE)
set(DUSK_SENTRY_DSN "" CACHE STRING "Sentry DSN")
set(DUSK_SENTRY_ENVIRONMENT "development" CACHE STRING "Sentry environment")
set(DUSK_VERSION_OVERRIDE "" CACHE STRING "Override version string (skips git detection and format validation)")
macro(detect_version)
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_VERSION_CODE "1")
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 ${_DUSK_VERSION_ROOT} COMMAND ${GIT_EXECUTABLE} rev-parse --git-path HEAD
OUTPUT_VARIABLE dusk_git_head_filename
OUTPUT_STRIP_TRAILING_WHITESPACE)
get_filename_component(dusk_git_head_filename "${dusk_git_head_filename}" ABSOLUTE BASE_DIR "${_DUSK_VERSION_ROOT}")
set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS "${dusk_git_head_filename}")
execute_process(WORKING_DIRECTORY ${_DUSK_VERSION_ROOT} COMMAND ${GIT_EXECUTABLE} rev-parse --symbolic-full-name HEAD
OUTPUT_VARIABLE dusk_git_head_symbolic
OUTPUT_STRIP_TRAILING_WHITESPACE)
execute_process(WORKING_DIRECTORY ${_DUSK_VERSION_ROOT}
COMMAND ${GIT_EXECUTABLE} rev-parse --git-path ${dusk_git_head_symbolic}
OUTPUT_VARIABLE dusk_git_head_symbolic_filename
OUTPUT_STRIP_TRAILING_WHITESPACE)
get_filename_component(dusk_git_head_symbolic_filename "${dusk_git_head_symbolic_filename}" ABSOLUTE BASE_DIR "${_DUSK_VERSION_ROOT}")
set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS "${dusk_git_head_symbolic_filename}")
# defines DUSK_WC_REVISION
execute_process(WORKING_DIRECTORY ${_DUSK_VERSION_ROOT} COMMAND ${GIT_EXECUTABLE} rev-parse HEAD
OUTPUT_VARIABLE DUSK_WC_REVISION
OUTPUT_STRIP_TRAILING_WHITESPACE)
# defines DUSK_WC_DESCRIBE
execute_process(WORKING_DIRECTORY ${_DUSK_VERSION_ROOT} COMMAND ${GIT_EXECUTABLE} describe --tags --long --dirty --match "v*"
OUTPUT_VARIABLE DUSK_WC_DESCRIBE
OUTPUT_STRIP_TRAILING_WHITESPACE)
# remove the git hash, then collapse a clean "-0" suffix only
string(REGEX REPLACE "-[^-]+(-dirty|)$" "\\1" DUSK_WC_DESCRIBE "${DUSK_WC_DESCRIBE}")
string(REGEX REPLACE "-0$" "" DUSK_WC_DESCRIBE "${DUSK_WC_DESCRIBE}")
# defines DUSK_WC_BRANCH
execute_process(WORKING_DIRECTORY ${_DUSK_VERSION_ROOT} COMMAND ${GIT_EXECUTABLE} rev-parse --abbrev-ref HEAD
OUTPUT_VARIABLE DUSK_WC_BRANCH
OUTPUT_STRIP_TRAILING_WHITESPACE)
# defines DUSK_WC_DATE
execute_process(WORKING_DIRECTORY ${_DUSK_VERSION_ROOT} COMMAND ${GIT_EXECUTABLE} log -1 --format=%ad
OUTPUT_VARIABLE DUSK_WC_DATE
OUTPUT_STRIP_TRAILING_WHITESPACE)
else ()
message(STATUS "Unable to find git, commit information will not be available")
endif ()
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(_ver_major ${CMAKE_MATCH_1})
set(_ver_minor ${CMAKE_MATCH_2})
set(_ver_patch ${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}")
if (DUSK_VERSION_TWEAK GREATER 999)
set(_tweak 999)
else ()
set(_tweak ${DUSK_VERSION_TWEAK})
endif ()
# encoding: major*1e7 + minor*1e5 + patch*1e3 + tweak; collision-free for major<210, minor<100, patch<100, tweak<=999
math(EXPR DUSK_VERSION_CODE
"${_ver_major} * 10000000 + ${_ver_minor} * 100000 + ${_ver_patch} * 1000 + ${_tweak}")
else ()
set(DUSK_WC_DESCRIBE "UNKNOWN-VERSION")
set(DUSK_VERSION_STRING "0.0.0.0")
set(DUSK_SHORT_VERSION_STRING "0.0.0")
set(DUSK_VERSION_CODE "1")
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")
file(APPEND "$ENV{GITHUB_ENV}" "DUSK_VERSION_CODE=${DUSK_VERSION_CODE}\n")
endif ()
message(STATUS "Dusklight version set to ${DUSK_WC_DESCRIBE}")
endmacro()
# Sets PLATFORM_NAME and configures version.h into the caller's binary dir.
macro(configure_version_header)
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(${_DUSK_VERSION_ROOT}/version.h.in ${CMAKE_CURRENT_BINARY_DIR}/version.h)
endmacro()
-64
View File
@@ -1,64 +0,0 @@
# The game ABI surface shared by the main build and the mod SDK (sdk/CMakeLists.txt)
include_guard(GLOBAL)
get_filename_component(_game_root "${CMAKE_CURRENT_LIST_DIR}/.." ABSOLUTE)
# PARTIAL_DEBUG makes debug and release share one struct/vtable ABI so a mod binary loads into either
set(_game_compile_defs TARGET_PC=1 WIDESCREEN_SUPPORT=1 AVOID_UB=1 VERSION=0 MTX_USE_PS=1 PARTIAL_DEBUG=1)
if (ANDROID)
list(APPEND _game_compile_defs TARGET_ANDROID=1)
endif ()
# Public game headers
set(_game_abi_include_dirs
${_game_root}/include
${_game_root}/assets/GZ2E01
${_game_root}/libs/JSystem/include
${_game_root}/extern/aurora/include/dolphin
${_game_root}/extern/aurora/include
${_game_root}/sdk/include
)
# Internal game headers
set(_game_include_dirs
${_game_abi_include_dirs}
${_game_root}/src
${_game_root}/extern
${CMAKE_CURRENT_BINARY_DIR}
)
# Mod API, including services
add_library(dusklight_mod_api INTERFACE)
target_include_directories(dusklight_mod_api INTERFACE ${_game_root}/sdk/include)
# Full internal headers used to build the game
add_library(dusklight_game_headers INTERFACE)
target_include_directories(dusklight_game_headers INTERFACE ${_game_include_dirs})
target_compile_definitions(dusklight_game_headers INTERFACE ${_game_compile_defs})
# Public game ABI for mods
add_library(dusklight_game_abi_headers INTERFACE)
target_include_directories(dusklight_game_abi_headers INTERFACE ${_game_abi_include_dirs})
target_compile_definitions(dusklight_game_abi_headers INTERFACE ${_game_compile_defs})
# Mod feature targets
add_library(dusklight_mod_feature_game INTERFACE)
target_link_libraries(dusklight_mod_feature_game INTERFACE
dusklight_mod_api
dusklight_game_abi_headers)
target_compile_definitions(dusklight_mod_feature_game INTERFACE DUSK_MOD_FEATURE_GAME=1)
# Game headers assume global.h comes first in the translation unit (it defines DUSK_GAME_DATA
# and friends); force-include it so mods don't depend on include order.
if (CMAKE_CXX_COMPILER_FRONTEND_VARIANT STREQUAL "MSVC")
target_compile_options(dusklight_mod_feature_game INTERFACE
"$<$<COMPILE_LANGUAGE:CXX>:/FIglobal.h>")
else ()
target_compile_options(dusklight_mod_feature_game INTERFACE
"$<$<COMPILE_LANGUAGE:CXX>:SHELL:-include global.h>")
endif ()
target_sources(dusklight_mod_feature_game INTERFACE
${_game_root}/sdk/src/game_feature.cpp)
add_library(dusklight_mod_feature_webgpu INTERFACE)
target_link_libraries(dusklight_mod_feature_webgpu INTERFACE dusklight_mod_api)
target_compile_definitions(dusklight_mod_feature_webgpu INTERFACE DUSK_MOD_FEATURE_WEBGPU=1)
-492
View File
@@ -1,492 +0,0 @@
# add_mod(<target> [FEATURES <feature>...] SOURCES <file>... MOD_JSON <mod.json>
# [RUNTIME_LIBRARIES <file>...] [RES_DIR <res>] [OVERLAY_DIR <overlay>]
# [TEXTURES_DIR <textures>] [OUTPUT_DIR <dir>] [BUNDLE])
set(DUSK_MODS_OUTPUT_DIR "${CMAKE_BINARY_DIR}/mods" CACHE PATH "Directory to write mod packages into")
set(DUSKLIGHT_SDK_STUB_URL "https://github.com/encounter/dusklight/releases/download/sdk"
CACHE STRING "Base URL for game link stubs downloaded by out-of-tree mod builds")
function(_mod_lib_info out_platform_var out_name_var)
set(_arch "${CMAKE_SYSTEM_PROCESSOR}")
if (APPLE AND CMAKE_OSX_ARCHITECTURES)
list(LENGTH CMAKE_OSX_ARCHITECTURES _count)
if (_count GREATER 1)
message(FATAL_ERROR "add_mod: universal binaries are not supported")
endif ()
set(_arch "${CMAKE_OSX_ARCHITECTURES}")
elseif (WIN32)
set(_arch_id "${CMAKE_CXX_COMPILER_ARCHITECTURE_ID}")
if (NOT _arch_id)
set(_arch_id "${CMAKE_C_COMPILER_ARCHITECTURE_ID}")
endif ()
if (_arch_id MATCHES "^ARM64(EC)?$")
set(_arch "arm64")
elseif (_arch_id STREQUAL "x64")
set(_arch "amd64")
elseif (_arch_id STREQUAL "X86")
set(_arch "x86")
endif ()
endif ()
string(TOLOWER "${CMAKE_SYSTEM_NAME}" _platform)
if (_platform STREQUAL "darwin")
set(_platform "macos")
endif ()
string(TOLOWER "${_arch}" _arch)
if (_arch MATCHES "^(i[3-6]86|x86)$")
set(_arch "x86")
endif ()
if (WIN32)
set(_ext ".dll")
else ()
set(_ext ".so")
endif ()
set(${out_platform_var} "${_platform}-${_arch}" PARENT_SCOPE)
set(${out_name_var} "mod${_ext}" PARENT_SCOPE)
endfunction()
# For out-of-tree builds without a game binary: download the version-independent link stub
# (generated by symgen) for the target platform.
function(_mod_download_link_stub out_var)
_mod_lib_info(_platform _lib_name)
if (WIN32)
set(_asset "${_platform}.lib")
elseif (ANDROID)
set(_asset "stub-${_platform}.so")
else ()
set(_asset "stub-${_platform}")
endif ()
set(_stub "${CMAKE_BINARY_DIR}/dusklight-sdk-stubs/${_asset}")
if (NOT EXISTS "${_stub}")
message(STATUS "Mod SDK: downloading link stub ${_asset}")
file(DOWNLOAD "${DUSKLIGHT_SDK_STUB_URL}/${_asset}" "${_stub}.tmp" STATUS _status)
list(GET _status 0 _code)
if (NOT _code EQUAL 0)
list(GET _status 1 _error)
file(REMOVE "${_stub}.tmp")
message(FATAL_ERROR
"Mod SDK: failed to download ${DUSKLIGHT_SDK_STUB_URL}/${_asset}: ${_error}\n"
"Set DUSK_GAME_EXE to a game binary or link stub to skip the download.")
endif ()
file(RENAME "${_stub}.tmp" "${_stub}")
endif ()
set(${out_var} "${_stub}" PARENT_SCOPE)
endfunction()
function(_mod_resolve_source_path out_var path)
if (IS_ABSOLUTE "${path}")
set(_path "${path}")
else ()
set(_path "${CMAKE_CURRENT_SOURCE_DIR}/${path}")
endif ()
set(${out_var} "${_path}" PARENT_SCOPE)
endfunction()
function(_mod_collect_assets out_var dir)
if (NOT IS_DIRECTORY "${dir}")
message(FATAL_ERROR "add_mod: asset directory does not exist: ${dir}")
endif ()
file(GLOB_RECURSE _files CONFIGURE_DEPENDS LIST_DIRECTORIES false "${dir}/*")
# Dotfiles (.gitkeep, .DS_Store, ...) are not packaged; see CopyModAssets.cmake.
set(_assets "")
foreach (_file IN LISTS _files)
file(RELATIVE_PATH _rel "${dir}" "${_file}")
if (NOT _rel MATCHES "(^|/)\\.")
list(APPEND _assets "${_file}")
endif ()
endforeach ()
set(${out_var} ${_assets} PARENT_SCOPE)
endfunction()
function(_mod_add_webgpu_headers target_name)
if (NOT TARGET dawn::dawncpp_headers AND NOT TARGET dawn::webgpu_dawn)
include("${CMAKE_CURRENT_FUNCTION_LIST_DIR}/../extern/aurora/cmake/AuroraDependencyVersions.cmake")
set(AURORA_DAWN_PROVIDER "package" CACHE STRING "How to provide Dawn for the mod SDK")
include("${CMAKE_CURRENT_FUNCTION_LIST_DIR}/../extern/aurora/cmake/AuroraDawnProvider.cmake")
endif ()
if (TARGET dawn::dawncpp_headers)
target_link_libraries(${target_name} PRIVATE dawn::dawncpp_headers)
elseif (TARGET dawn::webgpu_dawn)
target_link_libraries(${target_name} PRIVATE dawn::webgpu_dawn)
else ()
message(FATAL_ERROR "add_mod: FEATURES webgpu could not provide WebGPU headers")
endif ()
endfunction()
function(add_mod target_name)
cmake_parse_arguments(ARG "BUNDLE" "MOD_JSON;RES_DIR;OVERLAY_DIR;TEXTURES_DIR;OUTPUT_DIR"
"SOURCES;RUNTIME_LIBRARIES;FEATURES" ${ARGN})
if (ARG_UNPARSED_ARGUMENTS)
message(FATAL_ERROR "add_mod: unknown arguments: ${ARG_UNPARSED_ARGUMENTS}")
endif ()
if (NOT ARG_MOD_JSON)
message(FATAL_ERROR "add_mod: MOD_JSON is required")
endif ()
_mod_resolve_source_path(_mod_json "${ARG_MOD_JSON}")
if (NOT EXISTS "${_mod_json}")
message(FATAL_ERROR "add_mod: MOD_JSON does not exist: ${_mod_json}")
endif ()
set(_supported_features game webgpu)
set(_features "")
foreach (_feature IN LISTS ARG_FEATURES)
list(FIND _supported_features "${_feature}" _feature_index)
if (_feature_index EQUAL -1)
list(JOIN _supported_features ", " _supported_features_text)
message(FATAL_ERROR
"add_mod: unknown feature '${_feature}' (supported: ${_supported_features_text})")
endif ()
list(FIND _features "${_feature}" _duplicate_index)
if (NOT _duplicate_index EQUAL -1)
message(FATAL_ERROR "add_mod: duplicate feature '${_feature}'")
endif ()
list(APPEND _features "${_feature}")
endforeach ()
if (_features AND NOT ARG_SOURCES)
message(FATAL_ERROR "add_mod: FEATURES requires SOURCES")
endif ()
set(_has_lib FALSE)
set(_needs_host_link FALSE)
set(_lib_platform "")
set(_lib_name "")
if (ARG_SOURCES)
set(_has_lib TRUE)
add_library(${target_name} MODULE ${ARG_SOURCES})
_mod_lib_info(_lib_platform _lib_name)
set_target_properties(${target_name} PROPERTIES
PREFIX ""
C_VISIBILITY_PRESET hidden
CXX_VISIBILITY_PRESET hidden
VISIBILITY_INLINES_HIDDEN ON
WINDOWS_EXPORT_ALL_SYMBOLS OFF)
target_compile_features(${target_name} PRIVATE cxx_std_20)
target_link_libraries(${target_name} PRIVATE dusklight_mod_api)
foreach (_feature IN LISTS _features)
target_link_libraries(${target_name} PRIVATE dusklight_mod_feature_${_feature})
if (_feature STREQUAL "webgpu")
_mod_add_webgpu_headers(${target_name})
endif ()
if (_feature STREQUAL "game" OR _feature STREQUAL "webgpu")
set(_needs_host_link TRUE)
endif ()
endforeach ()
if (NOT TARGET dusklight)
# Apply global compile options for out-of-tree mod builds
if (CMAKE_SYSTEM_NAME STREQUAL Linux)
target_compile_options(${target_name} PRIVATE
-Wno-multichar -Wno-trigraphs -Wno-deprecated-declarations)
elseif (APPLE)
target_compile_options(${target_name} PRIVATE
-Wno-declaration-after-statement -Wno-non-pod-varargs)
elseif (MSVC)
target_compile_options(${target_name} PRIVATE
"$<$<COMPILE_LANGUAGE:C,CXX>:/bigobj>"
"$<$<COMPILE_LANGUAGE:C,CXX>:/utf-8>")
endif ()
# Use signed char on ARM to match the original game (and x86)
string(TOLOWER "${CMAKE_SYSTEM_PROCESSOR}" _mod_arch)
if (_mod_arch MATCHES "^(arm|aarch64)" AND CMAKE_CXX_COMPILER_FRONTEND_VARIANT STREQUAL "GNU")
target_compile_options(${target_name} PRIVATE -fsigned-char)
endif ()
endif ()
if (APPLE)
if (_needs_host_link)
if (TARGET dusklight)
set(_game_exe "$<TARGET_FILE:dusklight>")
add_dependencies(${target_name} dusklight)
elseif (DUSK_GAME_EXE)
_mod_resolve_source_path(_game_exe "${DUSK_GAME_EXE}")
else ()
_mod_download_link_stub(_game_exe)
endif ()
target_link_options(${target_name} PRIVATE
-Xlinker -bundle_loader -Xlinker "${_game_exe}")
set_property(TARGET ${target_name} APPEND PROPERTY LINK_DEPENDS "${_game_exe}")
endif ()
set_target_properties(${target_name} PROPERTIES
BUILD_RPATH "@loader_path"
INSTALL_RPATH "@loader_path")
elseif (ANDROID)
if (_needs_host_link)
if (TARGET dusklight)
target_link_libraries(${target_name} PRIVATE dusklight)
else ()
if (DUSK_GAME_EXE)
_mod_resolve_source_path(_game_lib "${DUSK_GAME_EXE}")
else ()
_mod_download_link_stub(_game_lib)
endif ()
target_link_libraries(${target_name} PRIVATE "${_game_lib}")
endif ()
endif ()
set_target_properties(${target_name} PROPERTIES
BUILD_RPATH "$ORIGIN"
INSTALL_RPATH "$ORIGIN")
elseif (UNIX)
if (_needs_host_link)
target_link_options(${target_name} PRIVATE -Wl,--allow-shlib-undefined)
endif ()
set_target_properties(${target_name} PROPERTIES
BUILD_RPATH "$ORIGIN"
INSTALL_RPATH "$ORIGIN")
elseif (WIN32)
# Mods link against the game's import library (sdk/windows-<arch>.lib, generated by
# setup_windows_exports); cl and clang-cl both consume it in MSVC mode. Function
# calls resolve through import thunks; game data is reachable only through
# __declspec(dllimport), i.e. DUSK_GAME_DATA-annotated declarations.
if (_needs_host_link)
if (TARGET dusklight)
if (NOT DUSK_GAME_IMPLIB)
message(FATAL_ERROR
"add_mod: DUSK_GAME_IMPLIB is not set (see setup_windows_exports)")
endif ()
set(_game_lib "${DUSK_GAME_IMPLIB}")
elseif (DUSK_GAME_EXE)
_mod_resolve_source_path(_game_lib "${DUSK_GAME_EXE}")
if (NOT _game_lib MATCHES "\\.lib$")
message(FATAL_ERROR
"add_mod: DUSK_GAME_EXE must be an import library on Windows "
"(sdk/windows-<arch>.lib)")
endif ()
else ()
_mod_download_link_stub(_game_lib)
endif ()
target_link_libraries(${target_name} PRIVATE "${_game_lib}")
endif ()
set_target_properties(${target_name} PROPERTIES MSVC_RUNTIME_LIBRARY "MultiThreadedDLL")
target_compile_definitions(${target_name} PRIVATE _ITERATOR_DEBUG_LEVEL=0)
endif ()
endif ()
if (ARG_RUNTIME_LIBRARIES AND NOT _has_lib)
message(FATAL_ERROR "add_mod: RUNTIME_LIBRARIES requires SOURCES")
endif ()
set(_output_dir "${DUSK_MODS_OUTPUT_DIR}")
if (ARG_OUTPUT_DIR)
set(_output_dir "${ARG_OUTPUT_DIR}")
endif ()
set(_stage "${CMAKE_CURRENT_BINARY_DIR}/${target_name}_stage")
set(_out "${_output_dir}/${target_name}.dusk")
set(_zip_args mod.json)
set(_package_deps "${_mod_json}")
set(_package_inputs "${_mod_json}")
set(_extra_cmds "")
set(_lib_copy_cmd "")
set(_target_depend "")
if (_has_lib)
list(APPEND _zip_args lib)
set(_lib_copy_cmd
COMMAND ${CMAKE_COMMAND} -E make_directory "${_stage}/lib/${_lib_platform}"
COMMAND ${CMAKE_COMMAND} -E copy_if_different
"$<TARGET_FILE:${target_name}>" "${_stage}/lib/${_lib_platform}/${_lib_name}")
set(_target_depend ${target_name})
endif ()
string(TOLOWER "${_lib_name}" _lib_name_key)
set(_runtime_lib_name_keys "${_lib_name_key}")
foreach (_runtime_lib IN LISTS ARG_RUNTIME_LIBRARIES)
_mod_resolve_source_path(_runtime_lib_path "${_runtime_lib}")
if (NOT EXISTS "${_runtime_lib_path}" OR IS_DIRECTORY "${_runtime_lib_path}")
message(FATAL_ERROR "add_mod: runtime library does not exist or is not a file: ${_runtime_lib_path}")
endif ()
get_filename_component(_runtime_lib_name "${_runtime_lib_path}" NAME)
string(TOLOWER "${_runtime_lib_name}" _runtime_lib_name_key)
list(FIND _runtime_lib_name_keys "${_runtime_lib_name_key}" _runtime_lib_name_index)
if (NOT _runtime_lib_name_index EQUAL -1)
message(FATAL_ERROR "add_mod: duplicate runtime library filename: ${_runtime_lib_name}")
endif ()
list(APPEND _runtime_lib_name_keys "${_runtime_lib_name_key}")
list(APPEND _package_deps "${_runtime_lib_path}")
list(APPEND _package_inputs "${_runtime_lib_path}")
list(APPEND _lib_copy_cmd COMMAND ${CMAKE_COMMAND} -E copy_if_different
"${_runtime_lib_path}" "${_stage}/lib/${_lib_platform}/${_runtime_lib_name}")
endforeach ()
if (ARG_RES_DIR)
_mod_resolve_source_path(_res_dir "${ARG_RES_DIR}")
_mod_collect_assets(_res_deps "${_res_dir}")
list(APPEND _package_deps ${_res_deps})
list(APPEND _package_inputs "${_res_dir}" ${_res_deps})
list(APPEND _zip_args res)
list(APPEND _extra_cmds COMMAND ${CMAKE_COMMAND} "-DSRC=${_res_dir}"
"-DDST=${_stage}/res" -P "${CMAKE_CURRENT_FUNCTION_LIST_DIR}/CopyModAssets.cmake")
endif ()
if (ARG_OVERLAY_DIR)
_mod_resolve_source_path(_overlay_dir "${ARG_OVERLAY_DIR}")
_mod_collect_assets(_overlay_deps "${_overlay_dir}")
list(APPEND _package_deps ${_overlay_deps})
list(APPEND _package_inputs "${_overlay_dir}" ${_overlay_deps})
list(APPEND _zip_args overlay)
list(APPEND _extra_cmds COMMAND ${CMAKE_COMMAND} "-DSRC=${_overlay_dir}"
"-DDST=${_stage}/overlay" -P "${CMAKE_CURRENT_FUNCTION_LIST_DIR}/CopyModAssets.cmake")
endif ()
if (ARG_TEXTURES_DIR)
_mod_resolve_source_path(_textures_dir "${ARG_TEXTURES_DIR}")
_mod_collect_assets(_textures_deps "${_textures_dir}")
list(APPEND _package_deps ${_textures_deps})
list(APPEND _package_inputs "${_textures_dir}" ${_textures_deps})
list(APPEND _zip_args textures)
list(APPEND _extra_cmds COMMAND ${CMAKE_COMMAND} "-DSRC=${_textures_dir}"
"-DDST=${_stage}/textures" -P "${CMAKE_CURRENT_FUNCTION_LIST_DIR}/CopyModAssets.cmake")
endif ()
set(_bundle_cmds "")
if (ARG_BUNDLE AND TARGET dusklight)
file(READ "${_mod_json}" _mod_json_text)
string(JSON _mod_id GET "${_mod_json_text}" id)
set_property(GLOBAL APPEND PROPERTY DUSK_BUNDLED_MOD_TARGETS "${target_name}")
set_property(GLOBAL APPEND PROPERTY DUSK_BUNDLED_MOD_IDS "${_mod_id}")
set_property(GLOBAL APPEND PROPERTY DUSK_BUNDLED_MOD_STAGES "${_stage}")
set_property(GLOBAL APPEND PROPERTY DUSK_BUNDLED_MOD_PACKAGES "${_out}")
set_property(GLOBAL APPEND PROPERTY DUSK_BUNDLED_MOD_LIB_PLATFORMS "${_lib_platform}")
set_property(GLOBAL APPEND PROPERTY DUSK_BUNDLED_MOD_LIB_NAMES "${_lib_name}")
set(_bundle_cmds
COMMAND ${CMAKE_COMMAND} -E make_directory "${CMAKE_BINARY_DIR}/bundled_mods"
COMMAND ${CMAKE_COMMAND} -E copy_if_different "${_out}" "${CMAKE_BINARY_DIR}/bundled_mods/${target_name}.dusk")
endif ()
set(_package_target "${target_name}_package")
set(_package_inputs_file "${CMAKE_CURRENT_BINARY_DIR}/${target_name}_package_inputs.txt")
list(SORT _package_inputs)
set(_package_inputs_text "")
foreach (_package_input IN LISTS _package_inputs)
string(APPEND _package_inputs_text "${_package_input}\n")
endforeach ()
file(GENERATE OUTPUT "${_package_inputs_file}" CONTENT "${_package_inputs_text}")
add_custom_command(OUTPUT "${_out}"
COMMAND ${CMAKE_COMMAND} -E rm -rf "${_stage}"
COMMAND ${CMAKE_COMMAND} -E make_directory "${_stage}" "${_output_dir}"
${_lib_copy_cmd}
COMMAND ${CMAKE_COMMAND} -E copy_if_different "${_mod_json}" "${_stage}/mod.json"
${_extra_cmds}
COMMAND ${CMAKE_COMMAND} -E chdir "${_stage}" ${CMAKE_COMMAND} -E tar cvf "${_out}" --format=zip ${_zip_args}
${_bundle_cmds}
DEPENDS ${_target_depend} ${_package_deps} "${_package_inputs_file}"
COMMENT "Packaging ${target_name} -> ${_out}"
COMMAND_EXPAND_LISTS
VERBATIM
)
add_custom_target(${_package_target} ALL DEPENDS "${_out}")
if (TARGET dusklight_mods)
add_dependencies(dusklight_mods ${_package_target})
endif ()
endfunction()
# Install rules for BUNDLE mods.
# - Windows: the .dusk archives into <install>/mods (the loader extracts native libs to the
# user cache).
# - Linux: pre-extracted stage dirs into <install>/mods so native libs dlopen in place from
# read-only installs.
# - macOS: pre-extracted stage dirs into the installed app's Contents/Resources/mods, native
# libs ad-hoc signed in place, then the whole bundle re-signed.
# - iOS/tvOS: assets into <app>/mods/<id>, the mod library into Frameworks/<id>.so,
# and runtime libraries alongside it.
# - Android: nothing here; gradle packs ${CMAKE_BINARY_DIR}/bundled_mods into APK assets.
function(install_bundled_mods)
get_property(_targets GLOBAL PROPERTY DUSK_BUNDLED_MOD_TARGETS)
if (NOT _targets OR ANDROID)
return ()
endif ()
get_property(_ids GLOBAL PROPERTY DUSK_BUNDLED_MOD_IDS)
get_property(_stages GLOBAL PROPERTY DUSK_BUNDLED_MOD_STAGES)
get_property(_lib_platforms GLOBAL PROPERTY DUSK_BUNDLED_MOD_LIB_PLATFORMS)
get_property(_lib_names GLOBAL PROPERTY DUSK_BUNDLED_MOD_LIB_NAMES)
list(LENGTH _targets _count)
math(EXPR _last "${_count} - 1")
if (APPLE)
get_target_property(_app_name dusklight OUTPUT_NAME)
if (NOT _app_name)
set(_app_name dusklight)
endif ()
set(_bundle_dir "${CMAKE_INSTALL_PREFIX}/${_app_name}.app")
if (IOS OR TVOS)
foreach (_i RANGE ${_last})
list(GET _targets ${_i} _target)
list(GET _ids ${_i} _id)
list(GET _stages ${_i} _stage)
list(GET _lib_platforms ${_i} _lib_platform)
list(GET _lib_names ${_i} _lib_name)
install(DIRECTORY "${_stage}/" DESTINATION "${_bundle_dir}/mods/${_id}"
PATTERN "lib" EXCLUDE)
install(PROGRAMS "$<TARGET_FILE:${_target}>"
DESTINATION "${_bundle_dir}/Frameworks" RENAME "${_id}.so")
install(DIRECTORY "${_stage}/lib/${_lib_platform}/"
DESTINATION "${_bundle_dir}/Frameworks"
PATTERN "${_lib_name}" EXCLUDE)
endforeach ()
if (DUSK_HAS_PREPATCH)
set(_prepatch_executable "${_bundle_dir}/Dusklight")
set(_prepatch_mod_args "")
foreach (_id IN LISTS _ids)
string(APPEND _prepatch_mod_args
" \"${_bundle_dir}/Frameworks/${_id}.so\"")
endforeach ()
install(CODE "
execute_process(
COMMAND \"${SYMGEN_EXE}\" prepatch
--binary \"${_prepatch_executable}\"
--report \"${CMAKE_BINARY_DIR}/prepatch-report-$<CONFIG>.json\"
${_prepatch_mod_args}
COMMAND_ERROR_IS_FATAL ANY)")
endif ()
else ()
foreach (_i RANGE ${_last})
list(GET _ids ${_i} _id)
list(GET _stages ${_i} _stage)
list(GET _lib_platforms ${_i} _lib_platform)
list(GET _lib_names ${_i} _lib_name)
install(DIRECTORY "${_stage}/" DESTINATION "${_bundle_dir}/Contents/Resources/mods/${_id}")
install(CODE "
file(GLOB _mod_libs \"${_bundle_dir}/Contents/Resources/mods/${_id}/lib/${_lib_platform}/*\")
foreach (_mod_lib IN LISTS _mod_libs)
if (NOT IS_DIRECTORY \"\${_mod_lib}\")
execute_process(COMMAND /usr/bin/codesign --force --sign - \"\${_mod_lib}\" COMMAND_ERROR_IS_FATAL ANY)
endif ()
endforeach ()")
endforeach ()
if (DUSK_HAS_PREPATCH)
set(_prepatch_executable "${_bundle_dir}/Contents/MacOS/Dusklight")
set(_prepatch_mod_args "")
foreach (_i RANGE ${_last})
list(GET _ids ${_i} _id)
list(GET _lib_platforms ${_i} _lib_platform)
list(GET _lib_names ${_i} _lib_name)
string(APPEND _prepatch_mod_args
" \"${_bundle_dir}/Contents/Resources/mods/${_id}/lib/${_lib_platform}/${_lib_name}\"")
endforeach ()
install(CODE "
execute_process(
COMMAND \"${SYMGEN_EXE}\" prepatch
--binary \"${_prepatch_executable}\"
--report \"${CMAKE_BINARY_DIR}/prepatch-report-$<CONFIG>.json\"
${_prepatch_mod_args}
COMMAND_ERROR_IS_FATAL ANY)")
endif ()
if (TARGET crashpad_handler)
install(CODE "execute_process(COMMAND /usr/bin/codesign --force --sign - \"${_bundle_dir}/Contents/MacOS/$<TARGET_FILE_NAME:crashpad_handler>\" COMMAND_ERROR_IS_FATAL ANY)")
endif ()
install(CODE "execute_process(COMMAND /usr/bin/codesign --force --sign - --entitlements \"${DUSK_ENTITLEMENTS}\" \"${_bundle_dir}\" COMMAND_ERROR_IS_FATAL ANY)")
endif ()
return ()
endif ()
if (DUSK_PACKAGE_INSTALL)
set(_mods_dest "${CMAKE_INSTALL_DATAROOTDIR}/dusklight/mods")
else ()
set(_mods_dest "${CMAKE_INSTALL_PREFIX}/mods")
endif ()
if (WIN32)
foreach (_target IN LISTS _targets)
install(FILES "${CMAKE_BINARY_DIR}/bundled_mods/${_target}.dusk" DESTINATION "${_mods_dest}")
endforeach ()
else ()
foreach (_i RANGE ${_last})
list(GET _ids ${_i} _id)
list(GET _stages ${_i} _stage)
install(DIRECTORY "${_stage}/" DESTINATION "${_mods_dest}/${_id}")
endforeach ()
endif ()
endfunction()
-13
View File
@@ -1,13 +0,0 @@
# Patches capstone's CMakeLists.txt for compatibility with CMake >= 4.0:
# - Bumps cmake_minimum_required to 3.10 (CMake >= 4.0 dropped < 3.5 support; < 3.10 warns)
# - Removes cmake_policy(SET CMP0048 OLD) (rejected by CMake >= 3.27)
file(READ "${DIR}/CMakeLists.txt" _content)
string(REGEX REPLACE
"cmake_minimum_required[ \t]*\\([ \t]*VERSION[ \t]+[0-9]+\\.[0-9]+(\\.[0-9]+)?[ \t]*\\)"
"cmake_minimum_required(VERSION 3.10)"
_content "${_content}")
string(REGEX REPLACE
"cmake_policy[ \t]*\\([ \t]*SET[ \t]+CMP0048[ \t]+OLD[ \t]*\\)"
"# cmake_policy(SET CMP0048 OLD)"
_content "${_content}")
file(WRITE "${DIR}/CMakeLists.txt" "${_content}")
-60
View File
@@ -1,60 +0,0 @@
file(READ "${SOURCE_DIR}/cmake/capstone.cmake.in" _content)
# Insert PATCH_COMMAND before CONFIGURE_COMMAND in the ExternalProject_Add.
# Bracket args prevent cmake from substituting ${...} while writing this file.
string(REPLACE
" CONFIGURE_COMMAND \"\""
[=[ PATCH_COMMAND "${CMAKE_COMMAND}" -DDIR=${CMAKE_CURRENT_BINARY_DIR}/capstone-src -P "${CAPSTONE_FIX_SCRIPT}"
CONFIGURE_COMMAND ""]=]
_content "${_content}")
file(WRITE "${SOURCE_DIR}/cmake/capstone.cmake.in" "${_content}")
file(READ "${SOURCE_DIR}/src/funchook_unix.c" _unix_content)
# macOS rejects the POSIX mprotect RWX/RW transition for executable image pages on arm64.
# Use Mach VM_PROT_COPY for the short patch window, then restore RX permissions.
if (NOT _unix_content MATCHES "VM_PROT_READ \\| VM_PROT_WRITE \\| VM_PROT_COPY")
string(REPLACE
[=[ rv = mprotect(mstate->addr, mstate->size, prot);]=]
[=[#ifdef __APPLE__
kern_return_t kr = vm_protect(mach_task_self(), (vm_address_t)mstate->addr,
(vm_size_t)mstate->size, FALSE,
VM_PROT_READ | VM_PROT_WRITE | VM_PROT_COPY);
if (kr == KERN_SUCCESS) {
funchook_log(funchook, " unprotect memory %p (size=%"PRIuPTR", prot=read,write,copy) <- %p (size=%"PRIuPTR")\n",
mstate->addr, mstate->size, start, len);
return 0;
}
funchook_set_error_message(funchook, "Failed to unprotect memory %p (size=%"PRIuPTR", prot=read,write,copy) <- %p (size=%"PRIuPTR", error=%s)",
mstate->addr, mstate->size, start, len,
mach_error_string(kr));
return FUNCHOOK_ERROR_MEMORY_FUNCTION;
#endif
rv = mprotect(mstate->addr, mstate->size, prot);]=]
_unix_content "${_unix_content}")
string(REPLACE
[=[ char errbuf[128];
int rv = mprotect(mstate->addr, mstate->size, PROT_READ | PROT_EXEC);]=]
[=[ char errbuf[128];
#ifdef __APPLE__
kern_return_t kr = vm_protect(mach_task_self(), (vm_address_t)mstate->addr,
(vm_size_t)mstate->size, FALSE,
VM_PROT_READ | VM_PROT_EXECUTE);
if (kr == KERN_SUCCESS) {
funchook_log(funchook, " protect memory %p (size=%"PRIuPTR", prot=read,exec)\n",
mstate->addr, mstate->size);
return 0;
}
funchook_set_error_message(funchook, "Failed to protect memory %p (size=%"PRIuPTR", prot=read,exec, error=%s)",
mstate->addr, mstate->size,
mach_error_string(kr));
return FUNCHOOK_ERROR_MEMORY_FUNCTION;
#endif
int rv = mprotect(mstate->addr, mstate->size, PROT_READ | PROT_EXEC);]=]
_unix_content "${_unix_content}")
endif ()
file(WRITE "${SOURCE_DIR}/src/funchook_unix.c" "${_unix_content}")
-132
View File
@@ -1,132 +0,0 @@
include_guard(GLOBAL)
get_filename_component(_SYMBOL_MANIFEST_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" DIRECTORY)
set(_SYMGEN_VERSION "1.3.1")
set(_SYMGEN_RELEASE_BASE_URL "https://github.com/encounter/symgen/releases/download/v${_SYMGEN_VERSION}")
set(SYMGEN_PATH "" CACHE FILEPATH "Path to a symgen executable; empty downloads the pinned release")
mark_as_advanced(SYMGEN_PATH)
function(symgen_host_asset out_name)
string(TOLOWER "${CMAKE_HOST_SYSTEM_PROCESSOR}" _host_processor)
set(_asset "")
if (CMAKE_HOST_SYSTEM_NAME STREQUAL "Darwin")
if (_host_processor MATCHES "^(arm64|aarch64)$")
set(_asset "symgen-macos-arm64")
elseif (_host_processor MATCHES "^(x86_64|amd64)$")
set(_asset "symgen-macos-x86_64")
endif ()
elseif (CMAKE_HOST_SYSTEM_NAME STREQUAL "Linux")
if (_host_processor MATCHES "^(aarch64|arm64)$")
set(_asset "symgen-linux-aarch64")
elseif (_host_processor MATCHES "^(x86_64|amd64)$")
set(_asset "symgen-linux-x86_64")
elseif (_host_processor MATCHES "^(i[3-6]86|x86)$")
set(_asset "symgen-linux-i686")
endif ()
elseif (CMAKE_HOST_WIN32)
if (_host_processor MATCHES "^(arm64|aarch64)$")
set(_asset "symgen-windows-arm64.exe")
elseif (_host_processor MATCHES "^(x86_64|amd64)$")
set(_asset "symgen-windows-x86_64.exe")
elseif (_host_processor MATCHES "^(i[3-6]86|x86)$")
set(_asset "symgen-windows-x86.exe")
endif ()
endif ()
set(${out_name} "${_asset}" PARENT_SCOPE)
endfunction()
function(ensure_symgen required)
if (TARGET symgen)
return()
endif ()
if (SYMGEN_PATH)
get_filename_component(_symgen "${SYMGEN_PATH}" ABSOLUTE)
if (NOT EXISTS "${_symgen}")
if (required)
message(FATAL_ERROR "symgen: SYMGEN_PATH does not exist: ${_symgen}")
endif ()
message(STATUS "symgen: SYMGEN_PATH does not exist, symbol manifest generation "
"skipped (by-name hook resolution will be unavailable)")
return()
endif ()
else ()
symgen_host_asset(_asset)
if (_asset STREQUAL "")
if (required)
message(FATAL_ERROR "symgen: no prebuilt binary for host "
"${CMAKE_HOST_SYSTEM_NAME}/${CMAKE_HOST_SYSTEM_PROCESSOR} "
"(configure with -DDUSK_ENABLE_CODE_MODS=OFF)")
endif ()
message(STATUS "symgen: no prebuilt binary for host "
"${CMAKE_HOST_SYSTEM_NAME}/${CMAKE_HOST_SYSTEM_PROCESSOR}; "
"symbol manifest generation skipped (by-name hook resolution will be unavailable)")
return()
endif ()
set(_symgen_dir "${CMAKE_BINARY_DIR}/_deps/symgen")
set(_symgen "${_symgen_dir}/${_asset}")
set(_url "${_SYMGEN_RELEASE_BASE_URL}/${_asset}")
message(STATUS "dusklight: Fetching symgen ${_SYMGEN_VERSION} (${_asset})")
file(MAKE_DIRECTORY "${_symgen_dir}")
file(DOWNLOAD "${_url}" "${_symgen}"
TLS_VERIFY ON
STATUS _download_status
SHOW_PROGRESS)
list(GET _download_status 0 _download_code)
if (NOT _download_code EQUAL 0)
list(GET _download_status 1 _download_message)
file(REMOVE "${_symgen}")
if (required)
message(FATAL_ERROR "symgen: failed to download ${_url}: ${_download_message}")
endif ()
message(STATUS "symgen: failed to download ${_url}: ${_download_message}; "
"symbol manifest generation skipped (by-name hook resolution will be unavailable)")
return()
endif ()
if (NOT CMAKE_HOST_WIN32)
file(CHMOD "${_symgen}" PERMISSIONS
OWNER_READ OWNER_WRITE OWNER_EXECUTE
GROUP_READ GROUP_EXECUTE
WORLD_READ WORLD_EXECUTE)
endif ()
endif ()
add_custom_target(symgen DEPENDS "${_symgen}")
set(SYMGEN_EXE "${_symgen}" CACHE INTERNAL "symgen executable" FORCE)
endfunction()
function(setup_symbol_manifest target)
ensure_symgen(TRUE)
if (NOT TARGET symgen)
return()
endif ()
add_dependencies(${target} symgen)
if (WIN32)
set(_input --pdb "$<TARGET_PDB_FILE:${target}>")
else ()
set(_input --binary "$<TARGET_FILE:${target}>")
endif ()
if (APPLE)
# Room for the symbol manifest and several prepatch arenas.
target_link_options(${target} PRIVATE "LINKER:-headerpad,0x1000")
# ld64 may update an existing output, which breaks our symdb insertion. Remove it first.
add_custom_command(TARGET ${target} PRE_LINK
COMMAND "${CMAKE_COMMAND}" -E rm -f "$<TARGET_FILE:${target}>"
VERBATIM)
endif ()
# The manifest is embedded into the image as a new section, located at runtime through
# the descriptor manifest.cpp reserves. On Apple platforms this command must stay
# attached before the ad-hoc codesign POST_BUILD command: the patch removes any existing
# signature.
add_custom_command(TARGET ${target} POST_BUILD
COMMAND "${SYMGEN_EXE}" manifest ${_input} --embed "$<TARGET_FILE:${target}>"
COMMENT "Embedding symbol manifest"
VERBATIM)
endfunction()
-93
View File
@@ -1,93 +0,0 @@
include_guard(GLOBAL)
get_filename_component(_DUSK_WINDOWS_EXPORTS_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" DIRECTORY)
# Windows mod linking: generate the curated export surface for the game executable and the
# import library mods link against. symgen scans the built objects, filters by source, and
# writes a .def used by the main link and import library generation.
function(setup_windows_exports target)
string(TOLOWER "${CMAKE_SYSTEM_PROCESSOR}" _implib_arch)
if (_implib_arch STREQUAL "arm64")
set(_dlltool_machine "arm64")
set(_lib_machine "arm64")
elseif (_implib_arch MATCHES "^(amd64|x86_64)$")
set(_dlltool_machine "i386:x86-64")
set(_lib_machine "x64")
else ()
message(FATAL_ERROR
"dusklight: no Windows mod linking support for ${CMAKE_SYSTEM_PROCESSOR}")
endif ()
include("${_DUSK_WINDOWS_EXPORTS_CMAKE_DIR}/SymbolManifest.cmake")
ensure_symgen(TRUE)
set(_symgen "${SYMGEN_EXE}")
add_dependencies(${target} symgen)
set(_config_subdir "")
if (CMAKE_CONFIGURATION_TYPES)
set(_config_subdir "$<CONFIG>/")
endif ()
set(_rsp_lines "$<TARGET_OBJECTS:${target}>")
foreach (_lib IN LISTS JSYSTEM_LIBRARIES)
list(APPEND _rsp_lines "$<TARGET_FILE:${_lib}>")
endforeach ()
list(JOIN _rsp_lines "\n" _rsp_content)
set(_rsp "${CMAKE_BINARY_DIR}/${_config_subdir}dusklight_exports_input.rsp")
file(GENERATE OUTPUT "${_rsp}" CONTENT "${_rsp_content}")
set(_sdk_args)
foreach (_lib aurora_card aurora_core aurora_dvd aurora_gd aurora_gx aurora_mtx
aurora_os aurora_pad aurora_si aurora_vi)
if (TARGET ${_lib})
list(APPEND _sdk_args --sdk-lib "$<TARGET_FILE:${_lib}>")
endif ()
endforeach ()
set(_forward_args)
if (TARGET dawn::webgpu_dawn)
get_target_property(_dawn_type dawn::webgpu_dawn TYPE)
if (_dawn_type STREQUAL "SHARED_LIBRARY")
list(APPEND _forward_args
--forward-dll "$<TARGET_FILE:dawn::webgpu_dawn>"
--forward-sym-prefix wgpu)
endif ()
endif ()
# Generate curated exports list from the main binary
set(_def "${CMAKE_BINARY_DIR}/${_config_subdir}dusklight_exports.def")
add_custom_command(TARGET ${target} PRE_LINK
COMMAND "${_symgen}" def
"@${_rsp}"
--out "${_def}"
--exclude cmake_pch
--exclude miniz
--exclude asan_options
--exclude src/dusk
--max-exports 58000
${_sdk_args}
${_forward_args}
COMMENT "Generating dusklight exports"
VERBATIM)
target_link_options(${target} PRIVATE "/DEF:${_def}")
# Generate import library for mods to link against.
set(_implib "${CMAKE_BINARY_DIR}/${_config_subdir}dusklight_imports.lib")
get_filename_component(_compiler_dir "${CMAKE_CXX_COMPILER}" DIRECTORY)
find_program(DUSK_LLVM_DLLTOOL llvm-dlltool HINTS "${_compiler_dir}")
if (DUSK_LLVM_DLLTOOL)
set(_implib_cmd "${DUSK_LLVM_DLLTOOL}" -d "${_def}" -D dusklight.exe
-m "${_dlltool_machine}" -l "${_implib}")
else ()
set(_implib_cmd "${CMAKE_AR}" /nologo "/def:${_def}" "/machine:${_lib_machine}"
/name:dusklight.exe "/out:${_implib}")
endif ()
add_custom_command(TARGET ${target} POST_BUILD
COMMAND ${_implib_cmd}
BYPRODUCTS "${_implib}"
COMMENT "Generating dusklight import library"
VERBATIM)
set(DUSK_GAME_IMPLIB "${_implib}" CACHE INTERNAL "Import library for Windows mod linking")
install(FILES "${_implib}" DESTINATION sdk RENAME "windows-${_implib_arch}.lib")
endfunction()
-228
View File
@@ -1,228 +0,0 @@
#pragma endian big
#include "std/sys.pat"
#include "type/magic.pat"
#include "std/array.pat"
/*
WSYS file
The WSYS file contains roughly two sections: WBCT and WINF.
WBCT contains the mapping of Wave ID -> wave archives.
WINF are the wave archives themselves and their metadata.
*/
/**
* Wrapper for a file-global pointer that allows it to be stored in an array.
*/
struct Offset<T> {
T* offset : u32 [[inline]];
};
/**
* Format that audio data is in..
*/
enum WaveFormat : u8 {
/**
* 16-samples-per-9-bytes custom Nintendo ADPCM.
*/
ADPCM4 = 0,
/**
* 16-samples-per-5-bytes custom Nintendo ADPCM.
*/
ADPCM2 = 1,
/**
* 8-bit-per-sample PCM.
*/
PCM8 = 2,
/**
* 16-bit-per-sample PCM.
*/
PCM16 = 3,
};
/**
* Defines playback info for a single audio "wave".
* This data is stored per archive, making it duplicated (except for mAWOffsetStart)
*/
struct TWave {
padding[1]; // unknown
WaveFormat mWaveFormat;
/**
* Key (as in like, the musical term) this sample is in.
*/
u8 mBaseKey;
padding[1];
/**
* Sample rate of the audio in Hz.
*/
float mSampleRate;
/**
* Position where the sample data starts.
* This is in the .aw file for the archive containing this TWave.
*/
u32 mAWOffsetStart;
/**
* Byte length of the sample data.
*/
u32 mAWLength;
/**
* Indicates whether the sample should loop or not. All bits appear set if so.
*/
u32 mLoopFlags;
/**
* Audio sample at which the loop starts.
*/
u32 mLoopStartSample;
/**
* Audio sample at which the loop ends (and goes back to mLoopStartSample).
*/
u32 mLoopEndSample;
/**
* Total sample count in this wave.
*/
u32 mSampleCount;
/**
* Last sample for continuing ADPCM decode after loop.
*/
s16 mpLast;
/**
* Penult sample for continuing ADPCM decode after loop.
*/
s16 mpPenult;
};
/**
* A single wave archive on disk.
* These are paired 1:1 with TCtrlScene objects.
*/
struct TWaveArchive {
/**
* Filename of the raw sample data on disc. Relative to /Audiores/Waves/
*/
char mFileName[0x70];
/**
* Amount of waves in this archive.
* Matches the count in the paired TCtrl object.
*/
u32 mWaveCount;
/**
* Offsets to the wave metadata (not sample data) in the WSYS.
* These are paired 1:1 to the TCtrlWaves, and the TCtrlWave contains the actual
* "Wave ID" used by the game for lookups.
*/
Offset<TWave> waveOffsets[mWaveCount];
};
/**
* Header containing data for wave archives and their metadata.
*/
struct TWaveArchiveBank {
type::Magic<"WINF"> mMagic;
/**
* Amount of archives in this wave bank.
* Matches the value in TCtrlGroup.
*/
u32 mArchiveCounts;
Offset<TWaveArchive> mArchiveOffsets[mArchiveCounts];
};
/**
* Definition for a single wave in a control group.
*/
struct TCtrlWave {
/**
* Group ID matches the index of the control group this item is referenced by.
*/
u16 mGroupId;
/**
* Wave ID used by the game to look this wave up.
*/
u16 mWaveId;
};
/**
* Contains the actual data for a TCtrlScene.
* Why is this separate? Who knows.
*/
struct TCtrl {
// Other versions of this struct with different magic (C-EX and C-ST) also exist in the file.
// They aren't pointed to so we don't need to worry about them.
type::Magic<"C-DF"> mMagic;
/**
* Amount of waves in this group.
* Matches the value in TWaveArchive.
*/
u32 waveCount;
Offset<TCtrlWave> mWaveOffsets[waveCount];
};
/**
* A single scene or "group" of waves that are loaded at once.
*/
struct TCtrlScene {
type::Magic<"SCNE"> mMagic;
padding[8]; // unknown
TCtrl* mCtrlOffset : u32 [[inline]];
};
/**
* Contains the "control" section of the WSYS.
*/
struct TCtrlGroup {
type::Magic<"WBCT"> mMagic;
padding[4]; // unknown
u32 mGroupCount;
Offset<TCtrlScene> mCtrlSceneOffsets[mGroupCount];
};
struct THeader {
type::Magic<"WSYS"> mMagic;
/**
* Size of WSYS in bytes.
*/
u32 mSize;
/**
* ID of wave bank.
* This matches the value passed to the BAA load command.
* The game does not use this value itself.
*/
u32 mId;
/**
* Total amount of waves in this wave bank.
* (not groups! Waves!)
*/
u32 mWaveTableSize;
TWaveArchiveBank* archiveBankOffset : u32;
TCtrlGroup* ctrlGroupOffset : u32;
};
THeader header @ 0x0;
std::assert(
header.archiveBankOffset.mArchiveCounts == header.ctrlGroupOffset.mGroupCount,
"Control group and archive count does not match!");
-90
View File
@@ -1,90 +0,0 @@
# JAudio
**JAudio** is the name for the audio engine used by Twilight Princess (along with many other Nintendo games from the era). TP uses exclusively JAudio v2, while other games use v1 or a mix of v1 and v2 infrastructure. This document will primarily focus on TP's use case, but best efforts will be made to document where behavior is TP-specific.
## Common concepts
Audio is almost exclusively
### `JAISoundID`
A "sound", be that a _sound effect_ or music, is referenced in-code through the `JAISoundID` type. This is a `u32` that the game uses to look up the relevant sound. The actual value is bitpacked (BE) from the following fields:
| Type | Field | Description |
|-------|------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `u8` | Section ID | Section of the Sound Table this sound effect is located in. 0 for sound effects, 1 for sequenced music, 2 for streamed music.[^sectionids] |
| `u8` | Group ID | ID of group further used to organize inside the Sound Table's Section. Sound effects are grouped into things like "SYSTEM" and "ENEMY", other sections leave this at 0. |
| `u16` | "Wave ID" | Index inside the group to look up the sound at.<br/>**Note** that the term "wave" in code is extremely confusing[^waveterm]; it does **not** refer to audio samples ("waves") in the wave banks directly. |
[^sectionids]: JAudio itself can seemingly work outside this convention, however it is enforced by some TP-specific game code.
[^waveterm]: Possibly vestigial from JAudio v1, where I believe there were less layers of indirection.
## Disc files
All audio data is stored in `/Audiores` on the disc. Files are as follows:
### `/Audiores/Seqs/Z2SoundSeqs.arc`
Contains the BMS instructions for all BMS-based music and sound effects. Not all data is kept in memory at once.
### `/Audiores/Stream/*.ast`
Contains individual streamed music. Each file is a separate music track. See [this page](https://www.lumasworkshop.com/wiki/AST_(File_Format)) for file format description.
### `/Audiores/Waves/*.aw`
Contains audio sample data for sequenced music and sound effects. These files are pure meat, no bone: they are loaded directly into ARAM and all metadata is stored in the BAA WSYS sections.
Each file contains audio samples for one "scene", with factors like the current level determining what "scenes" are made resident in memory. There is tons of duplicate data between scenes, presumably to increase simplicity and loading performance.
### `/Audiores/Z2Sound.baa`
Contains all remaining metadata for the audio system. This is effectively a container for a bunch of different sub-sections. The file starts with a bunch of "commands" that indicate where other data in the file is. Each command has a 4-character identifier and depending on the command will be followed by some extra arguments before the next command.
The commands used by TP's BAA file are as follows (note that the decompiled code has support for more load commands, which are unused):
| Command/Argument | Value | Description |
|------------------|-----------------|-------------------------------------------------------------------------------------------------------------------------------------------|
| Command | `AA_<` | Start of BAA commands. Must be at the start of the file and only appear once. |
| Command | `>_AA` | End of BAA commands. |
| Command | `ws `[^spaces] | Wave bank/WSYS data. Defines where audio samples are located on disc. |
| Argument | u32 | Wave bank ID, max 255. In TP, 0 is sound effects, 1 is music samples. |
| Argument | u32 | File offset for start of `WSYS` data |
| Argument | u32 | Bit field selecting which groups (= `.aw` files) to load immediately. TP leaves this at zero.[^32ws] |
| Command | `bnk `[^spaces] | Instrument bank/IBNK |
| Argument | u32 | Target wave bank ID |
| Argument | u32 | File offset for start of `IBNK` data |
| Command | `bsc `[^spaces] | Sound effect sequence collection. |
| Argument | u32 | File offset for start of `SC` data. |
| Argument | u32 | File offset for end of `SC` data. |
| Command | `bst `[^spaces] | Sound table. Defines parameters for music and sound effects. |
| Argument | u32 | File offset for start of `BST `[^spaces] data. |
| Argument | u32 | File offset for end of `BST `[^spaces] data. |
| Command | `bstn` | Sound name table. Defines names of all music and sound effects. Present on disc, but loading is disabled on release versions of the game. |
| Argument | u32 | File offset for start of `BSTN` data. |
| Argument | u32 | File offset for end of `BSTN` data. |
| Command | `bfca` | Unknown, something related to initialization of DSP FX data. |
| Argument | u32 | File offset for start of `RARC` data. |
[^spaces]: Padded with spaces.
[^32ws]: Both of TP's wave banks have far more than 32 groups, and seemingly this mechanism would not be able to deal with that.
Following is data descriptions for the remaining data in the `.BAA`, as pointed to by the above commands.
### `WSYS` / Wave banks
`WSYS` / Wave bank data defines where a set of audio samples can be found on disc. Each wave bank is made of multiple "groups", where each group corresponds to one `.aw` file on disc. Each group has a set of "wave IDs" it contains, along with the metadata (e.g. sample rate) and data offset in the `.aw` file.
Multiple groups can contain the same wave ID, thus meaning the raw audio samples can be duplicated on disk.
For the actual binary layout of this data, check [the ImHex pattern](imhex/jaudio/wsys.hexpat)
*Relevant classes: `JASWSParser`, `JASBasicWaveBank`, `JASSimpleWaveBank`.*
## Further reading & credits
* https://www.lumasworkshop.com/wiki/SMR.szs (note that details like the exact layout of the BAA are not the same as TP)
* XAYRGA for doing much RE work and making [JAMTools](https://xayr.gay/tools/SoundModdingToolkit/)
* The decompiled source code, duh.
-778
View File
@@ -1,778 +0,0 @@
# Dusklight Mod API
Mods are `.dusk` bundles: zip archives that can contain code (in the form of native libraries), resources, DVD overlay
files, and texture replacements. Mods may be enabled, disabled and reloaded at runtime.
When code mods are loaded, they get dynamically linked by the operating system to the running game process. The mod
exports lifecycle functions that Dusklight calls into (`mod_initialize`, `mod_update`, `mod_shutdown`), and the mod
communicates with the host via **services**: plain C APIs, individually versioned. Dusklight exports several built-in
services, and mods may export services of their own, permitting framework mods and cross-mod integration.
Beyond services, mods have full access to the original game's code: include game headers, call directly into any public
function, read and write data fields, and hook the vast majority of game functions.
## Table of Contents
1. [Getting Started](#getting-started)
2. [mod.json](#modjson)
3. [Anatomy of a Code Mod](#anatomy-of-a-code-mod)
4. [Services](#services)
5. [Built-in Services](#built-in-services)
6. [Hooking Game Functions](#hooking-game-functions)
7. [Asset Overlays](#asset-overlays)
8. [Runtime Lifecycle](#runtime-lifecycle)
9. [Error Handling](#error-handling)
10. [Advanced](#advanced)
---
## Getting Started
Fork the [mod template](https://github.com/TwilitRealm/mod-template), a self-contained CMake project that uses the
Dusklight mod SDK.
```
my_mod/
├── CMakeLists.txt
├── mod.json
├── src/mod.cpp
├── res/ (optional bundled resources)
├── overlay/ (optional game file overrides)
└── textures/ (optional texture replacements)
```
**CMakeLists.txt:**
```cmake
cmake_minimum_required(VERSION 3.26)
project(my_mod CXX)
if (NOT DUSKLIGHT_VERSION)
set(DUSKLIGHT_VERSION "76b56cd8b81809fce0a5c2a44e2f6d437591132f")
endif ()
include("${CMAKE_CURRENT_SOURCE_DIR}/cmake/FetchDusklight.cmake")
add_subdirectory("${DUSKLIGHT_DIR}/sdk" dusklight-sdk EXCLUDE_FROM_ALL)
add_mod(my_mod
FEATURES game # remove for service/asset-only mods; add webgpu for GfxService
SOURCES src/mod.cpp
MOD_JSON mod.json
RES_DIR res # mod resources, including icon.png and banner.png
OVERLAY_DIR overlay # game file overlays; remove if unused
TEXTURES_DIR textures # texture replacements; remove if unused
)
```
Available features:
- `game`: Allows calling into and hooking game code. Mods that **only** use services may omit it, providing a wider
range of compatibility with Dusklight versions and a slightly faster build process.
- `webgpu`: Allows importing the WebGPU API (`webgpu/webgpu.h`). Must be enabled when using
[GfxService](#gfxservice-modssvcgfxh).
Building produces `my_mod.dusk` in `build/mods/`. Copy the `.dusk` into the user mods folder:
- Windows: `%APPDATA%\TwilitRealm\Dusklight\mods`
- Linux: `~/.local/share/TwilitRealm/Dusklight/mods`
- macOS: `~/Library/Application Support/TwilitRealm/Dusklight/mods`
Passing `--mods <dir>` on the command line replaces the user directory with one of your choosing.
---
## mod.json
```json
{
"id": "com.example.my_mod",
"name": "My Mod",
"version": "1.0.0",
"author": "Your Name",
"description": "A short description shown in the mod manager.",
"icon": "res/my_icon.png",
"banner": "res/my_banner.png"
}
```
`id` is required: a unique, stable identifier (reverse-DNS style; periods, underscores, and alphanumerics). Everything
else is optional but recommended.
`icon` and `banner` are bundle-relative paths to PNG images for the in-game mod manager: the square icon (e.g.
512x512), the banner (~3.5:1). If omitted, `res/icon.png` and `res/banner.png` are used automatically when present.
---
## Anatomy of a Code Mod
```cpp
#include "mods/service.hpp"
#include "mods/svc/log.h"
DEFINE_MOD(); // once, in exactly one translation unit
IMPORT_SERVICE(LogService, svc_log); // resolved by the loader before mod_initialize
extern "C" {
MOD_EXPORT ModResult mod_initialize(ModError* error) {
svc_log->info(mod_ctx, "hello from my_mod");
return MOD_OK;
}
MOD_EXPORT ModResult mod_update(ModError* error) { // called every frame
return MOD_OK;
}
MOD_EXPORT ModResult mod_shutdown(ModError* error) {
return MOD_OK;
}
}
```
All three lifecycle exports are required. `mod_ctx` is your mod's identity token, set by the loader before
`mod_initialize` runs. Pass it as the first argument to every service call.
---
## Services
A service is a struct of C function pointers with a version header. You declare what you use at file scope, and the
loader resolves it before your mod initializes:
```cpp
IMPORT_SERVICE(LogService, svc_log); // required, latest minor version
IMPORT_SERVICE_VERSION(LogService, svc_log, 0); // required, minimum minor version 0 (for backwards compatibility)
IMPORT_OPTIONAL_SERVICE(SomeService, svc_maybe); // may be null
```
Each service is individually versioned, and there may be multiple major versions of a service provided at once,
allowing backwards compatibility with older mods while still changing services fundamentally if necessary. A **major**
bump is a breaking change, treated as a different service entirely. For **additive** changes, a service appends new
functions to the end of the struct without breaking existing callers and simply bumps the minor version.
`IMPORT_SERVICE` and `IMPORT_OPTIONAL_SERVICE` require the latest minor version compiled against, making every field in
the service safe to call. A mod can use `IMPORT_SERVICE_VERSION` (or its optional counterpart) with an older minor
version to remain compatible with older Dusklight versions, then use `SERVICE_HAS` to check at runtime for fields added
after that explicitly requested version.
The contract (see `sdk/include/mods/api.h` for the full version):
- **A required import is guaranteed valid.** If the service is missing or too old, the mod fails to load with a clear
error. No need to null check at call sites.
- **Anything at or below the minor version you imported can be called unconditionally.** The default macros import
the service type's current minor version; the versioned macros explicitly override that minimum.
- Optional imports may be null; check once in `mod_initialize`.
- Fields newer than your imported minor version must be gated behind `SERVICE_HAS(service, ServiceType, field)` plus a
null check.
---
## Built-in Services
### LogService (`mods/svc/log.h`)
```cpp
IMPORT_SERVICE(LogService, svc_log);
svc_log->info(mod_ctx, "spawned the thing");
svc_log->warn(mod_ctx, "that looks wrong");
svc_log->error(mod_ctx, "very bad");
svc_log->write(mod_ctx, LOG_LEVEL_DEBUG, "verbose details");
```
Messages appear in the console prefixed with your mod ID. Messages are plain UTF-8 strings and are copied before the
call returns; use `snprintf` or `fmt::format` for formatting.
### ResourceService (`mods/svc/resource.h`)
Loads files from the `res/` tree of your `.dusk` archive. Paths are relative to `res/` (pass `"config.txt"`, not
`"res/config.txt"`); absolute paths and `..` are rejected.
```cpp
IMPORT_SERVICE(ResourceService, svc_resource);
ResourceBuffer buf = RESOURCE_BUFFER_INIT;
if (svc_resource->load(mod_ctx, "config.txt", &buf) == MOD_OK) {
// buf.data / buf.size
svc_resource->free(mod_ctx, &buf);
}
```
Missing files return `MOD_UNAVAILABLE`. Always `free` what you `load`. Note that the bundle is read-only; for writable
storage, use the directory from `svc_host->mod_dir(mod_ctx)`.
### HostService (`mods/svc/host.h`)
Mod metadata and runtime interaction with the loader:
```cpp
IMPORT_SERVICE(HostService, svc_host);
const char* id = svc_host->mod_id(mod_ctx);
const char* dir = svc_host->mod_dir(mod_ctx); // writable per-mod directory
svc_host->fail(mod_ctx, MOD_ERROR, "something unrecoverable happened"); // disables the mod
```
`get_service`/`publish_service` provide dynamic service lookup; see [Exporting Services](#exporting-services).
**Lifecycle watches.** If your mod provides a service that hands out per-caller state (registrations, callbacks,
handles), watch other mods' lifecycle and drop what you hold for a mod when it detaches.
```cpp
IMPORT_SERVICE(HostService, svc_host);
void on_mod_lifecycle(ModContext* ctx, ModContext* subject, const char* subject_id,
ModLifecycleEvent event, void* user_data) {
if (event == MOD_LIFECYCLE_DETACHED) {
drop_state_for(subject); // same ModContext* the subject passed into your service
}
}
uint64_t watch = 0;
svc_host->watch_mod_lifecycle(mod_ctx, on_mod_lifecycle, nullptr, &watch);
```
`MOD_LIFECYCLE_DETACHED` fires on the game thread at a lifecycle safe point, after the subject's `mod_shutdown` ran and
every service dropped its state. For your own mod's teardown, use `mod_shutdown` instead.
### HookService (`mods/svc/hook.h`)
Installs hooks on game functions and resolves symbols by name. You'll rarely call it directly; use the typed helpers in
`mods/hook.hpp` described in [Hooking Game Functions](#hooking-game-functions).
### OverlayService (`mods/svc/overlay.h`)
Registers DVD file overlays at runtime: the dynamic counterpart to the static `overlay/` directory (see
[Asset Overlays](#asset-overlays)). Overlay a disc path with a file from your bundle, or with a caller-owned buffer
(copied on registration):
```cpp
IMPORT_SERVICE(OverlayService, svc_overlay);
OverlayHandle handle = 0;
svc_overlay->add_file(mod_ctx, "/res/Msgus.arc", "res/replacement.arc", &handle);
svc_overlay->add_buffer(mod_ctx, "/generated.txt", data, size, nullptr);
svc_overlay->remove(mod_ctx, handle);
```
`disc_path` must be absolute (leading `/`) and is matched against the disc case-insensitively. Paths that don't exist
on the disc are added as new files. Changes are applied at the next frame boundary, and data the game already read
stays in memory until the file is re-read: sometimes a scene reload, and in the worst case, a full restart.
See [Asset Overlays](#asset-overlays) for priority and conflict handling.
### TextureService (`mods/svc/texture.h`)
Registers texture replacements at runtime: the dynamic counterpart to the static `textures/` directory (see
[Asset Overlays](#asset-overlays)). Two forms: raw texel data with an explicit key, or an encoded `.dds`/`.png` from
your bundle whose filename encodes the key:
```cpp
IMPORT_SERVICE(TextureService, svc_texture);
// Encoded file; filename follows the replacement naming convention.
TextureReplacementHandle handle = 0;
svc_texture->register_file(mod_ctx, "res/tex1_32x32_$_6.png", &handle);
// Raw data: match by texel-data pointer or by content hash (TEXTURE_KEY_SOURCE).
TextureKey key = TEXTURE_KEY_INIT;
key.kind = TEXTURE_KEY_POINTER;
key.pointer = someTexObj.data;
TextureData data = TEXTURE_DATA_INIT;
data.data = pixels; data.size = pixelsSize;
data.width = 32; data.height = 32; data.gx_format = GX_TF_RGBA8_PC;
svc_texture->register_data(mod_ctx, &key, &data, nullptr);
svc_texture->unregister(mod_ctx, handle);
```
Filenames use the same Dolphin-style convention as the user's `texture_replacements` directory:
`tex1_{w}x{h}_{texhash}[_{tluthash}]_{fmt}.dds|.png`, where hashes may be `$` (wildcard). `_mipN` sidecar files next to
a registered file are picked up automatically. Files are decoded lazily on first use by the renderer; raw data is copied
at registration. Registrations follow your mod's lifecycle.
See [Asset Overlays](#asset-overlays) for priority and conflict handling.
### ConfigService (`mods/svc/config.h`)
Persistent, mod-scoped configuration variables. Each var is stored in the user's `config.json` under
`mod.<escaped mod id>.<name>` (escaping: `.``_`, `_``__`, so `com.example.my_mod` becomes `com_example_my__mod`),
next to the host's own settings:
```cpp
IMPORT_SERVICE(ConfigService, svc_config);
ConfigVarDesc desc = CONFIG_VAR_DESC_INIT;
desc.name = "speedMultiplier"; // 1-64 chars from [A-Za-z0-9_-]; "enabled" is reserved
desc.type = CONFIG_VAR_FLOAT;
desc.default_float = 1.0;
ConfigVarHandle var = 0;
svc_config->register_var(mod_ctx, &desc, &var);
double speed = 1.0;
svc_config->get_float(mod_ctx, var, &speed);
svc_config->set_float(mod_ctx, var, 2.0);
// Optional: get notified when the value changes.
void on_speed_changed(ModContext* ctx, ConfigVarHandle var, const ConfigVarValue* value,
const ConfigVarValue* previous, void* user_data) {
/* value->float_value is the new value, previous->float_value the old one */
}
svc_config->subscribe(mod_ctx, var, on_speed_changed, nullptr, nullptr);
```
Types: `CONFIG_VAR_BOOL` (`bool`), `CONFIG_VAR_INT` (`int64_t`), `CONFIG_VAR_FLOAT` (`double`), `CONFIG_VAR_STRING`
(UTF-8; `get_string` copies into a caller buffer, pass a `NULL` buffer with size 0 to query the length). Accessors are
typed and must match the registration.
Change callbacks fire on the game thread whenever the value changes at runtime (your own `set_*` calls included).
Writes that store the same value are silent. Values applied from `config.json` or `--cvar` at registration do
**not** fire callbacks; read the value after `register_var` for the starting state.
### UiService (`mods/svc/ui.h`)
Integrate seamlessly with Dusklight's UI system: add controls and buttons to your mod's detail pane in the Mods window,
create custom windows and modal dialogs, apply custom RCSS stylesheets (anywhere!), and add menu bar tabs.
**Mod panel:** Registers or replaces the panel rendered in your mod's detail pane; `build` runs every time the detail
content is rebuilt, and `update` runs every frame while that mod is selected. While your mod is selected, the detail
pane carries your mod's id as a `mod-id` attribute (like custom window roots), so scoped RCSS can target it (e.g.
`[mod-id="com.example.mod"]`).
```cpp
IMPORT_SERVICE(UiService, svc_ui);
UiElementHandle statusText = 0;
ModResult build(ModContext*, UiElementHandle panel, void*, ModError*) {
svc_ui->pane_add_section(mod_ctx, panel, "Status");
svc_ui->pane_add_text(mod_ctx, panel, "starting...", &statusText);
svc_ui->pane_add_progress(mod_ctx, panel, 0.5f, nullptr);
return MOD_OK;
}
ModResult update(ModContext*, void*, ModError*) {
svc_ui->elem_set_text(mod_ctx, statusText, "running");
return MOD_OK;
}
UiModsPanelDesc panel = UI_MODS_PANEL_DESC_INIT;
panel.build = build;
panel.update = update;
svc_ui->register_mods_panel(mod_ctx, &panel);
```
Element setters must match the element kind: `elem_set_text`/`elem_set_rml` on text rows, and `elem_set_progress` on
progress bars. `elem_set_class` sets or clears an RCSS class on any element handle, for styling via scoped or
per-window RCSS. A non-`MOD_OK` result from `build`/`update` fails your mod, as do exceptions thrown from any UI
callback.
**Controls:** `pane_add_control` adds an input row described by a `UiControlDesc`: `UI_CONTROL_BUTTON`,
`UI_CONTROL_TOGGLE`, `UI_CONTROL_NUMBER`, `UI_CONTROL_STRING`, or `UI_CONTROL_SELECT`. Values bind with callbacks or
directly to a config var.
```cpp
UiControlDesc control = UI_CONTROL_DESC_INIT;
control.kind = UI_CONTROL_TOGGLE;
control.label = "Enable rainbows";
control.help_rml = "Shown in the help pane while focused.";
control.binding = UI_BINDING_CONFIG_VAR;
control.config_var = myBoolVar; // from svc_config->register_var
svc_ui->pane_add_control(mod_ctx, leftPane, &control, nullptr);
```
`UI_BINDING_CONFIG_VAR` wires persistence, change notifications, and the modified indicator automatically. The var
type must match the control: `TOGGLE` = bool, `NUMBER` and `SELECT` = int, `STRING` = string. Float vars are not
bindable; use callbacks and convert. `help_rml` and `SELECT` option lists render in a help pane, so `SELECT` controls
are only available inside window tabs.
**Windows:** `window_push` pushes a tabbed two-pane window onto the document stack and shows it. Each tab's `build`
receives the window handle plus fresh left and right pane handles on every activation. The optional per-tab `update`
runs each frame while that tab is active. `on_closed` fires when the window is destroyed. `desc.rcss` optionally styles
that window's document only; custom windows carry the owning mod's id as a `mod-id` attribute on the window root, so
scoped RCSS can target your specific mod's windows (e.g. `window[mod-id="com.example.mod"]`).
```cpp
UiTabDesc tabs[1] = {UI_TAB_DESC_INIT};
tabs[0].title = "Options";
tabs[0].build = build_options_tab;
UiWindowDesc desc = UI_WINDOW_DESC_INIT;
desc.tabs = tabs;
desc.tab_count = 1;
desc.on_closed = options_window_closed;
UiWindowHandle window = 0;
svc_ui->window_push(mod_ctx, &desc, &window);
```
**Dialogs:** `dialog_push` shows a modal dialog. `variant` picks the style, `icon` optionally overrides the variant's
default icon, and actions become buttons. After an action's `on_pressed` returns, the dialog closes unless the action
sets `keep_open`. A `keep_open` action can close it later (or immediately) with `dialog_close`. Cancel fires
`on_dismiss` if present and always closes. `dialog_set_body`, `dialog_set_icon`, and `dialog_add_action` mutate a live
dialog.
**Menu bar tabs:** `register_menu_tab` adds a tab to the in-game menu bar. `on_selected` fires when the user activates
the tab: typically you'd push a window from it. The tab is removed by `unregister_menu_tab`, or automatically when the
mod is disabled.
**Custom styles:** `register_styles(scope, rcss, &handle)` applies an RCSS stylesheet to every document of a scope:
existing documents restyle immediately, and future ones pick it up when created. `register_styles_file(scope, path,
&handle)` reads the sheet from your bundle's `res/` directory. Scopes are `UI_SCOPE_PRELAUNCH`, `UI_SCOPE_WINDOW`,
`UI_SCOPE_MENU_BAR`, `UI_SCOPE_OVERLAY`, `UI_SCOPE_TOUCH_CONTROLS`, and `UI_SCOPE_GRAPHICS_TUNER`. Sheets apply after
host styles and may override them. Scope selectors tightly (use `[mod-id="..."]`!), especially for `UI_SCOPE_WINDOW`,
unless changing host UI is intentional.
### GfxService (`mods/svc/gfx.h`)
**Requires `add_mod(... FEATURES webgpu)`**
Direct WebGPU access at various stages of the rendering pipeline. Mods use the `wgpu*` C API (via `webgpu/webgpu.h`) for
custom draws and compute dispatches. Mods must manage their own WebGPU state, including pipelines and bind groups.
```cpp
IMPORT_SERVICE(GfxService, svc_gfx);
GfxDeviceInfo info = GFX_DEVICE_INFO_INIT;
svc_gfx->get_device_info(mod_ctx, &info);
```
`register_stage_hook` runs a game-thread callback during frame recording. The public stages are:
- `GFX_STAGE_SCENE_BEGIN`: world camera window after camera/projection/light setup
- `GFX_STAGE_SCENE_AFTER_TERRAIN`: after terrain/shadow lists, before object and translucent lists
- `GFX_STAGE_SCENE_AFTER_OPAQUE`: after sky/terrain/object opaque lists, before translucent lists
- `GFX_STAGE_FRAME_BEFORE_HUD`: 3D scene and wipe are complete, before 2D/HUD lists
- `GFX_STAGE_FRAME_AFTER_HUD`: full game scene, including HUD
Inside a stage callback, record work with `push_draw`, stream per-frame data with `push_verts`, `push_indices`,
`push_uniform`, or `push_storage`, snapshot the current frame with `resolve_pass`, and use `create_pass`/`resolve_pass`
for temporary offscreen passes. Draw callbacks run later on the render worker thread with the live
`WGPURenderPassEncoder`; they may use only their `GfxDrawContext` handles and raw `wgpu*` calls. Compute callbacks
registered with `register_compute_type` follow the same worker-thread rule and run on the frame command encoder.
All WGPU handles from the service are borrowed. Resolved target views are valid for the current frame only. GPU objects
created by a mod are owned by that mod and should be released in `mod_shutdown`.
### CameraService (`mods/svc/camera.h`)
Converts a game view provided by a render callback into WebGPU-convention camera data. Matrix fields are column-major
`float[16]` values using the matrix * column-vector convention (transpose of the game's row-major `Mtx`/`Mtx44` layout),
ready to copy into WGSL `mat4x4f` uniforms.
```cpp
IMPORT_SERVICE(CameraService, svc_camera);
CameraInfo camera = CAMERA_INFO_INIT;
if (svc_camera->get_camera(mod_ctx, game_view, &camera) == MOD_OK) {
// camera.view_from_world, camera.proj_from_view, camera.eye, ...
}
```
`get_camera` returns `MOD_UNAVAILABLE` while the view is not a valid perspective camera, such as before the
first in-game frame. Projection matrices match the renderer's WebGPU clip convention and renderer depth convention
(reversed-Z by default).
---
## Hooking Game Functions
**Requires `add_mod(... FEATURES game)`**
Mods may hook the vast majority of game functions, including file-local static, private and virtual functions.
`mods/hook.hpp` provides typed helpers over the hook service:
```cpp
#include "mods/hook.hpp"
#include "mods/svc/hook.h"
IMPORT_SERVICE(HookService, svc_hook);
DEFINE_HOOK(&daAlink_c::posMove, LinkPosMove);
DEFINE_HOOK(&daAlink_c::execute, LinkExecute);
```
Every hook target must be **declared** at namespace scope with `DEFINE_HOOK` (a target you can name in C++) or
`DEFINE_HOOK_SYMBOL` (a symbol name).
### Pre-hooks
Run before the original. Return `HOOK_SKIP_ORIGINAL` to cancel it (post-hooks still run).
```cpp
HookAction on_pos_move_pre(ModContext*, void* args, void* retval, void* userdata) {
daAlink_c* link = mods::arg<daAlink_c*>(args, 0); // arg 0 is `this`
if (link->shape_angle.y > 10000) {
return HOOK_SKIP_ORIGINAL;
}
return HOOK_CONTINUE;
}
mods::hook_add_pre<LinkPosMove>(svc_hook, on_pos_move_pre);
```
### Post-hooks
Run after the original (or after a replace-hook, or after a cancelled original). `retval` points to the return value,
if any.
```cpp
void on_pos_move_post(ModContext*, void* args, void* retval, void* userdata) { ... }
mods::hook_add_post<LinkPosMove>(svc_hook, on_pos_move_post);
```
### Replace-hooks
Substitute the original entirely. Call through to it via the declaration's `g_orig` if needed:
```cpp
void on_execute_replace(ModContext*, void* args, void* retval, void*) {
int result = LinkExecute::g_orig(mods::arg<daAlink_c*>(args, 0));
if (retval != nullptr) {
*static_cast<int*>(retval) = result;
}
}
mods::hook_replace<LinkExecute>(svc_hook, on_execute_replace);
```
By default a second replace-hook on the same function is a conflict; `HookOptions` (`replace_policy`, `priority`,
`userdata`) controls this and callback ordering. Multiple mods can attach pre/post hooks to the same function
independently.
### Hooking by name
Functions you can't name in C++ (file-local statics, private class members, anything not in a header) can be hooked by
symbol name instead. You must supply the signature along with the name.
```cpp
DEFINE_HOOK_SYMBOL("daAlink_hookshotAtHitCallBack",
void(fopAc_ac_c*, dCcD_GObjInf*, fopAc_ac_c*, dCcD_GObjInf*), HookshotHit);
mods::hook_add_pre<HookshotHit>(svc_hook, on_hookshot_hit_pre);
...
HookshotHit::g_orig(link, atObjInf, target, tgObjInf); // call through to the original
```
Class member functions must include `Class*` as the first argument.
Two spellings work on every platform:
- **Display names** (`daAlink_c::posMove`, `fapGm_Before`): the qualified name with no parameter list. They carry no
signature, so overload sets (and file-local statics sharing a name) return `MOD_CONFLICT`.
- **Decorated names** (`_ZN9daAlink_c7posMoveEv` / `?posMove@daAlink_c@@...`): the platform's mangled spelling in
dlsym convention (no Mach-O leading underscore). The escape hatch for overloads.
Installing fails with `MOD_UNAVAILABLE` when it didn't resolve (missing, ambiguous, or no symbol manifest). Unlike
`DEFINE_HOOK`, the signature is **not** compiler-checked: a mismatched signature will corrupt the
call.
### Reading and writing arguments
`args` is an array of pointers to the arguments. For member functions, index 0 is `this`; parameters follow in
declaration order.
```cpp
T value = mods::arg<T>(args, n); // copy
T& ref = mods::arg_ref<T>(args, n); // read/write reference
```
```cpp
DEFINE_HOOK(fopAcM_createItem, CreateItem);
// fpc_ProcID fopAcM_createItem(..., int itemNo, ...): turn heart drops into green rupees
HookAction on_create_item_pre(ModContext*, void* args, void*, void*) {
int& itemNo = mods::arg_ref<int>(args, 1);
if (itemNo == dItemNo_HEART_e) {
itemNo = dItemNo_GREEN_RUPEE_e;
}
return HOOK_CONTINUE;
}
mods::hook_add_pre<CreateItem>(svc_hook, on_create_item_pre);
```
For reference parameters (e.g. `const cXyz& pos`), `arg_ref<cXyz>` yields a direct reference.
---
## Asset Overlays
Files placed under `overlay/` in the `.dusk` archive override game files at the corresponding path, equivalent to
replacing files in the .iso. This requires no code: an archive with just `mod.json` and `overlay/` is a complete mod.
Files placed under `textures/` register as texture replacements, and act just like the user's general
`texture_replacements/` directory: Dolphin-style naming, matched by texture hash
(`tex1_{w}x{h}_{texhash}[_{tluthash}]_{fmt}.dds|.png`, `$` as a hash wildcard). Subdirectories are scanned recursively;
only the filename needs to match.
Both mechanisms are tied to the mod's lifecycle: disabling the mod removes its overrides (files revert to the disc
contents on their next open; added files stop existing), and reloading serves the new bundle's content. However, game
data the engine already read stays as-is until it is loaded again, which may require a scene change or, in the worst
case, a full restart. Texture replacements usually take effect immediately.
If multiple sources replace the same file or texture, the last one wins: runtime registrations override static
`textures/` or `overlay/` files, and later-loaded mods override earlier ones. Cross-mod conflicts log warnings.
**All** mod-provided texture replacements override the user's `texture_replacements/`.
To configure overlays and texture replacements at runtime instead, see [OverlayService](#overlayservice-modssvcoverlayh)
and [TextureService](#textureservice-modssvctextureh).
---
## Runtime Lifecycle
Mods can be disabled, re-enabled, and reloaded at runtime without restarting the game (the enabled state persists as the
`mod.<escaped id>.enabled` config var). Write your mod assuming this happens:
- **Disable** calls `mod_shutdown`, removes your hooks, services, overlays, and texture replacements (both static and
runtime-registered), and unloads your library.
- **Enable** and **Reload** load a *fresh copy* of your library, imports are re-resolved, and `mod_initialize` runs
again. You never see a second `mod_initialize` on the same image, so just make `mod_shutdown` release anything the
loader doesn't manage for you (threads, files, game-side state you mutated).
- **Reload** additionally re-reads the `.dusk` from disk, picking up a rebuilt library and changed assets. This is the
fast iteration loop during development: rebuild, click Reload.
**Dependents restart too.** Disabling or reloading a mod that exports services shuts down the mods importing them
first (in reverse dependency order) and brings them back afterward. A mod whose *required* provider is disabled stays
suspended and resumes automatically when the provider returns. Mods with an *optional* import of a disabled provider
restart with that import null.
**One caution for hooks:** lifecycle changes are applied between frames, which is safe for hooks on functions
that return every frame (effectively everything you'd normally hook). Avoid hooking a function that stays on
the stack for the whole session (e.g. the outermost main loop); a mod that does cannot be safely unloaded.
---
## Error Handling
Service calls report failure through `ModResult` return values (`MOD_OK`, `MOD_UNAVAILABLE`,
`MOD_INVALID_ARGUMENT`, ...). Lifecycle exports additionally receive a `ModError*`: fill it (e.g. with
`mods::set_error(error, code, "message")`) and return the code, and the loader disables the mod and shows the
message to the user.
```cpp
MOD_EXPORT ModResult mod_initialize(ModError* error) {
if (!load_my_data()) {
return mods::set_error(error, MOD_ERROR, "failed to load data");
}
return MOD_OK;
}
```
Throwing exceptions out of lifecycle functions also disables the mod (they are caught by the loader), but prefer
explicit results.
---
## Advanced
### Exporting Services
Mods may export services of their own, permitting framework mods and cross-mod integration. Define the interface in a
header both mods share:
```cpp
// my_mod_api.h
#include "mods/api.h"
#define MY_MOD_SERVICE_ID "com.example.my_mod.api"
#define MY_MOD_SERVICE_MAJOR 1u
#define MY_MOD_SERVICE_MINOR 0u
typedef struct MyModService {
ServiceHeader header;
ModResult (*do_thing)(ModContext* ctx, int value);
} MyModService;
#ifdef __cplusplus
#include "mods/service.hpp"
template <>
struct mods::ServiceTraits<MyModService> {
static constexpr const char* id = MY_MOD_SERVICE_ID;
static constexpr uint16_t major_version = MY_MOD_SERVICE_MAJOR;
static constexpr uint16_t minor_version = MY_MOD_SERVICE_MINOR;
};
#endif
```
**Provider:**
```cpp
ModResult do_thing(ModContext* ctx, int value) { ... }
constexpr MyModService g_service{
.header = SERVICE_HEADER(MyModService, MY_MOD_SERVICE_MAJOR, MY_MOD_SERVICE_MINOR),
.do_thing = do_thing,
};
EXPORT_SERVICE(g_service);
```
**Consumer:**
```cpp
IMPORT_SERVICE(MyModService, svc_my_mod);
// or IMPORT_OPTIONAL_SERVICE if the dependency is optional
svc_my_mod->do_thing(mod_ctx, 42);
```
The loader registers all exports before resolving any imports, so declaration order between mods doesn't matter. Note
that the `ctx` a provider receives identifies the *calling* mod.
#### Dependencies between mods
Service imports are also dependency declarations: the loader initializes mods in dependency order, so by the time your
`mod_initialize` runs, every mod you import services from (required *or* optional) has already finished its own
`mod_initialize`. This includes deferred services: a service the provider publishes during its initialization resolves
into your import slot just like a static export.
Consequences of that contract:
- If a provider fails to load, every mod that *requires* one of its services is disabled too, with an error naming the
provider. Optional imports of a failed provider simply resolve to `NULL`.
- Mods whose **required** imports form a cycle all fail to load. If the cycle runs through an **optional** import, the
loader breaks it there: the optional import still resolves, but its provider may not be initialized yet when you run.
- `svc_host->get_service(...)` is outside this system. It sees whatever is published at call time and gives no
initialization-order guarantee, which also makes it the escape hatch for intentionally cyclic designs.
Mods shut down in reverse initialization order, so services you import remain safe to call from `mod_shutdown`.
Rules for providers:
- Service IDs are global and use reverse-DNS names (e.g. `com.mydomain.mod.service`)
- Every function pointer covered by your declared minor version must be populated.
- Within a major version, only append fields; never reorder, remove, or repurpose them. Breaking changes require a major
bump (which is, in effect, a new service).
- Only one provider per `(id, major)` pair may be registered; duplicates are load errors.
For services whose construction can't happen at static-init time, declare the export with `EXPORT_DEFERRED_SERVICE(...)`
and publish the pointer later via `svc_host->publish_service(...)`. Consumers can fetch services dynamically with
`svc_host->get_service(...)`; prefer manifest imports whenever possible, since they give the loader dependency
information and fail fast with good errors.
### Native Runtime Libraries
`RUNTIME_LIBRARIES` passed to `add_mod` are packaged beside the mod's native module in `lib/<platform>/`. Dusklight
extracts the whole directory before loading the mod, so libraries linked by the mod resolve normally. The SDK links the
mod itself with `$ORIGIN` on Linux and `@loader_path` on Apple platforms; runtime libraries with their own non-system
dependencies must also be built with origin-relative lookup paths. On Windows, Dusklight uses an isolated DLL search
rooted at this directory.
```cmake
add_mod(my_mod
SOURCES src/mod.cpp
MOD_JSON mod.json
RUNTIME_LIBRARIES "${VENDOR_RUNTIME_LIBRARY}")
```
SDKs that load plugins by directory can pass them the absolute runtime path from the current HostService:
```cpp
IMPORT_SERVICE(HostService, svc_host);
const char* nativeDir = svc_host->native_dir(mod_ctx); // read-only
```
Libraries loaded explicitly by the mod remain its responsibility: stop their threads and unload them during
`mod_shutdown`. Do not write into `native_dir`; use `mod_dir` for writable state. Native library namespaces are
process-wide on some platforms, so two mods cannot safely assume that incompatible libraries with the same filename
will remain isolated.
+1 -1
+164 -101
View File
@@ -1411,107 +1411,71 @@ set(DOLPHIN_FILES
)
set(DUSK_FILES
include/helpers/batch.hpp
include/helpers/endian_gx.hpp
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/OSContext.cpp
src/dusk/OSMutex.cpp
src/dusk/OSReport.cpp
src/dusk/OSThread.cpp
src/dusk/achievements.cpp
src/dusk/action_bindings.cpp
src/dusk/action_bindings.h
src/dusk/android_frame_rate.cpp
src/dusk/android_frame_rate.hpp
src/dusk/android_frame_rate.cpp
src/dusk/asserts.cpp
src/dusk/autosave.cpp
src/dusk/batch.cpp
src/dusk/batch.hpp
src/dusk/config.cpp
src/dusk/config.hpp
src/dusk/crash_handler.cpp
src/dusk/crash_reporting.cpp
src/dusk/data.cpp
src/dusk/data.hpp
src/dusk/discord.cpp
src/dusk/discord.hpp
src/dusk/discord_presence.cpp
src/dusk/dvd_asset.cpp
src/dusk/dvd_asset.hpp
src/dusk/endian.cpp
src/dusk/extras.c
src/dusk/file_select.cpp
src/dusk/file_select.hpp
src/dusk/frame_interpolation.cpp
src/dusk/game_clock.cpp
src/dusk/gamepad_color.cpp
src/dusk/globals.cpp
src/dusk/gyro.cpp
src/dusk/http/http.hpp
src/dusk/imgui/ImGuiActorSpawner.cpp
src/dusk/imgui/ImGuiBloomWindow.cpp
src/dusk/imgui/ImGuiBloomWindow.hpp
src/dusk/imgui/ImGuiCameraOverlay.cpp
src/dusk/imgui/ImGuiConfig.hpp
src/dusk/imgui/ImGuiConsole.cpp
src/dusk/imgui/ImGuiConsole.hpp
src/dusk/imgui/ImGuiControllerOverlay.cpp
src/dusk/imgui/ImGuiEngine.cpp
src/dusk/imgui/ImGuiEngine.hpp
src/dusk/imgui/ImGuiHeapOverlay.cpp
src/dusk/imgui/ImGuiMenuTools.cpp
src/dusk/imgui/ImGuiMenuTools.hpp
src/dusk/imgui/ImGuiProcessOverlay.cpp
src/dusk/imgui/ImGuiSaveEditor.cpp
src/dusk/imgui/ImGuiStateShare.cpp
src/dusk/imgui/ImGuiStateShare.hpp
src/dusk/imgui/ImGuiStubLog.cpp
src/dusk/io.cpp
src/dusk/iso_validate.cpp
src/dusk/layout.cpp
src/dusk/livesplit.cpp
src/dusk/logging.cpp
include/dusk/menu_pointer.h
src/dusk/menu_pointer.cpp
src/dusk/menu_pointer.h
src/dusk/mods/loader/bundle_disk.cpp
src/dusk/mods/loader/bundle_zip.cpp
src/dusk/mods/loader/context.cpp
src/dusk/mods/loader/depgraph.cpp
src/dusk/mods/loader/depgraph.hpp
src/dusk/mods/loader/loader.cpp
src/dusk/mods/loader/loader.hpp
src/dusk/mods/loader/native_module.cpp
src/dusk/mods/loader/native_module.hpp
src/dusk/mods/loader/prepatch.cpp
src/dusk/mods/loader/prepatch.hpp
src/dusk/mods/log_buffer.cpp
src/dusk/mods/log_buffer.hpp
src/dusk/mods/manifest.cpp
src/dusk/mods/manifest.hpp
src/dusk/mods/svc/audio_res/audio_res.hpp
src/dusk/mods/svc/audio_res/audio_res.cpp
src/dusk/mods/svc/audio_res/wave.cpp
src/dusk/mods/svc/audio_res/opus.cpp
src/dusk/mods/svc/camera.cpp
src/dusk/mods/svc/config.cpp
src/dusk/mods/svc/config.hpp
src/dusk/mods/svc/game.cpp
src/dusk/mods/svc/gfx.cpp
src/dusk/mods/svc/hook.cpp
src/dusk/mods/svc/host.cpp
src/dusk/mods/svc/log.cpp
src/dusk/mods/svc/overlay.cpp
src/dusk/mods/svc/registry.cpp
src/dusk/mods/svc/registry.hpp
src/dusk/mods/svc/resource.cpp
src/dusk/mods/svc/texture.cpp
src/dusk/mods/svc/ui.cpp
src/dusk/mods/svc/ui.hpp
src/dusk/mouse.cpp
src/dusk/scope_guard.hpp
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/string.cpp
src/dusk/stubs.cpp
include/dusk/texture_replacements.hpp
src/dusk/texture_replacements.cpp
src/dusk/texture_replacements.hpp
src/dusk/touch_camera.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/ImGuiBloomWindow.cpp
src/dusk/imgui/ImGuiBloomWindow.hpp
src/dusk/imgui/ImGuiMenuTools.cpp
src/dusk/imgui/ImGuiMenuTools.hpp
src/dusk/imgui/ImGuiMenuRandomizer.cpp
src/dusk/imgui/ImGuiMenuRandomizer.hpp
src/dusk/imgui/ImGuiArchipelagoDebug.cpp
src/dusk/imgui/ImGuiActorSpawner.cpp
src/dusk/imgui/ImGuiProcessOverlay.cpp
src/dusk/imgui/ImGuiCameraOverlay.cpp
src/dusk/imgui/ImGuiHeapOverlay.cpp
src/dusk/imgui/ImGuiControllerOverlay.cpp
src/dusk/imgui/ImGuiStubLog.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
@@ -1520,9 +1484,11 @@ set(DUSK_FILES
src/dusk/ui/button.hpp
src/dusk/ui/component.cpp
src/dusk/ui/component.hpp
src/dusk/ui/controls.hpp
src/dusk/ui/controller_config.cpp
src/dusk/ui/controller_config.hpp
src/dusk/ui/controls.hpp
src/dusk/ui/cosmetics.hpp
src/dusk/ui/cosmetics.cpp
src/dusk/ui/document.cpp
src/dusk/ui/document.hpp
src/dusk/ui/editor.cpp
@@ -1531,22 +1497,12 @@ set(DUSK_FILES
src/dusk/ui/event.hpp
src/dusk/ui/graphics_tuner.cpp
src/dusk/ui/graphics_tuner.hpp
src/dusk/ui/icon_provider.cpp
src/dusk/ui/icon_provider.hpp
src/dusk/ui/input.cpp
src/dusk/ui/input.hpp
src/dusk/ui/logs_window.cpp
src/dusk/ui/logs_window.hpp
src/dusk/ui/menu_bar.cpp
src/dusk/ui/menu_bar.hpp
src/dusk/ui/mod_texture_provider.cpp
src/dusk/ui/mod_texture_provider.hpp
src/dusk/ui/mod_window.cpp
src/dusk/ui/mod_window.hpp
src/dusk/ui/icon_provider.cpp
src/dusk/ui/icon_provider.hpp
src/dusk/ui/modal.cpp
src/dusk/ui/modal.hpp
src/dusk/ui/mods_window.cpp
src/dusk/ui/mods_window.hpp
src/dusk/ui/nav_types.hpp
src/dusk/ui/number_button.cpp
src/dusk/ui/number_button.hpp
@@ -1554,6 +1510,8 @@ set(DUSK_FILES
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
@@ -1568,10 +1526,10 @@ set(DUSK_FILES
src/dusk/ui/string_button.hpp
src/dusk/ui/tab_bar.cpp
src/dusk/ui/tab_bar.hpp
src/dusk/ui/touch_controls.cpp
src/dusk/ui/touch_controls.hpp
src/dusk/ui/touch_controls_common.cpp
src/dusk/ui/touch_controls_common.hpp
src/dusk/ui/touch_controls.cpp
src/dusk/ui/touch_controls.hpp
src/dusk/ui/touch_controls_editor.cpp
src/dusk/ui/touch_controls_editor.hpp
src/dusk/ui/ui.cpp
@@ -1580,14 +1538,119 @@ set(DUSK_FILES
src/dusk/ui/warp.hpp
src/dusk/ui/window.cpp
src/dusk/ui/window.hpp
src/dusk/update_check.cpp
src/dusk/update_check.hpp
src/dusk/ui/rando_config.cpp
src/dusk/ui/rando_config.hpp
src/dusk/ui/rando_seed_generation.cpp
src/dusk/ui/rando_seed_generation.hpp
src/dusk/ui/archi_connect_modal.cpp
src/dusk/ui/archi_connect_modal.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/helpers/batch.cpp
src/helpers/endian.cpp
src/helpers/offset_ptr.cpp
src/helpers/string.cpp
src/helpers/cast.cpp
src/dusk/action_bindings.cpp
src/dusk/cosmetics/color_utils.hpp
src/dusk/cosmetics/color_utils.cpp
src/dusk/cosmetics/texture_utils.hpp
src/dusk/cosmetics/texture_utils.cpp
# Randomizer files
src/dusk/randomizer/game/flags.cpp
src/dusk/randomizer/game/flags.h
src/dusk/randomizer/game/messages.cpp
src/dusk/randomizer/game/messages.hpp
src/dusk/randomizer/game/stages.cpp
src/dusk/randomizer/game/stages.h
src/dusk/randomizer/game/tools.cpp
src/dusk/randomizer/game/tools.h
src/dusk/randomizer/game/verify_item_functions.cpp
src/dusk/randomizer/game/verify_item_functions.h
src/dusk/randomizer/game/randomizer_context.cpp
src/dusk/randomizer/game/randomizer_context.hpp
src/dusk/randomizer/generator/logic/area.cpp
src/dusk/randomizer/generator/logic/area.hpp
src/dusk/randomizer/generator/logic/dungeon.cpp
src/dusk/randomizer/generator/logic/dungeon.hpp
src/dusk/randomizer/generator/logic/entrance.cpp
src/dusk/randomizer/generator/logic/entrance.hpp
src/dusk/randomizer/generator/logic/entrance_shuffle.cpp
src/dusk/randomizer/generator/logic/entrance_shuffle.hpp
src/dusk/randomizer/generator/logic/fill.cpp
src/dusk/randomizer/generator/logic/fill.hpp
src/dusk/randomizer/generator/logic/flatten/bits.cpp
src/dusk/randomizer/generator/logic/flatten/bits.hpp
src/dusk/randomizer/generator/logic/flatten/flatten.cpp
src/dusk/randomizer/generator/logic/flatten/flatten.hpp
src/dusk/randomizer/generator/logic/flatten/simplify_algebraic.cpp
src/dusk/randomizer/generator/logic/flatten/simplify_algebraic.hpp
src/dusk/randomizer/generator/logic/hints.cpp
src/dusk/randomizer/generator/logic/hints.hpp
src/dusk/randomizer/generator/logic/item.cpp
src/dusk/randomizer/generator/logic/item.hpp
src/dusk/randomizer/generator/logic/item_pool.cpp
src/dusk/randomizer/generator/logic/item_pool.hpp
src/dusk/randomizer/generator/logic/location.cpp
src/dusk/randomizer/generator/logic/location.hpp
src/dusk/randomizer/generator/logic/plandomizer.cpp
src/dusk/randomizer/generator/logic/plandomizer.hpp
src/dusk/randomizer/generator/logic/requirement.cpp
src/dusk/randomizer/generator/logic/requirement.hpp
src/dusk/randomizer/generator/logic/search.cpp
src/dusk/randomizer/generator/logic/search.hpp
src/dusk/randomizer/generator/logic/spoiler_log.cpp
src/dusk/randomizer/generator/logic/spoiler_log.hpp
src/dusk/randomizer/generator/logic/world.cpp
src/dusk/randomizer/generator/logic/world.hpp
src/dusk/randomizer/generator/randomizer.cpp
src/dusk/randomizer/generator/randomizer.hpp
src/dusk/randomizer/generator/seedgen/config.cpp
src/dusk/randomizer/generator/seedgen/config.hpp
src/dusk/randomizer/generator/seedgen/packed_bits.hpp
src/dusk/randomizer/generator/seedgen/seed.cpp
src/dusk/randomizer/generator/seedgen/seed.hpp
src/dusk/randomizer/generator/seedgen/settings.cpp
src/dusk/randomizer/generator/seedgen/settings.hpp
src/dusk/randomizer/generator/test/test.cpp
src/dusk/randomizer/generator/test/test.hpp
src/dusk/randomizer/generator/utility/base64pp.hpp
src/dusk/randomizer/generator/utility/color.cpp
src/dusk/randomizer/generator/utility/color.hpp
src/dusk/randomizer/generator/utility/crc32.hpp
src/dusk/randomizer/generator/utility/common.cpp
src/dusk/randomizer/generator/utility/common.hpp
src/dusk/randomizer/generator/utility/container.hpp
src/dusk/randomizer/generator/utility/endian.cpp
src/dusk/randomizer/generator/utility/endian.hpp
src/dusk/randomizer/generator/utility/exception.hpp
src/dusk/randomizer/generator/utility/file.cpp
src/dusk/randomizer/generator/utility/file.hpp
src/dusk/randomizer/generator/utility/general.hpp
src/dusk/randomizer/generator/utility/log.cpp
src/dusk/randomizer/generator/utility/log.hpp
src/dusk/randomizer/generator/utility/math.hpp
src/dusk/randomizer/generator/utility/path.cpp
src/dusk/randomizer/generator/utility/path.hpp
src/dusk/randomizer/generator/utility/platform.cpp
src/dusk/randomizer/generator/utility/platform.hpp
src/dusk/randomizer/generator/utility/random.cpp
src/dusk/randomizer/generator/utility/random.hpp
src/dusk/randomizer/generator/utility/string.cpp
src/dusk/randomizer/generator/utility/string.hpp
src/dusk/randomizer/generator/utility/text.cpp
src/dusk/randomizer/generator/utility/text.hpp
src/dusk/randomizer/generator/utility/thread_local.hpp
src/dusk/randomizer/generator/utility/time.cpp
src/dusk/randomizer/generator/utility/time.hpp
src/dusk/randomizer/generator/utility/yaml.hpp
# Archipelago Files
src/dusk/archipelago/archipelago_context.cpp
)
set(DUSK_HTTP_BACKEND_FILES
+3 -3
View File
@@ -88,9 +88,9 @@ struct DynamicModuleControl : DynamicModuleControlBase {
/* 0x24 */ s32 mSize;
/* 0x28 */ mDoDvdThd_callback_c* mAsyncLoadCallback;
static DUSK_GAME_DATA u32 sAllocBytes;
static DUSK_GAME_DATA JKRArchive* sArchive;
static DUSK_GAME_DATA JKRFileCache* sFileCache;
static u32 sAllocBytes;
static JKRArchive* sArchive;
static JKRFileCache* sFileCache;
};
#endif /* DYNAMICLINK_H */
+1 -1
View File
@@ -12,6 +12,6 @@ struct cAPI_Interface {
/* 0x14 */ cAPIGph_Mthd blankingOffMtd;
};
DUSK_GAME_EXTERN cAPI_Interface g_cAPI_Interface;
extern cAPI_Interface g_cAPI_Interface;
#endif /* C_API_H */
+5 -5
View File
@@ -24,11 +24,11 @@ private:
s16 mAngle;
public:
const static DUSK_GAME_DATA cSAngle _0;
const static DUSK_GAME_DATA cSAngle _1;
const static DUSK_GAME_DATA cSAngle _90;
const static DUSK_GAME_DATA cSAngle _180;
const static DUSK_GAME_DATA cSAngle _270;
const static cSAngle _0;
const static cSAngle _1;
const static cSAngle _90;
const static cSAngle _180;
const static cSAngle _270;
#ifdef __MWERKS__
cSAngle() {}
~cSAngle() {}
+1 -1
View File
@@ -5,7 +5,7 @@
#include "f_pc/f_pc_base.h"
#include "SSystem/SComponent/c_bg_s_grp_pass_chk.h"
#include "SSystem/SComponent/c_bg_s_poly_pass_chk.h"
#include "helpers/endian.h"
#include "dusk/endian.h"
struct cBgD_Vtx_t : public Vec {};
@@ -20,7 +20,7 @@ public:
/* 0x14 */ cM3dGAab mM3dGAab;
/* 0x30 */ cBgS_ShdwDraw_Callback mCallbackFun;
#if PARTIAL_DEBUG || DEBUG
#if DEBUG
/* 0x34 */ int field_0x34;
#endif
};
+1 -1
View File
@@ -435,7 +435,7 @@ public:
cM3dGAab& GetWorkAab() { return mAab; }
static DUSK_GAME_DATA cXyz m_virtual_center;
static cXyz m_virtual_center;
};
STATIC_ASSERT(0x20 == sizeof(cCcD_ShapeAttr));
+1 -1
View File
@@ -9,7 +9,7 @@ struct counter_class {
u32 mTimer;
};
DUSK_GAME_EXTERN counter_class g_Counter;
extern counter_class g_Counter;
void cCt_Counter(int resetCounter1);
+1 -1
View File
@@ -102,6 +102,6 @@ void MtxPosition(cXyz DUSK_CONST*, cXyz*);
void MtxPush(void);
void MtxPull(void);
DUSK_GAME_EXTERN Mtx* calc_mtx;
extern Mtx* calc_mtx;
#endif
+1 -1
View File
@@ -20,7 +20,7 @@ struct cM3d_Range {
};
#define G_CM3D_F_INF (1000000000.0f)
DUSK_GAME_EXTERN const f32 G_CM3D_F_ABS_MIN;
extern const f32 G_CM3D_F_ABS_MIN;
static void cM3d_InDivPos1(const Vec*, const Vec*, f32, Vec*);
void cM3d_InDivPos2(const Vec*, const Vec*, f32, Vec*);
+1 -1
View File
@@ -2,7 +2,7 @@
#define C_M3D_G_TRI_H_
#include "SSystem/SComponent/c_m3d_g_pla.h"
#include "helpers/endian.h"
#include "dusk/endian.h"
class cM3dGCyl;
+1 -1
View File
@@ -6,7 +6,7 @@
class JKRHeap;
struct cMl {
static DUSK_GAME_DATA JKRHeap* Heap;
static JKRHeap* Heap;
static void init(JKRHeap*);
static void* memalignB(int, u32);
static void free(void*);
+1 -1
View File
@@ -9,7 +9,7 @@ struct SVec {
class csXyz : public SVec {
public:
static DUSK_GAME_DATA const csXyz Zero;
static const csXyz Zero;
~csXyz() {}
csXyz() {}
csXyz(s16, s16, s16);
+8 -8
View File
@@ -14,14 +14,14 @@ struct cXy {
};
struct cXyz : Vec {
static DUSK_GAME_DATA const cXyz Zero;
static DUSK_GAME_DATA const cXyz BaseX;
static DUSK_GAME_DATA const cXyz BaseY;
static DUSK_GAME_DATA const cXyz BaseZ;
static DUSK_GAME_DATA const cXyz BaseXY;
static DUSK_GAME_DATA const cXyz BaseXZ;
static DUSK_GAME_DATA const cXyz BaseYZ;
static DUSK_GAME_DATA const cXyz BaseXYZ;
static const cXyz Zero;
static const cXyz BaseX;
static const cXyz BaseY;
static const cXyz BaseZ;
static const cXyz BaseXY;
static const cXyz BaseXZ;
static const cXyz BaseYZ;
static const cXyz BaseXYZ;
#ifdef __MWERKS__
cXyz() {}
~cXyz() {}
+2 -2
View File
@@ -256,7 +256,7 @@ inline Z2Audience* Z2GetAudience() {
return JASGlobalInstance<Z2Audience>::getInstance();
}
DUSK_GAME_EXTERN s8 data_80451358;
DUSK_GAME_EXTERN s8 data_80451359;
extern s8 data_80451358;
extern s8 data_80451359;
#endif /* Z2AUDIENCE_H */
+1 -3
View File
@@ -34,7 +34,7 @@ public:
bool isResetting() { return mResettingFlag; }
static Z2AudioMgr* getInterface() { return mAudioMgrPtr; }
static DUSK_GAME_DATA Z2AudioMgr* mAudioMgrPtr;
static Z2AudioMgr* mAudioMgrPtr;
/* 0x0514 */ virtual bool startSound(JAISoundID soundID, JAISoundHandle* handle, const JGeometry::TVec3<f32>* posPtr);
/* 0x0518 */ bool mResettingFlag;
@@ -48,8 +48,6 @@ public:
/* 0x1370 */ Z2FxLineMgr mFxLineMgr;
#if DEBUG
/* 0x13BC */ Z2DebugSys mDebugSys;
#elif PARTIAL_DEBUG
alignas(Z2DebugSys) u8 mDebugSys[sizeof(Z2DebugSys)];
#endif
}; // Size: 0x138C
+2 -2
View File
@@ -42,8 +42,8 @@ f32 getParamByExp(f32 value, f32 inMin, f32 inMax, f32 exponent, f32 outMin, f32
f32 getRandom(f32 magnitude, f32 exponent, f32 bias);
f32 getRandom_0_1();
DUSK_GAME_EXTERN const f32 cEqualCSlope;
DUSK_GAME_EXTERN const f32 cEqualPSlope;
extern const f32 cEqualCSlope;
extern const f32 cEqualPSlope;
} // namespace Z2Calc
#endif /* Z2CALC_H */
+1 -1
View File
@@ -175,7 +175,7 @@ struct Z2EnvSeMgr : public JASGlobalInstance<Z2EnvSeMgr> {
STATIC_ASSERT(sizeof(Z2EnvSeMgr) == 0x30C);
DUSK_GAME_EXTERN Z2EnvSeMgr g_mEnvSeMgr;
extern Z2EnvSeMgr g_mEnvSeMgr;
inline Z2EnvSeMgr* Z2GetEnvSeMgr() {
return JASGlobalInstance<Z2EnvSeMgr>::getInstance();
+1 -1
View File
@@ -57,7 +57,7 @@ public:
void setUsingIronBall(bool isUsingIronBall) { mUsingIronBall = isUsingIronBall; }
void setMarkState(u8 state) { mMarkState = state; }
static DUSK_GAME_DATA Z2CreatureLink* mLinkPtr;
static Z2CreatureLink* mLinkPtr;
static Z2CreatureLink* getLink() { return mLinkPtr; }
friend class Z2LinkSoundStarter;
+52 -52
View File
@@ -4,72 +4,72 @@
#include <types.h>
struct Z2Param {
static DUSK_GAME_DATA f32 DISTANCE_MAX;
static DUSK_GAME_DATA f32 MAX_VOLUME_DISTANCE;
static DUSK_GAME_DATA f32 DOLBY_CENTER_VALUE;
static DUSK_GAME_DATA f32 DOLBY_FLONT_DISTANCE_MAX;
static DUSK_GAME_DATA f32 DOLBY_BEHIND_DISTANCE_MAX;
static DUSK_GAME_DATA f32 DISTANCE_FX_PARAM;
static DUSK_GAME_DATA f32 SONIC_SPEED;
static DUSK_GAME_DATA f32 VOL_BGM_DEFAULT;
static DUSK_GAME_DATA f32 VOL_SE_SYSTEM_DEFAULT;
static DUSK_GAME_DATA f32 VOL_SE_LINK_VOICE_DEFAULT;
static DUSK_GAME_DATA f32 VOL_SE_LINK_MOTION_DEFAULT;
static DUSK_GAME_DATA f32 VOL_SE_LINK_FOOTNOTE_DEFAULT;
static DUSK_GAME_DATA f32 VOL_SE_CHAR_VOICE_DEFAULT;
static DUSK_GAME_DATA f32 VOL_SE_CHAR_MOVE_DEFAULT;
static DUSK_GAME_DATA f32 VOL_SE_OBJECT_DEFAULT;
static DUSK_GAME_DATA f32 VOL_SE_ATMOSPHERE_DEFAULT;
static DUSK_GAME_DATA f32 VOL_BGM_TALKING;
static DUSK_GAME_DATA f32 VOL_SE_SYSTEM_TALKING;
static DUSK_GAME_DATA f32 VOL_SE_LINK_VOICE_TALKING;
static DUSK_GAME_DATA f32 VOL_SE_LINK_MOTION_TALKING;
static DUSK_GAME_DATA f32 VOL_SE_LINK_FOOTNOTE_TALKING;
static DUSK_GAME_DATA f32 VOL_SE_CHAR_VOICE_TALKING;
static DUSK_GAME_DATA f32 VOL_SE_CHAR_MOVE_TALKING;
static DUSK_GAME_DATA f32 VOL_SE_OBJECT_TALKING;
static DUSK_GAME_DATA f32 VOL_SE_ATMOSPHERE_TALKING;
static DUSK_GAME_DATA f32 VOL_BGM_PAUSING;
static DUSK_GAME_DATA f32 VOL_SE_SYSTEM_PAUSING;
static DUSK_GAME_DATA f32 VOL_SE_LINK_VOICE_PAUSING;
static DUSK_GAME_DATA f32 VOL_SE_LINK_MOTION_PAUSING;
static DUSK_GAME_DATA f32 VOL_SE_LINK_FOOTNOTE_PAUSING;
static DUSK_GAME_DATA f32 VOL_SE_CHAR_VOICE_PAUSING;
static DUSK_GAME_DATA f32 VOL_SE_CHAR_MOVE_PAUSING;
static DUSK_GAME_DATA f32 VOL_SE_OBJECT_PAUSING;
static DUSK_GAME_DATA f32 VOL_SE_ATMOSPHERE_PAUSING;
static DUSK_GAME_DATA f32 MIN_DISTANCE_VOLUME;
static DUSK_GAME_DATA f32 ENEMY_LASTHIT_MUTE_VOLUME;
static f32 DISTANCE_MAX;
static f32 MAX_VOLUME_DISTANCE;
static f32 DOLBY_CENTER_VALUE;
static f32 DOLBY_FLONT_DISTANCE_MAX;
static f32 DOLBY_BEHIND_DISTANCE_MAX;
static f32 DISTANCE_FX_PARAM;
static f32 SONIC_SPEED;
static f32 VOL_BGM_DEFAULT;
static f32 VOL_SE_SYSTEM_DEFAULT;
static f32 VOL_SE_LINK_VOICE_DEFAULT;
static f32 VOL_SE_LINK_MOTION_DEFAULT;
static f32 VOL_SE_LINK_FOOTNOTE_DEFAULT;
static f32 VOL_SE_CHAR_VOICE_DEFAULT;
static f32 VOL_SE_CHAR_MOVE_DEFAULT;
static f32 VOL_SE_OBJECT_DEFAULT;
static f32 VOL_SE_ATMOSPHERE_DEFAULT;
static f32 VOL_BGM_TALKING;
static f32 VOL_SE_SYSTEM_TALKING;
static f32 VOL_SE_LINK_VOICE_TALKING;
static f32 VOL_SE_LINK_MOTION_TALKING;
static f32 VOL_SE_LINK_FOOTNOTE_TALKING;
static f32 VOL_SE_CHAR_VOICE_TALKING;
static f32 VOL_SE_CHAR_MOVE_TALKING;
static f32 VOL_SE_OBJECT_TALKING;
static f32 VOL_SE_ATMOSPHERE_TALKING;
static f32 VOL_BGM_PAUSING;
static f32 VOL_SE_SYSTEM_PAUSING;
static f32 VOL_SE_LINK_VOICE_PAUSING;
static f32 VOL_SE_LINK_MOTION_PAUSING;
static f32 VOL_SE_LINK_FOOTNOTE_PAUSING;
static f32 VOL_SE_CHAR_VOICE_PAUSING;
static f32 VOL_SE_CHAR_MOVE_PAUSING;
static f32 VOL_SE_OBJECT_PAUSING;
static f32 VOL_SE_ATMOSPHERE_PAUSING;
static f32 MIN_DISTANCE_VOLUME;
static f32 ENEMY_LASTHIT_MUTE_VOLUME;
// made up names based on HIO labels
static DUSK_GAME_DATA u8 SCENE_CHANGE_BGM_FADEOUT_TIME;
static DUSK_GAME_DATA u8 BGM_CROSS_FADEIN_TIME;
static DUSK_GAME_DATA u8 BGM_CROSS_FADEOUT_TIME;
static DUSK_GAME_DATA u8 BATTLE_BGM_WAIT_TIME;
static u8 SCENE_CHANGE_BGM_FADEOUT_TIME;
static u8 BGM_CROSS_FADEIN_TIME;
static u8 BGM_CROSS_FADEOUT_TIME;
static u8 BATTLE_BGM_WAIT_TIME;
static f32 ENEMY_NEARBY_DIST;
static f32 BATTLE_FADEIN_DIST;
static f32 BATTLE_FADEOUT_DIST;
static DUSK_GAME_DATA u8 FOUND_TRACK_FI_TIME;
static DUSK_GAME_DATA u8 FOUND_TRACK_FO_TIME;
static DUSK_GAME_DATA u8 CLOSE_BATTLE_TRACK_FI_TIME;
static DUSK_GAME_DATA u8 CLOSE_BATTLE_TRACK_FO_TIME;
static u8 FOUND_TRACK_FI_TIME;
static u8 FOUND_TRACK_FO_TIME;
static u8 CLOSE_BATTLE_TRACK_FI_TIME;
static u8 CLOSE_BATTLE_TRACK_FO_TIME;
static DUSK_GAME_DATA u8 ENDING_BLOW_VOL_DOWN_TIME;
static DUSK_GAME_DATA u8 ENDING_BLOW_VOL_LOWER_TIME;
static DUSK_GAME_DATA u8 ENDING_BLOW_VOL_LOWER_RECOVER_TIME;
static DUSK_GAME_DATA u8 ENDING_BLOW_MIN_FINISH_TIME;
static u8 ENDING_BLOW_VOL_DOWN_TIME;
static u8 ENDING_BLOW_VOL_LOWER_TIME;
static u8 ENDING_BLOW_VOL_LOWER_RECOVER_TIME;
static u8 ENDING_BLOW_MIN_FINISH_TIME;
static DUSK_GAME_DATA u8 DARK_SE_FILTER_ON;
static DUSK_GAME_DATA u8 DARK_SE_LOW_PASS_FILTER_SETTING;
static DUSK_GAME_DATA u8 SYSTEM_SE_USE_DARK_SE_SETTING;
static u8 DARK_SE_FILTER_ON;
static u8 DARK_SE_LOW_PASS_FILTER_SETTING;
static u8 SYSTEM_SE_USE_DARK_SE_SETTING;
static f32 AUDIBLE_DELTA_RANGE_VOLUME;
static f32 AUDIBLE_DELTA_RANGE_PAN;
static f32 AUDIBLE_DELTA_RANGE_DOLBY;
};
DUSK_GAME_EXTERN u8 data_8045086C;
extern u8 data_8045086C;
#endif /* Z2PARAM_H */
+5
View File
@@ -46,6 +46,11 @@ public:
s32 getSeLoadStatus(u32 wave) { return getWaveLoadStatus(wave, 0); }
s32 getBgmLoadStatus(u32 wave) { return getWaveLoadStatus(wave, 1); }
u8 getDemoSeWaveNum() { return loadedDemoWave; }
#if TARGET_PC
u8 getLoadedSeWave_1() { return loadedSeWave_1;}
u8 getLoadedSeWave_2() { return loadedSeWave_2;}
#endif
private:
/* 0x00 */ JAISoundID BGM_ID;
+1 -1
View File
@@ -194,7 +194,7 @@ public:
JAISoundHandle* getMainBgmHandle() { return &mMainBgmHandle; }
JAISoundHandle* getSubBgmHandle() { return &mSubBgmHandle; }
#if PARTIAL_DEBUG || DEBUG
#if DEBUG
f32 field_0x00_debug;
u8 field_0x04_debug;
#endif
+2 -2
View File
@@ -100,13 +100,13 @@ public:
bool isForceBattle() { return forceBattle_; }
JSUList<Z2CreatureEnemy>* getEnemyList() { return &field_0x0; }
#if PARTIAL_DEBUG || DEBUG
#if DEBUG
JSUList<Z2SoundObjBase>* getAllList() { return &allList_; }
#endif
private:
/* 0x00 */ JSUList<Z2CreatureEnemy> field_0x0;
#if PARTIAL_DEBUG || DEBUG
#if DEBUG
/* 0x0C */ JSUList<Z2SoundObjBase> allList_;
#endif
/* 0x0C */ Z2EnemyArea enemyArea_;
+1 -1
View File
@@ -7,7 +7,7 @@
struct Z2SoundStarter;
class Z2SoundObjBase : public Z2SoundHandles
#if PARTIAL_DEBUG || DEBUG
#if DEBUG
, public JSULink<Z2SoundObjBase>
#endif
{
+10 -10
View File
@@ -12,18 +12,18 @@ public:
BOOL cDmrNowMidnaTalk();
DUSK_GAME_EXTERN u8 cDmr_SkipInfo;
DUSK_GAME_EXTERN u8 data_80450C99;
DUSK_GAME_EXTERN u8 data_80450C9A;
DUSK_GAME_EXTERN u8 data_80450C9B;
DUSK_GAME_EXTERN u8 data_80450C9C;
DUSK_GAME_EXTERN u8 data_80450C9D;
DUSK_GAME_EXTERN u8 data_80450C9E;
DUSK_GAME_EXTERN u8 cDmr_FishingWether;
DUSK_GAME_EXTERN u8 data_80450CA0;
extern u8 cDmr_SkipInfo;
extern u8 data_80450C99;
extern u8 data_80450C9A;
extern u8 data_80450C9B;
extern u8 data_80450C9C;
extern u8 data_80450C9D;
extern u8 data_80450C9E;
extern u8 cDmr_FishingWether;
extern u8 data_80450CA0;
extern "C" {
DUSK_GAME_EXTERN JPTraceParticleCallBack4 JPTracePCB4;
extern JPTraceParticleCallBack4 JPTracePCB4;
}
void debug_actor_create();
+135 -127
View File
@@ -57,8 +57,8 @@ public:
void setNowOffsetX(f32 i_offset) { mNowOffsetX = i_offset; }
void setNowOffsetY(f32 i_offset) { mNowOffsetY = i_offset; }
static DUSK_GAME_DATA bool m_eye_move_flg;
static DUSK_GAME_DATA u8 m_morf_frame;
static bool m_eye_move_flg;
static u8 m_morf_frame;
/* 0x0F4 */ mutable f32 field_0xf4;
/* 0x0F8 */ mutable f32 field_0xf8;
@@ -3912,21 +3912,27 @@ public:
u16 getReadyItem() { return dComIfGp_getSelectItem(mSelectItemId); }
static u32 getOtherHeapSize() { return 0xF0A60; }
#if TARGET_PC
u16 getEventId() { return mMsgFlow.getEventId(); }
static DUSK_GAME_DATA daAlink_BckData const m_mainBckShield[20];
static DUSK_GAME_DATA daAlink_BckData const m_mainBckSword[5];
static DUSK_GAME_DATA daAlink_BckData const m_mainBckFishing[28];
static DUSK_GAME_DATA daAlink_AnmData const m_anmDataTable[ANM_MAX];
static DUSK_GAME_DATA daAlink_WlAnmData const m_wlAnmDataTable[WANM_MAX];
static DUSK_GAME_DATA daAlink_FaceTexData const m_faceTexDataTable[];
static DUSK_GAME_DATA Vec const m_handLeftOutSidePos;
static DUSK_GAME_DATA Vec const m_handRightOutSidePos;
static DUSK_GAME_DATA Vec const m_handLeftInSidePos;
static DUSK_GAME_DATA Vec const m_handRightInSidePos;
bool checkSwimming() {return checkModeFlg(MODE_SWIMMING);}
#endif
static DUSK_GAME_DATA const daAlink_procInitTable m_procInitTable[];
static DUSK_GAME_DATA daAlink_procFunc m_demoInitTable[];
static DUSK_GAME_DATA const EffParamProc m_fEffParamProc[];
static daAlink_BckData const m_mainBckShield[20];
static daAlink_BckData const m_mainBckSword[5];
static daAlink_BckData const m_mainBckFishing[28];
static daAlink_AnmData const m_anmDataTable[ANM_MAX];
static daAlink_WlAnmData const m_wlAnmDataTable[WANM_MAX];
static daAlink_FaceTexData const m_faceTexDataTable[];
static Vec const m_handLeftOutSidePos;
static Vec const m_handRightOutSidePos;
static Vec const m_handLeftInSidePos;
static Vec const m_handRightInSidePos;
static const daAlink_procInitTable m_procInitTable[];
static daAlink_procFunc m_demoInitTable[];
static const EffParamProc m_fEffParamProc[];
/* 0x0062C */ request_of_phase_process_class mPhaseReq;
/* 0x00634 */ const char* mArcName;
@@ -4649,7 +4655,7 @@ struct daAlinkHIO_basic_c1 {
class daAlinkHIO_basic_c0 {
public:
static DUSK_GAME_DATA daAlinkHIO_basic_c1 const m;
static daAlinkHIO_basic_c1 const m;
};
class daAlinkHIO_basic_c : public daAlinkHIO_data_c {
@@ -4700,7 +4706,7 @@ public:
class daAlinkHIO_move_c0 {
public:
static DUSK_GAME_DATA daAlinkHIO_move_c1 const m;
static daAlinkHIO_move_c1 const m;
};
class daAlinkHIO_move_c : public daAlinkHIO_data_c {
@@ -4746,7 +4752,7 @@ public:
class daAlinkHIO_atnMove_c0 {
public:
static DUSK_GAME_DATA daAlinkHIO_atnMove_c1 const m;
static daAlinkHIO_atnMove_c1 const m;
};
class daAlinkHIO_atnMove_c : public daAlinkHIO_data_c {
@@ -4792,7 +4798,7 @@ public:
class daAlinkHIO_noActAtnMove_c0 {
public:
static DUSK_GAME_DATA daAlinkHIO_noActAtnMove_c1 const m;
static daAlinkHIO_noActAtnMove_c1 const m;
};
class daAlinkHIO_noActAtnMove_c : public daAlinkHIO_data_c {
@@ -4834,7 +4840,7 @@ public:
class daAlinkHIO_frontRoll_c0 {
public:
static DUSK_GAME_DATA daAlinkHIO_frontRoll_c1 const m;
static daAlinkHIO_frontRoll_c1 const m;
};
class daAlinkHIO_frontRoll_c : public daAlinkHIO_data_c {
@@ -4864,7 +4870,7 @@ public:
class daAlinkHIO_backJump_c0 {
public:
static DUSK_GAME_DATA daAlinkHIO_backJump_c1 const m;
static daAlinkHIO_backJump_c1 const m;
};
class daAlinkHIO_backJump_c : public daAlinkHIO_data_c {
@@ -4898,7 +4904,7 @@ public:
class daAlinkHIO_sideStep_c0 {
public:
static DUSK_GAME_DATA daAlinkHIO_sideStep_c1 const m;
static daAlinkHIO_sideStep_c1 const m;
};
class daAlinkHIO_sideStep_c : public daAlinkHIO_data_c {
@@ -4936,7 +4942,7 @@ public:
class daAlinkHIO_slide_c0 {
public:
static DUSK_GAME_DATA daAlinkHIO_slide_c1 const m;
static daAlinkHIO_slide_c1 const m;
};
class daAlinkHIO_slide_c : public daAlinkHIO_data_c {
@@ -4964,27 +4970,27 @@ public:
class daAlinkHIO_cutNmV_c0 {
public:
static DUSK_GAME_DATA daAlinkHIO_cutNormal_c1 const m;
static daAlinkHIO_cutNormal_c1 const m;
};
class daAlinkHIO_cutNmL_c0 {
public:
static DUSK_GAME_DATA daAlinkHIO_cutNormal_c1 const m;
static daAlinkHIO_cutNormal_c1 const m;
};
class daAlinkHIO_cutNmR_c0 {
public:
static DUSK_GAME_DATA daAlinkHIO_cutNormal_c1 const m;
static daAlinkHIO_cutNormal_c1 const m;
};
class daAlinkHIO_cutNmSL_c0 {
public:
static DUSK_GAME_DATA daAlinkHIO_cutNormal_c1 const m;
static daAlinkHIO_cutNormal_c1 const m;
};
class daAlinkHIO_cutNmSR_c0 {
public:
static DUSK_GAME_DATA daAlinkHIO_cutNormal_c1 const m;
static daAlinkHIO_cutNormal_c1 const m;
};
class daAlinkHIO_cutNormal_c : public daAlinkHIO_data_c {
@@ -5015,32 +5021,32 @@ public:
class daAlinkHIO_cutFnL_c0 {
public:
static DUSK_GAME_DATA daAlinkHIO_cutFinish_c1 const m;
static daAlinkHIO_cutFinish_c1 const m;
};
class daAlinkHIO_cutFnV_c0 {
public:
static DUSK_GAME_DATA daAlinkHIO_cutFinish_c1 const m;
static daAlinkHIO_cutFinish_c1 const m;
};
class daAlinkHIO_cutFnS_c0 {
public:
static DUSK_GAME_DATA daAlinkHIO_cutFinish_c1 const m;
static daAlinkHIO_cutFinish_c1 const m;
};
class daAlinkHIO_cutFnSl_c0 {
public:
static DUSK_GAME_DATA daAlinkHIO_cutFinish_c1 const m;
static daAlinkHIO_cutFinish_c1 const m;
};
class daAlinkHIO_cutFnSm_c0 {
public:
static DUSK_GAME_DATA daAlinkHIO_cutFinish_c1 const m;
static daAlinkHIO_cutFinish_c1 const m;
};
class daAlinkHIO_cutFnR_c0 {
public:
static DUSK_GAME_DATA daAlinkHIO_cutFinish_c1 const m;
static daAlinkHIO_cutFinish_c1 const m;
};
class daAlinkHIO_cutFinish_c : public daAlinkHIO_data_c {
@@ -5077,7 +5083,7 @@ public:
class daAlinkHIO_cutFnJU_c0 {
public:
static DUSK_GAME_DATA daAlinkHIO_cutFnJU_c1 const m;
static daAlinkHIO_cutFnJU_c1 const m;
};
class daAlinkHIO_cutFnJU_c : public daAlinkHIO_data_c {
@@ -5104,17 +5110,17 @@ public:
class daAlinkHIO_cutDaL_c0 {
public:
static DUSK_GAME_DATA daAlinkHIO_cutDash_c1 const m;
static daAlinkHIO_cutDash_c1 const m;
};
class daAlinkHIO_cutDaR_c0 {
public:
static DUSK_GAME_DATA daAlinkHIO_cutDash_c1 const m;
static daAlinkHIO_cutDash_c1 const m;
};
class daAlinkHIO_cutDaCharge_c0 {
public:
static DUSK_GAME_DATA daAlinkHIO_cutDash_c1 const m;
static daAlinkHIO_cutDash_c1 const m;
};
class daAlinkHIO_cutDash_c : public daAlinkHIO_data_c {
@@ -5146,7 +5152,7 @@ public:
class daAlinkHIO_cutJump_c0 {
public:
static DUSK_GAME_DATA daAlinkHIO_cutJump_c1 const m;
static daAlinkHIO_cutJump_c1 const m;
};
class daAlinkHIO_cutJump_c : public daAlinkHIO_data_c {
@@ -5197,7 +5203,7 @@ public:
class daAlinkHIO_cutTurn_c0 {
public:
static DUSK_GAME_DATA daAlinkHIO_cutTurn_c1 const m;
static daAlinkHIO_cutTurn_c1 const m;
};
class daAlinkHIO_cutTurn_c : public daAlinkHIO_data_c {
@@ -5225,22 +5231,22 @@ public:
class daAlinkHIO_hoCutLA_c0 {
public:
static DUSK_GAME_DATA daAlinkHIO_hoCut_c1 const m;
static daAlinkHIO_hoCut_c1 const m;
};
class daAlinkHIO_hoCutLB_c0 {
public:
static DUSK_GAME_DATA daAlinkHIO_hoCut_c1 const m;
static daAlinkHIO_hoCut_c1 const m;
};
class daAlinkHIO_hoCutRA_c0 {
public:
static DUSK_GAME_DATA daAlinkHIO_hoCut_c1 const m;
static daAlinkHIO_hoCut_c1 const m;
};
class daAlinkHIO_hoCutRB_c0 {
public:
static DUSK_GAME_DATA daAlinkHIO_hoCut_c1 const m;
static daAlinkHIO_hoCut_c1 const m;
};
class daAlinkHIO_hoCut_c : public daAlinkHIO_data_c {
@@ -5273,7 +5279,7 @@ public:
class daAlinkHIO_hoCutCharge_c0 {
public:
static DUSK_GAME_DATA daAlinkHIO_hoCutCharge_c1 const m;
static daAlinkHIO_hoCutCharge_c1 const m;
};
class daAlinkHIO_hoCutCharge_c : public daAlinkHIO_data_c {
@@ -5307,7 +5313,7 @@ public:
class daAlinkHIO_cutDown_c0 {
public:
static DUSK_GAME_DATA daAlinkHIO_cutDown_c1 const m;
static daAlinkHIO_cutDown_c1 const m;
};
class daAlinkHIO_cutDown_c : public daAlinkHIO_data_c {
@@ -5343,7 +5349,7 @@ public:
class daAlinkHIO_cutHead_c0 {
public:
static DUSK_GAME_DATA daAlinkHIO_cutHead_c1 const m;
static daAlinkHIO_cutHead_c1 const m;
};
class daAlinkHIO_cutHead_c : public daAlinkHIO_data_c {
@@ -5380,7 +5386,7 @@ public:
class daAlinkHIO_cutLargeJump_c0 {
public:
static DUSK_GAME_DATA daAlinkHIO_cutLargeJump_c1 const m;
static daAlinkHIO_cutLargeJump_c1 const m;
};
class daAlinkHIO_cutLargeJump_c : public daAlinkHIO_data_c {
@@ -5457,7 +5463,7 @@ public:
static daAlinkHIO_cutDown_c0 const mCutDown;
static daAlinkHIO_cutHead_c0 const mCutHead;
static daAlinkHIO_cutLargeJump_c0 const mCutLargeJump;
static DUSK_GAME_DATA daAlinkHIO_cut_c1 const m;
static daAlinkHIO_cut_c1 const m;
};
class daAlinkHIO_cut_c : public daAlinkHIO_data_c {
@@ -5513,12 +5519,12 @@ public:
class daAlinkHIO_gAtPush_c0 {
public:
static DUSK_GAME_DATA daAlinkHIO_guardAttack_c1 const m;
static daAlinkHIO_guardAttack_c1 const m;
};
class daAlinkHIO_gAtKick_c0 {
public:
static DUSK_GAME_DATA daAlinkHIO_guardAttack_c1 const m;
static daAlinkHIO_guardAttack_c1 const m;
};
class daAlinkHIO_guardAttack_c : public daAlinkHIO_data_c {
@@ -5550,7 +5556,7 @@ public:
class daAlinkHIO_turnMove_c0 {
public:
static DUSK_GAME_DATA daAlinkHIO_turnMove_c1 const m;
static daAlinkHIO_turnMove_c1 const m;
};
class daAlinkHIO_turnMove_c : public daAlinkHIO_data_c {
@@ -5595,7 +5601,7 @@ public:
static daAlinkHIO_gAtPush_c0 const mAtPush;
static daAlinkHIO_gAtKick_c0 const mAtKick;
static daAlinkHIO_turnMove_c0 const mTurnMove;
static DUSK_GAME_DATA daAlinkHIO_guard_c1 const m;
static daAlinkHIO_guard_c1 const m;
};
class daAlinkHIO_guard_c : public daAlinkHIO_data_c {
@@ -5634,7 +5640,7 @@ public:
class daAlinkHIO_crouch_c0 {
public:
static DUSK_GAME_DATA daAlinkHIO_crouch_c1 const m;
static daAlinkHIO_crouch_c1 const m;
};
class daAlinkHIO_crouch_c : public daAlinkHIO_data_c {
@@ -5689,7 +5695,7 @@ public:
class daAlinkHIO_autoJump_c0 {
public:
static DUSK_GAME_DATA daAlinkHIO_autoJump_c1 const m;
static daAlinkHIO_autoJump_c1 const m;
};
class daAlinkHIO_autoJump_c : public daAlinkHIO_data_c {
@@ -5719,7 +5725,7 @@ public:
class daAlinkHIO_smallJump_c0 {
public:
static DUSK_GAME_DATA daAlinkHIO_smallJump_c1 const m;
static daAlinkHIO_smallJump_c1 const m;
};
class daAlinkHIO_smallJump_c : public daAlinkHIO_data_c {
@@ -5748,7 +5754,7 @@ public:
class daAlinkHIO_wallCatch_c0 {
public:
static DUSK_GAME_DATA daAlinkHIO_wallCatch_c1 const m;
static daAlinkHIO_wallCatch_c1 const m;
};
class daAlinkHIO_wallCatch_c : public daAlinkHIO_data_c {
@@ -5774,7 +5780,7 @@ public:
class daAlinkHIO_wallFall_c0 {
public:
static DUSK_GAME_DATA daAlinkHIO_wallFall_c1 const m;
static daAlinkHIO_wallFall_c1 const m;
};
class daAlinkHIO_wallFall_c : public daAlinkHIO_data_c {
@@ -5803,7 +5809,7 @@ public:
class daAlinkHIO_wallMove_c0 {
public:
static DUSK_GAME_DATA daAlinkHIO_wallMove_c1 const m;
static daAlinkHIO_wallMove_c1 const m;
};
class daAlinkHIO_wallMove_c : public daAlinkHIO_data_c {
@@ -5839,7 +5845,7 @@ public:
static daAlinkHIO_wallCatch_c0 const mWallCatch;
static daAlinkHIO_wallFall_c0 const mWallFall;
static daAlinkHIO_wallMove_c0 const mWallMove;
static DUSK_GAME_DATA daAlinkHIO_wallHang_c1 const m;
static daAlinkHIO_wallHang_c1 const m;
};
class daAlinkHIO_wallHang_c : public daAlinkHIO_data_c {
@@ -5886,7 +5892,7 @@ public:
class daAlinkHIO_pushpull_c0 {
public:
static DUSK_GAME_DATA daAlinkHIO_pushpull_c1 const m;
static daAlinkHIO_pushpull_c1 const m;
};
class daAlinkHIO_pushpull_c : public daAlinkHIO_data_c {
@@ -5920,7 +5926,7 @@ public:
class daAlinkHIO_damNormal_c0 {
public:
static DUSK_GAME_DATA daAlinkHIO_damNormal_c1 const m;
static daAlinkHIO_damNormal_c1 const m;
};
class daAlinkHIO_damNormal_c : public daAlinkHIO_data_c {
@@ -5959,12 +5965,12 @@ public:
class daAlinkHIO_damLarge_c0 {
public:
static DUSK_GAME_DATA daAlinkHIO_damLaHu_c1 const m;
static daAlinkHIO_damLaHu_c1 const m;
};
class daAlinkHIO_damHuge_c0 {
public:
static DUSK_GAME_DATA daAlinkHIO_damLaHu_c1 const m;
static daAlinkHIO_damLaHu_c1 const m;
};
class daAlinkHIO_damLaHu_c : public daAlinkHIO_data_c {
@@ -5992,7 +5998,7 @@ public:
class daAlinkHIO_damHorse_c0 {
public:
static DUSK_GAME_DATA daAlinkHIO_damHorse_c1 const m;
static daAlinkHIO_damHorse_c1 const m;
};
class daAlinkHIO_damHorse_c : public daAlinkHIO_data_c {
@@ -6027,7 +6033,7 @@ public:
class daAlinkHIO_damFall_c0 {
public:
static DUSK_GAME_DATA daAlinkHIO_damFall_c1 const m;
static daAlinkHIO_damFall_c1 const m;
};
class daAlinkHIO_damFall_c : public daAlinkHIO_data_c {
@@ -6057,7 +6063,7 @@ public:
class daAlinkHIO_damCaught_c0 {
public:
static DUSK_GAME_DATA daAlinkHIO_damCaught_c1 const m;
static daAlinkHIO_damCaught_c1 const m;
};
class daAlinkHIO_damCaught_c : public daAlinkHIO_data_c {
@@ -6093,7 +6099,7 @@ public:
class daAlinkHIO_damSwim_c0 {
public:
static DUSK_GAME_DATA daAlinkHIO_damSwim_c1 const m;
static daAlinkHIO_damSwim_c1 const m;
};
class daAlinkHIO_damSwim_c : public daAlinkHIO_data_c {
@@ -6140,7 +6146,7 @@ public:
class daAlinkHIO_damage_c0 {
public:
static DUSK_GAME_DATA daAlinkHIO_damage_c1 const m;
static daAlinkHIO_damage_c1 const m;
static daAlinkHIO_damNormal_c0 const mDamNormal;
static daAlinkHIO_damLarge_c0 const mDamLarge;
static daAlinkHIO_damHuge_c0 const mDamHuge;
@@ -6192,7 +6198,7 @@ public:
class daAlinkHIO_horse_c0 {
public:
static DUSK_GAME_DATA daAlinkHIO_horse_c1 const m;
static daAlinkHIO_horse_c1 const m;
};
class daAlinkHIO_horse_c : public daAlinkHIO_data_c {
@@ -6231,7 +6237,7 @@ public:
class daAlinkHIO_canoe_c0 {
public:
static DUSK_GAME_DATA daAlinkHIO_canoe_c1 const m;
static daAlinkHIO_canoe_c1 const m;
};
class daAlinkHIO_canoe_c : public daAlinkHIO_data_c {
@@ -6276,7 +6282,7 @@ public:
class daAlinkHIO_bow_c0 {
public:
static DUSK_GAME_DATA daAlinkHIO_bow_c1 const m;
static daAlinkHIO_bow_c1 const m;
};
class daAlinkHIO_bow_c : public daAlinkHIO_data_c {
@@ -6312,7 +6318,7 @@ public:
class daAlinkHIO_boom_c0 {
public:
static DUSK_GAME_DATA daAlinkHIO_boom_c1 const m;
static daAlinkHIO_boom_c1 const m;
};
class daAlinkHIO_boom_c : public daAlinkHIO_data_c {
@@ -6356,7 +6362,7 @@ public:
class daAlinkHIO_bomb_c0 {
public:
static DUSK_GAME_DATA daAlinkHIO_bomb_c1 const m;
static daAlinkHIO_bomb_c1 const m;
};
class daAlinkHIO_bomb_c : public daAlinkHIO_data_c {
@@ -6391,7 +6397,8 @@ public:
class daAlinkHIO_huLight_c0 {
public:
static DUSK_GAME_DATA daAlinkHIO_huLight_c1 const m;
static daAlinkHIO_huLight_c1 IF_NOT_DUSK(const) m;
IF_DUSK(static daAlinkHIO_huLight_c1 const original;)
};
class daAlinkHIO_wlLight_c1 {
@@ -6410,7 +6417,7 @@ public:
class daAlinkHIO_wlLight_c0 {
public:
static DUSK_GAME_DATA daAlinkHIO_wlLight_c1 const m;
static daAlinkHIO_wlLight_c1 const m;
};
class daAlinkHIO_zwLight_c1 { // may be wrong
@@ -6429,7 +6436,7 @@ public:
class daAlinkHIO_zwLight_c0 {
public:
static DUSK_GAME_DATA daAlinkHIO_zwLight_c1 const m;
static daAlinkHIO_zwLight_c1 const m;
};
class daAlinkHIO_light_c : public daAlinkHIO_data_c {
@@ -6465,7 +6472,8 @@ public:
class daAlinkHIO_kandelaar_c0 {
public:
static DUSK_GAME_DATA daAlinkHIO_kandelaar_c1 const m;
static daAlinkHIO_kandelaar_c1 IF_NOT_DUSK(const) m;
IF_DUSK(static daAlinkHIO_kandelaar_c1 const original;)
};
class daAlinkHIO_kandelaar_c : public daAlinkHIO_data_c {
@@ -6504,7 +6512,7 @@ public:
class daAlinkHIO_magneBoots_c0 {
public:
static DUSK_GAME_DATA daAlinkHIO_magneBoots_c1 const m;
static daAlinkHIO_magneBoots_c1 const m;
};
class daAlinkHIO_magneBoots_c : public daAlinkHIO_data_c {
@@ -6530,7 +6538,7 @@ public:
class daAlinkHIO_fmChain_c0 {
public:
static DUSK_GAME_DATA daAlinkHIO_fmChain_c1 const m;
static daAlinkHIO_fmChain_c1 const m;
};
class daAlinkHIO_fmChain_c : public daAlinkHIO_data_c {
@@ -6570,7 +6578,7 @@ public:
class daAlinkHIO_hookshot_c0 {
public:
static DUSK_GAME_DATA daAlinkHIO_hookshot_c1 const m;
static daAlinkHIO_hookshot_c1 const m;
};
class daAlinkHIO_hookshot_c : public daAlinkHIO_data_c {
@@ -6608,7 +6616,7 @@ public:
class daAlinkHIO_spinner_c0 {
public:
static DUSK_GAME_DATA daAlinkHIO_spinner_c1 const m;
static daAlinkHIO_spinner_c1 const m;
};
class daAlinkHIO_spinner_c : public daAlinkHIO_data_c {
@@ -6664,7 +6672,7 @@ public:
class daAlinkHIO_ironBall_c0 {
public:
static DUSK_GAME_DATA daAlinkHIO_ironBall_c1 const m;
static daAlinkHIO_ironBall_c1 const m;
};
class daAlinkHIO_ironBall_c : public daAlinkHIO_data_c {
@@ -6694,7 +6702,7 @@ public:
class daAlinkHIO_copyRod_c0 {
public:
static DUSK_GAME_DATA daAlinkHIO_copyRod_c1 const m;
static daAlinkHIO_copyRod_c1 const m;
};
class daAlinkHIO_copyRod_c : public daAlinkHIO_data_c {
@@ -6722,7 +6730,7 @@ public:
class daAlinkHIO_pickUp_c0 {
public:
static DUSK_GAME_DATA daAlinkHIO_pickUp_c1 const m;
static daAlinkHIO_pickUp_c1 const m;
};
class daAlinkHIO_pickUp_c : public daAlinkHIO_data_c {
@@ -6769,7 +6777,7 @@ public:
class daAlinkHIO_board_c0 {
public:
static DUSK_GAME_DATA daAlinkHIO_board_c1 const m;
static daAlinkHIO_board_c1 const m;
};
class daAlinkHIO_board_c : public daAlinkHIO_data_c {
@@ -6802,7 +6810,7 @@ public:
class daAlinkHIO_bottle_c0 {
public:
static DUSK_GAME_DATA daAlinkHIO_bottle_c1 const m;
static daAlinkHIO_bottle_c1 const m;
};
class daAlinkHIO_bottle_c : public daAlinkHIO_data_c {
@@ -6850,7 +6858,7 @@ public:
static daAlinkHIO_ironBall_c0 const mIronBall;
static daAlinkHIO_copyRod_c0 const mCopyRod;
static daAlinkHIO_zwLight_c0 const mZoraArmorPL;
static DUSK_GAME_DATA daAlinkHIO_item_c1 const m;
static daAlinkHIO_item_c1 const m;
};
class daAlinkHIO_item_c : public daAlinkHIO_data_c {
@@ -6909,7 +6917,7 @@ public:
class daAlinkHIO_ladder_c0 {
public:
static DUSK_GAME_DATA daAlinkHIO_ladder_c1 const m;
static daAlinkHIO_ladder_c1 const m;
};
class daAlinkHIO_ladder_c : public daAlinkHIO_data_c {
@@ -6949,7 +6957,7 @@ public:
class daAlinkHIO_roofHang_c0 {
public:
static DUSK_GAME_DATA daAlinkHIO_roofHang_c1 const m;
static daAlinkHIO_roofHang_c1 const m;
};
class daAlinkHIO_roofHang_c : public daAlinkHIO_data_c {
@@ -6987,7 +6995,7 @@ public:
class daAlinkHIO_grab_c0 {
public:
static DUSK_GAME_DATA daAlinkHIO_grab_c1 const m;
static daAlinkHIO_grab_c1 const m;
};
class daAlinkHIO_grab_c : public daAlinkHIO_data_c {
@@ -7062,7 +7070,7 @@ public:
class daAlinkHIO_swim_c0 {
public:
static DUSK_GAME_DATA daAlinkHIO_swim_c1 const m;
static daAlinkHIO_swim_c1 const m;
};
class daAlinkHIO_swim_c : public daAlinkHIO_data_c {
@@ -7138,7 +7146,7 @@ public:
class daAlinkHIO_wlMove_c0 {
public:
static DUSK_GAME_DATA daAlinkHIO_wlMove_c1 const m;
static daAlinkHIO_wlMove_c1 const m;
};
class daAlinkHIO_wlMove_c : public daAlinkHIO_data_c {
@@ -7181,7 +7189,7 @@ public:
class daAlinkHIO_wlMoveNoP_c0 {
public:
static DUSK_GAME_DATA daAlinkHIO_wlMoveNoP_c1 const m;
static daAlinkHIO_wlMoveNoP_c1 const m;
};
class daAlinkHIO_wlMoveNoP_c : public daAlinkHIO_data_c {
@@ -7220,7 +7228,7 @@ public:
class daAlinkHIO_wlAtnMove_c0 {
public:
static DUSK_GAME_DATA daAlinkHIO_wlAtnMove_c1 const m;
static daAlinkHIO_wlAtnMove_c1 const m;
};
class daAlinkHIO_wlAtnMove_c : public daAlinkHIO_data_c {
@@ -7252,7 +7260,7 @@ public:
class daAlinkHIO_wlHowl_c0 {
public:
static DUSK_GAME_DATA daAlinkHIO_wlHowl_c1 const m;
static daAlinkHIO_wlHowl_c1 const m;
};
class daAlinkHIO_wlHowl_c : public daAlinkHIO_data_c {
@@ -7286,7 +7294,7 @@ public:
class daAlinkHIO_wlSideStep_c0 {
public:
static DUSK_GAME_DATA daAlinkHIO_wlSideStep_c1 const m;
static daAlinkHIO_wlSideStep_c1 const m;
};
class daAlinkHIO_wlSideStep_c : public daAlinkHIO_data_c {
@@ -7316,7 +7324,7 @@ public:
class daAlinkHIO_wlBackJump_c0 {
public:
static DUSK_GAME_DATA daAlinkHIO_wlBackJump_c1 const m;
static daAlinkHIO_wlBackJump_c1 const m;
};
class daAlinkHIO_wlBackJump_c : public daAlinkHIO_data_c {
@@ -7361,7 +7369,7 @@ public:
class daAlinkHIO_wlAutoJump_c0 {
public:
static DUSK_GAME_DATA daAlinkHIO_wlAutoJump_c1 const m;
static daAlinkHIO_wlAutoJump_c1 const m;
};
class daAlinkHIO_wlAutoJump_c : public daAlinkHIO_data_c {
@@ -7390,7 +7398,7 @@ public:
class daAlinkHIO_wlPush_c0 {
public:
static DUSK_GAME_DATA daAlinkHIO_wlPush_c1 const m;
static daAlinkHIO_wlPush_c1 const m;
};
class daAlinkHIO_wlPush_c : public daAlinkHIO_data_c {
@@ -7426,7 +7434,7 @@ public:
class daAlinkHIO_wlLie_c0 {
public:
static DUSK_GAME_DATA daAlinkHIO_wlLie_c1 const m;
static daAlinkHIO_wlLie_c1 const m;
};
class daAlinkHIO_wlLie_c : public daAlinkHIO_data_c {
@@ -7465,7 +7473,7 @@ public:
class daAlinkHIO_wlWallHang_c0 {
public:
static DUSK_GAME_DATA daAlinkHIO_wlWallHang_c1 const m;
static daAlinkHIO_wlWallHang_c1 const m;
};
class daAlinkHIO_wlWallHang_c : public daAlinkHIO_data_c {
@@ -7497,7 +7505,7 @@ public:
class daAlinkHIO_wlDamNormal_c0 {
public:
static DUSK_GAME_DATA daAlinkHIO_wlDamNormal_c1 const m;
static daAlinkHIO_wlDamNormal_c1 const m;
};
class daAlinkHIO_wlDamNormal_c : public daAlinkHIO_data_c {
@@ -7532,12 +7540,12 @@ public:
class daAlinkHIO_wlDamLarge_c0 {
public:
static DUSK_GAME_DATA daAlinkHIO_wlDamLaHu_c1 const m;
static daAlinkHIO_wlDamLaHu_c1 const m;
};
class daAlinkHIO_wlDamHuge_c0 {
public:
static DUSK_GAME_DATA daAlinkHIO_wlDamLaHu_c1 const m;
static daAlinkHIO_wlDamLaHu_c1 const m;
};
class daAlinkHIO_wlDamLaHu_c : public daAlinkHIO_data_c {
@@ -7566,7 +7574,7 @@ public:
class daAlinkHIO_wlDamCaught_c0 {
public:
static DUSK_GAME_DATA daAlinkHIO_wlDamCaught_c1 const m;
static daAlinkHIO_wlDamCaught_c1 const m;
};
class daAlinkHIO_wlDamCaught_c : public daAlinkHIO_data_c {
@@ -7599,7 +7607,7 @@ public:
class daAlinkHIO_wlDamFall_c0 {
public:
static DUSK_GAME_DATA daAlinkHIO_wlDamFall_c1 const m;
static daAlinkHIO_wlDamFall_c1 const m;
};
class daAlinkHIO_wlDamFall_c : public daAlinkHIO_data_c {
@@ -7626,7 +7634,7 @@ public:
class daAlinkHIO_wlDamage_c0 {
public:
static DUSK_GAME_DATA daAlinkHIO_wlDamage_c1 const m;
static daAlinkHIO_wlDamage_c1 const m;
static daAlinkHIO_wlDamNormal_c0 const mNormal;
static daAlinkHIO_wlDamLarge_c0 const mLarge;
static daAlinkHIO_wlDamHuge_c0 const mHuge;
@@ -7676,7 +7684,7 @@ public:
class daAlinkHIO_wlSlide_c0 {
public:
static DUSK_GAME_DATA daAlinkHIO_wlSlide_c1 const m;
static daAlinkHIO_wlSlide_c1 const m;
};
class daAlinkHIO_wlSlide_c : public daAlinkHIO_data_c {
@@ -7711,7 +7719,7 @@ public:
class daAlinkHIO_wlRope_c0 {
public:
static DUSK_GAME_DATA daAlinkHIO_wlRope_c1 const m;
static daAlinkHIO_wlRope_c1 const m;
};
class daAlinkHIO_wlRope_c : public daAlinkHIO_data_c {
@@ -7747,17 +7755,17 @@ public:
class daAlinkHIO_wlAtWaTl_c0 {
public:
static DUSK_GAME_DATA daAlinkHIO_wlAtWait_c1 const m;
static daAlinkHIO_wlAtWait_c1 const m;
};
class daAlinkHIO_wlAtWaSc_c0 {
public:
static DUSK_GAME_DATA daAlinkHIO_wlAtWait_c1 const m;
static daAlinkHIO_wlAtWait_c1 const m;
};
class daAlinkHIO_wlAtWaLr_c0 {
public:
static DUSK_GAME_DATA daAlinkHIO_wlAtWait_c1 const m;
static daAlinkHIO_wlAtWait_c1 const m;
};
class daAlinkHIO_wlAtWait_c : public daAlinkHIO_data_c {
@@ -7784,7 +7792,7 @@ public:
class daAlinkHIO_wlAtRoll_c0 {
public:
static DUSK_GAME_DATA daAlinkHIO_wlAtRoll_c1 const m;
static daAlinkHIO_wlAtRoll_c1 const m;
};
class daAlinkHIO_wlAtRoll_c : public daAlinkHIO_data_c {
@@ -7819,7 +7827,7 @@ public:
class daAlinkHIO_wlAtNjump_c0 {
public:
static DUSK_GAME_DATA daAlinkHIO_wlAtNjump_c1 const m;
static daAlinkHIO_wlAtNjump_c1 const m;
};
class daAlinkHIO_wlAtNjump_c : public daAlinkHIO_data_c {
@@ -7860,7 +7868,7 @@ public:
class daAlinkHIO_wlAtCjump_c0 {
public:
static DUSK_GAME_DATA daAlinkHIO_wlAtCjump_c1 const m;
static daAlinkHIO_wlAtCjump_c1 const m;
};
class daAlinkHIO_wlAtCjump_c : public daAlinkHIO_data_c {
@@ -7888,7 +7896,7 @@ public:
class daAlinkHIO_wlAtLand_c0 {
public:
static DUSK_GAME_DATA daAlinkHIO_wlAtLand_c1 const m;
static daAlinkHIO_wlAtLand_c1 const m;
};
class daAlinkHIO_wlAtLand_c : public daAlinkHIO_data_c {
@@ -7924,7 +7932,7 @@ public:
class daAlinkHIO_wlAtDown_c0 {
public:
static DUSK_GAME_DATA daAlinkHIO_wlAtDown_c1 const m;
static daAlinkHIO_wlAtDown_c1 const m;
};
class daAlinkHIO_wlAtDown_c : public daAlinkHIO_data_c {
@@ -7961,7 +7969,7 @@ public:
class daAlinkHIO_wlAtLock_c0 {
public:
static DUSK_GAME_DATA daAlinkHIO_wlAtLock_c1 const m;
static daAlinkHIO_wlAtLock_c1 const m;
};
class daAlinkHIO_wlAtLock_c : public daAlinkHIO_data_c {
@@ -8001,7 +8009,7 @@ public:
class daAlinkHIO_wlAtBite_c0 {
public:
static DUSK_GAME_DATA daAlinkHIO_wlAtBite_c1 const m;
static daAlinkHIO_wlAtBite_c1 const m;
};
class daAlinkHIO_wlAtBite_c : public daAlinkHIO_data_c {
@@ -8046,7 +8054,7 @@ public:
static daAlinkHIO_wlAtDown_c0 const mWlAtDown;
static daAlinkHIO_wlAtLock_c0 const mWlAtLock;
static daAlinkHIO_wlAtBite_c0 const mWlAtBite;
static DUSK_GAME_DATA daAlinkHIO_wlAttack_c1 const m;
static daAlinkHIO_wlAttack_c1 const m;
};
class daAlinkHIO_wlAttack_c : public daAlinkHIO_data_c {
@@ -8093,7 +8101,7 @@ public:
class daAlinkHIO_wlPoint_c0 {
public:
static DUSK_GAME_DATA daAlinkHIO_wlPoint_c1 const m;
static daAlinkHIO_wlPoint_c1 const m;
};
class daAlinkHIO_wlPoint_c : public daAlinkHIO_data_c {
@@ -8129,7 +8137,7 @@ public:
class daAlinkHIO_wlChain_c0 {
public:
static DUSK_GAME_DATA daAlinkHIO_wlChain_c1 const m;
static daAlinkHIO_wlChain_c1 const m;
};
class daAlinkHIO_wlChain_c : public daAlinkHIO_data_c {
@@ -8186,7 +8194,7 @@ public:
class daAlinkHIO_wlSwim_c0 {
public:
static DUSK_GAME_DATA daAlinkHIO_wlSwim_c1 const m;
static daAlinkHIO_wlSwim_c1 const m;
};
class daAlinkHIO_wlSwim_c : public daAlinkHIO_data_c {
@@ -8215,7 +8223,7 @@ public:
class daAlinkHIO_wlGrab_c0 {
public:
static DUSK_GAME_DATA daAlinkHIO_wlGrab_c1 const m;
static daAlinkHIO_wlGrab_c1 const m;
};
class daAlinkHIO_wlGrab_c : public daAlinkHIO_data_c {
@@ -8245,7 +8253,7 @@ public:
class daAlinkHIO_wlBall_c0 {
public:
static DUSK_GAME_DATA daAlinkHIO_wlBall_c1 const m;
static daAlinkHIO_wlBall_c1 const m;
};
class daAlinkHIO_wlBall_c : public daAlinkHIO_data_c {
@@ -8300,7 +8308,7 @@ public:
static daAlinkHIO_wlSwim_c0 const mWlSwim;
static daAlinkHIO_wlGrab_c0 const mWlGrab;
static daAlinkHIO_wlBall_c0 const mWlBall;
static DUSK_GAME_DATA daAlinkHIO_wolf_c1 const m;
static daAlinkHIO_wolf_c1 const m;
};
class daAlinkHIO_wolf_c : public daAlinkHIO_data_c {
+1 -1
View File
@@ -161,7 +161,7 @@ private:
/* 0xA10 */ dPa_hermiteEcallBack_c field_0xa10;
/* 0xA28 */ int (daArrow_c::*mProcFunc)();
static DUSK_GAME_DATA s16 m_count;
static s16 m_count;
};
STATIC_ASSERT(sizeof(daArrow_c) == 0xA34);
+1 -1
View File
@@ -67,7 +67,7 @@ public:
void hide() { mIsVisible = 0; }
u8 isVisible() { return mIsVisible; }
static DUSK_GAME_DATA daBalloon2D_c* myclass;
static daBalloon2D_c* myclass;
struct ScoreCount {
cXyz field_0x0;
+4 -4
View File
@@ -89,10 +89,10 @@ public:
void setAction(u8 i_action) { mAction = i_action; }
static DUSK_GAME_DATA createHeapFunc mCreateHeapFunc[];
static DUSK_GAME_DATA createInitFunc mCreateInitFunc[];
static DUSK_GAME_DATA executeFunc mExecuteFunc[];
static DUSK_GAME_DATA tgSetFunc mTgSetFunc[];
static createHeapFunc mCreateHeapFunc[];
static createInitFunc mCreateInitFunc[];
static executeFunc mExecuteFunc[];
static tgSetFunc mTgSetFunc[];
/* 0x5A0 */ request_of_phase_process_class mPhase;
/* 0x5A8 */ J3DModel* field_0x5a8[2][2];
+6 -6
View File
@@ -190,12 +190,12 @@ STATIC_ASSERT(sizeof(daBoomerang_c) == 0xDE4);
class daBoomerang_HIO_c0 {
public:
static DUSK_GAME_DATA u16 const m_lockWaitTime;
static DUSK_GAME_DATA f32 const m_minCircleR;
static DUSK_GAME_DATA f32 const m_middleCircleR;
static DUSK_GAME_DATA f32 const m_maxCircleR;
static DUSK_GAME_DATA f32 const m_scale;
static DUSK_GAME_DATA f32 const m_lockWindScale;
static u16 const m_lockWaitTime;
static f32 const m_minCircleR;
static f32 const m_middleCircleR;
static f32 const m_maxCircleR;
static f32 const m_scale;
static f32 const m_lockWindScale;
};
#endif /* D_A_BOOMERANG_H */
+3 -3
View File
@@ -18,7 +18,7 @@ class daBullet_Param_c {
public:
virtual ~daBullet_Param_c() {}
static DUSK_GAME_DATA daBullet_HIOParam const m;
static daBullet_HIOParam const m;
};
#if DEBUG
@@ -80,8 +80,8 @@ public:
int wait(void*);
int move(void*);
static DUSK_GAME_DATA dCcD_SrcGObjInf const mCcDObjInfo;
static DUSK_GAME_DATA dCcD_SrcSph mCcDSph;
static dCcD_SrcGObjInf const mCcDObjInfo;
static dCcD_SrcSph mCcDSph;
};
STATIC_ASSERT(sizeof(daBullet_c) == 0x95c);
+1 -1
View File
@@ -33,7 +33,7 @@ public:
const CoachFireAttr& attr() { return M_attr; }
static DUSK_GAME_DATA CoachFireAttr const M_attr;
static CoachFireAttr const M_attr;
inline ~daCoachFire_c();
+1 -1
View File
@@ -38,7 +38,7 @@ public:
struct BckTbl {
u16 idx[4];
};
static DUSK_GAME_DATA const BckTbl m_bckIdxTable[];
static const BckTbl m_bckIdxTable[];
private:
/* 0x5A0 */ const char* m_arcName;
+1 -1
View File
@@ -99,7 +99,7 @@ public:
mWarpMode = daCstatueWarpMode_Active;
}
static DUSK_GAME_DATA u16 const m_bckIdxTable[daCstatueType_N][7];
static u16 const m_bckIdxTable[daCstatueType_N][7];
private:
/* 0x568 */ const char* mResName;
+9 -9
View File
@@ -65,15 +65,15 @@ public:
f32 getCloseBoundSpeed() { return CLOSE_BOUND_SPEED; }
f32 getCloseBoundRatio() { return CLOSE_BOUND_RATIO; }
static DUSK_GAME_DATA f32 const OPEN_SIZE;
static DUSK_GAME_DATA f32 const OPEN_ACCEL;
static DUSK_GAME_DATA f32 const OPEN_SPEED;
static DUSK_GAME_DATA f32 const OPEN_BOUND_SPEED;
static DUSK_GAME_DATA f32 const OPEN_BOUND_RATIO;
static DUSK_GAME_DATA f32 const CLOSE_ACCEL;
static DUSK_GAME_DATA f32 const CLOSE_SPEED;
static DUSK_GAME_DATA f32 const CLOSE_BOUND_SPEED;
static DUSK_GAME_DATA f32 const CLOSE_BOUND_RATIO;
static f32 const OPEN_SIZE;
static f32 const OPEN_ACCEL;
static f32 const OPEN_SPEED;
static f32 const OPEN_BOUND_SPEED;
static f32 const OPEN_BOUND_RATIO;
static f32 const CLOSE_ACCEL;
static f32 const CLOSE_SPEED;
static f32 const CLOSE_BOUND_SPEED;
static f32 const CLOSE_BOUND_RATIO;
/* 0x5A0 */ dComIfG_resLoader_c mResLoader;
/* 0x5B0 */ J3DModel* mpModel;
+8 -8
View File
@@ -175,14 +175,14 @@ private:
STATIC_ASSERT(sizeof(daE_DT_c) == 0x1174);
struct E_DT_n {
static DUSK_GAME_DATA f32 eDt_ShakeFrame[10];
static DUSK_GAME_DATA f32 eDt_ShakeFrameDemo[10];
static DUSK_GAME_DATA dCcD_SrcSph cc_dt_body_src;
static DUSK_GAME_DATA dCcD_SrcSph cc_dt_tongue_src;
static DUSK_GAME_DATA int mDt_OtamaNum;
static DUSK_GAME_DATA int mDt_OtamaNo[20];
static DUSK_GAME_DATA int m_fall_no;
static DUSK_GAME_DATA cXyz m_tongue_pos;
static f32 eDt_ShakeFrame[10];
static f32 eDt_ShakeFrameDemo[10];
static dCcD_SrcSph cc_dt_body_src;
static dCcD_SrcSph cc_dt_tongue_src;
static int mDt_OtamaNum;
static int mDt_OtamaNo[20];
static int m_fall_no;
static cXyz m_tongue_pos;
};
+1 -1
View File
@@ -101,7 +101,7 @@ private:
/* 0xB9E */ u8 field_0xb9e;
/* 0xB9F */ u8 mHIOInit;
static DUSK_GAME_DATA actionFunc l_actionmenu[9];
static actionFunc l_actionmenu[9];
};
STATIC_ASSERT(sizeof(daE_GE_c) == 0xBA0);
+8 -8
View File
@@ -159,14 +159,14 @@ private:
STATIC_ASSERT(sizeof(daE_OC_c) == 0xe88);
struct E_OC_n {
static DUSK_GAME_DATA f32 const oc_attackb_trans[10];
static DUSK_GAME_DATA f32 const oc_attackc_trans[10];
static DUSK_GAME_DATA dCcD_SrcSph cc_sph_src;
static DUSK_GAME_DATA dCcD_SrcSph at_sph_src;
static DUSK_GAME_DATA daE_OC_c* m_battle_oc;
static DUSK_GAME_DATA daE_OC_c* m_damage_oc;
static DUSK_GAME_DATA daE_OC_c* m_death_oc;
static DUSK_GAME_DATA daE_OC_c* m_talk_oc;
static f32 const oc_attackb_trans[10];
static f32 const oc_attackc_trans[10];
static dCcD_SrcSph cc_sph_src;
static dCcD_SrcSph at_sph_src;
static daE_OC_c* m_battle_oc;
static daE_OC_c* m_damage_oc;
static daE_OC_c* m_death_oc;
static daE_OC_c* m_talk_oc;
};
#endif /* D_A_E_OC_H */
+1 -1
View File
@@ -215,7 +215,7 @@ private:
STATIC_ASSERT(sizeof(daE_YM_c) == 0xAF8);
struct E_YM_n {
static DUSK_GAME_DATA dCcD_SrcSph cc_sph_src;
static dCcD_SrcSph cc_sph_src;
};
+2 -2
View File
@@ -311,10 +311,10 @@ struct daFmtMng_c : public fopAc_ac_c {
}
static FmtMngAttributes const& attr() { return M_attr; }
static DUSK_GAME_DATA FmtMngAttributes const M_attr;
static FmtMngAttributes const M_attr;
typedef void (daFmtMng_c::*ActionFunc)();
static DUSK_GAME_DATA daFmtMng_c::ActionFunc ActionTable[10];
static daFmtMng_c::ActionFunc ActionTable[10];
/* 0x568 */ FmtPos_c* mPos;
/* 0x56C */ FmtMember_c* mMember;
+3 -3
View File
@@ -41,9 +41,9 @@ public:
static void deleteRoomGrass(int);
static void deleteRoomFlower(int);
static DUSK_GAME_DATA daGrass_c* m_myObj;
static DUSK_GAME_DATA dGrass_packet_c* m_grass;
static DUSK_GAME_DATA dFlower_packet_c* m_flower;
static daGrass_c* m_myObj;
static dGrass_packet_c* m_grass;
static dFlower_packet_c* m_flower;
/* 0x568 */ u8 unk_0x568[0x570 - 0x568];
};
+3 -3
View File
@@ -351,8 +351,8 @@ public:
m_modelData->getMaterialNodePointer(5)->getShape()->hide();
}
static DUSK_GAME_DATA u16 const m_footJointTable[];
static DUSK_GAME_DATA f32 const m_callLimitDistance2;
static u16 const m_footJointTable[];
static f32 const m_callLimitDistance2;
/* 0x0568 */ request_of_phase_process_class m_phase;
/* 0x0570 */ J3DModel* m_model;
@@ -567,7 +567,7 @@ public:
class daHorse_hio_c0 {
public:
static DUSK_GAME_DATA const daHorse_hio_c1 m;
static const daHorse_hio_c1 m;
};
class daHorse_hio_c : public JORReflexible {
+3 -3
View File
@@ -29,8 +29,8 @@ public:
static void setMorfFrame(u8 i_frame) { mMorfFrame = i_frame; }
static void decMorfFrame() { cLib_calcTimer<u8>(&mMorfFrame); }
static DUSK_GAME_DATA u8 mEyeMoveFlg;
static DUSK_GAME_DATA u8 mMorfFrame;
static u8 mEyeMoveFlg;
static u8 mMorfFrame;
/* 0x0F4 */ f32 field_0xf4;
/* 0x0F8 */ f32 field_0xf8;
@@ -50,7 +50,7 @@ struct daHoZelda_hio_c1 {
struct daHoZelda_hio_c0 {
daHoZelda_hio_c0() {}
static DUSK_GAME_DATA daHoZelda_hio_c1 const m;
static daHoZelda_hio_c1 const m;
};
class daHoZelda_hio_c : public JORReflexible {
+1 -1
View File
@@ -60,7 +60,7 @@ public:
virtual u8 getCollisionH();
virtual u8 getCollisionR();
static DUSK_GAME_DATA daItemBase_data const m_data;
static daItemBase_data const m_data;
/* 0x56C */ request_of_phase_process_class mPhase;
/* 0x574 */ J3DModel* mpModel;
+5 -5
View File
@@ -32,7 +32,7 @@ public:
class daMidna_hio_c0 {
public:
static DUSK_GAME_DATA daMidna_hio_c1 const m;
static daMidna_hio_c1 const m;
};
STATIC_ASSERT(sizeof(daMidna_hio_c0::m) == 0x20);
@@ -87,8 +87,8 @@ public:
/* 0x0FC */ f32 mNowOffsetX;
/* 0x100 */ f32 mNowOffsetY;
static DUSK_GAME_DATA bool sEyeMoveFlg;
static DUSK_GAME_DATA u8 sMorfFrame;
static bool sEyeMoveFlg;
static u8 sMorfFrame;
};
STATIC_ASSERT(sizeof(daMidna_matAnm_c) == 0x104);
@@ -420,8 +420,8 @@ public:
static u32 getOtherHeapSize() { return 0x1D0; }
static DUSK_GAME_DATA daMidna_texData_s const m_texDataTable[21];
static DUSK_GAME_DATA daMidna_anmData_s const m_anmDataTable[53];
static daMidna_texData_s const m_texDataTable[21];
static daMidna_anmData_s const m_anmDataTable[53];
private:
/* 0x568 */ request_of_phase_process_class mPhase;
+2 -2
View File
@@ -58,8 +58,8 @@ public:
static u32 getMirrorRoomPrm() { return 0xFF03; }
typedef int (daMirror_c::*entryModelFunc)(J3DModel*);
static DUSK_GAME_DATA entryModelFunc m_entryModel;
static DUSK_GAME_DATA daMirror_c* m_myObj;
static entryModelFunc m_entryModel;
static daMirror_c* m_myObj;
/* 0x570 */ dMirror_packet_c mPacket;
/* 0x6f8 */ J3DModel* mpModel;
+7 -1
View File
@@ -95,6 +95,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;
@@ -164,7 +170,7 @@ public:
static int daMP_c_Callback_Main(daMP_c*);
static int daMP_c_Callback_Draw(daMP_c*);
static DUSK_GAME_DATA daMP_c* m_myObj;
static daMP_c* m_myObj;
private:
/* 0x568 */ u32 (*mpGetMovieRestFrame)(void);
+2 -2
View File
@@ -131,8 +131,8 @@ public:
typedef void (daMyna_c::*ProcFunc)();
typedef int (daMyna_c::*BaseMotionFunc)(int);
static DUSK_GAME_DATA dCcD_SrcSph const mCcDSph;
static DUSK_GAME_DATA daMyna_c::BaseMotionFunc mBaseMotionTBL[7];
static dCcD_SrcSph const mCcDSph;
static daMyna_c::BaseMotionFunc mBaseMotionTBL[7];
/* 0x56C */ request_of_phase_process_class mPhase;
/* 0x574 */ mDoExt_McaMorfSO* mpMorf;
+1 -1
View File
@@ -91,7 +91,7 @@ public:
s16 getExTime() { return mExTime; }
static DUSK_GAME_DATA const char* m_arcNameList[6];
static const char* m_arcNameList[6];
/* 0x56C */ request_of_phase_process_class mPhase;
/* 0x574 */ J3DModel* mpModel;
+6 -6
View File
@@ -776,12 +776,12 @@ public:
return chkFindActor(daPy_getPlayerActorClass(), param_0, param_1);
}
static DUSK_GAME_DATA dCcD_SrcGObjInf const mCcDObjData;
static DUSK_GAME_DATA dCcD_SrcCyl mCcDCyl;
static DUSK_GAME_DATA dCcD_SrcSph mCcDSph;
static DUSK_GAME_DATA fopAc_ac_c* mFindActorPtrs[50];
static DUSK_GAME_DATA s16 mSrchName;
static DUSK_GAME_DATA int mFindCount;
static dCcD_SrcGObjInf const mCcDObjData;
static dCcD_SrcCyl mCcDCyl;
static dCcD_SrcSph mCcDSph;
static fopAc_ac_c* mFindActorPtrs[50];
static s16 mSrchName;
static int mFindCount;
enum Mode {
/* 0 */ MODE_ENTER,
+6 -6
View File
@@ -113,9 +113,9 @@ public:
virtual void drawOtherMdls();
virtual bool dbgDraw();
static DUSK_GAME_DATA dCcD_SrcGObjInf const mCcDObj;
static DUSK_GAME_DATA dCcD_SrcCyl mCcDCyl;
static DUSK_GAME_DATA dCcD_SrcSph mCcDSph;
static dCcD_SrcGObjInf const mCcDObj;
static dCcD_SrcCyl mCcDCyl;
static dCcD_SrcSph mCcDSph;
public:
/* 0x56C */ dBgS_ObjAcch mAcch;
@@ -173,9 +173,9 @@ public:
virtual int ToFore() { return 1; }
virtual int ToBack() { return 1; }
static DUSK_GAME_DATA const char* m_name;
static DUSK_GAME_DATA int m_dzb_id;
static DUSK_GAME_DATA MoveBGActor_SetFunc m_set_func;
static const char* m_name;
static int m_dzb_id;
static MoveBGActor_SetFunc m_set_func;
public:
/* 0xA14 */ dBgW* mpBgw;
+7 -7
View File
@@ -394,13 +394,13 @@ public:
void onHide() { mHide = true; }
void offHide() { mHide = false; }
static DUSK_GAME_DATA dCcD_SrcGObjInf const mCcDObjInfo;
static DUSK_GAME_DATA dCcD_SrcCyl mCcDCyl;
static DUSK_GAME_DATA dCcD_SrcSph mCcDSph;
static DUSK_GAME_DATA fopAc_ac_c* mFindActorPList[100];
static DUSK_GAME_DATA s32 mFindCount;
static DUSK_GAME_DATA s16 mSrchActorName;
static DUSK_GAME_DATA char mFileNameBuf[0x15];
static dCcD_SrcGObjInf const mCcDObjInfo;
static dCcD_SrcCyl mCcDCyl;
static dCcD_SrcSph mCcDSph;
static fopAc_ac_c* mFindActorPList[100];
static s32 mFindCount;
static s16 mSrchActorName;
static char mFileNameBuf[0x15];
};
STATIC_ASSERT(sizeof(daNpcF_c) == 0xB48);
+3 -3
View File
@@ -17,7 +17,7 @@ class daNpc_Aru_Param_c {
public:
virtual ~daNpc_Aru_Param_c() {}
static DUSK_GAME_DATA daNpc_Aru_HIOParam const m;
static daNpc_Aru_HIOParam const m;
};
#if DEBUG
@@ -171,8 +171,8 @@ public:
u8 getPathID() { return (fopAcM_GetParam(this) & 0xFF00) >> 8; }
void setLastIn() { mLastGoatIn = true; }
static DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST mCutNameList[7];
static DUSK_GAME_DATA cutFunc DUSK_CONST mCutList[7];
static char DUSK_CONST* DUSK_CONST mCutNameList[7];
static cutFunc DUSK_CONST mCutList[7];
private:
/* 0xE40 */ NPC_ARU_HIO_CLASS* mpHIO;
+2 -2
View File
@@ -12,7 +12,7 @@ public:
daNpcAsh_Param_c() {}
virtual ~daNpcAsh_Param_c() {}
static DUSK_GAME_DATA const daNpcAsh_HIOParam m;
static const daNpcAsh_HIOParam m;
};
#if DEBUG
@@ -143,7 +143,7 @@ public:
inline bool step(s16, bool);
inline void playExpression();
static DUSK_GAME_DATA EventFn mEvtSeqList[6];
static EventFn mEvtSeqList[6];
private:
/* 0xB48 */ Z2Creature mCreatureSound;
+2 -2
View File
@@ -12,7 +12,7 @@ class daNpcAshB_Param_c {
public:
virtual ~daNpcAshB_Param_c() {}
static DUSK_GAME_DATA const daNpcAshB_HIOParam m;
static const daNpcAshB_HIOParam m;
};
#if DEBUG
@@ -135,7 +135,7 @@ public:
inline bool step(s16, int, f32);
inline void playExpression();
static DUSK_GAME_DATA EventFn DUSK_CONST mEvtSeqList[2];
static EventFn DUSK_CONST mEvtSeqList[2];
private:
/* 0xB48 */ Z2Creature mCreatureSound;
+3 -3
View File
@@ -22,7 +22,7 @@ class daNpc_Bans_Param_c {
public:
virtual ~daNpc_Bans_Param_c() {}
static DUSK_GAME_DATA daNpc_Bans_HIOParam const m;
static daNpc_Bans_HIOParam const m;
};
#if DEBUG
@@ -117,8 +117,8 @@ public:
return rv;
}
static DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST mCutNameList[4];
static DUSK_GAME_DATA cutFunc DUSK_CONST mCutList[4];
static char DUSK_CONST* DUSK_CONST mCutNameList[4];
static cutFunc DUSK_CONST mCutList[4];
/* 0x0F7C */ mDoExt_McaMorfSO* mpScoopMorf;
/* 0x0F80 */ NPC_BANS_HIO_CLASS* mHIO;
+3 -3
View File
@@ -15,7 +15,7 @@ class daNpc_Besu_Param_c {
public:
virtual ~daNpc_Besu_Param_c() {}
static DUSK_GAME_DATA const daNpc_Besu_HIOParam m;
static const daNpc_Besu_HIOParam m;
};
#if DEBUG
@@ -140,8 +140,8 @@ public:
u8 getPathID() { return (fopAcM_GetParam(this) & 0xff00) >> 8; }
u8 getBitSW() { return (fopAcM_GetParam(this) & 0xff0000) >> 16; }
static DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST mCutNameList[15];
static DUSK_GAME_DATA cutFunc DUSK_CONST mCutList[15];
static char DUSK_CONST* DUSK_CONST mCutNameList[15];
static cutFunc DUSK_CONST mCutList[15];
private:
/* 0x0E40 */ mDoExt_McaMorfSO* mpCupModelMorf;
+2 -2
View File
@@ -14,7 +14,7 @@ class daNpcBlueNS_Param_c {
public:
virtual ~daNpcBlueNS_Param_c() {}
static DUSK_GAME_DATA const daNpcBlueNS_HIOParam m;
static const daNpcBlueNS_HIOParam m;
};
#if DEBUG
@@ -124,7 +124,7 @@ public:
return var_r30;
}
static DUSK_GAME_DATA EventFn DUSK_CONST mEvtSeqList[];
static EventFn DUSK_CONST mEvtSeqList[];
/* 0xB48 */ Z2Creature mSound;
/* 0xBD8 */ u8 field_0xBD8[0xBDC - 0xBD8];
+3 -3
View File
@@ -16,7 +16,7 @@ struct daNpc_Bou_HIOParam {
public:
virtual ~daNpc_Bou_Param_c() {}
static DUSK_GAME_DATA const daNpc_Bou_HIOParam m;
static const daNpc_Bou_HIOParam m;
};
#if DEBUG
@@ -114,8 +114,8 @@ public:
virtual int drawDbgInfo();
virtual void changeAnm(int*, int*);
static DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST mCutNameList[9];
static DUSK_GAME_DATA cutFunc DUSK_CONST mCutList[9];
static char DUSK_CONST* DUSK_CONST mCutNameList[9];
static cutFunc DUSK_CONST mCutList[9];
int getFlowNodeNo() {
u16 nodeNo = home.angle.x;
+2 -2
View File
@@ -29,7 +29,7 @@ class daNpcBouS_Param_c {
public:
virtual ~daNpcBouS_Param_c() {}
static DUSK_GAME_DATA daNpcBouS_HIOParam const m;
static daNpcBouS_HIOParam const m;
};
#if DEBUG
@@ -128,7 +128,7 @@ public:
mForcibleTalk = 1;
}
static DUSK_GAME_DATA eventFunc mEvtSeqList[4];
static eventFunc mEvtSeqList[4];
private:
/* 0xB48 */ Z2Creature mSound;
+2 -2
View File
@@ -25,7 +25,7 @@ public:
J3DModelData* getObjMdlDataP(int);
virtual ~daNpcCd_c() {}
static DUSK_GAME_DATA dCcD_SrcCyl const m_cylDat;
static dCcD_SrcCyl const m_cylDat;
/* 0x56C */ request_of_phase_process_class mPhase1;
/* 0x574 */ request_of_phase_process_class mPhase2;
@@ -101,7 +101,7 @@ public:
STATIC_ASSERT(sizeof(daNpcCd_HIO_c) == 0x29BC);
DUSK_GAME_EXTERN daNpcCd_HIO_c l_Cd_HIO;
extern daNpcCd_HIO_c l_Cd_HIO;
inline f32 HIO_atnOfs(int param_1) {
s16 rv;
if (param_1 < 16) {
+2 -2
View File
@@ -87,7 +87,7 @@ struct daNpcCd2_HIO_c : public fOpAcm_HIO_entry_c {
/* 0x20C4 */ daNpcCd2_HIO_WChild_c field_0x20c4[14];
};
DUSK_GAME_EXTERN daNpcCd2_HIO_c l_Cd2_HIO;
extern daNpcCd2_HIO_c l_Cd2_HIO;
inline s16 Cd2_HIO_atnOfs(int param_1) {
s16 rv;
@@ -269,7 +269,7 @@ public:
J3DAnmTexPattern* getTexAnmP(int);
virtual ~daNpcCd2_c() {}
static DUSK_GAME_DATA dCcD_SrcCyl const m_cylDat;
static dCcD_SrcCyl const m_cylDat;
/* 0x56C */ request_of_phase_process_class mPhase1;
/* 0x574 */ request_of_phase_process_class mPhase2;
+46 -46
View File
@@ -334,52 +334,52 @@ public:
actionFunc mExecFn;
};
static DUSK_GAME_DATA const ActionPair ActionTable[8];
static DUSK_GAME_DATA seqFunc* m_funcTbl[44];
static DUSK_GAME_DATA seqFunc m_seq00_funcTbl[2];
static DUSK_GAME_DATA seqFunc m_seq01_funcTbl[2];
static DUSK_GAME_DATA seqFunc m_seq02_funcTbl[2];
static DUSK_GAME_DATA seqFunc m_seq03_funcTbl[2];
static DUSK_GAME_DATA seqFunc m_seq04_funcTbl[2];
static DUSK_GAME_DATA seqFunc m_seq05_funcTbl[4];
static DUSK_GAME_DATA seqFunc m_seq06_funcTbl[4];
static DUSK_GAME_DATA seqFunc m_seq07_funcTbl[2];
static DUSK_GAME_DATA seqFunc m_seq08_funcTbl[7];
static DUSK_GAME_DATA seqFunc m_seq09_funcTbl[2];
static DUSK_GAME_DATA seqFunc m_seq10_funcTbl[2];
static DUSK_GAME_DATA seqFunc m_seq11_funcTbl[6];
static DUSK_GAME_DATA seqFunc m_seq12_funcTbl[2];
static DUSK_GAME_DATA seqFunc m_seq13_funcTbl[6];
static DUSK_GAME_DATA seqFunc m_seq14_funcTbl[2];
static DUSK_GAME_DATA seqFunc m_seq15_funcTbl[2];
static DUSK_GAME_DATA seqFunc m_seq16_funcTbl[7];
static DUSK_GAME_DATA seqFunc m_seq17_funcTbl[2];
static DUSK_GAME_DATA seqFunc m_seq18_funcTbl[2];
static DUSK_GAME_DATA seqFunc m_seq19_funcTbl[7];
static DUSK_GAME_DATA seqFunc m_seq20_funcTbl[2];
static DUSK_GAME_DATA seqFunc m_seq21_funcTbl[2];
static DUSK_GAME_DATA seqFunc m_seq22_funcTbl[4];
static DUSK_GAME_DATA seqFunc m_seq23_funcTbl[7];
static DUSK_GAME_DATA seqFunc m_seq24_funcTbl[5];
static DUSK_GAME_DATA seqFunc m_seq25_funcTbl[7];
static DUSK_GAME_DATA seqFunc m_seq26_funcTbl[3];
static DUSK_GAME_DATA seqFunc m_seq27_funcTbl[2];
static DUSK_GAME_DATA seqFunc m_seq28_funcTbl[3];
static DUSK_GAME_DATA seqFunc m_seq29_funcTbl[3];
static DUSK_GAME_DATA seqFunc m_seq30_funcTbl[6];
static DUSK_GAME_DATA seqFunc m_seq31_funcTbl[6];
static DUSK_GAME_DATA seqFunc m_seq32_funcTbl[7];
static DUSK_GAME_DATA seqFunc m_seq33_funcTbl[7];
static DUSK_GAME_DATA seqFunc m_seq34_funcTbl[9];
static DUSK_GAME_DATA seqFunc m_seq35_funcTbl[2];
static DUSK_GAME_DATA seqFunc m_seq36_funcTbl[4];
static DUSK_GAME_DATA seqFunc m_seq37_funcTbl[2];
static DUSK_GAME_DATA seqFunc m_seq38_funcTbl[2];
static DUSK_GAME_DATA seqFunc m_seq39_funcTbl[2];
static DUSK_GAME_DATA seqFunc m_seq40_funcTbl[3];
static DUSK_GAME_DATA seqFunc m_seq41_funcTbl[2];
static DUSK_GAME_DATA seqFunc m_seq42_funcTbl[2];
static DUSK_GAME_DATA seqFunc m_seq43_funcTbl[3];
static const ActionPair ActionTable[8];
static seqFunc* m_funcTbl[44];
static seqFunc m_seq00_funcTbl[2];
static seqFunc m_seq01_funcTbl[2];
static seqFunc m_seq02_funcTbl[2];
static seqFunc m_seq03_funcTbl[2];
static seqFunc m_seq04_funcTbl[2];
static seqFunc m_seq05_funcTbl[4];
static seqFunc m_seq06_funcTbl[4];
static seqFunc m_seq07_funcTbl[2];
static seqFunc m_seq08_funcTbl[7];
static seqFunc m_seq09_funcTbl[2];
static seqFunc m_seq10_funcTbl[2];
static seqFunc m_seq11_funcTbl[6];
static seqFunc m_seq12_funcTbl[2];
static seqFunc m_seq13_funcTbl[6];
static seqFunc m_seq14_funcTbl[2];
static seqFunc m_seq15_funcTbl[2];
static seqFunc m_seq16_funcTbl[7];
static seqFunc m_seq17_funcTbl[2];
static seqFunc m_seq18_funcTbl[2];
static seqFunc m_seq19_funcTbl[7];
static seqFunc m_seq20_funcTbl[2];
static seqFunc m_seq21_funcTbl[2];
static seqFunc m_seq22_funcTbl[4];
static seqFunc m_seq23_funcTbl[7];
static seqFunc m_seq24_funcTbl[5];
static seqFunc m_seq25_funcTbl[7];
static seqFunc m_seq26_funcTbl[3];
static seqFunc m_seq27_funcTbl[2];
static seqFunc m_seq28_funcTbl[3];
static seqFunc m_seq29_funcTbl[3];
static seqFunc m_seq30_funcTbl[6];
static seqFunc m_seq31_funcTbl[6];
static seqFunc m_seq32_funcTbl[7];
static seqFunc m_seq33_funcTbl[7];
static seqFunc m_seq34_funcTbl[9];
static seqFunc m_seq35_funcTbl[2];
static seqFunc m_seq36_funcTbl[4];
static seqFunc m_seq37_funcTbl[2];
static seqFunc m_seq38_funcTbl[2];
static seqFunc m_seq39_funcTbl[2];
static seqFunc m_seq40_funcTbl[3];
static seqFunc m_seq41_funcTbl[2];
static seqFunc m_seq42_funcTbl[2];
static seqFunc m_seq43_funcTbl[3];
/* 0xAC8 */ J3DModel* field_0xac8;
/* 0xACC */ J3DModel* field_0xacc;
+2 -2
View File
@@ -11,7 +11,7 @@ class daNpcChat_Param_c {
public:
virtual ~daNpcChat_Param_c() {}
static DUSK_GAME_DATA daNpcChat_HIOParam const m;
static daNpcChat_HIOParam const m;
};
#if DEBUG
@@ -102,7 +102,7 @@ public:
void setFear() { mFear = true; }
void setTalkFlag() { mTalkFlag = true; }
static DUSK_GAME_DATA eventFunc DUSK_CONST mEvtSeqList[1];
static eventFunc DUSK_CONST mEvtSeqList[1];
private:
/* 0xB48 */ Z2CreatureCitizen mSound;
+2 -2
View File
@@ -12,7 +12,7 @@ class daNpcChin_Param_c {
public:
virtual ~daNpcChin_Param_c() {}
static DUSK_GAME_DATA daNpcChin_HIOParam const m;
static daNpcChin_HIOParam const m;
};
#if DEBUG
@@ -183,7 +183,7 @@ public:
inline void ForcibleTalk_Off() { field_0xe06 = 0; }
inline u8 getForcibleTalk2() { return field_0xe06; }
static DUSK_GAME_DATA eventFunc mEvtSeqList[8];
static eventFunc mEvtSeqList[8];
/* 0xB48 */ Z2Creature mSound;
/* 0xBD8 */ daNpcF_MatAnm_c* mpMatAnm;
+3 -3
View File
@@ -14,7 +14,7 @@ class daNpc_clerkA_Param_c {
public:
virtual ~daNpc_clerkA_Param_c() {}
static DUSK_GAME_DATA const daNpc_clerkA_HIOParam m;
static const daNpc_clerkA_HIOParam m;
};
#if DEBUG
@@ -124,8 +124,8 @@ public:
u8 getMaxNumItem() { return (fopAcM_GetParam(this) & 0xF000000) >> 24; }
static DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST mCutNameList[1];
static DUSK_GAME_DATA cutFunc DUSK_CONST mCutList[1];
static char DUSK_CONST* DUSK_CONST mCutNameList[1];
static cutFunc DUSK_CONST mCutList[1];
private:
/* 0x0F7C */ NPC_CLERKA_HIO_CLASS* mpHIO;
+3 -3
View File
@@ -15,7 +15,7 @@ class daNpc_clerkB_Param_c {
public:
virtual ~daNpc_clerkB_Param_c() {}
static DUSK_GAME_DATA const daNpc_clerkB_HIOParam m;
static const daNpc_clerkB_HIOParam m;
};
#if DEBUG
@@ -137,8 +137,8 @@ public:
u8 getMaxNumItem() { return (fopAcM_GetParam(this) & 0xF000000) >> 24; }
static DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST mCutNameList[1];
static DUSK_GAME_DATA cutFunc DUSK_CONST mCutList[1];
static char DUSK_CONST* DUSK_CONST mCutNameList[1];
static cutFunc DUSK_CONST mCutList[1];
private:
/* 0x0F7C */ mDoExt_bpkAnm mBpkAnm2;
+3 -3
View File
@@ -12,7 +12,7 @@ class daNpcClerkt_Param_c {
public:
virtual ~daNpcClerkt_Param_c() {}
static DUSK_GAME_DATA const daNpcClerkt_HIOParam m;
static const daNpcClerkt_HIOParam m;
};
#if DEBUG
@@ -125,8 +125,8 @@ public:
}
}
static DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST mCutNameList[1];
static DUSK_GAME_DATA cutFunc DUSK_CONST mCutList[1];
static char DUSK_CONST* DUSK_CONST mCutNameList[1];
static cutFunc DUSK_CONST mCutList[1];
private:
/* 0x0F7C */ NPC_CLERKT_HIO_CLASS* mpHIO;
+1 -1
View File
@@ -295,7 +295,7 @@ public:
const daNpcCoach_Attr_c& attr() const { return M_attr; }
static DUSK_GAME_DATA daNpcCoach_Attr_c const M_attr;
static daNpcCoach_Attr_c const M_attr;
static u16 const ParticleName[10];
private:
/* 0x0568 */ daNpcChHorse_c mChHorse;
+3 -3
View File
@@ -12,7 +12,7 @@ class daNpc_Doc_Param_c {
public:
virtual ~daNpc_Doc_Param_c() {}
static DUSK_GAME_DATA const daNpc_Doc_HIOParam m;
static const daNpc_Doc_HIOParam m;
};
#if DEBUG
@@ -133,8 +133,8 @@ public:
return (fopAcM_GetParam(this) & 0xFF00) >> 8;
}
static DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST mCutNameList[1];
static DUSK_GAME_DATA cutFunc DUSK_CONST mCutList[1];
static char DUSK_CONST* DUSK_CONST mCutNameList[1];
static cutFunc DUSK_CONST mCutList[1];
private:
/* 0xE40 */ NPC_DOC_HIO_CLASS* mpHIO;
+2 -2
View File
@@ -12,7 +12,7 @@ class daNpcDoorBoy_Param_c {
public:
virtual ~daNpcDoorBoy_Param_c() {}
static DUSK_GAME_DATA daNpcDoorBoy_HIOParam const m;
static daNpcDoorBoy_HIOParam const m;
};
#if DEBUG
@@ -78,7 +78,7 @@ public:
inline int getTimeHour();
inline bool isDummyTalk();
static DUSK_GAME_DATA EventFn DUSK_CONST mEvtSeqList[1];
static EventFn DUSK_CONST mEvtSeqList[1];
private:
/* 0xB48 */ Z2CreatureCitizen mSound;
+1 -1
View File
@@ -11,7 +11,7 @@ class daNpcDrSol_Param_c {
public:
virtual ~daNpcDrSol_Param_c() {}
static DUSK_GAME_DATA const daNpcDrSol_HIOParam m;
static const daNpcDrSol_HIOParam m;
};
#if DEBUG
+3 -3
View File
@@ -94,7 +94,7 @@ class daNpc_Fairy_Param_c {
public:
virtual ~daNpc_Fairy_Param_c() {}
static DUSK_GAME_DATA daNpc_Fairy_HIOParam const m;
static daNpc_Fairy_HIOParam const m;
};
#if DEBUG
@@ -294,8 +294,8 @@ public:
u8 getSceneNo1() { return (fopAcM_GetParam(this) >> 8) & 0xFF; }
u8 getSceneNo2() { return (fopAcM_GetParam(this) >> 16) & 0xFF; }
static DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST mCutNameList[18];
static DUSK_GAME_DATA cutFunc DUSK_CONST mCutList[18];
static char DUSK_CONST* DUSK_CONST mCutNameList[18];
static cutFunc DUSK_CONST mCutList[18];
private:
/* 0x0E40 */ NPC_FAIRY_HIO_CLASS* mHIO;
/* 0x0E44 */ dCcD_Cyl mCyl;
+3 -3
View File
@@ -13,7 +13,7 @@ class daNpc_FairySeirei_Param_c {
public:
virtual ~daNpc_FairySeirei_Param_c() {}
static DUSK_GAME_DATA daNpc_FairySeirei_HIOParam const m;
static daNpc_FairySeirei_HIOParam const m;
};
#if DEBUG
@@ -90,8 +90,8 @@ public:
int getSeneNo() { return (fopAcM_GetParam(this) >> 8) & 0xFF; }
static DUSK_GAME_DATA DUSK_CONST char* mCutNameList[1];
static DUSK_GAME_DATA DUSK_CONST cutFunc mCutList[1];
static DUSK_CONST char* mCutNameList[1];
static DUSK_CONST cutFunc mCutList[1];
private:
/* 0xE40 */ NPC_FAIRY_SEIREI_HIO_CLASS* mpHIO;
+3 -3
View File
@@ -11,7 +11,7 @@ class daNpc_Gnd_Param_c {
public:
virtual ~daNpc_Gnd_Param_c() {}
static DUSK_GAME_DATA const daNpc_Gnd_HIOParam m;
static const daNpc_Gnd_HIOParam m;
};
#if DEBUG
@@ -96,8 +96,8 @@ public:
s32 getNeckJointNo() { return 3; }
s32 getBackboneJointNo() { return 1; }
static DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST mCutNameList[1];
static DUSK_GAME_DATA cutFunc DUSK_CONST mCutList[1];
static char DUSK_CONST* DUSK_CONST mCutNameList[1];
static cutFunc DUSK_CONST mCutList[1];
private:
/* 0xE40 */ NPC_GND_HIO_CLASS* mpHIO;
+3 -3
View File
@@ -21,7 +21,7 @@ class daNpc_grA_Param_c {
public:
virtual ~daNpc_grA_Param_c() {}
static DUSK_GAME_DATA daNpc_grA_HIOParam const m;
static daNpc_grA_HIOParam const m;
};
#if DEBUG
@@ -138,9 +138,9 @@ public:
void addCarryNum() { field_0x1692++; }
u8 getPathNoFromParam() { return home.angle.z; }
void setGateWalk() { field_0x14D0 = 1; }
static DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST mEvtCutNameList[12];
static char DUSK_CONST* DUSK_CONST mEvtCutNameList[12];
typedef BOOL (daNpc_grA_c::*cut_type)(int);
static DUSK_GAME_DATA cut_type DUSK_CONST mEvtCutList[];
static cut_type DUSK_CONST mEvtCutList[];
private:
typedef BOOL (daNpc_grA_c::*daNpc_grA_c_Action)(void*);
+3 -3
View File
@@ -12,7 +12,7 @@ class daNpc_grC_Param_c {
public:
virtual ~daNpc_grC_Param_c() {}
static DUSK_GAME_DATA daNpc_grC_HIOParam const m;
static daNpc_grC_HIOParam const m;
};
#if DEBUG
@@ -89,8 +89,8 @@ public:
void setPrtcl();
void adjustShapeAngle() {}
static DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST mEvtCutNameList;
static DUSK_GAME_DATA EventFn DUSK_CONST mEvtCutList[1];
static char DUSK_CONST* DUSK_CONST mEvtCutNameList;
static EventFn DUSK_CONST mEvtCutList[1];
private:
/* 0xB48 */ Z2Creature mSound;
+3 -3
View File
@@ -11,7 +11,7 @@ class daNpc_Grd_Param_c {
public:
virtual ~daNpc_Grd_Param_c() {}
static DUSK_GAME_DATA daNpc_Grd_HIOParam const m;
static daNpc_Grd_HIOParam const m;
};
#if DEBUG
@@ -81,8 +81,8 @@ public:
BOOL ECut_nodToGrz(int);
void adjustShapeAngle() {}
static DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST mEvtCutNameList[2];
static DUSK_GAME_DATA cutFunc DUSK_CONST mEvtCutList[2];
static char DUSK_CONST* DUSK_CONST mEvtCutNameList[2];
static cutFunc DUSK_CONST mEvtCutList[2];
private:
/* 0xB48 */ Z2Creature mSound;
+3 -3
View File
@@ -12,7 +12,7 @@ class daNpc_grM_Param_c {
public:
virtual ~daNpc_grM_Param_c() {}
static DUSK_GAME_DATA daNpc_grM_HIOParam const m;
static daNpc_grM_HIOParam const m;
};
#if DEBUG
@@ -131,8 +131,8 @@ public:
BOOL checkChangeJoint(int param_0) { return param_0 == JNT_HEAD; }
BOOL checkRemoveJoint(int param_0) { return param_0 == JNT_MOUTH; }
static DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST mCutNameList[2];
static DUSK_GAME_DATA cutFunc DUSK_CONST mCutList[2];
static char DUSK_CONST* DUSK_CONST mCutNameList[2];
static cutFunc DUSK_CONST mCutList[2];
private:
/* 0x0F7C */ NPC_GRM_HIO_CLASS* mpHIO;
+3 -3
View File
@@ -38,7 +38,7 @@ class daNpc_grMC_Param_c {
public:
virtual ~daNpc_grMC_Param_c() {}
static DUSK_GAME_DATA daNpc_grMC_HIOParam const m;
static daNpc_grMC_HIOParam const m;
};
class daNpc_grMC_c : public dShopSystem_c {
@@ -124,8 +124,8 @@ public:
BOOL checkRemoveJoint(int param_1) { return param_1 == JNT_MOUTH; }
u16 getEyeballMaterialNo() { return 1; };
static DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST mCutNameList;
static DUSK_GAME_DATA cutFunc DUSK_CONST mCutList[1];
static char DUSK_CONST* DUSK_CONST mCutNameList;
static cutFunc DUSK_CONST mCutList[1];
private:
/* 0x0F7C */ NPC_GRMC_HIO_CLASS* mpHIO;
+3 -3
View File
@@ -20,7 +20,7 @@ class daNpc_grO_Param_c {
public:
virtual ~daNpc_grO_Param_c() {}
static DUSK_GAME_DATA daNpc_grO_HIOParam const m;
static daNpc_grO_HIOParam const m;
};
#if DEBUG
@@ -85,8 +85,8 @@ public:
int test(void*);
void adjustShapeAngle() {}
static DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST mEvtCutNameList[3];
static DUSK_GAME_DATA cutFunc DUSK_CONST mEvtCutList[3];
static char DUSK_CONST* DUSK_CONST mEvtCutNameList[3];
static cutFunc DUSK_CONST mEvtCutList[3];
private:
/* 0xB48 */ Z2Creature mSound;

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