mirror of https://github.com/zeldaret/tmc.git
match sub_0807D1A4
This commit is contained in:
parent
6498e3d531
commit
f00aaa506a
|
|
@ -290,24 +290,3 @@ _0807D1A0:
|
||||||
pop {r4, r5, pc}
|
pop {r4, r5, pc}
|
||||||
.align 2, 0
|
.align 2, 0
|
||||||
|
|
||||||
thumb_func_start sub_0807D1A4
|
|
||||||
sub_0807D1A4: @ 0x0807D1A4
|
|
||||||
push {lr}
|
|
||||||
adds r2, r0, #0
|
|
||||||
movs r3, #0
|
|
||||||
cmp r1, #0
|
|
||||||
beq _0807D1BC
|
|
||||||
_0807D1AE:
|
|
||||||
ldrh r0, [r2]
|
|
||||||
eors r0, r1
|
|
||||||
adds r3, r3, r0
|
|
||||||
adds r2, #2
|
|
||||||
subs r1, #2
|
|
||||||
cmp r1, #0
|
|
||||||
bne _0807D1AE
|
|
||||||
_0807D1BC:
|
|
||||||
lsls r0, r3, #0x10
|
|
||||||
lsrs r0, r0, #0x10
|
|
||||||
pop {pc}
|
|
||||||
.align 2, 0
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -26,8 +26,20 @@ extern u16 sub_080B18DC(u16, const char*);
|
||||||
void sub_0807DB88(ScriptExecutionContext* context, u32 unk1);
|
void sub_0807DB88(ScriptExecutionContext* context, u32 unk1);
|
||||||
void sub_0807DAF0(Entity* entity, ScriptExecutionContext* context, u32 unk1);
|
void sub_0807DAF0(Entity* entity, ScriptExecutionContext* context, u32 unk1);
|
||||||
|
|
||||||
struct_0807D1C4* sub_0807D1C4(u32 param_1) {
|
u16 sub_0807D1A4(u16* unk_1, u32 unk_2) {
|
||||||
return (struct_0807D1C4*)(gUnk_0811E4BC + param_1 * 0xc);
|
u32 uVar1;
|
||||||
|
|
||||||
|
uVar1 = 0;
|
||||||
|
while (unk_2 != 0) {
|
||||||
|
uVar1 = uVar1 + (*unk_1 ^ unk_2);
|
||||||
|
unk_1 = unk_1 + 1;
|
||||||
|
unk_2 = unk_2 - 2;
|
||||||
|
}
|
||||||
|
return uVar1;
|
||||||
|
}
|
||||||
|
|
||||||
|
struct_0807D1C4* sub_0807D1C4(u32 unk_1) {
|
||||||
|
return (struct_0807D1C4*)(gUnk_0811E4BC + unk_1 * 0xc);
|
||||||
}
|
}
|
||||||
|
|
||||||
// these three are basically the same and wrong by basically one instruction in the wrong place
|
// these three are basically the same and wrong by basically one instruction in the wrong place
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue