mirror of
https://github.com/pret/pokeyellow.git
synced 2025-02-17 00:09:44 +00:00
Identify some .asm_*
labels
This commit is contained in:
parent
49690fb233
commit
96656fdc69
@ -7,25 +7,25 @@ Music_DoLowHealthAlarm::
|
||||
ret z ;nope
|
||||
|
||||
and $7f ;low 7 bits are the timer.
|
||||
jr nz, .asm_21383 ;if timer > 0, play low tone.
|
||||
jr nz, .notToneHi ;if timer > 0, play low tone.
|
||||
|
||||
call .playToneHi
|
||||
ld a, 30 ;keep this tone for 30 frames.
|
||||
jr .asm_21395 ;reset the timer.
|
||||
jr .resetTimer
|
||||
|
||||
.asm_21383
|
||||
.notToneHi
|
||||
cp 20
|
||||
jr nz, .asm_2138a ;if timer == 20,
|
||||
call .playToneLo ;actually set the sound registers.
|
||||
jr nz, .noTone ;if timer == 20,
|
||||
call .playToneLo ;actually set the sound registers.
|
||||
|
||||
.asm_2138a
|
||||
.noTone
|
||||
ld a, $86
|
||||
ld [wChannelSoundIDs + Ch5], a ;disable sound channel?
|
||||
ld a, [wLowHealthAlarm]
|
||||
and $7f ;decrement alarm timer.
|
||||
dec a
|
||||
|
||||
.asm_21395
|
||||
.resetTimer
|
||||
; reset the timer and enable flag.
|
||||
set 7, a
|
||||
ld [wLowHealthAlarm], a
|
||||
|
@ -164,14 +164,14 @@ MaskEnCancelPacket: MASK_EN 0
|
||||
; This set of packets is found in several Japanese SGB-compatible titles.
|
||||
; It appears to be part of NCL's SGB devkit.
|
||||
|
||||
DataSnd_728a1:
|
||||
DataSndPacket1:
|
||||
DATA_SND $85d, $0, 11
|
||||
db $8C ; cpx #$8c (2)
|
||||
db $D0, $F4 ; bne -$0c
|
||||
db $60 ; rts
|
||||
ds 7, 0
|
||||
|
||||
DataSnd_728b1:
|
||||
DataSndPacket2:
|
||||
DATA_SND $852, $0, 11
|
||||
db $A9, $E7 ; lda #$e7
|
||||
db $9F, $01, $C0, $7E ; sta $7ec001, x
|
||||
@ -181,7 +181,7 @@ DataSnd_728b1:
|
||||
db $E8 ; inx
|
||||
db $E0 ; cpx #$8c (1)
|
||||
|
||||
DataSnd_728c1:
|
||||
DataSndPacket3:
|
||||
DATA_SND $847, $0, 11
|
||||
db $C4 ; cmp #$c4 (2)
|
||||
db $D0, $16 ; bne +$16
|
||||
@ -191,7 +191,7 @@ DataSnd_728c1:
|
||||
db $D0, $10 ; bne +$10
|
||||
db $A2, $28 ; ldx #$28
|
||||
|
||||
DataSnd_728d1:
|
||||
DataSndPacket4:
|
||||
DATA_SND $83c, $0, 11
|
||||
db $F0, $12 ; beq +$12
|
||||
db $A5 ; lda dp
|
||||
@ -202,7 +202,7 @@ DataSnd_728d1:
|
||||
db $CA ; dex
|
||||
db $C9 ; cmp #$c4 (1)
|
||||
|
||||
DataSnd_728e1:
|
||||
DataSndPacket5:
|
||||
DATA_SND $831, $0, 11
|
||||
dbw $0C, $CAA5 ; tsb $caa5
|
||||
db $C9, $7E ; cmp #$7e
|
||||
@ -211,7 +211,7 @@ DataSnd_728e1:
|
||||
db $CB ; wai
|
||||
db $C9, $7E ; cmp #$7e
|
||||
|
||||
DataSnd_728f1:
|
||||
DataSndPacket6:
|
||||
DATA_SND $826, $0, 11
|
||||
db $39 ; bne +$39 (2)
|
||||
dbw $CD, $C48 ; cmp $c48
|
||||
@ -220,7 +220,7 @@ DataSnd_728f1:
|
||||
db $C9, $C9 ; cmp #$c9
|
||||
db $80, $D0 ; bra -$30
|
||||
|
||||
DataSnd_72901:
|
||||
DataSndPacket7:
|
||||
DATA_SND $81b, $0, 11
|
||||
db $EA ; nop
|
||||
db $EA ; nop
|
||||
@ -232,7 +232,7 @@ DataSnd_72901:
|
||||
dbw $CD,$C4F ; cmp $c4f
|
||||
db $D0 ; bne +$39 (1)
|
||||
|
||||
DataSnd_72911:
|
||||
DataSndPacket8:
|
||||
DATA_SND $810, $0, 11
|
||||
dbw $4C, $820 ; jmp $820
|
||||
db $EA ; nop
|
||||
|
@ -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
|
||||
|
||||
|
@ -39,7 +39,7 @@ CinnabarGymQuiz::
|
||||
call PrintText
|
||||
ld a, 1
|
||||
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
|
||||
call CinnabarGymQuiz_1ea92
|
||||
call CinnabarGymQuiz_AskQuestion
|
||||
jp TextScriptEnd
|
||||
|
||||
CinnabarGymQuizDummyIntroText:
|
||||
@ -86,7 +86,7 @@ CinnabarQuizQuestionsText6:
|
||||
text_far _CinnabarQuizQuestionsText6
|
||||
text_end
|
||||
|
||||
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
|
||||
|
||||
|
@ -597,14 +597,14 @@ PrepareSuperNintendoVRAMTransfer:
|
||||
.packetPointers
|
||||
; Only the first packet is needed.
|
||||
dw MaskEnFreezePacket
|
||||
dw DataSnd_728a1
|
||||
dw DataSnd_728b1
|
||||
dw DataSnd_728c1
|
||||
dw DataSnd_728d1
|
||||
dw DataSnd_728e1
|
||||
dw DataSnd_728f1
|
||||
dw DataSnd_72901
|
||||
dw DataSnd_72911
|
||||
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.
|
||||
|
@ -2929,7 +2929,7 @@ SendNewMonToBox:
|
||||
ld a, [wcf91]
|
||||
ld [wd0b5], a
|
||||
ld c, a
|
||||
.asm_e6f5
|
||||
.loop
|
||||
inc de
|
||||
ld a, [de]
|
||||
ld b, a
|
||||
@ -2937,13 +2937,13 @@ SendNewMonToBox:
|
||||
ld c, b
|
||||
ld [de], a
|
||||
cp $ff
|
||||
jr nz, .asm_e6f5
|
||||
jr nz, .loop
|
||||
call GetMonHeader
|
||||
ld hl, wBoxMonOT
|
||||
ld bc, NAME_LENGTH
|
||||
ld a, [wBoxCount]
|
||||
dec a
|
||||
jr z, .asm_e732
|
||||
jr z, .skip
|
||||
dec a
|
||||
call AddNTimes
|
||||
push hl
|
||||
@ -2955,7 +2955,7 @@ SendNewMonToBox:
|
||||
ld a, [wBoxCount]
|
||||
dec a
|
||||
ld b, a
|
||||
.asm_e71f
|
||||
.loop2
|
||||
push bc
|
||||
push hl
|
||||
ld bc, NAME_LENGTH
|
||||
@ -2967,15 +2967,15 @@ SendNewMonToBox:
|
||||
add hl, bc
|
||||
pop bc
|
||||
dec b
|
||||
jr nz, .asm_e71f
|
||||
.asm_e732
|
||||
jr nz, .loop2
|
||||
.skip
|
||||
ld hl, wPlayerName
|
||||
ld de, wBoxMonOT
|
||||
ld bc, NAME_LENGTH
|
||||
call CopyData
|
||||
ld a, [wBoxCount]
|
||||
dec a
|
||||
jr z, .asm_e76e
|
||||
jr z, .skip2
|
||||
ld hl, wBoxMonNicks
|
||||
ld bc, NAME_LENGTH
|
||||
dec a
|
||||
@ -2989,7 +2989,7 @@ SendNewMonToBox:
|
||||
ld a, [wBoxCount]
|
||||
dec a
|
||||
ld b, a
|
||||
.asm_e75b
|
||||
.loop3
|
||||
push bc
|
||||
push hl
|
||||
ld bc, NAME_LENGTH
|
||||
@ -3001,15 +3001,15 @@ SendNewMonToBox:
|
||||
add hl, bc
|
||||
pop bc
|
||||
dec b
|
||||
jr nz, .asm_e75b
|
||||
.asm_e76e
|
||||
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_e7ab
|
||||
jr z, .skip3
|
||||
ld hl, wBoxMons
|
||||
ld bc, wBoxMon2 - wBoxMon1
|
||||
dec a
|
||||
@ -3023,7 +3023,7 @@ SendNewMonToBox:
|
||||
ld a, [wBoxCount]
|
||||
dec a
|
||||
ld b, a
|
||||
.asm_e798
|
||||
.loop4
|
||||
push bc
|
||||
push hl
|
||||
ld bc, wBoxMon2 - wBoxMon1
|
||||
@ -3035,8 +3035,8 @@ SendNewMonToBox:
|
||||
add hl, bc
|
||||
pop bc
|
||||
dec b
|
||||
jr nz, .asm_e798
|
||||
.asm_e7ab
|
||||
jr nz, .loop4
|
||||
.skip3
|
||||
ld a, [wEnemyMonLevel]
|
||||
ld [wEnemyMonBoxLevel], a
|
||||
ld hl, wEnemyMon
|
||||
@ -3066,11 +3066,11 @@ SendNewMonToBox:
|
||||
inc de
|
||||
xor a
|
||||
ld b, NUM_STATS * 2
|
||||
.asm_e7e3
|
||||
.loop5
|
||||
ld [de], a
|
||||
inc de
|
||||
dec b
|
||||
jr nz, .asm_e7e3
|
||||
jr nz, .loop5
|
||||
ld hl, wEnemyMonDVs
|
||||
ld a, [hli]
|
||||
ld [de], a
|
||||
@ -3079,12 +3079,12 @@ SendNewMonToBox:
|
||||
ld [de], a
|
||||
ld hl, wEnemyMonPP
|
||||
ld b, NUM_MOVES
|
||||
.asm_e7f5
|
||||
.loop6
|
||||
ld a, [hli]
|
||||
inc de
|
||||
ld [de], a
|
||||
dec b
|
||||
jr nz, .asm_e7f5
|
||||
jr nz, .loop6
|
||||
ld a, [wcf91]
|
||||
cp KADABRA
|
||||
jr nz, .notKadabra
|
||||
|
@ -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]
|
||||
|
@ -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
|
||||
|
||||
|
@ -14,22 +14,22 @@ FindPathToPlayer:
|
||||
call CalcDifference
|
||||
ld d, a
|
||||
and a
|
||||
jr nz, .asm_f76a
|
||||
jr nz, .stillHasYProgress
|
||||
ldh a, [hFindPathFlags]
|
||||
set 0, a ; current end of path matches the player's Y coordinate
|
||||
ldh [hFindPathFlags], a
|
||||
.asm_f76a
|
||||
.stillHasYProgress
|
||||
ldh a, [hFindPathXProgress]
|
||||
ld b, a
|
||||
ldh a, [hNPCPlayerXDistance] ; X distance in steps
|
||||
call CalcDifference
|
||||
ld e, a
|
||||
and a
|
||||
jr nz, .asm_f77c
|
||||
jr nz, .stillHasXProgress
|
||||
ldh a, [hFindPathFlags]
|
||||
set 1, a ; current end of path matches the player's X coordinate
|
||||
ldh [hFindPathFlags], a
|
||||
.asm_f77c
|
||||
.stillHasXProgress
|
||||
ldh a, [hFindPathFlags]
|
||||
cp $3 ; has the end of the path reached the player's position?
|
||||
jr z, .done
|
||||
|
@ -103,10 +103,10 @@ IsPlayerFacingEdgeOfMap::
|
||||
ld b, a
|
||||
ld a, [wXCoord]
|
||||
ld c, a
|
||||
ld de, .returnaddress
|
||||
ld de, .return
|
||||
push de
|
||||
jp hl
|
||||
.returnaddress
|
||||
.return
|
||||
pop bc
|
||||
pop de
|
||||
pop hl
|
||||
|
@ -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"
|
||||
|
@ -49,12 +49,12 @@ TrackPlayTime::
|
||||
CountDownIgnoreInputBitReset:
|
||||
ld a, [wIgnoreInputCounter]
|
||||
and a
|
||||
jr nz, .asm_1f5e
|
||||
jr nz, .decrement
|
||||
ld a, $ff
|
||||
jr .asm_1f5f
|
||||
.asm_1f5e
|
||||
jr .continue
|
||||
.decrement
|
||||
dec a
|
||||
.asm_1f5f
|
||||
.continue
|
||||
ld [wIgnoreInputCounter], a
|
||||
and a
|
||||
ret nz
|
||||
|
@ -5,7 +5,7 @@ YesNoChoice::
|
||||
call InitYesNoTextBoxParameters
|
||||
jr DisplayYesNoChoice
|
||||
|
||||
Func_35f7::
|
||||
TwoOptionMenu:: ; unreferenced
|
||||
ld a, TWO_OPTION_MENU
|
||||
ld [wTextBoxID], a
|
||||
call InitYesNoTextBoxParameters
|
||||
|
Loading…
x
Reference in New Issue
Block a user