From 8ceea171b34e30ca35f32f1876dcde740ce78936 Mon Sep 17 00:00:00 2001 From: DizzyEggg Date: Mon, 13 Nov 2017 00:15:07 +0100 Subject: [PATCH] leave out pss for now --- asm/pokemon_storage_system.s | 68 ++++++++++++++++++++++++++++++++++-- src/pokemon_storage_system.c | 3 +- 2 files changed, 68 insertions(+), 3 deletions(-) diff --git a/asm/pokemon_storage_system.s b/asm/pokemon_storage_system.s index 4f1d374f8..62be41882 100755 --- a/asm/pokemon_storage_system.s +++ b/asm/pokemon_storage_system.s @@ -6,8 +6,72 @@ .text - - + thumb_func_start sub_80C7128 +sub_80C7128: @ 80C7128 + push {r4-r7,lr} + mov r7, r9 + mov r6, r8 + push {r6,r7} + adds r6, r0, 0 + adds r7, r3, 0 + ldr r5, [sp, 0x1C] + ldr r4, [sp, 0x20] + ldr r0, [sp, 0x24] + mov r9, r0 + ldr r0, [sp, 0x28] + ldr r3, [sp, 0x2C] + lsls r1, 16 + lsrs r1, 16 + lsls r2, 16 + lsls r5, 16 + lsrs r5, 16 + lsls r4, 16 + lsrs r4, 16 + lsls r0, 16 + lsrs r0, 16 + mov r8, r0 + lsls r3, 16 + lsrs r3, 16 + mov r0, r9 + lsls r0, 17 + mov r9, r0 + lsrs r2, 11 + adds r2, r1 + lsls r2, 1 + adds r6, r2 + adds r0, r4, 0 + muls r0, r3 + adds r0, r5 + lsls r0, 1 + adds r7, r0 + movs r4, 0 + cmp r4, r8 + bcs _080C7198 + mov r0, r9 + lsrs r0, 1 + mov r9, r0 + lsls r5, r3, 1 +_080C717E: + adds r0, r7, 0 + adds r1, r6, 0 + mov r3, r9 + lsrs r2, r3, 16 + bl CpuSet + adds r6, 0x40 + adds r7, r5 + adds r0, r4, 0x1 + lsls r0, 16 + lsrs r4, r0, 16 + cmp r4, r8 + bcc _080C717E +_080C7198: + pop {r3,r4} + mov r8, r3 + mov r9, r4 + pop {r4-r7} + pop {r0} + bx r0 + thumb_func_end sub_80C7128 thumb_func_start sub_80C71A4 sub_80C71A4: @ 80C71A4 diff --git a/src/pokemon_storage_system.c b/src/pokemon_storage_system.c index 8eeac96b1..f82a52d38 100644 --- a/src/pokemon_storage_system.c +++ b/src/pokemon_storage_system.c @@ -99,6 +99,7 @@ static u8 *StringCopyAndFillWithSpaces(u8 *dst, const u8 *src, u16 n) return str; } +/* can't match static void sub_80C7128(u16 *dst, u16 dstToAdd, u16 dstToMul, const u16 *src, u16 srcToAdd, u16 srcToMul, u32 size, u16 count, u16 srcBy) { u16 i; @@ -118,4 +119,4 @@ static void sub_80C7128(u16 *dst, u16 dstToAdd, u16 dstToMul, const u16 *src, u1 src += srcBy; } } -} +}*/