mirror of
https://github.com/pret/pmd-red.git
synced 2024-11-23 21:19:53 +00:00
Thanks @Eebit for matching these three funcs
This commit is contained in:
parent
ed00b02e02
commit
5438b247a3
@ -1,96 +0,0 @@
|
||||
#include "asm/constants/gba_constants.inc"
|
||||
#include "asm/macros.inc"
|
||||
|
||||
.syntax unified
|
||||
|
||||
.text
|
||||
|
||||
thumb_func_start sub_8096078
|
||||
sub_8096078:
|
||||
push {r4-r7,lr}
|
||||
mov r7, r9
|
||||
mov r6, r8
|
||||
push {r6,r7}
|
||||
movs r2, 0
|
||||
movs r3, 0
|
||||
ldr r0, _08096090
|
||||
mov r12, r0
|
||||
mov r8, r3
|
||||
movs r4, 0
|
||||
mov r9, r4
|
||||
b _080960B6
|
||||
.align 2, 0
|
||||
_08096090: .4byte gUnknown_203B490
|
||||
_08096094:
|
||||
cmp r2, r3
|
||||
ble _080960AA
|
||||
mov r1, r12
|
||||
ldr r0, [r1]
|
||||
mov r5, r8
|
||||
adds r1, r0, r5
|
||||
adds r0, r4
|
||||
ldm r0!, {r5-r7}
|
||||
stm r1!, {r5-r7}
|
||||
ldm r0!, {r6,r7}
|
||||
stm r1!, {r6,r7}
|
||||
_080960AA:
|
||||
adds r4, 0x14
|
||||
movs r0, 0x14
|
||||
add r9, r0
|
||||
adds r2, 0x1
|
||||
add r8, r0
|
||||
adds r3, 0x1
|
||||
_080960B6:
|
||||
cmp r2, 0x3
|
||||
bgt _080960E2
|
||||
mov r1, r12
|
||||
ldr r0, [r1]
|
||||
adds r0, r4
|
||||
ldrb r0, [r0]
|
||||
cmp r0, 0
|
||||
bne _080960E2
|
||||
ldr r6, _08096110
|
||||
mov r1, r9
|
||||
_080960CA:
|
||||
adds r1, 0x14
|
||||
adds r4, 0x14
|
||||
movs r5, 0x14
|
||||
add r9, r5
|
||||
adds r2, 0x1
|
||||
cmp r2, 0x3
|
||||
bgt _080960E2
|
||||
ldr r0, [r6]
|
||||
adds r0, r1
|
||||
ldrb r0, [r0]
|
||||
cmp r0, 0
|
||||
beq _080960CA
|
||||
_080960E2:
|
||||
cmp r2, 0x4
|
||||
bne _08096094
|
||||
cmp r3, 0x3
|
||||
bgt _08096102
|
||||
ldr r4, _08096110
|
||||
movs r2, 0
|
||||
lsls r0, r3, 2
|
||||
adds r0, r3
|
||||
lsls r1, r0, 2
|
||||
_080960F4:
|
||||
ldr r0, [r4]
|
||||
adds r0, r1
|
||||
strb r2, [r0]
|
||||
adds r1, 0x14
|
||||
adds r3, 0x1
|
||||
cmp r3, 0x3
|
||||
ble _080960F4
|
||||
_08096102:
|
||||
pop {r3,r4}
|
||||
mov r8, r3
|
||||
mov r9, r4
|
||||
pop {r4-r7}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.align 2, 0
|
||||
_08096110: .4byte gUnknown_203B490
|
||||
thumb_func_end sub_8096078
|
||||
|
||||
.align 2,0
|
@ -1,101 +0,0 @@
|
||||
#include "asm/constants/gba_constants.inc"
|
||||
#include "asm/macros.inc"
|
||||
|
||||
.syntax unified
|
||||
|
||||
.text
|
||||
|
||||
thumb_func_start sub_8096C80
|
||||
sub_8096C80:
|
||||
push {r4-r7,lr}
|
||||
mov r7, r9
|
||||
mov r6, r8
|
||||
push {r6,r7}
|
||||
movs r2, 0
|
||||
movs r3, 0
|
||||
ldr r0, _08096C98
|
||||
mov r12, r0
|
||||
mov r8, r3
|
||||
movs r4, 0
|
||||
mov r9, r4
|
||||
b _08096CC2
|
||||
.align 2, 0
|
||||
_08096C98: .4byte gUnknown_203B490
|
||||
_08096C9C:
|
||||
cmp r2, r3
|
||||
ble _08096CB6
|
||||
mov r1, r12
|
||||
ldr r0, [r1]
|
||||
mov r5, r8
|
||||
adds r1, r0, r5
|
||||
adds r0, r4
|
||||
adds r1, 0xF0
|
||||
adds r0, 0xF0
|
||||
ldm r0!, {r5-r7}
|
||||
stm r1!, {r5-r7}
|
||||
ldm r0!, {r6,r7}
|
||||
stm r1!, {r6,r7}
|
||||
_08096CB6:
|
||||
adds r4, 0x14
|
||||
movs r0, 0x14
|
||||
add r9, r0
|
||||
adds r2, 0x1
|
||||
add r8, r0
|
||||
adds r3, 0x1
|
||||
_08096CC2:
|
||||
cmp r2, 0x7
|
||||
bgt _08096CF2
|
||||
mov r1, r12
|
||||
ldr r0, [r1]
|
||||
adds r0, r4
|
||||
adds r0, 0xF0
|
||||
ldrb r0, [r0]
|
||||
cmp r0, 0
|
||||
bne _08096CF2
|
||||
ldr r6, _08096D20
|
||||
mov r1, r9
|
||||
_08096CD8:
|
||||
adds r1, 0x14
|
||||
adds r4, 0x14
|
||||
movs r5, 0x14
|
||||
add r9, r5
|
||||
adds r2, 0x1
|
||||
cmp r2, 0x7
|
||||
bgt _08096CF2
|
||||
ldr r0, [r6]
|
||||
adds r0, r1
|
||||
adds r0, 0xF0
|
||||
ldrb r0, [r0]
|
||||
cmp r0, 0
|
||||
beq _08096CD8
|
||||
_08096CF2:
|
||||
cmp r2, 0x8
|
||||
bne _08096C9C
|
||||
cmp r3, 0x7
|
||||
bgt _08096D14
|
||||
ldr r4, _08096D20
|
||||
movs r2, 0
|
||||
lsls r0, r3, 2
|
||||
adds r0, r3
|
||||
lsls r1, r0, 2
|
||||
_08096D04:
|
||||
ldr r0, [r4]
|
||||
adds r0, r1
|
||||
adds r0, 0xF0
|
||||
strb r2, [r0]
|
||||
adds r1, 0x14
|
||||
adds r3, 0x1
|
||||
cmp r3, 0x7
|
||||
ble _08096D04
|
||||
_08096D14:
|
||||
pop {r3,r4}
|
||||
mov r8, r3
|
||||
mov r9, r4
|
||||
pop {r4-r7}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.align 2, 0
|
||||
_08096D20: .4byte gUnknown_203B490
|
||||
thumb_func_end sub_8096C80
|
||||
|
||||
.align 2,0
|
@ -323,9 +323,7 @@ SECTIONS {
|
||||
src/play_time.o(.text);
|
||||
src/code_8094F88.o(.text);
|
||||
src/code_80958E8.o(.text);
|
||||
asm/code_80958E8_1.o(.text);
|
||||
src/code_80958E8_1.o(.text);
|
||||
asm/code_8096AF8.o(.text);
|
||||
src/code_80972F4.o(.text);
|
||||
src/code_8097504.o(.text);
|
||||
src/code_8097670.o(.text);
|
||||
|
@ -713,3 +713,36 @@ void ResetMailboxSlot(u8 index)
|
||||
gUnknown_203B490->mailboxSlots[index].unk4.dungeon.floor = 0;
|
||||
gUnknown_203B490->mailboxSlots[index].rewardType = MONEY1;
|
||||
}
|
||||
|
||||
void sub_8096078(void)
|
||||
{
|
||||
int counter1; // r5
|
||||
int counter2;
|
||||
|
||||
|
||||
counter1 = 0;
|
||||
counter2 = 0;
|
||||
|
||||
do {
|
||||
for( ; counter1 < 4; counter1++)
|
||||
{
|
||||
if (gUnknown_203B490->mailboxSlots[counter1].mailType != 0)
|
||||
break;
|
||||
}
|
||||
|
||||
if (counter1 == 4) {
|
||||
break;
|
||||
}
|
||||
|
||||
if (counter1 > counter2) {
|
||||
gUnknown_203B490->mailboxSlots[counter2] = gUnknown_203B490->mailboxSlots[counter1];
|
||||
}
|
||||
counter1++;
|
||||
counter2++;
|
||||
} while( 1 );
|
||||
|
||||
for(; counter2 < 4; counter2++)
|
||||
{
|
||||
gUnknown_203B490->mailboxSlots[counter2].mailType = 0;
|
||||
}
|
||||
}
|
||||
|
@ -294,101 +294,40 @@ void ResetPelipperBoardSlot(u8 index)
|
||||
gUnknown_203B490->pelipperBoardJobs[index].rewardType = 0;
|
||||
}
|
||||
|
||||
NAKED
|
||||
void sub_80965F4(void)
|
||||
{
|
||||
asm_unified(
|
||||
"\tpush {r4-r7,lr}\n"
|
||||
"\tmov r7, r9\n"
|
||||
"\tmov r6, r8\n"
|
||||
"\tpush {r6,r7}\n"
|
||||
"\tmovs r2, 0\n"
|
||||
"\tmovs r3, 0\n"
|
||||
"\tldr r0, _0809660C\n"
|
||||
"\tmov r12, r0\n"
|
||||
"\tmov r8, r3\n"
|
||||
"\tmovs r4, 0\n"
|
||||
"\tmov r9, r4\n"
|
||||
"\tb _08096636\n"
|
||||
"\t.align 2, 0\n"
|
||||
"_0809660C: .4byte gUnknown_203B490\n"
|
||||
"_08096610:\n"
|
||||
"\tcmp r2, r3\n"
|
||||
"\tble _0809662A\n"
|
||||
"\tmov r1, r12\n"
|
||||
"\tldr r0, [r1]\n"
|
||||
"\tmov r5, r8\n"
|
||||
"\tadds r1, r0, r5\n"
|
||||
"\tadds r0, r4\n"
|
||||
"\tadds r1, 0x50\n"
|
||||
"\tadds r0, 0x50\n"
|
||||
"\tldm r0!, {r5-r7}\n"
|
||||
"\tstm r1!, {r5-r7}\n"
|
||||
"\tldm r0!, {r6,r7}\n"
|
||||
"\tstm r1!, {r6,r7}\n"
|
||||
"_0809662A:\n"
|
||||
"\tadds r4, 0x14\n"
|
||||
"\tmovs r0, 0x14\n"
|
||||
"\tadd r9, r0\n"
|
||||
"\tadds r2, 0x1\n"
|
||||
"\tadd r8, r0\n"
|
||||
"\tadds r3, 0x1\n"
|
||||
"_08096636:\n"
|
||||
"\tcmp r2, 0x7\n"
|
||||
"\tbgt _08096666\n"
|
||||
"\tmov r1, r12\n"
|
||||
"\tldr r0, [r1]\n"
|
||||
"\tadds r0, r4\n"
|
||||
"\tadds r0, 0x50\n"
|
||||
"\tldrb r0, [r0]\n"
|
||||
"\tcmp r0, 0\n"
|
||||
"\tbne _08096666\n"
|
||||
"\tldr r6, _08096694\n"
|
||||
"\tmov r1, r9\n"
|
||||
"_0809664C:\n"
|
||||
"\tadds r1, 0x14\n"
|
||||
"\tadds r4, 0x14\n"
|
||||
"\tmovs r5, 0x14\n"
|
||||
"\tadd r9, r5\n"
|
||||
"\tadds r2, 0x1\n"
|
||||
"\tcmp r2, 0x7\n"
|
||||
"\tbgt _08096666\n"
|
||||
"\tldr r0, [r6]\n"
|
||||
"\tadds r0, r1\n"
|
||||
"\tadds r0, 0x50\n"
|
||||
"\tldrb r0, [r0]\n"
|
||||
"\tcmp r0, 0\n"
|
||||
"\tbeq _0809664C\n"
|
||||
"_08096666:\n"
|
||||
"\tcmp r2, 0x8\n"
|
||||
"\tbne _08096610\n"
|
||||
"\tcmp r3, 0x7\n"
|
||||
"\tbgt _08096688\n"
|
||||
"\tldr r4, _08096694\n"
|
||||
"\tmovs r2, 0\n"
|
||||
"\tlsls r0, r3, 2\n"
|
||||
"\tadds r0, r3\n"
|
||||
"\tlsls r1, r0, 2\n"
|
||||
"_08096678:\n"
|
||||
"\tldr r0, [r4]\n"
|
||||
"\tadds r0, r1\n"
|
||||
"\tadds r0, 0x50\n"
|
||||
"\tstrb r2, [r0]\n"
|
||||
"\tadds r1, 0x14\n"
|
||||
"\tadds r3, 0x1\n"
|
||||
"\tcmp r3, 0x7\n"
|
||||
"\tble _08096678\n"
|
||||
"_08096688:\n"
|
||||
"\tpop {r3,r4}\n"
|
||||
"\tmov r8, r3\n"
|
||||
"\tmov r9, r4\n"
|
||||
"\tpop {r4-r7}\n"
|
||||
"\tpop {r0}\n"
|
||||
"\tbx r0\n"
|
||||
"\t.align 2, 0\n"
|
||||
"_08096694: .4byte gUnknown_203B490");
|
||||
int counter1; // r5
|
||||
int counter2;
|
||||
|
||||
|
||||
counter1 = 0;
|
||||
counter2 = 0;
|
||||
|
||||
do {
|
||||
for( ; counter1 < 8; counter1++)
|
||||
{
|
||||
if (gUnknown_203B490->pelipperBoardJobs[counter1].mailType != 0)
|
||||
break;
|
||||
}
|
||||
|
||||
if (counter1 == 8) {
|
||||
break;
|
||||
}
|
||||
|
||||
if (counter1 > counter2) {
|
||||
gUnknown_203B490->pelipperBoardJobs[counter2] = gUnknown_203B490->pelipperBoardJobs[counter1];
|
||||
}
|
||||
counter1++;
|
||||
counter2++;
|
||||
} while( 1 );
|
||||
|
||||
for(; counter2 < 8; counter2++)
|
||||
{
|
||||
gUnknown_203B490->pelipperBoardJobs[counter2].mailType = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void SortPelipperJobs(void)
|
||||
{
|
||||
s32 index1;
|
||||
@ -732,3 +671,37 @@ void ResetJobSlot(u8 index)
|
||||
gUnknown_203B490->jobSlots[index].unk4.dungeon.floor = 0;
|
||||
gUnknown_203B490->jobSlots[index].rewardType = MONEY1;
|
||||
}
|
||||
|
||||
void sub_8096C80(void)
|
||||
{
|
||||
int counter1; // r5
|
||||
int counter2;
|
||||
|
||||
|
||||
counter1 = 0;
|
||||
counter2 = 0;
|
||||
|
||||
do {
|
||||
for( ; counter1 < 8; counter1++)
|
||||
{
|
||||
if (gUnknown_203B490->jobSlots[counter1].mailType != 0)
|
||||
break;
|
||||
}
|
||||
|
||||
if (counter1 == 8) {
|
||||
break;
|
||||
}
|
||||
|
||||
if (counter1 > counter2) {
|
||||
gUnknown_203B490->jobSlots[counter2] = gUnknown_203B490->jobSlots[counter1];
|
||||
}
|
||||
counter1++;
|
||||
counter2++;
|
||||
} while( 1 );
|
||||
|
||||
for(; counter2 < 8; counter2++)
|
||||
{
|
||||
gUnknown_203B490->jobSlots[counter2].mailType = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user