diff options
| author | yenatch <yenatch@gmail.com> | 2015-04-01 12:56:42 -0400 |
|---|---|---|
| committer | yenatch <yenatch@gmail.com> | 2015-04-01 12:56:42 -0400 |
| commit | c2efe700ac1c5cca88bac710b98388a99665741e (patch) | |
| tree | b30d2f676d5ad0d78b959c8ffcf0f8dcfca13943 /engine/overworld | |
| parent | Merge pull request #88 from YamaArashi/master (diff) | |
| parent | Further split bank e stuff (diff) | |
| download | pokeyellow-c2efe700ac1c5cca88bac710b98388a99665741e.tar.gz pokeyellow-c2efe700ac1c5cca88bac710b98388a99665741e.tar.xz pokeyellow-c2efe700ac1c5cca88bac710b98388a99665741e.zip | |
Merge pull request #90 from xCrystal/master
Rename/split battle and move effect files. Battle functions, AI, and attack animations
Diffstat (limited to 'engine/overworld')
| -rw-r--r-- | engine/overworld/is_player_just_outside_map.asm | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/engine/overworld/is_player_just_outside_map.asm b/engine/overworld/is_player_just_outside_map.asm new file mode 100644 index 00000000..24e434b3 --- /dev/null +++ b/engine/overworld/is_player_just_outside_map.asm @@ -0,0 +1,16 @@ +; returns whether the player is one tile outside the map in Z +IsPlayerJustOutsideMap: ; 128d8 (4:68d8) + ld a, [W_YCOORD] + ld b, a + ld a, [W_CURMAPHEIGHT] + call .compareCoordWithMapDimension + ret z + ld a, [W_XCOORD] + ld b, a + ld a, [W_CURMAPWIDTH] +.compareCoordWithMapDimension + add a + cp b + ret z + inc b + ret |
