shithub: pokecrystal

Download patch

ref: 9eb2cf3d217e8f9e0e86b8d41eac21ce54dd2ba4
parent: 37dd85797a7c5c5581b8fb21bae83d5d34ae0321
author: yenatch <[email protected]>
date: Sun Dec 8 11:22:35 EST 2013

more battle animation labels

--- a/home.asm
+++ b/home.asm
@@ -2410,14 +2410,16 @@
 
 
 Function3ae1: ; 3ae1
-	ld a, $32
+
+	ld a, BANK(BattleAnimations)
 	rst Bankswitch
 
 	ld a, [hli]
-	ld [$d410], a
+	ld [BattleAnimAddress], a
 	ld a, [hl]
-	ld [$d411], a
-	ld a, $33
+	ld [BattleAnimAddress + 1], a
+
+	ld a, BANK(BattleAnimCommands)
 	rst Bankswitch
 
 	ret
@@ -2424,27 +2426,33 @@
 ; 3af0
 
 GetBattleAnimByte: ; 3af0
+
 	push hl
 	push de
-	ld hl, $d410
+
+	ld hl, BattleAnimAddress
 	ld e, [hl]
 	inc hl
 	ld d, [hl]
-	ld a, $32
+
+	ld a, BANK(BattleAnimations)
 	rst Bankswitch
 
 	ld a, [de]
-	ld [$d417], a
+	ld [BattleAnimByte], a
 	inc de
-	ld a, $33
+
+	ld a, BANK(BattleAnimCommands)
 	rst Bankswitch
 
 	ld [hl], d
 	dec hl
 	ld [hl], e
+
 	pop de
 	pop hl
-	ld a, [$d417]
+
+	ld a, [BattleAnimByte]
 	ret
 ; 3b0c
 
@@ -2453,17 +2461,17 @@
 	and a
 	ret z
 
-	ld a, $00
+	ld a, LYOverridesBackup % $100
 	ld [Requested2bppSource], a
-	ld a, $d2
+	ld a, LYOverridesBackup / $100
 	ld [Requested2bppSource + 1], a
 
-	ld a, $00
+	ld a, LYOverrides % $100
 	ld [Requested2bppDest], a
-	ld a, $d1
+	ld a, LYOverrides / $100
 	ld [Requested2bppDest + 1], a
 
-	ld a, $9
+	ld a, (LYOverridesEnd - LYOverrides) / 16
 	ld [Requested2bpp], a
 	ret
 ; 3b2a
--- a/main.asm
+++ b/main.asm
@@ -86996,6 +86996,7 @@
 	ret
 ; c906f (32:506f)
 
+BattleAnimations: ; c906f
 INCBIN "baserom.gbc",$c906f,$cbcdd - $c906f
 
 Functioncbcdd: ; cbcdd
--- a/wram.asm
+++ b/wram.asm
@@ -2137,6 +2137,27 @@
 	ds 144
 LYOverridesEnd:
 
+	ds 112
+
+LYOverridesBackup: ; d200
+	ds 144
+LYOverridesBackupEnd:
+
+
+SECTION "Battle Animations", WRAMX[$d410], BANK[5]
+
+BattleAnimAddress: ; d410
+	ds 2
+BattleAnimDuration: ; d412
+	ds 1
+BattleAnimParent: ; d413
+	ds 2
+	ds 2
+BattleAnimByte: ; d417
+	ds 1
+	ds 1
+BattleAnimTile: ; d419
+	ds 1
 
 SECTION "SRAMBank1",SRAM,BANK[1]