mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2025-01-18 01:14:19 +01:00
special_anim_with_timer
This commit is contained in:
parent
3a7f771eab
commit
cd958b1e43
@ -5,124 +5,6 @@
|
||||
|
||||
.text
|
||||
|
||||
thumb_func_start sub_8094390
|
||||
sub_8094390: @ 8094390
|
||||
movs r2, 0x1
|
||||
strh r2, [r0, 0x32]
|
||||
strh r1, [r0, 0x34]
|
||||
bx lr
|
||||
thumb_func_end sub_8094390
|
||||
|
||||
thumb_func_start sub_8094398
|
||||
sub_8094398: @ 8094398
|
||||
push {lr}
|
||||
ldrh r0, [r1, 0x34]
|
||||
subs r0, 0x1
|
||||
strh r0, [r1, 0x34]
|
||||
lsls r0, 16
|
||||
cmp r0, 0
|
||||
beq _080943AA
|
||||
movs r0, 0
|
||||
b _080943B0
|
||||
_080943AA:
|
||||
movs r0, 0x2
|
||||
strh r0, [r1, 0x32]
|
||||
movs r0, 0x1
|
||||
_080943B0:
|
||||
pop {r1}
|
||||
bx r1
|
||||
thumb_func_end sub_8094398
|
||||
|
||||
thumb_func_start sub_80943B4
|
||||
sub_80943B4: @ 80943B4
|
||||
push {r4,r5,lr}
|
||||
adds r5, r0, 0
|
||||
adds r4, r1, 0
|
||||
adds r0, r4, 0
|
||||
movs r1, 0x1
|
||||
bl sub_8094390
|
||||
adds r0, r5, 0
|
||||
adds r1, r4, 0
|
||||
bl sub_8094398
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
pop {r4,r5}
|
||||
pop {r1}
|
||||
bx r1
|
||||
thumb_func_end sub_80943B4
|
||||
|
||||
thumb_func_start sub_80943D4
|
||||
sub_80943D4: @ 80943D4
|
||||
push {r4,r5,lr}
|
||||
adds r5, r0, 0
|
||||
adds r4, r1, 0
|
||||
adds r0, r4, 0
|
||||
movs r1, 0x2
|
||||
bl sub_8094390
|
||||
adds r0, r5, 0
|
||||
adds r1, r4, 0
|
||||
bl sub_8094398
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
pop {r4,r5}
|
||||
pop {r1}
|
||||
bx r1
|
||||
thumb_func_end sub_80943D4
|
||||
|
||||
thumb_func_start sub_80943F4
|
||||
sub_80943F4: @ 80943F4
|
||||
push {r4,r5,lr}
|
||||
adds r5, r0, 0
|
||||
adds r4, r1, 0
|
||||
adds r0, r4, 0
|
||||
movs r1, 0x4
|
||||
bl sub_8094390
|
||||
adds r0, r5, 0
|
||||
adds r1, r4, 0
|
||||
bl sub_8094398
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
pop {r4,r5}
|
||||
pop {r1}
|
||||
bx r1
|
||||
thumb_func_end sub_80943F4
|
||||
|
||||
thumb_func_start sub_8094414
|
||||
sub_8094414: @ 8094414
|
||||
push {r4,r5,lr}
|
||||
adds r5, r0, 0
|
||||
adds r4, r1, 0
|
||||
adds r0, r4, 0
|
||||
movs r1, 0x8
|
||||
bl sub_8094390
|
||||
adds r0, r5, 0
|
||||
adds r1, r4, 0
|
||||
bl sub_8094398
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
pop {r4,r5}
|
||||
pop {r1}
|
||||
bx r1
|
||||
thumb_func_end sub_8094414
|
||||
|
||||
thumb_func_start sub_8094434
|
||||
sub_8094434: @ 8094434
|
||||
push {r4,r5,lr}
|
||||
adds r5, r0, 0
|
||||
adds r4, r1, 0
|
||||
adds r0, r4, 0
|
||||
movs r1, 0x10
|
||||
bl sub_8094390
|
||||
adds r0, r5, 0
|
||||
adds r1, r4, 0
|
||||
bl sub_8094398
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
pop {r4,r5}
|
||||
pop {r1}
|
||||
bx r1
|
||||
thumb_func_end sub_8094434
|
||||
|
||||
thumb_func_start sub_8094454
|
||||
sub_8094454: @ 8094454
|
||||
push {r4,r5,lr}
|
||||
|
@ -4381,3 +4381,32 @@ maybe_shadow_1_macro(sub_8094230, maybe_shadow_1, sub_80941B0, 1, 2, 0)
|
||||
maybe_shadow_1_macro(sub_8094288, maybe_shadow_1, sub_80941B0, 2, 2, 0)
|
||||
maybe_shadow_1_macro(sub_80942E0, maybe_shadow_1, sub_80941B0, 3, 2, 0)
|
||||
maybe_shadow_1_macro(sub_8094338, maybe_shadow_1, sub_80941B0, 4, 2, 0)
|
||||
|
||||
void sub_8094390(struct Sprite *sprite, u16 duration)
|
||||
{
|
||||
sprite->data2 = 1;
|
||||
sprite->data3 = duration;
|
||||
}
|
||||
|
||||
bool8 sub_8094398(struct MapObject *mapObject, struct Sprite *sprite)
|
||||
{
|
||||
if (-- sprite->data3 == 0)
|
||||
{
|
||||
sprite->data2 = 2;
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
#define special_anim_with_timer(name, duration)\
|
||||
bool8 name(struct MapObject *mapObject, struct Sprite *sprite)\
|
||||
{\
|
||||
sub_8094390(sprite, duration);\
|
||||
return sub_8094398(mapObject, sprite);\
|
||||
}
|
||||
|
||||
special_anim_with_timer(sub_80943B4, 1)
|
||||
special_anim_with_timer(sub_80943D4, 2)
|
||||
special_anim_with_timer(sub_80943F4, 4)
|
||||
special_anim_with_timer(sub_8094414, 8)
|
||||
special_anim_with_timer(sub_8094434, 16)
|
||||
|
Loading…
x
Reference in New Issue
Block a user