mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-11-16 19:47:35 +01:00
sub_80E78C4
This commit is contained in:
parent
fb9e5cb3a4
commit
158e9ff762
@ -795,7 +795,7 @@ sub_80B2A08: @ 80B2A08
|
||||
ldrh r0, [r0]
|
||||
cmp r0, 0x4
|
||||
bne _080B2A38
|
||||
bl Link_AnyPartnersPlayingRubyOrSapphrie
|
||||
bl Link_AnyPartnersPlayingRubyOrSapphire
|
||||
cmp r0, 0
|
||||
bne _080B2A4A
|
||||
bl sub_800AC34
|
||||
|
@ -1464,8 +1464,8 @@ _0800A060:
|
||||
bx r1
|
||||
thumb_func_end Link_HaveFourPlayersWithAtLeastOneRubyOrSapphire
|
||||
|
||||
thumb_func_start Link_AnyPartnersPlayingRubyOrSapphrie
|
||||
Link_AnyPartnersPlayingRubyOrSapphrie: @ 800A064
|
||||
thumb_func_start Link_AnyPartnersPlayingRubyOrSapphire
|
||||
Link_AnyPartnersPlayingRubyOrSapphire: @ 800A064
|
||||
push {lr}
|
||||
movs r0, 0x2
|
||||
movs r1, 0x1
|
||||
@ -1479,7 +1479,7 @@ _0800A076:
|
||||
_0800A078:
|
||||
pop {r1}
|
||||
bx r1
|
||||
thumb_func_end Link_AnyPartnersPlayingRubyOrSapphrie
|
||||
thumb_func_end Link_AnyPartnersPlayingRubyOrSapphire
|
||||
|
||||
thumb_func_start sub_800A07C
|
||||
sub_800A07C: @ 800A07C
|
||||
|
@ -5,70 +5,6 @@
|
||||
|
||||
.text
|
||||
|
||||
thumb_func_start sub_80E78C4
|
||||
sub_80E78C4: @ 80E78C4
|
||||
push {r4-r7,lr}
|
||||
mov r7, r9
|
||||
mov r6, r8
|
||||
push {r6,r7}
|
||||
sub sp, 0x10
|
||||
mov r9, r0
|
||||
mov r8, r1
|
||||
lsls r2, 24
|
||||
lsrs r7, r2, 24
|
||||
mov r0, sp
|
||||
bl sub_80E7830
|
||||
lsls r0, r7, 2
|
||||
add r0, sp
|
||||
ldr r1, [r0]
|
||||
mov r0, r8
|
||||
muls r0, r1
|
||||
mov r2, r9
|
||||
adds r6, r2, r0
|
||||
ldr r2, =gLinkPlayers
|
||||
lsls r0, r1, 3
|
||||
subs r0, r1
|
||||
lsls r0, 2
|
||||
adds r0, r2
|
||||
ldrb r4, [r0]
|
||||
ldrh r5, [r0, 0x1A]
|
||||
bl Link_AnyPartnersPlayingRubyOrSapphrie
|
||||
cmp r0, 0
|
||||
beq _080E7910
|
||||
adds r0, r6, 0
|
||||
adds r1, r4, 0
|
||||
adds r2, r5, 0
|
||||
bl sub_8120D34
|
||||
b _080E791A
|
||||
.pool
|
||||
_080E7910:
|
||||
adds r0, r6, 0
|
||||
adds r1, r4, 0
|
||||
adds r2, r5, 0
|
||||
bl sub_8120CD0
|
||||
_080E791A:
|
||||
ldr r0, =gUnknown_03001140
|
||||
ldr r0, [r0]
|
||||
lsls r1, r7, 2
|
||||
add r1, sp
|
||||
ldr r1, [r1]
|
||||
mov r2, r8
|
||||
muls r2, r1
|
||||
adds r1, r2, 0
|
||||
add r1, r9
|
||||
movs r2, 0x40
|
||||
bl memcpy
|
||||
bl sub_8120670
|
||||
add sp, 0x10
|
||||
pop {r3,r4}
|
||||
mov r8, r3
|
||||
mov r9, r4
|
||||
pop {r4-r7}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sub_80E78C4
|
||||
|
||||
thumb_func_start sub_80E7948
|
||||
sub_80E7948: @ 80E7948
|
||||
push {r4-r7,lr}
|
||||
@ -82,7 +18,7 @@ sub_80E7948: @ 80E7948
|
||||
lsrs r6, r2, 24
|
||||
mov r0, sp
|
||||
bl sub_80E7830
|
||||
bl Link_AnyPartnersPlayingRubyOrSapphrie
|
||||
bl Link_AnyPartnersPlayingRubyOrSapphire
|
||||
cmp r0, 0
|
||||
beq _080E79AC
|
||||
lsls r0, r6, 2
|
||||
@ -399,7 +335,7 @@ _080E7BB0:
|
||||
mov r8, r0
|
||||
cmp r0, 0x3
|
||||
bls _080E7BB0
|
||||
bl Link_AnyPartnersPlayingRubyOrSapphrie
|
||||
bl Link_AnyPartnersPlayingRubyOrSapphire
|
||||
str r0, [sp, 0x3C]
|
||||
movs r2, 0
|
||||
mov r8, r2
|
||||
@ -956,7 +892,7 @@ _080E8024:
|
||||
.4byte _080E80EE
|
||||
.4byte _080E80FA
|
||||
_080E804C:
|
||||
bl Link_AnyPartnersPlayingRubyOrSapphrie
|
||||
bl Link_AnyPartnersPlayingRubyOrSapphire
|
||||
cmp r0, 0
|
||||
bne _080E80F2
|
||||
movs r0, 0x6
|
||||
|
@ -194,7 +194,7 @@ void sub_8011BD0(void);
|
||||
u8 sub_800ABAC(void);
|
||||
u8 sub_800ABBC(void);
|
||||
void sub_800AC34(void);
|
||||
bool32 Link_AnyPartnersPlayingRubyOrSapphrie(void);
|
||||
bool32 Link_AnyPartnersPlayingRubyOrSapphire(void);
|
||||
bool32 sub_800A03C(void);
|
||||
void sub_8009628(u8);
|
||||
u8 sub_800AA48(void);
|
||||
|
@ -5,5 +5,8 @@
|
||||
void SetMauvilleOldMan(void);
|
||||
u8 sub_81201C8(void);
|
||||
void sub_8120B70(OldMan *dest);
|
||||
void sub_8120D34(OldMan *dest, u8 version, u16 language);
|
||||
void sub_8120CD0(OldMan *dest, u8 version, u16 language);
|
||||
void sub_8120670(void);
|
||||
|
||||
#endif // GUARD_MAUVILLE_OLD_MAN_H
|
||||
|
@ -160,7 +160,7 @@ void sub_80E6E24(void)
|
||||
sub_80E9914();
|
||||
sub_80F0BB8();
|
||||
sub_80E6BF8();
|
||||
if (Link_AnyPartnersPlayingRubyOrSapphrie())
|
||||
if (Link_AnyPartnersPlayingRubyOrSapphire())
|
||||
{
|
||||
if (sub_800A03C() == FALSE)
|
||||
{
|
||||
@ -193,7 +193,7 @@ void sub_80E6E24(void)
|
||||
|
||||
void sub_80E6F60(u32 a0)
|
||||
{
|
||||
if (Link_AnyPartnersPlayingRubyOrSapphrie())
|
||||
if (Link_AnyPartnersPlayingRubyOrSapphire())
|
||||
{
|
||||
// Ruby/Sapphire
|
||||
sub_80E7B2C(gUnknown_0203A014[0].tvShows);
|
||||
@ -380,7 +380,7 @@ static void sub_80E7324(u8 taskId)
|
||||
task->data[0] = 0;
|
||||
task->data[5] = sub_80E7810();
|
||||
task->func = sub_80E756C;
|
||||
if (Link_AnyPartnersPlayingRubyOrSapphrie())
|
||||
if (Link_AnyPartnersPlayingRubyOrSapphire())
|
||||
{
|
||||
sub_80E7808(gUnknown_0203A018, (u16 *)&task->data[2]);
|
||||
taskId2 = CreateTask(sub_80E7630, 80);
|
||||
@ -575,3 +575,26 @@ void sub_80E7830(u32 *data)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void sub_80E78C4(OldMan *oldMan, size_t recordSize, u8 which)
|
||||
{
|
||||
u8 version;
|
||||
u16 language;
|
||||
OldMan *dest;
|
||||
u32 data[4];
|
||||
|
||||
sub_80E7830(data);
|
||||
dest = (OldMan *)((void *)oldMan + recordSize * data[which]);
|
||||
version = gLinkPlayers[data[which]].version;
|
||||
language = gLinkPlayers[data[which]].language;
|
||||
if (Link_AnyPartnersPlayingRubyOrSapphire())
|
||||
{
|
||||
sub_8120D34(dest, version, language);
|
||||
}
|
||||
else
|
||||
{
|
||||
sub_8120CD0(dest, version, language);
|
||||
}
|
||||
memcpy(gUnknown_03001140, (OldMan *)((void *)oldMan + recordSize * data[which]), sizeof(OldMan));
|
||||
sub_8120670();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user