summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRangi <remy.oukaour+rangi42@gmail.com>2018-07-13 23:19:24 -0400
committerRangi <remy.oukaour+rangi42@gmail.com>2018-07-13 23:19:24 -0400
commit60568e8833ad5b689375b1019818ab13069cd9ad (patch)
tree27a39e59f7fde7e40ada69053b3a85d2237d64d2
parenta70624adfb0b960bd02e88c379179fb09e776339 (diff)
Comments for ToggleMaptileDecorations
-rw-r--r--engine/overworld/decorations.asm18
1 files changed, 10 insertions, 8 deletions
diff --git a/engine/overworld/decorations.asm b/engine/overworld/decorations.asm
index 7ba177420..bea2e0cdb 100644
--- a/engine/overworld/decorations.asm
+++ b/engine/overworld/decorations.asm
@@ -1085,17 +1085,18 @@ DecorationDesc_GiantOrnament:
db "@"
ToggleMaptileDecorations:
- lb de, 0, 4
+ ; tile coordinates work the same way as for changeblock
+ lb de, 0, 4 ; bed coordinates
ld a, [wDecoBed]
call SetDecorationTile
- lb de, 7, 4
+ lb de, 7, 4 ; plant coordinates
ld a, [wDecoPlant]
call SetDecorationTile
- lb de, 6, 0
+ lb de, 6, 0 ; poster coordinates
ld a, [wDecoPoster]
call SetDecorationTile
call SetPosterVisibility
- lb de, 0, 0
+ lb de, 0, 0 ; carpet top-left coordinates
call PadCoords_de
ld a, [wDecoCarpet]
and a
@@ -1103,15 +1104,15 @@ ToggleMaptileDecorations:
call _GetDecorationSprite
ld [hl], a
push af
- lb de, 0, 2
+ lb de, 0, 2 ; carpet bottom-left coordinates
call PadCoords_de
pop af
inc a
- ld [hli], a
+ ld [hli], a ; carpet bottom-left block
inc a
- ld [hli], a
+ ld [hli], a ; carpet bottom-middle block
dec a
- ld [hl], a
+ ld [hl], a ; carpet bottom-right block
ret
SetPosterVisibility:
@@ -1177,6 +1178,7 @@ _GetDecorationSprite:
ret
PadCoords_de:
+; adjusts coordinates, the same way as Script_changeblock
ld a, d
add 4
ld d, a