From 9d55a4facb8c607c5ae4f90561767a9ed787faeb Mon Sep 17 00:00:00 2001 From: scawful Date: Sat, 19 Oct 2024 19:09:19 -0400 Subject: [PATCH] add Librarian_CheckForNoMaps --- Sprites/NPCs/mermaid.asm | 29 ++++++++++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-) diff --git a/Sprites/NPCs/mermaid.asm b/Sprites/NPCs/mermaid.asm index b5e408c..dc46625 100644 --- a/Sprites/NPCs/mermaid.asm +++ b/Sprites/NPCs/mermaid.asm @@ -245,12 +245,23 @@ Sprite_Mermaid_Main: { %PlayAnimation(0,1,16) JSL Sprite_PlayerCantPassThrough - %ShowSolicitedMessage($012E) : BCC ++ + + ; If the player has no maps + JSR Librarian_CheckForNoMaps : BCC + + %ShowSolicitedMessage($012E) + RTS + + + + ; Ah, another scroll! + %ShowSolicitedMessage($01A0) : BCC ++ INC.w SprAction, X ++ - JSR Librarian_CheckForAllMaps : BCC + + + JSR Librarian_CheckForAllMaps : BCC +++ INC.w SprAction, X - + + +++ + RTS + } RTS } @@ -377,6 +388,18 @@ Librarian_CheckForAllMaps: RTS } +Librarian_CheckForNoMaps: +{ + LDA.l DNGMAP1 : CMP.b #$00 : BNE .not_no_maps + LDA.l DNGMAP2 : CMP.b #$00 : BEQ .no_maps + .not_no_maps + CLC + RTS + .no_maps + SEC + RTS +} + Sprite_Mermaid_Draw: { JSL Sprite_PrepOamCoord