summaryrefslogtreecommitdiff
path: root/engine/sprites.asm
diff options
context:
space:
mode:
authorPikalaxALT <PikalaxALT@gmail.com>2015-12-04 14:33:29 -0500
committerPikalaxALT <PikalaxALT@gmail.com>2015-12-04 14:33:29 -0500
commit81ea723b04986e91492cc4803a8bd6540d32de85 (patch)
tree00342fd004af8472910c80be9106f0026f957def /engine/sprites.asm
parent5b94d54a6c81d7ea09497dfc3d1477a7ed3bd954 (diff)
Getting started with battle anims; sine and cosine
Diffstat (limited to 'engine/sprites.asm')
-rwxr-xr-xengine/sprites.asm26
1 files changed, 13 insertions, 13 deletions
diff --git a/engine/sprites.asm b/engine/sprites.asm
index c00d1e9fc..7953cb433 100755
--- a/engine/sprites.asm
+++ b/engine/sprites.asm
@@ -610,26 +610,26 @@ INCLUDE "data/sprite_engine.asm"
; Unknown_8d6e6
; Unknown_8d94d
-ApplySineWaveX: ; 8e72a
+Sprites_Cosine: ; 8e72a
add $10
-ApplySineWaveY: ; 8e72c
+Sprites_Sine: ; 8e72c
and $3f
cp $20
- jr nc, .flip
- call .ApplyOffset
+ jr nc, .negative
+ call .ApplySineWave
ld a, h
ret
-.flip
+.negative
and $1f
- call .ApplyOffset
+ call .ApplySineWave
ld a, h
xor $ff ; cpl
inc a
ret
; 8e741
-.ApplyOffset: ; 8e741
+.ApplySineWave: ; 8e741
ld e, a
ld a, d
ld d, 0
@@ -641,16 +641,16 @@ endr
inc hl
ld d, [hl]
ld hl, 0
-.loop
+.multiply
srl a
- jr nc, .skip_add
+ jr nc, .even
add hl, de
-.skip_add
+.even
sla e
rl d
and a
- jr nz, .loop
+ jr nz, .multiply
ret
; 8e75d
@@ -701,7 +701,7 @@ endr
push de
push hl
- call ApplySineWaveY
+ call Sprites_Sine
pop hl
pop de
add 13 * 8
@@ -710,7 +710,7 @@ endr
pop af
push de
push hl
- call ApplySineWaveX
+ call Sprites_Cosine
pop hl
pop de
add 10 * 8 + 4