Prev: 7D30 Up: Map Next: 7D87
7D48: Message display
This incrementally wipes and displays queued game messages.
Used by the routine at main_loop.
Proceed only if message display delay is zero.
message_display 7D48 LD A,($7D0F) If message display delay is positive...
7D4B AND A
7D4C JP Z,message_display_0
7D4F DEC A Decrement it - we'll get called again until it hits zero
7D50 LD ($7D0F),A
7D53 RET Return
Otherwise message_display_delay reached zero.
message_display_0 7D54 LD A,($7D10) If message display index == message_NEXT (128) exit via (jump to) next_message
7D57 CP $80
7D59 JR Z,next_message
7D5B JR NC,wipe_message Otherwise if message display index > message_NEXT exit via (jump to) wipe_message
Display a character
7D5D LD HL,($7D13) Otherwise... point HL to the current message character
7D60 LD DE,$50E0 Point DE at the message text screen address plus the display index
7D63 OR E
7D64 LD E,A
7D65 CALL plot_glyph Plot the glyph
7D68 LD A,E Save the incremented message display index
7D69 AND $1F
7D6B LD ($7D10),A
7D6E INC HL Check for end of string ($FF)
7D6F LD A,(HL)
7D70 CP $FF
7D72 JP NZ,not_end_of_string
Leave the message for 31 turns, then wipe it.
7D75 LD A,$1F Set message display delay to 31
7D77 LD ($7D0F),A
7D7A LD A,($7D10) Set the message_NEXT flag in the message display index
7D7D OR $80
7D7F LD ($7D10),A
7D82 RET Return
not_end_of_string 7D83 LD ($7D13),HL If it wasn't the end of the string set current message character to HL
7D86 RET Return
Prev: 7D30 Up: Map Next: 7D87