mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2024-11-16 11:27:33 -08:00
7d4486e6a3
engine/routines/ stores isolated out-of-context routines as individual files. It might be preferable later to append them to their related engine/ files in unique little SECTIONs, relying on the linkerscript to place them appropriately; or some other organization method. In the meantime, they're now easily findable apart from main.asm's other content.
48 lines
491 B
NASM
48 lines
491 B
NASM
CheckBattleScene: ; 4ea44
|
|
; Return carry if battle scene is turned off.
|
|
|
|
ld a, 0
|
|
ld hl, wLinkMode
|
|
call GetFarWRAMByte
|
|
cp LINK_MOBILE
|
|
jr z, .mobile
|
|
|
|
ld a, [Options]
|
|
bit BATTLE_SCENE, a
|
|
jr nz, .off
|
|
|
|
and a
|
|
ret
|
|
|
|
.mobile
|
|
ld a, [wcd2f]
|
|
and a
|
|
jr nz, .from_wram
|
|
|
|
ld a, $4
|
|
call GetSRAMBank
|
|
ld a, [$a60c]
|
|
ld c, a
|
|
call CloseSRAM
|
|
|
|
ld a, c
|
|
bit 0, c
|
|
jr z, .off
|
|
|
|
and a
|
|
ret
|
|
|
|
.from_wram
|
|
ld a, $5
|
|
ld hl, w5_dc00
|
|
call GetFarWRAMByte
|
|
bit 0, a
|
|
jr z, .off
|
|
|
|
and a
|
|
ret
|
|
|
|
.off
|
|
scf
|
|
ret
|