mirror of https://github.com/zeldaret/tmc.git
matched sub_0807DDE4
This commit is contained in:
parent
6917076fdc
commit
6c2b1a89b8
|
@ -2001,86 +2001,3 @@ _0807DDD6:
|
||||||
_0807DDE0:
|
_0807DDE0:
|
||||||
pop {r4, r5, r6, pc}
|
pop {r4, r5, r6, pc}
|
||||||
.align 2, 0
|
.align 2, 0
|
||||||
|
|
||||||
thumb_func_start sub_0807DDE4
|
|
||||||
sub_0807DDE4: @ 0x0807DDE4
|
|
||||||
push {r4, r5, lr}
|
|
||||||
adds r4, r0, #0
|
|
||||||
adds r0, #0x82
|
|
||||||
ldrh r5, [r0]
|
|
||||||
_0807DDEC:
|
|
||||||
cmp r5, #0
|
|
||||||
beq _0807DE7C
|
|
||||||
mvns r0, r5
|
|
||||||
adds r0, #1
|
|
||||||
ands r0, r5
|
|
||||||
eors r5, r0
|
|
||||||
cmp r0, #8
|
|
||||||
beq _0807DE26
|
|
||||||
cmp r0, #8
|
|
||||||
bhi _0807DE06
|
|
||||||
cmp r0, #2
|
|
||||||
beq _0807DE10
|
|
||||||
b _0807DDEC
|
|
||||||
_0807DE06:
|
|
||||||
cmp r0, #0x10
|
|
||||||
beq _0807DE44
|
|
||||||
cmp r0, #0x20
|
|
||||||
beq _0807DE70
|
|
||||||
b _0807DDEC
|
|
||||||
_0807DE10:
|
|
||||||
ldrb r0, [r4, #8]
|
|
||||||
cmp r0, #7
|
|
||||||
bne _0807DE1E
|
|
||||||
adds r0, r4, #0
|
|
||||||
bl sub_0806ED78
|
|
||||||
b _0807DDEC
|
|
||||||
_0807DE1E:
|
|
||||||
adds r0, r4, #0
|
|
||||||
bl sub_0800445C
|
|
||||||
b _0807DDEC
|
|
||||||
_0807DE26:
|
|
||||||
ldr r0, _0807DE40 @ =gScreenTransition
|
|
||||||
ldr r0, [r0]
|
|
||||||
movs r1, #3
|
|
||||||
ands r0, r1
|
|
||||||
cmp r0, #0
|
|
||||||
bne _0807DDEC
|
|
||||||
ldrb r0, [r4, #0xf]
|
|
||||||
adds r0, #2
|
|
||||||
movs r1, #7
|
|
||||||
ands r0, r1
|
|
||||||
strb r0, [r4, #0x14]
|
|
||||||
strb r0, [r4, #0xf]
|
|
||||||
b _0807DDEC
|
|
||||||
.align 2, 0
|
|
||||||
_0807DE40: .4byte gScreenTransition
|
|
||||||
_0807DE44:
|
|
||||||
ldr r0, _0807DE68 @ =gScreenTransition
|
|
||||||
ldr r0, [r0]
|
|
||||||
movs r1, #1
|
|
||||||
ands r0, r1
|
|
||||||
cmp r0, #0
|
|
||||||
bne _0807DDEC
|
|
||||||
bl Random
|
|
||||||
ldr r2, _0807DE6C @ =gUnk_0811E510
|
|
||||||
movs r1, #3
|
|
||||||
ands r1, r0
|
|
||||||
adds r1, r1, r2
|
|
||||||
ldrb r0, [r1]
|
|
||||||
adds r1, r4, #0
|
|
||||||
adds r1, #0x62
|
|
||||||
strb r0, [r1]
|
|
||||||
b _0807DDEC
|
|
||||||
.align 2, 0
|
|
||||||
_0807DE68: .4byte gScreenTransition
|
|
||||||
_0807DE6C: .4byte gUnk_0811E510
|
|
||||||
_0807DE70:
|
|
||||||
adds r0, r4, #0
|
|
||||||
movs r1, #0x80
|
|
||||||
lsls r1, r1, #6
|
|
||||||
bl sub_08003FC4
|
|
||||||
b _0807DDEC
|
|
||||||
_0807DE7C:
|
|
||||||
pop {r4, r5, pc}
|
|
||||||
.align 2, 0
|
|
||||||
|
|
|
@ -5,10 +5,47 @@
|
||||||
#include "entity.h"
|
#include "entity.h"
|
||||||
|
|
||||||
extern u8 gUnk_0811E514[];
|
extern u8 gUnk_0811E514[];
|
||||||
|
extern u8 gUnk_0811E510[];
|
||||||
|
|
||||||
void sub_0807DF38(void);
|
void sub_0807DF38(void);
|
||||||
extern void sub_0801C4A0(u32);
|
extern void sub_0801C4A0(u32);
|
||||||
|
|
||||||
|
void sub_0807DDE4(Entity* entity) {
|
||||||
|
u32 temp;
|
||||||
|
u32 switchVar;
|
||||||
|
u32 loopVar;
|
||||||
|
|
||||||
|
loopVar = entity->field_0x82.HWORD;
|
||||||
|
while (loopVar) {
|
||||||
|
switchVar = (~loopVar + 1) & loopVar;
|
||||||
|
loopVar = loopVar ^ switchVar;
|
||||||
|
switch (switchVar) {
|
||||||
|
case 2:
|
||||||
|
if (entity->entityType.type == 7) {
|
||||||
|
sub_0806ED78(entity);
|
||||||
|
} else {
|
||||||
|
sub_0800445C(entity);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 8:
|
||||||
|
if ((gScreenTransition.frameCount & 3) == 0) {
|
||||||
|
temp = (entity->field_0xf + 2U) & 7;
|
||||||
|
entity->animationState = temp;
|
||||||
|
entity->field_0xf = temp;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 0x10:
|
||||||
|
if ((gScreenTransition.frameCount & 1) == 0) {
|
||||||
|
entity->spriteOffsetX = gUnk_0811E510[Random() & 3];
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 0x20:
|
||||||
|
sub_08003FC4(entity, 0x2000);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void sub_0807DE80(Entity* entity) {
|
void sub_0807DE80(Entity* entity) {
|
||||||
u32 local1;
|
u32 local1;
|
||||||
u16 local2;
|
u16 local2;
|
||||||
|
|
Loading…
Reference in New Issue