diff --git a/engine/gfx/color.asm b/engine/gfx/color.asm index cf71e4803..76c2dc504 100644 --- a/engine/gfx/color.asm +++ b/engine/gfx/color.asm @@ -743,7 +743,7 @@ CGBCopyBattleObjectPals: ; unreferenced BattleObjectPals: INCLUDE "gfx/battle_anims/battle_anims.pal" -Function97cc: ; unreferenced +CGBCopyTwoPredefObjectPals: ; unreferenced call CheckCGB ret z ld a, (1 << rOBPI_AUTO_INCREMENT) | $10 diff --git a/engine/items/tmhm.asm b/engine/items/tmhm.asm index 0334b9a2e..fd8293603 100644 --- a/engine/items/tmhm.asm +++ b/engine/items/tmhm.asm @@ -436,7 +436,8 @@ TMHMPocket_GetCurrentLineCoord: jr nz, .loop ret -Function2ca95: ; unreferenced +PlaceMoveNameAfterTMHMName: ; unreferenced +; Similar to a part of TMHM_DisplayPocketItems. pop hl ld bc, 3 add hl, bc diff --git a/engine/overworld/npc_movement.asm b/engine/overworld/npc_movement.asm index a855ca714..1fb8e63a9 100644 --- a/engine/overworld/npc_movement.asm +++ b/engine/overworld/npc_movement.asm @@ -274,14 +274,14 @@ WillObjectBumpIntoSomeoneElse: 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 @@ Function7015: ; unreferenced 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 @@ IsNPCAtCoord: 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 @@ IsNPCAtCoord: ld l, a ldh a, [hObjectStructIndexBuffer] cp l - jr nz, .setcarry + jr nz, .yes .next ld hl, OBJECT_LENGTH @@ -380,7 +380,7 @@ IsNPCAtCoord: and a ret -.setcarry +.yes scf ret @@ -473,7 +473,7 @@ IsObjectMovingOffEdgeOfScreen: scf ret -Function7113: ; unreferenced +IsNPCAtPlayerCoord: ; unreferenced ld a, [wPlayerStandingMapX] ld d, a ld a, [wPlayerStandingMapY] @@ -484,16 +484,17 @@ Function7113: ; unreferenced 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] diff --git a/engine/pokemon/bills_pc_top.asm b/engine/pokemon/bills_pc_top.asm index 757b977c5..e4d82e417 100644 --- a/engine/pokemon/bills_pc_top.asm +++ b/engine/pokemon/bills_pc_top.asm @@ -139,7 +139,7 @@ BillsPC_DepositMenu: and a ret -Functione512: ; unreferenced +BillsPC_Deposit_CheckPartySize: ; unreferenced ld a, [wPartyCount] and a jr z, .no_mon @@ -206,7 +206,7 @@ BillsPC_WithdrawMenu: and a ret -Functione56d: ; unreferenced +BillsPC_Withdraw_CheckPartySize: ; unreferenced ld a, [wPartyCount] cp PARTY_LENGTH jr nc, .party_full diff --git a/engine/pokemon/mail_2.asm b/engine/pokemon/mail_2.asm index 4879ca7d4..b7fc57e8e 100644 --- a/engine/pokemon/mail_2.asm +++ b/engine/pokemon/mail_2.asm @@ -709,7 +709,8 @@ MailGFX_PlaceMessage: .place_author jp PlaceString -Functionb984e: ; unreferenced +InvertBytes: ; unreferenced +; invert bc bytes starting at hl .loop ld a, [hl] xor $ff diff --git a/engine/printer/printer.asm b/engine/printer/printer.asm index ebfe1a4dd..fcfd4be39 100644 --- a/engine/printer/printer.asm +++ b/engine/printer/printer.asm @@ -575,7 +575,9 @@ PlacePrinterStatusString: 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 diff --git a/engine/rtc/print_hours_mins.asm b/engine/rtc/print_hours_mins.asm index 5c4c2fdb7..2f5689970 100644 --- 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 diff --git a/engine/rtc/timeset.asm b/engine/rtc/timeset.asm index c511827b0..9dad2355a 100644 --- a/engine/rtc/timeset.asm +++ b/engine/rtc/timeset.asm @@ -196,7 +196,7 @@ DisplayHourOClock: pop hl ret -Function907f1: ; unreferenced +DisplayHoursMinutesWithMinString: ; unreferenced ld h, d ld l, e push hl