mirror of
https://github.com/pret/pokeyellow.git
synced 2026-04-26 01:31:29 -05:00
80 lines
1.2 KiB
NASM
80 lines
1.2 KiB
NASM
farcall: MACRO
|
|
ld b, BANK(\1)
|
|
ld hl, \1
|
|
call Bankswitch
|
|
ENDM
|
|
|
|
callfar: MACRO
|
|
ld hl, \1
|
|
ld b, BANK(\1)
|
|
call Bankswitch
|
|
ENDM
|
|
|
|
farjp: MACRO
|
|
ld b, BANK(\1)
|
|
ld hl, \1
|
|
jp Bankswitch
|
|
ENDM
|
|
|
|
jpfar: MACRO
|
|
ld hl, \1
|
|
ld b, BANK(\1)
|
|
jp Bankswitch
|
|
ENDM
|
|
|
|
homecall: MACRO
|
|
ldh a, [hLoadedROMBank]
|
|
push af
|
|
ld a, BANK(\1)
|
|
call BankswitchCommon
|
|
call \1
|
|
pop af
|
|
call BankswitchCommon
|
|
ENDM
|
|
|
|
homejp: MACRO
|
|
ldh a, [hLoadedROMBank]
|
|
push af
|
|
ld a, BANK(\1)
|
|
call BankswitchCommon
|
|
call \1
|
|
pop af
|
|
jp BankswitchCommon
|
|
ENDM
|
|
|
|
homecall_sf: MACRO ; homecall but save flags by popping into bc instead of af
|
|
ldh a, [hLoadedROMBank]
|
|
push af
|
|
ld a, BANK(\1)
|
|
call BankswitchCommon
|
|
call \1
|
|
pop bc
|
|
ld a, b
|
|
call BankswitchCommon
|
|
ENDM
|
|
|
|
homejp_sf: MACRO ; homejp but save flags by popping into bc instead of af
|
|
ldh a, [hLoadedROMBank]
|
|
push af
|
|
ld a, BANK(\1)
|
|
call BankswitchCommon
|
|
call \1
|
|
pop bc
|
|
ld a, b
|
|
jp BankswitchCommon
|
|
ENDM
|
|
|
|
calladb_ModifyPikachuHappiness: MACRO
|
|
ld hl, ModifyPikachuHappiness
|
|
ld d, \1
|
|
ld b, BANK(ModifyPikachuHappiness)
|
|
call Bankswitch
|
|
ENDM
|
|
|
|
callabd_ModifyPikachuHappiness: MACRO
|
|
ld hl, ModifyPikachuHappiness
|
|
ld b, BANK(ModifyPikachuHappiness)
|
|
ld d, \1
|
|
call Bankswitch
|
|
ENDM
|