summaryrefslogtreecommitdiff
path: root/engine/battle_anims/functions.asm
diff options
context:
space:
mode:
authorsurskitty <surskitty@gmail.com>2018-01-23 00:02:56 -0500
committersurskitty <surskitty@gmail.com>2018-01-23 00:02:56 -0500
commitfbc6fe4722f3faa69f4126ea3d2fe3a41fcba16d (patch)
tree98c4ff39e6cb5a310c8184ba7634ef5eb7cfd19e /engine/battle_anims/functions.asm
parent4162705db909da94a62f30b5e2caee048b3bc107 (diff)
parentc60f1331fef22b886adf3472d2b4f348832cfaf7 (diff)
Merge branch 'master' of github.com:pret/pokecrystal
Diffstat (limited to 'engine/battle_anims/functions.asm')
-rwxr-xr-xengine/battle_anims/functions.asm17
1 files changed, 9 insertions, 8 deletions
diff --git a/engine/battle_anims/functions.asm b/engine/battle_anims/functions.asm
index ea9fb70b3..5e85ffdb0 100755
--- a/engine/battle_anims/functions.asm
+++ b/engine/battle_anims/functions.asm
@@ -428,9 +428,9 @@ GetBallAnimPal: ; cd249 (33:5249)
ld hl, BallColors
ld a, [rSVBK]
push af
- ld a, $1
+ ld a, BANK(CurItem)
ld [rSVBK], a
- ld a, [CurItem] ; CurItem
+ ld a, [CurItem]
ld e, a
pop af
ld [rSVBK], a
@@ -4083,18 +4083,19 @@ BattleAnim_IncAnonJumptableIndex: ; ce72c (33:672c)
ret
BattleAnim_Cosine: ; ce732 (33:6732)
- add $10
+; a = d * cos(a * pi/32)
+ add %010000
BattleAnim_Sine: ; ce734 (33:6734)
-; a = d sin a
- and $3f
- cp $20
+; a = d * sin(a * pi/32)
+ and %111111
+ cp %100000
jr nc, .negative
call .ApplySineWave
ld a, h
ret
.negative
- and $1f
+ and %011111
call .ApplySineWave
ld a, h
xor $ff
@@ -4111,7 +4112,7 @@ BattleAnim_Sine: ; ce734 (33:6734)
ld e, [hl]
inc hl
ld d, [hl]
- ld hl, $0
+ ld hl, 0
.multiply
srl a
jr nc, .even