-
Notifications
You must be signed in to change notification settings - Fork 1
reimplement: SHC_3BB0A8C1_0x00479DF0 100% #80
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
Open
TheRedDaemon
wants to merge
1
commit into
main
Choose a base branch
from
reimpl/SHC_3BB0A8C1_0x00479DF0
base: main
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.
+26
−1
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| #include "OpenSHC/Audio/MSS/SoundSystem.func.hpp" | ||
|
|
||
| #include "OpenSHC/string-literals.hpp" | ||
|
|
||
| namespace OpenSHC { | ||
| namespace Audio { | ||
| namespace MSS { | ||
|
|
||
| // FUNCTION: STRONGHOLDCRUSADER 0x00479DF0 | ||
| void SoundSystem::playSound(int soundIndex) | ||
| { | ||
| if (!this->waveOutOpenUnk_0x8 || !this->soundActiveUnk_0x0 | ||
| || this->soundFileCurrSampleNum_0x28c[soundIndex] < 0) { | ||
| return; | ||
| } | ||
|
|
||
| AIL_set_named_sample_file(this->sample_0x190[this->soundFileCurrSampleNum_0x28c[soundIndex] + -1], | ||
| s__wav_005a6cc4, this->soundFileDataPointerArray_0x122c[soundIndex], | ||
| this->soundFileSizes_0x21cc[soundIndex], 0); | ||
| AIL_start_sample(this->sample_0x190[this->soundFileCurrSampleNum_0x28c[soundIndex] + -1]); | ||
| } | ||
|
|
||
| } | ||
| } | ||
| } | ||
This file contains hidden or 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
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.
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.
Why the space between includes? I don't really mind, just curious.
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 like to make up some structure. My mind currently works roughly like this:
May vary, certain is usually just main func.hpp first and additional microsoft headers and such last.
Uh oh!
There was an error while loading. Please reload this page.
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.
Sounds good to me. Perhaps you can codify this into our clang-format (different PR)? (not to be 100% foolproof, but rather working most of the time) https://clang.llvm.org/docs/ClangFormatStyleOptions.html#includecategories
Uh oh!
There was an error while loading. Please reload this page.
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.
So, I tested around a bit, and the following things are relevant:
..\SoundSystem.func.hpp<>:<OpenSHC/Audio/MSS/SoundSystem.func.hpp><>, but in the end, we so far have used full non-relative paths anyway.What do you think? Change something? Leave it manually as it is now?
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.
Oh so you can't really isolate the fact that the cop file's main hpp file is the same name as the parent directory of the cop file? That is too bad! Lets leave like it is, or is there value in what you created so far? I am fine with a 75% solution as long as the manual 25% isn't ugly. Or is it always reporting errors in that case? Then we should leave it I guess.
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.
My current settings have no "manual" anymore, since they would pull everything into the logic I described, for example this form (assuming
<>would be used):The alternative with relative:
If no special handling for the "main" file is used, it gets sorted into the OpenSHC blob and other func.hpp might end up over them:
I would be happy with either solution, after all, our linting only takes changed files into account, so this would have later effects.
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 like the alternative with relative paths best!