-
Notifications
You must be signed in to change notification settings - Fork 12
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
base: master
Are you sure you want to change the base?
Conversation
{ | ||
curRoot = PGE_SDL_Manager::appPath; | ||
for(int i=0; i<91; i++) | ||
for(int i = 0; i < max_soundeffect_count; i++) |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
… just use -1 as the channel
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.