mirror of https://github.com/pret/pokeemerald.git
sub_808D450
This commit is contained in:
parent
a08f11cab3
commit
368b0f9ee8
|
@ -5,83 +5,6 @@
|
|||
|
||||
.text
|
||||
|
||||
thumb_func_start sub_808D450
|
||||
sub_808D450: @ 808D450
|
||||
push {r4-r6,lr}
|
||||
mov r6, r10
|
||||
mov r5, r9
|
||||
mov r4, r8
|
||||
push {r4-r6}
|
||||
ldr r0, =gFieldEffectObjectTemplatePointers
|
||||
ldr r0, [r0, 0x54]
|
||||
mov r9, r0
|
||||
movs r1, 0
|
||||
movs r2, 0
|
||||
movs r3, 0x1F
|
||||
bl CreateSpriteAtEnd
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
ldr r1, =gSprites
|
||||
mov r10, r1
|
||||
lsls r4, r0, 4
|
||||
adds r4, r0
|
||||
lsls r4, 2
|
||||
add r4, r10
|
||||
ldrb r1, [r4, 0x1]
|
||||
movs r5, 0x4
|
||||
negs r5, r5
|
||||
adds r0, r5, 0
|
||||
ands r0, r1
|
||||
movs r1, 0x1
|
||||
mov r8, r1
|
||||
mov r1, r8
|
||||
orrs r0, r1
|
||||
strb r0, [r4, 0x1]
|
||||
adds r0, r4, 0
|
||||
bl InitSpriteAffineAnim
|
||||
adds r0, r4, 0
|
||||
movs r1, 0
|
||||
bl StartSpriteAffineAnim
|
||||
adds r4, 0x3E
|
||||
ldrb r0, [r4]
|
||||
movs r6, 0x4
|
||||
orrs r0, r6
|
||||
strb r0, [r4]
|
||||
mov r0, r9
|
||||
movs r1, 0
|
||||
movs r2, 0
|
||||
movs r3, 0x1F
|
||||
bl CreateSpriteAtEnd
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
lsls r4, r0, 4
|
||||
adds r4, r0
|
||||
lsls r4, 2
|
||||
add r4, r10
|
||||
ldrb r0, [r4, 0x1]
|
||||
ands r5, r0
|
||||
mov r0, r8
|
||||
orrs r5, r0
|
||||
strb r5, [r4, 0x1]
|
||||
adds r0, r4, 0
|
||||
bl InitSpriteAffineAnim
|
||||
adds r0, r4, 0
|
||||
movs r1, 0x1
|
||||
bl StartSpriteAffineAnim
|
||||
adds r4, 0x3E
|
||||
ldrb r0, [r4]
|
||||
orrs r0, r6
|
||||
strb r0, [r4]
|
||||
pop {r3-r5}
|
||||
mov r8, r3
|
||||
mov r9, r4
|
||||
mov r10, r5
|
||||
pop {r4-r6}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sub_808D450
|
||||
|
||||
thumb_func_start sub_808D4F4
|
||||
sub_808D4F4: @ 808D4F4
|
||||
push {lr}
|
||||
|
|
|
@ -11,4 +11,8 @@ extern struct MapObject gUnknown_02037350[16];
|
|||
|
||||
void sub_808D438(void);
|
||||
|
||||
// Exported data declarations
|
||||
|
||||
extern const struct SpriteTemplate *const gFieldEffectObjectTemplatePointers[];
|
||||
|
||||
#endif //POKEEMERALD_FIELD_MAP_OBJ_H
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
|
||||
// Static ROM declarations
|
||||
|
||||
void sub_808D450(void);
|
||||
/*static*/ void sub_808D450(void);
|
||||
|
||||
// ROM data
|
||||
|
||||
|
@ -43,3 +43,20 @@ void sub_808D438(void)
|
|||
ClearPlayerAvatarInfo();
|
||||
sub_808D450();
|
||||
}
|
||||
|
||||
/*static*/ void sub_808D450(void)
|
||||
{
|
||||
u8 spriteIdx;
|
||||
|
||||
spriteIdx = CreateSpriteAtEnd(gFieldEffectObjectTemplatePointers[21], 0, 0, 31);
|
||||
gSprites[spriteIdx].oam.affineMode = 1;
|
||||
InitSpriteAffineAnim(&gSprites[spriteIdx]);
|
||||
StartSpriteAffineAnim(&gSprites[spriteIdx], 0);
|
||||
gSprites[spriteIdx].invisible = TRUE;
|
||||
|
||||
spriteIdx = CreateSpriteAtEnd(gFieldEffectObjectTemplatePointers[21], 0, 0, 31);
|
||||
gSprites[spriteIdx].oam.affineMode = 1;
|
||||
InitSpriteAffineAnim(&gSprites[spriteIdx]);
|
||||
StartSpriteAffineAnim(&gSprites[spriteIdx], 1);
|
||||
gSprites[spriteIdx].invisible = TRUE;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue