1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-22 04:07:25 +08:00
Commit Graph

454 Commits

Author SHA1 Message Date
ekrctb
c08130398c Add some comments 2021-07-26 17:58:34 +09:00
ekrctb
bb046fa3b8 Move catcher trail generation logic to Catcher
It resolves mutual dependency of `Catcher` and `CatcherTrailDisplay`.
Trail generation logic is moved to `Catcher`.
The generation logic no longer uses delayed scheduling because the hidden state is hard to manage.
Instead, the last time a trail is generated is calculated and used.
The new logic has a different behavior when the dash key is pressed in succession under 50ms, but it is not noticeable for normal plays.
2021-07-26 17:51:59 +09:00
ekrctb
d9f9ad35be Move catcher base size constant to Catcher. 2021-07-21 16:43:24 +09:00
ekrctb
30777795ce Add some doc comment to CatcherArea 2021-07-21 16:40:35 +09:00
ekrctb
94678064ff Rename CatcherArea.MovableCatcher to Catcher 2021-07-21 16:28:31 +09:00
ekrctb
81d0a9bd9c Fix item ordering 2021-07-19 21:05:36 +09:00
ekrctb
41169fbdaf Add [NotNull] 2021-07-19 20:20:10 +09:00
ekrctb
7201cfe0b4 Move child drawable creation of CatchPlayfield from constructor to load. 2021-07-19 20:18:17 +09:00
ekrctb
879467961f Fix catcher trails displayed in wrong place 2021-07-19 20:13:31 +09:00
ekrctb
b88ee3c1a1 Pass DroppedObjectContainer via constructor instead of DI
It is now just one level deep, so it is not beneficial to use DI here.
This effectively reverts ae09c23e.
2021-07-19 20:11:49 +09:00
ekrctb
50f9e5f362 Replace usage of CatcherArea.MovableCatcher with Catcher 2021-07-19 19:52:40 +09:00
ekrctb
97059a9f50 Create Catcher in CatchPlayfield 2021-07-19 19:44:40 +09:00
Dean Herbert
01961fe4f9
Merge pull request #13747 from ekrctb/catcher-flip
Don't flip catcher plate contents when catcher changes direction
2021-07-06 00:02:23 +09:00
ekrctb
83c80291d4 Don't flip catcher plate contents in legacy skin 2021-07-02 23:23:21 +09:00
ekrctb
fbba32647e Decouple direction of catcher from its scale 2021-07-02 23:22:39 +09:00
ekrctb
170513568b Move caught object stack vertical offset logic 2021-07-02 20:43:47 +09:00
Dean Herbert
ee6cf4396a
Merge pull request #13648 from ekrctb/dropped-object-container
Use DI to resolve "dropped object target" container in `Catcher`
2021-06-25 18:23:39 +09:00
ekrctb
c0c1b8d620 Fix catcher hyper-dash afterimage is not always displayed 2021-06-24 16:12:43 +09:00
ekrctb
ae09c23e4e Resolve DroppedObjectContainer via DI 2021-06-24 16:09:13 +09:00
ekrctb
16d5893535 Add DroppedObjectContainer class 2021-06-24 15:51:54 +09:00
ekrctb
b54e82eb99 Remove unused argument from CatchPlayfield 2021-06-22 15:23:50 +09:00
ekrctb
b087c95581 Use a frozen clock for catcher trails 2021-06-16 16:17:32 +09:00
ekrctb
1632450918 Add comments 2021-06-16 16:17:32 +09:00
ekrctb
73e443a0d9 Add comments 2021-06-16 14:01:12 +09:00
ekrctb
df16d4bacc Remove CurrentTexture from catcher 2021-06-14 20:26:33 +09:00
ekrctb
38a56d64d3 Rename CatcherTrailSprite -> CatcherTrail 2021-06-14 19:47:18 +09:00
ekrctb
c094914023 Simplify catcher trail creation 2021-06-14 19:46:48 +09:00
ekrctb
9b6ab4360e Use common skinnable catcher in catcher trails 2021-06-14 19:45:58 +09:00
ekrctb
ca061c4b93 Factor out SkinnableDrawable component of the catcher to SkinnableCatcher 2021-06-14 19:41:51 +09:00
ekrctb
7f7c2c73e0 Move catcher movement logic of Catcher to CatcherArea 2021-06-11 15:39:06 +09:00
Dean Herbert
05b46b4743
Merge pull request #13379 from ekrctb/catcher-sprite
Refactor osu!catch catcher sprite to factor out skinning logic
2021-06-10 16:52:17 +09:00
ekrctb
7df971a970 ICatcherPiece -> ICatcherSprite 2021-06-08 22:10:13 +09:00
ekrctb
194c78f67a Make current state bindable protected 2021-06-08 22:08:54 +09:00
ekrctb
0192549d6c Refactor catcher sprite to use skinned piece pattern 2021-06-08 21:29:41 +09:00
ekrctb
6e28c1b29a Move default catcher sprite to its own file 2021-06-08 17:54:57 +09:00
Dean Herbert
6017ef3825
Merge branch 'master' into fix-skin-sample-lookup 2021-06-08 17:37:36 +09:00
ekrctb
8e20f90ed5 Use seeded RNG for catch explosion animation
The animation is always the same when a replay is rewound or a beatmap is played multiple times.
2021-06-04 19:54:46 +09:00
ekrctb
181f1da3d3 Maintain catch hit explosion by lifetime entries
- Fix hit explosion not showing when a replay is rewound to a time after a hit object is caught
2021-06-04 19:46:50 +09:00
Dean Herbert
70a844ac10 Remove allowFallback parameters completely 2021-05-27 14:50:42 +09:00
Dean Herbert
dc2bc462b8 Expose internal catcher width calculation methods 2021-04-22 17:27:23 +09:00
Dean Herbert
84a7138223 Update tests to better support stack regeneration cases 2021-04-22 17:13:19 +09:00
Dean Herbert
3e1002fbf3 Improve osu!catch caught fruit placement algorithm 2021-04-22 17:06:28 +09:00
Dean Herbert
ddf1b560f3 Remove catcher fade during hyperdash
Closes https://github.com/ppy/osu/issues/12472.
2021-04-20 18:18:51 +09:00
ekrctb
6d0dc62502 Make sure latest catcher position is used for catching logic
A replay frame processed in CatchInputManager is applied to catcher in `CatcherArea`.
The catcher position is then used for the catching logic for each hit object under `HitObjectContainer`.
Thus, if `HitObjectContainer` came before `CatcherArea`, the replay input is delayed one frame.
That was one reason why the catch autoplay misses hit objects (especially when fast-forwarded).
2021-04-09 16:04:45 +09:00
Dean Herbert
89bea2868a Move bool one level down 2021-03-30 14:33:55 +09:00
Dean Herbert
013ddc734c Fix osu!catch fruit showing on plate when hidden mod is enabled
Closes https://github.com/ppy/osu/issues/12065.
2021-03-25 17:04:37 +09:00
Dean Herbert
1793385e96 Pass a score to the replay recorder to allow reading more general scoring data 2020-12-14 16:52:14 +09:00
ekrctb
96f3e0dad8 Replace CatchHitObject.X usage to EffectiveX and OriginalX 2020-12-14 11:03:14 +09:00
ekrctb
2634c6b8d9 Combine DisplayRadius and Scale to DisplaySize 2020-12-10 20:43:01 +09:00
ekrctb
a8e2f35b62 Remove unneeded check of caught object removal
The logic was public but now it is private
so the condition is ensured by the caller
2020-12-09 10:50:35 +09:00
ekrctb
b52e279702 Reword exception message 2020-12-09 10:38:11 +09:00
ekrctb
86445e7c23 Remove unnecessary copy 2020-12-09 10:36:54 +09:00
ekrctb
c8b0934573 Rename caughtFruitContainer -> caughtObjectContainer 2020-12-09 10:35:36 +09:00
ekrctb
ccca7e0b25 more specific type droppedObjectContainer 2020-12-09 10:35:01 +09:00
ekrctb
b80204642e Revert rename error 2020-12-09 10:25:35 +09:00
ekrctb
1212ffd24f Rename to CopyStateFrom, and add comment 2020-12-08 23:35:24 +09:00
ekrctb
1f36bbecd1 Fix dropped objects not removed on revert result 2020-12-08 23:07:30 +09:00
ekrctb
749d5380ca Pool caught objects and dropped objects 2020-12-08 22:38:10 +09:00
ekrctb
a32dac00dd Introduce IHasCatchObjectState implemented by DHO and CaughtObject 2020-12-08 21:29:26 +09:00
ekrctb
c301223d8c Make object on the catcher plate separate CaughtObject class 2020-12-08 21:11:40 +09:00
ekrctb
94a59ac3b2 Make catch hit lighting logic not dependent on caught object 2020-12-08 20:41:26 +09:00
ekrctb
56721a6fa9 Compute object position in stack via a pure function 2020-12-08 20:36:59 +09:00
Dan Balasescu
c3241f163d
Merge pull request #11126 from ekrctb/fix-catcher-trail-sprite-pooled
Clear all transforms of catcher trail sprite before returned to pool
2020-12-08 17:59:23 +09:00
ekrctb
22a5df6309 Clear all transforms of catcher trail sprite before returned to pool 2020-12-08 17:31:00 +09:00
ekrctb
02571ec7ae Remove hit explosion on revert result 2020-12-08 15:43:17 +09:00
ekrctb
1a66d8f2bc Remove caught objects on revert result 2020-12-08 15:24:39 +09:00
ekrctb
100b365c98 Restore hyper dash state on revert judgement result 2020-12-08 15:21:47 +09:00
ekrctb
cb76a2d7b5 Restore catcher state on revert judgement result 2020-12-08 15:03:03 +09:00
ekrctb
0213f77b4b Move catcher state changing logic to OnNewResult method 2020-12-08 14:28:30 +09:00
ekrctb
12c6b3c1fb Pool catcher trail sprite 2020-12-07 18:12:55 +09:00
Dean Herbert
d3a17b65d5 Move public methods upwards 2020-12-04 14:36:40 +09:00
Dean Herbert
8988023407 Tidy up code formatting and remove unnecessarily publicly exposed methods 2020-12-04 14:35:56 +09:00
ekrctb
23af70dd32 Invert if 2020-12-04 10:24:25 +09:00
ekrctb
e82ca66d3e Fix depth of dropped objects 2020-12-04 10:21:54 +09:00
ekrctb
7e66714c2f Use ApplyCustomUpdateState for dropping transformation
We cannot just apply the transforms because DHO clears transforms when state is updated
2020-12-03 18:46:58 +09:00
ekrctb
be456f9c6b Make DroppedObjectAnimation private 2020-12-03 18:46:58 +09:00
ekrctb
5a5c956ced Move more logic to Catcher from CatcherArea 2020-12-03 16:44:36 +09:00
ekrctb
2eb2c934cc Refactor fruit dropping code
- The repeated `Remove` call was quadratic complexity.
  Now it is linear time.
2020-12-03 16:44:36 +09:00
ekrctb
873f2363c1 Simplify the fruit stacking code
It is now more clear that
the expression of distance checking is probably unintended (a bug)
2020-12-03 16:44:36 +09:00
ekrctb
8d32cca5d6 Use more specific type for caught object 2020-12-03 16:44:36 +09:00
ekrctb
a231a4aa6d Remove unused method 2020-12-03 16:44:36 +09:00
ekrctb
af45e8d97b Don't delay caught fruit loading
It is not needed anymore because
some code in DCHO is moved from `load` to constructor.
2020-12-03 16:44:36 +09:00
ekrctb
e5c8e06c4b Create children in the constructor 2020-12-03 16:44:36 +09:00
Dan Balasescu
2e0fdf9bca
Merge pull request #11011 from ekrctb/catch-pooling-initial
Initial implementation of hit object pooling in osu!catch ruleset
2020-12-02 13:02:22 +09:00
ekrctb
e8842eed81 Use bigger initial capacity for catch hit object pool 2020-12-01 14:50:42 +09:00
ekrctb
a16b265090 Apply suggested styling changes 2020-12-01 14:46:04 +09:00
smoogipoo
5945c088cb A few code standard cleanups 2020-12-01 12:57:37 +09:00
ekrctb
08cb84b325 Pool osu!catch hit explosion 2020-12-01 11:32:20 +09:00
ekrctb
d1076778fd Convert switch expression to switch statement 2020-12-01 09:50:52 +09:00
ekrctb
70628235e3 Use hit object pooling for BananaShower. 2020-11-30 19:22:40 +09:00
ekrctb
9611aaf09e Use hit object pooling for JuiceStream.
- Use `Clear(false)` to not dispose pooled children.
- Don't set nested DHO `Origin`.
- Simplify the layout (remove custom `Origin`).
2020-11-30 19:19:14 +09:00
ekrctb
b76ae525b2 Use hit object pooling for Fruit and Banana. 2020-11-30 19:07:50 +09:00
ekrctb
94fd607a7c Use hit object pooling for Droplet and TinyDroplet. 2020-11-30 19:04:09 +09:00
ekrctb
05aaa377e7 Don't use CreateDrawableRepresentation in CatcherArea 2020-11-30 19:02:49 +09:00
Dean Herbert
9fbfb1aa9f Add comment explaining requirement 2020-11-30 15:22:55 +09:00
Dean Herbert
73990a6674 Fix osu!catch combo counter not showing after 1 combo 2020-11-30 15:20:52 +09:00
ekrctb
c99d34d140
Merge branch 'master' into palpable-catch-hit-object 2020-11-26 12:24:57 +09:00
ekrctb
3c3229ac4b Remove redundant StaysOnPlate 2020-11-25 07:59:45 +09:00
ekrctb
ab7251d742 Move members to PalpableCatchHitObject 2020-11-24 19:57:37 +09:00
ekrctb
c506b438bf Remove more code and make some methods private 2020-11-22 18:51:16 +09:00