-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Work on Fairy Flute song randomization #150
Open
juef17
wants to merge
12
commits into
mcgrew:master
Choose a base branch
from
juef17:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Apparently I can't rename a branch and keep associated pull requests alive. My bad! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull requests adds the possibility to randomize the Fairy Flute song that is played when using the flute in a battle or on the overworld. The new song is chosen at random from 67 possible songs (including the original). Since their lengths are variable, the mt randomization is used and the randomization is done prior to the checksum calculation, so that the song is tied to the seed number, not to give an advantage in a race situation. I have created two new files for this because while the songs do not require many bytes to be modified, I feel it would clutter
dwr.c
too much.I did set the randomization to always be on because I don't feel comfortable adjusting the flags code without further input. Also, apologies if this is not a proper way to code or submit things here: I am only an amateur programmer and this is the first actual pull request I've ever done anywhere.
Also of note: the original code for the flute song speedup with the speed hacks flag manually changed the bytes in the flute song. Since it seemed unpractical to me to have to do this manually with every new flute song, I replaced the change with a call to a new function which sort of parses the flute song data and sets all note and rest lengths to the minimum. One fun thing about this is that it would be a trivial change to make said lengths a bit longer, or the song tempo slower, so that the songs are still much faster but actually recognizable.
Finally, I did this because I saw this as a feature request in the DWR Discord server. AsmadiGames had already done 3 songs a couple of years ago but did not move further as he felt a lack of interest for the feature. A quick poll in Discord showed only positive reactions to this, with a few concerns about the flute lengths. The songs added in this PR are all between 2.4 and 8.2 seconds long, averaging about 5 seconds, and the original song is about 5 seconds long. All songs have an audio preview and IPS patch in the #community-contributions channel on Discord (Flute Toots thread).
[Edit] Flag is implemented in this web app: here.