Skip to content

Commit

Permalink
Small optimizations
Browse files Browse the repository at this point in the history
  • Loading branch information
vulcandth committed Apr 5, 2024
1 parent 1ea6f18 commit 43eebad
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
2 changes: 1 addition & 1 deletion home/gfx.asm
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ Get2bpp::
; copy c 2bpp tiles from b:de to hl
ldh a, [rLCDC]
bit rLCDC_ENABLE, a
jmp nz, Request2bpp
jr nz, Request2bpp
; fallthrough

Copy2bpp:
Expand Down
15 changes: 7 additions & 8 deletions home/map.asm
Original file line number Diff line number Diff line change
Expand Up @@ -1170,7 +1170,7 @@ _LoadTilesetGFX5:
ldh a, [rSVBK]
push af
ld a, BANK(wTilesetvTiles5GFXAddress)
ld [rSVBK], a
ldh [rSVBK], a
ldh a, [rVBK]
push af
ld a, BANK(vTiles5)
Expand All @@ -1180,7 +1180,7 @@ _LoadTilesetGFX5:
ld h, [hl]
ld l, a

ld a, [hTilesetGFXBank]
ldh a, [hTilesetGFXBank]
ld b, a
ld c, $80
ld de, vTiles5
Expand All @@ -1195,7 +1195,7 @@ _LoadTilesetGFX4:
ldh a, [rSVBK]
push af
ld a, BANK(wTilesetvTiles4GFXAddress)
ld [rSVBK], a
ldh [rSVBK], a
ldh a, [rVBK]
push af
ld a, BANK(vTiles4)
Expand All @@ -1205,7 +1205,7 @@ _LoadTilesetGFX4:
ld h, [hl]
ld l, a

ld a, [hTilesetGFXBank]
ldh a, [hTilesetGFXBank]
ld b, a
ld c, $80
ld de, vTiles4
Expand All @@ -1220,7 +1220,7 @@ _LoadTilesetGFX2:
ldh a, [rSVBK]
push af
ld a, BANK(wTilesetvTiles2GFXAddress)
ld [rSVBK], a
ldh [rSVBK], a
ldh a, [rVBK]
push af
ld a, BANK(vTiles2)
Expand All @@ -1230,7 +1230,7 @@ _LoadTilesetGFX2:
ld h, [hl]
ld l, a

ld a, [hTilesetGFXBank]
ldh a, [hTilesetGFXBank]
ld b, a
ld c, $7f
ld de, vTiles2
Expand All @@ -1250,8 +1250,7 @@ _LoadTilesetGFX2:
ret nz
; fallthrough
.load_roof
farcall LoadMapGroupRoof
ret
farjp LoadMapGroupRoof


LoadTilesetGFX::
Expand Down

0 comments on commit 43eebad

Please sign in to comment.