2017-12-17 00:00:50 +00:00
|
|
|
CheckBattleScene: ; 4ea44
|
|
|
|
; Return carry if battle scene is turned off.
|
|
|
|
|
2018-01-04 19:53:50 +00:00
|
|
|
ld a, BANK(wLinkMode)
|
2017-12-17 00:00:50 +00:00
|
|
|
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
|
|
|
|
|
2018-01-08 22:13:37 +00:00
|
|
|
ld a, 4 ; MBC30 bank used by JP Crystal; inaccessible by MBC3
|
2017-12-17 00:00:50 +00:00
|
|
|
call GetSRAMBank
|
2018-01-09 03:48:58 +00:00
|
|
|
ld a, [$a60c] ; address of MBC30 bank
|
2017-12-17 00:00:50 +00:00
|
|
|
ld c, a
|
|
|
|
call CloseSRAM
|
|
|
|
|
|
|
|
ld a, c
|
|
|
|
bit 0, c
|
|
|
|
jr z, .off
|
|
|
|
|
|
|
|
and a
|
|
|
|
ret
|
|
|
|
|
|
|
|
.from_wram
|
2018-01-04 19:53:50 +00:00
|
|
|
ld a, BANK(w5_dc00)
|
2017-12-17 00:00:50 +00:00
|
|
|
ld hl, w5_dc00
|
|
|
|
call GetFarWRAMByte
|
|
|
|
bit 0, a
|
|
|
|
jr z, .off
|
|
|
|
|
|
|
|
and a
|
|
|
|
ret
|
|
|
|
|
|
|
|
.off
|
|
|
|
scf
|
|
|
|
ret
|