mirror of
https://github.com/SAT-R/sa2.git
synced 2026-10-28 09:43:38 +00:00
more profile
This commit is contained in:
1 parent
de0999923f
commit
fc4e84e0ab
2 files changed
+32
-69
No files matched your search
@@ -7,75 +7,6 @@
|
||||
@; Unlikely to all be profile but a large section
|
||||
@; but a large section seems to relate to it
|
||||
|
||||
thumb_func_start sub_8069180
|
||||
sub_8069180: @ 0x08069180
|
||||
push {r4, r5, lr}
|
||||
ldr r2, _080691FC @ =gCurTask
|
||||
ldr r2, [r2]
|
||||
lsls r0, r0, #0x10
|
||||
asrs r3, r0, #0x10
|
||||
lsls r0, r3, #2
|
||||
adds r0, r0, r3
|
||||
lsls r0, r0, #2
|
||||
adds r0, r0, r3
|
||||
lsls r0, r0, #4
|
||||
ldrh r2, [r2, #6]
|
||||
adds r0, r0, r2
|
||||
ldr r2, _08069200 @ =IWRAM_START + 0x314
|
||||
adds r2, r2, r0
|
||||
mov ip, r2
|
||||
lsls r1, r1, #0x10
|
||||
asrs r0, r1, #0x10
|
||||
ldr r2, _08069204 @ =0xFFFF0000
|
||||
adds r1, r1, r2
|
||||
lsrs r1, r1, #0x10
|
||||
cmp r1, #7
|
||||
bhi _080691F4
|
||||
mov r2, ip
|
||||
adds r2, #0x60
|
||||
mov r4, ip
|
||||
adds r4, #0x90
|
||||
mov r5, ip
|
||||
adds r5, #0xf0
|
||||
movs r1, #8
|
||||
subs r1, r1, r0
|
||||
lsls r0, r1, #4
|
||||
subs r0, r0, r1
|
||||
lsls r0, r0, #1
|
||||
lsls r1, r3, #3
|
||||
adds r0, r0, r1
|
||||
lsls r0, r0, #0x10
|
||||
asrs r3, r0, #0x10
|
||||
adds r0, r3, #0
|
||||
adds r0, #0x20
|
||||
strh r0, [r2, #0x16]
|
||||
adds r0, #0x10
|
||||
mov r1, ip
|
||||
strh r0, [r1, #0x16]
|
||||
adds r1, #0x30
|
||||
adds r0, #0x30
|
||||
strh r0, [r1, #0x16]
|
||||
subs r0, #0x20
|
||||
strh r0, [r4, #0x16]
|
||||
adds r4, #0x30
|
||||
adds r0, #0x10
|
||||
strh r0, [r4, #0x16]
|
||||
adds r0, #0x20
|
||||
strh r0, [r5, #0x16]
|
||||
movs r5, #0x90
|
||||
lsls r5, r5, #1
|
||||
add r5, ip
|
||||
adds r0, #0x10
|
||||
strh r0, [r5, #0x16]
|
||||
_080691F4:
|
||||
pop {r4, r5}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.align 2, 0
|
||||
_080691FC: .4byte gCurTask
|
||||
_08069200: .4byte IWRAM_START + 0x314
|
||||
_08069204: .4byte 0xFFFF0000
|
||||
|
||||
thumb_func_start sub_8069208
|
||||
sub_8069208: @ 0x08069208
|
||||
push {r4, r5, r6, r7, lr}
|
||||
|
||||
@@ -4202,3 +4202,35 @@ void sub_8069110(void) {
|
||||
gCurTask->main = sub_8069208;
|
||||
}
|
||||
}
|
||||
|
||||
void sub_8069180(s16 a, s16 b) {
|
||||
// Not sure why but the struct has to be loaded like this
|
||||
#ifndef NON_MATCHING
|
||||
u32 offsetA = gCurTask->structOffset + (a * sizeof(struct UNK_80637EC_UNK314));
|
||||
register u32 offsetB asm("r2") = IWRAM_START + offsetof(struct UNK_80637EC, unk314);
|
||||
struct UNK_80637EC_UNK314* unk314 = (struct UNK_80637EC_UNK314*)(offsetA + offsetB);
|
||||
#else
|
||||
struct UNK_80637EC_UNK314* unk314 = &((struct UNK_80637EC*)(IWRAM_START + gCurTask->structOffset))->unk314[a];
|
||||
#endif
|
||||
|
||||
if (b > 0 && b < 9) {
|
||||
struct UNK_0808B3FC_UNK240* unk0 = unk314->unk0;
|
||||
struct UNK_0808B3FC_UNK240* unk60 = &unk314->unk60;
|
||||
struct UNK_0808B3FC_UNK240* unk90 = unk314->unk90;
|
||||
struct UNK_0808B3FC_UNK240* unkF0 = unk314->unkF0;
|
||||
|
||||
s16 c = (8 - b) * 0x1E + (a * 8);
|
||||
unk60->unk16 = c + 0x20;
|
||||
unk0->unk16 = c + 0x30;
|
||||
unk0++;
|
||||
unk0->unk16 = c + 0x60;
|
||||
|
||||
unk90->unk16 = c + 0x40;
|
||||
unk90++;
|
||||
unk90->unk16 = c + 0x50;
|
||||
|
||||
unkF0->unk16 = c + 0x70;
|
||||
unkF0++;
|
||||
unkF0->unk16 = c + 0x80;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user