Prev: BA66 Up: Map Next: BAB3
BA6E: Print a "{character} is in {room}" message
Used by the routine at E79B.
BA6E LD A,($BAB3) Are we in the middle of printing a message?
BA71 OR A
BA72 RET NZ Return if so, busy at the moment.
Not redrawing the room, so the message can be printed.
BA73 LD HL,$DFDC Point HL at the character set. (DFDC)
BA76 LD ($B7E9),HL Set the printing routine in B7BA to use this.
BA79 LD A,(IY+$0F) Get the current room in A.
BA7C LD HL,$7F1F Point HL at the start of the room text entries.
BA7F CALL $AC6C Search for the right entry, returns with HL pointing to the correct address for the room's text.
BA82 PUSH HL Store HL.
BA83 CALL $BACE Put the string's length in C.
BA86 LD C,B
BA87 LD H,$7C Point H at the high byte for the character names. (7C00)
BA89 LD L,(IY-$23) Get the low byte from the character. (BC44)
BA8C PUSH HL Remember the address for the character in HL.
BA8D CALL $BACE Put the string's length in B.
BA90 LD A,$07 Given the total string length (character + room + extra), work out the position on screen that will put the display justified in the centre.
BA92 ADD A,B
BA93 ADD A,C
BA94 LD C,A
BA95 LD A,$20
BA97 SUB C
BA98 SRL A
BA9A LD E,A
BA9B LD D,$04 Start drawing at row 4.
BA9D POP HL Restore the character name in HL.
BA9E LD C,$4E Set bright yellow on blue attribute.
BAA0 CALL $B84B Draw the graphic.
BAA3 LD HL,$BA66 Point HL at "{character} is in {room}" text. (BA66)
BAA6 CALL $B84B Draw it.
BAA9 POP HL Restore the room text in HL.
BAAA CALL $B84B Draw it.
BAAD LD A,$1E Set the tick count to 1E and return.
BAAF LD ($BAB3),A
BAB2 RET
Prev: BA66 Up: Map Next: BAB3