1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-21 19:27:24 +08:00
Commit Graph

296 Commits

Author SHA1 Message Date
Bartłomiej Dach
ba518e1da8
Fix StoryboardResourceLookupStore dying on failure to unmap path
Before the introduction of `StoryboardResourceLookupStore`, missing
files would softly fail by use of null fallbacks. After the
aforementioned class was added, however, the fallbacks would not work
anymore if for whatever reason `GetStoragePathFromStoryboardPath()`
failed to unmap the storyboard asset name to a storage path.
2023-09-19 20:11:16 +02:00
Dean Herbert
4a7dc4d792 Fix storyboard UseSkinSprites being implemented incorrectly
This was implemented as a "fallback", but it's actually intended to be
an "override". As in it allows storyboarders to *prefer* a skin sprite
before falling back to a local version contained within the storyboard.

Can be tested with https://osu.ppy.sh/beatmapsets/832364#osu/1743837.

Closes https://github.com/ppy/osu/issues/24813.
2023-09-19 20:20:20 +09:00
Dean Herbert
773ec46989 Expose some storyboard pieces to allow better testability 2023-09-19 20:20:11 +09:00
Dean Herbert
900376b662 Refactor storyboard resource lookup to be more streamlined 2023-09-14 16:15:50 +09:00
Salman Ahmed
6674c70280 Add support for limiting skin texture/animation dimensions 2023-09-03 02:21:47 +03:00
Dean Herbert
20e4e2581a Change IBeatSyncProvider.Clock to always be non-null 2023-07-13 22:13:40 +09:00
Dean Herbert
df5b389629 Manual fixes to reduce warnings to zero 2023-06-24 01:52:53 +09:00
Dean Herbert
0ab0c52ad5 Automated pass 2023-06-24 01:00:03 +09:00
Joseph Madamba
d6fa44240d
Fix storyboard video-only check being inverted 2023-05-16 21:51:32 -07:00
Dean Herbert
1efc78c0f8 Actually use new end time property when setting lifetimes 2023-04-26 13:28:51 +09:00
Dean Herbert
e330052852 Add second definition of EndTime for storyboard elements to account for loops in lifetime 2023-04-25 15:22:11 +09:00
Dean Herbert
3919400be2 Apply NRT to some storyboard classes 2023-04-25 14:30:01 +09:00
Dean Herbert
2cce785fa5 Fix storyboard videos not fading out on completion
Closes https://github.com/ppy/osu/issues/22802.

Stable uses a 1,000 ms fade-in / out. Rather than matching that, I've
stuck with 500ms (what lazer was already using for the fade-in) because
I think it feels better.

Tested using the beatmap linked in the issue thread.
2023-03-07 15:54:35 +09:00
Dean Herbert
eabd1a0cc1 Remove unused Duration property to avoid any misunderstandings 2023-02-06 16:42:39 +09:00
Dean Herbert
679ec986d5 Fix storyboard outro time potentially running too long 2023-02-06 16:39:44 +09:00
Dean Herbert
4a7d7c6ed9 Use MaxBy in all locations that can and update inspection level to match dotnet-build 2022-12-19 16:47:10 +09:00
Dean Herbert
192536643c Fix some more inspections 2022-12-16 20:21:19 +09:00
Dan Balasescu
7bc8908ca9 Partial everything 2022-11-27 00:00:27 +09:00
Dan Balasescu
fd88c92d5a
Merge pull request #21144 from peppy/fix-storyboard-end-start-time
Fix incorrect handling of storyboard events with `end_time` before `start_time`
2022-11-10 22:53:45 +09:00
Dean Herbert
0b34340447 Fix sprites not displaying in storyboard if filename extension is missing in script 2022-11-08 14:34:28 +09:00
Dean Herbert
6085120dc5 Fix incorrect handling of storyboard events with end_time before start_time 2022-11-07 12:25:36 +09:00
Dean Herbert
28185178d6 Add support for weird storyboards which have backwards events
Closes https://github.com/ppy/osu/issues/20632.
Not adding test coverage because this is just weird.
2022-10-10 16:51:55 +09:00
Salman Ahmed
835cae3087 Remove null conditional 2022-09-23 17:06:55 +03:00
Dean Herbert
4e9053b099 Fix crash when storyboard attempts to play at main menu 2022-09-23 20:10:57 +09:00
Dean Herbert
bbf906ee06 Remove unnecessary virtual spec 2022-09-12 14:20:48 +09:00
Dean Herbert
24138b65a7 Fix storyboard animations not starting their animation playback from the correct point in time 2022-09-12 14:05:16 +09:00
Dean Herbert
824e68dab3 Fix VectorScale set to 0 still showing some sprites in storyboard
This implementation was matching the [framework side implementation of
scale](16d1c2d335/osu.Framework/Graphics/Drawable.cs (L973-L976))
but I don't think it's required here.

I'm still not sure if the framework implementation is correct, but
removing it locally does seem to fix broken storyboard cases.

Closes https://github.com/ppy/osu/issues/20155.
2022-09-07 15:39:19 +09:00
Dean Herbert
a3de5f808e Fix typo in LoopStartTime addition 2022-09-06 17:46:03 +09:00
Dean Herbert
677708c5e4 Rewrite logic using a list 2022-09-06 16:58:51 +09:00
Dean Herbert
d667f46830 Refactor alpha check to not overwrite sourced overrides with values from later commands 2022-09-06 16:41:32 +09:00
Dean Herbert
bea42d2862 Handle earliest-alpha-start-time logic in StoryboardSprite itself 2022-09-06 16:16:58 +09:00
Dean Herbert
a5e57b083c Remove EarliestDisplayTime's input to CommandStartTime 2022-09-06 16:16:58 +09:00
Dean Herbert
c8764cb333 Move all usage of GameplayClock to IGameplayClock 2022-08-15 18:30:53 +09:00
Dean Herbert
ac99c1ad69 Migrate the majority of existing file lookups to use new extension methods 2022-08-10 16:01:16 +09:00
Dan Balasescu
b4e55f7309 Apply IRenderer changes 2022-08-02 19:50:57 +09:00
Dean Herbert
31a447fda0 Update parameter discards 2022-06-24 21:26:19 +09:00
Dean Herbert
f71f6302fd Remove unnecessary null casts 2022-06-24 14:50:11 +09:00
Dan Balasescu
f8830c6850 Automated #nullable processing 2022-06-17 16:37:17 +09:00
Dean Herbert
f23ddfe6cc Move remaining realm classes out of Stores namespace 2022-06-15 21:56:00 +09:00
Bartłomiej Dach
71c0216c55
Add null check guards to unsubscriptions in Dispose() 2022-04-07 21:37:42 +02:00
Dean Herbert
040afff670 Change DrawableStoryboardAnimation to derive from TextureAnimation 2022-04-07 17:35:59 +09:00
Dean Herbert
cbc4e5319d Fix DrawableStoryboardAnimation to handle skin fallback frame count similar to stable
Reasoning is explained in the inline comment (basically, stable doesn't
care what the user specifies as the frame count when falling back to
skin resources).

This change also removes on to two layers of drawables, which should be
a win in heavy storyboards.
2022-04-07 17:35:56 +09:00
Dean Herbert
a7e262627f Fix DrawableStoryboardAnimation not specifying sizing correctly
Usually this would be handled by `TextureAnimation`, but because we are
inheriting from `DrawableAnimation` here for reasons, we needed to
implement this ourselves. Follows the implementation in
`TextureAnimation`.
2022-04-07 15:18:55 +09:00
Salman Ahmed
c1697c7621 Update DrawableStoryboardSprite to use helper method 2022-03-14 06:30:54 +03:00
Salman Ahmed
740a72e16d Share origin adjustment logic between storyboard sprite and animation 2022-03-14 05:44:34 +03:00
Salman Ahmed
9cf05080da Simplify conditionals to one XOR operations with comments 2022-03-14 04:40:35 +03:00
Salman Ahmed
0b8c89bfa8 Fix drawable storyboard sprites not flipping origin on negative scale 2022-03-14 03:50:12 +03:00
Salman Ahmed
c9d54834be Fix SkinnableSprites in storyboards not autosizing to their textures 2022-03-14 03:46:13 +03:00
Dean Herbert
c38126ba9d Make mods argument optional for storyboard construction 2022-03-04 12:05:02 +09:00
Salman Ahmed
3630ab2db2 Remove unnecessary nullability of storyboard mods list 2022-03-03 00:09:12 +03:00
Salman Ahmed
cbb8dc2891 Fix storyboard samples rate not adjusted from actual gameplay mods 2022-03-02 20:56:18 +03:00
Dean Herbert
e49da2948d Fix storyboard background replacement logic not working for beatmaps with multiple backgrounds
In the case where the background image of individual difficulties is
different, querying the beatmap *set*'s metadata as we were will cause
issues.

I haven't added test coverage for this but can if required. Can be
manually tested using https://osu.ppy.sh/beatmapsets/1595773#osu/3377474
(specifically the highest difficulty).

Closes https://github.com/ppy/osu/discussions/16873.
2022-02-18 16:24:19 +09:00
Dean Herbert
6eb2c28e41 Rename RealmContextFactory to RealmAccess 2022-01-24 20:38:07 +09:00
Dean Herbert
b2d09b7b10 Fix further warnings 2022-01-12 23:42:12 +09:00
Dean Herbert
eb70a1eeb7 Replace compatibility properties with direct references 2022-01-12 18:13:14 +09:00
Dean Herbert
167c399e8a Fix invalid DI resolution of RealmFileStore 2022-01-12 17:00:16 +09:00
Dean Herbert
00e3af3366 Update model manager and many related classes to get things compiling again 2022-01-12 17:00:00 +09:00
Dean Herbert
e6fdd0e969 Miscellaneous fixes that don't fit elsewhere 2022-01-12 16:39:36 +09:00
Dean Herbert
79dd9674fc Use longer form to read better
Using `l.StartTime` reads like a coding issue, even though if you go
down the call chain looks to be correct.
2021-12-14 17:41:09 +09:00
Dan Balasescu
357a661379 Fix storyboard sprites sometimes starting too early 2021-12-14 13:13:12 +09:00
Dean Herbert
59e763467f Move StoragePath implementation to an extension method 2021-11-19 16:08:38 +09:00
Dean Herbert
7c2e79f911 Update all simple cases of switching to IWorkingBeatmap 2021-11-17 20:56:57 +09:00
Dean Herbert
b80c02b757 Fix crash on gameplay startup if beatmap has no background 2021-11-04 17:24:40 +09:00
Dean Herbert
d1e6d1cb98 Update some other missed incorrect null/empty usages 2021-11-04 14:50:43 +09:00
Dean Herbert
6944151486 Apply batch fixing of built-in types using var 2021-10-27 13:04:41 +09:00
Dean Herbert
3faafd7200 Rename parameter to repeatCount and add guards 2021-10-01 18:26:29 +09:00
Sebastian Krajewski
f148fbcc94 Cap LoopCount to at least 1 2021-09-29 00:59:08 +02:00
Dean Herbert
06d1bd971c Default DrawableStoryboard to a completed state to avoid state change on empty storyboards 2021-06-18 16:08:49 +09:00
Dean Herbert
00b3eea840 Merge branch 'legacy-skin-default-fallback' into fix-skin-sample-lookup 2021-05-31 21:39:04 +09:00
Dean Herbert
631d217f78 Remove no longer necessary conditional access 2021-05-28 15:42:35 +09:00
Dean Herbert
6268bbea85 Merge branch 'master' into fix-skin-sample-lookup 2021-05-28 14:47:35 +09:00
Dean Herbert
70a844ac10 Remove allowFallback parameters completely 2021-05-27 14:50:42 +09:00
Dean Herbert
342acadae2 Change LINQ query for better readability 2021-05-25 18:51:51 +09:00
Dean Herbert
871ca8054f Rename classes as per review feedback 2021-05-25 18:50:33 +09:00
Dean Herbert
5ea948aabe Bypass 640x480 coordinate space for video storyboard elements
This allows the `FillMode.Fill` to take up the full space of the
storyboard container.
2021-05-25 16:17:29 +09:00
Dean Herbert
0c55bba220 Allow storyboards to be widescreen if only a video element exists
This matches stable behaviour, which will allow videos to display
filling the screen if they are the only thing contained within the
"storyboard".
2021-05-25 16:07:19 +09:00
Dean Herbert
e3507d5453 Move DrawableStoryboard's aspect application to inside its own class 2021-05-25 16:06:39 +09:00
Dean Herbert
18779b1d1e Cache last event time value to avoid super expensive LINQ 2021-05-04 16:48:13 +09:00
Dean Herbert
ffc88db47a Implement Duration via the interface 2021-05-04 16:04:59 +09:00
Dean Herbert
bb9fa1a25e
Merge branch 'master' into play-storyboard-outro 2021-05-04 14:01:34 +09:00
smoogipoo
d28eb399a4 Fix storyboard sample lifetimes not set if seeked past 2021-04-20 17:14:48 +09:00
Christine Chen
98460c8feb Rename IStoryboardElementHasDuration, remove unnecessary step in tests, add Duration field 2021-04-18 20:20:14 -04:00
Salman Ahmed
f6a09be62d Add further xmldoc 2021-04-18 07:25:49 +03:00
Christine Chen
97bacbdc76 Show score after the end of the storyboard after it was toggled 2021-04-17 18:10:21 -04:00
Christine Chen
e40cb6797d Use GetEndTime() to get storyboard endtime 2021-04-17 15:27:48 -04:00
Christine Chen
5a015290b9 Add remarks back to LatestEventTime 2021-04-17 12:34:38 -04:00
Christine Chen
b15838b220 Move storyboard outro logic to DrawableStoryboard 2021-04-16 00:59:10 -04:00
Christine Chen
0e545e1ed9 Add IHasDuration interface with EndTime for storyboard elements to implement 2021-04-15 17:17:02 -04:00
Christine Chen
25b8c2f257 Allow skipping storyboard outro
Reuses SkipOverlay by calculating the endtime of the storyboard and using that as a "start point". Upon skipping the outro the score is instantly shown.
When the end of the storyboard is reached the score screen automatically shows up. If the player holds ESC (pause) during the outro, the score is displayed

The storyboard endtime is calculated by getting the latest endtime of the storyboard's elements, or simply returning 0 if there is no storyboard.

Co-Authored-By: Marlina José <marlina@umich.edu>
2021-04-15 13:20:40 -04:00
Christine Chen
16d34bcc0a Expose the latest end time of storyboard elements
Co-authored-by: Marlina Bowring <marlina@umich.edu>
2021-04-12 23:08:43 -04:00
Dean Herbert
efb4a366d4
Fix xmldoc explaining incorrect behaviour
Co-authored-by: Bartłomiej Dach <dach.bartlomiej@gmail.com>
2021-03-11 12:15:59 +09:00
Dean Herbert
8aaba32431 Fix storyboard commands occurring before the earliest point of visibility delaying gameplay
In osu-stable, storyboard intros start from the first command, but in
the case of storyboard drawables which have an initial hidden state, all
commands before the time at which they become visible (ie. the first
command where `Alpha` increases to a non-zero value) are ignored.

This brings lazer in line with that behaviour. It also removes several
unnecessary LINQ calls.

Note that the alpha check being done in its own pass is important, as
it must be the "minimum present alpha across all command groups,
including loops". This is what makes the implementation slightly
complex.

Closes #11981.
2021-03-09 15:55:12 +09:00
smoogipoo
dff1d80f39 Update HasFlag usages to HasFlagFast 2021-02-25 15:38:56 +09:00
Dean Herbert
05982f42ab Add more comprehensive commenting and simplify base call logic
We can call the base method regardless for better safety. Worst case
it's just going to run `Stop()` twice anyway.
2021-02-01 16:43:54 +09:00
Mysfit
ee89aa159c Removed blank line 2021-01-26 23:12:26 -05:00
Mysfit
690feb1c1e Allow looping storyboard samples to follow the base samplePlaybackDisabled event logic. 2021-01-26 23:08:51 -05:00
Mysfit
3307e8357f DrawableStoryboardSample event method override for SamplePlaybackDisabledChanged 2021-01-26 00:36:32 -05:00
Bartłomiej Dach
b692abd3c2 Simplify condition from two to one operand 2021-01-22 20:35:34 +01:00
Mysfit
e0f8f6a23f introduce overrideable bool instead of copying event logic entirely 2021-01-22 12:09:40 -05:00
Mysfit
5b1bdfbdc5 Use callback method override 2021-01-21 20:06:24 -05:00