Routines

27860: Prepare doors, windows, cups and bike for new game


Used by routines at 62910

27860 2156E1 LD HL,57686 HL references the table at 57686
27863 5E LD E,(HL) Point DE at the relevant data table concerning the the door, window, cup or bike
27864 2C INC L
27865 56 LD D,(HL)
27866 2C INC L
27867 E5 PUSH HL
27868 EB EX DE,HL
27869 CD186C CALL 27672 Alter UDG references in play area and update SRB
27872 E1 POP HL
27873 7D LD A,L
27874 FE70 CP 112
27876 20F1 JR NZ,27863 Jump back until all these objects have been initialised
27878 21F47F LD HL,32756 Doors flags
27881 3618 LD (HL),24 Set bits 3 and 4: skool gate and boys' skool door open
27883 C9 RET

Doors/windows/cups/bike table:
Address Contents Object
57686 56637 Left study door (closed)
57688 57088 Right study door (closed)
57690 56576 Science lab storeroom door (closed)
57692 57149 Boys' skool door (closed)
57694 63744 Skool gate (closed)
57696 56064 Drinks cabinet door (closed)
57698 55040 Top floor window (closed)
57700 55552 Middle floor window (closed)
57702 57856 Bike (chained to tree)
57704 64000 Skool gate (open)
57706 57405 Boys' skool door (open)
57708 56081 Cups on shelf in boys' skool (empty)
57710 56337 Cup on shelf in girls' skool (empty)