mirror of https://github.com/zeldaret/tmc.git
Match sub_0801AC68
This commit is contained in:
parent
24388f87a1
commit
c8c1530931
|
@ -1,29 +0,0 @@
|
|||
.syntax unified
|
||||
push {r4, r5, lr}
|
||||
adds r4, r0, #0
|
||||
ldr r2, _0801AC84 @ =gUnk_0200B240
|
||||
ldr r0, _0801AC88 @ =gRoomVars
|
||||
ldrh r3, [r0, #0xe]
|
||||
movs r0, #0
|
||||
cmp r0, r3
|
||||
bhs _0801AC94
|
||||
_0801AC78:
|
||||
ldrh r5, [r2]
|
||||
cmp r4, r5
|
||||
bne _0801AC8C
|
||||
ldrh r0, [r2, #2]
|
||||
lsls r0, r0, #2
|
||||
b _0801AC96
|
||||
.align 2, 0
|
||||
_0801AC84: .4byte gUnk_0200B240
|
||||
_0801AC88: .4byte gRoomVars
|
||||
_0801AC8C:
|
||||
adds r2, #4
|
||||
adds r0, #1
|
||||
cmp r0, r3
|
||||
blo _0801AC78
|
||||
_0801AC94:
|
||||
lsls r0, r1, #2
|
||||
_0801AC96:
|
||||
pop {r4, r5, pc}
|
||||
.syntax divided
|
|
@ -393,21 +393,20 @@ END_NONMATCH
|
|||
|
||||
ASM_FUNC("asm/non_matching/beanstalkSubtask/sub_0801AB08.inc", void sub_0801AB08(u16* a, LayerStruct* layer))
|
||||
|
||||
NONMATCH("asm/non_matching/beanstalkSubtask/sub_0801AC68.inc", u32 sub_0801AC68(u32 position, u32 data)) {
|
||||
u32 sub_0801AC68(u32 position, u32 data) {
|
||||
u32 index;
|
||||
struct_0200B240* ptr;
|
||||
u32 end;
|
||||
|
||||
ptr = gUnk_0200B240;
|
||||
end = gRoomVars.unk_0e;
|
||||
for (index = 0; index < end; index++) {
|
||||
if (position == ptr[index].position) {
|
||||
return ptr[index].data << 2;
|
||||
for (index = 0; index < end; ptr++, index++) {
|
||||
if (position == ptr->position) {
|
||||
return ptr->data << 2;
|
||||
}
|
||||
}
|
||||
return data << 2;
|
||||
}
|
||||
END_NONMATCH
|
||||
|
||||
ASM_FUNC("asm/non_matching/beanstalkSubtask/sub_0801AC98.inc", void sub_0801AC98())
|
||||
|
||||
|
|
Loading…
Reference in New Issue