diff options
author | U-Fish-PC\Daniel <corrnondacqb@yahoo.com> | 2014-05-22 18:13:20 -0400 |
---|---|---|
committer | U-Fish-PC\Daniel <corrnondacqb@yahoo.com> | 2014-05-22 18:13:20 -0400 |
commit | 15427f532085846ab6b51719be687951a094cb6c (patch) | |
tree | edea9b189e91641a12dd521756894df84aeeace7 /engine/items/tmhm.asm | |
parent | ea3ba4cde3706b7c77efb705555ec0c86321cbe2 (diff) |
Pull a lot of engine out of main.asm
Diffstat (limited to 'engine/items/tmhm.asm')
-rwxr-xr-x | engine/items/tmhm.asm | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/engine/items/tmhm.asm b/engine/items/tmhm.asm new file mode 100755 index 00000000..5b7b4e8e --- /dev/null +++ b/engine/items/tmhm.asm @@ -0,0 +1,26 @@ +; checks if the mon in wWhichPokemon already knows the move in $d0e0 +CheckIfMoveIsKnown: ; 2fe18 (b:7e18) + ld a, [wWhichPokemon] + ld hl, W_PARTYMON1_MOVE1 + ld bc, $2c + call AddNTimes + ld a, [$d0e0] + ld b, a + ld c, $4 ; nubmer of moves +.loop + ld a, [hli] + cp b + jr z, .alreadyKnown ; found a match + dec c + jr nz, .loop + and a + ret +.alreadyKnown + ld hl, AlreadyKnowsText + call PrintText + scf + ret + +AlreadyKnowsText: ; 2fe3b (b:7e3b) + TX_FAR _AlreadyKnowsText + db "@" |