mirror of
https://github.com/thornAvery/jep-hack.git
synced 2025-09-17 02:30:50 +12:00

This adds Rock Climb functionality to Strong Arm and Dive functionality to Water Sport, as discussed in the server. HMs have been added, but we need 16bit Items to add Wind Ride, and I haven't finished their functionality.
The Rock Climb tile is a bit terrible, it's not easy to notice. Maybe change so that it works well with yellow or another colour?
This does not build due to issues with effect_commands.asm, but since Zeta is meant to be working on the mapping and Water Sport anyway, it seems to be up his alley.
I ported over much of the underwater assets Rangi was using as they looked very pretty. I imagine it'll be fun to utilise going forward. May as well, right?
I shall now lay down in a dark room.
Review: c21561ea71 (diff-5508f3b794fc68821ba35e94b6a293b2aaaa16c02a1b34fac70d03fd2f74c4b2R113)
101 lines
1.5 KiB
NASM
101 lines
1.5 KiB
NASM
CheckWarpCollision::
|
|
; Is this tile a warp?
|
|
ld a, [wPlayerTile]
|
|
cp COLL_PIT
|
|
jr z, .warp
|
|
and $f0
|
|
cp HI_NYBBLE_WARPS
|
|
jr z, .warp
|
|
and a
|
|
ret
|
|
|
|
.warp
|
|
scf
|
|
ret
|
|
|
|
CheckDirectionalWarp::
|
|
; If this is a directional warp, clear carry (press the designated button to warp).
|
|
; Else, set carry (immediate warp).
|
|
ld a, [wPlayerTile]
|
|
cp COLL_WARP_CARPET_DOWN
|
|
jr z, .directional
|
|
cp COLL_WARP_CARPET_LEFT
|
|
jr z, .directional
|
|
cp COLL_WARP_CARPET_UP
|
|
jr z, .directional
|
|
cp COLL_WARP_CARPET_RIGHT
|
|
jr z, .directional
|
|
scf
|
|
ret
|
|
|
|
.directional
|
|
xor a
|
|
ret
|
|
|
|
CheckWarpFacingDown:
|
|
ld de, 1
|
|
ld hl, .blocks
|
|
ld a, [wPlayerTile]
|
|
call IsInArray
|
|
ret
|
|
|
|
.blocks
|
|
db COLL_DOOR
|
|
db COLL_DOOR_79
|
|
db COLL_STAIRCASE
|
|
db COLL_STAIRCASE_73
|
|
db COLL_CAVE
|
|
db COLL_CAVE_74
|
|
db COLL_WARP_PANEL
|
|
db COLL_DOOR_75
|
|
db COLL_DOOR_7D
|
|
db -1
|
|
|
|
CheckGrassCollision::
|
|
ld a, [wPlayerTile]
|
|
ld hl, .blocks
|
|
ld de, 1
|
|
call IsInArray
|
|
ret
|
|
|
|
.blocks
|
|
db COLL_CUT_08
|
|
db COLL_TALL_GRASS
|
|
db COLL_LONG_GRASS
|
|
db COLL_CUT_28
|
|
db COLL_WATER
|
|
db COLL_DIVE_DOWN
|
|
db COLL_GRASS_48
|
|
db COLL_GRASS_49
|
|
db COLL_GRASS_4A
|
|
db COLL_GRASS_4B
|
|
db COLL_GRASS_4C
|
|
db -1
|
|
|
|
CheckCutCollision:
|
|
ld a, c
|
|
ld hl, .blocks
|
|
ld de, 1
|
|
call IsInArray
|
|
ret
|
|
|
|
.blocks
|
|
db COLL_CUT_TREE
|
|
db COLL_CUT_TREE_1A
|
|
db COLL_TALL_GRASS_10
|
|
db COLL_TALL_GRASS
|
|
db COLL_LONG_GRASS
|
|
db COLL_LONG_GRASS_1C
|
|
db -1
|
|
|
|
GetWarpSFX::
|
|
ld a, [wPlayerTile]
|
|
ld de, SFX_ENTER_DOOR
|
|
cp COLL_DOOR
|
|
ret z
|
|
ld de, SFX_WARP_TO
|
|
cp COLL_WARP_PANEL
|
|
ret z
|
|
ld de, SFX_EXIT_BUILDING
|
|
ret
|