Routines

31462: Release some mice (if possible)


The address of this routine is placed in 32727 by the routine at 57893

H 210 (ERIC)

31462 3AFF7F LD A,(32767) A=column of play area at far left of screen
31465 FE90 CP 144
31467 D8 RET C Return unless at least half the girl's skool is on-screen
31468 3AE17F LD A,(32737) A=number of mice caught
31471 A7 AND A
31472 C8 RET Z Return if ERIC has no mice
31473 E5 PUSH HL
31474 F5 PUSH AF
31475 2E02 LD L,2
31477 56 LD D,(HL) D=ERIC's y-coordinate
31478 2D DEC L
31479 5E LD E,(HL) E=ERIC's x-coordinate
31480 1C INC E
31481 2D DEC L
31482 CB7E BIT 7,(HL) Is ERIC facing right?
31484 2002 JR NZ,31488 Jump if so
31486 1D DEC E
31487 1D DEC E
31488 CD0E7B CALL 31502 Release up to five mice
31491 F1 POP AF
31492 21E17F LD HL,32737
31495 BE CP (HL)
31496 7E LD A,(HL)
31497 C4C27B CALL NZ,31682 Print the mice left in ERIC's pocket
31500 E1 POP HL
31501 C9 RET