Prev: 7D87 Up: Map Next: 7DCD
7D99: Next message
This causes the next queued game message to get displayed.
Used by the routine at message_display.
Called when messages.display_index == 128.
next_message 7D99 LD HL,($7D11) Get the message queue pointer
7D9C LD DE,$7CFE Queue start address
7D9F LD A,L Is the queue pointer at the start of the queue?
7DA0 CP E
7DA1 RET Z Return if so
7DA2 EX DE,HL
7DA3 LD A,(HL) Get message index from queue
7DA4 INC HL
7DA5 LD C,(HL) Bug: C is loaded here but not used. This could be a hangover from 16-bit message IDs
7DA6 ADD A,A Set current message character pointer to messages_table[A]
7DA7 LD HL,$7DCD
7DAA LD E,A
7DAB LD D,$00
7DAD ADD HL,DE
7DAE LD E,(HL)
7DAF INC HL
7DB0 LD D,(HL)
7DB1 EX DE,HL
7DB2 LD ($7D13),HL
7DB5 LD DE,$7CFC Shunt the whole queue back by two bytes discarding the first element
7DB8 LD HL,$7CFE
7DBB LD BC,$0010
7DBE LDIR
7DC0 LD HL,($7D11) Move the message queue pointer back
7DC3 DEC HL
7DC4 DEC HL
7DC5 LD ($7D11),HL
7DC8 XOR A Zero the message display index
7DC9 LD ($7D10),A
7DCC RET Return
Prev: 7D87 Up: Map Next: 7DCD