Routines |
Prev: 29385 | Up: Map | Next: 29441 |
29394 | LD DE,(32612) | Copy the speech bubble lip coordinates from 32612 to DE | ||
29398 | LD A,E | Now E holds the x-coordinate of the left edge of the speech bubble | ||
29399 | AND 248 | |||
29401 | LD E,A | |||
29402 | LD A,(32512) | A=leftmost column of the skool on screen (0-64) | ||
29405 | SUB E | Is the speech bubble at the far left of the screen? | ||
29406 | JR Z,29418 | Jump if so | ||
29408 | CCF | Return with the carry flag set if the speech bubble is off-screen to the left | ||
29409 | RET C | |||
29410 | CP 225 | Return with the carry flag set if the speech bubble is off-screen to the right | ||
29412 | RET C | |||
29413 | NEG | A=1, 2 or 3 (corresponding to the quadrant of the screen containing the speech bubble) | ||
29415 | RRCA | |||
29416 | RRCA | |||
29417 | RRCA | |||
29418 | LD E,A | E=0-3 (quadrant of the screen containing the speech bubble) | ||
29419 | LD A,D | Point DE at the byte of the screen refresh buffer corresponding to the top row of the speech bubble | ||
29420 | SUB 151 | |||
29422 | ADD A,A | |||
29423 | ADD A,A | |||
29424 | ADD A,E | |||
29425 | LD E,A | |||
29426 | LD D,127 | |||
29428 | 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) | ||
29429 | OR 126 | |||
29431 | LD (DE),A | |||
29432 | LD A,E | Point DE at the byte of the screen refresh buffer corresponding to the bottom row of the speech bubble | ||
29433 | ADD A,4 | |||
29435 | LD E,A | |||
29436 | 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) | ||
29437 | OR 126 | |||
29439 | LD (DE),A | |||
29440 | RET | Return with the carry flag reset |
Prev: 29385 | Up: Map | Next: 29441 |