-
Notifications
You must be signed in to change notification settings - Fork 614
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
Use enums for settings in SRAM header #2429
Conversation
include/z64sram.h
Outdated
/* 0x00 */ SRAM_HEADER_SOUND, | ||
/* 0x01 */ SRAM_HEADER_ZTARGET, | ||
/* 0x00 */ SRAM_HEADER_AUDIO, |
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.
it was previously called "sound" because that is what it is called in file select. And the options in the sram header correspond directly with the options in file select.
Currently thinking it makes sense to stay aligned with file select, but more thoughts welcome
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'd like to rename gSaveContext.audioSetting
and AudioSetting
too then. What should we call those? And what about what is now SoundMode
?
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.
good question. would like to get @engineer124 involved if he sees this. will put some thought into it in the meantime
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.
coming back to this, I think I would be okay with SoundSetting for the file select-side value, and SoundMode for the internal value.
Its not perfect but we can just do that for now and get this moving
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.
sound good thanks, I updated the PR with that (pending bss fixes)
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.
fwiw I think the SoundSetting enum probably makes more sense in a game-side header, since the value doesnt mean too much to the audio system (other than when it does the translation in Audio_SetSoundMode
)
But we can reorganize later. Merging soon
hm I thought the audio library was supposed to be self-contained though |
|
Right, the value has meaning in save context and file select. Seems to me like it should live in save.h. The audio system doesnt care about the setting value except for that one translation layer function |
build failed again |
I put the
AudioSetting
enum in z64audio.h since it's used in audio code, but confusingly there's also theSoundMode
enum which is almost the same but isn't. I named the function that translates between them asAudio_SetAudioSetting
but this name feels doubly redundant. Suggestions welcome