sharpemu/src
Foued Attar 5052fae071
feat(np, gui): trophy unlocks, trophy lists and unlock notification (#1089)
* feat(np): unlock and persist trophies from universal-data-system events

A title never calls an unlock function: it posts UDS events, and the console
compares the stat each event feeds with the trophy's condition. Hades posts
_UnlockTrophy with a _trophy_id; other titles feed stats named by the rules in
sce_sys/uds/uds00.ucp.

TrophyService loads the title's trophy package and stat rules, applies each
posted event (latest-value uint stats compared with the trophy's ge/gt/le/lt
target, or _UnlockTrophy by id), unlocks the platinum with the last other
trophy, and saves progress to <savedata root>/../trophies/<titleId>/unlocks.json.
sceNpTrophy2GetTrophyInfoArray now reports the unlocked flag and time.
SHARPEMU_TRACE_UDS=1 traces every posted event.

Stat-rule evaluation and package layouts follow KytyPS5's NpTrophy2/UDS code.

Co-authored-by: Felipe <54341095+Pipe530@users.noreply.github.com>
Co-authored-by: nmzik <Nmzik@mail.ru>

* feat(gui): trophy list and unlock notification

Right-click a game, Trophies…, lists its trophies with icons, grades and the
progress the emulator saved, and refreshes while the window is open. When the
running game earns a trophy the emulator prints a [TROPHY][UNLOCK] line; the
launcher turns it into a themed, non-focus-stealing toast above the game.

TrophyCatalog is the public, read-only view of the trophy package and saved
progress for the launcher process.

Co-authored-by: Felipe <54341095+Pipe530@users.noreply.github.com>
Co-authored-by: nmzik <Nmzik@mail.ru>

* feat(gui): richer trophy list and notification, click to reveal hidden trophies

The list gets a hero card with a progress ring and per-grade chips, All/Earned/Locked
filters and larger rows with grade accents. Icons are decoded small and off the UI
thread, and hidden trophies keep their icon: only the name and description are held
back until the row is clicked, like on the console. The notification is larger, with
the description, a grade glow and a fade.

SHARPEMU_TROPHY_TOAST_TEST=1 shows one notification per grade and =list opens the
list, using the first library game that has trophies.

Co-authored-by: Felipe <54341095+Pipe530@users.noreply.github.com>
Co-authored-by: nmzik <Nmzik@mail.ru>

* feat(gui): test button for the trophy notification

SHARPEMU_TROPHY_TOAST_TEST=1 adds a "Test trophy notification" button to the launcher;
each click shows the notification for the next grade using the first library game with
trophies. =list still opens the trophy list directly.

Co-authored-by: Felipe <54341095+Pipe530@users.noreply.github.com>
Co-authored-by: nmzik <Nmzik@mail.ru>

* feat(gui): console-style trophy overview, hidden trophies stay hidden, test in Environment

A trophy button in the launcher toolbar opens an overview laid out like the console's:
earned totals per grade at the top, then each game with its completion and earned cups.
Picking a game opens its trophy list in the same style, with grades shown as cups.

Hidden trophies stay hidden, icon included, until their row is clicked. The notification
test moves from an environment variable and floating button to Options > Environment >
Trophies, where a game and one of its trophies can be picked and its unlock notification
shown; players do not see it unless they open Environment.

Co-authored-by: Felipe <54341095+Pipe530@users.noreply.github.com>
Co-authored-by: nmzik <Nmzik@mail.ru>

* feat(gui): animated trophy notification with 3D icon flip, light sweep and sparks

The notification slides up on a spring, then flips its icon in around the vertical axis in
3D, sends one band of light across the card and bursts sparks in the grade color, with more
sparks for rarer grades. The platinum adds slowly rotating rays behind the icon and stays
longer. A thin line shows the time left. The window is click-through and never takes focus.
With Windows animations turned off it just fades in and out. List rows fade in one after
another when a list first opens.

Co-authored-by: Felipe <54341095+Pipe530@users.noreply.github.com>
Co-authored-by: nmzik <Nmzik@mail.ru>

* feat(gui): trophy chime, landing ring and livelier trophy lists

The unlock notification now plays a short chime as the icon flips in: a few
bell tones rising in an E major arpeggio, more notes for rarer grades. The
chime is synthesized in code, so no third-party audio ships, and it plays on
its own waveOut device so it never stops the title music. A ring leaves the
icon as it lands, and the text lines slide in one after another.

The trophy list counts its completion up, fades a hidden trophy over to its
other face instead of redrawing the list, outlines earned icons in their grade
color and lights up a trophy earned while the list is open. The overview counts
its total up and fills each game's bar. Rows fade on hover in both.

Options > Environment > Trophies gets a toggle for the sound.

* feat(gui): redesign the trophy notification, lists and sound

The notification is now a glass card tinted in the grade's metal, with light
drifting across it, that swings in from the top right in 3D. A drawn medal
spins like a tossed coin and lands on the sound's impact: a ring goes out,
confetti tumbles away, a glint crosses the medal and the game's progress bar
moves up to count the new trophy. Rarer grades get more confetti; gold and
platinum get rays, and the platinum an iridescent edge and a second burst.

The sound is rebuilt: a filtered whoosh rises while the medal spins, then a
soft thump and an E major chord struck like mallets, with sparkles and a small
stereo room; rarer grades get a fuller chord. It is still synthesized in code.

The game's list sits on its blurred key art under an indigo wash, with the
cover, grade chips with medals, a completion ring and filters; trophies are
rounded cards tinted in their grade, with a padlock or question mark badge,
and a hidden one turns over when revealed. The collection view gets a medal,
library totals and a completion ring, and one card per game.

* fix(gui): colored medals, a four-second toast and confetti that stays on screen

Medals keep their grade color everywhere and are only dimmed while nothing of that grade is earned. The notification stays about four seconds (a little longer for the platinum). Confetti bursts left and down instead of up, where the card leaves no room, inside a larger window, and fades out before it can reach an edge.

* feat(gui): trophy glints instead of falling confetti

When the medal lands, four-pointed glints and a few dots burst from it all round, twinkle and go out within a second, close to the card, instead of confetti falling down the screen. Rarer grades get more and larger glints; the platinum a second, smaller burst. The window shrinks back around the card.

* feat(gui): trophies page next to the library, trophy art on the medal, springy notification

The trophy collection and each game's list are a Trophies tab between Library and
Options instead of two windows: picking a game slides its list in, and the back
button, Escape or the mouse's back button slide it out. The unlock notification is a
pill that stretches into the card on springs and folds back into it, the medal shows
the trophy's own art, and the collection can be sorted and glows with the hovered
game's art. Comments are removed from the trophy code.

* feat(gui): translate the trophy strings in every language

* feat(gui): search the games in the trophies page

* feat(gui): pill-shaped search in the trophies page, drop the card tooltip and unused strings

* chore(np, gui): drop the unused unlock event and locked medal state

---------

Co-authored-by: Felipe <54341095+Pipe530@users.noreply.github.com>
Co-authored-by: nmzik <Nmzik@mail.ru>
2026-10-14 00:05:40 +03:00
..
SharpEmu.CLI Revert "Ghost of Yōtei and Tsushima in game: rendering, GPU/CPU memory coherence, tessellation" 2026-10-13 03:38:40 +03:00
SharpEmu.Core [HLE/GPU] Boot and render Neptunia ReVerse (PPSA02721) (#1090) 2026-10-13 16:30:46 +03:00
SharpEmu.DebugClient Add live debugger frontend and mutex stall recovery (#383) 2026-07-17 22:41:07 -06:00
SharpEmu.Debugger Add live debugger frontend and mutex stall recovery (#383) 2026-07-17 22:41:07 -06:00
SharpEmu.GUI feat(np, gui): trophy unlocks, trophy lists and unlock notification (#1089) 2026-10-14 00:05:40 +03:00
SharpEmu.HLE [HLE/GPU] Boot and render Neptunia ReVerse (PPSA02721) (#1090) 2026-10-13 16:30:46 +03:00
SharpEmu.LibAtrac9 Revert "Ghost of Yōtei and Tsushima in game: rendering, GPU/CPU memory coherence, tessellation" 2026-10-13 03:38:40 +03:00
SharpEmu.Libs feat(np, gui): trophy unlocks, trophy lists and unlock notification (#1089) 2026-10-14 00:05:40 +03:00
SharpEmu.Logging Reject undefined numeric LogLevel values (#390) 2026-07-18 15:47:19 +03:00
SharpEmu.ShaderCompiler [HLE/GPU] Boot and render Neptunia ReVerse (PPSA02721) (#1090) 2026-10-13 16:30:46 +03:00
SharpEmu.ShaderCompiler.Metal Revert "Ghost of Yōtei and Tsushima in game: rendering, GPU/CPU memory coherence, tessellation" 2026-10-13 03:38:40 +03:00
SharpEmu.ShaderCompiler.Vulkan [HLE/GPU] Boot and render Neptunia ReVerse (PPSA02721) (#1090) 2026-10-13 16:30:46 +03:00
SharpEmu.SourceGenerators feat(hle): prefer loaded guest exports for selected registrations (#844) 2026-08-25 22:32:57 +02:00