mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2024-11-16 11:27:33 -08:00
hStackBank -> hTempBank
This commit is contained in:
parent
1ec60810b8
commit
10909e6b43
@ -54,10 +54,10 @@ ByteFill::
|
|||||||
GetFarByte::
|
GetFarByte::
|
||||||
; retrieve a single byte from a:hl, and return it in a.
|
; retrieve a single byte from a:hl, and return it in a.
|
||||||
; bankswitch to new bank
|
; bankswitch to new bank
|
||||||
ldh [hStackBank], a
|
ldh [hTempBank], a
|
||||||
ldh a, [hROMBank]
|
ldh a, [hROMBank]
|
||||||
push af
|
push af
|
||||||
ldh a, [hStackBank]
|
ldh a, [hTempBank]
|
||||||
rst Bankswitch
|
rst Bankswitch
|
||||||
|
|
||||||
; get byte from new bank
|
; get byte from new bank
|
||||||
@ -75,10 +75,10 @@ GetFarByte::
|
|||||||
GetFarHalfword::
|
GetFarHalfword::
|
||||||
; retrieve a halfword from a:hl, and return it in hl.
|
; retrieve a halfword from a:hl, and return it in hl.
|
||||||
; bankswitch to new bank
|
; bankswitch to new bank
|
||||||
ldh [hStackBank], a
|
ldh [hTempBank], a
|
||||||
ldh a, [hROMBank]
|
ldh a, [hROMBank]
|
||||||
push af
|
push af
|
||||||
ldh a, [hStackBank]
|
ldh a, [hTempBank]
|
||||||
rst Bankswitch
|
rst Bankswitch
|
||||||
|
|
||||||
; get halfword from new bank, put it in hl
|
; get halfword from new bank, put it in hl
|
||||||
@ -92,10 +92,10 @@ GetFarHalfword::
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
FarCopyWRAM::
|
FarCopyWRAM::
|
||||||
ldh [hStackBank], a
|
ldh [hTempBank], a
|
||||||
ldh a, [rSVBK]
|
ldh a, [rSVBK]
|
||||||
push af
|
push af
|
||||||
ldh a, [hStackBank]
|
ldh a, [hTempBank]
|
||||||
ldh [rSVBK], a
|
ldh [rSVBK], a
|
||||||
|
|
||||||
call CopyBytes
|
call CopyBytes
|
||||||
@ -105,10 +105,10 @@ FarCopyWRAM::
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
GetFarWRAMByte::
|
GetFarWRAMByte::
|
||||||
ldh [hStackBank], a
|
ldh [hTempBank], a
|
||||||
ldh a, [rSVBK]
|
ldh a, [rSVBK]
|
||||||
push af
|
push af
|
||||||
ldh a, [hStackBank]
|
ldh a, [hTempBank]
|
||||||
ldh [rSVBK], a
|
ldh [rSVBK], a
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
ldh [hFarByte], a
|
ldh [hFarByte], a
|
||||||
@ -118,10 +118,10 @@ GetFarWRAMByte::
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
GetFarWRAMWord::
|
GetFarWRAMWord::
|
||||||
ldh [hStackBank], a
|
ldh [hTempBank], a
|
||||||
ldh a, [rSVBK]
|
ldh a, [rSVBK]
|
||||||
push af
|
push af
|
||||||
ldh a, [hStackBank]
|
ldh a, [hTempBank]
|
||||||
ldh [rSVBK], a
|
ldh [rSVBK], a
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
ld h, [hl]
|
ld h, [hl]
|
||||||
|
@ -2,10 +2,10 @@ FarCall_de::
|
|||||||
; Call a:de.
|
; Call a:de.
|
||||||
; Preserves other registers.
|
; Preserves other registers.
|
||||||
|
|
||||||
ldh [hStackBank], a
|
ldh [hTempBank], a
|
||||||
ldh a, [hROMBank]
|
ldh a, [hROMBank]
|
||||||
push af
|
push af
|
||||||
ldh a, [hStackBank]
|
ldh a, [hTempBank]
|
||||||
rst Bankswitch
|
rst Bankswitch
|
||||||
call .de
|
call .de
|
||||||
jr ReturnFarCall
|
jr ReturnFarCall
|
||||||
@ -18,10 +18,10 @@ FarCall_hl::
|
|||||||
; Call a:hl.
|
; Call a:hl.
|
||||||
; Preserves other registers.
|
; Preserves other registers.
|
||||||
|
|
||||||
ldh [hStackBank], a
|
ldh [hTempBank], a
|
||||||
ldh a, [hROMBank]
|
ldh a, [hROMBank]
|
||||||
push af
|
push af
|
||||||
ldh a, [hStackBank]
|
ldh a, [hTempBank]
|
||||||
rst Bankswitch
|
rst Bankswitch
|
||||||
call FarCall_JumpToHL
|
call FarCall_JumpToHL
|
||||||
|
|
||||||
|
12
home/gfx.asm
12
home/gfx.asm
@ -19,10 +19,10 @@ Get1bpp_2::
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
FarCopyBytesDouble_DoubleBankSwitch::
|
FarCopyBytesDouble_DoubleBankSwitch::
|
||||||
ldh [hStackBank], a
|
ldh [hTempBank], a
|
||||||
ldh a, [hROMBank]
|
ldh a, [hROMBank]
|
||||||
push af
|
push af
|
||||||
ldh a, [hStackBank]
|
ldh a, [hTempBank]
|
||||||
rst Bankswitch
|
rst Bankswitch
|
||||||
|
|
||||||
call FarCopyBytesDouble
|
call FarCopyBytesDouble
|
||||||
@ -135,10 +135,10 @@ DecompressRequest2bpp::
|
|||||||
FarCopyBytes::
|
FarCopyBytes::
|
||||||
; copy bc bytes from a:hl to de
|
; copy bc bytes from a:hl to de
|
||||||
|
|
||||||
ldh [hStackBank], a
|
ldh [hTempBank], a
|
||||||
ldh a, [hROMBank]
|
ldh a, [hROMBank]
|
||||||
push af
|
push af
|
||||||
ldh a, [hStackBank]
|
ldh a, [hTempBank]
|
||||||
rst Bankswitch
|
rst Bankswitch
|
||||||
|
|
||||||
call CopyBytes
|
call CopyBytes
|
||||||
@ -151,10 +151,10 @@ FarCopyBytesDouble:
|
|||||||
; Copy bc bytes from a:hl to bc*2 bytes at de,
|
; Copy bc bytes from a:hl to bc*2 bytes at de,
|
||||||
; doubling each byte in the process.
|
; doubling each byte in the process.
|
||||||
|
|
||||||
ldh [hStackBank], a
|
ldh [hTempBank], a
|
||||||
ldh a, [hROMBank]
|
ldh a, [hROMBank]
|
||||||
push af
|
push af
|
||||||
ldh a, [hStackBank]
|
ldh a, [hTempBank]
|
||||||
rst Bankswitch
|
rst Bankswitch
|
||||||
|
|
||||||
; switcheroo, de <> hl
|
; switcheroo, de <> hl
|
||||||
|
@ -1043,10 +1043,10 @@ MapTextbox::
|
|||||||
Call_a_de::
|
Call_a_de::
|
||||||
; Call a:de.
|
; Call a:de.
|
||||||
|
|
||||||
ldh [hStackBank], a
|
ldh [hTempBank], a
|
||||||
ldh a, [hROMBank]
|
ldh a, [hROMBank]
|
||||||
push af
|
push af
|
||||||
ldh a, [hStackBank]
|
ldh a, [hTempBank]
|
||||||
rst Bankswitch
|
rst Bankswitch
|
||||||
|
|
||||||
call .de
|
call .de
|
||||||
|
@ -809,10 +809,10 @@ MenuTextboxWaitButton::
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
Place2DMenuItemName::
|
Place2DMenuItemName::
|
||||||
ldh [hStackBank], a
|
ldh [hTempBank], a
|
||||||
ldh a, [hROMBank]
|
ldh a, [hROMBank]
|
||||||
push af
|
push af
|
||||||
ldh a, [hStackBank]
|
ldh a, [hTempBank]
|
||||||
rst Bankswitch
|
rst Bankswitch
|
||||||
|
|
||||||
call PlaceString
|
call PlaceString
|
||||||
|
@ -107,10 +107,10 @@ MobilePrintNum::
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
FarPrintText::
|
FarPrintText::
|
||||||
ldh [hStackBank], a
|
ldh [hTempBank], a
|
||||||
ldh a, [hROMBank]
|
ldh a, [hROMBank]
|
||||||
push af
|
push af
|
||||||
ldh a, [hStackBank]
|
ldh a, [hTempBank]
|
||||||
rst Bankswitch
|
rst Bankswitch
|
||||||
|
|
||||||
call PrintText
|
call PrintText
|
||||||
|
Loading…
Reference in New Issue
Block a user