mirror of
https://github.com/pret/pokegold-spaceworld.git
synced 2026-03-22 10:04:52 -05:00
Addresses of sections will now be added to the linkerscript via `org`, and the section name will be the path/to/file. If there is more than one section in the file, then add a @SectionName after the path/to/file to describe the section.
36 lines
503 B
NASM
36 lines
503 B
NASM
INCLUDE "constants.asm"
|
|
|
|
; if DEBUG
|
|
SECTION "engine/predef.asm", ROMX
|
|
; else
|
|
; SECTION "Predef pointers", ROMX[$62AD], BANK[$01]
|
|
; endc
|
|
|
|
GetPredefPointer:: ; 1:62b0
|
|
ld a, h
|
|
ld [wPredefHL], a
|
|
ld a, l
|
|
ld [wPredefHL + 1], a
|
|
ld hl, wPredefDE
|
|
ld a, d
|
|
ld [hli], a
|
|
ld a, e
|
|
ld [hli], a
|
|
ld a, b
|
|
ld [hli], a
|
|
ld [hl], c
|
|
|
|
ld a, [wPredefID]
|
|
ld e, a
|
|
ld d, 0
|
|
ld hl, PredefPointers
|
|
add hl, de
|
|
add hl, de
|
|
add hl, de
|
|
ld a, [hli]
|
|
ld e, [hl]
|
|
inc hl
|
|
ld d, [hl]
|
|
ret
|
|
|
|
INCLUDE "data/predef_pointers.inc" |