mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2024-11-16 11:27:33 -08:00
5efce10789
That should be all of them this time
30 lines
615 B
NASM
30 lines
615 B
NASM
CheckFacingTileForStdScript::
|
|
; 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
|
|
|
|
INCLUDE "data/events/collision_stdscripts.asm"
|
|
|
|
Script_JumpStdFromRAM:
|
|
jump wJumpStdScriptBuffer
|