Improve some innacurate function names from pokecrystal

This commit is contained in:
xCrystal 2023-08-28 13:30:13 +02:00
parent 11db1300b2
commit fd6f02036e
18 changed files with 76 additions and 63 deletions

View File

@ -14,19 +14,29 @@
- **PrintText2bpp**: SpeechTextbox2bpp + UpdateSprites + ApplyTilemap + ClearTextbox + PrintTextboxText - **PrintText2bpp**: SpeechTextbox2bpp + UpdateSprites + ApplyTilemap + ClearTextbox + PrintTextboxText
- **MapTextbox**: ClearTextbox + redraw tile behind cursor + SafeUpdateSprites + disable OAM update + ApplyTilemap + PrintTextboxText + enable OAM update - **MapTextbox**: ClearTextbox + redraw tile behind cursor + SafeUpdateSprites + disable OAM update + ApplyTilemap + PrintTextboxText + enable OAM update
- **MenuBox**: Calls Textbox1bpp or Textbox2bpp, depending on the value at wMenuBoxUse2bppFrame, with menu location and dimensions. wMenuBoxUse2bppFrame, as part of menu data, is cleared (FALSE means 1bpp) by ClearMenuAndWindowData - **MenuBox**: Calls Textbox1bpp or Textbox2bpp, depending on the value at wMenuBoxUse2bppFrame, with menu location and dimensions. wMenuBoxUse2bppFrame, as part of menu data, is cleared (FALSE means 1bpp) by ClearMenuAndWindowData
- **OverworldTextModeSwitch**: LoadMapPart + SwapTextboxPalettes
- **LoadScreenTilemap**: From the metatile-based 24x20 map in wSurroundingTiles, load the corresponding 20x18 tiles to wTilemap. Later, BackupBGMap* from ScrollMap* copies new row/column from wTilemap to wBGMapBuffer. _ScrollBGMapPalettes populates wBGMapPalBuffer based on the tiles at wBGMapBuffer. These are read during vblank by UpdateBGMapBuffer.
- **LoadScreenAttrmapPals**: Load wAttrmap palette numbers based on the tileset palettes of the current map. Called only by LoadScreenTilemapAndAttrmapPals.
- **LoadScreenTilemapAndAttrmapPals**: LoadScreenTilemap + LoadScreenAttrmapPals. Often used to reload screen after closing a text box.
- **LoadFont_NoOAMUpdate**: LoadFrame + Hide Window + LoadStandardFont with OAM update disabled - **LoadFont_NoOAMUpdate**: LoadFrame + Hide Window + LoadStandardFont with OAM update disabled
- **LoadOverworldFont_NoOAMUpdate**: LoadOverworldFontAndFrame + hide Window with OAM update disabled - **LoadOverworldFont_NoOAMUpdate**: LoadOverworldFontAndFrame + hide Window with OAM update disabled
- **OpenText1bpp**, **OpenText2bpp**: ClearMenuAndWindowData + ReanchorBGMap_NoOAMUpdate + SpeechTextbox1bpp + _OpenAndCloseMenu_HDMATransferTilemapAndAttrmap + hide Window - **ReanchorBGMap_NoOAMUpdate**: LoadScreenTilemapAndAttrmapPals + HDMATransferTilemapAndAttrmap_OpenAndCloseMenu, then fill BG map with all black while Window is displayed, finally anchor map and objects. Followed by CopyTilemapAtOnce or by a *_HDMATransferTilemapAndAttrmap to redraw the screen.
- **OpenText1bpp**, **OpenText2bpp**: ClearMenuAndWindowData + ReanchorBGMap_NoOAMUpdate + SpeechTextbox1bpp + HDMATransferTilemapAndAttrmap_OpenAndCloseMenu + hide Window
- **OpenText1bpp**: Loads 1bpp font (LoadFont_NoOAMUpdate) - **OpenText1bpp**: Loads 1bpp font (LoadFont_NoOAMUpdate)
- **OpenText2bpp**: Doesn't load 2bpp font - **OpenText2bpp**: Doesn't load 2bpp font
- **RefreshScreen**: Same as OpenText functions but doesn't call any SpeechTextbox - **RefreshScreen**: Same as OpenText functions but doesn't call any SpeechTextbox
- **HDMATransferTilemapAndAttrmap_OverworldEffect**: Like HDMATransferTilemapAndAttrmap_OpenAndCloseMenu but with slightly different scanline timing. So it's essentially like RefreshScreen minus the anchoring part.
- **Request1bpp**, **Request2bpp**: Copy 1bpp or 2bpp tiles at a rate of TILES_PER_CYCLE (8) per frame during vblank. Wait until complete - **Request1bpp**, **Request2bpp**: Copy 1bpp or 2bpp tiles at a rate of TILES_PER_CYCLE (8) per frame during vblank. Wait until complete
- **Copy1bpp**, **Copy2bpp**: Copy 1bpp or 2bpp tiles immediately - **Copy1bpp**, **Copy2bpp**: Copy 1bpp or 2bpp tiles immediately
- **Get1bpp**, **Get2bpp**: Call Copy1bpp or Copy2bpp if LCD disabled. Request1bpp or Request2bpp otherwise - **Get1bpp**, **Get2bpp**: Call Copy1bpp or Copy2bpp if LCD disabled. Request1bpp or Request2bpp otherwise
- **HDMATransfer1bpp**: Copy 1bpp tiles via HDMA. Maximum 16 tiles per frame - **HDMATransfer1bpp**: Copy 1bpp tiles via HDMA. Maximum 16 tiles per frame
- **HDMATransfer2bpp**: Copy 2bpp tiles via HDMA. No hardcoded limit. Timing considers 1 tile per hblank - **HDMATransfer2bpp**: Copy 2bpp tiles via HDMA. No hardcoded limit. Timing considers 1 tile per hblank
- **Get1bppViaHDMA**, **Get2bppViaHDMA**: Call Copy1bpp or Copy2bpp if LCD disabled. HDMATransfer1bpp or HDMATransfer2bpp otherwise - **Get1bppViaHDMA**, **Get2bppViaHDMA**: Call Copy1bpp or Copy2bpp if LCD disabled. HDMATransfer1bpp or HDMATransfer2bpp otherwise
- **refreshscreen**: RefreshScreen
- **reloadmappart**: LoadScreenTilemapAndAttrmapPals + GetMovementPermissions + HDMATransferTilemapAndAttrmap_OverworldEffect + UpdateSprites. Similar to refreshscreen, but does not reanchor. On the other hand, it refreshes movement permissions. Often used after a block change or field move, which can affect collisions.

View File

@ -1023,7 +1023,7 @@ TilesetColorPicker: ; unreferenced
ld [wDebugTilesetCurColor], a ld [wDebugTilesetCurColor], a
ldh [hMapAnims], a ldh [hMapAnims], a
call ClearSprites call ClearSprites
call OverworldTextModeSwitch call LoadScreenTilemapAndAttrmapPals
call WaitBGMap2 call WaitBGMap2
xor a xor a
ldh [hBGMapMode], a ldh [hBGMapMode], a

View File

@ -58,7 +58,7 @@ ShakeHeadbuttTree:
jr .loop jr .loop
.done .done
call OverworldTextModeSwitch call LoadScreenTilemapAndAttrmapPals
call WaitBGMap call WaitBGMap
xor a xor a
ldh [hBGMapMode], a ldh [hBGMapMode], a

View File

@ -220,7 +220,7 @@ CutDownTreeOrGrass:
ld [hl], a ld [hl], a
xor a xor a
ldh [hBGMapMode], a ldh [hBGMapMode], a
call OverworldTextModeSwitch call LoadScreenTilemapAndAttrmapPals
call UpdateSprites call UpdateSprites
call DelayFrame call DelayFrame
ld a, [wCutWhirlpoolAnimationType] ld a, [wCutWhirlpoolAnimationType]
@ -1171,7 +1171,7 @@ DisappearWhirlpool:
ld [hl], a ld [hl], a
xor a xor a
ldh [hBGMapMode], a ldh [hBGMapMode], a
call OverworldTextModeSwitch call LoadScreenTilemapAndAttrmapPals
ld a, [wCutWhirlpoolAnimationType] ld a, [wCutWhirlpoolAnimationType]
ld e, a ld e, a
farcall PlayWhirlpoolSound farcall PlayWhirlpoolSound

View File

@ -212,7 +212,7 @@ _PlayersHousePC:
call _PlayersPC call _PlayersPC
and a and a
jr nz, .changed_deco_tiles jr nz, .changed_deco_tiles
call OverworldTextModeSwitch call LoadScreenTilemapAndAttrmapPals
call ApplyTilemap call ApplyTilemap
call UpdateSprites call UpdateSprites
call PC_PlayShutdownSound call PC_PlayShutdownSound

View File

@ -35,7 +35,7 @@ ClosePokepic::
call GetMemCGBLayout call GetMemCGBLayout
xor a xor a
ldh [hBGMapMode], a ldh [hBGMapMode], a
call OverworldTextModeSwitch call LoadScreenTilemapAndAttrmapPals
call ApplyTilemap call ApplyTilemap
call UpdateSprites call UpdateSprites
call LoadStandardFont call LoadStandardFont

View File

@ -26,11 +26,13 @@ HDMATransferAttrmapToWRAMBank3:
call HDMATransferToWRAMBank3 call HDMATransferToWRAMBank3
ret ret
ReloadMapPart:: HDMATransferTilemapAndAttrmap_OverworldEffect::
ld hl, .Function ld hl, .Function
jp CallInSafeGFXMode jp CallInSafeGFXMode
.Function: .Function:
; Pad BG attrs with $00
; Pad BG tiles with " "
decoord 0, 0, wAttrmap decoord 0, 0, wAttrmap
ld hl, wScratchAttrmap ld hl, wScratchAttrmap
call PadAttrmapForHDMATransfer call PadAttrmapForHDMATransfer
@ -39,31 +41,31 @@ ReloadMapPart::
call PadTilemapForHDMATransfer call PadTilemapForHDMATransfer
call DelayFrame call DelayFrame
; Transfer Attrmap and Tilemap to BG map
di di
ldh a, [rVBK] ldh a, [rVBK]
push af push af
ld a, $1 ld a, $1
ldh [rVBK], a ldh [rVBK], a
ld hl, wScratchAttrmap ld hl, wScratchAttrmap
call HDMATransfer_Wait127Scanlines_toBGMap call HDMATransfer_EndBeforeScanline128_toBGMap
ld a, $0 ld a, $0
ldh [rVBK], a ldh [rVBK], a
ld hl, wScratchTilemap ld hl, wScratchTilemap
call HDMATransfer_Wait127Scanlines_toBGMap call HDMATransfer_EndBeforeScanline128_toBGMap
pop af pop af
ldh [rVBK], a ldh [rVBK], a
ei ei
ret ret
OpenAndCloseMenu_HDMATransferTilemapAndAttrmap:: _HDMATransferTilemapAndAttrmap_OpenAndCloseMenu::
ld hl, .Function ld hl, .Function
jp CallInSafeGFXMode jp CallInSafeGFXMode
.Function: .Function:
; Transfer wAttrmap and Tilemap to BGMap ; Pad BG attrs with $00
; Fill vBGAttrs with $00 ; Pad BG tiles with " "
; Fill vBGTiles with " "
decoord 0, 0, wAttrmap decoord 0, 0, wAttrmap
ld hl, wScratchAttrmap ld hl, wScratchAttrmap
call PadAttrmapForHDMATransfer call PadAttrmapForHDMATransfer
@ -72,17 +74,18 @@ OpenAndCloseMenu_HDMATransferTilemapAndAttrmap::
call PadTilemapForHDMATransfer call PadTilemapForHDMATransfer
call DelayFrame call DelayFrame
; Transfer Attrmap and Tilemap to BG map
di di
ldh a, [rVBK] ldh a, [rVBK]
push af push af
ld a, $1 ld a, $1
ldh [rVBK], a ldh [rVBK], a
ld hl, wScratchAttrmap ld hl, wScratchAttrmap
call HDMATransfer_Wait123Scanlines_toBGMap call HDMATransfer_EndBeforeScanline124_toBGMap
ld a, $0 ld a, $0
ldh [rVBK], a ldh [rVBK], a
ld hl, wScratchTilemap ld hl, wScratchTilemap
call HDMATransfer_Wait123Scanlines_toBGMap call HDMATransfer_EndBeforeScanline124_toBGMap
pop af pop af
ldh [rVBK], a ldh [rVBK], a
ei ei
@ -131,7 +134,7 @@ WaitDMATransfer:
jr nz, .loop jr nz, .loop
ret ret
HDMATransfer_Wait127Scanlines_toBGMap: HDMATransfer_EndBeforeScanline128_toBGMap:
; HDMA transfer from hl to [hBGMapAddress] ; HDMA transfer from hl to [hBGMapAddress]
; hBGMapAddress -> de ; hBGMapAddress -> de
; 2 * SCREEN_HEIGHT -> c ; 2 * SCREEN_HEIGHT -> c
@ -140,9 +143,9 @@ HDMATransfer_Wait127Scanlines_toBGMap:
ldh a, [hBGMapAddress] ldh a, [hBGMapAddress]
ld e, a ld e, a
ld c, 2 * SCREEN_HEIGHT ld c, 2 * SCREEN_HEIGHT
jr HDMATransfer_Wait127Scanlines jr HDMATransfer_EndBeforeScanline128
HDMATransfer_Wait123Scanlines_toBGMap: HDMATransfer_EndBeforeScanline124_toBGMap:
; HDMA transfer from hl to [hBGMapAddress] ; HDMA transfer from hl to [hBGMapAddress]
; hBGMapAddress -> de ; hBGMapAddress -> de
; 2 * SCREEN_HEIGHT -> c ; 2 * SCREEN_HEIGHT -> c
@ -152,7 +155,7 @@ HDMATransfer_Wait123Scanlines_toBGMap:
ldh a, [hBGMapAddress] ldh a, [hBGMapAddress]
ld e, a ld e, a
ld c, 2 * SCREEN_HEIGHT ld c, 2 * SCREEN_HEIGHT
jr HDMATransfer_Wait123Scanlines jr HDMATransfer_EndBeforeScanline124
HDMATransfer_NoDI: HDMATransfer_NoDI:
; HDMA transfer from hl to [hBGMapAddress] ; HDMA transfer from hl to [hBGMapAddress]
@ -213,12 +216,12 @@ HDMATransfer_NoDI:
res 7, [hl] res 7, [hl]
ret ret
HDMATransfer_Wait123Scanlines: HDMATransfer_EndBeforeScanline124:
ld b, $7b ld b, 124 - 1
jr _continue_HDMATransfer jr _continue_HDMATransfer
HDMATransfer_Wait127Scanlines: HDMATransfer_EndBeforeScanline128:
ld b, $7f ld b, 128 - 1
_continue_HDMATransfer: _continue_HDMATransfer:
; a lot of waiting around for hardware registers ; a lot of waiting around for hardware registers
; [rHDMA1, rHDMA2] = hl & $fff0 ; [rHDMA1, rHDMA2] = hl & $fff0
@ -372,7 +375,7 @@ HDMATransfer2bpp::
ld d, h ld d, h
ld e, l ld e, l
ld hl, wScratchTilemap ld hl, wScratchTilemap
call HDMATransfer_Wait127Scanlines call HDMATransfer_EndBeforeScanline128
; restore the previous bank ; restore the previous bank
pop af pop af
@ -437,7 +440,7 @@ HDMATransfer1bpp::
ld d, h ld d, h
ld e, l ld e, l
ld hl, wScratchTilemap ld hl, wScratchTilemap
call HDMATransfer_Wait127Scanlines call HDMATransfer_EndBeforeScanline128
pop af pop af
ldh [rSVBK], a ldh [rSVBK], a
@ -459,13 +462,13 @@ HDMATransfer_OnlyTopFourRows:
ld c, $8 ld c, $8
ld hl, wScratchTilemap + $80 ld hl, wScratchTilemap + $80
debgcoord 0, 0, vBGMap1 debgcoord 0, 0, vBGMap1
call HDMATransfer_Wait127Scanlines call HDMATransfer_EndBeforeScanline128
ld a, $0 ld a, $0
ldh [rVBK], a ldh [rVBK], a
ld c, $8 ld c, $8
ld hl, wScratchTilemap ld hl, wScratchTilemap
debgcoord 0, 0, vBGMap1 debgcoord 0, 0, vBGMap1
call HDMATransfer_Wait127Scanlines call HDMATransfer_EndBeforeScanline128
ret ret
.Copy: .Copy:

View File

@ -624,7 +624,7 @@ RestoreOverworldMapTiles: ; unreferenced
ld bc, SCREEN_WIDTH * SCREEN_HEIGHT ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
call CopyBytes call CopyBytes
call CloseSRAM call CloseSRAM
call OverworldTextModeSwitch call LoadScreenTilemapAndAttrmapPals
xor a ; sScratch xor a ; sScratch
call OpenSRAM call OpenSRAM
ld hl, sScratch ld hl, sScratch

View File

@ -33,7 +33,7 @@ StartMenu::
call DrawVariableLengthMenuBox call DrawVariableLengthMenuBox
call .DrawBugContestStatusBox call .DrawBugContestStatusBox
call SafeUpdateSprites call SafeUpdateSprites
call _OpenAndCloseMenu_HDMATransferTilemapAndAttrmap call HDMATransferTilemapAndAttrmap_OpenAndCloseMenu
farcall LoadFont_NoOAMUpdate farcall LoadFont_NoOAMUpdate
call .DrawBugContestStatus call .DrawBugContestStatus
call UpdateTimePals call UpdateTimePals

View File

@ -27,10 +27,10 @@ ReanchorBGMap_NoOAMUpdate::
ldh [hBGMapMode], a ldh [hBGMapMode], a
ld a, $90 ld a, $90
ldh [hWY], a ldh [hWY], a
call OverworldTextModeSwitch call LoadScreenTilemapAndAttrmapPals
ld a, HIGH(vBGMap1) ld a, HIGH(vBGMap1)
call .LoadBGMapAddrIntoHRAM call .LoadBGMapAddrIntoHRAM
call _OpenAndCloseMenu_HDMATransferTilemapAndAttrmap call HDMATransferTilemapAndAttrmap_OpenAndCloseMenu
farcall ApplyPals farcall ApplyPals
ld a, TRUE ld a, TRUE
ldh [hCGBPalUpdate], a ldh [hCGBPalUpdate], a

View File

@ -1,4 +1,4 @@
_LoadMapPart:: _LoadScreenTilemap::
ld hl, wSurroundingTiles ld hl, wSurroundingTiles
ld a, [wPlayerMetatileY] ld a, [wPlayerMetatileY]
and a and a

View File

@ -124,25 +124,25 @@ UpdateOverworldMap:
.step_down .step_down
call .ScrollOverworldMapDown call .ScrollOverworldMapDown
call LoadMapPart call LoadScreenTilemap
call ScrollMapDown call ScrollMapDown
ret ret
.step_up .step_up
call .ScrollOverworldMapUp call .ScrollOverworldMapUp
call LoadMapPart call LoadScreenTilemap
call ScrollMapUp call ScrollMapUp
ret ret
.step_left .step_left
call .ScrollOverworldMapLeft call .ScrollOverworldMapLeft
call LoadMapPart call LoadScreenTilemap
call ScrollMapLeft call ScrollMapLeft
ret ret
.step_right .step_right
call .ScrollOverworldMapRight call .ScrollOverworldMapRight
call LoadMapPart call LoadScreenTilemap
call ScrollMapRight call ScrollMapRight
ret ret

View File

@ -947,7 +947,7 @@ ApplyObjectFacing:
ret ret
.DisableTextTiles: .DisableTextTiles:
call LoadMapPart call LoadScreenTilemap
hlcoord 0, 0 hlcoord 0, 0
ld bc, SCREEN_WIDTH * SCREEN_HEIGHT ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
.loop .loop
@ -2170,9 +2170,9 @@ Script_changeblock:
Script_reloadmappart:: Script_reloadmappart::
xor a xor a
ldh [hBGMapMode], a ldh [hBGMapMode], a
call OverworldTextModeSwitch call LoadScreenTilemapAndAttrmapPals
call GetMovementPermissions call GetMovementPermissions
farcall ReloadMapPart farcall HDMATransferTilemapAndAttrmap_OverworldEffect
call UpdateSprites call UpdateSprites
ret ret
@ -2212,7 +2212,7 @@ Script_writeunusedbyte:
ret ret
Script_closetext: Script_closetext:
call _OpenAndCloseMenu_HDMATransferTilemapAndAttrmap call HDMATransferTilemapAndAttrmap_OpenAndCloseMenu
call CloseText call CloseText
ret ret

View File

@ -219,7 +219,7 @@ LoadMapTimeOfDay:
ld [wSpriteUpdatesEnabled], a ld [wSpriteUpdatesEnabled], a
farcall ReplaceTimeOfDayPals farcall ReplaceTimeOfDayPals
farcall UpdateTimeOfDayPal farcall UpdateTimeOfDayPal
call OverworldTextModeSwitch call LoadScreenTilemapAndAttrmapPals
call .ClearBGMap call .ClearBGMap
call .PushAttrmap call .PushAttrmap
ret ret

View File

@ -1,4 +1,4 @@
_SwapTextboxPalettes:: _LoadScreenAttrmapPals::
hlcoord 0, 0 hlcoord 0, 0
decoord 0, 0, wAttrmap decoord 0, 0, wAttrmap
ld b, SCREEN_HEIGHT ld b, SCREEN_HEIGHT

View File

@ -91,12 +91,12 @@ GetMapSceneID::
pop bc pop bc
ret ret
OverworldTextModeSwitch:: LoadScreenTilemapAndAttrmapPals::
call LoadMapPart call LoadScreenTilemap
call SwapTextboxPalettes call LoadScreenAttrmapPals
ret ret
LoadMapPart:: LoadScreenTilemap::
ldh a, [hROMBank] ldh a, [hROMBank]
push af push af
@ -109,9 +109,9 @@ LoadMapPart::
ld bc, SCREEN_WIDTH * SCREEN_HEIGHT ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
call ByteFill call ByteFill
ld a, BANK(_LoadMapPart) ld a, BANK(_LoadScreenTilemap)
rst Bankswitch rst Bankswitch
call _LoadMapPart call _LoadScreenTilemap
pop af pop af
rst Bankswitch rst Bankswitch
@ -1952,7 +1952,7 @@ ReloadTilesetAndPalettes::
ld c, a ld c, a
call SwitchToAnyMapAttributesBank call SwitchToAnyMapAttributesBank
farcall UpdateTimeOfDayPal farcall UpdateTimeOfDayPal
call OverworldTextModeSwitch call LoadScreenTilemapAndAttrmapPals
call LoadTilesetGFX call LoadTilesetGFX
ld a, 9 ld a, 9
call SkipMusic call SkipMusic

View File

@ -288,8 +288,8 @@ ReloadSpritesNoPalettes::
call DelayFrame call DelayFrame
ret ret
SwapTextboxPalettes:: LoadScreenAttrmapPals::
homecall _SwapTextboxPalettes homecall _LoadScreenAttrmapPals
ret ret
ScrollBGMapPalettes:: ScrollBGMapPalettes::

View File

@ -6,7 +6,7 @@ RefreshScreen::
rst Bankswitch rst Bankswitch
call ReanchorBGMap_NoOAMUpdate call ReanchorBGMap_NoOAMUpdate
call _OpenAndCloseMenu_HDMATransferTilemapAndAttrmap call HDMATransferTilemapAndAttrmap_OpenAndCloseMenu
call HideWindow_EnableLCDInt call HideWindow_EnableLCDInt
pop af pop af
@ -22,8 +22,8 @@ CloseText::
call ClearMenuAndWindowData call ClearMenuAndWindowData
xor a xor a
ldh [hBGMapMode], a ldh [hBGMapMode], a
call OverworldTextModeSwitch call LoadScreenTilemapAndAttrmapPals
call _OpenAndCloseMenu_HDMATransferTilemapAndAttrmap call HDMATransferTilemapAndAttrmap_OpenAndCloseMenu
xor a xor a
ldh [hBGMapMode], a ldh [hBGMapMode], a
call SafeUpdateSprites call SafeUpdateSprites
@ -46,10 +46,10 @@ OpenText2bpp::
ld a, BANK(ReanchorBGMap_NoOAMUpdate) ld a, BANK(ReanchorBGMap_NoOAMUpdate)
rst Bankswitch rst Bankswitch
; assumes that the overworld 2bpp font and frame are loaded when calling this ; assumes that the overworld 2bpp font and frame are loaded when calling this
call ReanchorBGMap_NoOAMUpdate ; clear bgmap call ReanchorBGMap_NoOAMUpdate ; anchor bgmap
call SpeechTextbox2bpp call SpeechTextbox2bpp
call _OpenAndCloseMenu_HDMATransferTilemapAndAttrmap ; anchor bgmap call HDMATransferTilemapAndAttrmap_OpenAndCloseMenu ; transfer bgmap
call HideWindow_EnableLCDInt call HideWindow_EnableLCDInt
pop af pop af
@ -64,9 +64,9 @@ OpenText1bpp::
ld a, BANK(ReanchorBGMap_NoOAMUpdate) ; aka BANK(LoadFont_NoOAMUpdate) ld a, BANK(ReanchorBGMap_NoOAMUpdate) ; aka BANK(LoadFont_NoOAMUpdate)
rst Bankswitch rst Bankswitch
call ReanchorBGMap_NoOAMUpdate ; clear bgmap call ReanchorBGMap_NoOAMUpdate ; anchor bgmap
call SpeechTextbox1bpp call SpeechTextbox1bpp
call _OpenAndCloseMenu_HDMATransferTilemapAndAttrmap ; anchor bgmap call HDMATransferTilemapAndAttrmap_OpenAndCloseMenu ; transfer bgmap
call LoadFont_NoOAMUpdate ; load 1bpp font and frame, hide window call LoadFont_NoOAMUpdate ; load 1bpp font and frame, hide window
pop af pop af
@ -74,13 +74,13 @@ OpenText1bpp::
ret ret
_OpenAndCloseMenu_HDMATransferTilemapAndAttrmap:: HDMATransferTilemapAndAttrmap_OpenAndCloseMenu::
ldh a, [hOAMUpdate] ldh a, [hOAMUpdate]
push af push af
ld a, $1 ld a, $1
ldh [hOAMUpdate], a ldh [hOAMUpdate], a
farcall OpenAndCloseMenu_HDMATransferTilemapAndAttrmap farcall _HDMATransferTilemapAndAttrmap_OpenAndCloseMenu
pop af pop af
ldh [hOAMUpdate], a ldh [hOAMUpdate], a