Skip to content

Commit

Permalink
Reload Tileset GFX on connections (slow)
Browse files Browse the repository at this point in the history
  • Loading branch information
vulcandth committed Apr 5, 2024
1 parent 2dc0ace commit a18ffd6
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 29 deletions.
1 change: 1 addition & 0 deletions data/maps/setup_scripts.asm
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ MapSetupScript_Connection:
mapsetup LoadBlockData
mapsetup LoadMapTileset
mapsetup SaveScreen
mapsetup LoadMapGraphics
mapsetup DecompressMetatiles
mapsetup LoadMapObjects
mapsetup FadeToMapMusic
Expand Down
9 changes: 6 additions & 3 deletions engine/tilesets/mapgroup_roofs.asm
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,11 @@ LoadMapGroupRoof::
ld hl, Roofs
ld bc, ROOF_LENGTH tiles
rst AddNTimes
ld de, vTiles2 tile $0a
ld bc, ROOF_LENGTH tiles
jmp CopyBytes

ld d, h
ld e, l
lb bc, BANK(Roofs), ROOF_LENGTH
ld hl, vTiles2 tile $0a
jmp Request2bpp

INCLUDE "data/maps/roofs.asm"
35 changes: 9 additions & 26 deletions home/map.asm
Original file line number Diff line number Diff line change
Expand Up @@ -1163,17 +1163,12 @@ LoadTilesetGFX::

ldh a, [rSVBK]
push af
ld a, BANK(wDecompressScratch)
ldh [rSVBK], a

ldh a, [hTilesetGFXBank]
ld de, wDecompressScratch
call FarDecompress

ld hl, wDecompressScratch
ld b, a
ld c, $7f
ld de, vTiles2
ld bc, $7f tiles
rst CopyBytes
call DecompressRequest2bpp

ld a, BANK(vTiles5)
ldh [rVBK], a
Expand All @@ -1186,17 +1181,11 @@ LoadTilesetGFX::
ld h, [hl]
ld l, a

ld a, BANK(wDecompressScratch)
ld [rSVBK], a

ld a, [hTilesetGFXBank]
ld de, wDecompressScratch
call FarDecompress

ld hl, wDecompressScratch
ld b, a
ld c, $80
ld de, vTiles5
ld bc, $80 tiles
rst CopyBytes
call DecompressRequest2bpp

ld a, BANK(wTilesetvTiles4GFXAddress)
ld [rSVBK], a
Expand All @@ -1206,17 +1195,11 @@ LoadTilesetGFX::
ld h, [hl]
ld l, a

ld a, BANK(wDecompressScratch)
ld [rSVBK], a

ld a, [hTilesetGFXBank]
ld de, wDecompressScratch
call FarDecompress

ld hl, wDecompressScratch
ld b, a
ld c, $80
ld de, vTiles4
ld bc, $80 tiles
rst CopyBytes
call DecompressRequest2bpp

xor a
ldh [rVBK], a
Expand Down

0 comments on commit a18ffd6

Please sign in to comment.