ref: 42d0a2567a574e652aa1b56cd3ddf7f50a7193af
parent: 6b7ade66da6bae234ccc3c41a8f85247a2d4ce03
author: Rangi <remy.oukaour+rangi42@gmail.com>
date: Mon Oct 5 16:10:01 EDT 2020
Identify some more unnamed labels
--- a/engine/gfx/color.asm
+++ b/engine/gfx/color.asm
@@ -743,7 +743,7 @@
BattleObjectPals:
INCLUDE "gfx/battle_anims/battle_anims.pal"
-Function97cc: ; unreferenced
+CGBCopyTwoPredefObjectPals: ; unreferenced
call CheckCGB
ret z
ld a, (1 << rOBPI_AUTO_INCREMENT) | $10
--- a/engine/items/tmhm.asm
+++ b/engine/items/tmhm.asm
@@ -436,7 +436,8 @@
jr nz, .loop
ret
-Function2ca95: ; unreferenced
+PlaceMoveNameAfterTMHMName: ; unreferenced
+; Similar to a part of TMHM_DisplayPocketItems.
pop hl
ld bc, 3
add hl, bc
--- a/engine/overworld/npc_movement.asm
+++ b/engine/overworld/npc_movement.asm
@@ -274,14 +274,14 @@
ld e, [hl]
jr IsNPCAtCoord
-Function7015: ; unreferenced
+IsObjectFacingSomeoneElse: ; unreferenced
ldh a, [hMapObjectIndexBuffer]
call GetObjectStruct
- call .CheckWillBeFacingNPC
+ call .GetFacingCoords
call IsNPCAtCoord
ret
-.CheckWillBeFacingNPC:
+.GetFacingCoords:
ld hl, OBJECT_NEXT_MAP_X
add hl, bc
ld d, [hl]
@@ -289,12 +289,13 @@
add hl, bc
ld e, [hl]
call GetSpriteDirection
- and a
+ and a ; OW_DOWN?
jr z, .down
cp OW_UP
jr z, .up
cp OW_LEFT
jr z, .left
+ ; OW_RIGHT
inc d
ret
@@ -326,32 +327,31 @@
ld hl, OBJECT_PALETTE
add hl, bc
bit BIG_OBJECT_F, [hl]
- jr z, .got
-
+ jr z, .not_big
call WillObjectIntersectBigObject
- jr nc, .ok
- jr .ok2
+ jr nc, .check_current_coords
+ jr .continue
-.got
+.not_big
ld hl, OBJECT_NEXT_MAP_X
add hl, bc
ld a, [hl]
cp d
- jr nz, .ok
+ jr nz, .check_current_coords
ld hl, OBJECT_NEXT_MAP_Y
add hl, bc
ld a, [hl]
cp e
- jr nz, .ok
+ jr nz, .check_current_coords
-.ok2
+.continue
ldh a, [hMapObjectIndexBuffer]
ld l, a
ldh a, [hObjectStructIndexBuffer]
cp l
- jr nz, .setcarry
+ jr nz, .yes
-.ok
+.check_current_coords
ld hl, OBJECT_MAP_X
add hl, bc
ld a, [hl]
@@ -366,7 +366,7 @@
ld l, a
ldh a, [hObjectStructIndexBuffer]
cp l
- jr nz, .setcarry
+ jr nz, .yes
.next
ld hl, OBJECT_LENGTH
@@ -380,7 +380,7 @@
and a
ret
-.setcarry
+.yes
scf
ret
@@ -473,7 +473,7 @@
scf
ret
-Function7113: ; unreferenced
+IsNPCAtPlayerCoord: ; unreferenced
ld a, [wPlayerStandingMapX]
ld d, a
ld a, [wPlayerStandingMapY]
@@ -484,16 +484,17 @@
ldh [hObjectStructIndexBuffer], a
call DoesObjectHaveASprite
jr z, .next
+
ld hl, OBJECT_MOVEMENTTYPE
add hl, bc
ld a, [hl]
cp SPRITEMOVEDATA_BIGDOLLSYM
- jr nz, .not_snorlax
+ jr nz, .not_big
call WillObjectIntersectBigObject
jr c, .yes
jr .next
-.not_snorlax
+.not_big
ld hl, OBJECT_NEXT_MAP_Y
add hl, bc
ld a, [hl]
--- a/engine/pokemon/bills_pc_top.asm
+++ b/engine/pokemon/bills_pc_top.asm
@@ -139,7 +139,7 @@
and a
ret
-Functione512: ; unreferenced
+BillsPC_Deposit_CheckPartySize: ; unreferenced
ld a, [wPartyCount]
and a
jr z, .no_mon
@@ -206,7 +206,7 @@
and a
ret
-Functione56d: ; unreferenced
+BillsPC_Withdraw_CheckPartySize: ; unreferenced
ld a, [wPartyCount]
cp PARTY_LENGTH
jr nc, .party_full
--- a/engine/pokemon/mail_2.asm
+++ b/engine/pokemon/mail_2.asm
@@ -709,7 +709,8 @@
.place_author
jp PlaceString
-Functionb984e: ; unreferenced
+InvertBytes: ; unreferenced
+; invert bc bytes starting at hl
.loop
ld a, [hl]
xor $ff
--- a/engine/printer/printer.asm
+++ b/engine/printer/printer.asm
@@ -575,7 +575,9 @@
ld [wPrinterStatus], a
ret
-Function847bd: ; unreferenced
+PlacePrinterStatusStringBorderless: ; unreferenced
+; Similar to PlacePrinterStatusString, but with different hlcoords
+; and ClearBox instead of TextBox.
ld a, [wPrinterStatus]
and a
ret z
--- a/engine/rtc/print_hours_mins.asm
+++ b/engine/rtc/print_hours_mins.asm
@@ -1,9 +1,10 @@
Function1dd6a9: ; unreferenced
; Debug function?
+; Input: bc = value, de = destination
ld a, b
ld b, c
ld c, a
- push bc
+ push bc ; de points to this on the stack for PrintNum
push de
ld hl, sp+2
ld d, h
--- a/engine/rtc/timeset.asm
+++ b/engine/rtc/timeset.asm
@@ -196,7 +196,7 @@
pop hl
ret
-Function907f1: ; unreferenced
+DisplayHoursMinutesWithMinString: ; unreferenced
ld h, d
ld l, e
push hl