pokecrystal-board/event/std_collision.asm
Remy Oukaour c05b7f41dd Renaming: (fix #412)
- MapTriggers / maptrigger → SceneScripts / scene_script
- XYTriggers / xy_trigger → CoordEvents / coord_event
- Signposts / signpost → BGEvents / bg_event
- PersonEvents / person_event → ObjectEvents / object_event
2017-12-24 14:33:17 -05:00

30 lines
626 B
NASM

CheckFacingTileForStdScript:: ; 1365b
; 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/collision_stdscripts.asm"
Script_JumpStdFromRAM: ; 0x1369a
jump wJumpStdScriptBuffer