diff options
Diffstat (limited to 'engine/items/items.asm')
-rwxr-xr-x | engine/items/items.asm | 36 |
1 files changed, 20 insertions, 16 deletions
diff --git a/engine/items/items.asm b/engine/items/items.asm index f0666587..29289fd9 100755 --- a/engine/items/items.asm +++ b/engine/items/items.asm @@ -2727,31 +2727,35 @@ IsNextTileShoreOrWater: ; e8b8 (3:68b8) ld a, [W_CURMAPTILESET] ld hl, WaterTilesets ld de,1 - call IsInArray - jr nc, .notShoreOrWater + call IsInArray ; does the current map allow surfing? + ret nc ; if not, return + ld hl,WaterTile ld a, [W_CURMAPTILESET] cp SHIP_PORT ; Vermilion Dock tileset - ld a, [wTileInFrontOfPlayer] ; tile in front of player jr z, .skipShoreTiles ; if it's the Vermilion Dock tileset - cp $48 ; eastern shore tile in Safari Zone - jr z, .shoreOrWater - cp $32 ; usual eastern shore tile - jr z, .shoreOrWater + cp GYM ; eastern shore tile in Safari Zone + jr z, .skipShoreTiles + cp DOJO ; usual eastern shore tile + jr z, .skipShoreTiles + ld hl,ShoreTiles .skipShoreTiles - cp $14 ; water tile - jr z, .shoreOrWater -.notShoreOrWater - scf - ret -.shoreOrWater - and a + ld a,[wTileInFrontOfPlayer] + ld de,$1 + call IsInArray ret ; tilesets with water -WaterTilesets: ; e8e0 (3:68e0) +WaterTilesets: ; e834 (3:6834) db OVERWORLD, FOREST, DOJO, GYM, SHIP, SHIP_PORT, CAVERN, FACILITY, PLATEAU db $ff ; terminator +; shore tiles +ShoreTiles: ; e83e (3:683e) + db $48, $32 +WaterTile: ; e840 (3:6840) + db $14 + db $ff ; terminator + ReadSuperRodData: ; e8ea (3:68ea) ; return e = 2 if no fish on this map ; return e = 1 if a bite, bc = level,species @@ -2797,7 +2801,7 @@ ReadSuperRodData: ; e8ea (3:68ea) ld e, $1 ; $1 if there's a bite ret -INCLUDE "data/super_rod.asm" +;INCLUDE "data/super_rod.asm" ; reloads map view and processes sprite data ; for items that cause the overworld to be displayed |