Commit Graph

77 Commits

Author SHA1 Message Date
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)
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
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)
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
Hyper
a5db997e5d Fix controller input lingering when unfocused (#210) 2025-01-26 20:49:13 +00:00
Hyper
7c989af42c input_patches: fix cursor velocity retaining after D-Pad input 2025-01-26 20:15:56 +00: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
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
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)
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 (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
f9440e2076 player_patches: fix last score not resetting to zero 2025-01-23 21:22:46 +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)
85b5ebf9a7 Fix pause menu selection cast being visible while exiting options menu. (#139) 2025-01-22 19:13:53 +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)
312f913a92 Remove detail namespaces. (#137) 2025-01-19 21:09:47 +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
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
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
Skyth (Asilkan)
d56b823b00 Aspect ratio adjustments. (Part 1) (#90)
* Map CSD structures by full path.

* Initial work for unstretching & aligning to edges.

* Add extend flag, fix cast lookups.

* Add right extend flag.

* Fill the flags map with a bunch of casts.

* Implement unstretching.

* Set more title casts to unscretch.

* Add some more flags.

* Move CSD patches to its own file.

* Replace CSD vertex shaders to get rid of pixel snapping.

* Snap to pixel on the CPU.

* Current work trying to get 3D screen position casts working correctly.

* Fix and properly align font, handle most 3D screen positions.

* Add stretch flags for background casts.

* Use 4:3 as the base aspect ratio instead of 16:9.

* Replicate the game's 4:3 downscaling behavior.

* World map now identical to original 4:3.

* Replace camera aspect ratio/field of view logic.

* Make original 4:3 scaling a separate option, use custom behavior for auto.

* Keep UI scale same only above Steam Deck aspect ratio.

* Release paths when the YNCP file gets freed.

* Add more path flags.

* Interpolate to original 4:3 scale.

* Scaling animation offset to prevent offscreen casts from showing up in ultrawide.

* Queue draw calls without actually executing anything to extract the corner.

* Clean unnecessary hooks.

* Add result screen modifiers.

* Stretch loading primitive 2D.

* Scale DoF correctly at different aspect ratios.

* Remove stretch option.

* Make aspect ratio a global variable.

* Ultrawide patch for HUD 3D items.

* Fix world map 3D to 2D projection.

* Right align world map info box.

* Set medal positions.

* Respect center option in more places.

* Implement the aspect ratio option.

* Use viewport dimensions for snapping CSD pixels.

* Fix DoF fix not using viewport height.

* Implement aspect ratio patches for 2D drop ring emitter.

* Implement inspire letterbox.

* Add cutscene aspect ratio option.

* Shift subtitles by aspect ratio.

* Fix crash in earth restoration cutscenes.

* Offset scale patches for Tornado Defense.

* Scale new record arrow casts.

* Expose aspect ratio variables globally.

* Properly center the achievements menu.

* 4:3 scaling for options menu.

* Fix procedural filtering logic in ImGui pixel shader.

* Fix button guide offset.

* UI scaling for installer.

* Remove grid snaps in the installer.

* Handle center UI scale option for rings going to HUD.

* Remove unnecessary diff.

* Revert temporary changes.

* Fix typo.
2025-01-18 01:51:45 +03:00
Hyper
95bd71a23e Implemented hidden config values, removed DLL exports (#112) 2025-01-17 19:51:56 +00:00
Hyper
63d474ce91 Implemented controller LED timings for cutscenes (#83) 2025-01-16 15:08:57 +00:00
Hyper
666f93843d Calculate movie aspect ratio using vertices (#84) 2025-01-16 15:08:48 +00:00
Hyper
4b7f2c0ae7 api: update research 2025-01-15 19:47:11 +00:00
Hyper
9a29b187cd Implemented support for maintaining aspect ratio for movies (#73)
* video_patches: aspect ratio support for CPlayMovieWrapper

* config: remove movie scale mode option

* video_patches: improve movie aspect ratio correction, support intro logos

Co-Authored-By: Darío <538504+DarioSamo@users.noreply.github.com>
Co-Authored-By: Skyth (Asilkan) <19259897+blueskythlikesclouds@users.noreply.github.com>

* api: upload Inspire research

* api: move Vertex struct

---------

Co-authored-by: Darío <538504+DarioSamo@users.noreply.github.com>
Co-authored-by: Skyth (Asilkan) <19259897+blueskythlikesclouds@users.noreply.github.com>
2025-01-12 18:53:31 +03:00
Skyth
967a0ce17f Combine guest memory and function table into one virtual allocation. 2025-01-02 14:46:31 +03:00
Hyper
bab9705151 Fix auto controller icons breaking loading screen graphics (#64) 2024-12-27 20:58:41 +00:00
Hyper
a1a05f83dc Implemented master volume slider 2024-12-25 21:17:40 +00:00
Skyth (Asilkan)
fd009bcada Sync render thread present with main thread. (#62)
* Experimenting with syncing the render thread.

* Separate wait functions for swap chains.

* Sync render thread present to the main thread.

* Move present to main thread and frame limit after presenting.

* g_next -> s_next

* Fix Vulkan validation errors.

* Make max frame latency configurable.

* Fix loading thread breaking waitable swap chain order.
2024-12-25 16:29:15 +03:00
Skyth (Asilkan)
f1416c85ba Implement frame limiter. (#60)
* Implement audio timing with integer math.

* Add busy loop to audio thread.

* Implement a frame limiter.

* Implement implot.

* Add more stuff to the profiler window.

* Redo frame limiter logic to fix drifting.

* Move frame limiter, add limiters for SFD & loading screen.

* Update waiting logic for audio thread.

* Correct small delta time errors.

* Decrease delta time error threshold.

* Set busy wait threshold to 2ms.

* Change spin wait in D3D12 present to infinite wait.

* Replace FPS literals with constants.
2024-12-22 19:58:06 +03:00
Skyth (Asilkan)
67633917bf Linux support. (#54)
* Initial Linux attempt.

* Add clang toolchain & make tools compile.

* vcpkg as submodule.

* First implementation of IO rewrite. (#31)

* Fix directory iteration resolving symlinks.

* Refactor kernel objects to be lock-free.

* Implement guest critical sections using std::atomic.

* Make D3D12 support optional. (#33)

* Make D3D12 support optional.

* Update ShaderRecomp, fix macros.

* Replace QueryPerformanceCounter. (#35)

* Add Linux home path for GetUserPath(). (#36)

* Cross-platform Sleep. (#37)

* Add mmap implementations for virtual allocation. (#38)

* Cross-platform TLS. (#34)

* Cross-platform TLS.

* Fix front() to back(), use Mutex.

* Fix global variable namings.

---------

Co-authored-by: Skyth <19259897+blueskythlikesclouds@users.noreply.github.com>

* Unicode support. (#39)

* Replace CreateDirectoryA with Unicode version.

* Cross platform thread implementation. (#41)

* Cross-platform thread implementation.

* Put set thread name calls behind a Win32 macro.

* Cross-platform semaphore implementation. (#43)

* xam: use SDL for keyboard input

* Cross-platform atomic operations. (#44)

* Cross-platform spin lock implementation.

* Cross-platform reference counting.

* Cross-platform event implementation. (#47)

* Compiling and running on Linux. (#49)

* Current work trying to get it to compile.

* Update vcpkg.json baseline.

* vcpkg, memory mapped file.

* Bitscan forward.

* Fix localtime_s.

* FPS patches high res clock.

* Rename Window to GameWindow. Fix guest pointers.

* GetCurrentThreadID gone.

* Code cache pointers, RenderWindow type.

* Add Linux stubs.

* Refactor Config.

* Fix paths.

* Add linux-release config.

* FS fixes.

* Fix Windows compilation errors & unicode converter crash.

* Rename physical memory allocation functions to not clash with X11.

* Fix NULL character being added on RtlMultiByteToUnicodeN.

* Use std::exit.

* Add protection to memory on Linux.

* Convert majority of dependencies to submodules. (#48)

* Convert majority of dependencies to submodules.

* Don't compile header-only libraries.

* Fix a few incorrect data types.

* Fix config directory.

* Unicode fixes & sizeof asserts.

* Change the exit function to not call static destructors.

* Fix files picker.

* Add RelWithDebInfo preset for Linux.

* Implement OS Restart on Linux. (#50)

---------

Co-authored-by: Dario <dariosamo@gmail.com>

* Update PowerRecomp.

* Add Env Var detection for VCPKG_ROOT, add DLC detection.

* Use error code version on DLC directory iterator.

* Set D3D12MA::ALLOCATOR_FLAG_DONT_PREFER_SMALL_BUFFERS_COMMITTED flag.

* Linux flatpak. (#51)

* Add flatpak support.

* Add game install directory override for flatpak.

* Flatpak'ing.

* Flatpak it some more.

* We flat it, we pak it.

* Flatpak'd.

* The Marvelous Misadventures of Flatpak.

* Attempt to change logic of NFD and show error.

* Flattenpakken.

* Use game install directory instead of current path.

* Attempt to fix line endings.

* Update io.github.hedge_dev.unleashedrecomp.json

* Fix system time query implementation.

* Add Present Wait to Vulkan to improve frame pacing and reduce latency. (#53)

* Add present wait support to Vulkan.

* Default to triple buffering if presentWait is supported.

* Bracey fellas.

* Update paths.h

* SDL2 audio (again). (#52)

* Implement SDL2 audio (again).

* Call timeBeginPeriod/timeEndPeriod.

* Replace miniaudio with SDL mixer.

* Queue audio samples in a separate thread.

* Enable CMake option override policy & fix compilation error.

* Fix compilation error on Linux.

* Fix but also trim shared strings.

* Wayland support. (#55)

* Make channel index a global variable in embedded player.

* Fix SDL Audio selection for OGG on Flatpak.

* Minor installer wizard fixes.

* Fix compilation error.

* Yield in model consumer and pipeline compiler threads.

* Special case Sleep(0) to yield on Linux.

* Add App Id hint.

* Correct implementation for auto reset events. (#57)

---------

Co-authored-by: Dario <dariosamo@gmail.com>
Co-authored-by: Hyper <34012267+hyperbx@users.noreply.github.com>
2024-12-21 00:44:05 +03:00