Identify some unnamed labels

This commit is contained in:
Rangi 2020-10-06 13:50:02 -04:00
parent 42d0a2567a
commit fc08ff2c38
6 changed files with 343 additions and 300 deletions

View File

@ -397,7 +397,10 @@ AI_Items:
call EnemyUsedPotion call EnemyUsedPotion
jp .Use jp .Use
.asm_382ae ; This appears to be unused ; Everything up to "End unused" is unused
.UnusedHealItem: ; unreferenced
; This has similar conditions to .HealItem
callfar AICheckEnemyMaxHP callfar AICheckEnemyMaxHP
jr c, .dont_use jr c, .dont_use
push bc push bc
@ -440,6 +443,8 @@ AI_Items:
jp c, .Use jp c, .Use
jp .DontUse jp .DontUse
; End unused
.XAccuracy: .XAccuracy:
call .XItem call .XItem
jp c, .DontUse jp c, .DontUse

View File

@ -483,7 +483,7 @@ AI_Smart_LockOn:
call AIGetEnemyMove call AIGetEnemyMove
ld a, [wEnemyMoveStruct + MOVE_ACC] ld a, [wEnemyMoveStruct + MOVE_ACC]
cp 180 cp 71 percent - 1
jr nc, .asm_3884f jr nc, .asm_3884f
ld a, $1 ld a, $1
@ -535,7 +535,7 @@ AI_Smart_LockOn:
call AIGetEnemyMove call AIGetEnemyMove
ld a, [wEnemyMoveStruct + MOVE_ACC] ld a, [wEnemyMoveStruct + MOVE_ACC]
cp 180 cp 71 percent - 1
jr nc, .asm_3888b jr nc, .asm_3888b
dec [hl] dec [hl]

File diff suppressed because it is too large Load Diff

View File

@ -566,24 +566,24 @@ NamingScreen_AnimateCursor:
.right .right
call NamingScreen_GetCursorPosition call NamingScreen_GetCursorPosition
and a and a
jr nz, .asm_11ab7 jr nz, .target_right
ld hl, SPRITEANIMSTRUCT_VAR1 ld hl, SPRITEANIMSTRUCT_VAR1
add hl, bc add hl, bc
ld a, [hl] ld a, [hl]
cp $8 cp $8
jr nc, .asm_11ab4 jr nc, .wrap_left
inc [hl] inc [hl]
ret ret
.asm_11ab4 .wrap_left
ld [hl], $0 ld [hl], $0
ret ret
.asm_11ab7 .target_right
cp $3 cp $3
jr nz, .asm_11abc jr nz, .no_wrap_target_left
xor a xor a
.asm_11abc .no_wrap_target_left
ld e, a ld e, a
add a add a
add e add e
@ -595,24 +595,24 @@ NamingScreen_AnimateCursor:
.left .left
call NamingScreen_GetCursorPosition call NamingScreen_GetCursorPosition
and a and a
jr nz, .asm_11ad8 jr nz, .target_left
ld hl, SPRITEANIMSTRUCT_VAR1 ld hl, SPRITEANIMSTRUCT_VAR1
add hl, bc add hl, bc
ld a, [hl] ld a, [hl]
and a and a
jr z, .asm_11ad5 jr z, .wrap_right
dec [hl] dec [hl]
ret ret
.asm_11ad5 .wrap_right
ld [hl], $8 ld [hl], $8
ret ret
.asm_11ad8 .target_left
cp $1 cp $1
jr nz, .asm_11ade jr nz, .no_wrap_target_right
ld a, $4 ld a, $4
.asm_11ade .no_wrap_target_right
dec a dec a
dec a dec a
ld e, a ld e, a
@ -628,19 +628,19 @@ NamingScreen_AnimateCursor:
add hl, bc add hl, bc
ld a, [hl] ld a, [hl]
call NamingScreen_IsTargetBox call NamingScreen_IsTargetBox
jr nz, .asm_11af9 jr nz, .not_box
cp $5 cp $5
jr nc, .asm_11aff jr nc, .wrap_up
inc [hl] inc [hl]
ret ret
.asm_11af9 .not_box
cp $4 cp $4
jr nc, .asm_11aff jr nc, .wrap_up
inc [hl] inc [hl]
ret ret
.asm_11aff .wrap_up
ld [hl], $0 ld [hl], $0
ret ret
@ -649,11 +649,11 @@ NamingScreen_AnimateCursor:
add hl, bc add hl, bc
ld a, [hl] ld a, [hl]
and a and a
jr z, .asm_11b0c jr z, .wrap_down
dec [hl] dec [hl]
ret ret
.asm_11b0c .wrap_down
ld [hl], $4 ld [hl], $4
call NamingScreen_IsTargetBox call NamingScreen_IsTargetBox
ret nz ret nz
@ -1338,32 +1338,32 @@ MailComposition_TryAddLastCharacter:
and a and a
ret z ret z
cp $11 cp $11
jr nz, .asm_121c3 jr nz, .one_back
push hl push hl
ld hl, wNamingScreenCurNameLength ld hl, wNamingScreenCurNameLength
dec [hl] dec [hl]
dec [hl] dec [hl]
jr .asm_121c8 jr .continue
.asm_121c3 .one_back
push hl push hl
ld hl, wNamingScreenCurNameLength ld hl, wNamingScreenCurNameLength
dec [hl] dec [hl]
.asm_121c8 .continue
call NamingScreen_GetTextCursorPosition call NamingScreen_GetTextCursorPosition
ld c, [hl] ld c, [hl]
pop hl pop hl
.asm_121cd .loop
ld a, [hli] ld a, [hli]
cp $ff cp -1 ; end?
jp z, NamingScreen_AdvanceCursor_CheckEndOfString jp z, NamingScreen_AdvanceCursor_CheckEndOfString
cp c cp c
jr z, .asm_121d9 jr z, .done
inc hl inc hl
jr .asm_121cd jr .loop
.asm_121d9 .done
ld a, [hl] ld a, [hl]
jp NamingScreen_LoadNextCharacter jp NamingScreen_LoadNextCharacter

View File

@ -150,7 +150,7 @@ HandleObjectStep:
bit OBJ_FLAGS2_6, [hl] bit OBJ_FLAGS2_6, [hl]
jr nz, SetFacingStanding jr nz, SetFacingStanding
bit OBJ_FLAGS2_5, [hl] bit OBJ_FLAGS2_5, [hl]
jr nz, asm_4448 jr nz, _UseSecondObjectAction
ld de, ObjectActionPairPointers ; use first column ld de, ObjectActionPairPointers ; use first column
jr _HandleObjectAction jr _HandleObjectAction
@ -159,7 +159,7 @@ Function4440:
add hl, bc add hl, bc
bit INVISIBLE_F, [hl] bit INVISIBLE_F, [hl]
jr nz, SetFacingStanding jr nz, SetFacingStanding
asm_4448: _UseSecondObjectAction:
ld de, ObjectActionPairPointers + 2 ; use second column ld de, ObjectActionPairPointers + 2 ; use second column
jr _HandleObjectAction jr _HandleObjectAction

View File

@ -1776,7 +1776,7 @@ DepositPokemon:
ld a, PC_DEPOSIT ld a, PC_DEPOSIT
ld [wPokemonWithdrawDepositParameter], a ld [wPokemonWithdrawDepositParameter], a
predef SendGetMonIntoFromBox predef SendGetMonIntoFromBox
jr c, .asm_boxisfull jr c, .BoxFull
xor a ; REMOVE_PARTY xor a ; REMOVE_PARTY
ld [wPokemonWithdrawDepositParameter], a ld [wPokemonWithdrawDepositParameter], a
farcall RemoveMonFromPartyOrBox farcall RemoveMonFromPartyOrBox
@ -1806,7 +1806,7 @@ DepositPokemon:
and a and a
ret ret
.asm_boxisfull .BoxFull:
ld de, PCString_BoxFull ld de, PCString_BoxFull
call BillsPC_PlaceString call BillsPC_PlaceString
ld de, SFX_WRONG ld de, SFX_WRONG