summaryrefslogtreecommitdiff
path: root/src/pokemon_icon.c
diff options
context:
space:
mode:
authorDiegoisawesome <diego@domoreaweso.me>2019-02-05 14:35:42 -0600
committerDiegoisawesome <diego@domoreaweso.me>2019-02-05 14:35:42 -0600
commitbc4cc9f78a705636228c39311bb6e3c393f090d3 (patch)
treed2b59408df53676ffb65e217cc1a62cbcba05f97 /src/pokemon_icon.c
parent37e86d75788f4ed364db19aabce11e6e054a1084 (diff)
parentb0ee1009759ed1c46da81b1fb8410e2b75e42bb2 (diff)
Merge branch 'master' of github.com:pret/pokeemerald
Diffstat (limited to 'src/pokemon_icon.c')
-rw-r--r--src/pokemon_icon.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/pokemon_icon.c b/src/pokemon_icon.c
index bcbb60e21..ecb8f4950 100644
--- a/src/pokemon_icon.c
+++ b/src/pokemon_icon.c
@@ -1238,7 +1238,6 @@ const u16* GetValidMonIconPalettePtr(u16 species)
return gMonIconPaletteTable[gMonIconPaletteIndices[species]].data;
}
-// TODO: try to find a way to avoid using asm statement
u8 UpdateMonIconFrame(struct Sprite *sprite)
{
u8 result = 0;
@@ -1262,10 +1261,7 @@ u8 UpdateMonIconFrame(struct Sprite *sprite)
(u8 *)sprite->images + (sSpriteImageSizes[sprite->oam.shape][sprite->oam.size] * frame),
(u8 *)(OBJ_VRAM0 + sprite->oam.tileNum * TILE_SIZE_4BPP),
sSpriteImageSizes[sprite->oam.shape][sprite->oam.size]);
- {
- register u8 duration asm("r0") = sprite->anims[sprite->animNum][sprite->animCmdIndex].frame.duration;
- sprite->animDelayCounter = duration;
- }
+ sprite->animDelayCounter = sprite->anims[sprite->animNum][sprite->animCmdIndex].frame.duration & 0xFF;
sprite->animCmdIndex++;
result = sprite->animCmdIndex;
break;