summaryrefslogtreecommitdiff
path: root/Allow-map-tiles-to-appear-above-sprites.md
diff options
context:
space:
mode:
Diffstat (limited to 'Allow-map-tiles-to-appear-above-sprites.md')
-rw-r--r--Allow-map-tiles-to-appear-above-sprites.md26
1 files changed, 13 insertions, 13 deletions
diff --git a/Allow-map-tiles-to-appear-above-sprites.md b/Allow-map-tiles-to-appear-above-sprites.md
index 5bfb0a8..e91efaf 100644
--- a/Allow-map-tiles-to-appear-above-sprites.md
+++ b/Allow-map-tiles-to-appear-above-sprites.md
@@ -122,7 +122,7 @@ Edit [engine/map_palettes.asm](../blob/master/engine/map_palettes.asm):
```diff
SwapTextboxPalettes:: ; 4c000
hlcoord 0, 0
- decoord 0, 0, AttrMap
+ decoord 0, 0, wAttrMap
ld b, SCREEN_HEIGHT
.loop
push bc
@@ -137,18 +137,18 @@ SwapTextboxPalettes:: ; 4c000
- add [hl]
- ld l, a
- ld a, [TilesetPalettes + 1]
-- adc $0
+- adc 0
- ld h, a
- ld a, [hl]
- and $f
- jr .next
-
-.UpperNybble:
-- ld hl, TilesetPalettes
+- ld hl, wTilesetPalettes
- add [hl]
- ld l, a
-- ld a, [TilesetPalettes + 1]
-- adc $0
+- ld a, [wTilesetPalettes + 1]
+- adc 0
- ld h, a
- ld a, [hl]
- swap a
@@ -168,8 +168,8 @@ SwapTextboxPalettes:: ; 4c000
ret
ScrollBGMapPalettes:: ; 4c03f
- ld hl, BGMapBuffer
- ld de, BGMapPalBuffer
+ ld hl, wBGMapBuffer
+ ld de, wBGMapPalBuffer
+ ; fallthrough
+GetBGMapTilePalettes:
.loop
@@ -179,22 +179,22 @@ ScrollBGMapPalettes:: ; 4c03f
- jr c, .UpperNybble
-
-; .LowerNybble
- ld hl, TilesetPalettes
+ ld hl, wTilesetPalettes
add [hl]
ld l, a
- ld a, [TilesetPalettes + 1]
- adc $0
+ ld a, [wTilesetPalettes + 1]
+ adc 0
ld h, a
ld a, [hl]
- and $f
- jr .next
-
-.UpperNybble:
-- ld hl, TilesetPalettes
+- ld hl, wTilesetPalettes
- add [hl]
- ld l, a
-- ld a, [TilesetPalettes + 1]
-- adc $0
+- ld a, [wTilesetPalettes + 1]
+- adc 0
- ld h, a
- ld a, [hl]
- swap a