Repository navigation
Conversation
chaisito
force-pushed
the
decomp-world-func_800B338C
branch
from
October 5, 2026 17:13
13d4a52 to
5d763ea
Compare
Xeeynamo
requested changes
Oct 5, 2026
Xeeynamo
left a comment
Owner
There was a problem hiding this comment.
The register keyword is strictly disallowed: https://github.com/Xeeynamo/ff7-decomp/blob/main/STYLE.md . It is unlikely the original function was written like that.
chaisito
force-pushed
the
decomp-world-func_800B338C
branch
from
October 6, 2026 07:18
5d763ea to
ac7e9dd
Compare
Contributor
Author
|
Fixed it already, feel free to comment anything before merging. |
Zaarbs
reviewed
Oct 7, 2026
|
|
||
| INCLUDE_ASM("asm/us/world/nonmatchings/world", func_800B338C); | ||
| WorldSoundArea* func_800B338C(s16 arg0, s16 arg1) { | ||
| WorldSoundArea* var_a2; |
Contributor
There was a problem hiding this comment.
I think this may have been some cursed ternary use. This should match:
return (arg0 == 5 && arg1 == 18) ? D_800C68E8
: (arg0 == 4 && arg1 == 17) ? &D_800C68FC
: (arg0 == 4 && arg1 == 14) ? &D_800C6910
: NULL;
Contributor
Author
There was a problem hiding this comment.
I’ll test this exact ternary form. This function has been extremely sensitive to codegen, and using separate D_800C68FC / D_800C6910 symbols was causing overlap issues in lint, so I may need to use &D_800C68E8[1] / [2] instead. If it still matches, this would definitely be much cleaner.
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
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.
NOTE THAT:
This function is a matching decomp, however, the current implementation uses
register s32 var_a3 asm("$7");and__asm__("" : "=r"(var_a3) : "0"(var_a3));