mirror of
https://github.com/thornAvery/kep-hack.git
synced 2026-02-22 23:22:26 +13:00
Move all code out of home.asm into home/
This results in 64 home/*.asm files, comparable to pokecrystal's 57.
This commit is contained in:
parent
51ac538c25
commit
bbf2f51a02
35 changed files with 1754 additions and 1758 deletions
47
home/load_font.asm
Normal file
47
home/load_font.asm
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
LoadFontTilePatterns::
|
||||
ldh a, [rLCDC]
|
||||
bit 7, a ; is the LCD enabled?
|
||||
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]
|
||||
bit 7, a ; is the LCD enabled?
|
||||
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]
|
||||
bit 7, a ; is the LCD enabled?
|
||||
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
|
||||
Loading…
Add table
Add a link
Reference in a new issue