282 Commits

Author SHA1 Message Date
Hyper
be75bc7ebd Added codes for disabling certain player actions 2025-03-22 01:49:38 +00:00
MegAmi
824405b236 Replace Markdown issue template with YAML schema (#1426)
* Replace Markdown issue template with YML schema

* YAML doesn't like that apparently

* Address requested changes
2025-03-19 01:55:02 +00:00
Hyper
d0368665dd Update README FAQ (#1319) 2025-03-11 15:26:14 +00:00
João Moura
cc1018a8fc Pass release path to upload-artifact step on Windows builds (#1151) 2025-03-10 15:18:37 +03:00
Skyth (Asilkan)
131427e017 Update version to v1.0.2. (#1149) 2025-03-07 18:52:49 +03:00
Hyper
45c0880145 Rename DisableDPadAsAnalogInput to DisableDPadMovement (#1146) 2025-03-07 13:52:42 +03:00
Skyth (Asilkan)
024c35c1fe Force WASAPI on Windows. (#1134) 2025-03-07 13:52:01 +03:00
Hyper
a9e280e116 Fix Homing Attack on Jump not affecting Cool Edge Act 3 (Day) (#904) 2025-03-07 04:54:17 +03:00
Hyper
c64ef1fe15 Added error message if included DirectX DLLs are missing (#998)
* Added error message if included DirectX DLLs are missing

* locale: added System_Win32_MissingDLLs localisation

Co-Authored-By: LJSTAR <31629427+LJSTARbird@users.noreply.github.com>
Co-Authored-By: Kitzuku <25226941+Kitzuku@users.noreply.github.com>
Co-Authored-By: NextinHKRY <38560522+NextinMono@users.noreply.github.com>
Co-Authored-By: brianuuu <38166666+brianuuu@users.noreply.github.com>
Co-Authored-By: Darío <538504+DarioSamo@users.noreply.github.com>

* Fix ifdefs

---------

Co-authored-by: LJSTAR <31629427+LJSTARbird@users.noreply.github.com>
Co-authored-by: Kitzuku <25226941+Kitzuku@users.noreply.github.com>
Co-authored-by: NextinHKRY <38560522+NextinMono@users.noreply.github.com>
Co-authored-by: brianuuu <38166666+brianuuu@users.noreply.github.com>
Co-authored-by: Darío <538504+DarioSamo@users.noreply.github.com>
2025-03-07 04:47:15 +03:00
Hyper
c19a7b1e11 Added check for AVX on boot (#1067)
Co-authored-by: Wiseguy <68165316+mr-wiseguy@users.noreply.github.com>
2025-03-07 04:45:58 +03:00
Hyper
3c050887d8 Fix shoe upgrade hints patch breaking sequence flags (#1130) 2025-03-07 04:43:49 +03:00
Hyper
676c3f0ff4 Prevent game from closing whilst autosaving (#967) 2025-03-07 04:43:37 +03:00
Skyth (Asilkan)
3676c28114 Fix the unsafe base address assumption. (#1098) 2025-03-07 03:31:13 +03:00
Hyper
df5e48f528 Increase FPS slider max to 241 (#1082) 2025-03-06 06:33:13 +00:00
Jérémy Francart
c07a754f4f Add hidden DisableDPadAsAnalogInput option (#604)
This commit adds a configuration entry in the 'Codes' section named DisableDPadAsAnalogInput allowing someone to enable or disable the movement of Sonic / the world map cursor using the directional pad buttons.
2025-03-06 05:59:22 +00:00
NextinHKRY
8a80db141d code: Add Disable Boost Filter code (#999) 2025-03-06 05:46:45 +00:00
Michael
48458cb903 Update README.md (#1050)
- Added a tip regarding supported media players with Music Attenuation
- Added onto the mod support note, referring to the HMM wiki regarding the mod format
2025-03-05 23:16:04 +00:00
Nilton Perim Neto
1c225184a1 Updated build instructions for Linux (#914)
* Update BUILDING.md

updated building to describe for Arch to make the groundwork for making an AUR repo

* Update BUILDING.md

* Update BUILDING.md

* Removed vcpkg

removed vcpkg from the Arch command since its not needed

---------

Co-authored-by: Hyper <34012267+hyperbx@users.noreply.github.com>
2025-03-05 23:15:51 +00:00
JaceCear
6ef7789b17 Fix typo in German translation (#980) 2025-03-05 23:08:40 +00:00
Skyth (Asilkan)
756d001d35 Disable hardware resolve on Intel GPUs. (#853) 2025-03-06 01:53:36 +03:00
Isaac Marovitz
0866be0c3d Build all presets (#979)
* Build all presets

Signed-off-by: Isaac Marovitz <isaacryu@icloud.com>

* Add preset to file name

Signed-off-by: Isaac Marovitz <isaacryu@icloud.com>

* Upload PDB

Signed-off-by: Isaac Marovitz <isaacryu@icloud.com>

Fix

Signed-off-by: Isaac Marovitz <isaacryu@icloud.com>

* Cache by preset

Signed-off-by: Isaac Marovitz <isaacryu@icloud.com>

---------

Signed-off-by: Isaac Marovitz <isaacryu@icloud.com>
2025-03-05 20:37:52 +03:00
got4n
4705ffddc2 Fixing typo in French translation. (#545)
"a échoué" is more correct than "a échouée"
2025-03-04 07:22:36 +00:00
Skyth (Asilkan)
da5db2a05a Update version number to v1.0.1. (#714) 2025-03-03 06:20:19 +03:00
Hyper
985dbf3bc0 Added memory requirement and updated minimum NVIDIA GPU (#692) 2025-03-03 04:50:33 +03:00
Hyper
9fbd847d50 Apply horizontal scaling to options menu value text (#685) 2025-03-03 03:47:07 +03:00
Skyth (Asilkan)
34a23d48db Force triangle strip workaround for AMD GPUs. (#659) 2025-03-03 03:00:26 +03:00
Pollot
8915b06a95 Add EU GoD game and Title Update hashes (#543) 2025-03-03 02:26:16 +03:00
Skyth (Asilkan)
f9b5e52a8b Implement fix for buggy Adabat assets hanging async PSO compiler. (#618) 2025-03-03 01:59:35 +03:00
Hyper
fd2fb745e0 Fix XButtonHoming patch leaking state into other parameters (#640) 2025-03-03 01:42:25 +03:00
David Chavez
fe06134bb1 fix(ci): remove token from flatpak workflow (#643) 2025-03-02 22:56:21 +03:00
David Chavez
917dacf453 chore(ci): update workflows (#633) 2025-03-02 20:47:21 +01:00
Hyper
206145c44e Added more fields to the Bug Report issue template (#614) 2025-03-02 17:41:56 +00:00
Skyth (Asilkan)
9e744ffded Fix logger eventually causing a crash without a console on Windows. (#481) 2025-03-01 12:48:19 +03:00
Skyth
881712999c First public release of Unleashed Recompiled. 2025-02-28 20:15:54 +03:00
Skyth (Asilkan)
e5ddc85853 Update CI scripts to upload artifacts. (#479) 2025-02-28 19:46:29 +03:00
Hyper
d49c648f12 Added notes to the readme and dumping guide about the hard drive transfer cable (#477) 2025-02-28 01:00:19 +00:00
Hyper
e251f15afa README: added notes about third-party input translation layers and external FPS limiters (#476)
* README: added notes about third-party input translation layers

* README: added footnote about using external FPS limiters

* Change "Transfer Kit" to "Transfer Cable"
2025-02-28 00:03:05 +00:00
Skyth (Asilkan)
2ee4a056e6 Increase installer audio chunk size to 4096. (#475) 2025-02-27 23:55:42 +03:00
Hyper
8d6847075a Fix issue template syntax (potentially) (#474)
* Update bug_report.md

* Update bug_report.md
2025-02-27 23:13:16 +03:00
Darío
076732c4b5 README (#456)
* First draft of README.

* Update README.md

* Transfer old README to BUILDING.md

* Update README.md

* Update README.md

* Added keyboard bindings table

* Update BUILDING.md

* Update README.md

* update readme credits

* Add LICENSE

* Update README.md

* Rename LICENSE to COPYING

* Update Flatpak summary and description

* Update README.md.

* On

* Update README.md

Added spacing between sections

* Update README.md

* Update credits.h

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Specifically note Xbox 360 for original hardware

Xbox One/Series back compat has some weird bugs specific to it (https://youtu.be/_zDUmg791Qk) so it's best to specifically mention the original Xbox 360 hardware

* Added Extended Controller Features section

* Update README.md

* Update README.md

* Update README.md

* Added English dumping guide

This may need some images to go along with the steps, as well as verification.

* S

* Move building to docs

* Update README.md

* Update README.md

* Create BUILDING-ALT.md

* Finalise building instructions

* Upload logo

* Added logo and logo credits

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Upload issue template for bug reports

* Update README.md

---------

Co-authored-by: Michael <15317421+ActualMandM@users.noreply.github.com>
Co-authored-by: Hyper <34012267+hyperbx@users.noreply.github.com>
Co-authored-by: DeaTh-G <hatvongeorge@gmail.com>
Co-authored-by: Skyth <19259897+blueskythlikesclouds@users.noreply.github.com>
Co-authored-by: RadiantDerg <9061202+RadiantDerg@users.noreply.github.com>
Co-authored-by: ĐeäTh <55578911+DeaTh-G@users.noreply.github.com>
2025-02-27 22:48:19 +03:00
SuperSonic16
716200e7df Updated flatpak build script (#467) 2025-02-26 20:22:29 +03:00
Skyth (Asilkan)
999fa2af61 Implement shader archive decompressor for the build system. (#466)
* Implement shader archive decompressor for the build system.

* Fix Linux compilation error.
2025-02-26 13:49:36 +03:00
Hyper
821f5eba4b Allow the hint volume for s20n_mykETF_c_navi_2 (#465)
This one isn't really a hint and has inconsistent behaviour with the same scenario but during daytime, where that hint seems to be requested by the entrance gate object itself.
2025-02-26 10:31:14 +00:00
Skyth
762dbe0419 Update version milestone to Release Candidate 3. 2025-02-25 23:59:03 +03:00
Skyth (Asilkan)
0128377ad9 Implement installer music. (#463) 2025-02-25 23:00:51 +03:00
ĐeäTh
98daa27c14 Added exceptions for specific hint messages being allowed/blocked by the Hints option (#462)
* Fix Windmill Isle Act 1 (Night) chip 'hint' not being shown

* code style adjustments

* Fix Apotos entrance gate first time Chip hint appearing with hints disabled

---------

Co-authored-by: Hyper <34012267+hyperbx@users.noreply.github.com>
2025-02-25 18:34:57 +03:00
ĐeäTh
0b16633ee1 fix options menu reset to default logic getting executed when setting is already default (#461) 2025-02-24 17:17:47 +01:00
Skyth (Asilkan)
388a86e866 Fix shader recompiler not depending on the patched executable. (#453) 2025-02-23 18:07:11 +03:00
Skyth
fef357062d Update version milestone to Release Candidate 2. 2025-02-22 17:04:46 +03:00
Darío
03ef34ffe8 Dpi fixes (#449)
* Potential fix for DPI scaling.

* Show window size in pixels while in Fullscreen mode.
2025-02-22 16:12:56 +03:00
Darío
c90d1fcb7b Fix typo in Spanish translation. (#447) 2025-02-21 22:14:00 +03:00
Hyper
ae3dfb12df options_menu: append inaccessible reason to description (#446) 2025-02-21 21:10:00 +03:00
Skyth
db76ffa5b3 Update version milestone to Release Candidate 1. 2025-02-21 18:23:07 +03:00
SuperSonic16
7e51a00e3a Updated flatpak file sources for the new file requirements (#441) 2025-02-21 18:13:28 +03:00
Michael
b3d5cdbe3b Update remaining thumbnails (#442)
* Implement Vibration & Background Input thumbnails

* Disable Resolution Scale and Subtitle Thumbnails

* Remove unused thumbnails & redirect original shadow resolution thumbnail to 1024x.

* Fix else if chain.

* Update resources submodule.

---------

Co-authored-by: RadiantDerg <9061202+RadiantDerg@users.noreply.github.com>
Co-authored-by: Skyth <19259897+blueskythlikesclouds@users.noreply.github.com>
2025-02-21 17:38:00 +03:00
Hyper
8ff365cbaa button_guide: fix LB/RB prompt clipping 4:3 aspect ratio (#439) 2025-02-20 22:48:06 +03:00
Hyper
d812c12d06 options_menu: remove LT/RT input for switching tabs (#440) 2025-02-20 22:47:35 +03:00
Skyth (Asilkan)
27d4af12ad Fix lack of space before "Add Files". (#438) 2025-02-20 22:14:48 +03:00
ĐeäTh
82f81dc7f9 Options menu fixes for Japanese (#436)
* fix options menu descriptions

* add explanation for special gylph characters

* update resources submodule
2025-02-20 21:51:42 +03:00
Skyth (Asilkan)
5f5517977a Fix SDF font outline sizes. (#435) 2025-02-20 21:14:32 +03:00
ĐeäTh
b101e016cf Japanese localization (#415)
* translate most option names and setting names

* add most header/button guide japanese localizations

* include furigana usage guidance for japanese localization

* remove os message window furigana note

* fix incorrect kana usage for 'lock'

* add more option localization

* translate achievement notification option

* remove english battle theme description from japanese

* fix compilation errors

* Japanese localization 1st pass

* Revert JP localization taken from in-game

* Use "Window Size"

* add support for zero width line break hints

* add dirty hack for kana being clipped at the right edge of the info panel

* Changed line to original meaning

* Added zero width spaces to option descriptions

* Japanese localization 2nd pass

* Remove furigana from Video_BackendError

* add more japanese specific hacks for installer_wizard description

* locale small fixes

* Update config_locale.cpp

* options menu scroll fixes, minor localization touchups

* adjust installer wizard text spacing

* fix installer wizard text positioning when a line starts with a normal kana in japanese

* Installer adjustment

* option fixes

* Added missing line break on introduction

* do touchups to message window annotation drop shadow

* adjust spacing in TitleMissingDLC text to fit furigana properly

* add brianuuuSonic to credits

* change capitalization of xbox in xbox color correction

* remove usage of temporaries

* tweak cutscene aspect ratio description

* add missing credit for german translation

* update resources submodule

---------

Co-authored-by: brianuuu <38166666+brianuuu@users.noreply.github.com>
2025-02-20 20:20:49 +03:00
Darío
de7148772b Spanish translation. (#314) 2025-02-20 19:30:47 +03:00
ĐeäTh
4d4eba693f French Localization (#414)
* add french localization

* change installer introduction line breaks

* brightness and control tutorial localization touchups

* remove translation for Werehog from descriptions

* change quit message for consistency with in-game text

* add spaces between characters and question marks for consistency

* add spaces between characters and exclamation marks for consistency

* add spaces between characters and colon for consistency

* more spacing fixes

* ensure available space doesn't break at 10tb+ storage

* change localization for gibibyte acronym to proper unit

* update to new localization for InstallFailed

---------

Co-authored-by: LJSTAR <31629427+ljstarbird@users.noreply.github.com>
2025-02-20 19:05:53 +03:00
NextinHKRY
08c791f2cf Italian Localization (#380)
* italian: Redid localization files, again

* italian: Update Hints and Button tutorials

* italian: Update Control Tutorial text

* italian: Updated locale

* italian: Added language desc. and added deliberate mistake

Why did they add a space before the question mark...
2025-02-20 17:46:05 +03:00
Kitzuku
07ad85b7bb German localization (#423)
* Update locale.cpp for most German localization

* Adding the rest of German localisation

Additionally changed phrasing on a few lines to be more in line with official terminology used in other games and software respectively.

* Add German Localization to Config

Adds all strings to the German localization for the options menu.

* Change installer wizard space check page text spacing

* Update locale.cpp as per review

Removed line break for welcome message.
Shortened installer prompts.
Adjusted lines breaks across the board.
Improved consistency with game.

* address line breaks

* add missing controller icon strings

* correct line breaks for Installer_Page_InstallFailed

---------

Co-authored-by: DeaTh-G <hatvongeorge@gmail.com>
Co-authored-by: Michael <15317421+ActualMandM@users.noreply.github.com>
2025-02-20 17:43:54 +03:00
Skyth (Asilkan)
ba522c0e42 Draw low quality text for custom UI that is directly part of the game. (#434) 2025-02-20 17:18:27 +03:00
Skyth (Asilkan)
0afd01ff7e Cleanup some of the unordered_map usage. (#432) 2025-02-19 20:32:11 +03:00
Skyth (Asilkan)
5ba4e927ab Port XEX patcher to XenonRecomp. (#433)
* Port XEX patcher to XenonRecomp.

* Update XenonRecomp submodule.
2025-02-19 20:31:01 +03:00
Skyth (Asilkan)
f123ec7083 Fix logic for the grind booster HFR fix. (#431) 2025-02-19 01:54:38 +03:00
ĐeäTh
b8ae355915 Remove separator empty line between error and error message (#430)
* remove separator empty line between error and error message

* remove trailing line breaks too
2025-02-18 21:06:03 +01:00
Skyth (Asilkan)
14faa17cd8 Implement workaround for Mesa triangle strip bug. (#428)
* Convert restart indices to degenerate triangles for Mesa.

* Check for Mesa to enable the triangle strip workaround.

* Remove _WIN32 ifndefs.
2025-02-18 21:15:50 +03:00
Hyper
4aeee49561 object_patches: fix rail booster sounds overlapping at HFR (#427) 2025-02-18 11:54:37 +03:00
Hyper
49cc504ced sdl2_driver: log errors from SDL_InitSubSystem and SDL_OpenAudioDevice (#425) 2025-02-17 20:01:43 +00:00
Hyper
91f874cbad Implemented max width for button guide strings for localisation (#421)
* button_guide: implemented max width for localisation

* button_guide: implemented max width for dual icon strings

* button_guide: scale max width internally
2025-02-17 19:30:33 +00:00
Skyth (Asilkan)
df8234ab3b Fix append archives sometimes failing to replace files. (#420) 2025-02-17 00:00:49 +03:00
Skyth (Asilkan)
c68b5247c7 Fix Select/Back in message window not getting localised correctly. (#418) 2025-02-16 20:59:29 +03:00
Hyper
910d043f19 Disable Chip hints for shoe upgrades (#413) 2025-02-16 13:29:04 +03:00
Hyper
beac8339c2 Fix D-Pad support for bosses with 2D or overhead sections (#411) 2025-02-16 13:27:58 +03:00
Hyper
02c23384f3 Update Control Tutorial description to add notice about the Werehog critical attack prompt (#412) 2025-02-15 17:52:11 +00:00
Skyth (Asilkan)
868e0f922a Update PSO cache. (#410) 2025-02-14 23:42:30 +03:00
Skyth
95c044299e Set version milestone to Beta 3. 2025-02-14 02:09:47 +03:00
Hyper
b04d9e683c options_menu: fix info scroll marquee fade (#404) 2025-02-14 02:04:49 +03:00
Skyth (Asilkan)
5e8d15e334 Implement options menu TV static animation. (#403) 2025-02-14 01:41:18 +03:00
Hyper
8f8b574e56 Added debug view codes (#402)
Co-authored-by: RadiantDerg <9061202+RadiantDerg@users.noreply.github.com>
2025-02-13 19:55:08 +00:00
Hyper
c8feff3f8d Moved Eggmanland loading transition fix to a code (#401) 2025-02-13 21:19:26 +03:00
Hyper
414ccb3637 Moved callbacks to config.cpp, fixed Subtitles option not applying to stages (#400) 2025-02-13 20:30:12 +03:00
Skyth (Asilkan)
431a6d9841 Fix shadow map values getting lost on resize. (#399) 2025-02-13 20:30:03 +03:00
Hyper
7a5cfe55f5 mod_loader: implemented file logging (#392) 2025-02-13 19:07:19 +03:00
Skyth (Asilkan)
4f3144472a Fix model explosion in Temple Entrance cutscene. (#395) 2025-02-13 18:25:42 +03:00
Skyth (Asilkan)
e9f510e8c9 Comment out PSO_CACHING. (#394)
* Comment out PSO_CACHING.

* Comment out PSO_CACHING further.
2025-02-13 16:05:13 +03:00
Hyper
a54f850425 Added more D-Pad hooks (#390) 2025-02-13 15:43:23 +03:00
Hyper
ab382deb04 video: fix profiler not revealing mouse cursor in fullscreen (#391) 2025-02-13 15:43:03 +03:00
Hyper
8df3e0e440 Added hooks to disable voice hints (#389) 2025-02-13 15:42:48 +03:00
Skyth (Asilkan)
fe083f0eed Fix loading arrow texture filtering. (#386) 2025-02-12 23:13:49 +03:00
Michael
a8e78c21d1 imgui_utils: Make text shadows thicker for Original 4:3 (#385) 2025-02-12 22:35:44 +03:00
Skyth (Asilkan)
9ec6bd95e1 Account for control tutorial option in Dark Gaia boss. (#384) 2025-02-12 21:51:50 +03:00
Skyth (Asilkan)
771c2626b8 Fix the gauges in Dark Gaia boss. (#381)
* Apply offset scaling to Dark Gaia boss gauges.

* Hide boss gauge in Inspire cutscenes.
2025-02-12 21:19:40 +03:00
Hyper
54a63e857a Added empty locale entries for untranslated languages (#379) 2025-02-12 16:40:48 +00:00
Hyper
a13fdc136b fps_patches: fix Egg Dragoon drill missile rotating incorrectly (#378)
Co-authored-by: Skyth (Asilkan) <19259897+blueskythlikesclouds@users.noreply.github.com>
2025-02-12 18:40:12 +03:00
Darío
86b346e037 Add maximum size to tabs in options menu. (#376)
* Add maximum size to tabs in options menu.

* Simplify squash ratio computation.

* Allow room for less padding if the text can't fit to the fixed width.

* Stretch every tab instead of individual ones.

---------

Co-authored-by: Skyth <19259897+blueskythlikesclouds@users.noreply.github.com>
2025-02-12 15:19:06 +03:00
Darío
3081aec7c1 Collect samples over one second for FPS counter and average. (#377) 2025-02-12 00:25:03 +00:00
Skyth (Asilkan)
dd294a30d4 Fix achievement sound not playing in certain conditions. (#373)
* Fix achievement sound not playing in cutscenes.

* Prevent achievement overlay from showing if sounds cannot be played.
2025-02-11 23:50:24 +03:00
Hyper
99d6cebf92 Update Battle Theme description to mention "Exorcism missions" instead of "Rescue missions" (#372) 2025-02-11 18:18:59 +00:00
Hyper
e86922b2b2 Fix Rooftop Run barrels rolling backwards at HFR (#368) 2025-02-11 15:15:43 +00:00
Hyper
a07610fb7a Implemented FPS overlay (#361) 2025-02-11 15:15:28 +00:00
Skyth (Asilkan)
db4974a9ca Fix text bars in result screen moving at ultrawide. (#367) 2025-02-11 17:25:25 +03:00
SuperSonic16
4b09a22041 Add Linux CI for Debugging (#366)
* Attempt 0

* Attempt 1

* Attempt 2

* Attempt 3

* Removed push event

* L
2025-02-11 17:04:15 +03:00
Skyth (Asilkan)
989bf85986 Fix arrows in item result title for ultrawide. (#365) 2025-02-11 17:03:35 +03:00
Darío
0194c372e9 Replace the default value when applying low end defaults so reset button works properly. (#359)
* Replace the default value when applying low end defaults so reset button works properly.

* Update video.cpp
2025-02-11 15:13:43 +03:00
Hyper
854d7412fa Fixed Werehog battle theme returning after defeating bosses when disabled (#360) 2025-02-11 14:22:18 +03:00
Darío
0441845f2a Add Auto Graphics API option, add AMD driver workaround. (#358)
* Add Auto Graphics API option, add AMD driver workaround.

* Remove unused line.
2025-02-11 14:22:03 +03:00
Darío
f6d820faae GPU Profiling functionality. (#363)
* Added profiling timestamps to Vulkan. Added more profilers in general.

* Add timestamps to D3D12.

* Add update director to the profiler.

---------

Co-authored-by: Skyth <19259897+blueskythlikesclouds@users.noreply.github.com>
2025-02-11 14:21:43 +03:00
Hyper
a7063dc118 Added code to use arrow transition for Time of Day Transition (#362) 2025-02-11 14:21:30 +03:00
Hyper
fb55ac1087 Adjust credits logo position in installer wizard dynamically to fit text (#357) 2025-02-10 22:25:53 +00:00
Hyper
e76cbff3ea achievement_menu: added minimum header size, improved separators
(and some extra junk I was researching)
2025-02-10 21:42:54 +00:00
Darío
d2a3818700 Add support for preferred device to configuration. (#355)
* Preferred device support.

* Add GraphicsDevice option and fix error in Config class to accept strings.

Co-authored-by: Hyper <34012267+hyperbx@users.noreply.github.com>

---------

Co-authored-by: Hyper <34012267+hyperbx@users.noreply.github.com>
2025-02-11 00:01:12 +03:00
RadiantDerg
3285ad045f Thumbnails for options menu (#45)
* Rebase options-thumbnails branch

* Modify brightness locale

* Implement Antialiasing and Control Tutorial thumbnails

* Finish rebase

* Added vsync and channel thumbnails

* Modify time of day transition thumbnails

* Implement UI Scale Thumbnails

* Update UnleashedRecompResources

* Update DDS naming

* Update UnleashedRecompResources
2025-02-10 19:20:31 +03:00
Skyth (Asilkan)
c687d87126 Apply offset scaling to Tornado Defense hit counter. (#354) 2025-02-10 18:02:04 +03:00
Skyth (Asilkan)
4502a9efee Fix boss name arrows for ultrawide. (#351) 2025-02-10 14:23:29 +03:00
Hyper
fc99db7c97 Fixed village camera receiving input in options menu, replaced extra nav inputs in achievements menu with fast scroll (#344)
* options_menu: prohibit right stick input to prevent camera moving in villages

* achievement_menu: remove extra nav inputs, implemented fast scroll

* achievement_menu: replicate skills menu fast scrolling
2025-02-09 21:18:59 +00:00
Skyth (Asilkan)
0b8b243404 Disable primitive 2D pixel snapping & enforce linear only above 720p. (#346) 2025-02-09 23:42:30 +03:00
Hyper
8220f6772b CHudPause_patches: fix achievements prompt appearing over PS3 loading 2025-02-09 18:06:16 +00:00
Skyth (Asilkan)
b7cee84bda Prevent calling GameWindow::Update() outside the main thread. (#340) 2025-02-09 20:04:13 +03:00
Hyper
073065c6a6 CTitleStateIntro_patches: delay quit input to allow update function to run once 2025-02-09 17:00:54 +00:00
Skyth (Asilkan)
ed6f8f082b Replicate the thicker shadows for FCO text at 4:3 aspect ratio. (#341) 2025-02-09 18:43:57 +03:00
Skyth (Asilkan)
f23d8ae08e Stretch shop fade in/out to the screen for ultrawide. (#337) 2025-02-09 15:21:08 +03:00
Skyth (Asilkan)
f7e660b5d8 Fix NPC talk button cast modifier flags. (#336) 2025-02-09 15:13:52 +03:00
Skyth (Asilkan)
7c1aea4e24 Fix the custom UI drawing in front of ImGui windows. (#335) 2025-02-09 14:25:06 +03:00
Skyth (Asilkan)
138d9b616d Fix the Gaia Temple pedestal flashing black. (#334) 2025-02-09 13:16:03 +03:00
DeaTh-G
7f108285fe Fix clipping detail from the next not visible element on the options list (#321)
* decrease maximum clip rect size for options list

* respect window scaling

* move clip rect fix location
2025-02-09 00:33:49 +03:00
Skyth
97b20742a3 Make scroll bar in options menu more accurate. 2025-02-09 00:29:40 +03:00
Hyper
fcd1673cfc Fix localisation not updating in real-time for button guides (#322) 2025-02-08 20:17:53 +00:00
Skyth (Asilkan)
fff96a8528 Implement fix for Sparkle locus particle vertex corruption. (#317) 2025-02-08 20:45:14 +03:00
Hyper
2fdd32e889 locale: update localisation notes header 2025-02-08 17:40:36 +00:00
Hyper
54aacf9a1f Implemented codes list reading for mod loader (#315) 2025-02-08 17:12:53 +00:00
Hyper
39272b7975 config_locale: update Channel Configuration description 2025-02-08 13:46:37 +00:00
Hyper
d696524dbf Rename UI Scale Mode to UI Alignment Mode 2025-02-08 12:09:15 +00:00
Skyth (Asilkan)
e3ac47a797 Fix werehog HUD guide not having correct position at 4:3. (#311) 2025-02-08 14:16:33 +03:00
Hyper
72640c8749 options_menu: reset auto-scroll timer after manual scroll and retain last stick direction 2025-02-08 10:08:08 +00:00
Hyper
1687c65be9 Update resources submodule 2025-02-08 10:01:54 +00:00
Hyper
6dac017d00 Fix mission UI not extending for centred scale mode (#309) 2025-02-07 23:12:58 +00:00
Hyper
2150faed2e game_window: fix mouse cursor flickering after controller input 2025-02-07 20:42:02 +00:00
Hyper
2f1b98c570 game_window: revert window resize fix
This partially reverts commit 70ebdaa685.
2025-02-07 20:31:41 +00:00
Hyper
70ebdaa685 game_window: don't allow resizing until after boot, fix monitor switching 2025-02-07 20:28:57 +00:00
Hyper
e1edd5f35d Fix Tornado Defense boss firing missiles too frequently (#306)
Co-authored-by: Skyth (Asilkan) <19259897+blueskythlikesclouds@users.noreply.github.com>
Co-authored-by: Darío <538504+DarioSamo@users.noreply.github.com>
2025-02-07 20:11:25 +00:00
Hyper
88df0e08b7 config_locale: update localisation
Co-Authored-By: Michael <15317421+ActualMandM@users.noreply.github.com>
2025-02-07 13:41:13 +00:00
Hyper
511c670def options_menu: fix inconsistent info scrolling delay 2025-02-07 10:59:44 +00:00
Hyper
16c35b45c2 options_menu: fix info scrolling not resetting if text is too small 2025-02-07 10:46:34 +00:00
Darío
b291bdba91 Cherry-pick text changes from thumbnails branch. (#301)
* Cherry-pick text changes from thumbnails branch.

Co-authored-by: RadiantDerg <9061202+RadiantDerg@users.noreply.github.com>

* config_locale: update Aspect Ratio locale

Co-Authored-By: Michael <15317421+ActualMandM@users.noreply.github.com>

---------

Co-authored-by: RadiantDerg <9061202+RadiantDerg@users.noreply.github.com>
Co-authored-by: Hyper <34012267+hyperbx@users.noreply.github.com>
Co-authored-by: Michael <15317421+ActualMandM@users.noreply.github.com>
2025-02-07 10:45:01 +00:00
Hyper
727be2b47c Update resources submodule 2025-02-07 10:35:11 +00:00
Hyper
62ad3a1a13 achievement_manager: added UnlockAll method
Because I'm tired of writing this every time I need to debug unlocking achievements.
2025-02-07 10:30:03 +00:00
Darío
6c8dbdb6bc Check for closing during AchievementOverlay::Open (#302) 2025-02-07 10:23:10 +00:00
Hyper
71bb081645 game_window: respect per-monitor DPI scale
Co-Authored-By: Darío <538504+DarioSamo@users.noreply.github.com>
2025-02-07 10:11:06 +00:00
Hyper
871515b3be options_menu: start monitor index from 1 2025-02-07 09:58:39 +00:00
Darío
266d436c28 Block exit button from terminating the installer while it's in progress. (#300)
* Block exit button from terminating the installer while it's in progress.

* Fix quit prompt not appearing when closing the game from the taskbar.

---------

Co-authored-by: Skyth <19259897+blueskythlikesclouds@users.noreply.github.com>
2025-02-07 01:21:18 +03:00
Darío
e7cc5a858e Change progress bar animation on installer. (#299) 2025-02-07 00:38:18 +03:00
Skyth (Asilkan)
9549ba54aa Implement black bar drawing for loading and cutscenes. (#298) 2025-02-07 00:30:08 +03:00
Hyper
47b1f20679 message_window: added selection changed anim to options 2025-02-06 17:19:03 +00:00
Darío
ef51f04d4f Add back button functionality to the installer. (#279)
* Add back button functionality to the installer.

* Nuclear exits.

* Adjust error code.

* Rework waiting time into the installer process instead.

* Extra waiting time during quitting.

* Restore button max widths.

* button_guide: set up Esc key texture

* Update installer_wizard.cpp

* Update resources submodule

* installer_wizard: decrease nav button margin

---------

Co-authored-by: Hyper <34012267+hyperbx@users.noreply.github.com>
2025-02-05 22:36:30 +03:00
Hyper
b68dbec612 Update resources submodule 2025-02-05 17:25:41 +00:00
Skyth (Asilkan)
96108e1759 Use a separate upload buffer allocator for the main thread. (#281) 2025-02-05 17:02:27 +03:00
Hyper
d3589979e4 imgui_utils: update selection textures 2025-02-05 11:45:49 +00:00
Darío
2db4a9c78c Expand on the text for the installer tutorials (#272)
* Expand on the text for the installer tutorials.

* Make both descriptions share the same paragraph.

* Update locale.cpp

Co-Authored-By: Goalringmod27 <88973067+Goalringmod27@users.noreply.github.com>

---------

Co-authored-by: Hyper <34012267+hyperbx@users.noreply.github.com>
Co-authored-by: Goalringmod27 <88973067+Goalringmod27@users.noreply.github.com>
2025-02-05 11:13:22 +00:00
Skyth
2d56566924 Remove the yield from the render thread. 2025-02-05 12:59:42 +03:00
Hyper
553e011dad CTitleStateMenu_patches: reset achievements on New Game (#278) 2025-02-05 12:19:18 +03:00
Darío
900ba7c916 Simplify required space text. (#280) 2025-02-05 02:47:31 +03:00
Hyper
66648d550a Implemented vertical scrolling for descriptions (#271)
* options_menu: implemented vertical scrolling for descriptions

* use correct size calculation

* remove empty lines from descriptions without value desc, move fix

* remove calculating the space for the next annotation after the last line

---------

Co-authored-by: DeaTh-G <hatvongeorge@gmail.com>
Co-authored-by: DeaTh-G <55578911+DeaTh-G@users.noreply.github.com>
2025-02-04 17:30:42 +00:00
Hyper
c40ffbc70d Implemented fast scrolling on up/down hold for options menu (#275) 2025-02-04 15:29:22 +00:00
Skyth (Asilkan)
ee97736d58 Make custom UI a bit more accurate looking. (#274)
* Update spacing for default font & pixel snap 2D primitives.

* Replicate the missing info outline from world map.
2025-02-04 14:53:43 +03:00
Skyth
bbb3ebc25d Remove Win32 implementation of SetThreadIdealProcessor. 2025-02-04 12:41:19 +03:00
Hyper
52558a674e installer_wizard: fix source button text and alpha 2025-02-03 22:05:41 +00:00
Skyth (Asilkan)
11d0fd2f9c Implement rasterization path for framebuffer copy operations. (#270)
* Move all copies & resolves to rasterization.

* Fix Vulkan crash.

* Implement hardware resolve path for both color and depth targets.
2025-02-03 23:02:47 +03:00
Skyth (Asilkan)
aaad10d797 Implement copy bypass optimization. (#262)
* Initial work on copy bypass optimization.

* Force depth stencil textures to be transient.

* Get rid of texture copying for shadow maps.

* Move barrier populate function.

* Set viewport/scissor rect explicitly for MSAA depth resolve.
2025-02-02 21:29:47 +03:00
Skyth (Asilkan)
342d696f99 Implement vertical marquee fade. (#261) 2025-02-02 20:09:19 +03:00
Hyper
0426b79094 config: update key bindings enum template 2025-02-02 15:51:16 +00:00
Hyper
3497d9b34b CTitleStateIntro_patches: fixed message inconsistencies (#259) 2025-02-01 13:37:48 +00:00
Darío
9d98d507b0 Add low-end defaults for low-end devices. (#252)
* Add low-end defaults for low-end devices. Uses either the reported type by the API or the VRAM.

* Update video.cpp

* Check for UMA flag on D3D12 to detect integrated GPUs.

* Display device type and UMA in inspector.

* Dynamic depth bias on F1.

---------

Co-authored-by: Skyth <19259897+blueskythlikesclouds@users.noreply.github.com>
2025-01-31 22:43:23 +03:00
Darío
cd38776576 Update checker. (#251)
* Update checker.

* Fix build and enum class.

* Get rid of submodule for httplib.

* Get rid of submodule for curl.

* Minor style changes and fix video.cpp Linux build error.

* CTitleStateIntro_patches: implemented update message

* Update update_checker.cpp

* CTitleStateIntro_patches: fix fade out accepting input

---------

Co-authored-by: Hyper <34012267+hyperbx@users.noreply.github.com>
2025-01-31 16:47:15 +03:00
Darío
54d5588d79 Add fallback for creating other video backends. (#254)
* Add fallback for creating other video backends.

* Update video.cpp
2025-01-31 15:45:48 +03:00
Hyper
ddd8ce77db Implemented key binding config (#257)
Co-authored-by: Skyth (Asilkan) <19259897+blueskythlikesclouds@users.noreply.github.com>
2025-01-31 11:37:15 +00:00
Hyper
8cba851212 api: added globals struct 2025-01-31 02:35:00 +00:00
Hyper
87d2ab5af1 locale: update localisation for Voice Language 2025-01-31 00:47:01 +00:00
Hyper
f2e01bbe79 options_menu: rename Invert Camera X/Y options (#249) 2025-01-31 02:00:27 +03:00
Hyper
ed0aeb3b7d options_menu: implemented value switch animations (#248) 2025-01-31 02:00:19 +03:00
Skyth (Asilkan)
21c1d36836 Allow specifying all corners for ImGui gradients. (#247) 2025-01-30 23:25:19 +03:00
DeaTh-G
70f042d11f Fix text clipping on installer wizard description field (#246) 2025-01-30 19:52:37 +03:00
Skyth (Asilkan)
fefb08cc4b Put HUD toggle hotkey behind an export. (#245) 2025-01-30 19:16:36 +03:00
Skyth (Asilkan)
9fea5f9e4c Hide console on Release configuration. (#244) 2025-01-30 19:16:21 +03:00
Skyth (Asilkan)
c78c2010a3 Apply extend left/right flags to a bunch of casts. (#242) 2025-01-30 17:12:51 +03:00
Skyth
e89ecf8d68 Downmix installer sounds to stereo. 2025-01-30 14:31:04 +03:00
Skyth (Asilkan)
3171dc8266 Pick correct bullet particles in Tornado Defense depending on controller icons. (#241) 2025-01-30 12:53:24 +03:00
Skyth
1ef5b86036 Update resources submodule. 2025-01-30 12:21:27 +03:00
Skyth (Asilkan)
e761c9f4d6 Disable ingame frame limiters. (#240) 2025-01-29 23:58:21 +03:00
DeaTh-G
4816d4aa9d Add ruby annotation support for text displayed in various spaces. (#232)
* allow preliminary annotation on DrawCenteredParagraph

* improve annotated text line spacing

* fix functionality of non-annotated paragraphs

* a lot of very bad code that but line wrapping works

* support ruby annotations for options menu descriptions

* make installer wizard more accurate

* remove wrapper function

* add furigana support to config names

* add furigana support for marquee text for options

* fully support annotated text in options menu

* fix option names being split to multiple lines

* fix and cleanup installer wizard text placements

* implement furigana support for message window

* remove regex usage

* remove excessive const ref usage
2025-01-29 20:43:21 +03:00
Skyth (Asilkan)
091b4ef089 Implement hack to fix options menu SFX not playing in stages. (#239) 2025-01-29 19:32:44 +03:00
Hyper
692542fb85 installer_wizard: update localisation 2025-01-29 13:21:05 +00:00
Hyper
b26baea13c Apply correct alpha to toggle lights for greyed out buttons 2025-01-29 12:52:10 +00:00
Skyth (Asilkan)
a19e434e9b Implement scroll bar animation in options menu. (#238) 2025-01-29 15:16:42 +03:00
Hyper
92e3cbea45 installer_wizard: add toggle light to language selection 2025-01-29 12:03:35 +00:00
Hyper
93f120ae83 Implemented toggle light (#237)
* Implemented toggle light, moved common textures to imgui_utils

* Fix compilation error.
2025-01-29 14:52:45 +03:00
Hyper
aa6118b448 Implemented title animation for options menu (#235)
* options_menu: implemented title animation

* Adjust options title flash animation.

* Replace use of std::numbers::pi with M_PI.

* Implement shader modifier for options title rectangle.

* Replicate the same scaling applied to the rectangle in world map.

---------

Co-authored-by: Skyth <19259897+blueskythlikesclouds@users.noreply.github.com>
2025-01-29 14:39:10 +03:00
Hyper
863e1602ff imgui_utils: expose lerp values to BREATHE_MOTION macro 2025-01-29 07:18:36 +00:00
Hyper
d5d2e83a10 installer_wizard: added breathing anim to title during installation 2025-01-29 07:13:47 +00:00
Hyper
cb57e337b8 message_window: disable mouse checks in-game 2025-01-29 06:48:52 +00:00
Hyper
4fd08efa6d message_window: fix input and button guide inconsistencies 2025-01-29 02:38:41 +00:00
Hyper
f6e43761b7 Added checks for unpatched XEX and XEXP for game detection (#234) 2025-01-28 22:22:36 +00:00
Skyth (Asilkan)
293f873229 Replicate Tornado Defense UI squash at original 4:3 aspect ratio. (#231) 2025-01-28 22:08:55 +03:00
Skyth (Asilkan)
4691fe2e5a Treat save file paths in mod loader INIs as save folders. (#230) 2025-01-28 20:02:25 +03:00
Skyth
9289ee5e02 Update XenonRecomp submodule. 2025-01-28 18:35:20 +03:00
Skyth (Asilkan)
50529a95fc Make pipeline precompilation/recompilation part of the consumer thread queue. (#229) 2025-01-28 18:24:53 +03:00
Skyth (Asilkan)
87d9e0dac7 Disable horizontal stretching at narrow aspect ratios. (#228) 2025-01-28 15:33:06 +03:00
Skyth (Asilkan)
996f23cc54 Hide tails icon in world map. (#227) 2025-01-28 14:58:38 +03:00
Hyper
8b345d2cbd Implemented Windows registry read/write (#225)
* Implemented Windows registry read/write

* Simplify registry API and handle path writes

* Linux SetWorkingDirectory

* Implement reading path and unicode string from windows registry

* Use string_view value names for registry

* Use RegGetValueW

* Paths adjustments

* /

* Update working directory update failure message

* Updated linux SetWorkingDirectory

* Update flatpak define

* Remove RootDirectoryPath and save registry at startup

* dont save registry on exit

* Slight formatting update

---------

Co-authored-by: Sajid <sajidur78@gmail.com>
2025-01-28 14:41:29 +03:00
Hyper
7b9b4245de SDL/HID fixes and clean-up (#224) 2025-01-28 00:38:46 +00:00
Skyth (Asilkan)
ff29b3e786 Repeat world map info grid on center UI scale mode. (#222) 2025-01-28 01:45:04 +03:00
Skyth (Asilkan)
37d7e49d93 Keep world map icons broken at Original 4:3. (#219) 2025-01-27 23:57:08 +03:00
Skyth (Asilkan)
64a927615d Fix aspect ratio option sometimes crashing the game when changing it. (#218) 2025-01-27 23:47:34 +03:00
Hyper
9521cb3ee9 Added export to disable rounded corners on Windows 11 (#212) 2025-01-27 18:25:15 +00:00
Skyth (Asilkan)
948e2f271f Recompute camera projection matrix during resize to fix stretching on pause menu. (#215) 2025-01-27 19:17:31 +03:00
Skyth (Asilkan)
f7ce4f179a Fix rope renderable material parameters during rendering. (#214) 2025-01-27 18:59:43 +03:00
Skyth (Asilkan)
fc7918772b Fix options menu centering & tweak scanlines. (#213)
* Fix options menu centering, tweak accuracy.

* Accurate scanline outline drawing at 720p.

* Implement scanline improvements in installer wizard.
2025-01-27 18:00:07 +03:00
Skyth (Asilkan)
a9677084ea Fix faulty ImGui clip rect usage. (#211) 2025-01-27 01:24:05 +03:00
Hyper
a5db997e5d Fix controller input lingering when unfocused (#210) 2025-01-26 20:49:13 +00:00
Skyth (Asilkan)
4d41d8eaae Stretch title screen fade to the screen. (#209) 2025-01-26 23:42:32 +03:00
Hyper
7c989af42c input_patches: fix cursor velocity retaining after D-Pad input 2025-01-26 20:15:56 +00:00
Hyper
dee2a36d0f Added Win32 file info (#198) 2025-01-26 16:18:25 +00:00
SuperSonic16
d2d8c541e1 Remove direct install arg from build-flatpak.yml (#206) 2025-01-26 17:32:35 +03:00
Skyth (Asilkan)
81d4390076 Fix ImGui mouse position events not working at boxed aspect ratios. (#205) 2025-01-26 17:23:29 +03:00
Hyper
57e888658a Fix PS3 time of day transition aspect ratio and outro animation (#197) 2025-01-26 13:37:55 +00:00
Skyth (Asilkan)
0d4b66fe98 Apply master volume in audio backend. (#202) 2025-01-26 13:54:08 +03:00
Skyth (Asilkan)
76ec5f032d Implement aspect ratio adjustments for inspire overlays. (#201)
* Handle texture/movie overlays for original 4:3.

* Implement aspect ratio adjustments for texture/movie overlays.

* Fix fade scale for original 4:3.
2025-01-26 13:19:39 +03:00
Hyper
a9573584cd installer_wizard: move credits to header, improve formatting 2025-01-26 03:54:10 +00:00
Hyper
8e58cbcbf2 input_patches: clean up ambiguous naming
Changed all instances of "touch" or "touchpad" to "cursor" to clear up ambiguity with future input methods.
2025-01-26 00:37:33 +00:00
Hyper
c1988e9323 Fix achievements button guide reappearing for Yes/No prompts (#193) 2025-01-25 21:16:43 +00:00
Hyper
5321ee0fba Fix Werehog columns not accepting D-Pad input (#192) 2025-01-25 20:37:56 +00:00
Hyper
1ee312442c Move patches/ui sources to patches directory (#191) 2025-01-25 18:58:26 +00:00
Hyper
5441075c5e Fix World Map cursor threshold and touchpad issues (#190)
* input_patches: fix cursor threshold and SFX during tutorial

* input_patches: fix touchpad flag magnetism
2025-01-25 18:51:25 +00:00
Skyth (Asilkan)
470d8f797b Stretch NPC fade in/out to the screen. (#189) 2025-01-25 19:06:13 +03:00
Skyth (Asilkan)
d041e2ba30 Fix ImGui procedural filtering. (#188) 2025-01-25 18:28:43 +03:00
Skyth (Asilkan)
e88ed2502c Restore previous fade values after resizing. (#187) 2025-01-25 16:29:38 +03:00
Skyth (Asilkan)
e13b0ea009 Handle gameplay UI scaling not getting affected by explicit scene translation. (#183) 2025-01-25 14:19:24 +03:00
Skyth (Asilkan)
5d437f8de6 Ultrawide cast adjustments. (#170)
* Extend media room header frame.

* Extend world map tutorial scan lines.

* Apply offset scaling to EXP arrows.
2025-01-25 01:24:00 +03:00
Hyper
c6a25f21c2 Implemented achievement data verification (#161) 2025-01-24 20:59:48 +00:00
Skyth
d443693d78 Fix Dark Moray always being frozen. 2025-01-24 22:57:21 +03:00
Skyth (Asilkan)
dfa2a31286 Fix PlayStation time of day transition animation not rendering. (#167)
* Fix PlayStation transition animation not rendering.

* Remove medal swinging animation from the YNCP.
2025-01-24 20:26:09 +03:00
Skyth (Asilkan)
fb5d0cd94e Enforce linear filtering for debug 2D primitives. (#164) 2025-01-24 15:00:04 +03:00
Hyper
cf5c3423d1 installer_wizard: fix credits scrolling progress and speed 2025-01-23 22:54:23 +00:00
Hyper
f9440e2076 player_patches: fix last score not resetting to zero 2025-01-23 21:22:46 +00:00
Skyth
17d7b97dd6 Update version milestone to Beta 1. 2025-01-23 23:20:28 +03:00
Hyper
79b966586d version.cmake: don't show Git info or build type for Release 2025-01-23 20:00:48 +00:00
Hyper
686ef22c4d Implemented D-Pad support for the World Map, Gaia Colossus, Super Sonic and the Bobsleigh (#150)
* Implemented D-Pad support for World Map, Super Sonic (WIP) and Bobsleigh

* Implemented D-Pad support for Gaia Colossus and Super Sonic

* Improved touchpad sensitivity
2025-01-23 17:43:08 +00:00
Skyth (Asilkan)
ca6b42e20e Interpolate barrels in Spagonia Night to fix softlock at high frame rates. (#153) 2025-01-23 19:41:15 +03:00
Skyth (Asilkan)
372c04fedd Implement ImGui additive rendering. (#152) 2025-01-23 16:25:31 +03:00
Skyth (Asilkan)
b4de79720c Remove lzcnt instruction usage. (#151) 2025-01-23 15:18:19 +03:00
Hyper
e10eb80e38 config: move Voice Language and Subtitles to System 2025-01-22 23:50:10 +00:00
Skyth (Asilkan)
4e149b0640 Implement proper post process scaling based on aspect ratio. (#148)
* Fix post process scaling for narrow aspect ratios.

* Compare width to pick gaussian blur quality for narrow aspect ratios.

* Account for world map disabling VERT+ for post process scaling.
2025-01-22 19:14:40 +03:00
Skyth (Asilkan)
85b5ebf9a7 Fix pause menu selection cast being visible while exiting options menu. (#139) 2025-01-22 19:13:53 +03:00
Skyth (Asilkan)
bdbdd42bd0 Implement config option to toggle surround sound. (#144) 2025-01-22 18:51:51 +03:00
Skyth (Asilkan)
fbc4bfa4d6 Fix save files not getting redirected without include directories. (#146) 2025-01-22 17:01:37 +03:00
Skyth
010c0a9fdf Use clamp texture addressing by default. 2025-01-22 15:49:30 +03:00
João Moura
e6251bdbc3 Add GitHub Actions workflow files for Flatpak and Windows (#142)
Co-authored-by: SuperSonic16 <25761885+thesupersonic16@users.noreply.github.com>
Co-authored-by: Dario <dariosamo@gmail.com>
2025-01-22 14:29:02 +03:00
Skyth (Asilkan)
fefd177b3a Replace indirect guest function calls with direct ones. (#141) 2025-01-20 18:18:20 +03:00
Skyth
e8d36998a5 Fix gameplay UI scaling at narrow aspect ratios. 2025-01-20 02:08:43 +03:00
Skyth (Asilkan)
1efb4943b3 Replace uses of SWA with UnleashedRecomp & rebrand the recompilers. (#138) 2025-01-19 23:21:05 +03:00
Skyth (Asilkan)
312f913a92 Remove detail namespaces. (#137) 2025-01-19 21:09:47 +03:00
NextinHKRY
d10f4bac3c Change Xbox Color Correction option to have 1 image (#136)
* Options: Color Correction with 1 thumbnail

* Update UnleashedRecompResources

* Update UnleashedRecompResources
2025-01-19 20:56:51 +03:00
Skyth (Asilkan)
535bca7d9f Move config implementations to a .cpp file. (#133) 2025-01-19 19:05:44 +03:00
Hyper
614106c868 input_patches: add missing hook functions 2025-01-19 15:58:02 +00:00
Hyper
fde108178d CTitleStateIntro_patches: make g_quitMessageOpen not static 2025-01-19 15:42:05 +00:00
Hyper
b56c0b8209 Implemented safer hooks for D-Pad movement (#129) 2025-01-19 15:01:11 +00:00
Hyper
cdd801dcec Fix quit message not blocking advertise movie (#127) 2025-01-19 13:06:38 +00:00
Hyper
e7919da1bd game_window: change window title to "Unleashed Recompiled" 2025-01-18 23:51:00 +00:00
Hyper
513a66657f xam: only print XamShowMessageBoxUI info on Win32 2025-01-18 22:51:49 +00:00
Hyper
b9f0742ff9 CTitleStateIntro_patches: don't worry about it 2025-01-18 21:38:09 +00:00
Hyper
7c72146705 CTitleStateIntro_patches: fix save data validation hook 2025-01-18 21:34:20 +00:00
Skyth (Asilkan)
40a8bf557b Scale 2D coordinates to backbuffer resolution. (#124)
* Starting with backbuffer scaling refactor.

* CSD & primitive 2Ds refactored.

* More refactoring.

* Fix primitive 2D, and on screen 3D items.

* Fix right side offset scaling.

* Fix Inspire letterbox.

* Fix offset scaling in world map.

* Fix custom menus.

* Remove debugging code.
2025-01-18 23:56:47 +03:00
Hyper
1cf12fa97f installer_wizard: fix credits not fading out upon exit 2025-01-18 19:39:58 +00:00
Hyper
aacb9d259c Added error message for corrupted save data, removed Win32 message box on XamShowMessageBoxUI (#122)
* xam: remove Win32 message box on XamShowMessageBoxUI

* CTitleStateIntro_patches: display error message on corrupted save data

TitleMenuRemoveContinueOnCorruptSaveMidAsmHook by @DeaTh-G

Co-Authored-By: DeaTh-G <55578911+DeaTh-G@users.noreply.github.com>

---------

Co-authored-by: DeaTh-G <55578911+DeaTh-G@users.noreply.github.com>
2025-01-18 22:32:37 +03:00
Skyth (Asilkan)
c53df15578 Fix movie patches not accounting for half pixel properly. (#119) 2025-01-18 16:52:51 +03:00
SuperSonic16
53331d5760 Added scheme handler for Linux Flatpak (#118) 2025-01-18 15:09:37 +03:00
Skyth
0b675628ea Fix compilation error on Linux. 2025-01-18 13:42:59 +03:00
Skyth
d3edee1945 Fix Vulkan dynamic depth bias validation error. 2025-01-18 12:58:02 +03:00
261 changed files with 14837 additions and 7258 deletions

95
.github/ISSUE_TEMPLATE/bug_report.yml vendored Normal file
View File

@@ -0,0 +1,95 @@
name: Bug Report
description: Report a bug, crash, or other type of error in Unleashed Recompiled
type: Bug
body:
- id: validation
type: checkboxes
attributes:
label: Validation
options:
- label: I have checked the [Issues](https://github.com/hedge-dev/UnleashedRecomp/issues) page to see if my problem has already been reported
required: true
- label: I have confirmed that this bug does not occur in the original game running on original Xbox 360 hardware
required: false
- id: dlc-installed
type: checkboxes
attributes:
label: If you have DLC installed, please specify which ones you have.
options:
- label: Apotos & Shamar Adventure Pack
required: false
- label: Chun-nan Adventure Pack
required: false
- label: Empire City & Adabat Adventure Pack
required: false
- label: Holoska Adventure Pack
required: false
- label: Mazuri Adventure Pack
required: false
- label: Spagonia Adventure Pack
required: false
- id: mods-used
type: textarea
validations:
required: false
attributes:
label: If you have mods enabled, please specify which ones you have.
description: Provide a list of your enabled mods in Hedge Mod Manager here. You will not receive support for issues *caused* by mods.
- id: codes-used
type: textarea
validations:
required: false
attributes:
label: If you have codes enabled, please specify which ones you have.
description: Provide a list of your enabled codes in Hedge Mod Manager here.
- id: describe-bug
type: textarea
validations:
required: true
attributes:
label: Describe the Bug
description: A clear and concise description of what the bug is.
- id: repro-steps
type: textarea
validations:
required: true
attributes:
label: Steps to Reproduce
description: Step-by-step instructions on how to reproduce the bug.
placeholder: |
1. Go to '...'
2. etc.
- id: expected-behavior
type: textarea
validations:
required: true
attributes:
label: Expected Behavior
description: A clear and concise description of what you expected to happen.
- id: footage
type: textarea
validations:
required: true
attributes:
label: Footage
description: Attach a screenshot or video of the bug. If possible, please also provide footage of the expected behaviour on original Xbox 360 hardware.
- id: system-specifications
type: textarea
validations:
required: true
attributes:
label: System Specifications
description: Fill out the following details.
placeholder: |
- CPU: (e.g. Intel Core [...], AMD Ryzen [...], etc.)
- GPU: (e.g. NVIDIA GeForce [...], Radeon HD [...], Intel HD [...], etc.)
- GPU Driver: (e.g NVIDIA driver 545.XX, AMD driver 24.X.X, etc.)
- OS: (e.g. Windows 10, Windows 11, Linux distro)
- Version: (e.g. 1.0.0)
- id: additional-context
type: textarea
validations:
required: false
attributes:
label: Additional Context
description: Provide any other context about the problem here.

1
.github/ISSUE_TEMPLATE/config.yml vendored Normal file
View File

@@ -0,0 +1 @@
blank_issues_enabled: true

20
.github/workflows/validate-external.yml vendored Normal file
View File

@@ -0,0 +1,20 @@
name: validate-external
on:
pull_request_target:
types: [opened, synchronize]
jobs:
authorize:
if: github.repository != github.event.pull_request.head.repo.full_name
environment:
${{ github.event_name == 'pull_request_target' &&
github.event.pull_request.head.repo.full_name != github.repository &&
'external' || 'internal' }}
runs-on: ubuntu-24.04
steps:
- run: echo ✓
build:
needs: authorize
uses: ./.github/workflows/validate.yml
secrets:
ASSET_REPO: ${{ secrets.ASSET_REPO }}
ASSET_REPO_TOKEN: ${{ secrets.ASSET_REPO_TOKEN }}

12
.github/workflows/validate-internal.yml vendored Normal file
View File

@@ -0,0 +1,12 @@
name: validate-internal
on:
push:
branches:
- main
pull_request:
types: [opened, synchronize]
jobs:
build:
if: github.event_name == 'push' || github.repository == github.event.pull_request.head.repo.full_name
uses: ./.github/workflows/validate.yml
secrets: inherit

212
.github/workflows/validate.yml vendored Normal file
View File

@@ -0,0 +1,212 @@
name: validate
on:
workflow_call:
secrets:
ASSET_REPO:
required: true
ASSET_REPO_TOKEN:
required: true
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build-linux:
name: Build Linux
runs-on: ubuntu-24.04
strategy:
matrix:
preset: ["linux-debug", "linux-release", "linux-relwithdebinfo"]
env:
LLVM_VERSION: 18
CMAKE_PRESET: ${{ matrix.preset }}
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
submodules: recursive
- name: Checkout Private Repository
uses: actions/checkout@v4
with:
repository: ${{ secrets.ASSET_REPO }}
token: ${{ secrets.ASSET_REPO_TOKEN }}
path: ./private
- name: Setup ccache
uses: hendrikmuhs/ccache-action@v1.2
with:
key: ccache-${{ runner.os }}-${{ matrix.preset }}
- name: Cache vcpkg
uses: actions/cache@v4
with:
path: |
./thirdparty/vcpkg/downloads
./thirdparty/vcpkg/packages
key: vcpkg-${{ runner.os }}-${{ hashFiles('vcpkg.json') }}
restore-keys: |
vcpkg-${{ runner.os }}-
- name: Install Dependencies (Linux)
run: |-
sudo apt update
sudo apt install -y ninja-build llvm-${{ env.LLVM_VERSION }}-dev libgtk-3-dev
- name: Cache ccache Directory
uses: actions/cache@v4
with:
path: /tmp/ccache
key: ccache-${{ runner.os }}-${{ matrix.preset }}
- name: Prepare Project
run: cp ./private/* ./UnleashedRecompLib/private
- name: Configure Project
env:
CCACHE_DIR: /tmp/ccache
run: cmake . --preset ${{ env.CMAKE_PRESET }} -DSDL2MIXER_VORBIS=VORBISFILE -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_C_COMPILER_LAUNCHER=ccache
- name: Build Project
env:
CCACHE_DIR: /tmp/ccache
run: cmake --build ./out/build/${{ env.CMAKE_PRESET }} --target UnleashedRecomp
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: UnleashedRecomp-Linux-${{ env.CMAKE_PRESET }}
path: ./out/build/${{ env.CMAKE_PRESET }}/UnleashedRecomp/UnleashedRecomp
build-windows:
name: Build Windows
runs-on: windows-latest
strategy:
matrix:
preset: ["x64-Clang-Debug", "x64-Clang-Release", "x64-Clang-RelWithDebInfo"]
env:
CMAKE_PRESET: ${{ matrix.preset }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive
- name: Checkout private repository
uses: actions/checkout@v4
with:
repository: ${{ secrets.ASSET_REPO }}
token: ${{ secrets.ASSET_REPO_TOKEN }}
path: .\private
- name: Setup ccache
uses: hendrikmuhs/ccache-action@v1.2
with:
key: ccache-${{ runner.os }}-${{ matrix.preset }}
- name: Cache vcpkg
uses: actions/cache@v4
with:
path: |
./thirdparty/vcpkg/downloads
./thirdparty/vcpkg/packages
key: vcpkg-${{ runner.os }}-${{ hashFiles('vcpkg.json') }}
restore-keys: |
vcpkg-${{ runner.os }}-
- name: Install dependencies
run: |
choco install ninja
Remove-Item -Path "C:\ProgramData\Chocolatey\bin\ccache.exe" -Force -ErrorAction SilentlyContinue
- name: Configure Developer Command Prompt
uses: ilammy/msvc-dev-cmd@v1
- name: Prepare Project
run: |
$commitMessage = git log -1 --pretty=%s
Add-Content -Path $env:GITHUB_ENV -Value "commit_message=$commitMessage"
copy .\private\* .\UnleashedRecompLib\private
- name: Configure Project
run: cmake . --preset ${{ env.CMAKE_PRESET }} -DSDL2MIXER_VORBIS=VORBISFILE -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_C_COMPILER_LAUNCHER=ccache
- name: Build Project
run: cmake --build .\out\build\${{ env.CMAKE_PRESET }} --target UnleashedRecomp
- name: Pack Release
run: |
New-Item -ItemType Directory -Path .\release
New-Item -ItemType Directory -Path .\release\D3D12
Move-Item -Path ".\out\build\${{ env.CMAKE_PRESET }}\UnleashedRecomp\D3D12\D3D12Core.dll" -Destination ".\release\D3D12\D3D12Core.dll"
Move-Item -Path ".\out\build\${{ env.CMAKE_PRESET }}\UnleashedRecomp\dxcompiler.dll" -Destination ".\release\dxcompiler.dll"
Move-Item -Path ".\out\build\${{ env.CMAKE_PRESET }}\UnleashedRecomp\dxil.dll" -Destination ".\release\dxil.dll"
Move-Item -Path ".\out\build\${{ env.CMAKE_PRESET }}\UnleashedRecomp\UnleashedRecomp.exe" -Destination ".\release\UnleashedRecomp.exe"
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: UnleashedRecomp-Windows-${{ env.CMAKE_PRESET }}
path: .\release
- name: Upload PDB
uses: actions/upload-artifact@v4
if: ${{ matrix.preset != 'x64-Clang-Release' }}
with:
name: UnleashedRecomp-Windows-${{ env.CMAKE_PRESET }}-PDB
path: .\out\build\${{ env.CMAKE_PRESET }}\UnleashedRecomp\UnleashedRecomp.pdb
build-flatpak:
name: Build Flatpak
runs-on: ubuntu-24.04
env:
FLATPAK_ID: io.github.hedge_dev.unleashedrecomp
FREEDESKTOP_VERSION: 23.08
LLVM_VERSION: 18
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
submodules: recursive
- name: Checkout Private Repository
uses: actions/checkout@v4
with:
repository: ${{ secrets.ASSET_REPO }}
token: ${{ secrets.ASSET_REPO_TOKEN }}
path: ./private
- name: Install Dependencies
run: |-
sudo apt update
sudo apt install -y flatpak-builder ccache
- name: Setup ccache
uses: actions/cache@v4
with:
path: /tmp/ccache
key: ccache-${{ runner.os }}
- name: Prepare Project
run: cp ./private/* ./UnleashedRecompLib/private
- name: Prepare Flatpak
run: |
flatpak --user remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
flatpak --user install -y flathub org.freedesktop.Sdk//${{ env.FREEDESKTOP_VERSION }}
flatpak --user install -y flathub org.freedesktop.Sdk.Extension.llvm${{ env.LLVM_VERSION }}//${{ env.FREEDESKTOP_VERSION }}
- name: Build Flatpak
run: |
echo "commit_message=$(git log -1 --pretty=%s)" >> $GITHUB_ENV
export CCACHE_DIR=/tmp/ccache
flatpak-builder --user --force-clean --install-deps-from=flathub --repo=repo --ccache builddir ./flatpak/${{ env.FLATPAK_ID }}.json
flatpak build-bundle repo ./${{ env.FLATPAK_ID }}.flatpak ${{ env.FLATPAK_ID }} --runtime-repo=https://flathub.org/repo/flathub.flatpakrepo
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: UnleashedRecomp-Flatpak
path: ./${{ env.FLATPAK_ID }}.flatpak

21
.gitmodules vendored
View File

@@ -1,15 +1,12 @@
[submodule "thirdparty/PowerRecomp"]
path = tools/PowerRecomp
url = https://github.com/hedge-dev/PowerRecomp
[submodule "tools/XenonRecomp"]
path = tools/XenonRecomp
url = https://github.com/hedge-dev/XenonRecomp.git
[submodule "thirdparty/ddspp"]
path = thirdparty/ddspp
url = https://github.com/redorav/ddspp.git
[submodule "thirdparty/ShaderRecomp"]
path = tools/ShaderRecomp
url = https://github.com/hedge-dev/ShaderRecomp.git
[submodule "thirdparty/libmspack"]
path = thirdparty/libmspack
url = https://github.com/kyz/libmspack
[submodule "tools/XenosRecomp"]
path = tools/XenosRecomp
url = https://github.com/hedge-dev/XenosRecomp.git
[submodule "UnleashedRecompResources"]
path = UnleashedRecompResources
url = https://github.com/hedge-dev/UnleashedRecompResources.git
@@ -40,9 +37,6 @@
[submodule "thirdparty/concurrentqueue"]
path = thirdparty/concurrentqueue
url = https://github.com/cameron314/concurrentqueue.git
[submodule "thirdparty/tiny-AES-c"]
path = thirdparty/tiny-AES-c
url = https://github.com/kokke/tiny-AES-c.git
[submodule "thirdparty/magic_enum"]
path = thirdparty/magic_enum
url = https://github.com/Neargye/magic_enum.git
@@ -61,3 +55,6 @@
[submodule "thirdparty/implot"]
path = thirdparty/implot
url = https://github.com/epezent/implot.git
[submodule "thirdparty/json"]
path = thirdparty/json
url = https://github.com/nlohmann/json

View File

@@ -5,8 +5,8 @@ if(NOT DEFINED ENV{VCPKG_ROOT})
endif()
include($ENV{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake)
set(SWA_THIRDPARTY_ROOT ${CMAKE_SOURCE_DIR}/thirdparty)
set(SWA_TOOLS_ROOT ${CMAKE_SOURCE_DIR}/tools)
set(UNLEASHED_RECOMP_THIRDPARTY_ROOT ${CMAKE_SOURCE_DIR}/thirdparty)
set(UNLEASHED_RECOMP_TOOLS_ROOT ${CMAKE_SOURCE_DIR}/tools)
set(CMAKE_CXX_STANDARD 20)
set(BUILD_SHARED_LIBS OFF)
@@ -18,8 +18,13 @@ endif()
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
add_subdirectory(${SWA_THIRDPARTY_ROOT})
add_subdirectory(${SWA_TOOLS_ROOT})
# Target Sandy Bridge for all projects
add_compile_options(
-march=sandybridge
)
add_subdirectory(${UNLEASHED_RECOMP_THIRDPARTY_ROOT})
add_subdirectory(${UNLEASHED_RECOMP_TOOLS_ROOT})
project("UnleashedRecomp-ALL")

View File

@@ -23,8 +23,7 @@
"type": "equals",
"lhs": "${hostSystemName}",
"rhs": "Windows"
},
"toolset": "ClangCL"
}
},
{
"name": "x64-Clang-Debug",

674
COPYING Normal file
View File

@@ -0,0 +1,674 @@
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
<program> Copyright (C) <year> <name of author>
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<https://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<https://www.gnu.org/licenses/why-not-lgpl.html>.

490
README.md
View File

@@ -1,13 +1,477 @@
# UnleashedRecomp
# Building
1. Clone **UnleashedRecomp** with submodules (or run `update_submodules.bat` to ensure submodules are pulled).
```
git clone --recurse-submodules https://github.com/hedge-dev/UnleashedRecomp.git
```
2. Decompress and decrypt `default.xex`, apply the title update patch (`default.xexp`), and place the resulting file in `./UnleashedRecompLib/private/`.
3. Decompress `shader.ar` and place the resulting file in `./UnleashedRecompLib/private/`.
4. Open the repository directory in Visual Studio 2022 and wait for CMake generation to complete. If you don't plan to debug, switch to the `x64-Clang-Release` configuration.
5. Under Solution Explorer, right-click and choose "Switch to CMake Targets View".
6. Right-click the **UnleashedRecomp** project and choose "Set as Startup Item", then choose "Add Debug Configuration".
7. Add a `currentDir` property to the first element under `configurations` in the generated JSON and set its value to the path to your game directory (where root is the directory containing `dlc`, `game`, `save`, `update`, etc).
8. Run or debug **UnleashedRecomp**. The initial compilation might take a while to complete due to code and shader recompilation.
<p align="center">
<img src="https://raw.githubusercontent.com/hedge-dev/UnleashedRecompResources/refs/heads/main/images/logo/Logo.png" width="512"/>
</p>
---
Unleashed Recompiled is an unofficial PC port of the Xbox 360 version of Sonic Unleashed created through the process of static recompilation. The port offers Windows and Linux support with numerous built-in enhancements such as high resolutions, ultrawide support, high frame rates, improved performance and modding.
**This project does not include any game assets. You must provide the files from your own legally acquired copy of the game to install or build Unleashed Recompiled.**
[Check out the latest release here](https://github.com/hedge-dev/UnleashedRecomp/releases/latest).
[XenonRecomp](https://github.com/hedge-dev/XenonRecomp) and [XenosRecomp](https://github.com/hedge-dev/XenosRecomp) are the main recompilers used for converting the game's original PowerPC code and Xenos shaders into compatible C++ and HLSL code respectively. The development of these recompilers was directly inspired by [N64: Recompiled](https://github.com/N64Recomp/N64Recomp), which was used to create [Zelda 64: Recompiled](https://github.com/Zelda64Recomp/Zelda64Recomp).
## Table of Contents
- [Minimum System Requirements](#minimum-system-requirements)
- [How to Install](#how-to-install)
- [Features](#features)
- [Update Roadmap](#update-roadmap)
- [Known Issues](#known-issues)
- [FAQ](#faq)
- [Building](#building)
- [Credits](#credits)
## Minimum System Requirements
- CPU with support for the AVX instruction set:
- Intel: Sandy Bridge (Intel Core 2nd Generation)
- AMD: Bulldozer (AMD FX series)
- GPU with support for Direct3D 12.0 (Shader Model 6) or Vulkan 1.2:
- NVIDIA: GeForce GT 630 (Kepler)
- AMD: Radeon HD 7750 (2012, not the RX 7000)
- Intel: HD Graphics 510 (Skylake)
- Memory:
- 8 GB minimum
- Operating System:
- Windows 10 (version 1909)
- A modern Linux distro such as Ubuntu 22.04 LTS
- Storage:
- With DLC: 10 GiB required
- Without DLC: 6 GiB required
> [!NOTE]
> More storage space may be required if uncompressed game files are provided during installation.
## How to Install
1) You must have access to the following:
- Xbox 360 (modifications not necessary)
- Xbox 360 Hard Drive (20 GB minimum)
- Xbox 360 Hard Drive Transfer Cable (or a compatible SATA to USB adapter)
- Sonic Unleashed for Xbox 360 (US or EU, **JP is not supported**)
- Retail Disc or Digital Copy (can be purchased and downloaded from the [Xbox Store](https://www.xbox.com/en-US/games/store/sonic-unleashed/c098fgnmts8f)).
- Title Update required.
- All available DLC (Adventure Packs) are optional, but **highly recommended**. **The DLC includes high quality lighting for the entire game**.
> [!TIP]
> If you do not have the Xbox 360 Hard Drive Transfer Cable, please ensure that you purchase the correct revision of it for your console.
>
> The latest revision works with both original Xbox 360 and Xbox 360 S|E hard drives, but the first revision only works with original Xbox 360 hard drives.
>
> To know which is which, the first revision cable is gray, whereas the latest revision (which supports any Xbox 360 hard drive) is black.
2) **Before proceeding with the installation**, make sure to follow the guide on how to acquire the game files from your Xbox 360.
- [English Dumping Guide](/docs/DUMPING-en.md)
3) Download [the latest release](https://github.com/hedge-dev/UnleashedRecomp/releases/latest) of Unleashed Recompiled and extract it to where you'd like the game to be installed.
4) Run the executable and you will be guided through the installation process. You will be asked to provide the files you acquired in the previous step. When presented with options for how to do this:
- **Add Files** will only allow you to provide **containers or images dumped from an Xbox 360**. These often come in the form of very large files without associated extensions. Don't worry if you're not aware of what's inside of them, the installer will automatically detect what type of content is inside the container.
- **Add Folder** will only allow you to provide a **directory with the game's raw files** corresponding to the piece of content that is requested. **It will NOT scan your folder for compatible content!**
> [!NOTE]
> Please note that it is **not possible** to complete the installation if your files have been **modified**. In case of other problems such as black screens or crashes, **do not try to reinstall the game** as it is not possible for the process to result in an invalid installation.
## Features
### Easy to Use Installer
A built-in installation wizard will guide you through the process of installing the game with many integrity checks to ensure the process goes as smoothly as possible. The installer can also be accessed from the title screen, if you wish to add the DLC at a later time.
### Options Menu
A completely new options menu accessible from the title screen or pause menu, with an unprecedented level of fidelity to the game's design language. Get access to many quality of life features and graphics options directly within the game with full controller navigation.
### Achievements
You will be rewarded with achievements as you progress through the game just like on its original platform. Achievements are recreated with integrated notifications and a new menu also very faithful to the game's design language. Get all of them and you will be rewarded with a gold trophy!
> [!NOTE]
> Achievements cannot be used with platforms such as Steam or RetroAchievements.
### Custom Localization
All of the new menus in the port fully support localization for each of the game's originally supported languages; English, Japanese, German, French, Spanish and Italian. As a bonus, switching the game to Japanese also changes the title screen logo to its original Japanese counterpart.
### High Fidelity
Special care and attention was taken to recreate the game's visuals as accurately as possible and was always compared to the game running on the original hardware. The colors are as vibrant as those of the PlayStation 3 version, which did not use the color correction filter present in the Xbox 360 version, as was originally intended. Nevertheless, an option to recreate the original warm filter from the Xbox 360 version has been included as an option.
### High Resolution Enhancements
Many improvements have been provided to accompany support for higher resolutions:
- Multisample Anti-Aliasing (MSAA) levels beyond the 2x used by the original game.
- Higher quality Depth of Field (DoF), an effect which commonly breaks in emulators when increasing the game's resolution. The original effect's formula was reverse-engineered and versions with 5x5, 7x7 and 9x9 taps were added based on the target resolution.
- An "Enhanced" Motion Blur option which uses more samples than the original for a smoother blur.
- Support for "Alpha to Coverage" Anti-Aliasing to enhance the visual result of transparent textures with hard edges.
- A Bicubic Texture Filtering option which greatly enhances the visual result of Global Illumination textures.
- A more precise implementation of the game's reverse Z technique, eliminating most Z-fighting issues and fixing the jittery motion blur in stages like Jungle Joyride.
### High Performance Renderer
A new renderer was written from scratch to translate the game's draw calls to modern APIs in a highly efficient way while also taking advantage of multi-threading.
As emulation of the Xbox 360's GPU is not required in a recompilation, many decisions were made to skip quirks of the original hardware that are not required in a PC port, resulting in great improvements to performance.
Modern rendering techniques such as bindless textures and shader specialization are also used to maximize the performance on systems with modern hardware whilst also supporting a wide range of lower end hardware.
Multiple optimizations were made to the game's shadow map rendering and special techniques were developed to automatically detect and skip unnecessary texture copies that are no longer needed in modern APIs.
Additionally, to support the game's extensive use of asset streaming, parallel transfer queues are leveraged, a feature only available in modern APIs that enable efficient use of available PCI-E bandwidth.
### High Frame Rate Support
The game's frame rate cap has been increased by default to 60 FPS, with support for higher targets and unlocked frame rate being available from the options menu. A vast amount of glitches that usually occur at higher frame rates have been fixed and are included as part of the recompilation.
> [!NOTE]
> While the game is considered to be beatable at frame rates higher than 60 FPS, please note that [some issues](#high-frame-rate-glitches) can still occur. Some of these issues may be addressed in future updates.
### Ultrawide Support
Aspect ratios for ultrawide displays (such as 21:9 or even wider) are supported out of the box, with options to adjust the alignment of the UI to the edges or to the original 16:9 safe area, if desired. No external codes are required!
> [!NOTE]
> By default, cutscenes are locked to their original aspect ratio to prevent [presentation issues](#ultrawide-visual-issues), as the game was not designed to present these scenes with wider aspect ratios. However, you can use the included option to unlock this feature if you don't mind these issues.
### Extended Controller Features
Support for the D-Pad has been added to various parts of the game, allowing the full game to be completed using it over the analog stick, if you so desire.
If you have a DualShock 4 or DualSense controller, the LED will dynamically change color depending on the game context and support for the touchpad has been added to the World Map, allowing you to spin the planet freely!
> [!NOTE]
> LED and touchpad support for the DualShock 4 and DualSense controllers may be limited when using third-party input translation layers (such as DS4Windows or Steam Input).
>
> Support for both features may also be limited on Linux.
### Low Input Latency
Modern input latency reduction techniques are included to improve the game's responsiveness as much as possible, such as support for [Waitable Swap Chains](https://learn.microsoft.com/en-us/windows/uwp/gaming/reduce-latency-with-dxgi-1-3-swap-chains) in both D3D12 and Vulkan. This methodology was applied directly before the game's input polling to minimize latency. Additionally, the D3D12 backend also supports [Flip Models](https://devblogs.microsoft.com/directx/dxgi-flip-model/), allowing the game to directly present to the screen as quickly as possible.
### Asynchronous Shader Compilation
One of the biggest improvements that the recompilation features over emulators is the fact that Pipeline Compilation (commonly known as "Shader Compilation") is directly integrated into the game as part of the asset loading process. This means there's **no stutters during gameplay the first time new objects or effects appear**.
The renderer will traverse the game's rendering structures and automatically determine what pipelines must be compiled before it considers the asset is loaded. As a result, pipeline compilation is performed in parallel as part of the game's background workers that take care of streaming in the assets, either during regular gameplay or as part of the game's loading screens. This is an improvement that'd never be possible with an emulator, as it requires direct modification of the game to implement this feature.
While this system is very extensive, some special shaders such as post-processing effects or 2D elements are not detected ahead of time, so a list of pre-determined pipelines are compiled during the game's boot sequence. However, the amount is so low that this is done completely in the background and it was determined that there was no need to show a shader compilation screen on most systems that were tested.
> [!NOTE]
> While stutters from shader compilation are non-existent, please be aware that [some stutters](#unavoidable-stutters) may be encountered due to the way the game was programmed. If you encounter these, please keep in mind that **these are not related to shader compilation**. Some of these issues may be addressed in future updates.
### Support for Xbox and PlayStation Controller Icons
You can freely choose whether to use Xbox 360 or PlayStation 3 controller icons. By default, the game will automatically detect which to use based on your controller, but you can select a different option based on your personal preference from within the options menu.
Game objects that display controller icons such as Reaction Plates or Jump Selectors will automatically switch their textures to match the option in use. Even small details such as the Tornado Defense missions using different colors for the missiles have been accounted for.
### Quality of Life Options
Many options have been integrated to address some common quality of life improvements that were deemed to be essential to the port:
- Hint rings and other types of hints provided by the game during exploration or boss fights can be disabled.
- Control tutorials (as referred to by current Sonic games) can be disabled to remove button prompts that show up during gameplay to teach the player how to use certain moves.
- The Werehog's Battle Theme, commonly considered to be an annoyance in the original game due to its frequency and interruption of the stage's background music, can now be disabled.
- The day/night transformation cutscene in towns can use either the Xbox 360 or PlayStation 3 version, with the Xbox version artificially extending loading times for the full video play out, whilst the PlayStation version ends as soon as it's done loading.
- Music Attenuation is a feature that was originally present in the Xbox 360 version of the game, where it'd automatically mute the background music if the console's media player was in use. This feature has been implemented using information provided by the [Windows Media Control](https://learn.microsoft.com/en-us/uwp/api/windows.media.control?view=winrt-26100) APIs in [WinRT](https://en.wikipedia.org/wiki/Windows_Runtime). Applications that interface with Windows 10/11 to display media controls are supported.
> [!TIP]
> You may refer to Music Presence's [list of supported media players](https://github.com/ungive/discord-music-presence/blob/master/documentation/supported-media-players.md) for players that work with Music Attenuation out of the box.
> [!NOTE]
> Please note that Music Attenuation is not currently available on Linux. Support for this feature may be added in a future update.
### Steam Deck Support
Native Linux builds that work on the Steam Deck out of the box are available. The Flatpak version can be installed directly and added as a non-Steam game easily via Desktop Mode.
Be aware that installing the game on a Steam Deck can be a slow process and can easily consume the Deck's storage on the 64 GB model, so make sure you provide the game's files via external storage, such as a microSD card or a network share if possible.
Performance has been found to improve significantly when the Deck's GPU clock is manually set to its maximum value via Gamescope, even if the game appears to be primarily CPU bottlenecked. Be aware that maintaining the target frame rate may be difficult during demanding sections, such as Werehog combat or DLC stages. Overall, performance is considered to be noticeably better than on the original hardware while using the default settings.
> [!NOTE]
> It is recommended to perform the installation process while in Desktop Mode, as the [file picker may not be available in Game Mode](#file-picker-unavailable-on-steam-deck-in-game-mode) at all times.
### Mod Support
The game includes a mod loader compatible with [Hedge Mod Manager](https://github.com/thesupersonic16/HedgeModManager). As an option, users looking for Linux support should try the development version of [HMM 8](https://github.com/hedge-dev/HedgeModManager), which should work out of the box on platforms such as the Steam Deck.
The mod format uses the same standard as the one used by Sonic Generations mods. Mods that were originally created for [Unleashed Mod Manager](https://github.com/hyperbx/Unleashed-Mod-Manager) are also supported for the sake of backwards compatibility. However, using this mod format is not recommended in the long term and should now be considered deprecated.
Modded files for the Xbox 360 version of the game are compatible with Unleashed Recompiled. However, some mods may have targeted a version of the game that doesn't contain the title update, so those may have issues and require updates from their authors in order to work with the recompilation. Mods that replace the game's executable file (`default.xex`) or shaders are not supported.
> [!NOTE]
> Code modding is currently not possible and is [planned for a future update](#code-modding). As a workaround for the time being, some codes have been directly embedded into the game and can be accessed through Hedge Mod Manager's Codes tab.
>
> For information on the mod format, check out Hedge Mod Manager's [Basic Mod File Structure](https://github.com/thesupersonic16/HedgeModManager/wiki/Basic-Mod-File-Structure) wiki page.
## Update Roadmap
A number of different features are planned for future updates.
### Action Remapping
Options for changing the bindings of the player actions to the controller buttons, as well as support for keyboard bindings. In the meantime, refer to this [question in the FAQ](#what-are-the-keyboard-bindings) for the default keyboard bindings, as well as where to edit them if necessary.
### More Linux Builds
Linux builds that don't require Flatpak will be added in the future when a way to [create the shortcuts required for HedgeModManager](https://github.com/hedge-dev/UnleashedRecomp/issues/451) is implemented. In the meantime, you can access these builds through the [Actions](https://github.com/hedge-dev/UnleashedRecomp/actions) panel or [build them yourself](#building).
### High Frame Rate Fixes
A number of [gameplay issues](#high-frame-rate-glitches) are currently present that will gradually be fixed as more research into how the game works is done. At the moment, the game is considered to be beatable at high frame rates, but you may be required to limit the game to 60 FPS in order to clear some optional content.
### Code Modding
Modifying the code of a recompilation is a fundamentally different process than doing it for a game that only supports one platform on a single executable version. Everyone can build and fork Unleashed Recompiled on their own, which makes the method of targeting a single executable essentially impossible.
A convenient and maintainable method for code modding is under research and will come in a future update, which will work consistently across all the platforms that Unleashed Recompiled currently supports.
In the meantime, those interested in doing extensive code modding are recommended to fork the repository and introduce their changes in preparation for the code modding update.
### Stance on New Features
The team behind Unleashed Recompiled is committed to preserving the game's original design as best as possible. Additional features that don't fit the vision of the project will be left to mods or forks to cover. As such, requests for such features will not be considered. If you request a new feature, make sure it makes sense within the design of the original game and fits the goal of delivering a PC version of the game.
## Known Issues
### Unavoidable Stutters
While Unleashed Recompiled does its best effort on fixing any hitches and stutters that could originate from the translation process, some problems are not possible to fix due to the way the game was built.
Even if the recompilation process introduces a small overhead, the game does not perform some tasks in an asynchronous way. These stutters exist on original hardware, but are much more noticeable when targeting higher frame rates.
Most of the known stutters are related to the game loading in layers of new objects at certain points in stages, spawning in particle systems or playing multiple sound effects. These operations can produce pauses that can last almost 10 milliseconds, even on powerful hardware. These hitches are much easier to notice when targeting frame rates such as 120 FPS, where one frame only lasts around 8 milliseconds.
These problems are not possible to mitigate without further research into how the game works and will remain a goal for future updates to fix if possible. However, [as mentioned in the FAQ](#how-can-i-improve-performance), it's been found that these stutters can be significantly mitigated by playing on Linux, possibly due to the amount of synchronization primitives used by the game when these operations are performed.
### High Frame Rate Glitches
Sonic Unleashed is not a game that runs at a fixed rate on any of its target platforms. While it does target 30 FPS on Xbox 360 and is uncapped on PlayStation 3, it doesn't exactly hit these targets often depending on the area, and if it does, the time step itself is subject to large deviations. The game's programming simply follows the time step as closely as possible, which means inconsistencies in the time step are impossible to reproduce without targeting one exact piece of hardware.
A lot of the bugs present in the game can largely be explained by sudden spikes in frame times. To make matters worse, some bugs were found to be present only if the frame rate is too stable, such as this [infamous bug](https://github.com/hedge-dev/UnleashedRecomp/issues/100) that shows up in the Wii version of the game because the cutscene was recorded with a fixed time step.
Unleashed Recompiled features a vast amount of fixes for issues that present themselves when targeting high frame rates, but fixing *all of them* is too big of a task without more knowledge of how the game works. It is possible that these issues will be fixed in the future or that alternative solutions such as transform interpolation are implemented instead.
If you encounter game breaking bugs or unplayable sections, try temporarily limiting the frame rate to resolve them. Also, check the [Issues](https://github.com/hedge-dev/UnleashedRecomp/issues) page for any existing reports.
### Ultrawide Visual Issues
Visual oddities may occur when unlocking the aspect ratio during cutscenes, as the game was not designed for wider formats. Adjusting these scenes can be subjective, so it will be up to mods to address these issues, as they require modifying the game's animations and object placement within cutscene files.
### Original Game Bugs
Game bugs present on the original hardware are intentionally preserved and will not be fixed. Please do not report issues for these bugs and verify that the issue does not occur on original hardware before reporting. Bug reports for issues found in the original game will be rejected. Bugs that only happen in Unleashed Recompiled must be accompanied by footage captured on original Xbox 360 hardware showing that the bug does not happen there.
### File Picker Unavailable on Steam Deck in Game Mode
Due to some restrictions of how the desktop environment on the Steam Deck works whilst in Game Mode, please note that you may need to at least first boot into Desktop Mode to be able to use the file picker to provide the game files.
Simply booting at least once in Desktop Mode will enable the Deck to use the file picker when going back to Game Mode. You can complete the entire installation process while in Desktop Mode to save yourself the trouble of browsing through Game Mode if necessary.
## FAQ
### Do you have a website or Discord server?
Unleashed Recompiled does not have an official website, nor is it affiliated with any Discord servers.
**Please link here when directing anyone to the project.**
> [!CAUTION]
> Do not download builds of Unleashed Recompiled from anywhere but our [Releases](https://github.com/hedge-dev/UnleashedRecomp/releases/latest) page.
>
> **We will never distribute builds on other websites, via Discord servers or via third-party update tools.**
### Why does the installer say my files are invalid?
The installer may display this error for several reasons. Please check the following to ensure your files are valid:
- Please read the [How to Install](#how-to-install) section and make sure you've acquired all of the necessary files correctly.
- Verify that you're not trying to add compressed files such as `.zip`, `.7z`, `.rar` or other formats.
- Only use the **Add Folder** option if you're sure you have a directory with the content's files already extracted, which means it'll only contain files like `.xex`, `.ar.00`, `.arl` and others. **This option will not scan your folder for compatible content**.
- Ensure that the files you've acquired correspond to the same region. **Discs and Title Updates from different regions can't be used together** and will fail to generate a patch.
- The installer will only accept **original and unmodified files**. Do not attempt to provide modified files to the installer.
### What are the keyboard bindings?
Pad|Key
-|-
A (Cross)|S
B (Circle)|D
X (Square)|A
Y (Triangle)|W
D-Pad - Up|Unbound
D-Pad - Down|Unbound
D-Pad - Left|Unbound
D-Pad - Right|Unbound
Start|Return
Back (Select)|Backspace
Left Trigger (L2)|1
Right Trigger (R2)|3
Left Bumper (L1)|Q
Right Bumper (R1)|E
Left Stick - Up|Up Arrow
Left Stick - Down|Down Arrow
Left Stick - Left|Left Arrow
Left Stick - Right|Right Arrow
Right Stick - Up|Unbound
Right Stick - Down|Unbound
Right Stick - Left|Unbound
Right Stick - Right|Unbound
---
You can change the keyboard bindings by editing `config.toml` located in the [configuration directory](#where-is-the-save-data-and-configuration-file-stored), although using a controller is highly recommended until [Action Remapping](#action-remapping) is added in a future update.
Refer to the left column of [this enum template](https://github.com/hedge-dev/UnleashedRecomp/blob/main/UnleashedRecomp/user/config.cpp#L40) for a list of valid keys.
*The default keyboard layout is based on Devil's Details' keyboard layout for Sonic Generations (2011)*.
### Where is the save data and configuration file stored?
The save data and configuration files are stored at the following locations:
- Windows: `%APPDATA%\UnleashedRecomp\`
- Linux: `~/.config/UnleashedRecomp/`
You will find the save data under the `save` folder (or `mlsave`, if using Hedge Mod Manager's save file redirection). The configuration file is named `config.toml`.
### I want to update the game. How can I avoid losing my save data? Do I need to reinstall the game?
Updating the game can be done by simply copying and replacing the files from a [release](https://github.com/hedge-dev/UnleashedRecomp/releases) on top of your existing installation. **Your save data and configuration will not be lost.** You won't need to reinstall the game, as the game files will always remain the same across versions of Unleashed Recompiled.
### How can I force the game to store the save data and configuration in the installation folder?
You can make the game ignore the [default configuration paths](#where-is-the-save-data-and-configuration-file-stored) and force it to save everything in the installation directory by creating an empty `portable.txt` file. You are directly responsible for the safekeeping of your save data and configuration if you choose this option.
### How can I install mods?
**Do not install mods by modifying the game data**. Use [Hedge Mod Manager](https://github.com/thesupersonic16/HedgeModManager) instead. You will not get support for modifying your game files directly.
> [!WARNING]
> Unleashed Mod Manager is not recommended for use with Unleashed Recompiled, as it can make permanent changes to your game files.
### How can I force the game to run the installation again?
While it's unlikely you'll need to do this unless you've modified your game files by accident, you can force the installer to run again by using the launch argument: `--install`.
### How can I force the game to run under X11 or Wayland?
Use either of the following arguments to force SDL to run under the video driver you want:
- X11: `--sdl-video-driver x11`
- Wayland: `--sdl-video-driver wayland`
The second argument will be passed directly to SDL as a hint to try to initialize the game with your preferred option.
### Where is the game data for the Flatpak version installed?
Given it is not possible to run the game where the Flatpak is stored, the game data will be installed to `~/.var/app/io.github.hedge_dev.unleashedrecomp/data`. The Flatpak build will only recognize this directory as valid. Feel free to reuse this data directory with a native Linux build if you wish to switch in the future.
If you wish to move this data to another location, you can do so by creating a symlink from this directory to the one where you'll migrate your installation to.
### How can I improve performance?
You can lower the values of some of the following graphics options to improve performance. Other options may help, but these usually have the biggest impact:
- Resolution Scale
- Anti-Aliasing
- Shadow Resolution
If you want a detailed performance report along with relevant system information, press F1 to view multiple performance graphs. This will aid in the process of gathering as much information as possible in order to identify the problem.
When using a system with multiple GPUs (such as a gaming laptop), please make sure that the game has chosen your dedicated graphics adapter and not your integrated one. The F1 menu will display which device has been selected by its name along with other options that might be available. If you're unable to get the game to select the correct device, you can attempt to override this by changing the `GraphicsDevice` property in `config.toml`. The name of the device must be an exact match.
Some of the game's more demanding sections require strong CPU single-thread performance. While the recompilation process adds minimal CPU overhead, modern hardware is typically bottlenecked by this factor before the GPU.
Linux has an unexpected advantage when it comes to CPU performance, showing improvements in CPU-bound scenarios. It's currently speculated that this could be due to the heavy amount of thread synchronization the game performs, an operation that is likely to be more performant on Linux's CPU scheduler than on Windows' scheduler. If you wish to gain some additional performance, playing on Linux instead of Windows could yield better results.
> [!WARNING]
> Using external frame rate limiters or performance overlays may degrade performance or have negative consequences.
### Can I install the game with a PlayStation 3 copy?
**You cannot use the files from the PlayStation 3 version of the game.** Supporting these files would require an entirely new recompilation, as they have proprietary formatting that only works on PS3 and the code for these formats is only present in that version. All significant differences present in the PS3 version of the game have been included in this project as options.
### Can I install the game with a Japanese copy?
The Japanese version of Sonic Unleashed has some minor differences in both file structure and content that make this version of the game incompatible with the international release. Furthermore, the US and EU versions of the game already support Japanese. Supporting this version would only cause mod compatibility issues in the future, so it is unlikely to be added to the update roadmap as it would also require its own recompilation.
### Why is the game detecting my PlayStation controller as an Xbox controller?
If you're using a third-party input translation layer (such as DS4Windows or Steam Input), it is recommended that you disable these for full controller support.
### Will macOS be supported?
While macOS is not currently on the roadmap, this project welcomes any effort to add support for this platform. Unleashed Recompiled relies on [plume](https://github.com/renderbag/plume), a rendering hardware abstraction layer that will be getting support for Metal in the near future. You can join the macOS discussion on [this issue](https://github.com/hedge-dev/UnleashedRecomp/issues/455).
### What other platforms will be supported?
This project does not plan to support any more platforms other than Windows, Linux and potentially macOS at the moment. Any contributors who wish to support more platforms should do so through a fork.
### Do you have plans to recompile other Xbox 360 games or Sonic games?
The team behind Unleashed Recompiled does not currently have any plans to port more Xbox 360 games or Sonic games. Anyone is free to look into [XenonRecomp](https://github.com/hedge-dev/XenonRecomp) if they wish to investigate these opportunities.
## Building
[Check out the building instructions here](/docs/BUILDING.md).
## Credits
### Unleashed Recompiled
- [Skyth](https://github.com/blueskythlikesclouds): Creator and Lead Developer of the recompilation, as well as the developer of technologies created for it such as [XenonRecomp](https://github.com/hedge-dev/XenonRecomp) and [XenosRecomp](https://github.com/hedge-dev/XenosRecomp). Other responsibilities include the creation of the graphics and audio backends for the project, alongside custom menus, dynamic UI aspect ratio and various patches and new features added to the game.
- [Sajid](https://github.com/Sajidur78): Co-creator and Developer of the recompilation, as well as the developer of [XenonAnalyse](https://github.com/hedge-dev/XenonRecomp/?tab=readme-ov-file#XenonAnalyse). Other responsibilities include the implementation of core components for the project, like the Xbox 360 kernel translation layer used to make the game function.
- [Hyper](https://github.com/hyperbx): Developer of system level features, such as achievement support and the custom menus, alongside various other patches and features to make the game feel right at home on modern systems. Aided in the creation of concept art and the final options menu thumbnails.
- [Darío](https://github.com/DarioSamo): Creator of the graphics hardware abstraction layer [plume](https://github.com/renderbag/plume), used by the project's graphics backend. Alongside providing consultation for graphics and aiding with shader research and development, other responsibilities include the installer wizard and Linux support. Provided Spanish localization for the custom menus.
- [ĐeäTh](https://github.com/DeaTh-G): Supervisor of game accurate design philosophy regarding the custom menus. Aided in the implementation of annotation support for Japanese localization, whilst providing minor support for all localization.
- [RadiantDerg](https://github.com/RadiantDerg): Lead Artist behind the thumbnails used in the options menu. Other responsibilities include the creation of several debugging related codes for Hedge Mod Manager and providing aid with the research of the game's internals.
- [PTKay](https://github.com/PTKay): Lead Concept Artist for the custom menus. Aided in the development of the installer wizard's visuals.
- [SuperSonic16](https://github.com/thesupersonic16): Lead Developer of [Hedge Mod Manager](https://github.com/thesupersonic16/HedgeModManager), providing compatibility for modding with the recompilation. Aided in the creation of the deployment system for Linux builds.
- [NextinHKRY](https://github.com/NextinMono): Aided in researching the game's internals and creating concept art for some options menu thumbnails used in the final release. Provided Italian localization for the custom menus.
- [LadyLunanova](https://linktr.ee/ladylunanova): Artist behind the achievement trophy sprite and the keyboard and mouse icons used in the installer wizard.
- [LJSTAR](https://github.com/LJSTARbird): Artist behind the project logo, along with several thumbnail designs used in the options menu and created new icons for the button guide for opening the achievements menu. Provided French localization for the custom menus.
- [saguinee](https://twitter.com/saguinee): Artist behind thumbnail designs used in the options menu such as Hints and Battle Theme.
- [Goalringmod27](https://linktr.ee/goalringmod27): Concept Artist behind the achievements overlay shown during gameplay. Aided in the creation of the Transparency Anti-Aliasing thumbnail.
- [M&M](https://github.com/ActualMandM): Provisional support for dynamic UI aspect ratio.
- [DaGuAr](https://twitter.com/TheDaguar): Provided Spanish localization for the custom menus alongside Darío.
- [brianuuuSonic](https://github.com/brianuuu): Provided Japanese localization for the custom menus.
- [Kitzuku](https://github.com/Kitzuku): Provided German localization for the custom menus.
### Special Thanks
- [Mr-Wiseguy](https://github.com/Mr-Wiseguy): Creator of [N64: Recompiled](https://github.com/N64Recomp/N64Recomp), which was the inspiration behind the creation of this project. Provided information and assistance at the beginning of development.
- [xenia-project](https://github.com/xenia-project/xenia): Extraordinary amounts of research regarding the inner workings of the Xbox 360, which sped up the development of the recompilation.
- [Katlin Daigler](https://katlindaigler.carbonmade.com): Provided consultation for logo design.
- [ocornut](https://github.com/ocornut): Creator of [Dear ImGui](https://github.com/ocornut/imgui), which is used as the backbone of the custom menus.
- Raymond Chen: Useful resources on Windows application development with his blog ["The Old New Thing"](https://devblogs.microsoft.com/oldnewthing/).

View File

@@ -1,16 +1,13 @@
project("UnleashedRecomp")
set(TARGET_NAME "SWA")
if (WIN32)
option(SWA_D3D12 "Add D3D12 support for rendering" ON)
option(UNLEASHED_RECOMP_D3D12 "Add D3D12 support for rendering" ON)
endif()
if (CMAKE_SYSTEM_NAME MATCHES "Linux")
option(SWA_FLATPAK "Configure the build for Flatpak compatibility." OFF)
option(UNLEASHED_RECOMP_FLATPAK "Configure the build for Flatpak compatibility." OFF)
endif()
option(SWA_XAUDIO2 "Use XAudio2 for audio playback" OFF)
function(BIN2C)
cmake_parse_arguments(BIN2C_ARGS "" "TARGET_OBJ;SOURCE_FILE;DEST_FILE;ARRAY_NAME;COMPRESSION_TYPE" "" ${ARGN})
@@ -42,9 +39,7 @@ function(BIN2C)
endfunction()
add_compile_options(
-march=sandybridge
-fno-strict-aliasing
-Wno-switch
-Wno-unused-function
-Wno-unused-variable
@@ -64,16 +59,15 @@ else()
endif()
add_compile_definitions(
SWA_IMPL
SDL_MAIN_HANDLED
_DISABLE_CONSTEXPR_MUTEX_CONSTRUCTOR # Microsoft wtf?
_CRT_SECURE_NO_WARNINGS)
set(SWA_PRECOMPILED_HEADERS
set(UNLEASHED_RECOMP_PRECOMPILED_HEADERS
"stdafx.h"
)
set(SWA_KERNEL_CXX_SOURCES
set(UNLEASHED_RECOMP_KERNEL_CXX_SOURCES
"kernel/imports.cpp"
"kernel/xdm.cpp"
"kernel/heap.cpp"
@@ -82,21 +76,13 @@ set(SWA_KERNEL_CXX_SOURCES
"kernel/io/file_system.cpp"
)
set(SWA_LOCALE_CXX_SOURCES
set(UNLEASHED_RECOMP_LOCALE_CXX_SOURCES
"locale/config_locale.cpp"
"locale/locale.cpp"
)
set(SWA_OS_CXX_SOURCES
"os/logger.cpp"
"os/media.cpp"
"os/process.cpp"
"os/user.cpp"
"os/version.cpp"
)
if (WIN32)
list(APPEND SWA_OS_CXX_SOURCES
set(UNLEASHED_RECOMP_OS_CXX_SOURCES
"os/win32/logger_win32.cpp"
"os/win32/media_win32.cpp"
"os/win32/process_win32.cpp"
@@ -104,7 +90,7 @@ if (WIN32)
"os/win32/version_win32.cpp"
)
elseif (CMAKE_SYSTEM_NAME MATCHES "Linux")
list(APPEND SWA_OS_CXX_SOURCES
set(UNLEASHED_RECOMP_OS_CXX_SOURCES
"os/linux/logger_linux.cpp"
"os/linux/media_linux.cpp"
"os/linux/process_linux.cpp"
@@ -113,11 +99,11 @@ elseif (CMAKE_SYSTEM_NAME MATCHES "Linux")
)
endif()
set(SWA_CPU_CXX_SOURCES
set(UNLEASHED_RECOMP_CPU_CXX_SOURCES
"cpu/guest_thread.cpp"
)
set(SWA_GPU_CXX_SOURCES
set(UNLEASHED_RECOMP_GPU_CXX_SOURCES
"gpu/video.cpp"
"gpu/imgui/imgui_common.cpp"
"gpu/imgui/imgui_font_builder.cpp"
@@ -125,38 +111,34 @@ set(SWA_GPU_CXX_SOURCES
"gpu/rhi/plume_vulkan.cpp"
)
if (SWA_D3D12)
list(APPEND SWA_GPU_CXX_SOURCES
if (UNLEASHED_RECOMP_D3D12)
list(APPEND UNLEASHED_RECOMP_GPU_CXX_SOURCES
"gpu/rhi/plume_d3d12.cpp"
)
endif()
set(SWA_APU_CXX_SOURCES
set(UNLEASHED_RECOMP_APU_CXX_SOURCES
"apu/audio.cpp"
"apu/embedded_player.cpp"
"apu/embedded_player.cpp"
"apu/driver/sdl2_driver.cpp"
)
if (SWA_XAUDIO2)
list(APPEND SWA_APU_CXX_SOURCES "apu/driver/xaudio_driver.cpp")
else()
list(APPEND SWA_APU_CXX_SOURCES "apu/driver/sdl2_driver.cpp")
endif()
set(SWA_HID_CXX_SOURCES
set(UNLEASHED_RECOMP_HID_CXX_SOURCES
"hid/hid.cpp"
"hid/driver/sdl_hid.cpp"
)
set(SWA_PATCHES_CXX_SOURCES
"patches/ui/CHudPause_patches.cpp"
"patches/ui/CTitleStateIntro_patches.cpp"
"patches/ui/CTitleStateMenu_patches.cpp"
"patches/ui/frontend_listener.cpp"
set(UNLEASHED_RECOMP_PATCHES_CXX_SOURCES
"patches/aspect_ratio_patches.cpp"
"patches/audio_patches.cpp"
"patches/camera_patches.cpp"
"patches/debug_patches.cpp"
"patches/CGameModeStageTitle_patches.cpp"
"patches/CHudPause_patches.cpp"
"patches/CTitleStateIntro_patches.cpp"
"patches/CTitleStateMenu_patches.cpp"
"patches/fps_patches.cpp"
"patches/frontend_listener.cpp"
"patches/input_patches.cpp"
"patches/inspire_patches.cpp"
"patches/misc_patches.cpp"
"patches/object_patches.cpp"
@@ -165,34 +147,26 @@ set(SWA_PATCHES_CXX_SOURCES
"patches/video_patches.cpp"
)
set(SWA_UI_CXX_SOURCES
"ui/reddog/windows/counter_window.cpp"
"ui/reddog/windows/exports_window.cpp"
"ui/reddog/windows/view_window.cpp"
"ui/reddog/windows/welcome_window.cpp"
"ui/reddog/windows/window_list.cpp"
"ui/reddog/reddog_controls.cpp"
"ui/reddog/reddog_manager.cpp"
"ui/reddog/reddog_window.cpp"
"ui/reddog/debug_draw.cpp"
set(UNLEASHED_RECOMP_UI_CXX_SOURCES
"ui/achievement_menu.cpp"
"ui/achievement_overlay.cpp"
"ui/installer_wizard.cpp"
"ui/achievement_overlay.cpp"
"ui/black_bar.cpp"
"ui/button_guide.cpp"
"ui/fader.cpp"
"ui/game_window.cpp"
"ui/imgui_utils.cpp"
"ui/installer_wizard.cpp"
"ui/message_window.cpp"
"ui/options_menu_thumbnails.cpp"
"ui/options_menu.cpp"
"ui/sdl_listener.cpp"
"ui/game_window.cpp"
"ui/options_menu_thumbnails.cpp"
"ui/tv_static.cpp"
)
set(SWA_INSTALL_CXX_SOURCES
set(UNLEASHED_RECOMP_INSTALL_CXX_SOURCES
"install/installer.cpp"
"install/iso_file_system.cpp"
"install/memory_mapped_file.cpp"
"install/update_checker.cpp"
"install/xcontent_file_system.cpp"
"install/xex_patcher.cpp"
"install/hashes/apotos_shamar.cpp"
"install/hashes/chunnan.cpp"
"install/hashes/empire_city_adabat.cpp"
@@ -203,97 +177,140 @@ set(SWA_INSTALL_CXX_SOURCES
"install/hashes/update.cpp"
)
set(SWA_USER_CXX_SOURCES
set(UNLEASHED_RECOMP_USER_CXX_SOURCES
"user/achievement_data.cpp"
"user/config.cpp"
"user/achievement_manager.cpp"
"user/config.cpp"
"user/registry.cpp"
"user/paths.cpp"
)
set(SWA_MOD_CXX_SOURCES
set(UNLEASHED_RECOMP_MOD_CXX_SOURCES
"mod/mod_loader.cpp"
)
set(SWA_THIRDPARTY_SOURCES
"${SWA_THIRDPARTY_ROOT}/imgui/backends/imgui_impl_sdl2.cpp"
"${SWA_THIRDPARTY_ROOT}/imgui/imgui.cpp"
"${SWA_THIRDPARTY_ROOT}/imgui/imgui_demo.cpp"
"${SWA_THIRDPARTY_ROOT}/imgui/imgui_draw.cpp"
"${SWA_THIRDPARTY_ROOT}/imgui/imgui_tables.cpp"
"${SWA_THIRDPARTY_ROOT}/imgui/imgui_widgets.cpp"
"${SWA_THIRDPARTY_ROOT}/implot/implot.cpp"
"${SWA_THIRDPARTY_ROOT}/implot/implot_demo.cpp"
"${SWA_THIRDPARTY_ROOT}/implot/implot_items.cpp"
"${SWA_THIRDPARTY_ROOT}/libmspack/libmspack/mspack/lzxd.c"
"${SWA_THIRDPARTY_ROOT}/tiny-AES-c/aes.c"
"${SWA_TOOLS_ROOT}/ShaderRecomp/thirdparty/smol-v/source/smolv.cpp"
set(UNLEASHED_RECOMP_THIRDPARTY_SOURCES
"${UNLEASHED_RECOMP_THIRDPARTY_ROOT}/imgui/backends/imgui_impl_sdl2.cpp"
"${UNLEASHED_RECOMP_THIRDPARTY_ROOT}/imgui/imgui.cpp"
"${UNLEASHED_RECOMP_THIRDPARTY_ROOT}/imgui/imgui_demo.cpp"
"${UNLEASHED_RECOMP_THIRDPARTY_ROOT}/imgui/imgui_draw.cpp"
"${UNLEASHED_RECOMP_THIRDPARTY_ROOT}/imgui/imgui_tables.cpp"
"${UNLEASHED_RECOMP_THIRDPARTY_ROOT}/imgui/imgui_widgets.cpp"
"${UNLEASHED_RECOMP_THIRDPARTY_ROOT}/implot/implot.cpp"
"${UNLEASHED_RECOMP_THIRDPARTY_ROOT}/implot/implot_demo.cpp"
"${UNLEASHED_RECOMP_THIRDPARTY_ROOT}/implot/implot_items.cpp"
"${UNLEASHED_RECOMP_TOOLS_ROOT}/XenosRecomp/thirdparty/smol-v/source/smolv.cpp"
)
set(SWA_THIRDPARTY_INCLUDES
"${SWA_THIRDPARTY_ROOT}/concurrentqueue"
"${SWA_THIRDPARTY_ROOT}/ddspp"
"${SWA_THIRDPARTY_ROOT}/imgui"
"${SWA_THIRDPARTY_ROOT}/implot"
"${SWA_THIRDPARTY_ROOT}/libmspack/libmspack/mspack"
"${SWA_THIRDPARTY_ROOT}/magic_enum/include"
"${SWA_THIRDPARTY_ROOT}/stb"
"${SWA_THIRDPARTY_ROOT}/tiny-AES-c"
"${SWA_THIRDPARTY_ROOT}/TinySHA1"
"${SWA_THIRDPARTY_ROOT}/unordered_dense/include"
"${SWA_THIRDPARTY_ROOT}/volk"
"${SWA_THIRDPARTY_ROOT}/Vulkan-Headers/include"
"${SWA_THIRDPARTY_ROOT}/VulkanMemoryAllocator/include"
"${SWA_TOOLS_ROOT}/bc_diff"
"${SWA_TOOLS_ROOT}/ShaderRecomp/thirdparty/smol-v/source"
set(UNLEASHED_RECOMP_THIRDPARTY_INCLUDES
"${UNLEASHED_RECOMP_THIRDPARTY_ROOT}/concurrentqueue"
"${UNLEASHED_RECOMP_THIRDPARTY_ROOT}/ddspp"
"${UNLEASHED_RECOMP_THIRDPARTY_ROOT}/imgui"
"${UNLEASHED_RECOMP_THIRDPARTY_ROOT}/implot"
"${UNLEASHED_RECOMP_THIRDPARTY_ROOT}/json/include"
"${UNLEASHED_RECOMP_THIRDPARTY_ROOT}/magic_enum/include"
"${UNLEASHED_RECOMP_THIRDPARTY_ROOT}/stb"
"${UNLEASHED_RECOMP_THIRDPARTY_ROOT}/unordered_dense/include"
"${UNLEASHED_RECOMP_THIRDPARTY_ROOT}/volk"
"${UNLEASHED_RECOMP_THIRDPARTY_ROOT}/Vulkan-Headers/include"
"${UNLEASHED_RECOMP_THIRDPARTY_ROOT}/VulkanMemoryAllocator/include"
"${UNLEASHED_RECOMP_TOOLS_ROOT}/bc_diff"
"${UNLEASHED_RECOMP_TOOLS_ROOT}/XenosRecomp/thirdparty/smol-v/source"
)
if (SWA_D3D12)
list(APPEND SWA_THIRDPARTY_INCLUDES "${SWA_THIRDPARTY_ROOT}/D3D12MemoryAllocator/include")
list(APPEND SWA_THIRDPARTY_SOURCES "${SWA_THIRDPARTY_ROOT}/D3D12MemoryAllocator/src/D3D12MemAlloc.cpp")
if (UNLEASHED_RECOMP_D3D12)
list(APPEND UNLEASHED_RECOMP_THIRDPARTY_INCLUDES "${UNLEASHED_RECOMP_THIRDPARTY_ROOT}/D3D12MemoryAllocator/include")
list(APPEND UNLEASHED_RECOMP_THIRDPARTY_SOURCES "${UNLEASHED_RECOMP_THIRDPARTY_ROOT}/D3D12MemoryAllocator/src/D3D12MemAlloc.cpp")
endif()
set_source_files_properties(${SWA_THIRDPARTY_SOURCES} PROPERTIES SKIP_PRECOMPILE_HEADERS ON)
set_source_files_properties(${UNLEASHED_RECOMP_THIRDPARTY_SOURCES} PROPERTIES SKIP_PRECOMPILE_HEADERS ON)
set(SWA_CXX_SOURCES
set(UNLEASHED_RECOMP_CXX_SOURCES
"app.cpp"
"exports.cpp"
"main.cpp"
"misc_impl.cpp"
"sdl_listener.cpp"
"stdafx.cpp"
"version.cpp"
${SWA_KERNEL_CXX_SOURCES}
${SWA_LOCALE_CXX_SOURCES}
${SWA_OS_CXX_SOURCES}
${SWA_CPU_CXX_SOURCES}
${SWA_GPU_CXX_SOURCES}
${SWA_APU_CXX_SOURCES}
${SWA_HID_CXX_SOURCES}
${SWA_PATCHES_CXX_SOURCES}
${SWA_UI_CXX_SOURCES}
${SWA_INSTALL_CXX_SOURCES}
${SWA_USER_CXX_SOURCES}
${SWA_MOD_CXX_SOURCES}
${SWA_THIRDPARTY_SOURCES}
)
${UNLEASHED_RECOMP_KERNEL_CXX_SOURCES}
${UNLEASHED_RECOMP_LOCALE_CXX_SOURCES}
${UNLEASHED_RECOMP_OS_CXX_SOURCES}
${UNLEASHED_RECOMP_CPU_CXX_SOURCES}
${UNLEASHED_RECOMP_GPU_CXX_SOURCES}
${UNLEASHED_RECOMP_APU_CXX_SOURCES}
${UNLEASHED_RECOMP_HID_CXX_SOURCES}
${UNLEASHED_RECOMP_PATCHES_CXX_SOURCES}
${UNLEASHED_RECOMP_UI_CXX_SOURCES}
${UNLEASHED_RECOMP_INSTALL_CXX_SOURCES}
${UNLEASHED_RECOMP_USER_CXX_SOURCES}
${UNLEASHED_RECOMP_MOD_CXX_SOURCES}
${UNLEASHED_RECOMP_THIRDPARTY_SOURCES}
)
include("version.cmake")
set(VERSION_TXT "${PROJECT_SOURCE_DIR}/res/version.txt")
# Only show Git info and build type if not Release.
set(SHOW_GIT_INFO_AND_BUILD_TYPE 0)
if (NOT ${CMAKE_BUILD_TYPE} MATCHES "Release")
set(SHOW_GIT_INFO_AND_BUILD_TYPE 1)
endif()
GenerateVersionSources(
OUTPUT_DIR ${PROJECT_SOURCE_DIR}
VERSION_TXT ${VERSION_TXT}
H_TEMPLATE "${PROJECT_SOURCE_DIR}/res/version.h.template"
CXX_TEMPLATE "${PROJECT_SOURCE_DIR}/res/version.cpp.template"
BUILD_TYPE ${CMAKE_BUILD_TYPE}
SHOW_GIT_INFO ${SHOW_GIT_INFO_AND_BUILD_TYPE}
SHOW_BUILD_TYPE ${SHOW_GIT_INFO_AND_BUILD_TYPE}
)
if (WIN32)
# Set up Win32 resources for application icon.
set(ICON_PATH "${PROJECT_SOURCE_DIR}/../UnleashedRecompResources/images/game_icon.ico")
# Create binary version number for Win32 integer attributes.
CreateVersionString(
VERSION_TXT ${VERSION_TXT}
OUTPUT_CSV 1
OUTPUT_VAR WIN32_VERSION_BINARY
)
# Create string version number for Win32 detailed attributes.
CreateVersionString(
VERSION_TXT ${VERSION_TXT}
BUILD_TYPE ${CMAKE_BUILD_TYPE}
SHOW_GIT_INFO ${SHOW_GIT_INFO_AND_BUILD_TYPE}
SHOW_BUILD_TYPE ${SHOW_GIT_INFO_AND_BUILD_TYPE}
OUTPUT_VAR WIN32_VERSION_STRING
)
# Set Win32 icon path.
set(WIN32_ICON_PATH "${PROJECT_SOURCE_DIR}/../UnleashedRecompResources/images/game_icon.ico")
configure_file("res/win32/res.rc.template" "${CMAKE_BINARY_DIR}/res.rc" @ONLY)
add_executable(UnleashedRecomp ${SWA_CXX_SOURCES} "${CMAKE_BINARY_DIR}/res.rc")
add_executable(UnleashedRecomp ${UNLEASHED_RECOMP_CXX_SOURCES} "${CMAKE_BINARY_DIR}/res.rc")
# Hide console for release configurations.
if (${CMAKE_BUILD_TYPE} MATCHES "Release")
target_link_options(UnleashedRecomp PRIVATE "/SUBSYSTEM:WINDOWS" "/ENTRY:mainCRTStartup")
endif()
else()
add_executable(UnleashedRecomp ${SWA_CXX_SOURCES})
add_executable(UnleashedRecomp ${UNLEASHED_RECOMP_CXX_SOURCES})
endif()
set_target_properties(UnleashedRecomp PROPERTIES OUTPUT_NAME ${TARGET_NAME})
if (SWA_FLATPAK)
target_compile_definitions(UnleashedRecomp PRIVATE "GAME_INSTALL_DIRECTORY=\"/var/data\"")
if (UNLEASHED_RECOMP_FLATPAK)
target_compile_definitions(UnleashedRecomp PRIVATE
"UNLEASHED_RECOMP_FLATPAK"
"GAME_INSTALL_DIRECTORY=\"/var/data\""
)
endif()
if (SWA_D3D12)
if (UNLEASHED_RECOMP_D3D12)
find_package(directx-headers CONFIG REQUIRED)
find_package(directx12-agility CONFIG REQUIRED)
target_compile_definitions(UnleashedRecomp PRIVATE SWA_D3D12)
target_compile_definitions(UnleashedRecomp PRIVATE UNLEASHED_RECOMP_D3D12)
endif()
if (CMAKE_SYSTEM_NAME MATCHES "Linux")
@@ -301,8 +318,9 @@ if (CMAKE_SYSTEM_NAME MATCHES "Linux")
endif()
find_package(directx-dxc REQUIRED)
find_package(CURL REQUIRED)
if (SWA_D3D12)
if (UNLEASHED_RECOMP_D3D12)
file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/D3D12)
add_custom_command(TARGET UnleashedRecomp POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_PROPERTY:Microsoft::DirectX12-Core,IMPORTED_LOCATION_RELEASE> ${CMAKE_CURRENT_BINARY_DIR}/D3D12
@@ -327,12 +345,14 @@ file(CHMOD ${DIRECTX_DXC_TOOL} PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE)
if (WIN32)
target_link_libraries(UnleashedRecomp PRIVATE
comctl32
ntdll
winmm
comctl32
dwmapi
ntdll
Shcore
Synchronization
winmm
)
endif()
endif()
target_link_libraries(UnleashedRecomp PRIVATE
fmt::fmt
@@ -340,18 +360,19 @@ target_link_libraries(UnleashedRecomp PRIVATE
msdf-atlas-gen::msdf-atlas-gen
nfd::nfd
o1heap
PowerUtils
XenonUtils
SDL2::SDL2-static
SDL2_mixer
tomlplusplus::tomlplusplus
UnleashedRecompLib
xxHash::xxhash
CURL::libcurl
)
target_include_directories(UnleashedRecomp PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}
"${CMAKE_CURRENT_SOURCE_DIR}/api"
${SWA_THIRDPARTY_INCLUDES}
${UNLEASHED_RECOMP_THIRDPARTY_INCLUDES}
)
if (CMAKE_SYSTEM_NAME MATCHES "Linux")
@@ -360,12 +381,12 @@ if (CMAKE_SYSTEM_NAME MATCHES "Linux")
target_link_libraries(UnleashedRecomp PRIVATE ${X11_LIBRARIES})
endif()
target_precompile_headers(UnleashedRecomp PUBLIC ${SWA_PRECOMPILED_HEADERS})
target_precompile_headers(UnleashedRecomp PUBLIC ${UNLEASHED_RECOMP_PRECOMPILED_HEADERS})
function(compile_shader FILE_PATH TARGET_NAME)
set(FILE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/gpu/shader/${FILE_PATH}.hlsl)
cmake_path(GET FILE_PATH STEM VARIABLE_NAME)
if (SWA_D3D12)
if (UNLEASHED_RECOMP_D3D12)
add_custom_command(
OUTPUT ${FILE_PATH}.dxil.h
COMMAND ${DIRECTX_DXC_TOOL} -T ${TARGET_NAME} -HV 2021 -all-resources-bound -Wno-ignored-attributes -Fh ${FILE_PATH}.dxil.h ${FILE_PATH} -Vn g_${VARIABLE_NAME}_dxil
@@ -389,7 +410,10 @@ function(compile_pixel_shader FILE_PATH)
compile_shader(${FILE_PATH} ps_6_0)
endfunction()
compile_vertex_shader(copy_vs)
compile_pixel_shader(blend_color_alpha_ps)
compile_vertex_shader(copy_vs)
compile_pixel_shader(copy_color_ps)
compile_pixel_shader(copy_depth_ps)
compile_pixel_shader(csd_filter_ps)
compile_vertex_shader(csd_no_tex_vs)
compile_vertex_shader(csd_vs)
@@ -402,7 +426,10 @@ compile_pixel_shader(gamma_correction_ps)
compile_pixel_shader(imgui_ps)
compile_vertex_shader(imgui_vs)
compile_pixel_shader(movie_ps)
compile_vertex_shader(movie_vs)
compile_vertex_shader(movie_vs)
compile_pixel_shader(resolve_msaa_color_2x)
compile_pixel_shader(resolve_msaa_color_4x)
compile_pixel_shader(resolve_msaa_color_8x)
compile_pixel_shader(resolve_msaa_depth_2x)
compile_pixel_shader(resolve_msaa_depth_4x)
compile_pixel_shader(resolve_msaa_depth_8x)
@@ -436,26 +463,10 @@ generate_aggregate_header(
"${CMAKE_CURRENT_SOURCE_DIR}/api/SWA.h"
)
# Only show build type if not Release.
set(IS_BUILD_TYPE_IN_VER_STRING 0)
if (NOT ${CMAKE_BUILD_TYPE} MATCHES "Release")
set(IS_BUILD_TYPE_IN_VER_STRING 1)
endif()
include("version.cmake")
GenerateVersionSources(
OUTPUT_DIR "${PROJECT_SOURCE_DIR}"
VERSION_TXT "${PROJECT_SOURCE_DIR}/res/version.txt"
H_TEMPLATE "${PROJECT_SOURCE_DIR}/res/version.h.template"
CXX_TEMPLATE "${PROJECT_SOURCE_DIR}/res/version.cpp.template"
BUILD_TYPE ${CMAKE_BUILD_TYPE}
IS_BUILD_TYPE_IN_VER_STRING ${IS_BUILD_TYPE_IN_VER_STRING}
IS_GIT_REPO 1
)
set(RESOURCES_SOURCE_PATH "${PROJECT_SOURCE_DIR}/../UnleashedRecompResources")
set(RESOURCES_OUTPUT_PATH "${PROJECT_SOURCE_DIR}/res")
## Miscellaneous ##
BIN2C(TARGET_OBJ UnleashedRecomp SOURCE_FILE "${RESOURCES_SOURCE_PATH}/bc_diff/button_bc_diff.bin" DEST_FILE "${RESOURCES_OUTPUT_PATH}/bc_diff/button_bc_diff.bin" ARRAY_NAME "g_button_bc_diff" COMPRESSION_TYPE "zstd")
BIN2C(TARGET_OBJ UnleashedRecomp SOURCE_FILE "${RESOURCES_SOURCE_PATH}/font/im_font_atlas.bin" DEST_FILE "${RESOURCES_OUTPUT_PATH}/font/im_font_atlas.bin" ARRAY_NAME "g_im_font_atlas" COMPRESSION_TYPE "zstd")
BIN2C(TARGET_OBJ UnleashedRecomp SOURCE_FILE "${RESOURCES_SOURCE_PATH}/font/im_font_atlas.dds" DEST_FILE "${RESOURCES_OUTPUT_PATH}/font/im_font_atlas.dds" ARRAY_NAME "g_im_font_atlas_texture" COMPRESSION_TYPE "zstd")
@@ -464,26 +475,10 @@ BIN2C(TARGET_OBJ UnleashedRecomp SOURCE_FILE "${RESOURCES_SOURCE_PATH}/images/co
BIN2C(TARGET_OBJ UnleashedRecomp SOURCE_FILE "${RESOURCES_SOURCE_PATH}/images/common/general_window.dds" DEST_FILE "${RESOURCES_OUTPUT_PATH}/images/common/general_window.dds" ARRAY_NAME "g_general_window" COMPRESSION_TYPE "zstd")
BIN2C(TARGET_OBJ UnleashedRecomp SOURCE_FILE "${RESOURCES_SOURCE_PATH}/images/common/hedge-dev.dds" DEST_FILE "${RESOURCES_OUTPUT_PATH}/images/common/hedge-dev.dds" ARRAY_NAME "g_hedgedev" COMPRESSION_TYPE "zstd")
BIN2C(TARGET_OBJ UnleashedRecomp SOURCE_FILE "${RESOURCES_SOURCE_PATH}/images/common/kbm.dds" DEST_FILE "${RESOURCES_OUTPUT_PATH}/images/common/kbm.dds" ARRAY_NAME "g_kbm" COMPRESSION_TYPE "zstd")
BIN2C(TARGET_OBJ UnleashedRecomp SOURCE_FILE "${RESOURCES_SOURCE_PATH}/images/common/select_fade.dds" DEST_FILE "${RESOURCES_OUTPUT_PATH}/images/common/select_fade.dds" ARRAY_NAME "g_select_fade" COMPRESSION_TYPE "zstd")
BIN2C(TARGET_OBJ UnleashedRecomp SOURCE_FILE "${RESOURCES_SOURCE_PATH}/images/common/select_fill.dds" DEST_FILE "${RESOURCES_OUTPUT_PATH}/images/common/select_fill.dds" ARRAY_NAME "g_select_fill" COMPRESSION_TYPE "zstd")
BIN2C(TARGET_OBJ UnleashedRecomp SOURCE_FILE "${RESOURCES_SOURCE_PATH}/images/reddog/button_close_1.dds" DEST_FILE "${RESOURCES_OUTPUT_PATH}/images/reddog/button_close_1.dds" ARRAY_NAME "g_button_close_1")
BIN2C(TARGET_OBJ UnleashedRecomp SOURCE_FILE "${RESOURCES_SOURCE_PATH}/images/reddog/button_close_2.dds" DEST_FILE "${RESOURCES_OUTPUT_PATH}/images/reddog/button_close_2.dds" ARRAY_NAME "g_button_close_2")
BIN2C(TARGET_OBJ UnleashedRecomp SOURCE_FILE "${RESOURCES_SOURCE_PATH}/images/reddog/button_minimum_1.dds" DEST_FILE "${RESOURCES_OUTPUT_PATH}/images/reddog/button_minimum_1.dds" ARRAY_NAME "g_button_minimum_1")
BIN2C(TARGET_OBJ UnleashedRecomp SOURCE_FILE "${RESOURCES_SOURCE_PATH}/images/reddog/button_minimum_2.dds" DEST_FILE "${RESOURCES_OUTPUT_PATH}/images/reddog/button_minimum_2.dds" ARRAY_NAME "g_button_minimum_2")
BIN2C(TARGET_OBJ UnleashedRecomp SOURCE_FILE "${RESOURCES_SOURCE_PATH}/images/reddog/button_pin_1.dds" DEST_FILE "${RESOURCES_OUTPUT_PATH}/images/reddog/button_pin_1.dds" ARRAY_NAME "g_button_pin_1")
BIN2C(TARGET_OBJ UnleashedRecomp SOURCE_FILE "${RESOURCES_SOURCE_PATH}/images/reddog/button_pin_2.dds" DEST_FILE "${RESOURCES_OUTPUT_PATH}/images/reddog/button_pin_2.dds" ARRAY_NAME "g_button_pin_2")
BIN2C(TARGET_OBJ UnleashedRecomp SOURCE_FILE "${RESOURCES_SOURCE_PATH}/images/reddog/checkbox_1.dds" DEST_FILE "${RESOURCES_OUTPUT_PATH}/images/reddog/checkbox_1.dds" ARRAY_NAME "g_checkbox_1")
BIN2C(TARGET_OBJ UnleashedRecomp SOURCE_FILE "${RESOURCES_SOURCE_PATH}/images/reddog/checkbox_2.dds" DEST_FILE "${RESOURCES_OUTPUT_PATH}/images/reddog/checkbox_2.dds" ARRAY_NAME "g_checkbox_2")
BIN2C(TARGET_OBJ UnleashedRecomp SOURCE_FILE "${RESOURCES_SOURCE_PATH}/images/reddog/common_button_1.dds" DEST_FILE "${RESOURCES_OUTPUT_PATH}/images/reddog/common_button_1.dds" ARRAY_NAME "g_common_button_1")
BIN2C(TARGET_OBJ UnleashedRecomp SOURCE_FILE "${RESOURCES_SOURCE_PATH}/images/reddog/common_button_2.dds" DEST_FILE "${RESOURCES_OUTPUT_PATH}/images/reddog/common_button_2.dds" ARRAY_NAME "g_common_button_2")
BIN2C(TARGET_OBJ UnleashedRecomp SOURCE_FILE "${RESOURCES_SOURCE_PATH}/images/reddog/common_icon.dds" DEST_FILE "${RESOURCES_OUTPUT_PATH}/images/reddog/common_icon.dds" ARRAY_NAME "g_common_icon")
BIN2C(TARGET_OBJ UnleashedRecomp SOURCE_FILE "${RESOURCES_SOURCE_PATH}/images/reddog/debug_icon.dds" DEST_FILE "${RESOURCES_OUTPUT_PATH}/images/reddog/debug_icon.dds" ARRAY_NAME "g_debug_icon")
BIN2C(TARGET_OBJ UnleashedRecomp SOURCE_FILE "${RESOURCES_SOURCE_PATH}/images/reddog/mouse_cursor.bmp" DEST_FILE "${RESOURCES_OUTPUT_PATH}/images/reddog/mouse_cursor.bmp" ARRAY_NAME "g_mouse_cursor")
BIN2C(TARGET_OBJ UnleashedRecomp SOURCE_FILE "${RESOURCES_SOURCE_PATH}/images/reddog/mouse_cursor_h.bmp" DEST_FILE "${RESOURCES_OUTPUT_PATH}/images/reddog/mouse_cursor_h.bmp" ARRAY_NAME "g_mouse_cursor_h")
BIN2C(TARGET_OBJ UnleashedRecomp SOURCE_FILE "${RESOURCES_SOURCE_PATH}/images/reddog/mouse_cursor_slant_l.bmp" DEST_FILE "${RESOURCES_OUTPUT_PATH}/images/reddog/mouse_cursor_slant_l.bmp" ARRAY_NAME "g_mouse_cursor_slant_l")
BIN2C(TARGET_OBJ UnleashedRecomp SOURCE_FILE "${RESOURCES_SOURCE_PATH}/images/reddog/mouse_cursor_slant_r.bmp" DEST_FILE "${RESOURCES_OUTPUT_PATH}/images/reddog/mouse_cursor_slant_r.bmp" ARRAY_NAME "g_mouse_cursor_slant_r")
BIN2C(TARGET_OBJ UnleashedRecomp SOURCE_FILE "${RESOURCES_SOURCE_PATH}/images/reddog/mouse_cursor_v.bmp" DEST_FILE "${RESOURCES_OUTPUT_PATH}/images/reddog/mouse_cursor_v.bmp" ARRAY_NAME "g_mouse_cursor_v")
BIN2C(TARGET_OBJ UnleashedRecomp SOURCE_FILE "${RESOURCES_SOURCE_PATH}/images/reddog/title_bar.dds" DEST_FILE "${RESOURCES_OUTPUT_PATH}/images/reddog/title_bar.dds" ARRAY_NAME "g_title_bar")
BIN2C(TARGET_OBJ UnleashedRecomp SOURCE_FILE "${RESOURCES_SOURCE_PATH}/images/common/select.dds" DEST_FILE "${RESOURCES_OUTPUT_PATH}/images/common/select.dds" ARRAY_NAME "g_select" COMPRESSION_TYPE "zstd")
BIN2C(TARGET_OBJ UnleashedRecomp SOURCE_FILE "${RESOURCES_SOURCE_PATH}/images/common/light.dds" DEST_FILE "${RESOURCES_OUTPUT_PATH}/images/common/light.dds" ARRAY_NAME "g_light" COMPRESSION_TYPE "zstd")
## Installer ##
BIN2C(TARGET_OBJ UnleashedRecomp SOURCE_FILE "${RESOURCES_SOURCE_PATH}/images/installer/arrow_circle.dds" DEST_FILE "${RESOURCES_OUTPUT_PATH}/images/installer/arrow_circle.dds" ARRAY_NAME "g_arrow_circle" COMPRESSION_TYPE "zstd")
BIN2C(TARGET_OBJ UnleashedRecomp SOURCE_FILE "${RESOURCES_SOURCE_PATH}/images/installer/install_001.dds" DEST_FILE "${RESOURCES_OUTPUT_PATH}/images/installer/install_001.dds" ARRAY_NAME "g_install_001" COMPRESSION_TYPE "zstd")
BIN2C(TARGET_OBJ UnleashedRecomp SOURCE_FILE "${RESOURCES_SOURCE_PATH}/images/installer/install_002.dds" DEST_FILE "${RESOURCES_OUTPUT_PATH}/images/installer/install_002.dds" ARRAY_NAME "g_install_002" COMPRESSION_TYPE "zstd")
@@ -494,15 +489,23 @@ BIN2C(TARGET_OBJ UnleashedRecomp SOURCE_FILE "${RESOURCES_SOURCE_PATH}/images/in
BIN2C(TARGET_OBJ UnleashedRecomp SOURCE_FILE "${RESOURCES_SOURCE_PATH}/images/installer/install_007.dds" DEST_FILE "${RESOURCES_OUTPUT_PATH}/images/installer/install_007.dds" ARRAY_NAME "g_install_007" COMPRESSION_TYPE "zstd")
BIN2C(TARGET_OBJ UnleashedRecomp SOURCE_FILE "${RESOURCES_SOURCE_PATH}/images/installer/install_008.dds" DEST_FILE "${RESOURCES_OUTPUT_PATH}/images/installer/install_008.dds" ARRAY_NAME "g_install_008" COMPRESSION_TYPE "zstd")
BIN2C(TARGET_OBJ UnleashedRecomp SOURCE_FILE "${RESOURCES_SOURCE_PATH}/images/installer/miles_electric_icon.dds" DEST_FILE "${RESOURCES_OUTPUT_PATH}/images/installer/miles_electric_icon.dds" ARRAY_NAME "g_miles_electric_icon" COMPRESSION_TYPE "zstd")
BIN2C(TARGET_OBJ UnleashedRecomp SOURCE_FILE "${RESOURCES_SOURCE_PATH}/images/installer/pulse_install.dds" DEST_FILE "${RESOURCES_OUTPUT_PATH}/images/installer/pulse_install.dds" ARRAY_NAME "g_pulse_install" COMPRESSION_TYPE "zstd")
BIN2C(TARGET_OBJ UnleashedRecomp SOURCE_FILE "${RESOURCES_SOURCE_PATH}/images/installer/pulse_install.dds" DEST_FILE "${RESOURCES_OUTPUT_PATH}/images/installer/pulse_install.dds" ARRAY_NAME "g_pulse_install" COMPRESSION_TYPE "zstd")
## Options Menu ##
BIN2C(TARGET_OBJ UnleashedRecomp SOURCE_FILE "${RESOURCES_SOURCE_PATH}/images/options_menu/thumbnails/achievement_notifications.dds" DEST_FILE "${RESOURCES_OUTPUT_PATH}/images/options_menu/thumbnails/achievement_notifications.dds" ARRAY_NAME "g_achievement_notifications" COMPRESSION_TYPE "zstd")
BIN2C(TARGET_OBJ UnleashedRecomp SOURCE_FILE "${RESOURCES_SOURCE_PATH}/images/options_menu/thumbnails/allow_background_input.dds" DEST_FILE "${RESOURCES_OUTPUT_PATH}/images/options_menu/thumbnails/allow_background_input.dds" ARRAY_NAME "g_allow_background_input" COMPRESSION_TYPE "zstd")
BIN2C(TARGET_OBJ UnleashedRecomp SOURCE_FILE "${RESOURCES_SOURCE_PATH}/images/options_menu/thumbnails/allow_dpad_movement.dds" DEST_FILE "${RESOURCES_OUTPUT_PATH}/images/options_menu/thumbnails/allow_dpad_movement.dds" ARRAY_NAME "g_allow_dpad_movement" COMPRESSION_TYPE "zstd")
BIN2C(TARGET_OBJ UnleashedRecomp SOURCE_FILE "${RESOURCES_SOURCE_PATH}/images/options_menu/thumbnails/antialiasing.dds" DEST_FILE "${RESOURCES_OUTPUT_PATH}/images/options_menu/thumbnails/antialiasing.dds" ARRAY_NAME "g_antialiasing" COMPRESSION_TYPE "zstd")
BIN2C(TARGET_OBJ UnleashedRecomp SOURCE_FILE "${RESOURCES_SOURCE_PATH}/images/options_menu/thumbnails/allow_background_input_ps.dds" DEST_FILE "${RESOURCES_OUTPUT_PATH}/images/options_menu/thumbnails/allow_background_input_ps.dds" ARRAY_NAME "g_allow_background_input_ps" COMPRESSION_TYPE "zstd")
BIN2C(TARGET_OBJ UnleashedRecomp SOURCE_FILE "${RESOURCES_SOURCE_PATH}/images/options_menu/thumbnails/allow_background_input_xb.dds" DEST_FILE "${RESOURCES_OUTPUT_PATH}/images/options_menu/thumbnails/allow_background_input_xb.dds" ARRAY_NAME "g_allow_background_input_xb" COMPRESSION_TYPE "zstd")
BIN2C(TARGET_OBJ UnleashedRecomp SOURCE_FILE "${RESOURCES_SOURCE_PATH}/images/options_menu/thumbnails/antialiasing_none.dds" DEST_FILE "${RESOURCES_OUTPUT_PATH}/images/options_menu/thumbnails/antialiasing_none.dds" ARRAY_NAME "g_antialiasing_none" COMPRESSION_TYPE "zstd")
BIN2C(TARGET_OBJ UnleashedRecomp SOURCE_FILE "${RESOURCES_SOURCE_PATH}/images/options_menu/thumbnails/antialiasing_2x.dds" DEST_FILE "${RESOURCES_OUTPUT_PATH}/images/options_menu/thumbnails/antialiasing_2x.dds" ARRAY_NAME "g_antialiasing_2x" COMPRESSION_TYPE "zstd")
BIN2C(TARGET_OBJ UnleashedRecomp SOURCE_FILE "${RESOURCES_SOURCE_PATH}/images/options_menu/thumbnails/antialiasing_4x.dds" DEST_FILE "${RESOURCES_OUTPUT_PATH}/images/options_menu/thumbnails/antialiasing_4x.dds" ARRAY_NAME "g_antialiasing_4x" COMPRESSION_TYPE "zstd")
BIN2C(TARGET_OBJ UnleashedRecomp SOURCE_FILE "${RESOURCES_SOURCE_PATH}/images/options_menu/thumbnails/antialiasing_8x.dds" DEST_FILE "${RESOURCES_OUTPUT_PATH}/images/options_menu/thumbnails/antialiasing_8x.dds" ARRAY_NAME "g_antialiasing_8x" COMPRESSION_TYPE "zstd")
BIN2C(TARGET_OBJ UnleashedRecomp SOURCE_FILE "${RESOURCES_SOURCE_PATH}/images/options_menu/thumbnails/aspect_ratio.dds" DEST_FILE "${RESOURCES_OUTPUT_PATH}/images/options_menu/thumbnails/aspect_ratio.dds" ARRAY_NAME "g_aspect_ratio" COMPRESSION_TYPE "zstd")
BIN2C(TARGET_OBJ UnleashedRecomp SOURCE_FILE "${RESOURCES_SOURCE_PATH}/images/options_menu/thumbnails/battle_theme.dds" DEST_FILE "${RESOURCES_OUTPUT_PATH}/images/options_menu/thumbnails/battle_theme.dds" ARRAY_NAME "g_battle_theme" COMPRESSION_TYPE "zstd")
BIN2C(TARGET_OBJ UnleashedRecomp SOURCE_FILE "${RESOURCES_SOURCE_PATH}/images/options_menu/thumbnails/brightness.dds" DEST_FILE "${RESOURCES_OUTPUT_PATH}/images/options_menu/thumbnails/brightness.dds" ARRAY_NAME "g_brightness" COMPRESSION_TYPE "zstd")
BIN2C(TARGET_OBJ UnleashedRecomp SOURCE_FILE "${RESOURCES_SOURCE_PATH}/images/options_menu/thumbnails/control_tutorial.dds" DEST_FILE "${RESOURCES_OUTPUT_PATH}/images/options_menu/thumbnails/control_tutorial.dds" ARRAY_NAME "g_control_tutorial" COMPRESSION_TYPE "zstd")
BIN2C(TARGET_OBJ UnleashedRecomp SOURCE_FILE "${RESOURCES_SOURCE_PATH}/images/options_menu/thumbnails/brightness.dds" DEST_FILE "${RESOURCES_OUTPUT_PATH}/images/options_menu/thumbnails/brightness.dds" ARRAY_NAME "g_brightness" COMPRESSION_TYPE "zstd")
BIN2C(TARGET_OBJ UnleashedRecomp SOURCE_FILE "${RESOURCES_SOURCE_PATH}/images/options_menu/thumbnails/channel_stereo.dds" DEST_FILE "${RESOURCES_OUTPUT_PATH}/images/options_menu/thumbnails/channel_stereo.dds" ARRAY_NAME "g_channel_stereo" COMPRESSION_TYPE "zstd")
BIN2C(TARGET_OBJ UnleashedRecomp SOURCE_FILE "${RESOURCES_SOURCE_PATH}/images/options_menu/thumbnails/channel_surround.dds" DEST_FILE "${RESOURCES_OUTPUT_PATH}/images/options_menu/thumbnails/channel_surround.dds" ARRAY_NAME "g_channel_surround" COMPRESSION_TYPE "zstd")
BIN2C(TARGET_OBJ UnleashedRecomp SOURCE_FILE "${RESOURCES_SOURCE_PATH}/images/options_menu/thumbnails/control_tutorial_ps.dds" DEST_FILE "${RESOURCES_OUTPUT_PATH}/images/options_menu/thumbnails/control_tutorial_ps.dds" ARRAY_NAME "g_control_tutorial_ps" COMPRESSION_TYPE "zstd")
BIN2C(TARGET_OBJ UnleashedRecomp SOURCE_FILE "${RESOURCES_SOURCE_PATH}/images/options_menu/thumbnails/control_tutorial_xb.dds" DEST_FILE "${RESOURCES_OUTPUT_PATH}/images/options_menu/thumbnails/control_tutorial_xb.dds" ARRAY_NAME "g_control_tutorial_xb" COMPRESSION_TYPE "zstd")
BIN2C(TARGET_OBJ UnleashedRecomp SOURCE_FILE "${RESOURCES_SOURCE_PATH}/images/options_menu/thumbnails/controller_icons.dds" DEST_FILE "${RESOURCES_OUTPUT_PATH}/images/options_menu/thumbnails/controller_icons.dds" ARRAY_NAME "g_controller_icons" COMPRESSION_TYPE "zstd")
BIN2C(TARGET_OBJ UnleashedRecomp SOURCE_FILE "${RESOURCES_SOURCE_PATH}/images/options_menu/thumbnails/default.dds" DEST_FILE "${RESOURCES_OUTPUT_PATH}/images/options_menu/thumbnails/default.dds" ARRAY_NAME "g_default" COMPRESSION_TYPE "zstd")
BIN2C(TARGET_OBJ UnleashedRecomp SOURCE_FILE "${RESOURCES_SOURCE_PATH}/images/options_menu/thumbnails/effects_volume.dds" DEST_FILE "${RESOURCES_OUTPUT_PATH}/images/options_menu/thumbnails/effects_volume.dds" ARRAY_NAME "g_effects_volume" COMPRESSION_TYPE "zstd")
@@ -511,44 +514,50 @@ BIN2C(TARGET_OBJ UnleashedRecomp SOURCE_FILE "${RESOURCES_SOURCE_PATH}/images/op
BIN2C(TARGET_OBJ UnleashedRecomp SOURCE_FILE "${RESOURCES_SOURCE_PATH}/images/options_menu/thumbnails/gi_texture_filtering_bilinear.dds" DEST_FILE "${RESOURCES_OUTPUT_PATH}/images/options_menu/thumbnails/gi_texture_filtering_bilinear.dds" ARRAY_NAME "g_gi_texture_filtering_bilinear" COMPRESSION_TYPE "zstd")
BIN2C(TARGET_OBJ UnleashedRecomp SOURCE_FILE "${RESOURCES_SOURCE_PATH}/images/options_menu/thumbnails/gi_texture_filtering_bicubic.dds" DEST_FILE "${RESOURCES_OUTPUT_PATH}/images/options_menu/thumbnails/gi_texture_filtering_bicubic.dds" ARRAY_NAME "g_gi_texture_filtering_bicubic" COMPRESSION_TYPE "zstd")
BIN2C(TARGET_OBJ UnleashedRecomp SOURCE_FILE "${RESOURCES_SOURCE_PATH}/images/options_menu/thumbnails/hints.dds" DEST_FILE "${RESOURCES_OUTPUT_PATH}/images/options_menu/thumbnails/hints.dds" ARRAY_NAME "g_hints" COMPRESSION_TYPE "zstd")
BIN2C(TARGET_OBJ UnleashedRecomp SOURCE_FILE "${RESOURCES_SOURCE_PATH}/images/options_menu/thumbnails/invert_camera_x.dds" DEST_FILE "${RESOURCES_OUTPUT_PATH}/images/options_menu/thumbnails/invert_camera_x.dds" ARRAY_NAME "g_invert_camera_x" COMPRESSION_TYPE "zstd")
BIN2C(TARGET_OBJ UnleashedRecomp SOURCE_FILE "${RESOURCES_SOURCE_PATH}/images/options_menu/thumbnails/invert_camera_y.dds" DEST_FILE "${RESOURCES_OUTPUT_PATH}/images/options_menu/thumbnails/invert_camera_y.dds" ARRAY_NAME "g_invert_camera_y" COMPRESSION_TYPE "zstd")
BIN2C(TARGET_OBJ UnleashedRecomp SOURCE_FILE "${RESOURCES_SOURCE_PATH}/images/options_menu/thumbnails/horizontal_camera.dds" DEST_FILE "${RESOURCES_OUTPUT_PATH}/images/options_menu/thumbnails/horizontal_camera.dds" ARRAY_NAME "g_horizontal_camera" COMPRESSION_TYPE "zstd")
BIN2C(TARGET_OBJ UnleashedRecomp SOURCE_FILE "${RESOURCES_SOURCE_PATH}/images/options_menu/thumbnails/language.dds" DEST_FILE "${RESOURCES_OUTPUT_PATH}/images/options_menu/thumbnails/language.dds" ARRAY_NAME "g_language" COMPRESSION_TYPE "zstd")
BIN2C(TARGET_OBJ UnleashedRecomp SOURCE_FILE "${RESOURCES_SOURCE_PATH}/images/options_menu/thumbnails/master_volume.dds" DEST_FILE "${RESOURCES_OUTPUT_PATH}/images/options_menu/thumbnails/master_volume.dds" ARRAY_NAME "g_master_volume" COMPRESSION_TYPE "zstd")
BIN2C(TARGET_OBJ UnleashedRecomp SOURCE_FILE "${RESOURCES_SOURCE_PATH}/images/options_menu/thumbnails/monitor.dds" DEST_FILE "${RESOURCES_OUTPUT_PATH}/images/options_menu/thumbnails/monitor.dds" ARRAY_NAME "g_monitor" COMPRESSION_TYPE "zstd")
BIN2C(TARGET_OBJ UnleashedRecomp SOURCE_FILE "${RESOURCES_SOURCE_PATH}/images/options_menu/thumbnails/motion_blur_off.dds" DEST_FILE "${RESOURCES_OUTPUT_PATH}/images/options_menu/thumbnails/motion_blur_off.dds" ARRAY_NAME "g_motion_blur_off" COMPRESSION_TYPE "zstd")
BIN2C(TARGET_OBJ UnleashedRecomp SOURCE_FILE "${RESOURCES_SOURCE_PATH}/images/options_menu/thumbnails/motion_blur_original.dds" DEST_FILE "${RESOURCES_OUTPUT_PATH}/images/options_menu/thumbnails/motion_blur_original.dds" ARRAY_NAME "g_motion_blur_original" COMPRESSION_TYPE "zstd")
BIN2C(TARGET_OBJ UnleashedRecomp SOURCE_FILE "${RESOURCES_SOURCE_PATH}/images/options_menu/thumbnails/motion_blur_enhanced.dds" DEST_FILE "${RESOURCES_OUTPUT_PATH}/images/options_menu/thumbnails/motion_blur_enhanced.dds" ARRAY_NAME "g_motion_blur_enhanced" COMPRESSION_TYPE "zstd")
BIN2C(TARGET_OBJ UnleashedRecomp SOURCE_FILE "${RESOURCES_SOURCE_PATH}/images/options_menu/thumbnails/movie_scale_mode.dds" DEST_FILE "${RESOURCES_OUTPUT_PATH}/images/options_menu/thumbnails/movie_scale_mode.dds" ARRAY_NAME "g_movie_scale_mode" COMPRESSION_TYPE "zstd")
BIN2C(TARGET_OBJ UnleashedRecomp SOURCE_FILE "${RESOURCES_SOURCE_PATH}/images/options_menu/thumbnails/movie_scale_fit.dds" DEST_FILE "${RESOURCES_OUTPUT_PATH}/images/options_menu/thumbnails/movie_scale_fit.dds" ARRAY_NAME "g_movie_scale_fit" COMPRESSION_TYPE "zstd")
BIN2C(TARGET_OBJ UnleashedRecomp SOURCE_FILE "${RESOURCES_SOURCE_PATH}/images/options_menu/thumbnails/movie_scale_fill.dds" DEST_FILE "${RESOURCES_OUTPUT_PATH}/images/options_menu/thumbnails/movie_scale_fill.dds" ARRAY_NAME "g_movie_scale_fill" COMPRESSION_TYPE "zstd")
BIN2C(TARGET_OBJ UnleashedRecomp SOURCE_FILE "${RESOURCES_SOURCE_PATH}/images/options_menu/thumbnails/music_attenuation.dds" DEST_FILE "${RESOURCES_OUTPUT_PATH}/images/options_menu/thumbnails/music_attenuation.dds" ARRAY_NAME "g_music_attenuation" COMPRESSION_TYPE "zstd")
BIN2C(TARGET_OBJ UnleashedRecomp SOURCE_FILE "${RESOURCES_SOURCE_PATH}/images/options_menu/thumbnails/music_volume.dds" DEST_FILE "${RESOURCES_OUTPUT_PATH}/images/options_menu/thumbnails/music_volume.dds" ARRAY_NAME "g_music_volume" COMPRESSION_TYPE "zstd")
BIN2C(TARGET_OBJ UnleashedRecomp SOURCE_FILE "${RESOURCES_SOURCE_PATH}/images/options_menu/thumbnails/resolution_scale.dds" DEST_FILE "${RESOURCES_OUTPUT_PATH}/images/options_menu/thumbnails/resolution_scale.dds" ARRAY_NAME "g_resolution_scale" COMPRESSION_TYPE "zstd")
BIN2C(TARGET_OBJ UnleashedRecomp SOURCE_FILE "${RESOURCES_SOURCE_PATH}/images/options_menu/thumbnails/shadow_resolution_original.dds" DEST_FILE "${RESOURCES_OUTPUT_PATH}/images/options_menu/thumbnails/shadow_resolution_original.dds" ARRAY_NAME "g_shadow_resolution_original" COMPRESSION_TYPE "zstd")
BIN2C(TARGET_OBJ UnleashedRecomp SOURCE_FILE "${RESOURCES_SOURCE_PATH}/images/options_menu/thumbnails/shadow_resolution_x512.dds" DEST_FILE "${RESOURCES_OUTPUT_PATH}/images/options_menu/thumbnails/shadow_resolution_x512.dds" ARRAY_NAME "g_shadow_resolution_x512" COMPRESSION_TYPE "zstd")
BIN2C(TARGET_OBJ UnleashedRecomp SOURCE_FILE "${RESOURCES_SOURCE_PATH}/images/options_menu/thumbnails/shadow_resolution_x1024.dds" DEST_FILE "${RESOURCES_OUTPUT_PATH}/images/options_menu/thumbnails/shadow_resolution_x1024.dds" ARRAY_NAME "g_shadow_resolution_x1024" COMPRESSION_TYPE "zstd")
BIN2C(TARGET_OBJ UnleashedRecomp SOURCE_FILE "${RESOURCES_SOURCE_PATH}/images/options_menu/thumbnails/shadow_resolution_x2048.dds" DEST_FILE "${RESOURCES_OUTPUT_PATH}/images/options_menu/thumbnails/shadow_resolution_x2048.dds" ARRAY_NAME "g_shadow_resolution_x2048" COMPRESSION_TYPE "zstd")
BIN2C(TARGET_OBJ UnleashedRecomp SOURCE_FILE "${RESOURCES_SOURCE_PATH}/images/options_menu/thumbnails/shadow_resolution_x4096.dds" DEST_FILE "${RESOURCES_OUTPUT_PATH}/images/options_menu/thumbnails/shadow_resolution_x4096.dds" ARRAY_NAME "g_shadow_resolution_x4096" COMPRESSION_TYPE "zstd")
BIN2C(TARGET_OBJ UnleashedRecomp SOURCE_FILE "${RESOURCES_SOURCE_PATH}/images/options_menu/thumbnails/shadow_resolution_x8192.dds" DEST_FILE "${RESOURCES_OUTPUT_PATH}/images/options_menu/thumbnails/shadow_resolution_x8192.dds" ARRAY_NAME "g_shadow_resolution_x8192" COMPRESSION_TYPE "zstd")
BIN2C(TARGET_OBJ UnleashedRecomp SOURCE_FILE "${RESOURCES_SOURCE_PATH}/images/options_menu/thumbnails/subtitles.dds" DEST_FILE "${RESOURCES_OUTPUT_PATH}/images/options_menu/thumbnails/subtitles.dds" ARRAY_NAME "g_subtitles" COMPRESSION_TYPE "zstd")
BIN2C(TARGET_OBJ UnleashedRecomp SOURCE_FILE "${RESOURCES_SOURCE_PATH}/images/options_menu/thumbnails/time_of_day_transition_xbox.dds" DEST_FILE "${RESOURCES_OUTPUT_PATH}/images/options_menu/thumbnails/time_of_day_transition_xbox.dds" ARRAY_NAME "g_time_of_day_transition_xbox" COMPRESSION_TYPE "zstd")
BIN2C(TARGET_OBJ UnleashedRecomp SOURCE_FILE "${RESOURCES_SOURCE_PATH}/images/options_menu/thumbnails/time_of_day_transition_playstation.dds" DEST_FILE "${RESOURCES_OUTPUT_PATH}/images/options_menu/thumbnails/time_of_day_transition_playstation.dds" ARRAY_NAME "g_time_of_day_transition_playstation" COMPRESSION_TYPE "zstd")
BIN2C(TARGET_OBJ UnleashedRecomp SOURCE_FILE "${RESOURCES_SOURCE_PATH}/images/options_menu/thumbnails/time_transition_ps.dds" DEST_FILE "${RESOURCES_OUTPUT_PATH}/images/options_menu/thumbnails/time_transition_ps.dds" ARRAY_NAME "g_time_of_day_transition_playstation" COMPRESSION_TYPE "zstd")
BIN2C(TARGET_OBJ UnleashedRecomp SOURCE_FILE "${RESOURCES_SOURCE_PATH}/images/options_menu/thumbnails/time_transition_xb.dds" DEST_FILE "${RESOURCES_OUTPUT_PATH}/images/options_menu/thumbnails/time_transition_xb.dds" ARRAY_NAME "g_time_of_day_transition_xbox" COMPRESSION_TYPE "zstd")
BIN2C(TARGET_OBJ UnleashedRecomp SOURCE_FILE "${RESOURCES_SOURCE_PATH}/images/options_menu/thumbnails/transparency_antialiasing_false.dds" DEST_FILE "${RESOURCES_OUTPUT_PATH}/images/options_menu/thumbnails/transparency_antialiasing_false.dds" ARRAY_NAME "g_transparency_antialiasing_false" COMPRESSION_TYPE "zstd")
BIN2C(TARGET_OBJ UnleashedRecomp SOURCE_FILE "${RESOURCES_SOURCE_PATH}/images/options_menu/thumbnails/transparency_antialiasing_true.dds" DEST_FILE "${RESOURCES_OUTPUT_PATH}/images/options_menu/thumbnails/transparency_antialiasing_true.dds" ARRAY_NAME "g_transparency_antialiasing_true" COMPRESSION_TYPE "zstd")
BIN2C(TARGET_OBJ UnleashedRecomp SOURCE_FILE "${RESOURCES_SOURCE_PATH}/images/options_menu/thumbnails/ui_scale_mode.dds" DEST_FILE "${RESOURCES_OUTPUT_PATH}/images/options_menu/thumbnails/ui_scale_mode.dds" ARRAY_NAME "g_ui_scale_mode" COMPRESSION_TYPE "zstd")
BIN2C(TARGET_OBJ UnleashedRecomp SOURCE_FILE "${RESOURCES_SOURCE_PATH}/images/options_menu/thumbnails/ui_alignment_centre.dds" DEST_FILE "${RESOURCES_OUTPUT_PATH}/images/options_menu/thumbnails/ui_alignment_centre.dds" ARRAY_NAME "g_ui_alignment_centre" COMPRESSION_TYPE "zstd")
BIN2C(TARGET_OBJ UnleashedRecomp SOURCE_FILE "${RESOURCES_SOURCE_PATH}/images/options_menu/thumbnails/ui_alignment_edge.dds" DEST_FILE "${RESOURCES_OUTPUT_PATH}/images/options_menu/thumbnails/ui_alignment_edge.dds" ARRAY_NAME "g_ui_alignment_edge" COMPRESSION_TYPE "zstd")
BIN2C(TARGET_OBJ UnleashedRecomp SOURCE_FILE "${RESOURCES_SOURCE_PATH}/images/options_menu/thumbnails/vertical_camera.dds" DEST_FILE "${RESOURCES_OUTPUT_PATH}/images/options_menu/thumbnails/vertical_camera.dds" ARRAY_NAME "g_vertical_camera" COMPRESSION_TYPE "zstd")
BIN2C(TARGET_OBJ UnleashedRecomp SOURCE_FILE "${RESOURCES_SOURCE_PATH}/images/options_menu/thumbnails/voice_language.dds" DEST_FILE "${RESOURCES_OUTPUT_PATH}/images/options_menu/thumbnails/voice_language.dds" ARRAY_NAME "g_voice_language" COMPRESSION_TYPE "zstd")
BIN2C(TARGET_OBJ UnleashedRecomp SOURCE_FILE "${RESOURCES_SOURCE_PATH}/images/options_menu/thumbnails/vibration.dds" DEST_FILE "${RESOURCES_OUTPUT_PATH}/images/options_menu/thumbnails/vibration.dds" ARRAY_NAME "g_vibration" COMPRESSION_TYPE "zstd")
BIN2C(TARGET_OBJ UnleashedRecomp SOURCE_FILE "${RESOURCES_SOURCE_PATH}/images/options_menu/thumbnails/vsync.dds" DEST_FILE "${RESOURCES_OUTPUT_PATH}/images/options_menu/thumbnails/vsync.dds" ARRAY_NAME "g_vsync" COMPRESSION_TYPE "zstd")
BIN2C(TARGET_OBJ UnleashedRecomp SOURCE_FILE "${RESOURCES_SOURCE_PATH}/images/options_menu/thumbnails/vibration_ps.dds" DEST_FILE "${RESOURCES_OUTPUT_PATH}/images/options_menu/thumbnails/vibration_ps.dds" ARRAY_NAME "g_vibration_ps" COMPRESSION_TYPE "zstd")
BIN2C(TARGET_OBJ UnleashedRecomp SOURCE_FILE "${RESOURCES_SOURCE_PATH}/images/options_menu/thumbnails/vibration_xb.dds" DEST_FILE "${RESOURCES_OUTPUT_PATH}/images/options_menu/thumbnails/vibration_xb.dds" ARRAY_NAME "g_vibration_xb" COMPRESSION_TYPE "zstd")
BIN2C(TARGET_OBJ UnleashedRecomp SOURCE_FILE "${RESOURCES_SOURCE_PATH}/images/options_menu/thumbnails/vsync_on.dds" DEST_FILE "${RESOURCES_OUTPUT_PATH}/images/options_menu/thumbnails/vsync_on.dds" ARRAY_NAME "g_vsync_on" COMPRESSION_TYPE "zstd")
BIN2C(TARGET_OBJ UnleashedRecomp SOURCE_FILE "${RESOURCES_SOURCE_PATH}/images/options_menu/thumbnails/vsync_off.dds" DEST_FILE "${RESOURCES_OUTPUT_PATH}/images/options_menu/thumbnails/vsync_off.dds" ARRAY_NAME "g_vsync_off" COMPRESSION_TYPE "zstd")
BIN2C(TARGET_OBJ UnleashedRecomp SOURCE_FILE "${RESOURCES_SOURCE_PATH}/images/options_menu/thumbnails/window_size.dds" DEST_FILE "${RESOURCES_OUTPUT_PATH}/images/options_menu/thumbnails/window_size.dds" ARRAY_NAME "g_window_size" COMPRESSION_TYPE "zstd")
BIN2C(TARGET_OBJ UnleashedRecomp SOURCE_FILE "${RESOURCES_SOURCE_PATH}/images/options_menu/thumbnails/xbox_color_correction_false.dds" DEST_FILE "${RESOURCES_OUTPUT_PATH}/images/options_menu/thumbnails/xbox_color_correction_false.dds" ARRAY_NAME "g_xbox_color_correction_false" COMPRESSION_TYPE "zstd")
BIN2C(TARGET_OBJ UnleashedRecomp SOURCE_FILE "${RESOURCES_SOURCE_PATH}/images/options_menu/thumbnails/xbox_color_correction_true.dds" DEST_FILE "${RESOURCES_OUTPUT_PATH}/images/options_menu/thumbnails/xbox_color_correction_true.dds" ARRAY_NAME "g_xbox_color_correction_true" COMPRESSION_TYPE "zstd")
BIN2C(TARGET_OBJ UnleashedRecomp SOURCE_FILE "${RESOURCES_SOURCE_PATH}/images/options_menu/miles_electric.dds" DEST_FILE "${RESOURCES_OUTPUT_PATH}/images/options_menu/miles_electric.dds" ARRAY_NAME "g_miles_electric" COMPRESSION_TYPE "zstd")
BIN2C(TARGET_OBJ UnleashedRecomp SOURCE_FILE "${RESOURCES_SOURCE_PATH}/images/options_menu/thumbnails/xbox_color_correction.dds" DEST_FILE "${RESOURCES_OUTPUT_PATH}/images/options_menu/thumbnails/xbox_color_correction.dds" ARRAY_NAME "g_xbox_color_correction" COMPRESSION_TYPE "zstd")
BIN2C(TARGET_OBJ UnleashedRecomp SOURCE_FILE "${RESOURCES_SOURCE_PATH}/images/options_menu/miles_electric.dds" DEST_FILE "${RESOURCES_OUTPUT_PATH}/images/options_menu/miles_electric.dds" ARRAY_NAME "g_miles_electric" COMPRESSION_TYPE "zstd")
BIN2C(TARGET_OBJ UnleashedRecomp SOURCE_FILE "${RESOURCES_SOURCE_PATH}/images/options_menu/options_static.dds" DEST_FILE "${RESOURCES_OUTPUT_PATH}/images/options_menu/options_static.dds" ARRAY_NAME "g_options_static" COMPRESSION_TYPE "zstd")
BIN2C(TARGET_OBJ UnleashedRecomp SOURCE_FILE "${RESOURCES_SOURCE_PATH}/images/options_menu/options_static_flash.dds" DEST_FILE "${RESOURCES_OUTPUT_PATH}/images/options_menu/options_static_flash.dds" ARRAY_NAME "g_options_static_flash" COMPRESSION_TYPE "zstd")
## Game Icon ##
BIN2C(TARGET_OBJ UnleashedRecomp SOURCE_FILE "${RESOURCES_SOURCE_PATH}/images/game_icon.bmp" DEST_FILE "${RESOURCES_OUTPUT_PATH}/images/game_icon.bmp" ARRAY_NAME "g_game_icon")
BIN2C(TARGET_OBJ UnleashedRecomp SOURCE_FILE "${RESOURCES_SOURCE_PATH}/images/game_icon_night.bmp" DEST_FILE "${RESOURCES_OUTPUT_PATH}/images/game_icon_night.bmp" ARRAY_NAME "g_game_icon_night")
BIN2C(TARGET_OBJ UnleashedRecomp SOURCE_FILE "${RESOURCES_SOURCE_PATH}/images/game_icon_night.bmp" DEST_FILE "${RESOURCES_OUTPUT_PATH}/images/game_icon_night.bmp" ARRAY_NAME "g_game_icon_night")
## Audio ##
BIN2C(TARGET_OBJ UnleashedRecomp SOURCE_FILE "${RESOURCES_SOURCE_PATH}/music/installer.ogg" DEST_FILE "${RESOURCES_OUTPUT_PATH}/music/installer.ogg" ARRAY_NAME "g_installer_music")
BIN2C(TARGET_OBJ UnleashedRecomp SOURCE_FILE "${RESOURCES_SOURCE_PATH}/sounds/sys_worldmap_cursor.ogg" DEST_FILE "${RESOURCES_OUTPUT_PATH}/sounds/sys_worldmap_cursor.ogg" ARRAY_NAME "g_sys_worldmap_cursor")
BIN2C(TARGET_OBJ UnleashedRecomp SOURCE_FILE "${RESOURCES_SOURCE_PATH}/sounds/sys_worldmap_finaldecide.ogg" DEST_FILE "${RESOURCES_OUTPUT_PATH}/sounds/sys_worldmap_finaldecide.ogg" ARRAY_NAME "g_sys_worldmap_finaldecide")
BIN2C(TARGET_OBJ UnleashedRecomp SOURCE_FILE "${RESOURCES_SOURCE_PATH}/sounds/sys_actstg_pausecansel.ogg" DEST_FILE "${RESOURCES_OUTPUT_PATH}/sounds/sys_actstg_pausecansel.ogg" ARRAY_NAME "g_sys_actstg_pausecansel")
BIN2C(TARGET_OBJ UnleashedRecomp SOURCE_FILE "${RESOURCES_SOURCE_PATH}/sounds/sys_actstg_pausecursor.ogg" DEST_FILE "${RESOURCES_OUTPUT_PATH}/sounds/sys_actstg_pausecursor.ogg" ARRAY_NAME "g_sys_actstg_pausecursor")
BIN2C(TARGET_OBJ UnleashedRecomp SOURCE_FILE "${RESOURCES_SOURCE_PATH}/sounds/sys_actstg_pausedecide.ogg" DEST_FILE "${RESOURCES_OUTPUT_PATH}/sounds/sys_actstg_pausedecide.ogg" ARRAY_NAME "g_sys_actstg_pausedecide")
BIN2C(TARGET_OBJ UnleashedRecomp SOURCE_FILE "${RESOURCES_SOURCE_PATH}/sounds/sys_actstg_pausewinclose.ogg" DEST_FILE "${RESOURCES_OUTPUT_PATH}/sounds/sys_actstg_pausewinclose.ogg" ARRAY_NAME "g_sys_actstg_pausewinclose")
BIN2C(TARGET_OBJ UnleashedRecomp SOURCE_FILE "${RESOURCES_SOURCE_PATH}/sounds/sys_actstg_pausewinopen.ogg" DEST_FILE "${RESOURCES_OUTPUT_PATH}/sounds/sys_actstg_pausewinopen.ogg" ARRAY_NAME "g_sys_actstg_pausewinopen")
BIN2C(TARGET_OBJ UnleashedRecomp SOURCE_FILE "${RESOURCES_SOURCE_PATH}/sounds/sys_actstg_pausewinopen.ogg" DEST_FILE "${RESOURCES_OUTPUT_PATH}/sounds/sys_actstg_pausewinopen.ogg" ARRAY_NAME "g_sys_actstg_pausewinopen")

View File

@@ -9,41 +9,41 @@ namespace Chao::CSD
inline void CNode::SetText(const char* in_pText)
{
GuestToHostFunction<int>(0x830BF640, this, in_pText);
GuestToHostFunction<int>(sub_830BF640, this, in_pText);
}
inline void CNode::SetText(const wchar_t* in_pText)
{
GuestToHostFunction<int>(0x830BF640, this, in_pText);
GuestToHostFunction<int>(sub_830BF640, this, in_pText);
}
inline void CNode::GetPosition(Hedgehog::Math::CVector2& out_rResult) const
{
GuestToHostFunction<void>(0x830BF008, &out_rResult, this);
GuestToHostFunction<void>(sub_830BF008, &out_rResult, this);
}
inline void CNode::SetPosition(float in_X, float in_Y)
{
GuestToHostFunction<int>(0x830BF078, this, in_X, in_Y);
GuestToHostFunction<int>(sub_830BF078, this, in_X, in_Y);
}
inline void CNode::SetHideFlag(uint32_t in_HideFlag)
{
GuestToHostFunction<int>(0x830BF080, this, in_HideFlag);
GuestToHostFunction<int>(sub_830BF080, this, in_HideFlag);
}
inline void CNode::SetRotation(float in_Rotation)
{
GuestToHostFunction<int>(0x830BF088, this, in_Rotation);
GuestToHostFunction<int>(sub_830BF088, this, in_Rotation);
}
inline void CNode::SetScale(float in_X, float in_Y)
{
GuestToHostFunction<int>(0x830BF090, this, in_X, in_Y);
GuestToHostFunction<int>(sub_830BF090, this, in_X, in_Y);
}
inline void CNode::SetPatternIndex(uint32_t in_PatternIndex)
{
GuestToHostFunction<int>(0x830BF300, this, in_PatternIndex);
GuestToHostFunction<int>(sub_830BF300, this, in_PatternIndex);
}
}

View File

@@ -5,20 +5,20 @@ namespace Chao::CSD
inline RCPtr<CScene> CProject::CreateScene(const char* in_pName) const
{
RCPtr<CScene> rcScene;
GuestToHostFunction<void>(0x830BEE00, this, rcScene, in_pName, nullptr);
GuestToHostFunction<void>(sub_830BEE00, this, rcScene, in_pName, nullptr);
return rcScene;
}
inline RCPtr<CScene> CProject::CreateScene(const char* in_pName, const char* in_pMotionName) const
{
RCPtr<CScene> rcScene;
GuestToHostFunction<void>(0x830BECE0, this, rcScene, in_pName, in_pMotionName, nullptr);
GuestToHostFunction<void>(sub_830BECE0, this, rcScene, in_pName, in_pMotionName, nullptr);
return rcScene;
}
inline void CProject::DestroyScene(CScene* in_pScene)
{
GuestToHostFunction<void>(0x830BE298, this, in_pScene);
GuestToHostFunction<void>(sub_830BE298, this, in_pScene);
}
inline void CProject::DestroyScene(RCPtr<CScene>& inout_rcScene)

View File

@@ -30,6 +30,6 @@ namespace Chao::CSD
inline void RCPtrAbs::RCObject::Release()
{
GuestToHostFunction<void>(0x830BA068, this);
GuestToHostFunction<void>(sub_830BA068, this);
}
}

View File

@@ -27,12 +27,12 @@ namespace Chao::CSD
inline void RCPtrAbs::AttachAbs(void* in_pMemory)
{
GuestToHostFunction<void>(0x830BA298, this, in_pMemory);
GuestToHostFunction<void>(sub_830BA298, this, in_pMemory);
}
inline void RCPtrAbs::SetAbs(const RCPtrAbs& in_rPtr)
{
GuestToHostFunction<void>(0x830BA328, this, in_rPtr);
GuestToHostFunction<void>(sub_830BA328, this, in_rPtr);
}
inline void* RCPtrAbs::operator*() const

View File

@@ -22,7 +22,7 @@ namespace Chao::CSD
inline bool CScene::SetMotion(const char* in_pName)
{
return GuestToHostFunction<bool>(0x830BA760, this, in_pName);
return GuestToHostFunction<bool>(sub_830BA760, this, in_pName);
}
inline void CScene::SetMotionFrame(float in_MotionFrame)
@@ -33,21 +33,21 @@ namespace Chao::CSD
inline void CScene::SetPosition(float in_X, float in_Y)
{
GuestToHostFunction<void>(0x830BB550, this, in_X, in_Y);
GuestToHostFunction<void>(sub_830BB550, this, in_X, in_Y);
}
inline void CScene::SetHideFlag(uint32_t in_HideFlag)
{
GuestToHostFunction<void>(0x830BB378, this, in_HideFlag);
GuestToHostFunction<void>(sub_830BB378, this, in_HideFlag);
}
inline void CScene::SetRotation(float in_Angle)
{
GuestToHostFunction<void>(0x830BB5F8, this, in_Angle);
GuestToHostFunction<void>(sub_830BB5F8, this, in_Angle);
}
inline void CScene::SetScale(float in_X, float in_Y)
{
GuestToHostFunction<void>(0x830BB650, this, in_X, in_Y);
GuestToHostFunction<void>(sub_830BB650, this, in_X, in_Y);
}
}

View File

@@ -1,19 +0,0 @@
#pragma once
#include <SWA.inl>
namespace Hedgehog::Math
{
class CAabb // Eigen::AlignedBox3f
{
public:
Hedgehog::Math::CVector min;
Hedgehog::Math::CVector max;
CVector Center() const;
};
SWA_ASSERT_SIZEOF(CAabb, 0x18);
}
#include "Aabb.inl"

View File

@@ -1,12 +0,0 @@
namespace Hedgehog::Math
{
inline CVector Hedgehog::Math::CAabb::Center() const
{
// return (min + max) / 2;
Hedgehog::Math::CVector result;
result.X = (max.X + min.X) * 0.5f;
result.Y = (max.Y + min.Y) * 0.5f;
result.Z = 0.5f * (max.Z + min.Z);
return result;
}
}

View File

@@ -7,15 +7,21 @@ namespace Hedgehog::Math
class CMatrix
{
public:
be<float> data[16]; // Eigen::Affine3f
be<float> m_M00;
be<float> m_M01;
be<float> m_M02;
be<float> m_M03;
be<float> m_M10;
be<float> m_M11;
be<float> m_M12;
be<float> m_M13;
be<float> m_M20;
be<float> m_M21;
be<float> m_M22;
be<float> m_M23;
be<float> m_M30;
be<float> m_M31;
be<float> m_M32;
be<float> m_M33;
};
class CMatrix44
{
public:
be<float> data[16]; // Eigen::Matrix4f
};
SWA_ASSERT_SIZEOF(CMatrix, 0x40);
SWA_ASSERT_SIZEOF(CMatrix44, 0x40);
}

View File

@@ -4,7 +4,7 @@
namespace Hedgehog::Math
{
class CQuaternion //Eigen::Quaternionf;
class CQuaternion
{
public:
be<float> X;
@@ -12,6 +12,4 @@ namespace Hedgehog::Math
be<float> Z;
be<float> W;
};
SWA_ASSERT_SIZEOF(CQuaternion, 0x10);
}

View File

@@ -17,6 +17,7 @@ namespace Hedgehog::Math
be<float> X;
be<float> Y;
be<float> Z;
be<float> W;
};
class CVector4
@@ -28,5 +29,3 @@ namespace Hedgehog::Math
be<float> W;
};
}
#include "Vector.inl"

View File

@@ -1,4 +0,0 @@
namespace Hedgehog::Math
{
}

View File

@@ -1,18 +0,0 @@
#pragma once
#include <SWA.inl>
namespace Hedgehog::Mirage
{
class CCamera : Base::CObject
{
public:
Math::CMatrix m_View;
Math::CMatrix44 m_Projection;
Math::CVector m_Position;
Math::CVector m_Direction;
be<float> m_AspectRatio;
be<float> m_Near;
be<float> m_Far;
};
}

View File

@@ -0,0 +1,16 @@
#pragma once
#include <SWA.inl>
namespace Hedgehog::Mirage
{
class CMatrixNodeListener;
class CMatrixNode : public Base::CObject
{
public:
SWA_INSERT_PADDING(0x60);
};
SWA_ASSERT_SIZEOF(CMatrixNode, 0x60);
}

View File

@@ -0,0 +1,19 @@
#pragma once
#include <SWA.inl>
namespace Hedgehog::Mirage
{
class CTransform
{
public:
Math::CQuaternion m_Rotation;
Math::CVector m_Position;
Math::CMatrix m_Matrix;
};
SWA_ASSERT_OFFSETOF(CTransform, m_Rotation, 0x00);
SWA_ASSERT_OFFSETOF(CTransform, m_Position, 0x10);
SWA_ASSERT_OFFSETOF(CTransform, m_Matrix, 0x20);
SWA_ASSERT_SIZEOF(CTransform, 0x60);
}

View File

@@ -0,0 +1,32 @@
#pragma once
#include <SWA.inl>
#include <Hedgehog/Base/hhObject.h>
#include <Hedgehog/Universe/Engine/hhMessageProcess.h>
#include <Hedgehog/Universe/Engine/hhStateMachineMessageReceiver.h>
namespace Hedgehog::Universe
{
class CStateMachineBase : public IStateMachineMessageReceiver, public Base::CObject
{
public:
class CStateBase : public IMessageProcess
{
public:
SWA_INSERT_PADDING(0x08);
xpointer<void> m_pContext;
xpointer<CStateMachineBase> m_pStateMachine;
be<float> m_Time;
SWA_INSERT_PADDING(0x4C);
void* GetContextBase() const;
template<typename T>
T* GetContextBase() const;
};
SWA_INSERT_PADDING(0x60);
};
}
#include <Hedgehog/Universe/Engine/hhStateMachineBase.inl>

View File

@@ -0,0 +1,13 @@
namespace Hedgehog::Universe
{
inline void* CStateMachineBase::CStateBase::GetContextBase() const
{
return m_pContext;
}
template<typename T>
inline T* CStateMachineBase::CStateBase::GetContextBase() const
{
return (T*)m_pContext.get();
}
}

View File

@@ -0,0 +1,12 @@
#pragma once
#include <SWA.inl>
namespace Hedgehog::Universe
{
class IStateMachineMessageReceiver
{
public:
IStateMachineMessageReceiver(const swa_null_ctor&) {}
};
}

View File

@@ -27,11 +27,11 @@
#include "Hedgehog/Base/Type/hhSharedString.h"
#include "Hedgehog/Base/hhObject.h"
#include "Hedgehog/Database/System/hhDatabaseData.h"
#include "Hedgehog/Math/Aabb.h"
#include "Hedgehog/Math/Matrix.h"
#include "Hedgehog/Math/Quaternion.h"
#include "Hedgehog/Math/Vector.h"
#include "Hedgehog/MirageCore/Camera/hhCamera.h"
#include "Hedgehog/MirageCore/MatrixNode/hhMatrixNode.h"
#include "Hedgehog/MirageCore/Misc/hhTransform.h"
#include "Hedgehog/MirageCore/Misc/hhVertexDeclarationPtr.h"
#include "Hedgehog/MirageCore/RenderData/hhMaterialData.h"
#include "Hedgehog/MirageCore/RenderData/hhMeshData.h"
@@ -51,16 +51,26 @@
#include "Hedgehog/Sparkle/hhParticleMaterial.h"
#include "Hedgehog/Universe/Engine/hhMessageActor.h"
#include "Hedgehog/Universe/Engine/hhMessageProcess.h"
#include "Hedgehog/Universe/Engine/hhStateMachineBase.h"
#include "Hedgehog/Universe/Engine/hhStateMachineMessageReceiver.h"
#include "Hedgehog/Universe/Engine/hhUpdateInfo.h"
#include "Hedgehog/Universe/Engine/hhUpdateUnit.h"
#include "Hedgehog/Universe/Thread/hhParallelJob.h"
#include "SWA/Achievement/AchievementID.h"
#include "SWA/Achievement/AchievementManager.h"
#include "SWA/Achievement/AchievementTest.h"
#include "SWA/Boss/EggDragoon/Object/BossEggDragoonDrillMissile.h"
#include "SWA/CSD/CsdDatabaseWrapper.h"
#include "SWA/CSD/CsdProject.h"
#include "SWA/CSD/CsdTexListMirage.h"
#include "SWA/CSD/GameObjectCSD.h"
#include "SWA/Camera/Camera.h"
#include "SWA/Camera/CameraController.h"
#include "SWA/CharacterUtility/CharacterProxy.h"
#include "SWA/ExtraStage/Tails/Enemy/Boss/ExStageBoss.h"
#include "SWA/ExtraStage/Tails/Enemy/Boss/State/StateBase.h"
#include "SWA/ExtraStage/Tails/Enemy/Boss/State/StateBattle.h"
#include "SWA/ExtraStage/Tails/Player/ExPlayerTails.h"
#include "SWA/Globals.h"
#include "SWA/HUD/GeneralWindow/GeneralWindow.h"
#include "SWA/HUD/Loading/Loading.h"
@@ -76,10 +86,12 @@
#include "SWA/Inspire/InspireTextureAnimationInfo.h"
#include "SWA/Inspire/InspireTextureOverlay.h"
#include "SWA/Inspire/InspireTextureOverlayInfo.h"
#include "SWA/Menu/MenuWindowBase.h"
#include "SWA/Message/MsgRequestHelp.h"
#include "SWA/Movie/MovieDisplayer.h"
#include "SWA/Movie/MovieManager.h"
#include "SWA/Path/PathController.h"
#include "SWA/Path/Animation/PathAnimation.h"
#include "SWA/Object/Common/DashPanel/ObjDashPanel.h"
#include "SWA/Object/SonicStage/EU/RollingBarrel/ObjRollingBarrel.h"
#include "SWA/Player/Character/EvilSonic/EvilSonic.h"
#include "SWA/Player/Character/EvilSonic/EvilSonicContext.h"
#include "SWA/Player/Character/EvilSonic/Hud/EvilHudGuide.h"
@@ -98,14 +110,20 @@
#include "SWA/System/GameMode/GameMode.h"
#include "SWA/System/GameMode/GameModeStage.h"
#include "SWA/System/GameMode/GameModeStageMovie.h"
#include "SWA/System/GameMode/GameModeStageTitle.h"
#include "SWA/System/GameMode/Title/TitleMenu.h"
#include "SWA/System/GameMode/Title/TitleStateBase.h"
#include "SWA/System/GameMode/Title/TitleStateIntro.h"
#include "SWA/System/GameMode/Title/TitleStateMenu.h"
#include "SWA/System/GameMode/Title/TitleStateWorldMap.h"
#include "SWA/System/GameMode/WorldMap/WorldMapCamera.h"
#include "SWA/System/GameMode/WorldMap/WorldMapCursor.h"
#include "SWA/System/GameObject.h"
#include "SWA/System/GameParameter.h"
#include "SWA/System/GammaController.h"
#include "SWA/System/InputState.h"
#include "SWA/System/MatrixNodeTransform.h"
#include "SWA/System/PadState.h"
#include "SWA/System/StageManager.h"
#include "SWA/System/World.h"
#include "boost/smart_ptr/make_shared_object.h"
#include "boost/smart_ptr/shared_ptr.h"

View File

@@ -0,0 +1,55 @@
#pragma once
enum EAchievementID : uint32_t
{
eAchievementID_StillBroken = 24,
eAchievementID_LookingBetter,
eAchievementID_StillAJigsawPuzzle,
eAchievementID_PickingUpThePieces,
eAchievementID_AlmostThere,
eAchievementID_OneMoreToGo,
eAchievementID_WorldSavior = 31,
eAchievementID_PartlyCloudy,
eAchievementID_Sunny,
eAchievementID_HalfMoon,
eAchievementID_FullMoon,
eAchievementID_BlueStreak,
eAchievementID_PowerOverwhelming,
eAchievementID_GettingTheHangOfThings,
eAchievementID_CreatureOfTheNight,
eAchievementID_HelpingHand,
eAchievementID_LayTheSmackdown,
eAchievementID_WallCrawler,
eAchievementID_Airdevil,
eAchievementID_Hyperdrive,
eAchievementID_Basher,
eAchievementID_Smasher,
eAchievementID_Crasher,
eAchievementID_Thrasher,
eAchievementID_SocialButterfly,
eAchievementID_HungryHungryHedgehog,
eAchievementID_AcePilot,
eAchievementID_DayTripper,
eAchievementID_HardDaysNight,
eAchievementID_GetOnTheExorciseBandwagon,
eAchievementID_GyroWithRelish = 64,
eAchievementID_PigInABlanket,
eAchievementID_ExoticToppings,
eAchievementID_SausageFriedRice,
eAchievementID_IcedHotdog,
eAchievementID_KebabOnABun,
eAchievementID_KetchupAndMustard,
eAchievementID_HardBoiled,
eAchievementID_FriedClamRoll,
eAchievementID_FirstTimeCustomer,
eAchievementID_OhYouShouldntHave,
eAchievementID_ThatsEnoughSeriously,
eAchievementID_Hedgehunk,
eAchievementID_IAintAfraidOfNoGhost,
eAchievementID_BFFs,
eAchievementID_SpeedingTicket,
eAchievementID_ComboKing,
eAchievementID_RingLeader,
eAchievementID_KnockoutBrawler,
eAchievementID_BlueMeteor
};

View File

@@ -1,6 +1,7 @@
#pragma once
#include <SWA.inl>
#include <SWA/Achievement/AchievementID.h>
namespace SWA::Achievement
{
@@ -11,7 +12,7 @@ namespace SWA::Achievement
{
public:
SWA_INSERT_PADDING(0x08);
be<uint32_t> m_AchievementID;
be<EAchievementID> m_AchievementID;
};
SWA_INSERT_PADDING(0x98);

View File

@@ -1,6 +1,7 @@
#pragma once
#include <SWA.inl>
#include <SWA/Achievement/AchievementID.h>
namespace SWA
{
@@ -9,7 +10,7 @@ namespace SWA
public:
SWA_INSERT_PADDING(0x38);
be<uint32_t> m_Unk1;
be<uint32_t> m_AchievementID;
be<EAchievementID> m_AchievementID;
uint8_t m_Unk2;
};
}

View File

@@ -0,0 +1,16 @@
#pragma once
#include <SWA.inl>
#include "SWA/System/MatrixNodeTransform.h"
namespace SWA::Boss::EggDragoon::DrillMissile
{
class CMissile
{
public:
SWA_INSERT_PADDING(0xC4);
xpointer<CMatrixNodeTransform> m_pMatrixNodeTransform;
SWA_INSERT_PADDING(0x68);
be<float> m_Speed;
};
}

View File

@@ -3,7 +3,7 @@ namespace SWA
inline boost::shared_ptr<CCsdProject> CCsdDatabaseWrapper::GetCsdProject(const Hedgehog::Base::CSharedString& in_rName)
{
boost::shared_ptr<CCsdProject> spCsdProject;
GuestToHostFunction<void>(0x825E2B40, &in_rName, this, &spCsdProject, 0);
GuestToHostFunction<void>(sub_825E2B40, &in_rName, this, &spCsdProject, 0);
return spCsdProject;
}
}

View File

@@ -9,8 +9,7 @@ namespace SWA
{
public:
xpointer<void> m_pVftable;
// SWA::CCamera::MyCamera
SWA_INSERT_PADDING(0xC4);
SWA_INSERT_PADDING(0xC4);
be<float> m_VertAspectRatio;
SWA_INSERT_PADDING(0x48);
be<float> m_HorzAspectRatio;

View File

@@ -0,0 +1,17 @@
#pragma once
#include <SWA.inl>
namespace SWA
{
class CCameraController : public Hedgehog::Universe::CStateMachineBase::CStateBase
{
public:
SWA_INSERT_PADDING(0x04);
be<float> m_FieldOfView;
SWA_INSERT_PADDING(0x68);
};
SWA_ASSERT_OFFSETOF(CCameraController, m_FieldOfView, 0x64);
SWA_ASSERT_SIZEOF(CCameraController, 0xD0);
}

View File

@@ -0,0 +1,14 @@
#pragma once
#include <Hedgehog/Math/Vector.h>
namespace SWA
{
class CCharacterProxy
{
public:
SWA_INSERT_PADDING(0x120);
Hedgehog::Math::CVector m_Position;
Hedgehog::Math::CVector m_Velocity;
};
}

View File

@@ -0,0 +1,36 @@
#pragma once
#include <SWA.inl>
namespace SWA
{
class CExStageBoss
{
public:
class CStateBase;
class CStateBattle;
class CExStageBossStateContext
{
public:
SWA_INSERT_PADDING(0x14C);
be<float> m_SplineProgress;
SWA_INSERT_PADDING(0x0C);
be<float> m_SplineSpeed;
SWA_INSERT_PADDING(0x28);
be<float> m_Field188;
be<float> m_Field18C;
SWA_INSERT_PADDING(0x21);
bool m_IsBattleStart;
SWA_INSERT_PADDING(0x36E);
be<float> m_Field520;
};
};
SWA_ASSERT_OFFSETOF(CExStageBoss::CExStageBossStateContext, m_SplineProgress, 0x14C);
SWA_ASSERT_OFFSETOF(CExStageBoss::CExStageBossStateContext, m_SplineSpeed, 0x15C);
SWA_ASSERT_OFFSETOF(CExStageBoss::CExStageBossStateContext, m_Field188, 0x188);
SWA_ASSERT_OFFSETOF(CExStageBoss::CExStageBossStateContext, m_Field18C, 0x18C);
SWA_ASSERT_OFFSETOF(CExStageBoss::CExStageBossStateContext, m_IsBattleStart, 0x1B1);
SWA_ASSERT_OFFSETOF(CExStageBoss::CExStageBossStateContext, m_Field520, 0x520);
}

View File

@@ -0,0 +1,9 @@
#pragma once
#include <SWA.inl>
#include "SWA/ExtraStage/Tails/Enemy/Boss/ExStageBoss.h"
namespace SWA
{
class CExStageBoss::CStateBase : public Hedgehog::Universe::CStateMachineBase::CStateBase {};
}

View File

@@ -0,0 +1,18 @@
#pragma once
#include <SWA.inl>
#include "SWA/ExtraStage/Tails/Enemy/Boss/ExStageBoss.h"
namespace SWA
{
class CExStageBoss::CStateBattle : public CExStageBoss::CStateBase
{
public:
SWA_INSERT_PADDING(0x08);
be<float> m_Field68;
be<float> m_FramesSinceLastMissile;
};
SWA_ASSERT_OFFSETOF(CExStageBoss::CStateBattle, m_Field68, 0x68);
SWA_ASSERT_OFFSETOF(CExStageBoss::CStateBattle, m_FramesSinceLastMissile, 0x6C);
}

View File

@@ -0,0 +1,35 @@
#pragma once
#include <SWA.inl>
namespace SWA
{
class CExPlayerTails
{
public:
class CExPlayerTailsStateContext
{
public:
SWA_INSERT_PADDING(0x1F8);
be<float> m_SplineBossStart;
be<float> m_SplineEnd;
SWA_INSERT_PADDING(0x30);
be<float> m_SplineProgress;
SWA_INSERT_PADDING(0x10);
xpointer<void> m_Field244;
SWA_INSERT_PADDING(0x18);
be<float> m_SplineSpeed;
SWA_INSERT_PADDING(0x0C);
be<uint32_t> m_State; // 0 - Intro; 1 - Boss Intro; 3 - Boss
};
class CStateBase : public Hedgehog::Universe::CStateMachineBase::CStateBase {};
};
SWA_ASSERT_OFFSETOF(CExPlayerTails::CExPlayerTailsStateContext, m_SplineBossStart, 0x1F8);
SWA_ASSERT_OFFSETOF(CExPlayerTails::CExPlayerTailsStateContext, m_SplineEnd, 0x1FC);
SWA_ASSERT_OFFSETOF(CExPlayerTails::CExPlayerTailsStateContext, m_SplineProgress, 0x230);
SWA_ASSERT_OFFSETOF(CExPlayerTails::CExPlayerTailsStateContext, m_Field244, 0x244);
SWA_ASSERT_OFFSETOF(CExPlayerTails::CExPlayerTailsStateContext, m_SplineSpeed, 0x260);
SWA_ASSERT_OFFSETOF(CExPlayerTails::CExPlayerTailsStateContext, m_State, 0x270);
}

View File

@@ -9,6 +9,9 @@ namespace SWA
// ms_DrawLightFieldSamplingPoint: サンプリング点をデバッグ表示
static inline bool* ms_DrawLightFieldSamplingPoint;
// N/A
static inline bool* ms_IsAutoSaveWarningShown;
// ms_IgnoreLightFieldData: データを無視する
static inline bool* ms_IgnoreLightFieldData;
@@ -39,6 +42,9 @@ namespace SWA
// ms_IsRenderHudPause: ポーズメニュー 描画
static inline bool* ms_IsRenderHudPause;
// N/A
static inline bool* ms_IsTitleStateMenu;
// IsTriggerRender
static inline bool* ms_IsTriggerRender;
@@ -52,6 +58,7 @@ namespace SWA
{
ms_DrawLightFieldSamplingPoint = (bool*)MmGetHostAddress(0x83367BCE);
ms_IgnoreLightFieldData = (bool*)MmGetHostAddress(0x83367BCF);
ms_IsAutoSaveWarningShown = (bool*)MmGetHostAddress(0x83367BC1);
ms_IsCollisionRender = (bool*)MmGetHostAddress(0x833678A6);
ms_IsLoading = (bool*)MmGetHostAddress(0x83367A4C);
ms_IsObjectCollisionRender = (bool*)MmGetHostAddress(0x83367905);
@@ -61,6 +68,7 @@ namespace SWA
ms_IsRenderGameMainHud = (bool*)MmGetHostAddress(0x8328BB27);
ms_IsRenderHud = (bool*)MmGetHostAddress(0x8328BB26);
ms_IsRenderHudPause = (bool*)MmGetHostAddress(0x8328BB28);
ms_IsTitleStateMenu = (bool*)MmGetHostAddress(0x83367BC0);
ms_IsTriggerRender = (bool*)MmGetHostAddress(0x83367904);
ms_LightFieldDebug = (bool*)MmGetHostAddress(0x83367BCD);
ms_VisualizeLoadedLevel = (bool*)MmGetHostAddress(0x833678C1);

View File

@@ -4,6 +4,15 @@
namespace SWA
{
enum EWindowStatus : uint32_t
{
eWindowStatus_Closed,
eWindowStatus_OpeningMessage = 2,
eWindowStatus_DisplayingMessage,
eWindowStatus_OpeningControls,
eWindowStatus_DisplayingControls
};
class CGeneralWindow
{
public:
@@ -14,5 +23,20 @@ namespace SWA
Chao::CSD::RCPtr<Chao::CSD::CScene> m_rcWindow_2;
Chao::CSD::RCPtr<Chao::CSD::CScene> m_rcWindowSelect;
Chao::CSD::RCPtr<Chao::CSD::CScene> m_rcFooter;
SWA_INSERT_PADDING(0x58);
be<EWindowStatus> m_Status;
be<uint32_t> m_CursorIndex;
SWA_INSERT_PADDING(0x04);
be<uint32_t> m_SelectedIndex;
};
SWA_ASSERT_OFFSETOF(CGeneralWindow, m_rcGeneral, 0xD0);
SWA_ASSERT_OFFSETOF(CGeneralWindow, m_rcBg, 0xD8);
SWA_ASSERT_OFFSETOF(CGeneralWindow, m_rcWindow, 0xE0);
SWA_ASSERT_OFFSETOF(CGeneralWindow, m_rcWindow_2, 0xE8);
SWA_ASSERT_OFFSETOF(CGeneralWindow, m_rcWindowSelect, 0xF0);
SWA_ASSERT_OFFSETOF(CGeneralWindow, m_rcFooter, 0xF8);
SWA_ASSERT_OFFSETOF(CGeneralWindow, m_Status, 0x158);
SWA_ASSERT_OFFSETOF(CGeneralWindow, m_CursorIndex, 0x15C);
SWA_ASSERT_OFFSETOF(CGeneralWindow, m_SelectedIndex, 0x164);
}

View File

@@ -21,14 +21,20 @@ namespace SWA
{
public:
SWA_INSERT_PADDING(0xD8);
be<uint32_t> m_pUnk;
be<uint32_t> m_FieldD8;
SWA_INSERT_PADDING(0x3C);
Chao::CSD::RCPtr<Chao::CSD::CScene> m_rcNightToDay;
SWA_INSERT_PADDING(0x0C);
be<uint32_t> m_IsVisible;
SWA_INSERT_PADDING(0x0C);
be<ELoadingDisplayType> m_LoadingDisplayType;
SWA_INSERT_PADDING(0x65);
SWA_INSERT_PADDING(0x61);
bool m_IsNightToDay;
};
SWA_ASSERT_OFFSETOF(CLoading, m_FieldD8, 0xD8);
SWA_ASSERT_OFFSETOF(CLoading, m_rcNightToDay, 0x118);
SWA_ASSERT_OFFSETOF(CLoading, m_IsVisible, 0x12C);
SWA_ASSERT_OFFSETOF(CLoading, m_LoadingDisplayType, 0x13C);
SWA_ASSERT_OFFSETOF(CLoading, m_IsNightToDay, 0x1A1);
}

View File

@@ -48,8 +48,7 @@ namespace SWA
class CHudPause : public CGameObject
{
public:
xpointer<void> m_pVftable;
SWA_INSERT_PADDING(0x2C);
SWA_INSERT_PADDING(0x30);
RCPtr<CProject> m_rcPause;
RCPtr<CScene> m_rcBg;
RCPtr<CScene> m_rcBg1;
@@ -58,12 +57,32 @@ namespace SWA
RCPtr<CScene> m_rcBg1Select_2;
RCPtr<CScene> m_rcStatusTitle;
RCPtr<CScene> m_rcFooterA;
SWA_INSERT_PADDING(0x5C);
SWA_INSERT_PADDING(0x59);
bool m_IsVisible;
SWA_INSERT_PADDING(0x02);
be<EActionType> m_Action;
be<EMenuType> m_Menu;
be<EStatusType> m_Status;
be<ETransitionType> m_Transition;
SWA_INSERT_PADDING(0x20);
SWA_INSERT_PADDING(0x04);
be<uint32_t> m_Submenu;
SWA_INSERT_PADDING(0x18);
bool m_IsShown;
};
SWA_ASSERT_OFFSETOF(CHudPause, m_rcPause, 0xEC);
SWA_ASSERT_OFFSETOF(CHudPause, m_rcBg, 0xF4);
SWA_ASSERT_OFFSETOF(CHudPause, m_rcBg1, 0xFC);
SWA_ASSERT_OFFSETOF(CHudPause, m_rcBg1_2, 0x104);
SWA_ASSERT_OFFSETOF(CHudPause, m_rcBg1Select, 0x10C);
SWA_ASSERT_OFFSETOF(CHudPause, m_rcBg1Select_2, 0x114);
SWA_ASSERT_OFFSETOF(CHudPause, m_rcStatusTitle, 0x11C);
SWA_ASSERT_OFFSETOF(CHudPause, m_rcFooterA, 0x124);
SWA_ASSERT_OFFSETOF(CHudPause, m_IsVisible, 0x185);
SWA_ASSERT_OFFSETOF(CHudPause, m_Action, 0x188);
SWA_ASSERT_OFFSETOF(CHudPause, m_Menu, 0x18C);
SWA_ASSERT_OFFSETOF(CHudPause, m_Status, 0x190);
SWA_ASSERT_OFFSETOF(CHudPause, m_Transition, 0x194);
SWA_ASSERT_OFFSETOF(CHudPause, m_Submenu, 0x19C);
SWA_ASSERT_OFFSETOF(CHudPause, m_IsShown, 0x1B8);
}

View File

@@ -0,0 +1,12 @@
#pragma once
#include <SWA.inl>
namespace SWA
{
class CMenuWindowBase
{
public:
SWA_INSERT_PADDING(0x10);
};
}

View File

@@ -0,0 +1,13 @@
#pragma once
#include <SWA.inl>
namespace SWA::Message
{
class MsgRequestHelp
{
public:
SWA_INSERT_PADDING(0x1C);
Hedgehog::Base::CSharedString m_Name;
};
}

View File

@@ -0,0 +1,14 @@
#pragma once
#include <SWA.inl>
namespace SWA
{
class CObjDashPanel
{
public:
SWA_INSERT_PADDING(0xE8);
be<float> m_FieldE8;
be<float> m_Speed;
};
}

View File

@@ -0,0 +1,35 @@
#pragma once
#include <SWA.inl>
namespace SWA
{
class CObjRollingBarrel
{
public:
class CElement
{
public:
SWA_INSERT_PADDING(0xEC);
xpointer<void> m_FieldEC;
SWA_INSERT_PADDING(0x20);
be<float> m_Roll;
};
SWA_INSERT_PADDING(0xE8);
be<float> m_GenerationTime;
SWA_INSERT_PADDING(0x09);
bool m_FieldF5;
SWA_INSERT_PADDING(0x0A);
be<float> m_RandomRange;
be<float> m_Field104;
};
SWA_ASSERT_OFFSETOF(CObjRollingBarrel::CElement, m_FieldEC, 0xEC);
SWA_ASSERT_OFFSETOF(CObjRollingBarrel::CElement, m_Roll, 0x110);
SWA_ASSERT_OFFSETOF(CObjRollingBarrel, m_GenerationTime, 0xE8);
SWA_ASSERT_OFFSETOF(CObjRollingBarrel, m_FieldF5, 0xF5);
SWA_ASSERT_OFFSETOF(CObjRollingBarrel, m_RandomRange, 0x100);
SWA_ASSERT_OFFSETOF(CObjRollingBarrel, m_Field104, 0x104);
}

View File

@@ -1,22 +0,0 @@
#pragma once
namespace SWA::PathAnimation
{
class Entity
{
public:
xpointer<void> m_pVftable;
SWA_INSERT_PADDING(0x18);
};
class Controller
{
public:
xpointer<void> m_pVftable;
SWA_INSERT_PADDING(0x1C);
be<float> m_DistanceAlongPath;
};
SWA_ASSERT_OFFSETOF(Controller, m_DistanceAlongPath, 0x20);
}

View File

@@ -1,13 +0,0 @@
#pragma once
#include "Animation/PathAnimation.h"
namespace SWA
{
class CPathController
{
public:
be<uint32_t> m_Field000;
be<uint32_t> m_Field004;
boost::shared_ptr<PathAnimation::Controller> m_spPathAnimationController;
};
}

View File

@@ -71,7 +71,8 @@ namespace SWA
boost::shared_ptr<Hedgehog::Mirage::CMatrixNode> m_spMatrixNodeRoot;
SWA_INSERT_PADDING(0x14);
CGammaController m_GammaController;
SWA_INSERT_PADDING(0x1C);
boost::shared_ptr<CLoading> m_spLoading;
SWA_INSERT_PADDING(0x14);
boost::shared_ptr<Achievement::CManager> m_spAchievementManager;
boost::shared_ptr<CDatabaseTree> m_spDatabaseTree;
Hedgehog::Base::CSharedString m_Field10C;
@@ -104,6 +105,7 @@ namespace SWA
SWA_ASSERT_OFFSETOF(CApplicationDocument::CMember, m_Field74, 0x74);
SWA_ASSERT_OFFSETOF(CApplicationDocument::CMember, m_spMatrixNodeRoot, 0x84);
SWA_ASSERT_OFFSETOF(CApplicationDocument::CMember, m_GammaController, 0xA0);
SWA_ASSERT_OFFSETOF(CApplicationDocument::CMember, m_spLoading, 0xE0);
SWA_ASSERT_OFFSETOF(CApplicationDocument::CMember, m_spAchievementManager, 0xFC);
SWA_ASSERT_OFFSETOF(CApplicationDocument::CMember, m_spDatabaseTree, 0x104);
SWA_ASSERT_OFFSETOF(CApplicationDocument::CMember, m_Field10C, 0x10C);

View File

@@ -29,13 +29,14 @@ namespace SWA
SWA_INSERT_PADDING(0x10);
};
SWA_INSERT_PADDING(0x10);
hh::map<Hedgehog::Base::CSharedString, boost::shared_ptr<SWA::CWorld>> m_Worlds;
SWA_INSERT_PADDING(0x1C);
boost::shared_ptr<Hedgehog::Database::CDatabase> m_spDatabase;
SWA_INSERT_PADDING(0x88);
Hedgehog::Base::CSharedString m_StageName;
xpointer<CSoundAdministrator> m_pSoundAdministrator;
SWA_INSERT_PADDING(0x124);
SWA_INSERT_PADDING(0x48);
xpointer<CGeneralWindow> m_pGeneralWindow;
SWA_INSERT_PADDING(0xD8);
SScoreInfo m_ScoreInfo;
SWA_INSERT_PADDING(0x0C);
};
@@ -61,6 +62,7 @@ namespace SWA
SWA_ASSERT_OFFSETOF(CGameDocument::CMember, m_spDatabase, 0x1C);
SWA_ASSERT_OFFSETOF(CGameDocument::CMember, m_StageName, 0xAC);
SWA_ASSERT_OFFSETOF(CGameDocument::CMember, m_pSoundAdministrator, 0xB0);
SWA_ASSERT_OFFSETOF(CGameDocument::CMember, m_pGeneralWindow, 0xFC);
SWA_ASSERT_OFFSETOF(CGameDocument::CMember, m_ScoreInfo, 0x1D8);
SWA_ASSERT_SIZEOF(CGameDocument::CMember, 0x230);

View File

@@ -4,10 +4,9 @@
namespace SWA
{
class CGameMode // : Hedgehog::Universe::TStateMachine<SWA::CGame>::TState
class CGameMode : public Hedgehog::Universe::CStateMachineBase::CStateBase
{
public:
SWA_INSERT_PADDING(0x60); // base
SWA_INSERT_PADDING(0x08);
};
}

View File

@@ -0,0 +1,14 @@
#pragma once
#include <SWA.inl>
namespace SWA
{
class CGameModeStageTitle : public CGameModeStage
{
public:
SWA_INSERT_PADDING(0x0E);
bool m_IsPlayingAdvertiseMovie;
be<float> m_AdvertiseMovieWaitTime;
};
}

View File

@@ -4,10 +4,36 @@
namespace SWA
{
class CTitleMenu
class CTitleMenu : public CMenuWindowBase
{
public:
SWA_INSERT_PADDING(0x44);
SWA_INSERT_PADDING(0x28);
be<uint32_t> m_Field38;
bool m_Field3C; // Seems to be related to exit transition.
SWA_INSERT_PADDING(0x04);
be<uint32_t> m_CursorIndex;
SWA_INSERT_PADDING(0x0C);
bool m_Field54; // Seems to be related to exit transition.
SWA_INSERT_PADDING(0x0B);
be<float> m_Field60;
SWA_INSERT_PADDING(0x34);
bool m_Field98;
bool m_IsDeleteCheckMessageOpen;
bool m_Field9A; // Seems to be related to cursor selection.
SWA_INSERT_PADDING(0x04);
bool m_Field9F;
SWA_INSERT_PADDING(0x02);
bool m_IsDLCInfoMessageOpen;
};
SWA_ASSERT_OFFSETOF(CTitleMenu, m_Field38, 0x38);
SWA_ASSERT_OFFSETOF(CTitleMenu, m_Field3C, 0x3C);
SWA_ASSERT_OFFSETOF(CTitleMenu, m_CursorIndex, 0x44);
SWA_ASSERT_OFFSETOF(CTitleMenu, m_Field54, 0x54);
SWA_ASSERT_OFFSETOF(CTitleMenu, m_Field60, 0x60);
SWA_ASSERT_OFFSETOF(CTitleMenu, m_Field98, 0x98);
SWA_ASSERT_OFFSETOF(CTitleMenu, m_IsDeleteCheckMessageOpen, 0x99);
SWA_ASSERT_OFFSETOF(CTitleMenu, m_Field9A, 0x9A);
SWA_ASSERT_OFFSETOF(CTitleMenu, m_Field9F, 0x9F);
SWA_ASSERT_OFFSETOF(CTitleMenu, m_IsDLCInfoMessageOpen, 0xA2);
}

View File

@@ -4,19 +4,5 @@
namespace SWA
{
class CTitleStateBase // : Hedgehog::Universe::TStateMachine<SWA::CTitleManager>::TState
{
public:
class CMember
{
public:
SWA_INSERT_PADDING(0x1E8);
xpointer<CTitleMenu> m_pTitleMenu;
};
SWA_INSERT_PADDING(0x08);
xpointer<CMember> m_pMember;
SWA_INSERT_PADDING(0x5C);
be<uint32_t> m_State;
};
class CTitleStateBase : public Hedgehog::Universe::CStateMachineBase::CStateBase {};
}

View File

@@ -0,0 +1,8 @@
#pragma once
#include <SWA.inl>
namespace SWA
{
class CTitleStateIntro : public CTitleStateBase {};
}

View File

@@ -0,0 +1,17 @@
#pragma once
#include <SWA.inl>
namespace SWA
{
class CTitleStateMenu : public CTitleStateBase
{
public:
class CTitleStateMenuContext
{
public:
SWA_INSERT_PADDING(0x1E8);
xpointer<CTitleMenu> m_pTitleMenu;
};
};
}

View File

@@ -0,0 +1,14 @@
#pragma once
#include <SWA.inl>
#include <SWA/System/GameMode/WorldMap/WorldMapCursor.h>
namespace SWA
{
class CTitleStateWorldMap : public CTitleStateBase
{
public:
SWA_INSERT_PADDING(0x08);
xpointer<CWorldMapCursor> m_pWorldMapCursor;
};
}

View File

@@ -0,0 +1,26 @@
#pragma once
#include <SWA.inl>
namespace SWA
{
class CWorldMapCamera : public CCameraController
{
public:
be<float> m_Pitch;
be<float> m_Yaw;
be<float> m_Distance;
be<float> m_RotationSpeed;
SWA_INSERT_PADDING(0x08);
bool m_CanMove;
SWA_INSERT_PADDING(0x34);
be<float> m_TiltToEarthTransitionSpeed;
};
SWA_ASSERT_OFFSETOF(CWorldMapCamera, m_Pitch, 0xD0);
SWA_ASSERT_OFFSETOF(CWorldMapCamera, m_Yaw, 0xD4);
SWA_ASSERT_OFFSETOF(CWorldMapCamera, m_Distance, 0xD8);
SWA_ASSERT_OFFSETOF(CWorldMapCamera, m_RotationSpeed, 0xDC);
SWA_ASSERT_OFFSETOF(CWorldMapCamera, m_CanMove, 0xE8);
SWA_ASSERT_OFFSETOF(CWorldMapCamera, m_TiltToEarthTransitionSpeed, 0x120);
}

View File

@@ -0,0 +1,24 @@
#pragma once
#include <SWA.inl>
namespace SWA
{
class CWorldMapCursor : public CMenuWindowBase
{
public:
SWA_INSERT_PADDING(0x24);
be<float> m_LeftStickVertical;
be<float> m_LeftStickHorizontal;
bool m_IsCursorMoving;
SWA_INSERT_PADDING(0x07);
be<float> m_CursorY;
be<float> m_CursorX;
};
SWA_ASSERT_OFFSETOF(CWorldMapCursor, m_LeftStickVertical, 0x34);
SWA_ASSERT_OFFSETOF(CWorldMapCursor, m_LeftStickHorizontal, 0x38);
SWA_ASSERT_OFFSETOF(CWorldMapCursor, m_IsCursorMoving, 0x3C);
SWA_ASSERT_OFFSETOF(CWorldMapCursor, m_CursorY, 0x44);
SWA_ASSERT_OFFSETOF(CWorldMapCursor, m_CursorX, 0x48);
}

View File

@@ -0,0 +1,17 @@
#pragma once
#include <SWA.inl>
namespace SWA
{
class CMatrixNodeTransform : public Hedgehog::Mirage::CMatrixNode
{
public:
Hedgehog::Mirage::CTransform m_Transform;
Hedgehog::Math::CMatrix m_WorldMatrix;
};
SWA_ASSERT_OFFSETOF(CMatrixNodeTransform, m_Transform, 0x60);
SWA_ASSERT_OFFSETOF(CMatrixNodeTransform, m_WorldMatrix, 0xC0);
SWA_ASSERT_SIZEOF(CMatrixNodeTransform, 0x100);
}

View File

@@ -1,30 +0,0 @@
#pragma once
#include "SWA.inl"
#include "Hedgehog/Base/Thread/hhSynchronizedObject.h"
#include "Hedgehog/Universe/Engine/hhMessageActor.h"
#include "SWA/System/GameObject.h"
namespace SWA
{
class CStageManager //: public SWA::CGameObject, public Hedgehog::Base::CSynchronizedObject
{
public:
SWA_INSERT_PADDING(0xC4);
boost::shared_ptr<SWA::CPathController> m_spStageGuidePathController; //xpointer<SWA::CPathController> m_pStageGuidePathController;
SWA_INSERT_PADDING(0x4);
Hedgehog::Math::CVector m_PlayerPosition;
be<float> m_Field0DC; // Sonic's air distance from path??
SWA_INSERT_PADDING(0x3C);
be<float> m_StageGuidePathRatio; // Not updated in retail
be<float> m_StageGuidePathLength;
SWA_INSERT_PADDING(0x9C);
};
SWA_ASSERT_OFFSETOF(CStageManager, m_spStageGuidePathController, 0xC4);
SWA_ASSERT_OFFSETOF(CStageManager, m_PlayerPosition, 0xD0);
SWA_ASSERT_OFFSETOF(CStageManager, m_StageGuidePathRatio, 0x11C);
SWA_ASSERT_OFFSETOF(CStageManager, m_StageGuidePathLength, 0x120);
SWA_ASSERT_SIZEOF(CStageManager, 0x1C0);
}

View File

@@ -12,21 +12,9 @@ namespace SWA
class CMember
{
public:
//boost::shared_ptr<Hedgehog::Mirage::CRenderScene> m_spRenderScene;
//Hedgehog::Base::CSharedString m_Name;
SWA_INSERT_PADDING(0xC);
boost::shared_ptr<CCamera> m_spCamera;
boost::shared_ptr<CCamera> m_spOverrideCamera;
SWA_INSERT_PADDING(0x64);
SWA_INSERT_PADDING(0x80);
};
xpointer<CMember> m_pMember;
boost::shared_ptr<CCamera> GetCamera() const;
};
//SWA_ASSERT_OFFSETOF(CWorld::CMember, m_spCamera, 0xC);
//SWA_ASSERT_SIZEOF(CWorld::CMember, 0x80);
}
#include "World.inl"

View File

@@ -1,7 +0,0 @@
namespace SWA
{
inline boost::shared_ptr<CCamera> CWorld::GetCamera() const
{
return m_pMember->m_spOverrideCamera ? m_pMember->m_spOverrideCamera : m_pMember->m_spCamera;
}
}

View File

@@ -115,7 +115,7 @@ namespace boost
}
public:
shared_ptr() : px(nullptr), pn(nullptr) {}
shared_ptr() : px(), pn() {}
// TODO
explicit shared_ptr(T* p) = delete;

View File

@@ -1,4 +1,4 @@
#include <app.h>
#include "app.h"
#include <api/SWA.h>
#include <gpu/video.h>
#include <install/installer.h>
@@ -8,6 +8,8 @@
#include <patches/inspire_patches.h>
#include <ui/game_window.h>
#include <user/config.h>
#include <user/paths.h>
#include <user/registry.h>
void App::Restart(std::vector<std::string> restartArgs)
{
@@ -26,7 +28,7 @@ void App::Exit()
std::_Exit(0);
}
// SWA::CApplication
// SWA::CApplication::CApplication
PPC_FUNC_IMPL(__imp__sub_824EB490);
PPC_FUNC(sub_824EB490)
{
@@ -35,6 +37,7 @@ PPC_FUNC(sub_824EB490)
App::s_language = Config::Language;
SWA::SGlobals::Init();
Registry::Save();
__imp__sub_824EB490(ctx, base);
}
@@ -57,6 +60,7 @@ PPC_FUNC(sub_822C1130)
}
App::s_deltaTime = ctx.f1.f64;
App::s_time += App::s_deltaTime;
// This function can also be called by the loading thread,
// which SDL does not like. To prevent the OS from thinking
@@ -66,12 +70,28 @@ PPC_FUNC(sub_822C1130)
{
SDL_PumpEvents();
SDL_FlushEvents(SDL_FIRSTEVENT, SDL_LASTEVENT);
GameWindow::Update();
}
GameWindow::Update();
AudioPatches::Update(App::s_deltaTime);
InspirePatches::Update();
// Apply subtitles option.
if (auto pApplicationDocument = SWA::CApplicationDocument::GetInstance())
pApplicationDocument->m_InspireSubtitles = Config::Subtitles;
if (Config::EnableEventCollisionDebugView)
*SWA::SGlobals::ms_IsTriggerRender = true;
if (Config::EnableGIMipLevelDebugView)
*SWA::SGlobals::ms_VisualizeLoadedLevel = true;
if (Config::EnableObjectCollisionDebugView)
*SWA::SGlobals::ms_IsObjectCollisionRender = true;
if (Config::EnableStageCollisionDebugView)
*SWA::SGlobals::ms_IsCollisionRender = true;
__imp__sub_822C1130(ctx, base);
}

View File

@@ -8,11 +8,14 @@ public:
static inline bool s_isInit;
static inline bool s_isMissingDLC;
static inline bool s_isLoading;
static inline bool s_isSaving;
static inline bool s_isWerehog;
static inline bool s_isSaveDataCorrupt;
static inline ELanguage s_language;
static inline double s_deltaTime;
static inline double s_time = 0.0; // How much time elapsed since the game started.
static void Restart(std::vector<std::string> restartArgs = {});
static void Exit();

View File

@@ -7,11 +7,10 @@
// Number of samples in a frame
#define XAUDIO_NUM_SAMPLES 256
#ifdef SWA_IMPL
void XAudioInitializeSystem();
void XAudioRegisterClient(PPCFunc* callback, uint32_t param);
void XAudioSubmitFrame(void* samples);
#endif
void XAudioConfigValueChangedCallback(class IConfigDef* configDef);
uint32_t XAudioRegisterRenderDriverClient(be<uint32_t>* callback, be<uint32_t>* driver);
uint32_t XAudioUnregisterRenderDriverClient(uint32_t driver);

View File

@@ -1,35 +1,62 @@
#include "sdl2_driver.h"
#include <apu/audio.h>
#include <cpu/guest_thread.h>
#include <kernel/heap.h>
#include <os/logger.h>
#include <user/config.h>
static PPCFunc* g_clientCallback{};
static uint32_t g_clientCallbackParam{}; // pointer in guest memory
static SDL_AudioDeviceID g_audioDevice{};
static bool g_downMixToStereo;
void XAudioInitializeSystem()
static void CreateAudioDevice()
{
SDL_SetHint(SDL_HINT_AUDIO_CATEGORY, "playback");
SDL_SetHint(SDL_HINT_AUDIO_DEVICE_APP_NAME, "Unleashed Recompiled");
SDL_InitSubSystem(SDL_INIT_AUDIO);
if (g_audioDevice != NULL)
SDL_CloseAudioDevice(g_audioDevice);
bool surround = Config::ChannelConfiguration == EChannelConfiguration::Surround;
int allowedChanges = surround ? SDL_AUDIO_ALLOW_CHANNELS_CHANGE : 0;
SDL_AudioSpec desired{}, obtained{};
desired.freq = XAUDIO_SAMPLES_HZ;
desired.format = AUDIO_F32SYS;
desired.channels = XAUDIO_NUM_CHANNELS;
desired.channels = surround ? XAUDIO_NUM_CHANNELS : 2;
desired.samples = XAUDIO_NUM_SAMPLES;
g_audioDevice = SDL_OpenAudioDevice(nullptr, 0, &desired, &obtained, SDL_AUDIO_ALLOW_CHANNELS_CHANGE);
g_audioDevice = SDL_OpenAudioDevice(nullptr, 0, &desired, &obtained, allowedChanges);
if (obtained.channels != 2 && obtained.channels != XAUDIO_NUM_CHANNELS)
if (obtained.channels != 2 && obtained.channels != XAUDIO_NUM_CHANNELS) // This check may fail only when surround sound is enabled.
{
SDL_CloseAudioDevice(g_audioDevice);
g_audioDevice = SDL_OpenAudioDevice(nullptr, 0, &desired, &obtained, 0);
}
if (!g_audioDevice)
LOGFN_ERROR("Failed to open audio device: {}", SDL_GetError());
g_downMixToStereo = (obtained.channels == 2);
}
void XAudioInitializeSystem()
{
#ifdef _WIN32
// Force wasapi on Windows.
SDL_setenv("SDL_AUDIODRIVER", "wasapi", true);
#endif
SDL_SetHint(SDL_HINT_AUDIO_CATEGORY, "playback");
SDL_SetHint(SDL_HINT_AUDIO_DEVICE_APP_NAME, "Unleashed Recompiled");
if (SDL_InitSubSystem(SDL_INIT_AUDIO) < 0)
{
LOGFN_ERROR("Failed to init audio subsystem: {}", SDL_GetError());
return;
}
CreateAudioDevice();
}
static std::unique_ptr<std::thread> g_audioThread;
static volatile bool g_audioThreadShouldExit;
static void AudioThread()
{
@@ -39,7 +66,7 @@ static void AudioThread()
size_t channels = g_downMixToStereo ? 2 : XAUDIO_NUM_CHANNELS;
while (true)
while (!g_audioThreadShouldExit)
{
uint32_t queuedAudioSize = SDL_GetQueuedAudioSize(g_audioDevice);
constexpr size_t MAX_LATENCY = 10;
@@ -62,6 +89,13 @@ static void AudioThread()
}
}
static void CreateAudioThread()
{
SDL_PauseAudioDevice(g_audioDevice, 0);
g_audioThreadShouldExit = false;
g_audioThread = std::make_unique<std::thread>(AudioThread);
}
void XAudioRegisterClient(PPCFunc* callback, uint32_t param)
{
auto* pClientParam = static_cast<uint32_t*>(g_userHeap.Alloc(sizeof(param)));
@@ -70,12 +104,13 @@ void XAudioRegisterClient(PPCFunc* callback, uint32_t param)
g_clientCallbackParam = g_memory.MapVirtual(pClientParam);
g_clientCallback = callback;
SDL_PauseAudioDevice(g_audioDevice, 0);
g_audioThread = std::make_unique<std::thread>(AudioThread);
CreateAudioThread();
}
void XAudioSubmitFrame(void* samples)
{
auto floatSamples = reinterpret_cast<be<float>*>(samples);
if (g_downMixToStereo)
{
// 0: left 1.0f, right 0.0f
@@ -85,8 +120,6 @@ void XAudioSubmitFrame(void* samples)
// 4: left 1.0f, right 0.0f
// 5: left 0.0f, right 1.0f
auto floatSamples = reinterpret_cast<be<float>*>(samples);
std::array<float, 2 * XAUDIO_NUM_SAMPLES> audioFrames;
for (size_t i = 0; i < XAUDIO_NUM_SAMPLES; i++)
@@ -98,24 +131,37 @@ void XAudioSubmitFrame(void* samples)
float ch4 = floatSamples[4 * XAUDIO_NUM_SAMPLES + i];
float ch5 = floatSamples[5 * XAUDIO_NUM_SAMPLES + i];
audioFrames[i * 2 + 0] = ch0 + ch2 * 0.75f + ch4;
audioFrames[i * 2 + 1] = ch1 + ch2 * 0.75f + ch5;
audioFrames[i * 2 + 0] = (ch0 + ch2 * 0.75f + ch4) * Config::MasterVolume;
audioFrames[i * 2 + 1] = (ch1 + ch2 * 0.75f + ch5) * Config::MasterVolume;
}
SDL_QueueAudio(g_audioDevice, &audioFrames, sizeof(audioFrames));
}
else
{
auto rawSamples = reinterpret_cast<be<uint32_t>*>(samples);
std::array<uint32_t, XAUDIO_NUM_CHANNELS * XAUDIO_NUM_SAMPLES> audioFrames;
std::array<float, XAUDIO_NUM_CHANNELS * XAUDIO_NUM_SAMPLES> audioFrames;
for (size_t i = 0; i < XAUDIO_NUM_SAMPLES; i++)
{
for (size_t j = 0; j < XAUDIO_NUM_CHANNELS; j++)
audioFrames[i * XAUDIO_NUM_CHANNELS + j] = rawSamples[j * XAUDIO_NUM_SAMPLES + i];
audioFrames[i * XAUDIO_NUM_CHANNELS + j] = floatSamples[j * XAUDIO_NUM_SAMPLES + i] * Config::MasterVolume;
}
SDL_QueueAudio(g_audioDevice, &audioFrames, sizeof(audioFrames));
}
}
void XAudioConfigValueChangedCallback(IConfigDef* configDef)
{
if (configDef == &Config::ChannelConfiguration)
{
if (g_audioThread->joinable())
{
g_audioThreadShouldExit = true;
g_audioThread->join();
}
CreateAudioDevice();
CreateAudioThread();
}
}

View File

@@ -1,3 +0,0 @@
#pragma once
#include <apu/audio.h>

View File

@@ -1,121 +0,0 @@
#include <stdafx.h>
#include "xaudio_driver.h"
#include <xaudio2.h>
#include <cpu/guest_thread.h>
#include <cpu/ppc_context.h>
#include <kernel/heap.h>
#define XAUDIO_DRIVER_KEY (uint32_t)('XAUD')
PPCFunc* volatile g_clientCallback{};
DWORD g_clientCallbackParam{}; // pointer in guest memory
DWORD g_driverThread{};
// TODO: Should use a counted ptr
IXAudio2* g_audio{};
IXAudio2MasteringVoice* g_masteringVoice{};
IXAudio2SourceVoice* g_sourceVoice{};
constexpr uint32_t g_semaphoreCount = 16;
constexpr uint32_t g_audioFrameSize = 256 * 6;
HANDLE g_audioSemaphore{ CreateSemaphoreA(nullptr, g_semaphoreCount, g_semaphoreCount, nullptr) };
uint32_t g_audioFrames[g_audioFrameSize * g_semaphoreCount];
uint32_t g_audioFrameIndex = 0;
class VoiceCallback : public IXAudio2VoiceCallback
{
STDMETHOD_(void, OnVoiceProcessingPassStart)(UINT32 BytesRequired) override {}
STDMETHOD_(void, OnVoiceProcessingPassEnd)() override {}
STDMETHOD_(void, OnBufferStart)(void* pBufferContext) override {}
STDMETHOD_(void, OnBufferEnd)(void* pBufferContext) override
{
ReleaseSemaphore(g_audioSemaphore, 1, nullptr);
}
STDMETHOD_(void, OnStreamEnd)() override {}
STDMETHOD_(void, OnLoopEnd)(void* pBufferContext) override {}
STDMETHOD_(void, OnVoiceError)(void* pBufferContext, HRESULT Error) override {}
} gVoiceCallback;
PPC_FUNC(DriverLoop)
{
GuestThread::SetThreadName(GetCurrentThreadId(), "Audio Driver");
while (true)
{
if (!g_clientCallback)
{
continue;
}
WaitForSingleObject(g_audioSemaphore, INFINITE);
ctx.r3.u64 = g_clientCallbackParam;
g_clientCallback(ctx, g_memory.base);
}
}
void XAudioInitializeSystem()
{
if (g_audio)
{
return;
}
//reinterpret_cast<decltype(&XAudio2Create)>(
// GetProcAddress(LoadLibraryA("XAudio2_8.dll"), "XAudio2Create"))(&gAudio, 0, 1);
XAudio2Create(&g_audio);
g_audio->CreateMasteringVoice(&g_masteringVoice);
WAVEFORMATIEEEFLOATEX format{};
format.Format.wFormatTag = WAVE_FORMAT_EXTENSIBLE;
format.Format.cbSize = sizeof(format) - sizeof(format.Format);
format.Format.nChannels = XAUDIO_NUM_CHANNELS;
format.Format.nSamplesPerSec = XAUDIO_SAMPLES_HZ;
format.Format.wBitsPerSample = XAUDIO_SAMPLE_BITS;
format.Format.nBlockAlign = (format.Format.nChannels * format.Format.wBitsPerSample) / 8;
format.Format.nAvgBytesPerSec = format.Format.nSamplesPerSec * format.Format.nBlockAlign;
format.SubFormat = KSDATAFORMAT_SUBTYPE_IEEE_FLOAT;
format.Samples.wValidBitsPerSample = format.Format.wBitsPerSample;
format.dwChannelMask = SPEAKER_FRONT_LEFT | SPEAKER_FRONT_CENTER | SPEAKER_FRONT_RIGHT |
SPEAKER_LOW_FREQUENCY | SPEAKER_BACK_LEFT | SPEAKER_BACK_RIGHT;
g_audio->CreateSourceVoice(&g_sourceVoice, &format.Format, 0, 1024, &gVoiceCallback);
g_sourceVoice->Start();
KeInsertHostFunction(XAUDIO_DRIVER_KEY, DriverLoop);
GuestThread::Start({ XAUDIO_DRIVER_KEY, 0, 0 }, nullptr);
}
void XAudioRegisterClient(PPCFunc* callback, uint32_t param)
{
auto* pClientParam = static_cast<uint32_t*>(g_userHeap.Alloc(sizeof(param)));
ByteSwapInplace(param);
*pClientParam = param;
g_clientCallbackParam = g_memory.MapVirtual(pClientParam);
g_clientCallback = callback;
}
void XAudioSubmitFrame(void* samples)
{
uint32_t* audioFrame = &g_audioFrames[g_audioFrameSize * g_audioFrameIndex];
g_audioFrameIndex = (g_audioFrameIndex + 1) % g_semaphoreCount;
for (size_t i = 0; i < XAUDIO_NUM_SAMPLES; i++)
{
for (size_t j = 0; j < 6; j++)
audioFrame[i * XAUDIO_NUM_CHANNELS + j] = ByteSwap(((uint32_t*)samples)[j * XAUDIO_NUM_SAMPLES + i]);
}
XAUDIO2_BUFFER buffer{};
buffer.pAudioData = (BYTE*)audioFrame;
buffer.AudioBytes = XAUDIO_NUM_SAMPLES * XAUDIO_NUM_CHANNELS * sizeof(float);
buffer.PlayLength = XAUDIO_NUM_SAMPLES;
g_sourceVoice->SubmitSourceBuffer(&buffer);
}

View File

@@ -1,2 +0,0 @@
#pragma once
#include <apu/audio.h>

View File

@@ -2,6 +2,7 @@
#include <apu/embedded_player.h>
#include <user/config.h>
#include <res/music/installer.ogg.h>
#include <res/sounds/sys_worldmap_cursor.ogg.h>
#include <res/sounds/sys_worldmap_finaldecide.ogg.h>
#include <res/sounds/sys_actstg_pausecansel.ogg.h>
@@ -87,13 +88,17 @@ static void PlayEmbeddedSound(EmbeddedSound s)
data.chunk = Mix_LoadWAV_RW(SDL_RWFromConstMem(soundData, soundDataSize), 1);
}
Mix_VolumeChunk(data.chunk, Config::MasterVolume * Config::EffectsVolume * MIX_MAX_VOLUME);
Mix_PlayChannel(g_channelIndex % MIX_CHANNELS, data.chunk, 0);
++g_channelIndex;
}
static Mix_Music* g_installerMusic;
void EmbeddedPlayer::Init()
{
Mix_OpenAudio(XAUDIO_SAMPLES_HZ, AUDIO_F32SYS, XAUDIO_NUM_CHANNELS, 256);
Mix_OpenAudio(XAUDIO_SAMPLES_HZ, AUDIO_F32SYS, 2, 4096);
g_installerMusic = Mix_LoadMUS_RW(SDL_RWFromConstMem(g_installer_music, sizeof(g_installer_music)), 1);
s_isActive = true;
}
@@ -111,6 +116,21 @@ void EmbeddedPlayer::Play(const char *name)
PlayEmbeddedSound(it->second);
}
void EmbeddedPlayer::PlayMusic()
{
if (!Mix_PlayingMusic())
{
Mix_PlayMusic(g_installerMusic, INT_MAX);
Mix_VolumeMusic(Config::MasterVolume * Config::MusicVolume * MUSIC_VOLUME * MIX_MAX_VOLUME);
}
}
void EmbeddedPlayer::FadeOutMusic()
{
if (Mix_PlayingMusic())
Mix_FadeOutMusic(1000);
}
void EmbeddedPlayer::Shutdown()
{
for (EmbeddedSoundData &data : g_embeddedSoundData)
@@ -119,6 +139,9 @@ void EmbeddedPlayer::Shutdown()
Mix_FreeChunk(data.chunk);
}
Mix_HaltMusic();
Mix_FreeMusic(g_installerMusic);
Mix_CloseAudio();
Mix_Quit();

View File

@@ -2,9 +2,14 @@
struct EmbeddedPlayer
{
inline static bool s_isActive = false;
// Arbitrarily picked volume to match the mixing in the original game.
static constexpr float MUSIC_VOLUME = 0.25f;
static inline bool s_isActive = false;
static void Init();
static void Play(const char *name);
static void PlayMusic();
static void FadeOutMusic();
static void Shutdown();
};

View File

@@ -165,11 +165,7 @@ int GetThreadPriorityImpl(GuestThreadHandle* hThread)
uint32_t SetThreadIdealProcessorImpl(GuestThreadHandle* hThread, uint32_t dwIdealProcessor)
{
#ifdef _WIN32
return SetThreadIdealProcessor(hThread == GetKernelObject(CURRENT_THREAD_HANDLE) ? GetCurrentThread() : hThread->thread.native_handle(), dwIdealProcessor);
#else
return 0;
#endif
}
GUEST_FUNCTION_HOOK(sub_82DFA2E8, SetThreadNameImpl);

View File

@@ -5,6 +5,7 @@
#include <kernel/heap.h>
#include <kernel/memory.h>
#include <ui/game_window.h>
#include <patches/inspire_patches.h>
void Game_PlaySound(const char* pName)
{
@@ -14,8 +15,11 @@ void Game_PlaySound(const char* pName)
}
else
{
// Use EVENT category in cutscenes since SYSTEM gets muted by the game.
uint32_t category = !InspirePatches::s_sceneName.empty() ? 10 : 7;
guest_stack_var<boost::anonymous_shared_ptr> soundPlayer;
GuestToHostFunction<void>(sub_82B4DF50, soundPlayer.get(), ((be<uint32_t>*)g_memory.Translate(0x83367900))->get(), 7, 0, 0);
GuestToHostFunction<void>(sub_82B4DF50, soundPlayer.get(), ((be<uint32_t>*)g_memory.Translate(0x83367900))->get(), category, 0, 0);
auto soundPlayerVtable = (be<uint32_t>*)g_memory.Translate(*(be<uint32_t>*)soundPlayer->get());
uint32_t virtualFunction = *(soundPlayerVtable + 1);
@@ -27,13 +31,3 @@ void Game_PlaySound(const char* pName)
g_userHeap.Free(strAllocation);
}
}
void Window_SetDisplay(int displayIndex)
{
GameWindow::SetDisplay(displayIndex);
}
void Window_SetFullscreen(bool isEnabled)
{
GameWindow::SetFullscreen(isEnabled);
}

View File

@@ -1,5 +1,3 @@
#pragma once
void Game_PlaySound(const char* pName);
void Window_SetDisplay(int displayIndex);
void Window_SetFullscreen(bool isEnabled);

View File

@@ -7,6 +7,8 @@
typedef returnType _##procName(__VA_ARGS__); \
_##procName* procName = (_##procName*)PROC_ADDRESS(libraryName, #procName);
#define STR(x) #x
template<typename T>
inline T RoundUp(const T& in_rValue, uint32_t in_round)
{

View File

@@ -15,10 +15,13 @@
{ reinterpret_cast<GuestShader*>(0x36DB3B40FA419EF6),reinterpret_cast<GuestShader*>(0x4FDE8FFB7DC1D1CE),reinterpret_cast<GuestVertexDeclaration*>(0x84BACD816D86543C),false,true,false,RenderBlend::SRC_ALPHA,RenderBlend::INV_SRC_ALPHA,RenderCullMode::BACK,RenderComparisonFunction::GREATER_EQUAL,true,RenderBlendOperation::ADD,0,0,RenderBlend::SRC_ALPHA,RenderBlend::INV_SRC_ALPHA,RenderBlendOperation::ADD,0xF,RenderPrimitiveTopology::TRIANGLE_STRIP,{ 104,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 },RenderFormat::R16G16B16A16_FLOAT,RenderFormat::D32_FLOAT,1,false,0x10 },
{ reinterpret_cast<GuestShader*>(0x36DB3B40FA419EF6),reinterpret_cast<GuestShader*>(0xD56D0D7219E51F1D),reinterpret_cast<GuestVertexDeclaration*>(0x84BACD816D86543C),false,true,false,RenderBlend::SRC_ALPHA,RenderBlend::INV_SRC_ALPHA,RenderCullMode::BACK,RenderComparisonFunction::GREATER_EQUAL,true,RenderBlendOperation::ADD,0,0,RenderBlend::SRC_ALPHA,RenderBlend::INV_SRC_ALPHA,RenderBlendOperation::ADD,0xF,RenderPrimitiveTopology::TRIANGLE_STRIP,{ 104,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 },RenderFormat::R16G16B16A16_FLOAT,RenderFormat::D32_FLOAT,1,false,0x10 },
{ reinterpret_cast<GuestShader*>(0x3A4537B51DE9818),reinterpret_cast<GuestShader*>(0x115813F8DBF6CCFF),reinterpret_cast<GuestVertexDeclaration*>(0xDEB308DCDDF979C7),false,true,false,RenderBlend::SRC_ALPHA,RenderBlend::INV_SRC_ALPHA,RenderCullMode::BACK,RenderComparisonFunction::GREATER_EQUAL,true,RenderBlendOperation::ADD,0,0,RenderBlend::SRC_ALPHA,RenderBlend::INV_SRC_ALPHA,RenderBlendOperation::ADD,0xF,RenderPrimitiveTopology::TRIANGLE_STRIP,{ 44,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 },RenderFormat::R16G16B16A16_FLOAT,RenderFormat::D32_FLOAT,1,false,0x11 },
{ reinterpret_cast<GuestShader*>(0x3A4537B51DE9818),reinterpret_cast<GuestShader*>(0x3073F2C856F3333E),reinterpret_cast<GuestVertexDeclaration*>(0xF10787EFFEEC0153),false,true,false,RenderBlend::SRC_ALPHA,RenderBlend::INV_SRC_ALPHA,RenderCullMode::BACK,RenderComparisonFunction::GREATER_EQUAL,true,RenderBlendOperation::ADD,0,0,RenderBlend::SRC_ALPHA,RenderBlend::INV_SRC_ALPHA,RenderBlendOperation::ADD,0xF,RenderPrimitiveTopology::TRIANGLE_STRIP,{ 48,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 },RenderFormat::R16G16B16A16_FLOAT,RenderFormat::D32_FLOAT,1,false,0x11 },
{ reinterpret_cast<GuestShader*>(0x3A4537B51DE9818),reinterpret_cast<GuestShader*>(0x3382CD5552FAB33C),reinterpret_cast<GuestVertexDeclaration*>(0xB7BBCC93738C9DE4),false,true,true,RenderBlend::ONE,RenderBlend::ZERO,RenderCullMode::BACK,RenderComparisonFunction::GREATER_EQUAL,false,RenderBlendOperation::ADD,0,0,RenderBlend::ONE,RenderBlend::ZERO,RenderBlendOperation::ADD,0xF,RenderPrimitiveTopology::TRIANGLE_STRIP,{ 40,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 },RenderFormat::R16G16B16A16_FLOAT,RenderFormat::D32_FLOAT,1,false,0x11 },
{ reinterpret_cast<GuestShader*>(0x3A4537B51DE9818),reinterpret_cast<GuestShader*>(0x47CDF40D1C605E0D),reinterpret_cast<GuestVertexDeclaration*>(0x84BACD816D86543C),false,true,true,RenderBlend::ONE,RenderBlend::ZERO,RenderCullMode::BACK,RenderComparisonFunction::GREATER_EQUAL,false,RenderBlendOperation::ADD,0,0,RenderBlend::ONE,RenderBlend::ZERO,RenderBlendOperation::ADD,0xF,RenderPrimitiveTopology::TRIANGLE_STRIP,{ 104,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 },RenderFormat::R16G16B16A16_FLOAT,RenderFormat::D32_FLOAT,1,false,0x14 },
{ reinterpret_cast<GuestShader*>(0x3A4537B51DE9818),reinterpret_cast<GuestShader*>(0x6563290A54293E7A),reinterpret_cast<GuestVertexDeclaration*>(0xDEB308DCDDF979C7),false,true,false,RenderBlend::SRC_ALPHA,RenderBlend::INV_SRC_ALPHA,RenderCullMode::NONE,RenderComparisonFunction::GREATER_EQUAL,true,RenderBlendOperation::ADD,0,0,RenderBlend::ONE,RenderBlend::ZERO,RenderBlendOperation::ADD,0xF,RenderPrimitiveTopology::TRIANGLE_STRIP,{ 44,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 },RenderFormat::R16G16B16A16_FLOAT,RenderFormat::D32_FLOAT,1,false,0x11 },
{ reinterpret_cast<GuestShader*>(0x3A4537B51DE9818),reinterpret_cast<GuestShader*>(0x6563290A54293E7A),reinterpret_cast<GuestVertexDeclaration*>(0xF10787EFFEEC0153),false,true,false,RenderBlend::SRC_ALPHA,RenderBlend::INV_SRC_ALPHA,RenderCullMode::BACK,RenderComparisonFunction::GREATER_EQUAL,true,RenderBlendOperation::ADD,0,0,RenderBlend::SRC_ALPHA,RenderBlend::INV_SRC_ALPHA,RenderBlendOperation::ADD,0xF,RenderPrimitiveTopology::TRIANGLE_STRIP,{ 48,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 },RenderFormat::R16G16B16A16_FLOAT,RenderFormat::D32_FLOAT,1,false,0x11 },
{ reinterpret_cast<GuestShader*>(0x3A4537B51DE9818),reinterpret_cast<GuestShader*>(0x6563290A54293E7A),reinterpret_cast<GuestVertexDeclaration*>(0xF10787EFFEEC0153),false,true,false,RenderBlend::SRC_ALPHA,RenderBlend::INV_SRC_ALPHA,RenderCullMode::NONE,RenderComparisonFunction::GREATER_EQUAL,true,RenderBlendOperation::ADD,0,0,RenderBlend::ONE,RenderBlend::ZERO,RenderBlendOperation::ADD,0xF,RenderPrimitiveTopology::TRIANGLE_STRIP,{ 48,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 },RenderFormat::R16G16B16A16_FLOAT,RenderFormat::D32_FLOAT,1,false,0x11 },
{ reinterpret_cast<GuestShader*>(0x3A4537B51DE9818),reinterpret_cast<GuestShader*>(0x6563290A54293E7A),reinterpret_cast<GuestVertexDeclaration*>(0xF10787EFFEEC0153),false,true,true,RenderBlend::ONE,RenderBlend::ZERO,RenderCullMode::NONE,RenderComparisonFunction::GREATER_EQUAL,false,RenderBlendOperation::ADD,0,0,RenderBlend::ONE,RenderBlend::ZERO,RenderBlendOperation::ADD,0xF,RenderPrimitiveTopology::TRIANGLE_STRIP,{ 48,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 },RenderFormat::R16G16B16A16_FLOAT,RenderFormat::D32_FLOAT,1,false,0x15 },
{ reinterpret_cast<GuestShader*>(0x3A4537B51DE9818),reinterpret_cast<GuestShader*>(0x7A8F23548FF778),reinterpret_cast<GuestVertexDeclaration*>(0xC64D046063DE2F63),false,true,true,RenderBlend::ONE,RenderBlend::ZERO,RenderCullMode::NONE,RenderComparisonFunction::GREATER_EQUAL,false,RenderBlendOperation::ADD,0,0,RenderBlend::ONE,RenderBlend::ZERO,RenderBlendOperation::ADD,0xF,RenderPrimitiveTopology::TRIANGLE_STRIP,{ 44,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 },RenderFormat::R16G16B16A16_FLOAT,RenderFormat::D32_FLOAT,1,false,0x15 },
{ reinterpret_cast<GuestShader*>(0x3A4537B51DE9818),reinterpret_cast<GuestShader*>(0x85E3EE1021089A76),reinterpret_cast<GuestVertexDeclaration*>(0xDEB308DCDDF979C7),false,true,true,RenderBlend::ONE,RenderBlend::ZERO,RenderCullMode::BACK,RenderComparisonFunction::GREATER_EQUAL,false,RenderBlendOperation::ADD,0,0,RenderBlend::ONE,RenderBlend::ZERO,RenderBlendOperation::ADD,0xF,RenderPrimitiveTopology::TRIANGLE_STRIP,{ 44,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 },RenderFormat::R16G16B16A16_FLOAT,RenderFormat::D32_FLOAT,1,false,0x11 },
{ reinterpret_cast<GuestShader*>(0x3A4537B51DE9818),reinterpret_cast<GuestShader*>(0x933E17818464BC39),reinterpret_cast<GuestVertexDeclaration*>(0xB7BBCC93738C9DE4),false,true,true,RenderBlend::ONE,RenderBlend::ZERO,RenderCullMode::BACK,RenderComparisonFunction::GREATER_EQUAL,false,RenderBlendOperation::ADD,0,0,RenderBlend::ONE,RenderBlend::ZERO,RenderBlendOperation::ADD,0xF,RenderPrimitiveTopology::TRIANGLE_STRIP,{ 40,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 },RenderFormat::R16G16B16A16_FLOAT,RenderFormat::D32_FLOAT,1,false,0x15 },
@@ -27,6 +30,7 @@
{ reinterpret_cast<GuestShader*>(0x3A4537B51DE9818),reinterpret_cast<GuestShader*>(0xB8F71746F39A1166),reinterpret_cast<GuestVertexDeclaration*>(0xDEB308DCDDF979C7),false,true,true,RenderBlend::ONE,RenderBlend::ZERO,RenderCullMode::BACK,RenderComparisonFunction::GREATER_EQUAL,false,RenderBlendOperation::ADD,0,0,RenderBlend::ONE,RenderBlend::ZERO,RenderBlendOperation::ADD,0xF,RenderPrimitiveTopology::TRIANGLE_STRIP,{ 44,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 },RenderFormat::R16G16B16A16_FLOAT,RenderFormat::D32_FLOAT,1,false,0x11 },
{ reinterpret_cast<GuestShader*>(0x3A4537B51DE9818),reinterpret_cast<GuestShader*>(0xF9F82EC882CD3D08),reinterpret_cast<GuestVertexDeclaration*>(0xDEB308DCDDF979C7),false,true,false,RenderBlend::SRC_ALPHA,RenderBlend::INV_SRC_ALPHA,RenderCullMode::BACK,RenderComparisonFunction::GREATER_EQUAL,true,RenderBlendOperation::ADD,0,0,RenderBlend::SRC_ALPHA,RenderBlend::INV_SRC_ALPHA,RenderBlendOperation::ADD,0xF,RenderPrimitiveTopology::TRIANGLE_STRIP,{ 44,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 },RenderFormat::R16G16B16A16_FLOAT,RenderFormat::D32_FLOAT,1,false,0x11 },
{ reinterpret_cast<GuestShader*>(0x3A4537B51DE9818),reinterpret_cast<GuestShader*>(0xF9F82EC882CD3D08),reinterpret_cast<GuestVertexDeclaration*>(0xDEB308DCDDF979C7),false,true,true,RenderBlend::ONE,RenderBlend::ZERO,RenderCullMode::BACK,RenderComparisonFunction::GREATER_EQUAL,false,RenderBlendOperation::ADD,0,0,RenderBlend::ONE,RenderBlend::ZERO,RenderBlendOperation::ADD,0xF,RenderPrimitiveTopology::TRIANGLE_STRIP,{ 44,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 },RenderFormat::R16G16B16A16_FLOAT,RenderFormat::D32_FLOAT,1,false,0x11 },
{ reinterpret_cast<GuestShader*>(0x40E4064FE517DFD2),reinterpret_cast<GuestShader*>(0x11958CFF684E1F4B),reinterpret_cast<GuestVertexDeclaration*>(0xD452411D3FB80A0D),false,false,false,RenderBlend::ONE,RenderBlend::SRC_ALPHA,RenderCullMode::NONE,RenderComparisonFunction::LESS,true,RenderBlendOperation::ADD,0,0,RenderBlend::SRC_ALPHA,RenderBlend::INV_SRC_ALPHA,RenderBlendOperation::ADD,0xF,RenderPrimitiveTopology::TRIANGLE_STRIP,{ 20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 },RenderFormat::R8G8B8A8_UNORM,RenderFormat::UNKNOWN,1,false,0x0 },
{ reinterpret_cast<GuestShader*>(0x4620B236DC38100C),reinterpret_cast<GuestShader*>(0xBBDB735BEACC8F41),reinterpret_cast<GuestVertexDeclaration*>(0x28FD2057B9BD5D1B),false,true,false,RenderBlend::SRC_ALPHA,RenderBlend::INV_SRC_ALPHA,RenderCullMode::NONE,RenderComparisonFunction::GREATER_EQUAL,true,RenderBlendOperation::ADD,0,0,RenderBlend::SRC_ALPHA,RenderBlend::INV_SRC_ALPHA,RenderBlendOperation::ADD,0xF,RenderPrimitiveTopology::TRIANGLE_STRIP,{ 104,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 },RenderFormat::R8G8B8A8_UNORM,RenderFormat::D32_FLOAT,1,false,0x10 },
{ reinterpret_cast<GuestShader*>(0x4620B236DC38100C),reinterpret_cast<GuestShader*>(0xBBDB735BEACC8F41),reinterpret_cast<GuestVertexDeclaration*>(0x2A6D72391BFFFA3C),false,true,false,RenderBlend::SRC_ALPHA,RenderBlend::INV_SRC_ALPHA,RenderCullMode::BACK,RenderComparisonFunction::GREATER_EQUAL,true,RenderBlendOperation::ADD,0,0,RenderBlend::SRC_ALPHA,RenderBlend::INV_SRC_ALPHA,RenderBlendOperation::ADD,0xF,RenderPrimitiveTopology::TRIANGLE_STRIP,{ 48,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 },RenderFormat::R8G8B8A8_UNORM,RenderFormat::D32_FLOAT,1,false,0x11 },
{ reinterpret_cast<GuestShader*>(0x4620B236DC38100C),reinterpret_cast<GuestShader*>(0xBBDB735BEACC8F41),reinterpret_cast<GuestVertexDeclaration*>(0x2A6D72391BFFFA3C),false,true,false,RenderBlend::SRC_ALPHA,RenderBlend::ONE,RenderCullMode::BACK,RenderComparisonFunction::GREATER_EQUAL,true,RenderBlendOperation::ADD,0,0,RenderBlend::SRC_ALPHA,RenderBlend::INV_SRC_ALPHA,RenderBlendOperation::ADD,0xF,RenderPrimitiveTopology::TRIANGLE_STRIP,{ 48,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 },RenderFormat::R8G8B8A8_UNORM,RenderFormat::D32_FLOAT,1,false,0x11 },
@@ -53,11 +57,13 @@
{ reinterpret_cast<GuestShader*>(0x624F608ACB374E12),reinterpret_cast<GuestShader*>(0xA624AF834723B59),reinterpret_cast<GuestVertexDeclaration*>(0xDEB308DCDDF979C7),false,true,false,RenderBlend::SRC_ALPHA,RenderBlend::INV_SRC_ALPHA,RenderCullMode::BACK,RenderComparisonFunction::GREATER_EQUAL,true,RenderBlendOperation::ADD,0,0,RenderBlend::SRC_ALPHA,RenderBlend::INV_SRC_ALPHA,RenderBlendOperation::ADD,0xF,RenderPrimitiveTopology::TRIANGLE_STRIP,{ 44,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 },RenderFormat::R16G16B16A16_FLOAT,RenderFormat::D32_FLOAT,1,false,0x11 },
{ reinterpret_cast<GuestShader*>(0x624F608ACB374E12),reinterpret_cast<GuestShader*>(0xA624AF834723B59),reinterpret_cast<GuestVertexDeclaration*>(0xDEB308DCDDF979C7),false,true,false,RenderBlend::SRC_ALPHA,RenderBlend::INV_SRC_ALPHA,RenderCullMode::NONE,RenderComparisonFunction::GREATER_EQUAL,true,RenderBlendOperation::ADD,0,0,RenderBlend::SRC_ALPHA,RenderBlend::INV_SRC_ALPHA,RenderBlendOperation::ADD,0xF,RenderPrimitiveTopology::TRIANGLE_STRIP,{ 44,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 },RenderFormat::R16G16B16A16_FLOAT,RenderFormat::D32_FLOAT,1,false,0x11 },
{ reinterpret_cast<GuestShader*>(0x624F608ACB374E12),reinterpret_cast<GuestShader*>(0xA624AF834723B59),reinterpret_cast<GuestVertexDeclaration*>(0xF10787EFFEEC0153),false,true,false,RenderBlend::SRC_ALPHA,RenderBlend::INV_SRC_ALPHA,RenderCullMode::NONE,RenderComparisonFunction::GREATER_EQUAL,true,RenderBlendOperation::ADD,0,0,RenderBlend::SRC_ALPHA,RenderBlend::INV_SRC_ALPHA,RenderBlendOperation::ADD,0xF,RenderPrimitiveTopology::TRIANGLE_STRIP,{ 48,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 },RenderFormat::R16G16B16A16_FLOAT,RenderFormat::D32_FLOAT,1,false,0x11 },
{ reinterpret_cast<GuestShader*>(0x666E7FB7FCAE0FB7),reinterpret_cast<GuestShader*>(0x2CA0127E60EB4507),reinterpret_cast<GuestVertexDeclaration*>(0xDEB308DCDDF979C7),false,true,true,RenderBlend::ONE,RenderBlend::ZERO,RenderCullMode::BACK,RenderComparisonFunction::GREATER_EQUAL,false,RenderBlendOperation::ADD,0,0,RenderBlend::ONE,RenderBlend::ZERO,RenderBlendOperation::ADD,0xF,RenderPrimitiveTopology::TRIANGLE_STRIP,{ 44,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 },RenderFormat::R16G16B16A16_FLOAT,RenderFormat::D32_FLOAT,1,false,0x11 },
{ reinterpret_cast<GuestShader*>(0x666E7FB7FCAE0FB7),reinterpret_cast<GuestShader*>(0x2E5AA3C0A9E32751),reinterpret_cast<GuestVertexDeclaration*>(0xB7BBCC93738C9DE4),false,true,true,RenderBlend::ONE,RenderBlend::ZERO,RenderCullMode::BACK,RenderComparisonFunction::GREATER_EQUAL,false,RenderBlendOperation::ADD,0,0,RenderBlend::ONE,RenderBlend::ZERO,RenderBlendOperation::ADD,0xF,RenderPrimitiveTopology::TRIANGLE_STRIP,{ 40,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 },RenderFormat::R16G16B16A16_FLOAT,RenderFormat::D32_FLOAT,1,false,0x11 },
{ reinterpret_cast<GuestShader*>(0x666E7FB7FCAE0FB7),reinterpret_cast<GuestShader*>(0x326BB3169FF92317),reinterpret_cast<GuestVertexDeclaration*>(0xDEB308DCDDF979C7),false,true,true,RenderBlend::ONE,RenderBlend::ZERO,RenderCullMode::BACK,RenderComparisonFunction::GREATER_EQUAL,false,RenderBlendOperation::ADD,0,0,RenderBlend::ONE,RenderBlend::ZERO,RenderBlendOperation::ADD,0xF,RenderPrimitiveTopology::TRIANGLE_STRIP,{ 44,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 },RenderFormat::R16G16B16A16_FLOAT,RenderFormat::D32_FLOAT,1,false,0x11 },
{ reinterpret_cast<GuestShader*>(0x666E7FB7FCAE0FB7),reinterpret_cast<GuestShader*>(0x3838E2D27966B21C),reinterpret_cast<GuestVertexDeclaration*>(0xDEB308DCDDF979C7),false,true,true,RenderBlend::ONE,RenderBlend::ZERO,RenderCullMode::BACK,RenderComparisonFunction::GREATER_EQUAL,false,RenderBlendOperation::ADD,0,0,RenderBlend::ONE,RenderBlend::ZERO,RenderBlendOperation::ADD,0xF,RenderPrimitiveTopology::TRIANGLE_STRIP,{ 44,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 },RenderFormat::R16G16B16A16_FLOAT,RenderFormat::D32_FLOAT,1,false,0x11 },
{ reinterpret_cast<GuestShader*>(0x666E7FB7FCAE0FB7),reinterpret_cast<GuestShader*>(0x5A75A52C3F722625),reinterpret_cast<GuestVertexDeclaration*>(0xDEB308DCDDF979C7),false,true,false,RenderBlend::SRC_ALPHA,RenderBlend::INV_SRC_ALPHA,RenderCullMode::BACK,RenderComparisonFunction::GREATER_EQUAL,true,RenderBlendOperation::ADD,0,0,RenderBlend::SRC_ALPHA,RenderBlend::INV_SRC_ALPHA,RenderBlendOperation::ADD,0xF,RenderPrimitiveTopology::TRIANGLE_STRIP,{ 44,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 },RenderFormat::R16G16B16A16_FLOAT,RenderFormat::D32_FLOAT,1,false,0x11 },
{ reinterpret_cast<GuestShader*>(0x666E7FB7FCAE0FB7),reinterpret_cast<GuestShader*>(0x86CD1B8641C60EE6),reinterpret_cast<GuestVertexDeclaration*>(0xC64D046063DE2F63),false,true,false,RenderBlend::SRC_ALPHA,RenderBlend::INV_SRC_ALPHA,RenderCullMode::BACK,RenderComparisonFunction::GREATER_EQUAL,true,RenderBlendOperation::ADD,0,0,RenderBlend::SRC_ALPHA,RenderBlend::INV_SRC_ALPHA,RenderBlendOperation::ADD,0xF,RenderPrimitiveTopology::TRIANGLE_STRIP,{ 44,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 },RenderFormat::R16G16B16A16_FLOAT,RenderFormat::D32_FLOAT,1,false,0x11 },
{ reinterpret_cast<GuestShader*>(0x666E7FB7FCAE0FB7),reinterpret_cast<GuestShader*>(0x874793F8CC9C7EB0),reinterpret_cast<GuestVertexDeclaration*>(0xDEB308DCDDF979C7),false,true,true,RenderBlend::ONE,RenderBlend::ZERO,RenderCullMode::BACK,RenderComparisonFunction::GREATER_EQUAL,false,RenderBlendOperation::ADD,0,0,RenderBlend::ONE,RenderBlend::ZERO,RenderBlendOperation::ADD,0xF,RenderPrimitiveTopology::TRIANGLE_STRIP,{ 44,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 },RenderFormat::R16G16B16A16_FLOAT,RenderFormat::D32_FLOAT,1,false,0x11 },
{ reinterpret_cast<GuestShader*>(0x666E7FB7FCAE0FB7),reinterpret_cast<GuestShader*>(0xB0F7121362A63137),reinterpret_cast<GuestVertexDeclaration*>(0xDEB308DCDDF979C7),false,true,true,RenderBlend::ONE,RenderBlend::ZERO,RenderCullMode::BACK,RenderComparisonFunction::GREATER_EQUAL,false,RenderBlendOperation::ADD,0,0,RenderBlend::ONE,RenderBlend::ZERO,RenderBlendOperation::ADD,0xF,RenderPrimitiveTopology::TRIANGLE_STRIP,{ 44,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 },RenderFormat::R16G16B16A16_FLOAT,RenderFormat::D32_FLOAT,1,false,0x11 },
{ reinterpret_cast<GuestShader*>(0x666E7FB7FCAE0FB7),reinterpret_cast<GuestShader*>(0xB0F7121362A63137),reinterpret_cast<GuestVertexDeclaration*>(0xF10787EFFEEC0153),false,true,true,RenderBlend::ONE,RenderBlend::ZERO,RenderCullMode::BACK,RenderComparisonFunction::GREATER_EQUAL,false,RenderBlendOperation::ADD,0,0,RenderBlend::ONE,RenderBlend::ZERO,RenderBlendOperation::ADD,0xF,RenderPrimitiveTopology::TRIANGLE_STRIP,{ 48,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 },RenderFormat::R16G16B16A16_FLOAT,RenderFormat::D32_FLOAT,1,false,0x11 },
{ reinterpret_cast<GuestShader*>(0x666E7FB7FCAE0FB7),reinterpret_cast<GuestShader*>(0xB23ACF01C99C2988),reinterpret_cast<GuestVertexDeclaration*>(0xDEB308DCDDF979C7),false,true,true,RenderBlend::ONE,RenderBlend::ZERO,RenderCullMode::BACK,RenderComparisonFunction::GREATER_EQUAL,false,RenderBlendOperation::ADD,0,0,RenderBlend::ONE,RenderBlend::ZERO,RenderBlendOperation::ADD,0xF,RenderPrimitiveTopology::TRIANGLE_STRIP,{ 44,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 },RenderFormat::R16G16B16A16_FLOAT,RenderFormat::D32_FLOAT,1,false,0x11 },
@@ -65,6 +71,7 @@
{ reinterpret_cast<GuestShader*>(0x666E7FB7FCAE0FB7),reinterpret_cast<GuestShader*>(0xC03A891201D4E9E7),reinterpret_cast<GuestVertexDeclaration*>(0xDEB308DCDDF979C7),false,true,true,RenderBlend::ONE,RenderBlend::ZERO,RenderCullMode::BACK,RenderComparisonFunction::GREATER_EQUAL,false,RenderBlendOperation::ADD,0,0,RenderBlend::ONE,RenderBlend::ZERO,RenderBlendOperation::ADD,0xF,RenderPrimitiveTopology::TRIANGLE_STRIP,{ 44,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 },RenderFormat::R16G16B16A16_FLOAT,RenderFormat::D32_FLOAT,1,false,0x15 },
{ reinterpret_cast<GuestShader*>(0x666E7FB7FCAE0FB7),reinterpret_cast<GuestShader*>(0xCE7A73C836F03E6),reinterpret_cast<GuestVertexDeclaration*>(0xDEB308DCDDF979C7),false,true,true,RenderBlend::ONE,RenderBlend::ZERO,RenderCullMode::BACK,RenderComparisonFunction::GREATER_EQUAL,false,RenderBlendOperation::ADD,0,0,RenderBlend::ONE,RenderBlend::ZERO,RenderBlendOperation::ADD,0xF,RenderPrimitiveTopology::TRIANGLE_STRIP,{ 44,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 },RenderFormat::R16G16B16A16_FLOAT,RenderFormat::D32_FLOAT,1,false,0x11 },
{ reinterpret_cast<GuestShader*>(0x666E7FB7FCAE0FB7),reinterpret_cast<GuestShader*>(0xD4D1534DD857403),reinterpret_cast<GuestVertexDeclaration*>(0xDEB308DCDDF979C7),false,true,false,RenderBlend::SRC_ALPHA,RenderBlend::INV_SRC_ALPHA,RenderCullMode::BACK,RenderComparisonFunction::GREATER_EQUAL,true,RenderBlendOperation::ADD,0,0,RenderBlend::ONE,RenderBlend::ZERO,RenderBlendOperation::ADD,0xF,RenderPrimitiveTopology::TRIANGLE_STRIP,{ 44,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 },RenderFormat::R16G16B16A16_FLOAT,RenderFormat::D32_FLOAT,1,false,0x11 },
{ reinterpret_cast<GuestShader*>(0x666E7FB7FCAE0FB7),reinterpret_cast<GuestShader*>(0xD4D1534DD857403),reinterpret_cast<GuestVertexDeclaration*>(0xF10787EFFEEC0153),false,true,false,RenderBlend::SRC_ALPHA,RenderBlend::INV_SRC_ALPHA,RenderCullMode::BACK,RenderComparisonFunction::GREATER_EQUAL,true,RenderBlendOperation::ADD,0,0,RenderBlend::SRC_ALPHA,RenderBlend::INV_SRC_ALPHA,RenderBlendOperation::ADD,0xF,RenderPrimitiveTopology::TRIANGLE_STRIP,{ 48,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 },RenderFormat::R16G16B16A16_FLOAT,RenderFormat::D32_FLOAT,1,false,0x11 },
{ reinterpret_cast<GuestShader*>(0x666E7FB7FCAE0FB7),reinterpret_cast<GuestShader*>(0xD4D1534DD857403),reinterpret_cast<GuestVertexDeclaration*>(0xF10787EFFEEC0153),false,true,false,RenderBlend::SRC_ALPHA,RenderBlend::INV_SRC_ALPHA,RenderCullMode::NONE,RenderComparisonFunction::GREATER_EQUAL,true,RenderBlendOperation::ADD,0,0,RenderBlend::SRC_ALPHA,RenderBlend::INV_SRC_ALPHA,RenderBlendOperation::ADD,0xF,RenderPrimitiveTopology::TRIANGLE_STRIP,{ 48,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 },RenderFormat::R16G16B16A16_FLOAT,RenderFormat::D32_FLOAT,1,false,0x11 },
{ reinterpret_cast<GuestShader*>(0x666E7FB7FCAE0FB7),reinterpret_cast<GuestShader*>(0xE1748A1E1E38FC5F),reinterpret_cast<GuestVertexDeclaration*>(0x6538EB0019C3A29A),false,true,true,RenderBlend::ONE,RenderBlend::ZERO,RenderCullMode::NONE,RenderComparisonFunction::GREATER_EQUAL,false,RenderBlendOperation::ADD,0,0,RenderBlend::ONE,RenderBlend::ZERO,RenderBlendOperation::ADD,0xF,RenderPrimitiveTopology::TRIANGLE_STRIP,{ 52,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 },RenderFormat::R16G16B16A16_FLOAT,RenderFormat::D32_FLOAT,1,false,0x15 },
{ reinterpret_cast<GuestShader*>(0x666E7FB7FCAE0FB7),reinterpret_cast<GuestShader*>(0xE1748A1E1E38FC5F),reinterpret_cast<GuestVertexDeclaration*>(0xDEB308DCDDF979C7),false,true,true,RenderBlend::ONE,RenderBlend::ZERO,RenderCullMode::BACK,RenderComparisonFunction::GREATER_EQUAL,false,RenderBlendOperation::ADD,0,0,RenderBlend::ONE,RenderBlend::ZERO,RenderBlendOperation::ADD,0xF,RenderPrimitiveTopology::TRIANGLE_STRIP,{ 44,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 },RenderFormat::R16G16B16A16_FLOAT,RenderFormat::D32_FLOAT,1,false,0x15 },
@@ -94,6 +101,7 @@
{ reinterpret_cast<GuestShader*>(0x6DE86503F8AA38E2),reinterpret_cast<GuestShader*>(0x9FA5AACB5B14A226),reinterpret_cast<GuestVertexDeclaration*>(0xD452411D3FB80A0D),false,false,false,RenderBlend::ONE,RenderBlend::ZERO,RenderCullMode::NONE,RenderComparisonFunction::LESS,false,RenderBlendOperation::ADD,0,0,RenderBlend::ONE,RenderBlend::ZERO,RenderBlendOperation::ADD,0xF,RenderPrimitiveTopology::TRIANGLE_STRIP,{ 20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 },RenderFormat::R8G8B8A8_UNORM,RenderFormat::UNKNOWN,1,false,0x0 },
{ reinterpret_cast<GuestShader*>(0x6DE86503F8AA38E2),reinterpret_cast<GuestShader*>(0xC47F2F91BA2A5D86),reinterpret_cast<GuestVertexDeclaration*>(0xD452411D3FB80A0D),false,false,false,RenderBlend::ONE,RenderBlend::ZERO,RenderCullMode::NONE,RenderComparisonFunction::LESS,false,RenderBlendOperation::ADD,0,0,RenderBlend::ONE,RenderBlend::ZERO,RenderBlendOperation::ADD,0xF,RenderPrimitiveTopology::TRIANGLE_STRIP,{ 20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 },RenderFormat::R8G8B8A8_UNORM,RenderFormat::UNKNOWN,1,false,0x0 },
{ reinterpret_cast<GuestShader*>(0x6DE86503F8AA38E2),reinterpret_cast<GuestShader*>(0xFB79F59782376846),reinterpret_cast<GuestVertexDeclaration*>(0xD452411D3FB80A0D),false,false,false,RenderBlend::ONE,RenderBlend::ZERO,RenderCullMode::NONE,RenderComparisonFunction::LESS,false,RenderBlendOperation::ADD,0,0,RenderBlend::ONE,RenderBlend::ZERO,RenderBlendOperation::ADD,0xF,RenderPrimitiveTopology::TRIANGLE_STRIP,{ 20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 },RenderFormat::R8G8B8A8_UNORM,RenderFormat::UNKNOWN,1,false,0x0 },
{ reinterpret_cast<GuestShader*>(0x6DE86503F8AA38E2),reinterpret_cast<GuestShader*>(0xFF42BE2DBCE820C9),reinterpret_cast<GuestVertexDeclaration*>(0xD452411D3FB80A0D),false,false,false,RenderBlend::ONE,RenderBlend::ZERO,RenderCullMode::NONE,RenderComparisonFunction::LESS,false,RenderBlendOperation::ADD,0,0,RenderBlend::ONE,RenderBlend::ZERO,RenderBlendOperation::ADD,0xF,RenderPrimitiveTopology::TRIANGLE_STRIP,{ 20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 },RenderFormat::R8G8B8A8_UNORM,RenderFormat::UNKNOWN,1,false,0x0 },
{ reinterpret_cast<GuestShader*>(0x720D6E5EDA78433B),reinterpret_cast<GuestShader*>(0x96EACBACDE1AAFAA),reinterpret_cast<GuestVertexDeclaration*>(0xA81F28FA43A9B511),false,true,false,RenderBlend::SRC_ALPHA,RenderBlend::ONE,RenderCullMode::NONE,RenderComparisonFunction::GREATER_EQUAL,true,RenderBlendOperation::ADD,0,0,RenderBlend::SRC_ALPHA,RenderBlend::INV_SRC_ALPHA,RenderBlendOperation::ADD,0xF,RenderPrimitiveTopology::TRIANGLE_STRIP,{ 36,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 },RenderFormat::R16G16B16A16_FLOAT,RenderFormat::D32_FLOAT,1,false,0x10 },
{ reinterpret_cast<GuestShader*>(0x720D6E5EDA78433B),reinterpret_cast<GuestShader*>(0x96EACBACDE1AAFAA),reinterpret_cast<GuestVertexDeclaration*>(0xA81F28FA43A9B511),false,true,false,RenderBlend::SRC_ALPHA,RenderBlend::ONE,RenderCullMode::NONE,RenderComparisonFunction::GREATER_EQUAL,true,RenderBlendOperation::ADD,0,0,RenderBlend::SRC_ALPHA,RenderBlend::INV_SRC_ALPHA,RenderBlendOperation::ADD,0xF,RenderPrimitiveTopology::TRIANGLE_STRIP,{ 36,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 },RenderFormat::R16G16B16A16_FLOAT,RenderFormat::D32_FLOAT,1,false,0x14 },
{ reinterpret_cast<GuestShader*>(0x734799D14CC5177E),reinterpret_cast<GuestShader*>(0xC9978EB328E1066E),reinterpret_cast<GuestVertexDeclaration*>(0x84BACD816D86543C),false,true,false,RenderBlend::SRC_ALPHA,RenderBlend::INV_SRC_ALPHA,RenderCullMode::BACK,RenderComparisonFunction::GREATER_EQUAL,true,RenderBlendOperation::ADD,0,0,RenderBlend::ONE,RenderBlend::ZERO,RenderBlendOperation::ADD,0xF,RenderPrimitiveTopology::TRIANGLE_STRIP,{ 104,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 },RenderFormat::R16G16B16A16_FLOAT,RenderFormat::D32_FLOAT,1,false,0x10 },
@@ -104,6 +112,7 @@
{ reinterpret_cast<GuestShader*>(0x86FE3502D5EC24AA),reinterpret_cast<GuestShader*>(0x68FCC0B90EBC457B),reinterpret_cast<GuestVertexDeclaration*>(0xD452411D3FB80A0D),false,false,false,RenderBlend::SRC_ALPHA,RenderBlend::INV_SRC_ALPHA,RenderCullMode::NONE,RenderComparisonFunction::LESS,true,RenderBlendOperation::ADD,0,0,RenderBlend::SRC_ALPHA,RenderBlend::INV_SRC_ALPHA,RenderBlendOperation::ADD,0xF,RenderPrimitiveTopology::TRIANGLE_STRIP,{ 20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 },RenderFormat::B8G8R8A8_UNORM,RenderFormat::UNKNOWN,1,false,0x0 },
{ reinterpret_cast<GuestShader*>(0x86FE3502D5EC24AA),reinterpret_cast<GuestShader*>(0x94A71CC9B94E3101),reinterpret_cast<GuestVertexDeclaration*>(0xD452411D3FB80A0D),false,false,false,RenderBlend::ONE,RenderBlend::ZERO,RenderCullMode::NONE,RenderComparisonFunction::LESS,false,RenderBlendOperation::ADD,0,0,RenderBlend::ONE,RenderBlend::ZERO,RenderBlendOperation::ADD,0xF,RenderPrimitiveTopology::TRIANGLE_STRIP,{ 20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 },RenderFormat::R16G16_FLOAT,RenderFormat::UNKNOWN,1,false,0x0 },
{ reinterpret_cast<GuestShader*>(0x88F67387B88F932F),reinterpret_cast<GuestShader*>(0x49101E452DF2FE98),reinterpret_cast<GuestVertexDeclaration*>(0x84BACD816D86543C),false,true,false,RenderBlend::SRC_ALPHA,RenderBlend::INV_SRC_ALPHA,RenderCullMode::BACK,RenderComparisonFunction::GREATER_EQUAL,true,RenderBlendOperation::ADD,0,0,RenderBlend::ONE,RenderBlend::ZERO,RenderBlendOperation::ADD,0xF,RenderPrimitiveTopology::TRIANGLE_STRIP,{ 104,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 },RenderFormat::R16G16B16A16_FLOAT,RenderFormat::D32_FLOAT,1,false,0x10 },
{ reinterpret_cast<GuestShader*>(0x8E4BB23465BD909E),reinterpret_cast<GuestShader*>(0x0),reinterpret_cast<GuestVertexDeclaration*>(0xDEB308DCDDF979C7),false,true,true,RenderBlend::ONE,RenderBlend::ZERO,RenderCullMode::FRONT,RenderComparisonFunction::LESS_EQUAL,false,RenderBlendOperation::ADD,0,0,RenderBlend::ONE,RenderBlend::ZERO,RenderBlendOperation::ADD,0x0,RenderPrimitiveTopology::TRIANGLE_STRIP,{ 44,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 },RenderFormat::UNKNOWN,RenderFormat::D32_FLOAT,1,false,0x0 },
{ reinterpret_cast<GuestShader*>(0x8E4BB23465BD909E),reinterpret_cast<GuestShader*>(0x0),reinterpret_cast<GuestVertexDeclaration*>(0xFFFDDC62D86892F1),false,true,true,RenderBlend::ONE,RenderBlend::ZERO,RenderCullMode::NONE,RenderComparisonFunction::LESS_EQUAL,false,RenderBlendOperation::ADD,1,33554,RenderBlend::ONE,RenderBlend::ZERO,RenderBlendOperation::ADD,0x0,RenderPrimitiveTopology::TRIANGLE_LIST,{ 32,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 },RenderFormat::UNKNOWN,RenderFormat::D32_FLOAT,1,false,0x0 },
{ reinterpret_cast<GuestShader*>(0x8E4BB23465BD909E),reinterpret_cast<GuestShader*>(0x0),reinterpret_cast<GuestVertexDeclaration*>(0xFFFDDC62D86892F1),false,true,true,RenderBlend::ONE,RenderBlend::ZERO,RenderCullMode::NONE,RenderComparisonFunction::LESS_EQUAL,false,RenderBlendOperation::ADD,1,33554,RenderBlend::ONE,RenderBlend::ZERO,RenderBlendOperation::ADD,0x0,RenderPrimitiveTopology::TRIANGLE_STRIP,{ 32,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 },RenderFormat::UNKNOWN,RenderFormat::D32_FLOAT,1,false,0x0 },
{ reinterpret_cast<GuestShader*>(0x8EA8F71BA3BE59E7),reinterpret_cast<GuestShader*>(0xA557DD8B24CD2B25),reinterpret_cast<GuestVertexDeclaration*>(0xEC0CD05EE1B1636),false,false,false,RenderBlend::SRC_ALPHA,RenderBlend::INV_SRC_ALPHA,RenderCullMode::NONE,RenderComparisonFunction::LESS,true,RenderBlendOperation::ADD,0,0,RenderBlend::SRC_ALPHA,RenderBlend::INV_SRC_ALPHA,RenderBlendOperation::ADD,0xF,RenderPrimitiveTopology::TRIANGLE_LIST,{ 28,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 },RenderFormat::R16G16B16A16_FLOAT,RenderFormat::UNKNOWN,1,false,0x10 },
@@ -145,6 +154,7 @@
{ reinterpret_cast<GuestShader*>(0xA4CF0215A03D9571),reinterpret_cast<GuestShader*>(0xA3A659F1590CC180),reinterpret_cast<GuestVertexDeclaration*>(0x5A2395E29F93DA3C),false,true,false,RenderBlend::SRC_ALPHA,RenderBlend::INV_SRC_ALPHA,RenderCullMode::NONE,RenderComparisonFunction::GREATER_EQUAL,true,RenderBlendOperation::ADD,0,0,RenderBlend::SRC_ALPHA,RenderBlend::INV_SRC_ALPHA,RenderBlendOperation::ADD,0xF,RenderPrimitiveTopology::TRIANGLE_FAN,{ 32,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 },RenderFormat::R16G16B16A16_FLOAT,RenderFormat::D32_FLOAT,1,false,0x10 },
{ reinterpret_cast<GuestShader*>(0xA59B07C00039C660),reinterpret_cast<GuestShader*>(0x2E69CC2B4937A698),reinterpret_cast<GuestVertexDeclaration*>(0xFB4544424558E4C),false,true,true,RenderBlend::ONE,RenderBlend::ZERO,RenderCullMode::BACK,RenderComparisonFunction::GREATER_EQUAL,false,RenderBlendOperation::ADD,0,0,RenderBlend::ONE,RenderBlend::ZERO,RenderBlendOperation::ADD,0xF,RenderPrimitiveTopology::TRIANGLE_STRIP,{ 40,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 },RenderFormat::R16G16B16A16_FLOAT,RenderFormat::D32_FLOAT,1,false,0x11 },
{ reinterpret_cast<GuestShader*>(0xA59B07C00039C660),reinterpret_cast<GuestShader*>(0xF6FAD0CDA667264),reinterpret_cast<GuestVertexDeclaration*>(0xFB4544424558E4C),false,true,true,RenderBlend::ONE,RenderBlend::ZERO,RenderCullMode::BACK,RenderComparisonFunction::GREATER_EQUAL,false,RenderBlendOperation::ADD,0,0,RenderBlend::ONE,RenderBlend::ZERO,RenderBlendOperation::ADD,0xF,RenderPrimitiveTopology::TRIANGLE_STRIP,{ 40,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 },RenderFormat::R16G16B16A16_FLOAT,RenderFormat::D32_FLOAT,1,false,0x11 },
{ reinterpret_cast<GuestShader*>(0xA790E2F622DADAD8),reinterpret_cast<GuestShader*>(0xD56D0D7219E51F1D),reinterpret_cast<GuestVertexDeclaration*>(0x84BACD816D86543C),false,true,true,RenderBlend::ONE,RenderBlend::ZERO,RenderCullMode::BACK,RenderComparisonFunction::GREATER_EQUAL,false,RenderBlendOperation::ADD,0,0,RenderBlend::ONE,RenderBlend::ZERO,RenderBlendOperation::ADD,0xF,RenderPrimitiveTopology::TRIANGLE_STRIP,{ 104,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 },RenderFormat::R16G16B16A16_FLOAT,RenderFormat::D32_FLOAT,1,false,0x10 },
{ reinterpret_cast<GuestShader*>(0xA7C9D01F7AD3B9D0),reinterpret_cast<GuestShader*>(0x481905CF40E1678D),reinterpret_cast<GuestVertexDeclaration*>(0x84BACD816D86543C),false,true,true,RenderBlend::ONE,RenderBlend::ZERO,RenderCullMode::NONE,RenderComparisonFunction::GREATER_EQUAL,false,RenderBlendOperation::ADD,0,0,RenderBlend::ONE,RenderBlend::ZERO,RenderBlendOperation::ADD,0xF,RenderPrimitiveTopology::TRIANGLE_STRIP,{ 104,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 },RenderFormat::R16G16B16A16_FLOAT,RenderFormat::D32_FLOAT,1,false,0x14 },
{ reinterpret_cast<GuestShader*>(0xA7C9D01F7AD3B9D0),reinterpret_cast<GuestShader*>(0x481905CF40E1678D),reinterpret_cast<GuestVertexDeclaration*>(0xC64D046063DE2F63),false,true,true,RenderBlend::ONE,RenderBlend::ZERO,RenderCullMode::NONE,RenderComparisonFunction::GREATER_EQUAL,false,RenderBlendOperation::ADD,0,0,RenderBlend::ONE,RenderBlend::ZERO,RenderBlendOperation::ADD,0xF,RenderPrimitiveTopology::TRIANGLE_STRIP,{ 44,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 },RenderFormat::R16G16B16A16_FLOAT,RenderFormat::D32_FLOAT,1,false,0x11 },
{ reinterpret_cast<GuestShader*>(0xAC38B793E9C54AC5),reinterpret_cast<GuestShader*>(0x24CAF5A2F1B2AF40),reinterpret_cast<GuestVertexDeclaration*>(0x3CB3EF6B1C43B8C),true,true,false,RenderBlend::SRC_ALPHA,RenderBlend::INV_SRC_ALPHA,RenderCullMode::BACK,RenderComparisonFunction::GREATER_EQUAL,true,RenderBlendOperation::ADD,0,0,RenderBlend::ONE,RenderBlend::ZERO,RenderBlendOperation::ADD,0xF,RenderPrimitiveTopology::TRIANGLE_STRIP,{ 104,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0 },RenderFormat::R16G16B16A16_FLOAT,RenderFormat::D32_FLOAT,1,false,0x10 },
@@ -163,6 +173,8 @@
{ reinterpret_cast<GuestShader*>(0xBE3AD1D0FE788D2),reinterpret_cast<GuestShader*>(0x4CB3784D7108745F),reinterpret_cast<GuestVertexDeclaration*>(0xFB4544424558E4C),false,true,true,RenderBlend::ONE,RenderBlend::ZERO,RenderCullMode::BACK,RenderComparisonFunction::GREATER_EQUAL,false,RenderBlendOperation::ADD,0,0,RenderBlend::ONE,RenderBlend::ZERO,RenderBlendOperation::ADD,0xF,RenderPrimitiveTopology::TRIANGLE_STRIP,{ 40,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 },RenderFormat::R16G16B16A16_FLOAT,RenderFormat::D32_FLOAT,1,false,0x11 },
{ reinterpret_cast<GuestShader*>(0xBE3AD1D0FE788D2),reinterpret_cast<GuestShader*>(0xD57D71ED84D8F864),reinterpret_cast<GuestVertexDeclaration*>(0xFB4544424558E4C),false,true,true,RenderBlend::ONE,RenderBlend::ZERO,RenderCullMode::BACK,RenderComparisonFunction::GREATER_EQUAL,false,RenderBlendOperation::ADD,0,0,RenderBlend::ONE,RenderBlend::ZERO,RenderBlendOperation::ADD,0xF,RenderPrimitiveTopology::TRIANGLE_STRIP,{ 40,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 },RenderFormat::R16G16B16A16_FLOAT,RenderFormat::D32_FLOAT,1,false,0x11 },
{ reinterpret_cast<GuestShader*>(0xCF28F33974EC44F6),reinterpret_cast<GuestShader*>(0xD5EA32DB758EF0B8),reinterpret_cast<GuestVertexDeclaration*>(0x7F12180DC3A24B53),true,true,true,RenderBlend::ONE,RenderBlend::ZERO,RenderCullMode::NONE,RenderComparisonFunction::GREATER_EQUAL,false,RenderBlendOperation::ADD,0,0,RenderBlend::ONE,RenderBlend::ZERO,RenderBlendOperation::ADD,0xF,RenderPrimitiveTopology::TRIANGLE_STRIP,{ 32,24,4,0,0,0,0,0,0,0,0,0,0,0,0,0 },RenderFormat::R16G16B16A16_FLOAT,RenderFormat::D32_FLOAT,1,false,0x14 },
{ reinterpret_cast<GuestShader*>(0xD738D79626374EBE),reinterpret_cast<GuestShader*>(0x47CDF40D1C605E0D),reinterpret_cast<GuestVertexDeclaration*>(0x84BACD816D86543C),false,true,false,RenderBlend::SRC_ALPHA,RenderBlend::INV_SRC_ALPHA,RenderCullMode::BACK,RenderComparisonFunction::GREATER_EQUAL,true,RenderBlendOperation::ADD,0,0,RenderBlend::SRC_ALPHA,RenderBlend::INV_SRC_ALPHA,RenderBlendOperation::ADD,0xF,RenderPrimitiveTopology::TRIANGLE_STRIP,{ 104,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 },RenderFormat::R16G16B16A16_FLOAT,RenderFormat::D32_FLOAT,1,false,0x10 },
{ reinterpret_cast<GuestShader*>(0xD738D79626374EBE),reinterpret_cast<GuestShader*>(0x47CDF40D1C605E0D),reinterpret_cast<GuestVertexDeclaration*>(0xB7BBCC93738C9DE4),false,true,true,RenderBlend::ONE,RenderBlend::ZERO,RenderCullMode::BACK,RenderComparisonFunction::GREATER_EQUAL,false,RenderBlendOperation::ADD,0,0,RenderBlend::ONE,RenderBlend::ZERO,RenderBlendOperation::ADD,0x0,RenderPrimitiveTopology::TRIANGLE_STRIP,{ 40,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 },RenderFormat::UNKNOWN,RenderFormat::D32_FLOAT,1,false,0x11 },
{ reinterpret_cast<GuestShader*>(0xD738D79626374EBE),reinterpret_cast<GuestShader*>(0x47CDF40D1C605E0D),reinterpret_cast<GuestVertexDeclaration*>(0xFB4544424558E4C),false,true,true,RenderBlend::ONE,RenderBlend::ZERO,RenderCullMode::BACK,RenderComparisonFunction::GREATER_EQUAL,false,RenderBlendOperation::ADD,0,0,RenderBlend::ONE,RenderBlend::ZERO,RenderBlendOperation::ADD,0xF,RenderPrimitiveTopology::TRIANGLE_STRIP,{ 40,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 },RenderFormat::R16G16B16A16_FLOAT,RenderFormat::D32_FLOAT,1,false,0x11 },
{ reinterpret_cast<GuestShader*>(0xD738D79626374EBE),reinterpret_cast<GuestShader*>(0x47CDF40D1C605E0D),reinterpret_cast<GuestVertexDeclaration*>(0xFB4544424558E4C),false,true,true,RenderBlend::ONE,RenderBlend::ZERO,RenderCullMode::BACK,RenderComparisonFunction::GREATER_EQUAL,false,RenderBlendOperation::ADD,0,0,RenderBlend::ONE,RenderBlend::ZERO,RenderBlendOperation::ADD,0xF,RenderPrimitiveTopology::TRIANGLE_STRIP,{ 40,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 },RenderFormat::R16G16B16A16_FLOAT,RenderFormat::D32_FLOAT,1,false,0x15 },
{ reinterpret_cast<GuestShader*>(0xD738D79626374EBE),reinterpret_cast<GuestShader*>(0x96B8F9FDAAB9B658),reinterpret_cast<GuestVertexDeclaration*>(0x84BACD816D86543C),false,true,true,RenderBlend::ONE,RenderBlend::ZERO,RenderCullMode::BACK,RenderComparisonFunction::GREATER_EQUAL,false,RenderBlendOperation::ADD,0,0,RenderBlend::ONE,RenderBlend::ZERO,RenderBlendOperation::ADD,0xF,RenderPrimitiveTopology::TRIANGLE_STRIP,{ 104,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 },RenderFormat::R16G16B16A16_FLOAT,RenderFormat::D32_FLOAT,1,false,0x14 },
@@ -196,6 +208,7 @@
{ reinterpret_cast<GuestShader*>(0xECC9C0BD668FE449),reinterpret_cast<GuestShader*>(0x4C4032F88196B450),reinterpret_cast<GuestVertexDeclaration*>(0xDEB308DCDDF979C7),false,true,true,RenderBlend::ONE,RenderBlend::ZERO,RenderCullMode::BACK,RenderComparisonFunction::GREATER_EQUAL,false,RenderBlendOperation::ADD,0,0,RenderBlend::ONE,RenderBlend::ZERO,RenderBlendOperation::ADD,0xF,RenderPrimitiveTopology::TRIANGLE_STRIP,{ 44,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 },RenderFormat::R16G16B16A16_FLOAT,RenderFormat::D32_FLOAT,1,false,0x11 },
{ reinterpret_cast<GuestShader*>(0xECC9C0BD668FE449),reinterpret_cast<GuestShader*>(0xC7E2C782C058A625),reinterpret_cast<GuestVertexDeclaration*>(0xDEB308DCDDF979C7),false,true,true,RenderBlend::ONE,RenderBlend::ZERO,RenderCullMode::BACK,RenderComparisonFunction::GREATER_EQUAL,false,RenderBlendOperation::ADD,0,0,RenderBlend::ONE,RenderBlend::ZERO,RenderBlendOperation::ADD,0xF,RenderPrimitiveTopology::TRIANGLE_STRIP,{ 44,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 },RenderFormat::R16G16B16A16_FLOAT,RenderFormat::D32_FLOAT,1,false,0x11 },
{ reinterpret_cast<GuestShader*>(0xECC9C0BD668FE449),reinterpret_cast<GuestShader*>(0xFB66DF5D27D3891D),reinterpret_cast<GuestVertexDeclaration*>(0xDEB308DCDDF979C7),false,true,false,RenderBlend::SRC_ALPHA,RenderBlend::INV_SRC_ALPHA,RenderCullMode::BACK,RenderComparisonFunction::GREATER_EQUAL,true,RenderBlendOperation::ADD,0,0,RenderBlend::ONE,RenderBlend::ZERO,RenderBlendOperation::ADD,0xF,RenderPrimitiveTopology::TRIANGLE_STRIP,{ 44,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 },RenderFormat::R16G16B16A16_FLOAT,RenderFormat::D32_FLOAT,1,false,0x11 },
{ reinterpret_cast<GuestShader*>(0xF060DE53CF3B9BB8),reinterpret_cast<GuestShader*>(0xEAADA73091BF526C),reinterpret_cast<GuestVertexDeclaration*>(0xDEB308DCDDF979C7),false,true,true,RenderBlend::ONE,RenderBlend::ZERO,RenderCullMode::NONE,RenderComparisonFunction::GREATER_EQUAL,false,RenderBlendOperation::ADD,0,0,RenderBlend::ONE,RenderBlend::ZERO,RenderBlendOperation::ADD,0xF,RenderPrimitiveTopology::TRIANGLE_STRIP,{ 44,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 },RenderFormat::R16G16B16A16_FLOAT,RenderFormat::D32_FLOAT,1,false,0x15 },
{ reinterpret_cast<GuestShader*>(0xF066433D33B62D54),reinterpret_cast<GuestShader*>(0xE5256B7D753C9D5F),reinterpret_cast<GuestVertexDeclaration*>(0x3CB3EF6B1C43B8C),true,true,false,RenderBlend::SRC_ALPHA,RenderBlend::INV_SRC_ALPHA,RenderCullMode::BACK,RenderComparisonFunction::GREATER_EQUAL,true,RenderBlendOperation::ADD,0,0,RenderBlend::ONE,RenderBlend::ZERO,RenderBlendOperation::ADD,0xF,RenderPrimitiveTopology::TRIANGLE_STRIP,{ 104,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0 },RenderFormat::R16G16B16A16_FLOAT,RenderFormat::D32_FLOAT,1,false,0x10 },
{ reinterpret_cast<GuestShader*>(0xF1D7C544D61D055C),reinterpret_cast<GuestShader*>(0x5A75A52C3F722625),reinterpret_cast<GuestVertexDeclaration*>(0xF10787EFFEEC0153),false,true,true,RenderBlend::ONE,RenderBlend::ZERO,RenderCullMode::BACK,RenderComparisonFunction::GREATER_EQUAL,false,RenderBlendOperation::ADD,0,0,RenderBlend::ONE,RenderBlend::ZERO,RenderBlendOperation::ADD,0xF,RenderPrimitiveTopology::TRIANGLE_STRIP,{ 48,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 },RenderFormat::R16G16B16A16_FLOAT,RenderFormat::D32_FLOAT,1,false,0x11 },
{ reinterpret_cast<GuestShader*>(0xF58C10092C9EF1AF),reinterpret_cast<GuestShader*>(0x1DD6832FA7E79530),reinterpret_cast<GuestVertexDeclaration*>(0x84BACD816D86543C),false,true,true,RenderBlend::ONE,RenderBlend::ZERO,RenderCullMode::BACK,RenderComparisonFunction::GREATER_EQUAL,false,RenderBlendOperation::ADD,0,0,RenderBlend::ONE,RenderBlend::ZERO,RenderBlendOperation::ADD,0xF,RenderPrimitiveTopology::TRIANGLE_STRIP,{ 104,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 },RenderFormat::R16G16B16A16_FLOAT,RenderFormat::D32_FLOAT,1,false,0x10 },

View File

@@ -11,7 +11,7 @@ ImGuiCallbackData* AddImGuiCallback(ImGuiCallback callback)
auto& callbackData = g_callbackData[g_callbackDataIndex];
++g_callbackDataIndex;
ImGui::GetForegroundDrawList()->AddCallback(reinterpret_cast<ImDrawCallback>(callback), callbackData.get());
ImGui::GetBackgroundDrawList()->AddCallback(reinterpret_cast<ImDrawCallback>(callback), callbackData.get());
return callbackData.get();
}

View File

@@ -1,14 +1,17 @@
#pragma once
#define IMGUI_SHADER_MODIFIER_NONE 0
#define IMGUI_SHADER_MODIFIER_SCANLINE 1
#define IMGUI_SHADER_MODIFIER_CHECKERBOARD 2
#define IMGUI_SHADER_MODIFIER_SCANLINE_BUTTON 3
#define IMGUI_SHADER_MODIFIER_TEXT_SKEW 4
#define IMGUI_SHADER_MODIFIER_MARQUEE_FADE 5
#define IMGUI_SHADER_MODIFIER_GRAYSCALE 6
#define IMGUI_SHADER_MODIFIER_TITLE_BEVEL 7
#define IMGUI_SHADER_MODIFIER_CATEGORY_BEVEL 8
#define IMGUI_SHADER_MODIFIER_NONE 0
#define IMGUI_SHADER_MODIFIER_SCANLINE 1
#define IMGUI_SHADER_MODIFIER_CHECKERBOARD 2
#define IMGUI_SHADER_MODIFIER_SCANLINE_BUTTON 3
#define IMGUI_SHADER_MODIFIER_TEXT_SKEW 4
#define IMGUI_SHADER_MODIFIER_HORIZONTAL_MARQUEE_FADE 5
#define IMGUI_SHADER_MODIFIER_VERTICAL_MARQUEE_FADE 6
#define IMGUI_SHADER_MODIFIER_GRAYSCALE 7
#define IMGUI_SHADER_MODIFIER_TITLE_BEVEL 8
#define IMGUI_SHADER_MODIFIER_CATEGORY_BEVEL 9
#define IMGUI_SHADER_MODIFIER_RECTANGLE_BEVEL 10
#define IMGUI_SHADER_MODIFIER_LOW_QUALITY_TEXT 11
#ifdef __cplusplus
@@ -22,6 +25,7 @@ enum class ImGuiCallback : int32_t
SetOutline = -6,
SetProceduralOrigin = -7,
// -8 is ImDrawCallback_ResetRenderState, don't use!
SetAdditive = -9
};
union ImGuiCallbackData
@@ -30,8 +34,10 @@ union ImGuiCallbackData
{
float boundsMin[2];
float boundsMax[2];
uint32_t gradientTop;
uint32_t gradientBottom;
uint32_t gradientTopLeft;
uint32_t gradientTopRight;
uint32_t gradientBottomRight;
uint32_t gradientBottomLeft;
} setGradient;
struct
@@ -64,6 +70,11 @@ union ImGuiCallbackData
{
float proceduralOrigin[2];
} setProceduralOrigin;
struct
{
bool enabled;
} setAdditive;
};
extern ImGuiCallbackData* AddImGuiCallback(ImGuiCallback callback);

View File

@@ -220,7 +220,11 @@ static bool FontBuilder_Build(ImFontAtlas* atlas)
for (size_t i = 0; i < atlas->ConfigData.size(); i++)
{
double spaceAdvance = 0.0;
auto& config = atlas->ConfigData[i];
bool increaseSpacing = strstr(config.Name, "Seurat") != nullptr;
auto& [index, count] = ranges[i];
for (size_t j = 0; j < count; j++)
{
@@ -228,6 +232,18 @@ static bool FontBuilder_Build(ImFontAtlas* atlas)
double x0, y0, x1, y1, u0, v0, u1, v1;
glyph.getQuadPlaneBounds(x0, y0, x1, y1);
glyph.getQuadAtlasBounds(u0, v0, u1, v1);
double advance = glyph.getAdvance();
if (glyph.getCodepoint() == ' ')
{
if (increaseSpacing)
{
advance *= 1.5;
}
spaceAdvance = advance;
}
config.DstFont->AddGlyph(
&config,
glyph.getCodepoint(),
@@ -239,8 +255,41 @@ static bool FontBuilder_Build(ImFontAtlas* atlas)
v1 / packer.height,
u1 / packer.width,
v0 / packer.height,
glyph.getAdvance());
advance);
}
// Used as a zero-width helper for automatic line breaks.
// This is useful for languages like Japanese to separate 'words'
// so that they don't get split mid-kana by the automatic splitter.
config.DstFont->AddGlyph(
&config,
0x200B,
0.0f,
0.0f,
0.0f,
0.0f,
0.0f,
0.0f,
0.0f,
0.0f,
0.0f);
// A duplicate of the normal width space character.
// Overrides the unicode Four-Per-Em Space character.
// This can be used to add visual spacers that are ignored
// by the automatic line splitting logic.
config.DstFont->AddGlyph(
&config,
0x2005,
0.0f,
0.0f,
0.0f,
0.0f,
0.0f,
0.0f,
0.0f,
0.0f,
spaceAdvance);
config.DstFont->BuildLookupTable();
}

View File

@@ -27,6 +27,8 @@
//# define D3D12_DEBUG_LAYER_GPU_BASED_VALIDATION_ENABLED
#endif
//#define D3D12_DEBUG_SET_STABLE_POWER_STATE
// Old Windows SDK versions don't provide this macro, so we workaround it by making sure it is defined.
#ifndef D3D12_RESOURCE_STATE_ALL_SHADER_RESOURCE
#define D3D12_RESOURCE_STATE_ALL_SHADER_RESOURCE (D3D12_RESOURCE_STATE_PIXEL_SHADER_RESOURCE | D3D12_RESOURCE_STATE_NON_PIXEL_SHADER_RESOURCE)
@@ -692,6 +694,20 @@ namespace plume {
);
}
static D3D12_RESOLVE_MODE toD3D12(RenderResolveMode resolveMode) {
switch (resolveMode) {
case RenderResolveMode::MIN:
return D3D12_RESOLVE_MODE_MIN;
case RenderResolveMode::MAX:
return D3D12_RESOLVE_MODE_MAX;
case RenderResolveMode::AVERAGE:
return D3D12_RESOLVE_MODE_AVERAGE;
default:
assert(false && "Unknown resolve mode.");
return D3D12_RESOLVE_MODE_AVERAGE;
}
}
static void setObjectName(ID3D12Object *object, const std::string &name) {
const std::wstring wideCharName = Utf8ToUtf16(name);
object->SetName(wideCharName.c_str());
@@ -1421,6 +1437,52 @@ namespace plume {
return height;
}
// D3D12QueryPool
D3D12QueryPool::D3D12QueryPool(D3D12Device *device, uint32_t queryCount) {
assert(device != nullptr);
assert(queryCount > 0);
this->device = device;
D3D12_QUERY_HEAP_DESC queryHeapDesc = {};
queryHeapDesc.Type = D3D12_QUERY_HEAP_TYPE_TIMESTAMP;
queryHeapDesc.Count = queryCount;
HRESULT res = device->d3d->CreateQueryHeap(&queryHeapDesc, IID_PPV_ARGS(&d3d));
if (FAILED(res)) {
fprintf(stderr, "CreateQueryHeap failed with error code 0x%lX.\n", res);
return;
}
readbackBuffer = device->createBuffer(RenderBufferDesc::ReadbackBuffer(sizeof(uint64_t) * queryCount));
results.resize(queryCount);
}
D3D12QueryPool::~D3D12QueryPool() {
if (d3d != nullptr) {
d3d->Release();
}
}
void D3D12QueryPool::queryResults() {
void *readbackData = readbackBuffer->map();
memcpy(results.data(), readbackData, sizeof(uint64_t) * results.size());
readbackBuffer->unmap();
for (uint64_t &result : results) {
result = result / double(device->timestampFrequency) * 1000000000.0;
}
}
const uint64_t *D3D12QueryPool::getResults() const {
return results.data();
}
uint32_t D3D12QueryPool::getCount() const {
return uint32_t(results.size());
}
// D3D12CommandList
D3D12CommandList::D3D12CommandList(D3D12Device *device, RenderCommandListType type) {
@@ -1916,7 +1978,7 @@ namespace plume {
resetSamplePositions();
}
void D3D12CommandList::resolveTextureRegion(const RenderTexture *dstTexture, uint32_t dstX, uint32_t dstY, const RenderTexture *srcTexture, const RenderRect *srcRect) {
void D3D12CommandList::resolveTextureRegion(const RenderTexture *dstTexture, uint32_t dstX, uint32_t dstY, const RenderTexture *srcTexture, const RenderRect *srcRect, RenderResolveMode resolveMode) {
assert(dstTexture != nullptr);
assert(srcTexture != nullptr);
@@ -1931,7 +1993,7 @@ namespace plume {
}
setSamplePositions(interfaceDstTexture);
d3d->ResolveSubresourceRegion(interfaceDstTexture->d3d, 0, dstX, dstY, interfaceSrcTexture->d3d, 0, (srcRect != nullptr) ? &rect : nullptr, toDXGI(interfaceDstTexture->desc.format), D3D12_RESOLVE_MODE_AVERAGE);
d3d->ResolveSubresourceRegion(interfaceDstTexture->d3d, 0, dstX, dstY, interfaceSrcTexture->d3d, 0, (srcRect != nullptr) ? &rect : nullptr, toDXGI(interfaceDstTexture->desc.format), toD3D12(resolveMode));
resetSamplePositions();
}
@@ -1988,6 +2050,19 @@ namespace plume {
d3d->DiscardResource(interfaceTexture->d3d, nullptr);
}
void D3D12CommandList::resetQueryPool(const RenderQueryPool *queryPool, uint32_t queryFirstIndex, uint32_t queryCount) {
// Do nothing.
}
void D3D12CommandList::writeTimestamp(const RenderQueryPool *queryPool, uint32_t queryIndex) {
assert(queryPool != nullptr);
const D3D12QueryPool *interfaceQueryPool = static_cast<const D3D12QueryPool *>(queryPool);
const D3D12Buffer *readbackBuffer = static_cast<const D3D12Buffer *>(interfaceQueryPool->readbackBuffer.get());
d3d->EndQuery(interfaceQueryPool->d3d, D3D12_QUERY_TYPE_TIMESTAMP, queryIndex);
d3d->ResolveQueryData(interfaceQueryPool->d3d, D3D12_QUERY_TYPE_TIMESTAMP, queryIndex, 1, readbackBuffer->d3d, queryIndex * sizeof(uint64_t));
}
void D3D12CommandList::checkDescriptorHeaps() {
if (!descriptorHeapsSet) {
ID3D12DescriptorHeap *descriptorHeaps[] = { device->viewHeapAllocator->heap, device->samplerHeapAllocator->heap };
@@ -3243,7 +3318,7 @@ namespace plume {
// D3D12Device
D3D12Device::D3D12Device(D3D12Interface *renderInterface) {
D3D12Device::D3D12Device(D3D12Interface *renderInterface, const std::string &preferredDeviceName) {
assert(renderInterface != nullptr);
this->renderInterface = renderInterface;
@@ -3324,10 +3399,19 @@ namespace plume {
dynamicDepthBiasOption = d3d12Options16.DynamicDepthBiasSupported;
}
// Check if the architecture has UMA.
bool uma = false;
D3D12_FEATURE_DATA_ARCHITECTURE1 architecture1 = {};
res = deviceOption->CheckFeatureSupport(D3D12_FEATURE_ARCHITECTURE1, &architecture1, sizeof(architecture1));
if (SUCCEEDED(res)) {
uma = architecture1.UMA;
}
// Pick this adapter and device if it has better feature support than the current one.
std::string deviceName = Utf16ToUtf8(adapterDesc.Description);
bool preferOverNothing = (adapter == nullptr) || (d3d == nullptr);
bool preferVideoMemory = adapterDesc.DedicatedVideoMemory > description.dedicatedVideoMemory;
bool preferUserChoice = false;//wcsstr(adapterDesc.Description, L"AMD") != nullptr;
bool preferUserChoice = preferredDeviceName == deviceName;
bool preferOption = preferOverNothing || preferVideoMemory || preferUserChoice;
if (preferOption) {
if (d3d != nullptr) {
@@ -3346,8 +3430,16 @@ namespace plume {
capabilities.sampleLocations = samplePositionsOption;
capabilities.triangleFan = triangleFanSupportOption;
capabilities.dynamicDepthBias = dynamicDepthBiasOption;
description.name = Utf16ToUtf8(adapterDesc.Description);
capabilities.uma = uma;
description.name = deviceName;
description.dedicatedVideoMemory = adapterDesc.DedicatedVideoMemory;
description.vendor = RenderDeviceVendor(adapterDesc.VendorId);
LARGE_INTEGER adapterVersion = {};
res = adapter->CheckInterfaceSupport(__uuidof(IDXGIDevice), &adapterVersion);
if (SUCCEEDED(res)) {
description.driverVersion = adapterVersion.QuadPart;
}
if (preferUserChoice) {
break;
@@ -3364,6 +3456,10 @@ namespace plume {
return;
}
#ifdef D3D12_DEBUG_SET_STABLE_POWER_STATE
d3d->SetStablePowerState(TRUE);
#endif
D3D12MA::ALLOCATOR_DESC allocatorDesc = {};
allocatorDesc.pDevice = d3d;
allocatorDesc.pAdapter = adapter;
@@ -3431,6 +3527,13 @@ namespace plume {
samplerHeapAllocator = std::make_unique<D3D12DescriptorHeapAllocator>(this, SamplerDescriptorHeapSize, D3D12_DESCRIPTOR_HEAP_TYPE_SAMPLER);
colorTargetHeapAllocator = std::make_unique<D3D12DescriptorHeapAllocator>(this, TargetDescriptorHeapSize, D3D12_DESCRIPTOR_HEAP_TYPE_RTV);
depthTargetHeapAllocator = std::make_unique<D3D12DescriptorHeapAllocator>(this, TargetDescriptorHeapSize, D3D12_DESCRIPTOR_HEAP_TYPE_DSV);
// Create a command queue only for retrieving the timestamp frequency. Delete it immediately afterwards.
std::unique_ptr<D3D12CommandQueue> timestampCommandQueue = std::make_unique<D3D12CommandQueue>(this, RenderCommandListType::DIRECT);
res = timestampCommandQueue->d3d->GetTimestampFrequency(&timestampFrequency);
if (FAILED(res)) {
fprintf(stderr, "GetTimestampFrequency failed with error code 0x%lX. Timestamps will be inaccurate.\n", res);
}
}
D3D12Device::~D3D12Device() {
@@ -3505,6 +3608,10 @@ namespace plume {
return std::make_unique<D3D12Framebuffer>(this, desc);
}
std::unique_ptr<RenderQueryPool> D3D12Device::createQueryPool(uint32_t queryCount) {
return std::make_unique<D3D12QueryPool>(this, queryCount);
}
void D3D12Device::setBottomLevelASBuildInfo(RenderBottomLevelASBuildInfo &buildInfo, const RenderBottomLevelASMesh *meshes, uint32_t meshCount, bool preferFastBuild, bool preferFastTrace) {
assert(meshes != nullptr);
assert(meshCount > 0);
@@ -3738,6 +3845,21 @@ namespace plume {
// Fill capabilities.
capabilities.shaderFormat = RenderShaderFormat::DXIL;
// Fill device names.
UINT adapterIndex = 0;
IDXGIAdapter1 *adapterOption = nullptr;
while (dxgiFactory->EnumAdapters1(adapterIndex++, &adapterOption) != DXGI_ERROR_NOT_FOUND) {
DXGI_ADAPTER_DESC1 adapterDesc;
adapterOption->GetDesc1(&adapterDesc);
// Ignore remote or software adapters.
if ((adapterDesc.Flags & (DXGI_ADAPTER_FLAG_REMOTE | DXGI_ADAPTER_FLAG_SOFTWARE)) == 0) {
deviceNames.emplace_back(Utf16ToUtf8(adapterDesc.Description));
}
adapterOption->Release();
}
}
D3D12Interface::~D3D12Interface() {
@@ -3746,8 +3868,8 @@ namespace plume {
}
}
std::unique_ptr<RenderDevice> D3D12Interface::createDevice() {
std::unique_ptr<D3D12Device> createdDevice = std::make_unique<D3D12Device>(this);
std::unique_ptr<RenderDevice> D3D12Interface::createDevice(const std::string &preferredDeviceName) {
std::unique_ptr<D3D12Device> createdDevice = std::make_unique<D3D12Device>(this, preferredDeviceName);
return createdDevice->isValid() ? std::move(createdDevice) : nullptr;
}
@@ -3755,6 +3877,10 @@ namespace plume {
return capabilities;
}
const std::vector<std::string> &D3D12Interface::getDeviceNames() const {
return deviceNames;
}
bool D3D12Interface::isValid() const {
return dxgiFactory != nullptr;
}

View File

@@ -144,6 +144,19 @@ namespace plume {
uint32_t getHeight() const override;
};
struct D3D12QueryPool : RenderQueryPool {
D3D12Device *device = nullptr;
ID3D12QueryHeap *d3d = nullptr;
std::vector<uint64_t> results;
std::unique_ptr<RenderBuffer> readbackBuffer;
D3D12QueryPool(D3D12Device *device, uint32_t queryCount);
virtual ~D3D12QueryPool() override;
virtual void queryResults() override;
virtual const uint64_t *getResults() const override;
virtual uint32_t getCount() const override;
};
struct D3D12CommandList : RenderCommandList {
ID3D12GraphicsCommandList9 *d3d = nullptr;
ID3D12CommandAllocator *commandAllocator = nullptr;
@@ -192,10 +205,12 @@ namespace plume {
void copyBuffer(const RenderBuffer *dstBuffer, const RenderBuffer *srcBuffer) override;
void copyTexture(const RenderTexture *dstTexture, const RenderTexture *srcTexture) override;
void resolveTexture(const RenderTexture *dstTexture, const RenderTexture *srcTexture) override;
void resolveTextureRegion(const RenderTexture *dstTexture, uint32_t dstX, uint32_t dstY, const RenderTexture *srcTexture, const RenderRect *srcRect) override;
void resolveTextureRegion(const RenderTexture *dstTexture, uint32_t dstX, uint32_t dstY, const RenderTexture *srcTexture, const RenderRect *srcRect, RenderResolveMode resolveMode) override;
void buildBottomLevelAS(const RenderAccelerationStructure *dstAccelerationStructure, RenderBufferReference scratchBuffer, const RenderBottomLevelASBuildInfo &buildInfo) override;
void buildTopLevelAS(const RenderAccelerationStructure *dstAccelerationStructure, RenderBufferReference scratchBuffer, RenderBufferReference instancesBuffer, const RenderTopLevelASBuildInfo &buildInfo) override;
void discardTexture(const RenderTexture* texture) override;
void resetQueryPool(const RenderQueryPool *queryPool, uint32_t queryFirstIndex, uint32_t queryCount) override;
void writeTimestamp(const RenderQueryPool *queryPool, uint32_t queryIndex) override;
void checkDescriptorHeaps();
void notifyDescriptorHeapWasChangedExternally();
void checkTopology();
@@ -417,8 +432,9 @@ namespace plume {
std::unique_ptr<D3D12DescriptorHeapAllocator> depthTargetHeapAllocator;
RenderDeviceCapabilities capabilities;
RenderDeviceDescription description;
uint64_t timestampFrequency = 1;
D3D12Device(D3D12Interface *renderInterface);
D3D12Device(D3D12Interface *renderInterface, const std::string &preferredDeviceName);
~D3D12Device() override;
std::unique_ptr<RenderCommandList> createCommandList(RenderCommandListType type) override;
std::unique_ptr<RenderDescriptorSet> createDescriptorSet(const RenderDescriptorSetDesc &desc) override;
@@ -436,6 +452,7 @@ namespace plume {
std::unique_ptr<RenderCommandFence> createCommandFence() override;
std::unique_ptr<RenderCommandSemaphore> createCommandSemaphore() override;
std::unique_ptr<RenderFramebuffer> createFramebuffer(const RenderFramebufferDesc &desc) override;
std::unique_ptr<RenderQueryPool> createQueryPool(uint32_t queryCount) override;
void setBottomLevelASBuildInfo(RenderBottomLevelASBuildInfo &buildInfo, const RenderBottomLevelASMesh *meshes, uint32_t meshCount, bool preferFastBuild, bool preferFastTrace) override;
void setTopLevelASBuildInfo(RenderTopLevelASBuildInfo &buildInfo, const RenderTopLevelASInstance *instances, uint32_t instanceCount, bool preferFastBuild, bool preferFastTrace) override;
void setShaderBindingTableInfo(RenderShaderBindingTableInfo &tableInfo, const RenderShaderBindingGroups &groups, const RenderPipeline *pipeline, RenderDescriptorSet **descriptorSets, uint32_t descriptorSetCount) override;
@@ -450,11 +467,13 @@ namespace plume {
struct D3D12Interface : RenderInterface {
IDXGIFactory4 *dxgiFactory = nullptr;
RenderInterfaceCapabilities capabilities;
std::vector<std::string> deviceNames;
D3D12Interface();
~D3D12Interface() override;
std::unique_ptr<RenderDevice> createDevice() override;
std::unique_ptr<RenderDevice> createDevice(const std::string &preferredDeviceName) override;
const RenderInterfaceCapabilities &getCapabilities() const override;
const std::vector<std::string> &getDeviceNames() const override;
bool isValid() const;
};
};

View File

@@ -143,10 +143,12 @@ namespace plume {
virtual void copyBuffer(const RenderBuffer *dstBuffer, const RenderBuffer *srcBuffer) = 0;
virtual void copyTexture(const RenderTexture *dstTexture, const RenderTexture *srcTexture) = 0;
virtual void resolveTexture(const RenderTexture *dstTexture, const RenderTexture *srcTexture) = 0;
virtual void resolveTextureRegion(const RenderTexture *dstTexture, uint32_t dstX, uint32_t dstY, const RenderTexture *srcTexture, const RenderRect *srcRect = nullptr) = 0;
virtual void resolveTextureRegion(const RenderTexture *dstTexture, uint32_t dstX, uint32_t dstY, const RenderTexture *srcTexture, const RenderRect *srcRect = nullptr, RenderResolveMode resolveMode = RenderResolveMode::AVERAGE) = 0;
virtual void buildBottomLevelAS(const RenderAccelerationStructure *dstAccelerationStructure, RenderBufferReference scratchBuffer, const RenderBottomLevelASBuildInfo &buildInfo) = 0;
virtual void buildTopLevelAS(const RenderAccelerationStructure *dstAccelerationStructure, RenderBufferReference scratchBuffer, RenderBufferReference instancesBuffer, const RenderTopLevelASBuildInfo &buildInfo) = 0;
virtual void discardTexture(const RenderTexture* texture) = 0; // D3D12 only.
virtual void resetQueryPool(const RenderQueryPool *queryPool, uint32_t queryFirstIndex, uint32_t queryCount) = 0;
virtual void writeTimestamp(const RenderQueryPool *queryPool, uint32_t queryIndex) = 0;
// Concrete implementation shortcuts.
inline void barriers(RenderBarrierStages stages, const RenderBufferBarrier &barrier) {
@@ -208,6 +210,13 @@ namespace plume {
virtual std::unique_ptr<RenderTexture> createTexture(const RenderTextureDesc &desc) = 0;
};
struct RenderQueryPool {
virtual ~RenderQueryPool() { }
virtual void queryResults() = 0;
virtual const uint64_t *getResults() const = 0;
virtual uint32_t getCount() const = 0;
};
struct RenderDevice {
virtual ~RenderDevice() { }
virtual std::unique_ptr<RenderCommandList> createCommandList(RenderCommandListType type) = 0;
@@ -226,6 +235,7 @@ namespace plume {
virtual std::unique_ptr<RenderCommandFence> createCommandFence() = 0;
virtual std::unique_ptr<RenderCommandSemaphore> createCommandSemaphore() = 0;
virtual std::unique_ptr<RenderFramebuffer> createFramebuffer(const RenderFramebufferDesc &desc) = 0;
virtual std::unique_ptr<RenderQueryPool> createQueryPool(uint32_t queryCount) = 0;
virtual void setBottomLevelASBuildInfo(RenderBottomLevelASBuildInfo &buildInfo, const RenderBottomLevelASMesh *meshes, uint32_t meshCount, bool preferFastBuild = true, bool preferFastTrace = false) = 0;
virtual void setTopLevelASBuildInfo(RenderTopLevelASBuildInfo &buildInfo, const RenderTopLevelASInstance *instances, uint32_t instanceCount, bool preferFastBuild = true, bool preferFastTrace = false) = 0;
virtual void setShaderBindingTableInfo(RenderShaderBindingTableInfo &tableInfo, const RenderShaderBindingGroups &groups, const RenderPipeline *pipeline, RenderDescriptorSet **descriptorSets, uint32_t descriptorSetCount) = 0;
@@ -237,7 +247,8 @@ namespace plume {
struct RenderInterface {
virtual ~RenderInterface() { }
virtual std::unique_ptr<RenderDevice> createDevice() = 0;
virtual std::unique_ptr<RenderDevice> createDevice(const std::string &preferredDeviceName = "") = 0;
virtual const std::vector<std::string> &getDeviceNames() const = 0;
virtual const RenderInterfaceCapabilities &getCapabilities() const = 0;
};

View File

@@ -69,9 +69,17 @@ namespace plume {
struct RenderSampler;
struct RenderShader;
struct RenderTexture;
struct RenderQueryPool;
// Enums.
enum class RenderDeviceVendor {
UNKNOWN = 0x0,
AMD = 0x1002,
NVIDIA = 0x10DE,
INTEL = 0x8086
};
enum class RenderFormat {
UNKNOWN,
R32G32B32A32_TYPELESS,
@@ -475,6 +483,20 @@ namespace plume {
typedef uint32_t RenderSampleCounts;
enum class RenderDeviceType {
UNKNOWN,
INTEGRATED,
DISCRETE,
VIRTUAL,
CPU
};
enum class RenderResolveMode {
MIN,
MAX,
AVERAGE
};
// Global functions.
constexpr uint32_t RenderFormatSize(RenderFormat format) {
@@ -1127,7 +1149,7 @@ namespace plume {
desc.srcBlend = RenderBlend::SRC_ALPHA;
desc.dstBlend = RenderBlend::INV_SRC_ALPHA;
desc.blendOp = RenderBlendOperation::ADD;
desc.srcBlendAlpha = RenderBlend::ONE;
desc.srcBlendAlpha = RenderBlend::SRC_ALPHA;
desc.dstBlendAlpha = RenderBlend::INV_SRC_ALPHA;
desc.blendOpAlpha = RenderBlendOperation::ADD;
return desc;
@@ -1269,9 +1291,9 @@ namespace plume {
RenderFilter minFilter = RenderFilter::LINEAR;
RenderFilter magFilter = RenderFilter::LINEAR;
RenderMipmapMode mipmapMode = RenderMipmapMode::LINEAR;
RenderTextureAddressMode addressU = RenderTextureAddressMode::WRAP;
RenderTextureAddressMode addressV = RenderTextureAddressMode::WRAP;
RenderTextureAddressMode addressW = RenderTextureAddressMode::WRAP;
RenderTextureAddressMode addressU = RenderTextureAddressMode::CLAMP;
RenderTextureAddressMode addressV = RenderTextureAddressMode::CLAMP;
RenderTextureAddressMode addressW = RenderTextureAddressMode::CLAMP;
float mipLODBias = 0.0f;
uint32_t maxAnisotropy = 16;
bool anisotropyEnabled = false;
@@ -1754,7 +1776,9 @@ namespace plume {
struct RenderDeviceDescription {
std::string name = "Unknown";
uint32_t driverVersion = 0;
RenderDeviceType type = RenderDeviceType::UNKNOWN;
RenderDeviceVendor vendor = RenderDeviceVendor::UNKNOWN;
uint64_t driverVersion = 0;
uint64_t dedicatedVideoMemory = 0;
};
@@ -1780,6 +1804,9 @@ namespace plume {
// Draw.
bool triangleFan = false;
bool dynamicDepthBias = false;
// UMA.
bool uma = false;
};
struct RenderInterfaceCapabilities {

View File

@@ -705,6 +705,21 @@ namespace plume {
}
}
static RenderDeviceType toDeviceType(VkPhysicalDeviceType type) {
switch (type) {
case VK_PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU:
return RenderDeviceType::INTEGRATED;
case VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU:
return RenderDeviceType::DISCRETE;
case VK_PHYSICAL_DEVICE_TYPE_VIRTUAL_GPU:
return RenderDeviceType::VIRTUAL;
case VK_PHYSICAL_DEVICE_TYPE_CPU:
return RenderDeviceType::CPU;
default:
return RenderDeviceType::UNKNOWN;
}
}
static void setObjectName(VkDevice device, VkDebugReportObjectTypeEXT objectType, uint64_t object, const std::string &name) {
# ifdef VULKAN_OBJECT_NAMES_ENABLED
VkDebugMarkerObjectNameInfoEXT nameInfo = {};
@@ -2329,7 +2344,7 @@ namespace plume {
dstWidth = rect.right - rect.left;
dstHeight = rect.bottom - rect.top;
# elif defined(SDL_VULKAN_ENABLED)
SDL_GetWindowSize(renderWindow, (int *)(&dstWidth), (int *)(&dstHeight));
SDL_GetWindowSizeInPixels(renderWindow, (int *)(&dstWidth), (int *)(&dstHeight));
# elif defined(__ANDROID__)
dstWidth = ANativeWindow_getWidth(renderWindow);
dstHeight = ANativeWindow_getHeight(renderWindow);
@@ -2507,6 +2522,80 @@ namespace plume {
return (depthAttachment == attachment);
}
// VulkanQueryPool
VulkanQueryPool::VulkanQueryPool(VulkanDevice *device, uint32_t queryCount) {
assert(device != nullptr);
assert(queryCount > 0);
this->device = device;
VkQueryPoolCreateInfo createInfo = {};
createInfo.sType = VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO;
createInfo.queryType = VK_QUERY_TYPE_TIMESTAMP;
createInfo.queryCount = queryCount;
VkResult res = vkCreateQueryPool(device->vk, &createInfo, nullptr, &vk);
if (res != VK_SUCCESS) {
fprintf(stderr, "vkCreateQueryPool failed with error code 0x%X.\n", res);
return;
}
results.resize(queryCount);
}
VulkanQueryPool::~VulkanQueryPool() {
vkDestroyQueryPool(device->vk, vk, nullptr);
}
void VulkanQueryPool::queryResults() {
VkResult res = vkGetQueryPoolResults(device->vk, vk, 0, uint32_t(results.size()), sizeof(uint64_t) * results.size(), results.data(), sizeof(uint64_t), VK_QUERY_RESULT_64_BIT);
if (res != VK_SUCCESS) {
fprintf(stderr, "vkGetQueryPoolResults failed with error code 0x%X.\n", res);
return;
}
// Conversion sourced from Godot Engine's Vulkan Rendering Driver.
auto mult64to128 = [](uint64_t u, uint64_t v, uint64_t &h, uint64_t &l) {
uint64_t u1 = (u & 0xffffffff);
uint64_t v1 = (v & 0xffffffff);
uint64_t t = (u1 * v1);
uint64_t w3 = (t & 0xffffffff);
uint64_t k = (t >> 32);
u >>= 32;
t = (u * v1) + k;
k = (t & 0xffffffff);
uint64_t w1 = (t >> 32);
v >>= 32;
t = (u1 * v) + k;
k = (t >> 32);
h = (u * v) + w1 + k;
l = (t << 32) + w3;
};
// Convert results to timestamps.
constexpr uint64_t shift_bits = 16;
double timestampPeriod = double(device->physicalDeviceProperties.limits.timestampPeriod);
uint64_t h = 0, l = 0;
for (uint64_t &result : results) {
mult64to128(result, uint64_t(timestampPeriod * double(1 << shift_bits)), h, l);
result = l;
result >>= shift_bits;
result |= h << (64 - shift_bits);
}
}
const uint64_t *VulkanQueryPool::getResults() const {
return results.data();
}
uint32_t VulkanQueryPool::getCount() const {
return uint32_t(results.size());
}
// VulkanCommandList
VulkanCommandList::VulkanCommandList(VulkanDevice *device, RenderCommandListType type) {
@@ -3059,12 +3148,13 @@ namespace plume {
}
void VulkanCommandList::resolveTexture(const RenderTexture *dstTexture, const RenderTexture *srcTexture) {
resolveTextureRegion(dstTexture, 0, 0, srcTexture, nullptr);
resolveTextureRegion(dstTexture, 0, 0, srcTexture, nullptr, RenderResolveMode::AVERAGE);
}
void VulkanCommandList::resolveTextureRegion(const RenderTexture *dstTexture, uint32_t dstX, uint32_t dstY, const RenderTexture *srcTexture, const RenderRect *srcRect) {
void VulkanCommandList::resolveTextureRegion(const RenderTexture *dstTexture, uint32_t dstX, uint32_t dstY, const RenderTexture *srcTexture, const RenderRect *srcRect, RenderResolveMode resolveMode) {
assert(dstTexture != nullptr);
assert(srcTexture != nullptr);
assert(resolveMode == RenderResolveMode::AVERAGE && "Vulkan only supports AVERAGE resolve mode.");
thread_local std::vector<VkImageResolve> imageResolves;
imageResolves.clear();
@@ -3194,6 +3284,20 @@ namespace plume {
// Not required in Vulkan.
}
void VulkanCommandList::resetQueryPool(const RenderQueryPool *queryPool, uint32_t queryFirstIndex, uint32_t queryCount) {
assert(queryPool != nullptr);
const VulkanQueryPool *interfaceQueryPool = static_cast<const VulkanQueryPool *>(queryPool);
vkCmdResetQueryPool(vk, interfaceQueryPool->vk, queryFirstIndex, queryCount);
}
void VulkanCommandList::writeTimestamp(const RenderQueryPool *queryPool, uint32_t queryIndex) {
assert(queryPool != nullptr);
const VulkanQueryPool *interfaceQueryPool = static_cast<const VulkanQueryPool *>(queryPool);
vkCmdWriteTimestamp(vk, VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT, interfaceQueryPool->vk, queryIndex);
}
void VulkanCommandList::checkActiveRenderPass() {
assert(targetFramebuffer != nullptr);
@@ -3457,7 +3561,7 @@ namespace plume {
// VulkanDevice
VulkanDevice::VulkanDevice(VulkanInterface *renderInterface) {
VulkanDevice::VulkanDevice(VulkanInterface *renderInterface, const std::string &preferredDeviceName) {
assert(renderInterface != nullptr);
this->renderInterface = renderInterface;
@@ -3490,14 +3594,22 @@ namespace plume {
continue;
}
std::string deviceName(deviceProperties.deviceName);
uint32_t deviceTypeScore = deviceTypeScoreTable[deviceTypeIndex];
bool preferDeviceTypeScore = (deviceTypeScore > currentDeviceTypeScore);
bool preferOption = preferDeviceTypeScore;
bool preferUserChoice = preferredDeviceName == deviceName;
bool preferOption = preferDeviceTypeScore || preferUserChoice;
if (preferOption) {
physicalDevice = physicalDevices[i];
description.name = std::string(deviceProperties.deviceName);
description.name = deviceName;
description.type = toDeviceType(deviceProperties.deviceType);
description.driverVersion = deviceProperties.driverVersion;
description.vendor = RenderDeviceVendor(deviceProperties.vendorID);
currentDeviceTypeScore = deviceTypeScore;
if (preferUserChoice) {
break;
}
}
}
@@ -3868,6 +3980,10 @@ namespace plume {
return std::make_unique<VulkanFramebuffer>(this, desc);
}
std::unique_ptr<RenderQueryPool> VulkanDevice::createQueryPool(uint32_t queryCount) {
return std::make_unique<VulkanQueryPool>(this, queryCount);
}
void VulkanDevice::setBottomLevelASBuildInfo(RenderBottomLevelASBuildInfo &buildInfo, const RenderBottomLevelASMesh *meshes, uint32_t meshCount, bool preferFastBuild, bool preferFastTrace) {
assert(meshes != nullptr);
assert(meshCount > 0);
@@ -4216,6 +4332,23 @@ namespace plume {
// Fill capabilities.
capabilities.shaderFormat = RenderShaderFormat::SPIRV;
// Fill device names.
uint32_t deviceCount = 0;
vkEnumeratePhysicalDevices(instance, &deviceCount, nullptr);
if (deviceCount > 0) {
std::vector<VkPhysicalDevice> physicalDevices(deviceCount);
vkEnumeratePhysicalDevices(instance, &deviceCount, physicalDevices.data());
for (uint32_t i = 0; i < deviceCount; i++) {
VkPhysicalDeviceProperties deviceProperties;
vkGetPhysicalDeviceProperties(physicalDevices[i], &deviceProperties);
uint32_t deviceTypeIndex = deviceProperties.deviceType;
if (deviceTypeIndex <= 4) {
deviceNames.emplace_back(deviceProperties.deviceName);
}
}
}
}
VulkanInterface::~VulkanInterface() {
@@ -4224,8 +4357,8 @@ namespace plume {
}
}
std::unique_ptr<RenderDevice> VulkanInterface::createDevice() {
std::unique_ptr<VulkanDevice> createdDevice = std::make_unique<VulkanDevice>(this);
std::unique_ptr<RenderDevice> VulkanInterface::createDevice(const std::string &preferredDeviceName) {
std::unique_ptr<VulkanDevice> createdDevice = std::make_unique<VulkanDevice>(this, preferredDeviceName);
return createdDevice->isValid() ? std::move(createdDevice) : nullptr;
}
@@ -4233,6 +4366,10 @@ namespace plume {
return capabilities;
}
const std::vector<std::string> &VulkanInterface::getDeviceNames() const {
return deviceNames;
}
bool VulkanInterface::isValid() const {
return instance != nullptr;
}

View File

@@ -271,6 +271,18 @@ namespace plume {
bool contains(const VulkanTexture *attachment) const;
};
struct VulkanQueryPool : RenderQueryPool {
VulkanDevice *device = nullptr;
std::vector<uint64_t> results;
VkQueryPool vk = VK_NULL_HANDLE;
VulkanQueryPool(VulkanDevice *device, uint32_t queryCount);
virtual ~VulkanQueryPool() override;
virtual void queryResults() override;
virtual const uint64_t *getResults() const override;
virtual uint32_t getCount() const override;
};
struct VulkanCommandList : RenderCommandList {
VkCommandBuffer vk = VK_NULL_HANDLE;
VkCommandPool commandPool = VK_NULL_HANDLE;
@@ -315,10 +327,12 @@ namespace plume {
void copyBuffer(const RenderBuffer *dstBuffer, const RenderBuffer *srcBuffer) override;
void copyTexture(const RenderTexture *dstTexture, const RenderTexture *srcTexture) override;
void resolveTexture(const RenderTexture *dstTexture, const RenderTexture *srcTexture) override;
void resolveTextureRegion(const RenderTexture *dstTexture, uint32_t dstX, uint32_t dstY, const RenderTexture *srcTexture, const RenderRect *srcRect) override;
void resolveTextureRegion(const RenderTexture *dstTexture, uint32_t dstX, uint32_t dstY, const RenderTexture *srcTexture, const RenderRect *srcRect, RenderResolveMode resolveMode) override;
void buildBottomLevelAS(const RenderAccelerationStructure *dstAccelerationStructure, RenderBufferReference scratchBuffer, const RenderBottomLevelASBuildInfo &buildInfo) override;
void buildTopLevelAS(const RenderAccelerationStructure *dstAccelerationStructure, RenderBufferReference scratchBuffer, RenderBufferReference instancesBuffer, const RenderTopLevelASBuildInfo &buildInfo) override;
void discardTexture(const RenderTexture* texture) override;
void resetQueryPool(const RenderQueryPool *queryPool, uint32_t queryFirstIndex, uint32_t queryCount) override;
void writeTimestamp(const RenderQueryPool *queryPool, uint32_t queryIndex) override;
void checkActiveRenderPass();
void endActiveRenderPass();
void setDescriptorSet(VkPipelineBindPoint bindPoint, const VulkanPipelineLayout *pipelineLayout, const RenderDescriptorSet *descriptorSet, uint32_t setIndex);
@@ -391,7 +405,7 @@ namespace plume {
VkPhysicalDeviceSampleLocationsPropertiesEXT sampleLocationProperties = {};
bool loadStoreOpNoneSupported = false;
VulkanDevice(VulkanInterface *renderInterface);
VulkanDevice(VulkanInterface *renderInterface, const std::string &preferredDeviceName);
~VulkanDevice() override;
std::unique_ptr<RenderCommandList> createCommandList(RenderCommandListType type) override;
std::unique_ptr<RenderDescriptorSet> createDescriptorSet(const RenderDescriptorSetDesc &desc) override;
@@ -409,6 +423,7 @@ namespace plume {
std::unique_ptr<RenderCommandFence> createCommandFence() override;
std::unique_ptr<RenderCommandSemaphore> createCommandSemaphore() override;
std::unique_ptr<RenderFramebuffer> createFramebuffer(const RenderFramebufferDesc &desc) override;
std::unique_ptr<RenderQueryPool> createQueryPool(uint32_t queryCount) override;
void setBottomLevelASBuildInfo(RenderBottomLevelASBuildInfo &buildInfo, const RenderBottomLevelASMesh *meshes, uint32_t meshCount, bool preferFastBuild, bool preferFastTrace) override;
void setTopLevelASBuildInfo(RenderTopLevelASBuildInfo &buildInfo, const RenderTopLevelASInstance *instances, uint32_t instanceCount, bool preferFastBuild, bool preferFastTrace) override;
void setShaderBindingTableInfo(RenderShaderBindingTableInfo &tableInfo, const RenderShaderBindingGroups &groups, const RenderPipeline *pipeline, RenderDescriptorSet **descriptorSets, uint32_t descriptorSetCount) override;
@@ -424,6 +439,7 @@ namespace plume {
VkInstance instance = VK_NULL_HANDLE;
VkApplicationInfo appInfo = {};
RenderInterfaceCapabilities capabilities;
std::vector<std::string> deviceNames;
# if SDL_VULKAN_ENABLED
VulkanInterface(RenderWindow sdlWindow);
@@ -432,8 +448,9 @@ namespace plume {
# endif
~VulkanInterface() override;
std::unique_ptr<RenderDevice> createDevice() override;
std::unique_ptr<RenderDevice> createDevice(const std::string &preferredDeviceName) override;
const RenderInterfaceCapabilities &getCapabilities() const override;
const std::vector<std::string> &getDeviceNames() const override;
bool isValid() const;
};
};

View File

@@ -0,0 +1,41 @@
#include "../../../tools/XenosRecomp/XenosRecomp/shader_common.h"
#ifdef __spirv__
#define g_SrcAlpha_DestAlpha vk::RawBufferLoad<float4>(g_PushConstants.PixelShaderConstants + 2400, 0x10)
#define s0_Texture2DDescriptorIndex vk::RawBufferLoad<uint>(g_PushConstants.SharedConstants + 0)
#define s0_SamplerDescriptorIndex vk::RawBufferLoad<uint>(g_PushConstants.SharedConstants + 192)
#else
cbuffer PixelShaderConstants : register(b1, space4)
{
float4 g_SrcAlpha_DestAlpha : packoffset(c150);
};
cbuffer SharedConstants : register(b2, space4)
{
uint s0_Texture2DDescriptorIndex : packoffset(c0.x);
uint s0_SamplerDescriptorIndex : packoffset(c12.x);
DEFINE_SHARED_CONSTANTS();
};
#endif
float4 main(
in float4 iPos : SV_Position,
in float4 iTexCoord0 : TEXCOORD0) : SV_Target0
{
Texture2D<float4> texture = g_Texture2DDescriptorHeap[s0_Texture2DDescriptorIndex];
SamplerState samplerState = g_SamplerDescriptorHeap[s0_SamplerDescriptorIndex];
float4 color = texture.Sample(samplerState, iTexCoord0.xy);
if (any(or(iTexCoord0.xy < 0.0, iTexCoord0.xy > 1.0)))
color = float4(0.0, 0.0, 0.0, 1.0);
color.rgb *= color.a * g_SrcAlpha_DestAlpha.x;
color.a = g_SrcAlpha_DestAlpha.y + (1.0 - color.a) * g_SrcAlpha_DestAlpha.x;
return color;
}

View File

@@ -0,0 +1,8 @@
#include "copy_common.hlsli"
Texture2D<float4> g_Texture2DDescriptorHeap[] : register(t0, space0);
float4 main(in float4 position : SV_Position) : SV_Target
{
return g_Texture2DDescriptorHeap[g_PushConstants.ResourceDescriptorIndex].Load(int3(position.xy, 0));
}

View File

@@ -0,0 +1,8 @@
#pragma once
struct PushConstants
{
uint ResourceDescriptorIndex;
};
[[vk::push_constant]] ConstantBuffer<PushConstants> g_PushConstants : register(b3, space4);

View File

@@ -0,0 +1,8 @@
#include "copy_common.hlsli"
Texture2D<float> g_Texture2DDescriptorHeap[] : register(t0, space0);
float main(in float4 position : SV_Position) : SV_Depth
{
return g_Texture2DDescriptorHeap[g_PushConstants.ResourceDescriptorIndex].Load(int3(position.xy, 0));
}

View File

@@ -1,4 +1,4 @@
#include "../../../tools/ShaderRecomp/ShaderRecomp/shader_common.h"
#include "../../../tools/XenosRecomp/XenosRecomp/shader_common.h"
#ifdef __spirv__

View File

@@ -1,4 +1,4 @@
#include "../../../tools/ShaderRecomp/ShaderRecomp/shader_common.h"
#include "../../../tools/XenosRecomp/XenosRecomp/shader_common.h"
#ifdef __spirv__

View File

@@ -1,4 +1,4 @@
#include "../../../tools/ShaderRecomp/ShaderRecomp/shader_common.h"
#include "../../../tools/XenosRecomp/XenosRecomp/shader_common.h"
#ifdef __spirv__

View File

@@ -1,4 +1,4 @@
#include "../../../tools/ShaderRecomp/ShaderRecomp/shader_common.h"
#include "../../../tools/XenosRecomp/XenosRecomp/shader_common.h"
#ifdef __spirv__
@@ -38,7 +38,7 @@ cbuffer SharedConstants : register(b2, space4)
#endif
float4 main(in float4 position : SV_Position, in float2 texCoord : TEXCOORD0) : SV_Target
float4 main(in float4 position : SV_Position, in float4 texCoord : TEXCOORD0) : SV_Target
{
Texture2D<float4> sampColor = g_Texture2DDescriptorHeap[sampColor_Texture2DDescriptorIndex];
Texture2D<float4> sampVelocityMap = g_Texture2DDescriptorHeap[sampVelocityMap_Texture2DDescriptorIndex];
@@ -48,19 +48,19 @@ float4 main(in float4 position : SV_Position, in float2 texCoord : TEXCOORD0) :
SamplerState sampVelocityMap_s = g_SamplerDescriptorHeap[sampVelocityMap_SamplerDescriptorIndex];
SamplerState sampZBuffer_s = g_SamplerDescriptorHeap[sampZBuffer_SamplerDescriptorIndex];
float depth = sampZBuffer.SampleLevel(sampZBuffer_s, texCoord, 0).x;
float4 velocityMap = sampVelocityMap.SampleLevel(sampVelocityMap_s, texCoord, 0);
float depth = sampZBuffer.SampleLevel(sampZBuffer_s, texCoord.xy, 0).x;
float4 velocityMap = sampVelocityMap.SampleLevel(sampVelocityMap_s, texCoord.xy, 0);
float2 velocity = (velocityMap.xz + velocityMap.yw / 255.0) * 2.0 - 1.0;
int sampleCount = min(64, round(length(velocity * g_ViewportSize.xy)));
float2 sampleOffset = velocity / (float) sampleCount;
float3 color = sampColor.SampleLevel(sampColor_s, texCoord, 0).rgb;
float3 color = sampColor.SampleLevel(sampColor_s, texCoord.xy, 0).rgb;
int count = 1;
for (int i = 1; i <= sampleCount; i++)
{
float2 sampleCoord = texCoord + sampleOffset * i;
float2 sampleCoord = texCoord.xy + sampleOffset * i;
float3 sampleColor = sampColor.SampleLevel(sampColor_s, sampleCoord, 0).rgb;
float sampleDepth = sampZBuffer.SampleLevel(sampZBuffer_s, sampleCoord, 0).x;

View File

@@ -1,4 +1,4 @@
#include "../../../tools/ShaderRecomp/ShaderRecomp/shader_common.h"
#include "../../../tools/XenosRecomp/XenosRecomp/shader_common.h"
#ifdef __spirv__

View File

@@ -1,4 +1,4 @@
#include "../../../tools/ShaderRecomp/ShaderRecomp/shader_common.h"
#include "../../../tools/XenosRecomp/XenosRecomp/shader_common.h"
#ifdef __spirv__

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