From 9d0ba6bfd3b2f10fae9969a784aa7b2b573e8411 Mon Sep 17 00:00:00 2001 From: Adelaide Walter Date: Wed, 3 Jan 2018 19:12:45 -0500 Subject: Use BANK for hardcoded WRAM banks (except where bankswitches appear unnecessary). --- engine/battle_anims/functions.asm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'engine/battle_anims/functions.asm') diff --git a/engine/battle_anims/functions.asm b/engine/battle_anims/functions.asm index ea9fb70b3..1a66ed51d 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 -- cgit v1.2.3 From 11556196ba546f5c45b97fffc2c263a79eb639b9 Mon Sep 17 00:00:00 2001 From: Remy Oukaour Date: Tue, 9 Jan 2018 16:39:36 -0500 Subject: Consistent sine wave code formatting --- engine/battle_anims/functions.asm | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'engine/battle_anims/functions.asm') diff --git a/engine/battle_anims/functions.asm b/engine/battle_anims/functions.asm index ea9fb70b3..4b77cd77c 100755 --- a/engine/battle_anims/functions.asm +++ b/engine/battle_anims/functions.asm @@ -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 -- cgit v1.2.3