mirror of
https://github.com/thornAvery/kep-hack.git
synced 2025-09-16 18:30:50 +12:00

- Fixes a few bugs from the last commit, namely: - The guy who gives you the Pocket Lapras having bugged text - Being able to use it where you shouldn't (Cycling Road, Seafoam before the boulder puzzle) - Pocket Lapras not having an item description - As well as this, automatic item sorting has been added. Just press Start in the bag menu and all your items will get assorted into a convenient list. - Changed a few item descriptions since some of them didn't terminate properly - Freed up some space in the Home bank
49 lines
678 B
NASM
49 lines
678 B
NASM
MACRO farcall
|
|
ld b, BANK(\1)
|
|
ld hl, \1
|
|
rst _Bankswitch
|
|
ENDM
|
|
|
|
MACRO callfar
|
|
ld hl, \1
|
|
ld b, BANK(\1)
|
|
rst _Bankswitch
|
|
ENDM
|
|
|
|
MACRO farjp
|
|
ld b, BANK(\1)
|
|
ld hl, \1
|
|
jp Bankswitch
|
|
ENDM
|
|
|
|
MACRO jpfar
|
|
ld hl, \1
|
|
ld b, BANK(\1)
|
|
jp Bankswitch
|
|
ENDM
|
|
|
|
MACRO homecall
|
|
ldh a, [hLoadedROMBank]
|
|
push af
|
|
ld a, BANK(\1)
|
|
ldh [hLoadedROMBank], a
|
|
ld [MBC1RomBank], a
|
|
call \1
|
|
pop af
|
|
ldh [hLoadedROMBank], a
|
|
ld [MBC1RomBank], a
|
|
ENDM
|
|
|
|
MACRO homecall_sf ; homecall but save flags by popping into bc instead of af
|
|
ldh a, [hLoadedROMBank]
|
|
push af
|
|
ld a, BANK(\1)
|
|
ldh [hLoadedROMBank], a
|
|
ld [MBC1RomBank], a
|
|
call \1
|
|
pop bc
|
|
ld a, b
|
|
ldh [hLoadedROMBank], a
|
|
ld [MBC1RomBank], a
|
|
ENDM
|