diff --git a/mist/default_save.s b/mist/default_save.s index 0ed05a3c..5fbb4c3b 100644 --- a/mist/default_save.s +++ b/mist/default_save.s @@ -69,3 +69,4 @@ .byte $00 ; DENTIST_HOURS = $BC .byte $00 ; DENTIST_MINUTES = $BD .byte $00 ; PILLAR_ON = $BE +.byte $00 ; GREEN_BOOK_PROGRESS = $C0 diff --git a/mist/dni.s b/mist/dni.s index ed071dfe..2687a976 100644 --- a/mist/dni.s +++ b/mist/dni.s @@ -145,3 +145,4 @@ really_exit: .include "leveldata_dni.inc" + diff --git a/mist/dni_ending.s b/mist/dni_ending.s new file mode 100644 index 00000000..6001adea --- /dev/null +++ b/mist/dni_ending.s @@ -0,0 +1,53 @@ +; +; ending, both +; + +.byte 0,20,"AH, MY FRIEND. YOU'VE RETURNED.",0 +.byte 0,21,"WE MEET FACE-TO-FACE.",0 +.byte 0,22,"AND THE PAGE, DID YOU BRING THE PAGE?",0 +.byte 0,23," ",0 + +; ending, no white page +; + +.byte 0,20,"YOU DIDN'T BRING THE PAGE.",0 +.byte 0,21,"YOU DIDN'T BRING THE PAGE!",0 +.byte 0,22,"WHAT KIND OF FOOL ARE YOU?!",0 +.byte 0,23,"DID YOU NOT TAKE MY WARNING SERIOUSLY?",0 + +.byte 0,20,"*SIGH*",0 +.byte 0,21,"WELCOME TO D'NI",0 +.byte 0,22,"YOU AND I WILL LIVE HERE... FOREVER.",0 +.byte 0,23," ",0 + +; ending, with white page + +.byte 0,20," ",0 +.byte 0,21,"GIVE IT TO ME... GIVE ME THE PAGE",0 +.byte 0,22,"PLEASE GIVE THE PAGE...",0 +.byte 0,23," ",0 + +.byte 0,20,"YOU'VE DONE THE RIGHT THING.",0 +.byte 0,21,"I HAVE A DIFFICULT CHOIC TO MAKE",0 +.byte 0,22,"MY SONS BETRAYED ME, I KNOW",0 +.byte 0,23,"WHAT I MUST DO. I SHALL RETURN SHORTLY",0 + +; [links away] + +; [links in] + +.byte 0,20,"IT IS DONE. I HAVE MANY QUESTIONS,",0 +.byte 0,21,"BUT MY WRITING CANNOT WAIT. MY DELAY",0 +.byte 0,22,"MAY HAVE HAD A CATASTROPHIC IMPACT ON",0 +.byte 0,23,"THE WORLD WHERE MY WIFE IS HELD HOSTAGE",0 + +.byte 0,20,"A REWARD? I'M SORRY BUT ALL I HAVE TO",0 +.byte 0,21,"OFFER IS THE LIBRARY ON MYST AND THE",0 +.byte 0,22,"BOOKS CONTAINED THERE. FEEL FREE TO",0 +.byte 0,23,"EXPLORE AT YOUR LEISURE.",0 + +.byte 0,20,"ALSO, I AM FIGHTING A FOE MUCH",0 +.byte 0,21,"GREATER THAN MY SONS CAN IMAGINE.",0 +.byte 0,22,"I MIGHT REQUEST YOUR ASSISTANCE.",0 +.byte 0,23,"UNTIL THEN, HAVE FUN ON MYST",0 + diff --git a/mist/graphics_dni/atrus_desk.png b/mist/graphics_dni/atrus_desk.png new file mode 100644 index 00000000..9f3ec53d Binary files /dev/null and b/mist/graphics_dni/atrus_desk.png differ diff --git a/mist/graphics_dni/dni_desk_n.png b/mist/graphics_dni/dni_desk_n.png index 800aa6b1..2327515d 100644 Binary files a/mist/graphics_dni/dni_desk_n.png and b/mist/graphics_dni/dni_desk_n.png differ diff --git a/mist/graphics_octagon/atrus_vids.png b/mist/graphics_octagon/atrus_vids.png new file mode 100644 index 00000000..04cfa2a5 Binary files /dev/null and b/mist/graphics_octagon/atrus_vids.png differ diff --git a/mist/graphics_octagon/green_book_open.png b/mist/graphics_octagon/green_book_open.png index be748f01..664d6542 100644 Binary files a/mist/graphics_octagon/green_book_open.png and b/mist/graphics_octagon/green_book_open.png differ diff --git a/mist/leveldata_octagon.inc b/mist/leveldata_octagon.inc index 2b9fe83f..ad25e6f3 100644 --- a/mist/leveldata_octagon.inc +++ b/mist/leveldata_octagon.inc @@ -681,7 +681,7 @@ location35: location36: .byte $ff ; north exit .byte $ff ; south exit - .byte OCTAGON_GREEN_BOOK_OPEN ; east exit + .byte OCTAGON_FIREPLACE_SHELF ; east exit .byte $ff ; west exit .byte $ff ; north exit_dir .byte $ff ; south exit_dir @@ -692,7 +692,11 @@ location36: .word green_book_lzsa ; east bg .word $0000 ; west bg .byte BG_EAST - .byte $ff ; special exit + .byte DIRECTION_E ; special exit + .byte 12,30 ; special x + .byte 2,46 ; special y + .word open_green_book-1 ; special function + ; OCTAGON_GREEN_BOOK_OPEN -- green book is open location37: @@ -710,7 +714,7 @@ location37: .word $0000 ; west bg .byte BG_EAST .byte DIRECTION_E ; special exit - .byte 21,31 ; special x - .byte 10,24 ; special y - .word goto_dni-1 ; special function + .byte 6,34 ; special x + .byte 2,46 ; special y + .word touch_green_book-1 ; special function diff --git a/mist/octagon.s b/mist/octagon.s index d0bd48e3..bf1fc4d7 100644 --- a/mist/octagon.s +++ b/mist/octagon.s @@ -78,6 +78,9 @@ game_loop: cmp #OCTAGON_GRID_BOOK beq looking_at_grid_book + cmp #OCTAGON_GREEN_BOOK_OPEN + beq looking_at_green_book + cmp #OCTAGON_FIREPLACE_SHELF bne check_temple_center jsr draw_fireplace_shelf_pages @@ -154,6 +157,10 @@ looking_at_grid_book: jsr draw_book_grid jmp nothing_special +looking_at_green_book: + jsr draw_atrus_book + jmp nothing_special + animate_red_book: jsr red_book_animation jmp nothing_special diff --git a/mist/octagon_fireplace.s b/mist/octagon_fireplace.s index 8d692e44..0ee6c694 100644 --- a/mist/octagon_fireplace.s +++ b/mist/octagon_fireplace.s @@ -44,7 +44,7 @@ fireplace_check_book: lda CURSOR_X cmp #17 bcc fireplace_nil - bcs open_green_book + bcs grab_green_book ; see if blue page fireplace_check_blue_page: @@ -72,7 +72,7 @@ return_fireplace: jmp change_location -open_green_book: +grab_green_book: lda #OCTAGON_GREEN_BOOK sta LOCATION jmp change_location @@ -97,7 +97,22 @@ fireplace_grab_blue_page: jmp take_blue_page + ; if touch window, warp to d'ni + ; otherwise, just speed up the talking +touch_green_book: + lda CURSOR_X + cmp #21 + bcc no_dni + cmp #32 + bcs no_dni + lda CURSOR_Y + cmp #10 + bcc no_dni + cmp #24 + bcs no_dni + goto_dni: + lda #DNI_ARRIVAL sta LOCATION @@ -112,90 +127,251 @@ goto_dni: rts + ; just speed up talking +no_dni: + lda GREEN_BOOK_PROGRESS + cmp #8 + beq no_speedup + cmp #10 + beq no_speedup + + ; skip to next + inc GREEN_BOOK_PROGRESS + lda #0 + sta FRAMEL + sta FRAMEH + +no_speedup: + rts + + ; talking to atrus ; book, 1st time ; 1 2 3 ; 0123456789012345678901234567890123456789 -.byte 21,0,"WHO THE DEVIL ARE YOU?",0 -.byte 22,0,"D--DON'T COME HERE TO D'NI, NOT YET.",0 -.byte 23,0,"I HAVE MANY QUESTIONS FOR YOU, MY FRIEND",0 -.byte 23,0,"AS YOU, NO DOUBT, HAVE FOR ME.",0 +atrus_green_book1: +.byte 0,20,"WHO THE DEVIL ARE YOU?",0 +.byte 0,21,"D--DON'T COME HERE TO D'NI, NOT YET.",0 +.byte 0,22,"I HAVE MANY QUESTIONS FOR YOU, MY FRIEND",0 +.byte 0,23,"AS YOU, NO DOUBT, HAVE FOR ME.",0 -.byte 21,0,"PERHAPS MY STORY IS IN ORDER. I AM ATRUS",0 -.byte 22,0,"I FEAR YOU HAVE MET MY SONS,",0 -.byte 23,0,"SIRRUS & ACHENAR, TRAPPED IN MY LIBRARY",0 -.byte 24,0,"ON MYST ISLAND",0 +atrus_green_book2: +.byte 0,20,"PERHAPS MY STORY IS IN ORDER. I AM ATRUS",0 +.byte 0,21,"I FEAR YOU HAVE MET MY SONS,",0 +.byte 0,22,"SIRRUS & ACHENAR, TRAPPED IN MY LIBRARY",0 +.byte 0,23,"ON MYST ISLAND",0 -.byte 21,0,"IT CONTAINS MY WRITINGS, MY BOOKS",0 -.byte 22,0,"THAT LINK TO FANTASTIC PLACES, AN ART",0 -.byte 23,0,"I LEARNED FROM MY FATHER YEARS AGO.",0 +atrus_green_book3: +.byte 0,20,"IT CONTAINS MY WRITINGS, MY BOOKS",0 +.byte 0,21,"THAT LINK TO FANTASTIC PLACES, AN ART",0 +.byte 0,22,"I LEARNED FROM MY FATHER YEARS AGO.",0 +.byte 0,23," ",0 -.byte 21,0,"THE RED & BLUE BOOKS ARE DIFFERENT",0 -.byte 22,0,"I WROTE THOSE TO ENTRAP OVER-GREEDY",0 -.byte 23,0,"EXPLORERS THAT MIGHT STUMBLE UPON MYST",0 -.byte 24,0,"I HAD NO IDEA I'D ENTRAP MY OWN SONS",0 +atrus_green_book4: +.byte 0,20,"THE RED & BLUE BOOKS ARE DIFFERENT",0 +.byte 0,21,"I WROTE THOSE TO ENTRAP OVER-GREEDY",0 +.byte 0,22,"EXPLORERS THAT MIGHT STUMBLE UPON MYST",0 +.byte 0,23,"I HAD NO IDEA I'D ENTRAP MY OWN SONS",0 -.byte 21,0,"I HAD NO IDEA THE EXTENT OF THEIR GREED",0 -.byte 22,0,"THEY USED THEIR OWN MOTHER, MY CATHERINE",0 -.byte 23,0,"TO LURE ME HERE TO D'NI. THEY REMOVED A",0 -.byte 24,0,"PAGE FROM MY MYST BOOK SO I CAN'T RETURN",0 +atrus_green_book5: +.byte 0,20,"I HAD NO IDEA THE EXTENT OF THEIR GREED",0 +.byte 0,21,"THEY USED THEIR OWN MOTHER, MY CATHERINE",0 +.byte 0,22,"TO LURE ME HERE TO D'NI. THEY REMOVED A",0 +.byte 0,23,"PAGE FROM MY MYST BOOK SO I CAN'T RETURN",0 -.byte 21,0,"YOU, MY FRIEND, CAN BRING THE PAGE TO ME",0 -.byte 22,0,"I PRAY YOU BELIEVE MY STORY AND NOT THE",0 -.byte 23,0,"LIES MY SONS HAVE TOLD. BRING THE PAGE",0 -.byte 24,0,"AND BRING JUSTICE TO MY SONS. HURRY.",0 +atrus_green_book6: +.byte 0,20,"YOU, MY FRIEND, CAN BRING THE PAGE TO ME",0 +.byte 0,21,"I PRAY YOU BELIEVE MY STORY AND NOT THE",0 +.byte 0,22,"LIES MY SONS HAVE TOLD. BRING THE PAGE",0 +.byte 0,23,"AND BRING JUSTICE TO MY SONS. HURRY.",0 ; book, 2nd time +atrus_green_book9: +.byte 0,20,"HAVE YOU FOUND THE MISSING PAGE?",0 +.byte 0,21,"OH, COME, COME. COME ON THEN.",0 +.byte 0,22," ",0 +.byte 0,23," ",0 -.byte 21,0,"HAVE YOU FOUND THE MISSING PAGE?",0 -.byte 22,0,"OH, COME, COME. COME ON THEN.",0 +atrus_green_nothing: +.byte 0,20," ",0 +.byte 0,21," ",0 +.byte 0,22," ",0 +.byte 0,23," ",0 -; ending, both -; +atrus_green_words: +.word atrus_green_nothing +.word atrus_green_book1,atrus_green_book2,atrus_green_book3 +.word atrus_green_book4,atrus_green_book5,atrus_green_book6 +.word atrus_green_nothing +.word atrus_green_nothing +.word atrus_green_book9 +.word atrus_green_nothing -.byte 21,0,"AH, MY FRIEND. YOU'VE RETURNED.",0 -.byte 22,0,"WE MEET FACE-TO-FACE.",0 -.byte 23,0,"AND THE PAGE, DID YOU BRING THE PAGE?",0 -; ending, no white page -; +draw_atrus_book: -.byte 21,0,"YOU DIDN'T BRING THE PAGE.",0 -.byte 22,0,"YOU DIDN'T BRING THE PAGE!",0 -.byte 23,0,"WHAT KIND OF FOOL ARE YOU?!",0 -.byte 24,0,"DID YOU NOT TAKE MY WARNING SERIOUSLY?",0 + ; calc next frame + lda FRAMEH + cmp #$2 + bne no_increment -.byte 21,0,"*SIGH*",0 -.byte 22,0,"WELCOME TO D'NI",0 -.byte 23,0,"YOU AND I WILL LIVE HERE... FOREVER.",0 + lda GREEN_BOOK_PROGRESS + cmp #8 + bcs no_increment + cmp #10 + bcs no_increment -; ending, with white page + inc GREEN_BOOK_PROGRESS -.byte 21,0,"GIVE IT TO ME... GIVE ME THE PAGE",0 -.byte 22,0,"PLEASE GIVE THE PAGE...",0 + lda #0 + sta FRAMEH + sta FRAMEL -.byte 21,0,"YOU'VE DONE THE RIGHT THING.",0 -.byte 22,0,"I HAVE A DIFFICULT CHOIC TO MAKE",0 -.byte 23,0,"MY SONS BETRAYED ME, I KNOW",0 -.byte 24,0,"WHAT I MUST DO. I SHALL RETURN SHORTLY",0 +no_increment: -; [links away] + ; 0 = writing + ; 1..6 = talking + ; 7 = writing again + ; 8 = writing + ; 9 = talking + ; 10 = writing -; [links in] + ; put words -.byte 21,0,"IT IS DONE. I HAVE MANY QUESTIONS,",0 -.byte 23,0,"BUT MY WRITING CANNOT WAIT. MY DELAY",0 -.byte 24,0,"MAY HAVE HAD A CATASTROPHIC IMPACT ON",0 -.byte 24,0,"THE WORLD WHERE MY WIFE IS HELD HOSTAGE",0 + jsr clear_bottom -.byte 21,0,"A REWARD? I'M SORRY BUT ALL I HAVE TO",0 -.byte 22,0,"OFFER IS THE LIBRARY ON MYST AND THE",0 -.byte 23,0,"BOOKS CONTAINED THERE. FEEL FREE TO",0 -.byte 24,0,"EXPLORE AT YOUR LEISURE.",0 + lda GREEN_BOOK_PROGRESS + asl + tay + lda atrus_green_words,Y + sta OUTL + lda atrus_green_words+1,Y + sta OUTH + + lda #$09 ; ora + sta ps_smc1 + lda #$80 + sta ps_smc1+1 ; set regular text + + jsr move_and_print + jsr move_and_print + jsr move_and_print + jsr move_and_print + + lda #$29 ; and + sta ps_smc1 + lda #$3f + sta ps_smc1+1 ; restore inverse text + + ; draw sprite + + lda #22 + sta XPOS + + lda #12 + sta YPOS + + lda GREEN_BOOK_PROGRESS + asl + tay + + lda atrus_green_sprites,Y + sta INL + lda atrus_green_sprites+1,Y + sta INH + + jsr put_sprite_crop + + rts + + +atrus_book_sprites: + + +atrus_book_writing_sprite: +.byte 9,6 +.byte $00,$00,$00,$55,$88,$88,$88,$55,$00 +.byte $55,$00,$55,$88,$88,$88,$88,$55,$00 +.byte $55,$00,$55,$bb,$0b,$38,$38,$55,$00 +.byte $55,$f0,$ff,$bb,$33,$b0,$83,$dd,$d0 +.byte $ff,$df,$dd,$88,$38,$88,$88,$dd,$dd +.byte $ff,$dd,$dd,$d8,$08,$08,$d0,$dd,$dd + +atrus_book_talking_sprite: +.byte 9,6 +.byte $00,$00,$b8,$b8,$88,$55,$55,$55,$00 +.byte $55,$00,$bb,$bb,$bb,$55,$55,$55,$00 +.byte $55,$00,$b0,$33,$b0,$55,$55,$55,$00 +.byte $55,$f0,$8b,$38,$88,$dd,$dd,$d5,$00 +.byte $ff,$df,$08,$b8,$08,$dd,$dd,$dd,$dd +.byte $ff,$dd,$d0,$d0,$d0,$dd,$dd,$dd,$dd + +atrus_book_wait_sprite: +.byte 9,6 +.byte $00,$00,$b8,$b8,$88,$55,$55,$55,$00 +.byte $55,$00,$bb,$bb,$bb,$55,$55,$55,$00 +.byte $55,$00,$b0,$33,$b0,$55,$b5,$b5,$00 +.byte $55,$f0,$8b,$38,$88,$dd,$bb,$bb,$00 +.byte $ff,$df,$08,$b8,$08,$dd,$ff,$ff,$dd +.byte $ff,$dd,$d0,$d0,$d0,$dd,$dd,$ff,$ff + +atrus_book_glasses_sprite: +.byte 9,6 +.byte $00,$00,$80,$85,$85,$55,$55,$55,$00 +.byte $55,$00,$bb,$bb,$b8,$55,$55,$55,$00 +.byte $55,$00,$0b,$3b,$0b,$bb,$55,$55,$00 +.byte $55,$f0,$bb,$83,$8b,$bb,$bb,$f5,$00 +.byte $ff,$df,$88,$83,$88,$dd,$f8,$ff,$ff +.byte $ff,$dd,$00,$0b,$00,$dd,$dd,$dd,$ff + +atrus_book_gesturing_sprite: +.byte 9,6 +.byte $00,$00,$b8,$b8,$88,$55,$55,$55,$00 +.byte $55,$00,$bb,$bb,$bb,$55,$55,$55,$00 +.byte $55,$00,$b0,$33,$b0,$55,$55,$55,$00 +.byte $55,$f0,$8b,$38,$88,$dd,$dd,$d5,$00 +.byte $ff,$df,$08,$b8,$08,$bb,$bb,$ff,$ff +.byte $ff,$dd,$d0,$d0,$db,$dd,$dd,$df,$df + +atrus_green_sprites: +.word atrus_book_writing_sprite +.word atrus_book_wait_sprite +.word atrus_book_talking_sprite,atrus_book_glasses_sprite +.word atrus_book_talking_sprite,atrus_book_glasses_sprite +.word atrus_book_talking_sprite +.word atrus_book_writing_sprite +.word atrus_book_writing_sprite +.word atrus_book_gesturing_sprite +.word atrus_book_writing_sprite + + ;========================== + ; open green book + ; mostly has to do with getting dialog right + +open_green_book: + ; start part-way through pause + lda #1 + sta FRAMEH + lda #$80 + sta FRAMEL ; want consistent timers + + + ; see if it's the first time we've opened book + lda GREEN_BOOK_PROGRESS + beq actually_open_book + + ; skip to second speech if not + lda #8 + sta GREEN_BOOK_PROGRESS + +actually_open_book: + + lda #DIRECTION_E|DIRECTION_SPLIT + sta DIRECTION + + lda #OCTAGON_GREEN_BOOK_OPEN + sta LOCATION + jmp change_location -.byte 21,0,"ALSO, I AM FIGHTING A FOE MUCH",0 -.byte 22,0,"GREATER THAN MY SONS CAN IMAGINE.",0 -.byte 23,0,"I MIGHT REQUEST YOUR ASSISTANCE.",0 -.byte 24,0,"UNTIL THEN, HAVE FUN ON MYST",0 diff --git a/mist/zp.inc b/mist/zp.inc index 439fa32c..ca22ec77 100644 --- a/mist/zp.inc +++ b/mist/zp.inc @@ -167,9 +167,9 @@ PILLAR_ON = $BE PILLAR_LEAF = $20 PILLAR_CROSS = $40 PILLAR_EMU = $80 +GREEN_BOOK_PROGRESS = $BF - -END_OF_SAVE = $BF +END_OF_SAVE = $C0 ; done game puzzle state