Some work on battle animations

This commit is contained in:
PikalaxALT
2015-11-09 16:41:09 -05:00
parent 59d67a44be
commit 93ab6985d2
29 changed files with 787 additions and 675 deletions

View File

@@ -309,3 +309,53 @@ GLOBAL BattleText
rst Bankswitch
ret
; 3ae1
GetBattleAnimPointer:: ; 3ae1
GLOBAL BattleAnimations
GLOBAL BattleAnimCommands
ld a, BANK(BattleAnimations)
rst Bankswitch
ld a, [hli]
ld [BattleAnimAddress], a
ld a, [hl]
ld [BattleAnimAddress + 1], a
ld a, BANK(BattleAnimCommands)
rst Bankswitch
ret
; 3af0
GetBattleAnimByte:: ; 3af0
push hl
push de
ld hl, BattleAnimAddress
ld e, [hl]
inc hl
ld d, [hl]
ld a, BANK(BattleAnimations)
rst Bankswitch
ld a, [de]
ld [BattleAnimByte], a
inc de
ld a, BANK(BattleAnimCommands)
rst Bankswitch
ld [hl], d
dec hl
ld [hl], e
pop de
pop hl
ld a, [BattleAnimByte]
ret
; 3b0c

View File

@@ -124,9 +124,10 @@ LoadMapPart:: ; 217a
; 2198
LoadMetatiles:: ; 2198
; de <- wd194
ld a, [wd194]
ld e, a
ld a, [wd195]
ld a, [wd194 + 1]
ld d, a
ld hl, wMisc
ld b, 5 ; SCREEN_WIDTH / 4
@@ -163,20 +164,21 @@ endr
ld h, a
rept 3
; copy 4 bytes from hl to de
rept 4
ld a, [hli]
ld [de], a
inc de
endr
; next row
ld a, e
add 5 * 4
add SCREEN_WIDTH
ld e, a
jr nc, .next\@
inc d
.next\@
endr
; copy 4 more bytes from hl to de
rept 4
ld a, [hli]
ld [de], a

View File

@@ -79,7 +79,7 @@ DmgToCgbBGPals:: ; c9f
ld [rBGP], a
push af
; Don't need to be here if CGB
; Don't need to be here if DMG
ld a, [hCGB]
and a
jr z, .end