mirror of https://github.com/zeldaret/tmc.git
great fairy
This commit is contained in:
parent
e4ee89d5a6
commit
d04b9ff79b
|
@ -6,83 +6,6 @@
|
||||||
|
|
||||||
.text
|
.text
|
||||||
|
|
||||||
thumb_func_start sub_08086B10
|
|
||||||
sub_08086B10: @ 0x08086B10
|
|
||||||
push {r4, r5, r6, lr}
|
|
||||||
adds r4, r0, #0
|
|
||||||
movs r0, #0
|
|
||||||
bl sub_0807CC3C
|
|
||||||
cmp r0, #0
|
|
||||||
beq _08086B9A
|
|
||||||
adds r1, r4, #0
|
|
||||||
adds r1, #0x84
|
|
||||||
ldrh r0, [r1]
|
|
||||||
cmp r0, #0
|
|
||||||
beq _08086B2C
|
|
||||||
subs r0, #1
|
|
||||||
strh r0, [r1]
|
|
||||||
_08086B2C:
|
|
||||||
ldrh r1, [r1]
|
|
||||||
cmp r1, #0x96
|
|
||||||
beq _08086B62
|
|
||||||
cmp r1, #0x96
|
|
||||||
bgt _08086B40
|
|
||||||
cmp r1, #0
|
|
||||||
beq _08086B5C
|
|
||||||
cmp r1, #0x82
|
|
||||||
beq _08086B62
|
|
||||||
b _08086B9A
|
|
||||||
_08086B40:
|
|
||||||
cmp r1, #0xd2
|
|
||||||
beq _08086B62
|
|
||||||
cmp r1, #0xd2
|
|
||||||
bgt _08086B4E
|
|
||||||
cmp r1, #0xaa
|
|
||||||
beq _08086B62
|
|
||||||
b _08086B9A
|
|
||||||
_08086B4E:
|
|
||||||
ldr r0, _08086B58 @ =0x00000121
|
|
||||||
cmp r1, r0
|
|
||||||
beq _08086B62
|
|
||||||
b _08086B9A
|
|
||||||
.align 2, 0
|
|
||||||
_08086B58: .4byte 0x00000121
|
|
||||||
_08086B5C:
|
|
||||||
movs r0, #2
|
|
||||||
strb r0, [r4, #0xc]
|
|
||||||
b _08086B9A
|
|
||||||
_08086B62:
|
|
||||||
adds r0, r4, #0
|
|
||||||
movs r1, #6
|
|
||||||
movs r2, #0
|
|
||||||
bl sub_080873AC
|
|
||||||
adds r5, r0, #0
|
|
||||||
cmp r5, #0
|
|
||||||
beq _08086B9A
|
|
||||||
ldr r3, _08086B9C @ =gGreatFairyRippleOffsets
|
|
||||||
ldrb r1, [r4, #0xe]
|
|
||||||
lsls r0, r1, #1
|
|
||||||
adds r0, r0, r3
|
|
||||||
movs r6, #0
|
|
||||||
ldrsh r2, [r0, r6]
|
|
||||||
lsls r2, r2, #0x10
|
|
||||||
adds r1, #1
|
|
||||||
lsls r1, r1, #1
|
|
||||||
adds r1, r1, r3
|
|
||||||
movs r0, #0
|
|
||||||
ldrsh r3, [r1, r0]
|
|
||||||
lsls r3, r3, #0x10
|
|
||||||
adds r0, r4, #0
|
|
||||||
adds r1, r5, #0
|
|
||||||
bl PositionRelative
|
|
||||||
ldrb r0, [r4, #0xe]
|
|
||||||
adds r0, #2
|
|
||||||
strb r0, [r4, #0xe]
|
|
||||||
_08086B9A:
|
|
||||||
pop {r4, r5, r6, pc}
|
|
||||||
.align 2, 0
|
|
||||||
_08086B9C: .4byte gGreatFairyRippleOffsets
|
|
||||||
|
|
||||||
thumb_func_start sub_08086BA0
|
thumb_func_start sub_08086BA0
|
||||||
sub_08086BA0: @ 0x08086BA0
|
sub_08086BA0: @ 0x08086BA0
|
||||||
push {r4, lr}
|
push {r4, lr}
|
||||||
|
|
|
@ -29,7 +29,7 @@ void sub_08086A90(Entity *ent)
|
||||||
gGreatFairy[(ent->entityType).parameter2](ent);
|
gGreatFairy[(ent->entityType).parameter2](ent);
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_08086ABC(Entity *ent)
|
void GreatFairyBehaviors(Entity *ent)
|
||||||
{
|
{
|
||||||
gGreatFairyBehaviors[ent->action](ent);
|
gGreatFairyBehaviors[ent->action](ent);
|
||||||
|
|
||||||
|
@ -51,4 +51,78 @@ void sub_08086AF8(Entity *ent)
|
||||||
ent->parameter3 = 0;
|
ent->parameter3 = 0;
|
||||||
ent->cutsceneBeh = 290;
|
ent->cutsceneBeh = 290;
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
void sub_08086B10(Entity *ent)
|
||||||
|
{
|
||||||
|
u16 *pFrame; // r1@2
|
||||||
|
s32 frame; // r1@4
|
||||||
|
Entity *ripple; // r5@16
|
||||||
|
u32 event;
|
||||||
|
|
||||||
|
event = sub_0807CC3C(0);
|
||||||
|
if (event == 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
pFrame = &ent->cutsceneBeh;
|
||||||
|
if (*pFrame != 0) {
|
||||||
|
*pFrame = *pFrame - 1;
|
||||||
|
}
|
||||||
|
frame = *pFrame;
|
||||||
|
|
||||||
|
if ( frame == 0x96 )
|
||||||
|
{
|
||||||
|
goto LABEL_16;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( frame < 0x97 )
|
||||||
|
{
|
||||||
|
if (frame != 0)
|
||||||
|
{
|
||||||
|
if ( frame == 0x82 )
|
||||||
|
{
|
||||||
|
goto LABEL_16;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
goto LABEL_17;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
if (frame == 0xd2)
|
||||||
|
{
|
||||||
|
goto LABEL_16;
|
||||||
|
}
|
||||||
|
if (frame < 0xd3)
|
||||||
|
{
|
||||||
|
if (frame == 0xaa)
|
||||||
|
{
|
||||||
|
goto LABEL_16;
|
||||||
|
}
|
||||||
|
else return;
|
||||||
|
}
|
||||||
|
if ( frame == 289 )
|
||||||
|
{
|
||||||
|
goto LABEL_16;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
LABEL_17:
|
||||||
|
ent->action = 2;
|
||||||
|
return;
|
||||||
|
LABEL_16:
|
||||||
|
ripple = sub_080873AC(ent, 6, 0);
|
||||||
|
if ( ripple )
|
||||||
|
{
|
||||||
|
PositionRelative(
|
||||||
|
ent,
|
||||||
|
ripple,
|
||||||
|
(s32)gGreatFairyRippleOffsets[ent->parameter3] << 16,
|
||||||
|
(s32)gGreatFairyRippleOffsets[ent->parameter3 + 1] << 16);
|
||||||
|
ent->parameter3 += 2;
|
||||||
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue