2020-07-07 22:50:58 +00:00
|
|
|
LoadFontTilePatterns::
|
|
|
|
ldh a, [rLCDC]
|
2024-09-24 14:48:10 +00:00
|
|
|
bit rLCDC_ENABLE, a
|
2020-07-07 22:50:58 +00:00
|
|
|
jr nz, .on
|
|
|
|
.off
|
|
|
|
ld hl, FontGraphics
|
|
|
|
ld de, vFont
|
|
|
|
ld bc, FontGraphicsEnd - FontGraphics
|
|
|
|
ld a, BANK(FontGraphics)
|
|
|
|
jp FarCopyDataDouble ; if LCD is off, transfer all at once
|
|
|
|
.on
|
|
|
|
ld de, FontGraphics
|
|
|
|
ld hl, vFont
|
|
|
|
lb bc, BANK(FontGraphics), (FontGraphicsEnd - FontGraphics) / $8
|
|
|
|
jp CopyVideoDataDouble ; if LCD is on, transfer during V-blank
|
|
|
|
|
|
|
|
LoadTextBoxTilePatterns::
|
|
|
|
ldh a, [rLCDC]
|
2024-09-24 14:48:10 +00:00
|
|
|
bit rLCDC_ENABLE, a
|
2020-07-07 22:50:58 +00:00
|
|
|
jr nz, .on
|
|
|
|
.off
|
|
|
|
ld hl, TextBoxGraphics
|
|
|
|
ld de, vChars2 tile $60
|
|
|
|
ld bc, TextBoxGraphicsEnd - TextBoxGraphics
|
|
|
|
ld a, BANK(TextBoxGraphics)
|
|
|
|
jp FarCopyData2 ; if LCD is off, transfer all at once
|
|
|
|
.on
|
|
|
|
ld de, TextBoxGraphics
|
|
|
|
ld hl, vChars2 tile $60
|
|
|
|
lb bc, BANK(TextBoxGraphics), (TextBoxGraphicsEnd - TextBoxGraphics) / $10
|
|
|
|
jp CopyVideoData ; if LCD is on, transfer during V-blank
|
|
|
|
|
|
|
|
LoadHpBarAndStatusTilePatterns::
|
|
|
|
ldh a, [rLCDC]
|
2024-09-24 14:48:10 +00:00
|
|
|
bit rLCDC_ENABLE, a
|
2020-07-07 22:50:58 +00:00
|
|
|
jr nz, .on
|
|
|
|
.off
|
|
|
|
ld hl, HpBarAndStatusGraphics
|
|
|
|
ld de, vChars2 tile $62
|
|
|
|
ld bc, HpBarAndStatusGraphicsEnd - HpBarAndStatusGraphics
|
|
|
|
ld a, BANK(HpBarAndStatusGraphics)
|
|
|
|
jp FarCopyData2 ; if LCD is off, transfer all at once
|
|
|
|
.on
|
|
|
|
ld de, HpBarAndStatusGraphics
|
|
|
|
ld hl, vChars2 tile $62
|
|
|
|
lb bc, BANK(HpBarAndStatusGraphics), (HpBarAndStatusGraphicsEnd - HpBarAndStatusGraphics) / $10
|
|
|
|
jp CopyVideoData ; if LCD is on, transfer during V-blank
|