mirror of
https://github.com/thornAvery/jep-hack.git
synced 2026-02-21 06:58:45 +13:00
First Commit
Upload literally everything from the pokecrystal16 expand-move-ID branch
This commit is contained in:
commit
2f8a41f833
4618 changed files with 480386 additions and 0 deletions
36
home/moves.asm
Normal file
36
home/moves.asm
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
GetMoveAttribute::
|
||||
; Return attribute a of move l in a; clobbers hl.
|
||||
; Replaces the old GetMoveAttr (renamed to avoid confusion).
|
||||
sub 1
|
||||
push bc
|
||||
ld c, a
|
||||
ld a, l
|
||||
jr c, .done
|
||||
call GetMoveAddress
|
||||
ld b, 0
|
||||
add hl, bc
|
||||
call GetFarByte
|
||||
.done
|
||||
pop bc
|
||||
ret
|
||||
|
||||
GetMoveAddress::
|
||||
; Get the far address for move a's attributes in a:hl.
|
||||
; This structure will not contain the animation byte! All MOVE_* constants must be reduced by 1 when indexing.
|
||||
push bc
|
||||
call GetMoveIndexFromID
|
||||
ld b, h
|
||||
ld c, l
|
||||
ld hl, Moves
|
||||
ld a, BANK(Moves)
|
||||
call LoadIndirectPointer
|
||||
pop bc
|
||||
ret
|
||||
|
||||
GetMoveData::
|
||||
; Copy move struct a to de.
|
||||
ld [de], a
|
||||
inc de
|
||||
call GetMoveAddress
|
||||
ld bc, MOVE_LENGTH - 1
|
||||
jp FarCopyBytes
|
||||
Loading…
Add table
Add a link
Reference in a new issue