Skip to content
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

Add support for higher basegame SFX IDs #52

Open
wants to merge 25 commits into
base: master
Choose a base branch
from

Conversation

SpencerEverly
Copy link
Contributor

@SpencerEverly SpencerEverly commented May 9, 2023

This is another pull request that handles adding more than 91 sound IDs for sound effects. Requires a line change in main.lua (Line 284). Just delete off and soundIdx <= 91 on that line and you're good to go!

Code is based off saturnyoshi's code pertaining to higher basegame music IDs.

@Bluenaxela Bluenaxela self-requested a review May 10, 2023 03:56
{
curRoot = PGE_SDL_Manager::appPath;
for(int i=0; i<91; i++)
for(int i = 0; i < max_soundeffect_count; i++)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not safe/correct code. i is used to index into defaultChunksList and chunksChannelsList which have a size of defaultSoundCount, which may be smaller than max_soundeffect_count when this is called.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just did a commit fixing the issue where channelChunksList doesn't have any values above 91. Anything above 91 will take the channel -1.

Check it and see if it's good enough, if you have the time to.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants