maybe_shadow_1 which may or may not be a shadow
This commit is contained in:
parent
ed6e95fbd7
commit
bf9a00250b
4 changed files with 28 additions and 126 deletions
|
@ -5,132 +5,6 @@
|
|||
|
||||
.text
|
||||
|
||||
thumb_func_start sub_8093FC4
|
||||
sub_8093FC4: @ 8093FC4
|
||||
push {r4-r7,lr}
|
||||
mov r7, r10
|
||||
mov r6, r9
|
||||
mov r5, r8
|
||||
push {r5-r7}
|
||||
sub sp, 0x10
|
||||
adds r7, r0, 0
|
||||
mov r10, r1
|
||||
adds r4, r2, 0
|
||||
mov r8, r3
|
||||
ldr r0, [sp, 0x30]
|
||||
lsls r4, 24
|
||||
lsrs r4, 24
|
||||
mov r1, r8
|
||||
lsls r1, 24
|
||||
lsrs r1, 24
|
||||
mov r8, r1
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
mov r9, r0
|
||||
ldr r1, =gUnknown_0850DFBC
|
||||
add r0, sp, 0x4
|
||||
movs r2, 0x6
|
||||
bl memcpy
|
||||
add r5, sp, 0xC
|
||||
movs r0, 0
|
||||
strh r0, [r5]
|
||||
mov r6, sp
|
||||
adds r6, 0xE
|
||||
strh r0, [r6]
|
||||
adds r0, r7, 0
|
||||
adds r1, r4, 0
|
||||
bl FieldObjectSetDirection
|
||||
mov r1, r8
|
||||
lsls r0, r1, 1
|
||||
add r0, sp
|
||||
adds r0, 0x4
|
||||
movs r1, 0
|
||||
ldrsh r3, [r0, r1]
|
||||
str r3, [sp]
|
||||
adds r0, r4, 0
|
||||
adds r1, r5, 0
|
||||
adds r2, r6, 0
|
||||
bl sub_8092F88
|
||||
ldrh r1, [r5]
|
||||
ldrh r0, [r7, 0x10]
|
||||
adds r1, r0
|
||||
lsls r1, 16
|
||||
asrs r1, 16
|
||||
ldrh r2, [r6]
|
||||
ldrh r0, [r7, 0x12]
|
||||
adds r2, r0
|
||||
lsls r2, 16
|
||||
asrs r2, 16
|
||||
adds r0, r7, 0
|
||||
bl npc_coords_shift
|
||||
mov r0, r10
|
||||
adds r1, r4, 0
|
||||
mov r2, r8
|
||||
mov r3, r9
|
||||
bl sub_809783C
|
||||
movs r0, 0x1
|
||||
mov r1, r10
|
||||
strh r0, [r1, 0x32]
|
||||
movs r0, 0x2C
|
||||
add r10, r0
|
||||
mov r0, r10
|
||||
ldrb r1, [r0]
|
||||
movs r0, 0x41
|
||||
negs r0, r0
|
||||
ands r0, r1
|
||||
mov r1, r10
|
||||
strb r0, [r1]
|
||||
ldrb r0, [r7]
|
||||
movs r1, 0x4
|
||||
orrs r0, r1
|
||||
movs r1, 0x10
|
||||
orrs r0, r1
|
||||
strb r0, [r7]
|
||||
add sp, 0x10
|
||||
pop {r3-r5}
|
||||
mov r8, r3
|
||||
mov r9, r4
|
||||
mov r10, r5
|
||||
pop {r4-r7}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sub_8093FC4
|
||||
|
||||
thumb_func_start maybe_shadow_1
|
||||
maybe_shadow_1: @ 8094080
|
||||
push {r4,r5,lr}
|
||||
sub sp, 0x4
|
||||
adds r4, r0, 0
|
||||
adds r5, r1, 0
|
||||
ldr r0, [sp, 0x10]
|
||||
lsls r2, 24
|
||||
lsrs r2, 24
|
||||
lsls r3, 24
|
||||
lsrs r3, 24
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
str r0, [sp]
|
||||
adds r0, r4, 0
|
||||
bl sub_8093FC4
|
||||
ldrb r0, [r4, 0x18]
|
||||
lsls r0, 28
|
||||
lsrs r0, 28
|
||||
bl get_go_image_anim_num
|
||||
adds r2, r0, 0
|
||||
lsls r2, 24
|
||||
lsrs r2, 24
|
||||
adds r0, r4, 0
|
||||
adds r1, r5, 0
|
||||
bl npc_apply_anim_looping
|
||||
adds r0, r4, 0
|
||||
bl DoShadowFieldEffect
|
||||
add sp, 0x4
|
||||
pop {r4,r5}
|
||||
pop {r0}
|
||||
bx r0
|
||||
thumb_func_end maybe_shadow_1
|
||||
|
||||
thumb_func_start sub_80940C4
|
||||
@ int sub_80940C4(int a1, int a2, int a3)
|
||||
sub_80940C4: @ 80940C4
|
||||
|
|
|
@ -44,5 +44,6 @@ extern const u8 gUnknown_0850DBA0[5];
|
|||
|
||||
extern bool8 (*const *const gUnknown_0850DC50[])(struct MapObject *, struct Sprite *);
|
||||
extern u8 (*const gUnknown_0850DEE8[5])(u8);
|
||||
extern const s16 gUnknown_0850DFBC[3];
|
||||
|
||||
#endif //GUARD_DATA3_H
|
||||
|
|
|
@ -18,5 +18,7 @@ u8 sub_8097F78(struct MapObject *);
|
|||
bool8 obj_npc_ministep(struct Sprite *sprite);
|
||||
bool8 sub_80976EC(struct Sprite *sprite);
|
||||
void sub_80976DC(struct Sprite *, u8);
|
||||
void sub_809783C(struct Sprite *, u8, u8, u8);
|
||||
void DoShadowFieldEffect(struct MapObject *);
|
||||
|
||||
#endif //GUARD_MAP_OBJ_8097404_H
|
||||
|
|
|
@ -4263,3 +4263,28 @@ an_walk_any_2_macro(sub_8093F04, do_go_anim, npc_obj_ministep_stop_on_arrival, 2
|
|||
an_walk_any_2_macro(sub_8093F44, do_go_anim, npc_obj_ministep_stop_on_arrival, 3, 0)
|
||||
an_walk_any_2_macro(sub_8093F84, do_go_anim, npc_obj_ministep_stop_on_arrival, 4, 0)
|
||||
|
||||
void sub_8093FC4(struct MapObject *mapObject, struct Sprite *sprite, u8 direction, u8 speed, u8 a5)
|
||||
{
|
||||
s16 displacements[ARRAY_COUNT(gUnknown_0850DFBC)];
|
||||
s16 x;
|
||||
s16 y;
|
||||
|
||||
memcpy(displacements, gUnknown_0850DFBC, sizeof gUnknown_0850DFBC);
|
||||
x = 0;
|
||||
y = 0;
|
||||
FieldObjectSetDirection(mapObject, direction);
|
||||
sub_8092F88(direction, &x, &y, displacements[speed], displacements[speed]);
|
||||
npc_coords_shift(mapObject, mapObject->coords2.x + x, mapObject->coords2.y + y);
|
||||
sub_809783C(sprite, direction, speed, a5);
|
||||
sprite->data2 = 1;
|
||||
sprite->animPaused = 0;
|
||||
mapObject->mapobj_bit_2 = 1;
|
||||
mapObject->mapobj_bit_4 = 1;
|
||||
}
|
||||
|
||||
void maybe_shadow_1(struct MapObject *mapObject, struct Sprite *sprite, u8 direction, u8 speed, u8 a4)
|
||||
{
|
||||
sub_8093FC4(mapObject, sprite, direction, speed, a4);
|
||||
npc_apply_anim_looping(mapObject, sprite, get_go_image_anim_num(mapObject->mapobj_unk_18));
|
||||
DoShadowFieldEffect(mapObject);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue