| Routines

72D2: Update the SRB for the middle six columns of the speech bubble

Used by the routines at 7432 and F4FA. Returns with the carry flag set if the speech bubble is off-screen.
72D2 | LD DE,($7F64) | Copy the speech bubble lip coordinates from 7F64 to DE
72D6 | LD A,E | Now E holds the x-coordinate of the left edge of the speech bubble
72D7 | AND $F8
72D9 | LD E,A
72DA | LD A,($7F00) | A=leftmost column of the skool on screen (0-64)
72DD | SUB E | Is the speech bubble at the far left of the screen?
72DE | JR Z,$72EA | Jump if so
72E0 | CCF | Return with the carry flag set if the speech bubble is off-screen to the left
72E1 | RET C
72E2 | CP $E1 | Return with the carry flag set if the speech bubble is off-screen to the right
72E4 | RET C
72E5 | NEG | A=1, 2 or 3 (corresponding to the quadrant of the screen containing the speech bubble)
72E7 | RRCA
72E8 | RRCA
72E9 | RRCA
72EA | LD E,A | E=0-3 (quadrant of the screen containing the speech bubble)
72EB | LD A,D | Point DE at the byte of the screen refresh buffer corresponding to the top row of the speech bubble
72EC | SUB $97
72EE | ADD A,A
72EF | ADD A,A
72F0 | ADD A,E
72F1 | LD E,A
72F2 | LD D,$7F
72F4 | LD A,(DE) | Set bits 1-6 of this screen refresh buffer byte (so that the part of the screen hidden by the middle 6 UDGs of the top row of the speech bubble will be refreshed)
72F5 | OR $7E
72F7 | LD (DE),A
72F8 | LD A,E | Point DE at the byte of the screen refresh buffer corresponding to the bottom row of the speech bubble
72F9 | ADD A,$04
72FB | LD E,A
72FC | LD A,(DE) | Set bits 1-6 of this screen refresh buffer byte (so that the part of the screen hidden by the middle 6 UDGS of the bottom row of the speech bubble will be refreshed)
72FD | OR $7E
72FF | LD (DE),A
7300 | RET | Return with the carry flag reset