summaryrefslogtreecommitdiff
path: root/scripts/vermiliondock.asm
diff options
context:
space:
mode:
authordannye <corrnondacqb@yahoo.com>2016-01-12 18:45:02 -0600
committerdannye <corrnondacqb@yahoo.com>2016-01-12 18:45:02 -0600
commit5914540ba780d7936fd6624d6fde2d67a9f7a773 (patch)
treea1ce27018f39d98f49d89468df426d0291e18560 /scripts/vermiliondock.asm
parentccf4fe54a8e444aaf966fac7b38bc9452c494222 (diff)
parent8a5a7d8e68538b727e0c166488265f395603366e (diff)
Merge branch 'master' of https://github.com/pret/pokered into rgbgfxrgbgfx
Diffstat (limited to 'scripts/vermiliondock.asm')
-rwxr-xr-xscripts/vermiliondock.asm34
1 files changed, 21 insertions, 13 deletions
diff --git a/scripts/vermiliondock.asm b/scripts/vermiliondock.asm
index a65b3603..78ada7cf 100755
--- a/scripts/vermiliondock.asm
+++ b/scripts/vermiliondock.asm
@@ -40,7 +40,7 @@ VermilionDock_1db9b: ; 1db9b (7:5b9b)
SetEventForceReuseHL EVENT_SS_ANNE_LEFT
ld a, $ff
ld [wJoyIgnore], a
- ld [wc0ee], a
+ ld [wNewSoundID], a
call PlaySound
ld c, BANK(Music_Surfing)
ld a, MUSIC_SURFING
@@ -53,8 +53,8 @@ VermilionDock_1db9b: ; 1db9b (7:5b9b)
ld b, $9c
call CopyScreenTileBufferToVRAM
coord hl, 0, 10
- ld bc, $0078
- ld a, $14
+ ld bc, SCREEN_WIDTH * 6
+ ld a, $14 ; water tile
call FillMemory
ld a, 1
ld [H_AUTOBGTRANSFERENABLED], a
@@ -106,7 +106,7 @@ VermilionDock_1db9b: ; 1db9b (7:5b9b)
xor a
ld [rWY], a
ld [hWY], a
- call VermilionDock_1dc94
+ call VermilionDock_EraseSSAnne
ld a, $90
ld [hWY], a
ld a, $1
@@ -178,21 +178,29 @@ VermilionDock_1dc7c: ; 1dc7c (7:5c7c)
jr z, .asm_1dc8e
ret
-VermilionDock_1dc94: ; 1dc94 (7:5c94)
- ld hl, wcc5b
- ld bc, $00b4
- ld a, $14
+VermilionDock_EraseSSAnne: ; 1dc94 (7:5c94)
+; Fill the area the S.S. Anne occupies in BG map 0 with water tiles.
+ ld hl, wVermilionDockTileMapBuffer
+ ld bc, (5 * BG_MAP_WIDTH) + SCREEN_WIDTH
+ ld a, $14 ; water tile
call FillMemory
- ld hl, vBGMap0 + 10 * 32
- ld de, wcc5b
- ld bc, $000c
+ ld hl, vBGMap0 + 10 * BG_MAP_WIDTH
+ ld de, wVermilionDockTileMapBuffer
+ ld bc, (6 * BG_MAP_WIDTH) / 16
call CopyVideoData
- ld hl, wOverworldMap + 10 + 7 * VERMILION_DOCK_WIDTH ; 10, 7
- ld a, $d
+
+; Replace the blocks of the lower half of the ship with water blocks. This
+; leaves the upper half alone, but that doesn't matter because replacing any of
+; the blocks is unnecessary because the blocks the ship occupies are south of
+; the player and won't be redrawn when the player automatically walks north and
+; exits the map. This code could be removed without affecting anything.
+ overworldMapCoord hl, 5, 2, VERMILION_DOCK_WIDTH
+ ld a, $d ; water block
ld [hli], a
ld [hli], a
ld [hli], a
ld [hl], a
+
ld a, SFX_SS_ANNE_HORN
call PlaySound
ld c, 120