seraxis / lr2oraja-endlessdream

A featureful fork of beatoraja
https://github.com/seraxis/lr2oraja-endlessdream/releases
GNU General Public License v3.0
46 stars 7 forks source link

Allow quick restart with START or SELECT before playing a note #29

Closed MatVeiQaaa closed 5 months ago

MatVeiQaaa commented 6 months ago

Original behavior of beatoraja is to to run fade out animation and return to select screen, it's impossible to use quick restart feature with or without preserving the play options using START/SELECT in that state.

This changes that behavior, so you can restart the song in case you took longer than anticipated to drink water, check your stream chat, etc, without returning to select menu.

It achieves that by adding a new sub-state of playing state "STATE_ABORTED", which replaces STATE_PRACTICE_FINISHED, which contradictory to its name isn't necessarily ran in practice mode, for scenario where you quit before STATE_PRELOAD (loading resources stage) or STATE_READY (the stage where "get ready" skin animation plays) finish; and replaces STATE_FINISHED for scenario where you quit before the song ended without getting any judgements other than misses.

STATE_ABORTED reimplements a piece of code to restart the song with or without preserving the play options, as well as fade out animation and return to song select in case you just want to quit.

There is a non-zero possibility i missed some peculiar edge-case, where this change may cause some unexpected behavior, as this daisy chain of sub-states is rather difficult to follow. I am mostly confident i looked out for all possible scenarios and prevented possible issues.

seraxis commented 5 months ago

Great feature, nothing stands out to me right now in your changes, merged