diff options
| author | libjet <libj3t@gmail.com> | 2019-12-09 22:20:03 +0000 |
|---|---|---|
| committer | libjet <libj3t@gmail.com> | 2019-12-09 22:20:03 +0000 |
| commit | cc8fc02a9467307f1494946fd08b4e57d4ffdac5 (patch) | |
| tree | fa37c8c82262b5a0d5db6d76d7edf9d78bbf25da /engine/events/std_collision.asm | |
| parent | cfe6e295746996e64198b2a4b0f0eba1420ca8eb (diff) | |
Added engine/events stuff and cleaned up contest related code
Diffstat (limited to 'engine/events/std_collision.asm')
| -rwxr-xr-x | engine/events/std_collision.asm | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/engine/events/std_collision.asm b/engine/events/std_collision.asm new file mode 100755 index 00000000..932f4db8 --- /dev/null +++ b/engine/events/std_collision.asm @@ -0,0 +1,29 @@ +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 [wcf2a], a + inc hl + ld a, [hli] + ld [wcf2b], a + ld a, [hli] + ld [wTempTrainerHeader], 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 wcf2a
\ No newline at end of file |
