summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPikalaxALT <pikalaxalt@gmail.com>2017-06-29 21:48:53 -0400
committerPikalaxALT <pikalaxalt@gmail.com>2017-06-29 21:48:53 -0400
commiteb9df8bc6699093ef8f3c9ccb985bec9809910c7 (patch)
tree38d1f823238f673b7b5986978e95afd988a18138
parent1bb72454b44307b772660e54318598f0cea274cc (diff)
sub_8136EF0
-rwxr-xr-xasm/use_pokeblock.s64
-rwxr-xr-xinclude/pokenav.h5
-rwxr-xr-xsrc/use_pokeblock.c14
3 files changed, 16 insertions, 67 deletions
diff --git a/asm/use_pokeblock.s b/asm/use_pokeblock.s
index f5abbb27e..c153f7cfb 100755
--- a/asm/use_pokeblock.s
+++ b/asm/use_pokeblock.s
@@ -6,70 +6,6 @@
.text
- thumb_func_start sub_8136EF0
-sub_8136EF0: @ 8136EF0
- push {r4,r5,lr}
- ldr r5, _08136F60 @ =gPlayerParty
- ldr r0, _08136F64 @ =gUnknown_083DFEC4
- ldr r1, [r0]
- ldr r2, _08136F68 @ =0x000087dc
- adds r0, r1, r2
- movs r2, 0
- ldrsh r0, [r0, r2]
- lsls r0, 2
- adds r1, r0
- ldr r0, _08136F6C @ =0x0000893e
- adds r1, r0
- ldrb r0, [r1]
- lsls r0, 27
- lsrs r0, 27
- movs r1, 0x64
- muls r0, r1
- adds r5, r0, r5
- ldr r4, _08136F70 @ =gUnknown_02039304
- ldr r1, [r4]
- adds r1, 0x57
- adds r0, r5, 0
- bl sub_8136E10
- ldr r0, [r4]
- ldr r0, [r0, 0x8]
- adds r1, r5, 0
- bl sub_8136E40
- ldr r1, [r4]
- adds r1, 0x5C
- adds r0, r5, 0
- bl sub_8136E10
- movs r3, 0
-_08136F36:
- ldr r0, [r4]
- adds r2, r0, 0
- adds r2, 0x61
- adds r2, r3
- adds r1, r0, 0
- adds r1, 0x5C
- adds r1, r3
- adds r0, 0x57
- adds r0, r3
- ldrb r1, [r1]
- ldrb r0, [r0]
- subs r1, r0
- strb r1, [r2]
- adds r0, r3, 0x1
- lsls r0, 16
- lsrs r3, r0, 16
- cmp r3, 0x4
- bls _08136F36
- pop {r4,r5}
- pop {r0}
- bx r0
- .align 2, 0
-_08136F60: .4byte gPlayerParty
-_08136F64: .4byte gUnknown_083DFEC4
-_08136F68: .4byte 0x000087dc
-_08136F6C: .4byte 0x0000893e
-_08136F70: .4byte gUnknown_02039304
- thumb_func_end sub_8136EF0
-
thumb_func_start sub_8136F74
sub_8136F74: @ 8136F74
push {r4-r7,lr}
diff --git a/include/pokenav.h b/include/pokenav.h
index 97634955a..70cc4135f 100755
--- a/include/pokenav.h
+++ b/include/pokenav.h
@@ -19,9 +19,8 @@ struct UnkPokenavStruct_Sub1 {
/*0x54*/ u8 unk54;
/*0x55*/ u8 unk55;
/*0x56*/ u8 unk56;
- /*0x57*/ u8 fil57[5];
- /*0x5c*/ u8 unk5c[1];
- /*0x5d*/ u8 fil5d[4];
+ /*0x57*/ u8 unk57[5];
+ /*0x5c*/ u8 unk5c[5];
/*0x61*/ u8 unk61[5];
/*0x66*/ s16 unk66[5];
};
diff --git a/src/use_pokeblock.c b/src/use_pokeblock.c
index c4b0d4e2e..e21984180 100755
--- a/src/use_pokeblock.c
+++ b/src/use_pokeblock.c
@@ -783,3 +783,17 @@ void sub_8136E40(struct Pokeblock *pokeblock, struct Pokemon *pokemon)
SetMonData(pokemon, MON_DATA_SHEEN, &data);
}
}
+
+void sub_8136EF0(void)
+{
+ u16 i;
+ struct Pokemon *pokemon = gPlayerParty;
+ pokemon += gUnknown_083DFEC4->unk893c[gUnknown_083DFEC4->unk87DC].partyIdx;
+ sub_8136E10(pokemon, gUnknown_02039304->unk57);
+ sub_8136E40(gUnknown_02039304->pokeblock, pokemon);
+ sub_8136E10(pokemon, gUnknown_02039304->unk5c);
+ for (i=0; i<5; i++)
+ {
+ gUnknown_02039304->unk61[i] = gUnknown_02039304->unk5c[i] - gUnknown_02039304->unk57[i];
+ }
+}