2018-06-24 14:09:41 +00:00
|
|
|
CheckFacingTileForStdScript::
|
2017-12-16 01:10:54 +00:00
|
|
|
; Checks to see if the tile you're facing has a std script associated with it. If so, executes the script and returns carry.
|
|
|
|
ld a, c
|
|
|
|
ld de, 3
|
|
|
|
ld hl, TileCollisionStdScripts
|
|
|
|
call IsInArray
|
|
|
|
jr nc, .notintable
|
|
|
|
|
|
|
|
ld a, jumpstd_command
|
|
|
|
ld [wJumpStdScriptBuffer], a
|
|
|
|
inc hl
|
|
|
|
ld a, [hli]
|
|
|
|
ld [wJumpStdScriptBuffer + 1], a
|
|
|
|
ld a, [hli]
|
|
|
|
ld [wJumpStdScriptBuffer + 2], a
|
|
|
|
ld a, BANK(Script_JumpStdFromRAM)
|
|
|
|
ld hl, Script_JumpStdFromRAM
|
|
|
|
call CallScript
|
|
|
|
scf
|
|
|
|
ret
|
|
|
|
|
|
|
|
.notintable
|
|
|
|
xor a
|
|
|
|
ret
|
|
|
|
|
2020-10-27 14:00:56 +00:00
|
|
|
INCLUDE "data/collision/collision_stdscripts.asm"
|
2017-12-16 01:10:54 +00:00
|
|
|
|
2018-06-25 00:10:37 +00:00
|
|
|
Script_JumpStdFromRAM:
|
2019-03-10 20:39:31 +00:00
|
|
|
sjump wJumpStdScriptBuffer
|