diff options
author | DizzyEggg <jajkodizzy@wp.pl> | 2019-02-01 11:39:24 +0100 |
---|---|---|
committer | DizzyEggg <jajkodizzy@wp.pl> | 2019-02-01 11:39:24 +0100 |
commit | 5dfaf22fb37104fb21a740b77fb353263fc178ca (patch) | |
tree | 6a5f38dcf349b09fccf80c71ae44e22cc4f71e2c | |
parent | d2c17c7fb3ba6149b4e278bd3b644cd4d4d240e2 (diff) |
Fix pokemon icon asm
-rw-r--r-- | src/pokemon_icon.c | 6 |
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; |