Prev: 98A9 Up: Map Next: 9965
9945: Set up chatter
A Message priority: must be higher than the stored priority for the message to take effect
HL Address of message set
chatter 9945 LD B,A Copy priority value to B
9946 LD A,($963D) Load chatter_state into A
9949 AND A If chatter_state == 0 (chatter idle) jump forward to chatter_set
994A JR Z,chatter_set
994C CP $03 If chatter_state >= 3 (chatter end) jump forward to chatter_set
994E JR NC,chatter_set
9950 LD A,($963E) If the current chatter_priority >= priority given then return
9953 CP B
9954 RET NC
chatter_set 9955 LD A,B Update chatter_priority
9956 LD ($963E),A
9959 LD ($9630),HL Set message set pointer
995C XOR A chatter_delay = 0
995D LD ($9633),A
9960 INC A chatter_state = 1 (start chatter)
9961 LD ($963D),A
9964 RET Return
Prev: 98A9 Up: Map Next: 9965