mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2024-09-09 09:51:34 -07:00
be76ee56a8
Cleaned up `engine/routines`, in favor of moving files into more appropriate directories. predef-related routines are now in top-level `engine`. `rtc/delete_save_change_clock.asm` has been split into both `menus/delete_save.asm` and `rtc/reset_password.asm`. Made a new subdirectory: * engine/math: Contains all generic math-related routines.
30 lines
450 B
NASM
30 lines
450 B
NASM
GetPredefPointer:: ; 854b
|
|
; Return the bank and address of wPredefID in a and wPredefAddress.
|
|
|
|
; Save hl for later (back in Predef)
|
|
ld a, h
|
|
ld [wPredefTemp], a
|
|
ld a, l
|
|
ld [wPredefTemp + 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
|
|
; 856b
|
|
|
|
INCLUDE "data/predef_pointers.asm"
|