Skip to content

Commit

Permalink
LoadTilesetPalette was $100 bytes not $FF
Browse files Browse the repository at this point in the history
  • Loading branch information
JustRegularLuna committed Jan 31, 2024
1 parent cb6bb66 commit a62b5e7
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions color/loadpalettes.asm
Original file line number Diff line number Diff line change
Expand Up @@ -66,15 +66,6 @@ LoadTilesetPalette:
jr nz, .nextPalette

; Start copying palette assignments
; start by filling the buffer with the textbox palette
ld hl, W2_TilesetPaletteMap
ld b, $ff
ld a, 7
.fillLoop
ld [hli], a
dec b
jr nz, .fillLoop
; fill in the tileset's tile assignments
pop af ; Retrieve wCurMapTileset
ld hl, MapPaletteAssignments
ld b, 0
Expand All @@ -94,6 +85,14 @@ LoadTilesetPalette:
dec b
jr nz, .copyLoop

; Set the remaining values to 7 for text
ld b, $100 - TILESET_SIZE
ld a, 7
.fillLoop
ld [hli], a
dec b
jr nz, .fillLoop

; There used to be special-case code for tile $78 here (pokeball in pc), but now
; it uses palette 7 as well. Those areas still need to load the variant of the
; textbox palette (PC_POKEBALL_PAL).
Expand Down

0 comments on commit a62b5e7

Please sign in to comment.