You've already forked pokecrystal-board
mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2025-09-08 08:13:02 -07:00
Labeled every function in ROM0 that's referenced in the source
This commit is contained in:
@@ -421,9 +421,9 @@ Copy1bpp:: ; fa4
|
||||
push af
|
||||
ld h, 0
|
||||
ld l, c
|
||||
rept 3
|
||||
add hl, hl
|
||||
endr
|
||||
add hl, hl
|
||||
add hl, hl
|
||||
ld b, h
|
||||
ld c, l
|
||||
pop af
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
|
||||
|
||||
Function48c:: ; 48c
|
||||
; XXX
|
||||
; TimeOfDayFade
|
||||
ld a, [TimeOfDayPal]
|
||||
ld b, a
|
||||
ld hl, IncGradGBPalTable_11
|
||||
|
||||
@@ -100,7 +100,7 @@ Init:: ; 17d
|
||||
ld [rSVBK], a
|
||||
call ClearVRAM
|
||||
call ClearSprites
|
||||
call Function270
|
||||
call ClearsScratch
|
||||
|
||||
|
||||
ld a, BANK(LoadPushOAM)
|
||||
@@ -194,9 +194,10 @@ ClearVRAM:: ; 245
|
||||
|
||||
ClearWRAM:: ; 25a
|
||||
; Wipe swappable WRAM banks (1-7)
|
||||
; Assumes CGB or AGB
|
||||
|
||||
ld a, 1
|
||||
.asm_25c
|
||||
.bank_loop
|
||||
push af
|
||||
ld [rSVBK], a
|
||||
xor a
|
||||
@@ -206,15 +207,17 @@ ClearWRAM:: ; 25a
|
||||
pop af
|
||||
inc a
|
||||
cp 8
|
||||
jr nc, .asm_25c
|
||||
jr nc, .bank_loop
|
||||
ret
|
||||
; 270
|
||||
|
||||
Function270:: ; 270
|
||||
ld a, $0
|
||||
ClearsScratch:: ; 270
|
||||
; Wipe the first 32 bytes of sScratch
|
||||
|
||||
ld a, BANK(sScratch)
|
||||
call GetSRAMBank
|
||||
ld hl, $a000
|
||||
ld bc, $0020
|
||||
ld hl, sScratch
|
||||
ld bc, $20
|
||||
xor a
|
||||
call ByteFill
|
||||
call CloseSRAM
|
||||
|
||||
14
home/map.asm
14
home/map.asm
@@ -155,9 +155,9 @@ LoadMetatiles:: ; 2198
|
||||
add a
|
||||
ld l, a
|
||||
ld h, 0
|
||||
rept 3
|
||||
add hl, hl
|
||||
endr
|
||||
add hl, hl
|
||||
add hl, hl
|
||||
ld a, [TilesetBlocksAddress]
|
||||
add l
|
||||
ld l, a
|
||||
@@ -694,9 +694,9 @@ RestoreFacingAfterWarp:: ; 248a
|
||||
ld a, [hli]
|
||||
ld h, [hl]
|
||||
ld l, a
|
||||
rept 3
|
||||
inc hl ; get to the warp coords
|
||||
endr
|
||||
inc hl ; get to the warp coords
|
||||
inc hl ; get to the warp coords
|
||||
ld a, [WarpNumber]
|
||||
dec a
|
||||
ld c, a
|
||||
@@ -751,9 +751,9 @@ ChangeMap:: ; 24e4
|
||||
ld [hConnectionStripLength], a
|
||||
ld c, a
|
||||
ld b, 0
|
||||
rept 3
|
||||
add hl, bc
|
||||
endr
|
||||
add hl, bc
|
||||
add hl, bc
|
||||
ld c, 3
|
||||
add hl, bc
|
||||
ld a, [MapBlockDataBank]
|
||||
@@ -1072,7 +1072,7 @@ MapTextbox:: ; 269a
|
||||
|
||||
push hl
|
||||
call SpeechTextBox
|
||||
call Function2e31
|
||||
call SafeUpdateSprites
|
||||
ld a, 1
|
||||
ld [hOAMUpdate], a
|
||||
call ApplyTilemap
|
||||
|
||||
@@ -229,9 +229,9 @@ _OffsetMenuDataHeader:: ; 1e35
|
||||
; 1e5d
|
||||
|
||||
DoNthMenu:: ; 1e5d
|
||||
call MenuFunc_1e7f
|
||||
call DrawVariableLengthMenuBox
|
||||
call MenuWriteText
|
||||
call Function1eff
|
||||
call InitMenuCursorAndButtonPermissions
|
||||
call GetStaticMenuJoypad
|
||||
call GetMenuJoypad
|
||||
call MenuClickSound
|
||||
@@ -239,17 +239,17 @@ DoNthMenu:: ; 1e5d
|
||||
; 1e70
|
||||
|
||||
SetUpMenu:: ; 1e70
|
||||
call MenuFunc_1e7f ; ???
|
||||
call DrawVariableLengthMenuBox ; ???
|
||||
call MenuWriteText
|
||||
call Function1eff ; set up selection pointer
|
||||
call InitMenuCursorAndButtonPermissions ; set up selection pointer
|
||||
ld hl, w2DMenuFlags1
|
||||
set 7, [hl]
|
||||
ret
|
||||
|
||||
MenuFunc_1e7f::
|
||||
DrawVariableLengthMenuBox::
|
||||
call CopyMenuData2
|
||||
call GetMenuIndexSet
|
||||
call Function1ea6
|
||||
call AutomaticGetMenuBottomCoord
|
||||
call MenuBox
|
||||
ret
|
||||
|
||||
@@ -257,8 +257,8 @@ MenuWriteText::
|
||||
xor a
|
||||
ld [hBGMapMode], a
|
||||
call GetMenuIndexSet ; sort out the text
|
||||
call Function1eda ; actually write it
|
||||
call Function2e31
|
||||
call RunMenuItemPrintingFunction ; actually write it
|
||||
call SafeUpdateSprites
|
||||
ld a, [hOAMUpdate]
|
||||
push af
|
||||
ld a, $1
|
||||
@@ -269,7 +269,7 @@ MenuWriteText::
|
||||
ret
|
||||
; 0x1ea6
|
||||
|
||||
Function1ea6:: ; 1ea6
|
||||
AutomaticGetMenuBottomCoord:: ; 1ea6
|
||||
ld a, [wMenuBorderLeftCoord]
|
||||
ld c, a
|
||||
ld a, [wMenuBorderRightCoord]
|
||||
@@ -310,7 +310,7 @@ GetMenuIndexSet:: ; 1ebd
|
||||
ret
|
||||
; 1eda
|
||||
|
||||
Function1eda:: ; 1eda
|
||||
RunMenuItemPrintingFunction:: ; 1eda
|
||||
call MenuBoxCoord2Tile
|
||||
ld bc, 2 * SCREEN_WIDTH + 2
|
||||
add hl, bc
|
||||
@@ -325,7 +325,7 @@ Function1eda:: ; 1eda
|
||||
ld d, h
|
||||
ld e, l
|
||||
ld hl, wMenuData2DisplayFunctionPointer
|
||||
call .__wMenuData2DisplayFunction__
|
||||
call ._hl_
|
||||
pop hl
|
||||
ld de, 2 * SCREEN_WIDTH
|
||||
add hl, de
|
||||
@@ -333,14 +333,14 @@ Function1eda:: ; 1eda
|
||||
jr .loop
|
||||
; 1efb
|
||||
|
||||
.__wMenuData2DisplayFunction__ ; 1efb
|
||||
._hl_ ; 1efb
|
||||
ld a, [hli]
|
||||
ld h, [hl]
|
||||
ld l, a
|
||||
jp [hl]
|
||||
; 1eff
|
||||
|
||||
Function1eff:: ; 1eff
|
||||
InitMenuCursorAndButtonPermissions:: ; 1eff
|
||||
call InitVerticalMenuCursor
|
||||
ld hl, wMenuJoypadFilter
|
||||
ld a, [wMenuData2Flags]
|
||||
|
||||
@@ -150,9 +150,9 @@ SetMenuAttributes:: ; 1bb1
|
||||
ld [hli], a
|
||||
ld [hli], a
|
||||
xor a
|
||||
rept 3
|
||||
ld [hli], a
|
||||
endr
|
||||
ld [hli], a
|
||||
ld [hli], a
|
||||
pop bc
|
||||
pop hl
|
||||
ret
|
||||
|
||||
@@ -525,7 +525,7 @@ Paragraph:: ; 12f2
|
||||
call LoadBlinkingCursor
|
||||
|
||||
.linkbattle
|
||||
call Function13b6
|
||||
call Text_WaitBGMap
|
||||
call ButtonSound
|
||||
hlcoord TEXTBOX_INNERX, TEXTBOX_INNERY
|
||||
lb bc, TEXTBOX_INNERH - 1, TEXTBOX_INNERW
|
||||
@@ -546,7 +546,7 @@ Char4B:: ; 131f
|
||||
call LoadBlinkingCursor
|
||||
|
||||
.communication
|
||||
call Function13b6
|
||||
call Text_WaitBGMap
|
||||
|
||||
push de
|
||||
call ButtonSound
|
||||
@@ -598,7 +598,7 @@ PromptText:: ; 135a
|
||||
call LoadBlinkingCursor
|
||||
|
||||
.ok
|
||||
call Function13b6
|
||||
call Text_WaitBGMap
|
||||
call ButtonSound
|
||||
ld a, [wLinkMode]
|
||||
cp LINK_COLOSSEUM
|
||||
@@ -655,7 +655,7 @@ TextScroll:: ; 138c
|
||||
ret
|
||||
; 13b6
|
||||
|
||||
Function13b6:: ; 13b6
|
||||
Text_WaitBGMap:: ; 13b6
|
||||
push bc
|
||||
ld a, [hOAMUpdate]
|
||||
push af
|
||||
@@ -1029,6 +1029,8 @@ Text_PlaySound:: ; 1500
|
||||
; 1522
|
||||
|
||||
Function1522:: ; 1522
|
||||
; XXX
|
||||
; TX_CRY
|
||||
push de
|
||||
ld e, [hl]
|
||||
inc hl
|
||||
|
||||
@@ -39,7 +39,7 @@ CloseText:: ; 2dcf
|
||||
call _OpenAndCloseMenu_HDMATransferTileMapAndAttrMap
|
||||
xor a
|
||||
ld [hBGMapMode], a
|
||||
call Function2e31
|
||||
call SafeUpdateSprites
|
||||
ld a, $90
|
||||
ld [hWY], a
|
||||
call ReplaceKrisSprite
|
||||
@@ -78,7 +78,7 @@ _OpenAndCloseMenu_HDMATransferTileMapAndAttrMap:: ; 2e20
|
||||
ret
|
||||
; 2e31
|
||||
|
||||
Function2e31:: ; 2e31
|
||||
SafeUpdateSprites:: ; 2e31
|
||||
ld a, [hOAMUpdate]
|
||||
push af
|
||||
ld a, [hBGMapMode]
|
||||
@@ -87,7 +87,9 @@ Function2e31:: ; 2e31
|
||||
ld [hBGMapMode], a
|
||||
ld a, $1
|
||||
ld [hOAMUpdate], a
|
||||
|
||||
call UpdateSprites
|
||||
|
||||
xor a
|
||||
ld [hOAMUpdate], a
|
||||
call DelayFrame
|
||||
|
||||
Reference in New Issue
Block a user