Prev: 9F91 Up: Map Next: A18C
A01B: Display Poem
Used by the routine at HandlerPoems.
Input
IX Actor Entity
DisplayPoem A01B LD A,(IX+$0B) Fetch the current number of amulet pieces which need to be collected.
Convert "number of pieces to collect" into "number of pieces collected".
A01E LD BC,$0400 BC=0400 counter = 04 (total number of pieces) and initialise C to 00.
Poem_CollectCollected_Loop A021 RRCA The number of amulet pieces which need to be collected is held in bits, so rotate A and if there are no bits to carry over then jump to Poem_CollectCollected_Skip.
A022 JR NC,Poem_CollectCollected_Skip
A024 INC C Increment C by one.
Poem_CollectCollected_Skip A025 DJNZ Poem_CollectCollected_Loop Decrease counter by one and loop back to Poem_CollectCollected_Loop until counter is zero.
A027 LD A,C A=C (the number of amulet pieces collected).
Check if poem "1" should be displayed.
A028 DEC A Decrease A by one and jump to Poem_1_Reference if A is now zero.
A029 JR Z,Poem_1_Reference
Check if poem "2" should be displayed.
A02B DEC A Decrease A by one and jump to Poem_2_Reference if A is now zero.
A02C JR Z,Poem_2_Reference
Check if poem "3" should be displayed.
A02E DEC A Decrease A by one and jump to Poem_3_Reference if A is now zero.
A02F JR Z,Poem_3_Reference
Handles pointing to poem "4".
A031 LD DE,$A13B DE=Poem_4_Copy.
Each poem is four lines of prose.
Poem_Start A034 LD B,$04 B=04.
This entry point is used by the routine at GameComplete.
Poem_Loop A036 EX DE,HL
A037 LD E,(HL)
A038 INC HL
A039 LD D,(HL)
A03A INC HL
A03B EX DE,HL
A03C PUSH BC Stash BC on the stack.
A03D CALL PrintStringColour Call PrintStringColour.
A040 EXX Switch to the shadow registers.
A041 INC DE Increment DE by one.
A042 POP BC Restore BC from the stack.
A043 DJNZ Poem_Loop Decrease counter by one and loop back to Poem_Loop until counter is zero.
A045 RET Return.
Handles pointing to poem "1".
Poem_1_Reference A046 LD DE,$A055 DE=Poem_1_Copy.
A049 JR Poem_Start Jump to Poem_Start.
Handles pointing to poem "2".
Poem_2_Reference A04B LD DE,$A0A7 DE=Poem_2_Copy.
A04E JR Poem_Start Jump to Poem_Start.
Handles pointing to poem "3".
Poem_3_Reference A050 LD DE,$A0F4 DE=Poem_3_Copy.
A053 JR Poem_Start Jump to Poem_Start.
Poem 1.
X Position Y Position Attribute Text
04 10 47 ONE PIECE IS ALL THAT YOU
0B 12 47 HAVE FOUND
05 14 45 COLLECT THREE MORE AND
09 16 45 OUTWARD BOUND
Poem_1_Copy A055 DEFB $20,$80 X / Y position.
A057 DEFB $47 Attribute.
A058 DEFM "ONE PIECE IS ALL THAT YO","U"+$80 "ONE PIECE IS ALL THAT YOU".
A071 DEFB $58,$90 X / Y position.
A073 DEFB $47 Attribute.
A074 DEFM "HAVE FOUN","D"+$80 "HAVE FOUND".
A07E DEFB $28,$A0 X / Y position.
A080 DEFB $45 Attribute.
A081 DEFM "COLLECT THREE MORE AN","D"+$80 "COLLECT THREE MORE AND".
A097 DEFB $48,$B0 X / Y position.
A099 DEFB $45 Attribute.
A09A DEFM "OUTWARD BOUN","D"+$80 "OUTWARD BOUND".
Poem 2.
X Position Y Position Attribute Text
03 10 47 TWO PIECES FOUND ARE YOURS
0C 12 47 TO KEEP
04 14 45 THIS SCORE AGAIN IS WHAT
0C 16 45 YOU SEEK
Poem_2_Copy A0A7 DEFB $18,$80 X / Y position.
A0A9 DEFB $47 Attribute.
A0AA DEFM "TWO PIECES FOUND ARE YOUR","S"+$80 "TWO PIECES FOUND ARE YOURS".
A0C4 DEFB $60,$90 X / Y position.
A0C6 DEFB $47 Attribute.
A0C7 DEFM "TO KEE","P"+$80 "TO KEEP".
A0CE DEFB $20,$A0 X / Y position.
A0D0 DEFB $45 Attribute.
A0D1 DEFM "THIS SCORE AGAIN IS WHA","T"+$80 "THIS SCORE AGAIN IS WHAT".
A0E9 DEFB $60,$B0 X / Y position.
A0EB DEFB $45 Attribute.
A0EC DEFM "YOU SEE","K"+$80 "YOU SEEK".
Poem 3.
X Position Y Position Attribute Text
07 10 47 ONE PIECE MORE MUST
0C 12 47 YOU AMASS
05 14 45 AND FIND THE KEEPER YOU
0C 16 45 MAY PASS
Poem_3_Copy A0F4 DEFB $38,$80 X / Y position.
A0F6 DEFB $47 Attribute.
A0F7 DEFM "ONE PIECE MORE MUS","T"+$80 "ONE PIECE MORE MUST".
A10A DEFB $60,$90 X / Y position.
A10C DEFB $47 Attribute.
A10D DEFM "YOU AMAS","S"+$80 "YOU AMASS".
A116 DEFB $28,$A0 X / Y position.
A118 DEFB $45 Attribute.
A119 DEFM "AND FIND THE KEEPER YO","U"+$80 "AND FIND THE KEEPER YOU".
A130 DEFB $60,$B0 X / Y position.
A132 DEFB $45 Attribute.
A133 DEFM "MAY PAS","S"+$80 "MAY PASS".
Poem 4.
X Position Y Position Attribute Text
03 10 47 FOUR PIECES FOUND HAVE NOW
0B 12 47 MADE WHOLE
04 14 45 TO FIND THE CAVE MUST BE
0B 16 45 YOUR GOAL
Poem_4_Copy A13B DEFB $18,$80 X / Y position.
A13D DEFB $47 Attribute.
A13E DEFM "FOUR PIECES FOUND HAVE NO","W"+$80 "FOUR PIECES FOUND HAVE NOW".
A158 DEFB $58,$90 X / Y position.
A15A DEFB $47 Attribute.
A15B DEFM "MADE WHOL","E"+$80 "MADE WHOLE".
A165 DEFB $20,$A0 X / Y position.
A167 DEFB $45 Attribute.
A168 DEFM "TO FIND THE CAVE MUST B","E"+$80 "TO FIND THE CAVE MUST BE".
A180 DEFB $58,$B0 X / Y position.
A182 DEFB $45 Attribute.
A183 DEFM "YOUR GOA","L"+$80 "YOUR GOAL".
Prev: 9F91 Up: Map Next: A18C