![]() |
Routines |
| A | water's current x-coordinate |
| B | water's new animatory state |
| C | x-coordinate increment (-2, -1 or 0) |
| D | water's new y-coordinate |
| H | 214 (water) |
| 64057 | JR NC,64061 | Jump if the water is travelling to the left |
| 64059 | SUB C | Add 0, 1 or 2 to the water's current x-coordinate |
| 64060 | SUB C | Do the same again to compensate for the ADD A,C instruction below |
| 64061 | ADD A,C | Now A=new x-coordinate for the water |
| 64062 | LD E,A | Copy this to E |
| 64063 | CP 191 | Reset the carry flag if the water has hit the far left wall of the boys' skool or the far right wall of the girls' skool |
| 64065 | LD A,B | Transfer the water's new animatory state to A |
| 64066 | JP C,24880 | Update SRB if the water hasn't hit either far wall (i.e. is still entirely on-screen) |
| 64069 | LD L,18 | Otherwise remove the routine address (63960) from bytes 17 and 18 of the water's buffer |
| 64071 | LD (HL),0 | |
| 64073 | JP 29910 | Place the water out of sight |