mirror of
https://github.com/thornAvery/kep-hack.git
synced 2026-02-06 15:45:24 +13:00
Identify some .asm_* labels
This commit is contained in:
parent
cc98f28227
commit
8f81e71f19
20 changed files with 93 additions and 92 deletions
|
|
@ -6768,11 +6768,11 @@ InitOpponent:
|
|||
DetermineWildOpponent:
|
||||
ld a, [wd732]
|
||||
bit 1, a
|
||||
jr z, .asm_3ef2f
|
||||
jr z, .notDebug
|
||||
ldh a, [hJoyHeld]
|
||||
bit BIT_B_BUTTON, a
|
||||
ret nz
|
||||
.asm_3ef2f
|
||||
.notDebug
|
||||
ld a, [wNumberOfNoRandomBattleStepsLeft]
|
||||
and a
|
||||
ret nz
|
||||
|
|
|
|||
|
|
@ -17,9 +17,10 @@ DisplayDiploma::
|
|||
hlcoord 0, 0
|
||||
lb bc, 16, 18
|
||||
predef Diploma_TextBoxBorder
|
||||
|
||||
ld hl, DiplomaTextPointersAndCoords
|
||||
ld c, $5
|
||||
.asm_56715
|
||||
.placeTextLoop
|
||||
push bc
|
||||
ld a, [hli]
|
||||
ld e, a
|
||||
|
|
@ -34,7 +35,7 @@ DisplayDiploma::
|
|||
inc hl
|
||||
pop bc
|
||||
dec c
|
||||
jr nz, .asm_56715
|
||||
jr nz, .placeTextLoop
|
||||
hlcoord 10, 4
|
||||
ld de, wPlayerName
|
||||
call PlaceString
|
||||
|
|
|
|||
|
|
@ -79,9 +79,9 @@ SaffronCityPokecenterBenchGuyText::
|
|||
text_asm
|
||||
CheckEvent EVENT_BEAT_SILPH_CO_GIOVANNI
|
||||
ld hl, SaffronCityPokecenterBenchGuyText2
|
||||
jr nz, .asm_624f2
|
||||
jr nz, .printText
|
||||
ld hl, SaffronCityPokecenterBenchGuyText1
|
||||
.asm_624f2
|
||||
.printText
|
||||
call PrintText
|
||||
jp TextScriptEnd
|
||||
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ CinnabarGymQuiz::
|
|||
call PrintText
|
||||
ld a, 1
|
||||
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
|
||||
call CinnabarGymQuiz_1ea92
|
||||
call CinnabarGymQuiz_AskQuestion
|
||||
jp TextScriptEnd
|
||||
|
||||
CinnabarGymQuizIntroText:
|
||||
|
|
@ -75,7 +75,7 @@ CinnabarGymGateFlagAction:
|
|||
EventFlagAddress hl, EVENT_CINNABAR_GYM_GATE0_UNLOCKED
|
||||
predef_jump FlagActionPredef
|
||||
|
||||
CinnabarGymQuiz_1ea92:
|
||||
CinnabarGymQuiz_AskQuestion:
|
||||
call YesNoChoice
|
||||
ldh a, [hGymGateAnswer]
|
||||
ld c, a
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ PewterGuys:
|
|||
add hl, de
|
||||
ld d, h
|
||||
ld e, l
|
||||
ld hl, PointerTable_37ce6
|
||||
ld hl, PewterGuysCoordsTable
|
||||
ld a, [wWhichPewterGuy]
|
||||
add a
|
||||
ld b, 0
|
||||
|
|
@ -48,7 +48,7 @@ PewterGuys:
|
|||
inc hl
|
||||
jr .findMatchingCoordsLoop
|
||||
|
||||
PointerTable_37ce6:
|
||||
PewterGuysCoordsTable:
|
||||
dw PewterMuseumGuyCoords
|
||||
dw PewterGymGuyCoords
|
||||
|
||||
|
|
|
|||
|
|
@ -215,10 +215,10 @@ UpdateHPBar_PrintHPNumber:
|
|||
push hl
|
||||
ldh a, [hUILayoutFlags]
|
||||
bit 0, a
|
||||
jr z, .asm_fb15
|
||||
jr z, .hpBelowBar
|
||||
ld de, $9
|
||||
jr .next
|
||||
.asm_fb15
|
||||
.hpBelowBar
|
||||
ld de, $15
|
||||
.next
|
||||
add hl, de
|
||||
|
|
|
|||
|
|
@ -443,14 +443,14 @@ PrepareSuperNintendoVRAMTransfer:
|
|||
.packetPointers
|
||||
; Only the first packet is needed.
|
||||
dw MaskEnFreezePacket
|
||||
dw DataSnd_72548
|
||||
dw DataSnd_72558
|
||||
dw DataSnd_72568
|
||||
dw DataSnd_72578
|
||||
dw DataSnd_72588
|
||||
dw DataSnd_72598
|
||||
dw DataSnd_725a8
|
||||
dw DataSnd_725b8
|
||||
dw DataSndPacket1
|
||||
dw DataSndPacket2
|
||||
dw DataSndPacket3
|
||||
dw DataSndPacket4
|
||||
dw DataSndPacket5
|
||||
dw DataSndPacket6
|
||||
dw DataSndPacket7
|
||||
dw DataSndPacket8
|
||||
|
||||
CheckSGB:
|
||||
; Returns whether the game is running on an SGB in carry.
|
||||
|
|
|
|||
|
|
@ -2646,7 +2646,7 @@ SendNewMonToBox:
|
|||
ld a, [wcf91]
|
||||
ld [wd0b5], a
|
||||
ld c, a
|
||||
.asm_e7b1
|
||||
.loop
|
||||
inc de
|
||||
ld a, [de]
|
||||
ld b, a
|
||||
|
|
@ -2654,13 +2654,13 @@ SendNewMonToBox:
|
|||
ld c, b
|
||||
ld [de], a
|
||||
cp $ff
|
||||
jr nz, .asm_e7b1
|
||||
jr nz, .loop
|
||||
call GetMonHeader
|
||||
ld hl, wBoxMonOT
|
||||
ld bc, NAME_LENGTH
|
||||
ld a, [wBoxCount]
|
||||
dec a
|
||||
jr z, .asm_e7ee
|
||||
jr z, .skip
|
||||
dec a
|
||||
call AddNTimes
|
||||
push hl
|
||||
|
|
@ -2672,7 +2672,7 @@ SendNewMonToBox:
|
|||
ld a, [wBoxCount]
|
||||
dec a
|
||||
ld b, a
|
||||
.asm_e7db
|
||||
.loop2
|
||||
push bc
|
||||
push hl
|
||||
ld bc, NAME_LENGTH
|
||||
|
|
@ -2684,15 +2684,15 @@ SendNewMonToBox:
|
|||
add hl, bc
|
||||
pop bc
|
||||
dec b
|
||||
jr nz, .asm_e7db
|
||||
.asm_e7ee
|
||||
jr nz, .loop2
|
||||
.skip
|
||||
ld hl, wPlayerName
|
||||
ld de, wBoxMonOT
|
||||
ld bc, NAME_LENGTH
|
||||
call CopyData
|
||||
ld a, [wBoxCount]
|
||||
dec a
|
||||
jr z, .asm_e82a
|
||||
jr z, .skip2
|
||||
ld hl, wBoxMonNicks
|
||||
ld bc, NAME_LENGTH
|
||||
dec a
|
||||
|
|
@ -2706,7 +2706,7 @@ SendNewMonToBox:
|
|||
ld a, [wBoxCount]
|
||||
dec a
|
||||
ld b, a
|
||||
.asm_e817
|
||||
.loop3
|
||||
push bc
|
||||
push hl
|
||||
ld bc, NAME_LENGTH
|
||||
|
|
@ -2718,15 +2718,15 @@ SendNewMonToBox:
|
|||
add hl, bc
|
||||
pop bc
|
||||
dec b
|
||||
jr nz, .asm_e817
|
||||
.asm_e82a
|
||||
jr nz, .loop3
|
||||
.skip2
|
||||
ld hl, wBoxMonNicks
|
||||
ld a, NAME_MON_SCREEN
|
||||
ld [wNamingScreenType], a
|
||||
predef AskName
|
||||
ld a, [wBoxCount]
|
||||
dec a
|
||||
jr z, .asm_e867
|
||||
jr z, .skip3
|
||||
ld hl, wBoxMons
|
||||
ld bc, wBoxMon2 - wBoxMon1
|
||||
dec a
|
||||
|
|
@ -2740,7 +2740,7 @@ SendNewMonToBox:
|
|||
ld a, [wBoxCount]
|
||||
dec a
|
||||
ld b, a
|
||||
.asm_e854
|
||||
.loop4
|
||||
push bc
|
||||
push hl
|
||||
ld bc, wBoxMon2 - wBoxMon1
|
||||
|
|
@ -2752,8 +2752,8 @@ SendNewMonToBox:
|
|||
add hl, bc
|
||||
pop bc
|
||||
dec b
|
||||
jr nz, .asm_e854
|
||||
.asm_e867
|
||||
jr nz, .loop4
|
||||
.skip3
|
||||
ld a, [wEnemyMonLevel]
|
||||
ld [wEnemyMonBoxLevel], a
|
||||
ld hl, wEnemyMon
|
||||
|
|
@ -2783,11 +2783,11 @@ SendNewMonToBox:
|
|||
inc de
|
||||
xor a
|
||||
ld b, NUM_STATS * 2
|
||||
.asm_e89f
|
||||
.loop5
|
||||
ld [de], a
|
||||
inc de
|
||||
dec b
|
||||
jr nz, .asm_e89f
|
||||
jr nz, .loop5
|
||||
ld hl, wEnemyMonDVs
|
||||
ld a, [hli]
|
||||
ld [de], a
|
||||
|
|
@ -2796,12 +2796,12 @@ SendNewMonToBox:
|
|||
ld [de], a
|
||||
ld hl, wEnemyMonPP
|
||||
ld b, NUM_MOVES
|
||||
.asm_e8b1
|
||||
.loop6
|
||||
ld a, [hli]
|
||||
inc de
|
||||
ld [de], a
|
||||
dec b
|
||||
jr nz, .asm_e8b1
|
||||
jr nz, .loop6
|
||||
ret
|
||||
|
||||
; checks if the tile in front of the player is a shore or water tile
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ _Divide::
|
|||
ldh [hDivideBuffer+4], a
|
||||
ld a, $9
|
||||
ld e, a
|
||||
.asm_37db3
|
||||
.loop
|
||||
ldh a, [hDivideBuffer]
|
||||
ld c, a
|
||||
ldh a, [hDividend+1] ; (aliases: hMultiplicand)
|
||||
|
|
@ -78,18 +78,18 @@ _Divide::
|
|||
ld c, a
|
||||
ldh a, [hDividend] ; (aliases: hProduct, hPastLeadingZeros, hQuotient)
|
||||
sbc c
|
||||
jr c, .asm_37dce
|
||||
jr c, .next
|
||||
ldh [hDividend], a ; (aliases: hProduct, hPastLeadingZeros, hQuotient)
|
||||
ld a, d
|
||||
ldh [hDividend+1], a ; (aliases: hMultiplicand)
|
||||
ldh a, [hDivideBuffer+4]
|
||||
inc a
|
||||
ldh [hDivideBuffer+4], a
|
||||
jr .asm_37db3
|
||||
.asm_37dce
|
||||
jr .loop
|
||||
.next
|
||||
ld a, b
|
||||
cp $1
|
||||
jr z, .asm_37e18
|
||||
jr z, .done
|
||||
ldh a, [hDivideBuffer+4]
|
||||
sla a
|
||||
ldh [hDivideBuffer+4], a
|
||||
|
|
@ -103,7 +103,7 @@ _Divide::
|
|||
rl a
|
||||
ldh [hDivideBuffer+1], a
|
||||
dec e
|
||||
jr nz, .asm_37e04
|
||||
jr nz, .next2
|
||||
ld a, $8
|
||||
ld e, a
|
||||
ldh a, [hDivideBuffer]
|
||||
|
|
@ -116,20 +116,20 @@ _Divide::
|
|||
ldh [hDividend+1], a ; (aliases: hMultiplicand)
|
||||
ldh a, [hDividend+3]
|
||||
ldh [hDividend+2], a
|
||||
.asm_37e04
|
||||
.next2
|
||||
ld a, e
|
||||
cp $1
|
||||
jr nz, .asm_37e0a
|
||||
jr nz, .okay
|
||||
dec b
|
||||
.asm_37e0a
|
||||
.okay
|
||||
ldh a, [hDivisor] ; (aliases: hDivisor, hMultiplier, hPowerOf10)
|
||||
srl a
|
||||
ldh [hDivisor], a ; (aliases: hDivisor, hMultiplier, hPowerOf10)
|
||||
ldh a, [hDivideBuffer]
|
||||
rr a
|
||||
ldh [hDivideBuffer], a
|
||||
jr .asm_37db3
|
||||
.asm_37e18
|
||||
jr .loop
|
||||
.done
|
||||
ldh a, [hDividend+1] ; (aliases: hMultiplicand)
|
||||
ldh [hRemainder], a ; (aliases: hDivisor, hMultiplier, hPowerOf10)
|
||||
ldh a, [hDivideBuffer+4]
|
||||
|
|
|
|||
|
|
@ -184,13 +184,13 @@ LinkMenu:
|
|||
ld b, a
|
||||
and $f0
|
||||
cp $d0
|
||||
jr z, .asm_5c7d
|
||||
jr z, .checkEnemyMenuSelection
|
||||
ld a, [wLinkMenuSelectionReceiveBuffer + 1]
|
||||
ld b, a
|
||||
and $f0
|
||||
cp $d0
|
||||
jr nz, .exchangeMenuSelectionLoop
|
||||
.asm_5c7d
|
||||
.checkEnemyMenuSelection
|
||||
ld a, b
|
||||
and $c ; did the enemy press A or B?
|
||||
jr nz, .enemyPressedAOrB
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ IsSurfingAllowed:
|
|||
ret nz
|
||||
CheckBothEventsSet EVENT_SEAFOAM4_BOULDER1_DOWN_HOLE, EVENT_SEAFOAM4_BOULDER2_DOWN_HOLE
|
||||
ret z
|
||||
ld hl, CoordsData_cdf7
|
||||
ld hl, SeafoamIslandsB4FStairsCoords
|
||||
call ArePlayerCoordsInArray
|
||||
ret nc
|
||||
ld hl, wd728
|
||||
|
|
@ -45,7 +45,7 @@ IsSurfingAllowed:
|
|||
ld hl, CyclingIsFunText
|
||||
jp PrintText
|
||||
|
||||
CoordsData_cdf7:
|
||||
SeafoamIslandsB4FStairsCoords:
|
||||
dbmapcoord 7, 11
|
||||
db -1 ; end
|
||||
|
||||
|
|
|
|||
|
|
@ -23,9 +23,9 @@ LoadMissableObjects:
|
|||
ld de, MissableObjects ; calculate difference between out pointer and the base pointer
|
||||
ld a, l
|
||||
sub e
|
||||
jr nc, .asm_f13c
|
||||
jr nc, .noCarry
|
||||
dec h
|
||||
.asm_f13c
|
||||
.noCarry
|
||||
ld l, a
|
||||
ld a, h
|
||||
sub d
|
||||
|
|
|
|||
|
|
@ -14,22 +14,22 @@ FindPathToPlayer:
|
|||
call CalcDifference
|
||||
ld d, a
|
||||
and a
|
||||
jr nz, .asm_f8da
|
||||
jr nz, .stillHasYProgress
|
||||
ldh a, [hFindPathFlags]
|
||||
set 0, a ; current end of path matches the player's Y coordinate
|
||||
ldh [hFindPathFlags], a
|
||||
.asm_f8da
|
||||
.stillHasYProgress
|
||||
ldh a, [hFindPathXProgress]
|
||||
ld b, a
|
||||
ldh a, [hNPCPlayerXDistance] ; X distance in steps
|
||||
call CalcDifference
|
||||
ld e, a
|
||||
and a
|
||||
jr nz, .asm_f8ec
|
||||
jr nz, .stillHasXProgress
|
||||
ldh a, [hFindPathFlags]
|
||||
set 1, a ; current end of path matches the player's X coordinate
|
||||
ldh [hFindPathFlags], a
|
||||
.asm_f8ec
|
||||
.stillHasXProgress
|
||||
ldh a, [hFindPathFlags]
|
||||
cp $3 ; has the end of the path reached the player's position?
|
||||
jr z, .done
|
||||
|
|
|
|||
|
|
@ -101,10 +101,10 @@ IsPlayerFacingEdgeOfMap::
|
|||
ld b, a
|
||||
ld a, [wXCoord]
|
||||
ld c, a
|
||||
ld de, .asm_c41e
|
||||
ld de, .return
|
||||
push de
|
||||
jp hl
|
||||
.asm_c41e
|
||||
.return
|
||||
pop bc
|
||||
pop de
|
||||
pop hl
|
||||
|
|
@ -239,11 +239,11 @@ PrintSafariZoneSteps::
|
|||
call PlaceString
|
||||
ld a, [wNumSafariBalls]
|
||||
cp 10
|
||||
jr nc, .asm_c56d
|
||||
jr nc, .tenOrMore
|
||||
hlcoord 5, 3
|
||||
ld a, " "
|
||||
ld [hl], a
|
||||
.asm_c56d
|
||||
.tenOrMore
|
||||
hlcoord 6, 3
|
||||
ld de, wNumSafariBalls
|
||||
lb bc, 1, 2
|
||||
|
|
|
|||
|
|
@ -11,18 +11,18 @@ LoadSpinnerArrowTiles::
|
|||
ld a, [wCurMapTileset]
|
||||
cp FACILITY
|
||||
ld hl, FacilitySpinnerArrows
|
||||
jr z, .asm_44ff6
|
||||
jr z, .gotSpinnerArrows
|
||||
ld hl, GymSpinnerArrows
|
||||
.asm_44ff6
|
||||
.gotSpinnerArrows
|
||||
ld a, [wSimulatedJoypadStatesIndex]
|
||||
bit 0, a
|
||||
jr nz, .asm_45001
|
||||
ld de, $18
|
||||
jr nz, .alternateGraphics
|
||||
ld de, 6 * 4
|
||||
add hl, de
|
||||
.asm_45001
|
||||
.alternateGraphics
|
||||
ld a, $4
|
||||
ld bc, $0
|
||||
.asm_45006
|
||||
.loop
|
||||
push af
|
||||
push hl
|
||||
push bc
|
||||
|
|
@ -46,7 +46,7 @@ LoadSpinnerArrowTiles::
|
|||
pop hl
|
||||
pop af
|
||||
dec a
|
||||
jr nz, .asm_45006
|
||||
jr nz, .loop
|
||||
ret
|
||||
|
||||
INCLUDE "data/tilesets/spinner_tiles.asm"
|
||||
|
|
|
|||
|
|
@ -35,13 +35,13 @@ LoadTilesetHeader:
|
|||
call IsInArray
|
||||
pop de
|
||||
pop hl
|
||||
jr c, .asm_c797
|
||||
jr c, .dungeon
|
||||
ld a, [wCurMapTileset]
|
||||
ld b, a
|
||||
ldh a, [hPreviousTileset]
|
||||
cp b
|
||||
jr z, .done
|
||||
.asm_c797
|
||||
.dungeon
|
||||
ld a, [wDestinationWarpID]
|
||||
cp $ff
|
||||
jr z, .done
|
||||
|
|
|
|||
|
|
@ -39,12 +39,12 @@ TrackPlayTime::
|
|||
CountDownIgnoreInputBitReset:
|
||||
ld a, [wIgnoreInputCounter]
|
||||
and a
|
||||
jr nz, .asm_18e40
|
||||
jr nz, .decrement
|
||||
ld a, $ff
|
||||
jr .asm_18e41
|
||||
.asm_18e40
|
||||
jr .continue
|
||||
.decrement
|
||||
dec a
|
||||
.asm_18e41
|
||||
.continue
|
||||
ld [wIgnoreInputCounter], a
|
||||
and a
|
||||
ret nz
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue