Commit graph

57 commits

Author SHA1 Message Date
Skyth (Asilkan)
5e8d15e334
Implement options menu TV static animation. (#403) 2025-02-14 01:41:18 +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
Hyper
a7063dc118
Added code to use arrow transition for Time of Day Transition (#362) 2025-02-11 14:21:30 +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)
7c1aea4e24
Fix the custom UI drawing in front of ImGui windows. (#335) 2025-02-09 14:25:06 +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
Hyper
d696524dbf Rename UI Scale Mode to UI Alignment Mode 2025-02-08 12:09:15 +00: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
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
Hyper
871515b3be options_menu: start monitor index from 1 2025-02-07 09:58:39 +00: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
Hyper
8cba851212 api: added globals struct 2025-01-31 02:35:00 +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
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
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
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
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)
d041e2ba30
Fix ImGui procedural filtering. (#188) 2025-01-25 18:28:43 +03:00
Hyper
e10eb80e38 config: move Voice Language and Subtitles to System 2025-01-22 23:50:10 +00:00
Skyth (Asilkan)
bdbdd42bd0
Implement config option to toggle surround sound. (#144) 2025-01-22 18:51:51 +03:00
Hyper
b56c0b8209
Implemented safer hooks for D-Pad movement (#129) 2025-01-19 15:01:11 +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
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
d297c07edb options_menu: only fast increment for float/int sliders 2025-01-17 15:27:40 +00:00
Hyper
7c60e47eee
hid: implemented button prohibition (#104) 2025-01-17 15:14:26 +03:00
Hyper
15c962150b
Implemented embedded version information (#82) 2025-01-17 15:13:37 +03:00
Hyper
92cfee2a97 locale: update strings, added localisation notes, misc. clean-up 2025-01-16 17:20:44 +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
Hyper
0613dc6337 options_menu: find nearest window size on lock, intro transition fixes 2025-01-03 02:46:30 +00:00
Hyper
31fb63ad81 Implemented window size option 2025-01-03 02:04:24 +00:00
Hyper
90e499cc8c options_menu: hide reset button during intro, fix pause menu reappearing 2025-01-03 00:50:02 +00:00
Hyper
e24fa84e16 options_menu: implemented Miles Electric transition 2025-01-02 22:07:27 +00:00
Hyper
d23e6d0e90 Implemented vibration option 2025-01-01 18:05:18 +00:00
Hyper
a1a05f83dc Implemented master volume slider 2024-12-25 21:17:40 +00: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
Hyper
f547c7ca6d window: implemented monitor switching 2024-12-16 19:07:21 +00:00
Hyper
6c57221807
Implemented value thumbnails (#42)
* options_menu: implemented value thumbnails

* options_menu: use config ptrs as thumbnail keys, added named thumbnails

* options_menu_thumbnails: move header to cpp
2024-12-15 20:41:39 +00:00
Hyper
587b222483 Implemented D-Pad player input
This is mainly beneficial for 2D sections with PlayStation controllers where the D-Pad may be more preferable, but it also works in 3D too.
2024-12-15 01:44:01 +00:00
Skyth
4b728f4a2b Downgrade to C++20 & switch to fmtlib. 2024-12-13 18:54:05 +03:00
Skyth (Asilkan)
cdcacff53b
Implement SDF fonts. (#24)
* Initial SDF font generation work.

* Text now correctly displaying with proper spacing.

* Fix untextured draws, implement custom rectangles.

* Fix regular image display.

* Slightly refactor ImGui rendering.

* Implement outlines.

* Implement bevel.

* Create host device after loading the module if the installer wasn't run.

* Move ImGui files to its own folder.

* Fix outline sizes.

* Fix default ImGui font and font scales.

* Update font atlas files.
2024-12-11 23:30:19 +03:00
Skyth
70268e41b5 Fix marquee slowing down with increased resolution. 2024-12-09 20:20:09 +03:00