summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTal Hayon <talhayon1@gmail.com>2022-04-25 06:23:48 +0300
committerTal Hayon <talhayon1@gmail.com>2022-04-25 06:23:48 +0300
commite89741cb9096f25cdd80eadf2cc548c2f3c7d188 (patch)
tree45ac60ae3323d9f5497a541cf259b58ddca882e7 /src
parenta957ee958028e378817fadb8945e68537437200a (diff)
Match sub_08051738
Diffstat (limited to 'src')
-rw-r--r--src/fileselect.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/fileselect.c b/src/fileselect.c
index b7b4170c..aacb57f0 100644
--- a/src/fileselect.c
+++ b/src/fileselect.c
@@ -1098,22 +1098,27 @@ void HandleFileCopy(void) {
sub_08050A64(gMapDataBottomSpecial.unk6);
}
-// regalloc
-NONMATCH("asm/non_matching/fileScreen/sub_08051738.inc", void sub_08051738(void)) {
+void sub_08051738(void) {
s32 temp;
u32 i;
s32 uVar3;
+ s32 val;
+ u32 temp2;
gMapDataBottomSpecial.unk7 = 4;
uVar3 = 0;
for (i = 0; i < 3; i++) {
if (gMapDataBottomSpecial.saveStatus[i] == 1) {
- temp = gMapDataBottomSpecial.unk6 ^ i;
- uVar3 = !!temp & 4;
+ temp = gMapDataBottomSpecial.unk6;
+ val = 4;
+ if ((temp ^ i) == 0) {
+ val = 0;
+ }
} else {
uVar3++;
+ val = uVar3;
}
- (&gGenericMenu.selectMtx)[i] = uVar3;
+ gGenericMenu.unk10.a[i] = val;
}
if (uVar3 == 0) {
gMenu.transitionTimer = 0x3c;
@@ -1127,7 +1132,6 @@ NONMATCH("asm/non_matching/fileScreen/sub_08051738.inc", void sub_08051738(void)
gGenericMenu.unk10.a[3] = 4;
gGenericMenu.unk14 = uVar3;
}
-END_NONMATCH
s32 sub_080517B4(s32 a1) {
u32 i = gMapDataBottomSpecial.unk7;