Prev: 75CA Up: Map Next: 75F6
75D0: Determine the interval between the last message and the next
Used by the routine at 6EC5. Returns with the interval in A, which indicates the minimum number of subintervals of 0.64s that the current message should be displayed for.
75D0 LD A,($75C9) Collect the urgent message number from 75C9
75D3 AND A Is it 0 (no message)?
75D4 JR Z,$75F2 Jump if so
75D6 LD HL,$7FB7 Collect the index of the current message in the queue from 7FB7
75D9 LD A,(HL)
75DA INC A A=index of the next message in the queue
75DB AND $07
75DD ADD A,$B8 Point HL at the slot for the next message in the queue
75E0 LD B,$07 There are up to 7 messages ahead in the queue
75E2 LD A,($75C9) A=urgent message number
75E5 CP (HL) Set the zero flag if the urgent message is in this slot in the queue
75E6 INC HL Move HL along to the next slot in the message queue (or past the end of the queue and into the bullet buffers at 7FC0 and 7FC4, which is a bug)
75E7 JR NZ,$75EC Jump unless the urgent message is at this position in the queue
75E9 LD A,$01 Set A=1 so that the next message is displayed as soon as possible
75EC DJNZ $75E5 Jump back until all messages in the queue have been checked
75EE XOR A Clear the urgent message number at 75C9: it was not in the queue
75EF LD ($75C9),A
75F2 LD A,($6FC4) Collect the normal message display interval from 6FC4
75F5 RET
Prev: 75CA Up: Map Next: 75F6