Prev: 73CF Up: Map Next: 7414
73E4: Show or hide the fuse, door, light bulb or phone in the icon panel (1)
Used by the routines at 790D and F080. Shows or hides the fuse, door, light bulb or phone in the icon panel depending on Sam's current location and activity.
73E4 LD HL,$E600 Point HL at byte 0x00 of Sam's buffer
73E7 BIT 0,(HL) Is Sam midstride?
73E9 RET NZ Return if so
73EA LD A,($7FFC) Collect Sam's status flags from 7FFC
73ED AND A Is Sam engaged in an action at the moment?
73EE JR Z,$740A Jump if not
This entry point is used by the routine at 7425. Now that the relevant bits at 7FA8 have been set or reset, it's time to show or hide the fuse, door, light bulb or phone in the icon panel.
73F0 LD B,$04 There are four icons to show or hide
73F2 LD A,($7FA8) Collect the icon panel status flags from 7FA8
73F5 LD E,$A6 E will hold the LSB of the attribute file address for the icon; initialise it to 166
73F7 INC E Set E to the LSB of the attribute file address for the next icon in the panel
73F8 INC E
73F9 ADD A,A Set the carry flag if this icon should be shown
73FA PUSH AF Save the icon status flags
73FB PUSH DE Save the LSB of the attribute file address
73FC CALL C,$701F Reveal the icon if necessary
73FF CALL NC,$7023 Or hide it if necessary
7402 POP DE Restore the LSB of the attribute file address to E
7403 POP AF Restore the icon status flags to A
7404 DJNZ $73F7 Jump back until the fuse, door, light bulb and phone icons have been revealed or hidden
7406 LD ($7FA8),A Clear all the icon panel status flags at 7FA8
7409 RET
Sam is not engaged in any action at the moment (no status flags at 7FFC are set).
740A LD A,($7FEB) Collect the police flags from 7FEB
740D RLCA Is Sam in jail?
740E JR C,$743D Jump if so
7410 LD L,$02 Point HL at byte 0x02 of Sam's buffer
7412 JR $7425 Check whether Sam is standing next to a fuse, door, light switch or telephone, and return here to update the icon panel as appropriate
Prev: 73CF Up: Map Next: 7414