From 8f94711e9a641f309e5a985342bccb04dec63fcf Mon Sep 17 00:00:00 2001 From: scawful Date: Thu, 11 Apr 2024 18:28:20 -0400 Subject: [PATCH] Restore vanilla book of mudora behavior Add todo for special object interaction --- Items/book_of_secrets.asm | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/Items/book_of_secrets.asm b/Items/book_of_secrets.asm index 04323d2..1a11c1a 100644 --- a/Items/book_of_secrets.asm +++ b/Items/book_of_secrets.asm @@ -1,5 +1,38 @@ ; ========================================================= ; Book of Secrets (Reveal Secrets with Book of Mudora) +; Interacts with SpecialObject ID 0x32 +; Makes objects disappear when using the book + +org $07A45E +EXIT_07A45E: + +org $07AA6C +Link_PerformDesertPrayer: + +; Restored vanilla book of mudora code +; TODO: Update to work with special object +org $07A471 +LinkItem_Book: +{ + BIT.b $3A : BVS .exit + LDA.b $6C : BNE EXIT_07A45E + JSR Link_CheckNewY_ButtonPress : BCC .exit + + LDA.b $3A : AND.b #$BF : STA.b $3A + LDA.w $02ED : BNE .do_prayer + LDA.b #$3C : JSR PlaySFX_Set2 ; SFX2.3C + + BRA .exit + + .do_prayer + BRL Link_PerformDesertPrayer + + .exit + RTS +} +warnpc $07A494 + +; ========================================================= ; Makes BG2 Disappear when holding L in a building ; Based on the Parallel Worlds feature ;