mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2024-09-09 09:51:34 -07:00
99e66c2557
- Remove "Buffer" suffix from some byte and word quantities - Change "Ptr" to "Pointer" Fixes #789
29 lines
432 B
NASM
29 lines
432 B
NASM
GetPredefPointer::
|
|
; Return the bank and address of wPredefID in a and wPredefAddress.
|
|
|
|
; Save hl for later (back in Predef)
|
|
ld a, h
|
|
ld [wPredefHL], a
|
|
ld a, l
|
|
ld [wPredefHL + 1], a
|
|
|
|
push de
|
|
ld a, [wPredefID]
|
|
ld e, a
|
|
ld d, 0
|
|
ld hl, PredefPointers
|
|
add hl, de
|
|
add hl, de
|
|
add hl, de
|
|
pop de
|
|
|
|
ld a, [hli]
|
|
ld [wPredefAddress + 1], a
|
|
ld a, [hli]
|
|
ld [wPredefAddress], a
|
|
ld a, [hl]
|
|
|
|
ret
|
|
|
|
INCLUDE "data/predef_pointers.asm"
|